New upstream version 3.23.2

This commit is contained in:
Andrea Azzarone
2018-08-09 13:46:53 +03:00
882 changed files with 323996 additions and 311120 deletions

View File

@ -3,12 +3,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkPadController: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="Gestures.html" title="Gestures and event handling">
<link rel="prev" href="GtkGestureStylus.html" title="GtkGestureStylus">
<link rel="next" href="DeprecatedObjects.html" title="Deprecated">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@ -85,7 +85,7 @@
</tr>
<tr>
<td class="property_type">
<a href="../html/GdkDevice.html#GdkDevice-struct"><span class="type">GdkDevice</span></a> *</td>
<span class="type">GdkDevice</span> *</td>
<td class="property_name"><a class="link" href="GtkPadController.html#GtkPadController--pad" title="The “pad” property">pad</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
@ -137,32 +137,51 @@ perform no action, this event controller is provided to map those to
<span class="type">GAction</span> objects, thus letting the application give those a more semantic
meaning.</p>
<p>Buttons and sensors are not constrained to triggering a single action, some
<a href="../html/GdkDevice.html#GDK-SOURCE-TABLET-PAD:CAPS"><code class="literal">GDK_SOURCE_TABLET_PAD</code></a> devices feature multiple "modes", all these input
<code class="literal">GDK_SOURCE_TABLET_PAD</code> devices feature multiple "modes", all these input
elements have one current mode, which may determine the final action
being triggered. Pad devices often divide buttons and sensors into groups,
all elements in a group share the same current mode, but different groups
may have different modes. See <a href="../html/GdkDevicePad.html#gdk-device-pad-get-n-groups"><code class="function">gdk_device_pad_get_n_groups()</code></a> and
<a href="../html/GdkDevicePad.html#gdk-device-pad-get-group-n-modes"><code class="function">gdk_device_pad_get_group_n_modes()</code></a>.</p>
may have different modes. See <code class="function">gdk_device_pad_get_n_groups()</code> and
<code class="function">gdk_device_pad_get_group_n_modes()</code>.</p>
<p>Each of the actions that a given button/strip/ring performs for a given
mode is defined by <a class="link" href="GtkPadController.html#GtkPadActionEntry" title="struct GtkPadActionEntry"><span class="type">GtkPadActionEntry</span></a>, it contains an action name that
will be looked up in the given <span class="type">GActionGroup</span> and activated whenever the
specified input element and mode are triggered.</p>
<p>A simple example of <a class="link" href="GtkPadController.html" title="GtkPadController"><span class="type">GtkPadController</span></a> usage, assigning button 1 in all
modes and pad devices to an "invert-selection" action:</p>
<div class="informalexample"><pre class="programlisting">
GtkPadActionEntry *pad_actions[] = {
{ GTK_PAD_ACTION_BUTTON, 1, -1, "Invert selection", "pad-actions.invert-selection" },
};
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">GtkPadActionEntry</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">pad_actions</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> <a href="GtkPadController.html#GTK-PAD-ACTION-BUTTON:CAPS">GTK_PAD_ACTION_BUTTON</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Invert selection"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"pad-actions.invert-selection"</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal"></span>
<span class="cbracket">}</span><span class="symbol">;</span>
<span class="normal"></span>
<span class="normal">action_group </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_simple_action_group_new</span><span class="normal"> </span><span class="symbol">();</span>
<span class="normal">action </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_simple_action_new</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"pad-actions.invert-selection"</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
<span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">action</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"activate"</span><span class="symbol">,</span><span class="normal"> on_invert_selection_activated</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
<span class="function">g_action_map_add_action</span><span class="normal"> </span><span class="symbol">(</span><span class="function">G_ACTION_MAP</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">action_group</span><span class="symbol">),</span><span class="normal"> action</span><span class="symbol">);</span>
<span class="normal"></span>
<span class="normal">pad_controller </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkPadController.html#gtk-pad-controller-new">gtk_pad_controller_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> action_group</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
action_group = g_simple_action_group_new ();
action = g_simple_action_new ("pad-actions.invert-selection", NULL);
g_signal_connect (action, "activate", on_invert_selection_activated, NULL);
g_action_map_add_action (G_ACTION_MAP (action_group), action);
pad_controller = gtk_pad_controller_new (window, action_group, NULL);
</pre></div>
<p></p>
<p>The actions belonging to rings/strips will be activated with a parameter
of type <code class="literal">G_VARIANT_TYPE_DOUBLE</code> bearing the value of the given axis, it
@ -175,7 +194,7 @@ is required that those are made stateful and accepting this <span class="type">G
<pre class="programlisting"><a class="link" href="GtkPadController.html" title="GtkPadController"><span class="returnvalue">GtkPadController</span></a> *
gtk_pad_controller_new (<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *window</code></em>,
<em class="parameter"><code><span class="type">GActionGroup</span> *group</code></em>,
<em class="parameter"><code><a href="../html/GdkDevice.html#GdkDevice-struct"><span class="type">GdkDevice</span></a> *pad</code></em>);</pre>
<em class="parameter"><code><span class="type">GdkDevice</span> *pad</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkPadController.html" title="GtkPadController"><span class="type">GtkPadController</span></a> that will associate events from <em class="parameter"><code>pad</code></em>
to
actions. A <code class="literal">NULL</code> pad may be provided so the controller manages all pad devices
@ -208,7 +227,7 @@ events to actions, use <a class="link" href="GtkPadController.html#gtk-pad-contr
</tr>
<tr>
<td class="parameter_name"><p>pad</p></td>
<td class="parameter_description"><p>A <a href="../html/GdkDevice.html#GDK-SOURCE-TABLET-PAD:CAPS"><code class="literal">GDK_SOURCE_TABLET_PAD</code></a> device, or <code class="literal">NULL</code> to handle all pads. </p></td>
<td class="parameter_description"><p>A <code class="literal">GDK_SOURCE_TABLET_PAD</code> device, or <code class="literal">NULL</code> to handle all pads. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
@ -436,17 +455,17 @@ be deemed user-visible.</p></td>
<hr>
<div class="refsect2">
<a name="GtkPadController--pad"></a><h3>The <code class="literal">“pad”</code> property</h3>
<pre class="programlisting"> “pad” <a href="../html/GdkDevice.html#GdkDevice-struct"><span class="type">GdkDevice</span></a> *</pre>
<pre class="programlisting"> “pad” <span class="type">GdkDevice</span> *</pre>
<p>Pad device to control.</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
<div class="refsect1">
<a name="GtkPadController.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkEventController.html" title="GtkEventController"><span class="type">GtkEventController</span></a>, <a href="../html/GdkDevicePad.html#GdkDevicePad-struct"><span class="type">GdkDevicePad</span></a></p>
<p><a class="link" href="GtkEventController.html" title="GtkEventController"><span class="type">GtkEventController</span></a>, <span class="type">GdkDevicePad</span></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>