gtk3/docs/reference/gtk/html/GtkGesture.html
2022-11-23 15:09:27 +00:00

1451 lines
78 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkGesture: GTK+ 3 Reference Manual</title>
<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="GtkEventControllerMotion.html" title="GtkEventControllerMotion">
<link rel="next" href="GtkGestureSingle.html" title="GtkGestureSingle">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GtkGesture.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkGesture.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkGesture.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GtkGesture.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="Gestures.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkEventControllerMotion.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkGestureSingle.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkGesture"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkGesture.top_of_page"></a>GtkGesture</span></h2>
<p>GtkGesture — Base class for gestures</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkGesture.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">GdkDevice</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-device" title="gtk_gesture_get_device ()">gtk_gesture_get_device</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkWindow</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-window" title="gtk_gesture_get_window ()">gtk_gesture_get_window</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-set-window" title="gtk_gesture_set_window ()">gtk_gesture_set_window</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-is-active" title="gtk_gesture_is_active ()">gtk_gesture_is_active</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-is-recognized" title="gtk_gesture_is_recognized ()">gtk_gesture_is_recognized</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState"><span class="returnvalue">GtkEventSequenceState</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-sequence-state" title="gtk_gesture_get_sequence_state ()">gtk_gesture_get_sequence_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()">gtk_gesture_set_sequence_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-set-state" title="gtk_gesture_set_state ()">gtk_gesture_set_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-sequences" title="gtk_gesture_get_sequences ()">gtk_gesture_get_sequences</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-handles-sequence" title="gtk_gesture_handles_sequence ()">gtk_gesture_handles_sequence</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkEventSequence</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-last-updated-sequence" title="gtk_gesture_get_last_updated_sequence ()">gtk_gesture_get_last_updated_sequence</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">GdkEvent</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-last-event" title="gtk_gesture_get_last_event ()">gtk_gesture_get_last_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-point" title="gtk_gesture_get_point ()">gtk_gesture_get_point</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-bounding-box" title="gtk_gesture_get_bounding_box ()">gtk_gesture_get_bounding_box</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-bounding-box-center" title="gtk_gesture_get_bounding_box_center ()">gtk_gesture_get_bounding_box_center</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-group" title="gtk_gesture_group ()">gtk_gesture_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-ungroup" title="gtk_gesture_ungroup ()">gtk_gesture_ungroup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-get-group" title="gtk_gesture_get_group ()">gtk_gesture_get_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkGesture.html#gtk-gesture-is-grouped-with" title="gtk_gesture_is_grouped_with ()">gtk_gesture_is_grouped_with</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGesture.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">guint</span></td>
<td class="property_name"><a class="link" href="GtkGesture.html#GtkGesture--n-points" title="The “n-points” property">n-points</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">GdkWindow</span> *</td>
<td class="property_name"><a class="link" href="GtkGesture.html#GtkGesture--window" title="The “window” property">window</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGesture.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGesture.html#GtkGesture-begin" title="The “begin” signal">begin</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGesture.html#GtkGesture-cancel" title="The “cancel” signal">cancel</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGesture.html#GtkGesture-end" title="The “end” signal">end</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGesture.html#GtkGesture-sequence-state-changed" title="The “sequence-state-changed” signal">sequence-state-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkGesture.html#GtkGesture-update" title="The “update” signal">update</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGesture.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkGesture.html#GtkGesture-struct" title="GtkGesture">GtkGesture</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState">GtkEventSequenceState</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkGesture.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> <a class="link" href="GtkEventController.html" title="GtkEventController">GtkEventController</a>
<span class="lineart">╰──</span> GtkGesture
<span class="lineart">├──</span> <a class="link" href="GtkGestureSingle.html" title="GtkGestureSingle">GtkGestureSingle</a>
<span class="lineart">├──</span> <a class="link" href="GtkGestureRotate.html" title="GtkGestureRotate">GtkGestureRotate</a>
<span class="lineart">╰──</span> <a class="link" href="GtkGestureZoom.html" title="GtkGestureZoom">GtkGestureZoom</a>
</pre>
</div>
<div class="refsect1">
<a name="GtkGesture.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkGesture.description"></a><h2>Description</h2>
<p><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> is the base object for gesture recognition, although this
object is quite generalized to serve as a base for multi-touch gestures,
it is suitable to implement single-touch and pointer-based gestures (using
the special <code class="literal">NULL</code> <span class="type">GdkEventSequence</span> value for these).</p>
<p>The number of touches that a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> need to be recognized is controlled
by the <a class="link" href="GtkGesture.html#GtkGesture--n-points" title="The “n-points” property"><span class="type">“n-points”</span></a> property, if a gesture is keeping track of less
or more than that number of sequences, it won't check wether the gesture
is recognized.</p>
<p>As soon as the gesture has the expected number of touches, the gesture will
run the <span class="type">“check”</span> signal regularly on input events until the gesture
is recognized, the criteria to consider a gesture as "recognized" is left to
<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> subclasses.</p>
<p>A recognized gesture will then emit the following signals:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><a class="link" href="GtkGesture.html#GtkGesture-begin" title="The “begin” signal"><span class="type">“begin”</span></a> when the gesture is recognized.</p></li>
<li class="listitem"><p>A number of <a class="link" href="GtkGesture.html#GtkGesture-update" title="The “update” signal"><span class="type">“update”</span></a>, whenever an input event is processed.</p></li>
<li class="listitem"><p><a class="link" href="GtkGesture.html#GtkGesture-end" title="The “end” signal"><span class="type">“end”</span></a> when the gesture is no longer recognized.</p></li>
</ul></div>
<div class="refsect3">
<a name="id-1.3.24.6.9.7"></a><h4>Event propagation</h4>
<p>In order to receive events, a gesture needs to either set a propagation phase
through <a class="link" href="GtkEventController.html#gtk-event-controller-set-propagation-phase" title="gtk_event_controller_set_propagation_phase ()"><code class="function">gtk_event_controller_set_propagation_phase()</code></a>, or feed those manually
through <a class="link" href="GtkEventController.html#gtk-event-controller-handle-event" title="gtk_event_controller_handle_event ()"><code class="function">gtk_event_controller_handle_event()</code></a>.</p>
<p>In the capture phase, events are propagated from the toplevel down to the
target widget, and gestures that are attached to containers above the widget
get a chance to interact with the event before it reaches the target.</p>
<p>After the capture phase, GTK+ emits the traditional <a class="link" href="GtkWidget.html#GtkWidget-button-press-event" title="The “button-press-event” signal"><span class="type">“button-press-event”</span></a>,
<a class="link" href="GtkWidget.html#GtkWidget-button-release-event" title="The “button-release-event” signal"><span class="type">“button-release-event”</span></a>, <a class="link" href="GtkWidget.html#GtkWidget-touch-event" title="The “touch-event” signal"><span class="type">“touch-event”</span></a>, etc signals. Gestures
with the <a class="link" href="GtkEventController.html#GTK-PHASE-TARGET:CAPS"><code class="literal">GTK_PHASE_TARGET</code></a> phase are fed events from the default <a class="link" href="GtkWidget.html#GtkWidget-event" title="The “event” signal"><span class="type">“event”</span></a>
handlers.</p>
<p>In the bubble phase, events are propagated up from the target widget to the
toplevel, and gestures that are attached to containers above the widget get
a chance to interact with events that have not been handled yet.</p>
</div>
<div class="refsect3">
<a name="touch-sequence-states"></a><h4>States of a sequence</h4>
<p>Whenever input interaction happens, a single event may trigger a cascade of
<span class="type">GtkGestures</span>, both across the parents of the widget receiving the event and
in parallel within an individual widget. It is a responsibility of the
widgets using those gestures to set the state of touch sequences accordingly
in order to enable cooperation of gestures around the <span class="type">GdkEventSequences</span>
triggering those.</p>
<p>Within a widget, gestures can be grouped through <a class="link" href="GtkGesture.html#gtk-gesture-group" title="gtk_gesture_group ()"><code class="function">gtk_gesture_group()</code></a>,
grouped gestures synchronize the state of sequences, so calling
<a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a> on one will effectively propagate
the state throughout the group.</p>
<p>By default, all sequences start out in the <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-NONE:CAPS"><span class="type">GTK_EVENT_SEQUENCE_NONE</span></a> state,
sequences in this state trigger the gesture event handler, but event
propagation will continue unstopped by gestures.</p>
<p>If a sequence enters into the <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-DENIED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_DENIED</span></a> state, the gesture
group will effectively ignore the sequence, letting events go unstopped
through the gesture, but the "slot" will still remain occupied while
the touch is active.</p>
<p>If a sequence enters in the <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_CLAIMED</span></a> state, the gesture
group will grab all interaction on the sequence, by:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Setting the same sequence to <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-DENIED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_DENIED</span></a> on every other gesture
group within the widget, and every gesture on parent widgets in the propagation
chain.</p></li>
<li class="listitem"><p>calling <a class="link" href="GtkGesture.html#GtkGesture-cancel" title="The “cancel” signal"><span class="type">“cancel”</span></a> on every gesture in widgets underneath in the
propagation chain.</p></li>
<li class="listitem"><p>Stopping event propagation after the gesture group handles the event.</p></li>
</ul></div>
<p>Note: if a sequence is set early to <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_CLAIMED</span></a> on
<span class="type">GDK_TOUCH_BEGIN</span>/<span class="type">GDK_BUTTON_PRESS</span> (so those events are captured before
reaching the event widget, this implies <a class="link" href="GtkEventController.html#GTK-PHASE-CAPTURE:CAPS"><span class="type">GTK_PHASE_CAPTURE</span></a>), one similar
event will emulated if the sequence changes to <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-DENIED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_DENIED</span></a>.
This way event coherence is preserved before event propagation is unstopped
again.</p>
<p>Sequence states can't be changed freely, see <a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a>
to know about the possible lifetimes of a <span class="type">GdkEventSequence</span>.</p>
</div>
<div class="refsect3">
<a name="id-1.3.24.6.9.9"></a><h4>Touchpad gestures</h4>
<p>On the platforms that support it, <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> will handle transparently
touchpad gesture events. The only precautions users of <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> should do
to enable this support are:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Enabling <code class="literal">GDK_TOUCHPAD_GESTURE_MASK</code> on their <span class="type">GdkWindows</span></p></li>
<li class="listitem"><p>If the gesture has <a class="link" href="GtkEventController.html#GTK-PHASE-NONE:CAPS"><code class="literal">GTK_PHASE_NONE</code></a>, ensuring events of type
<code class="literal">GDK_TOUCHPAD_SWIPE</code> and <code class="literal">GDK_TOUCHPAD_PINCH</code> are handled by the <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></li>
</ul></div>
</div>
</div>
<div class="refsect1">
<a name="GtkGesture.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-gesture-get-device"></a><h3>gtk_gesture_get_device ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkDevice</span> *
gtk_gesture_get_device (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns the master <span class="type">GdkDevice</span> that is currently operating
on <em class="parameter"><code>gesture</code></em>
, or <code class="literal">NULL</code> if the gesture is not being interacted.</p>
<div class="refsect3">
<a name="gtk-gesture-get-device.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-device.returns"></a><h4>Returns</h4>
<p>a <span class="type">GdkDevice</span>, or <code class="literal">NULL</code>. </p>
<p><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-window"></a><h3>gtk_gesture_get_window ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkWindow</span> *
gtk_gesture_get_window (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns the user-defined window that receives the events
handled by <em class="parameter"><code>gesture</code></em>
. See <a class="link" href="GtkGesture.html#gtk-gesture-set-window" title="gtk_gesture_set_window ()"><code class="function">gtk_gesture_set_window()</code></a> for more
information.</p>
<div class="refsect3">
<a name="gtk-gesture-get-window.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-window.returns"></a><h4>Returns</h4>
<p>the user defined window, or <code class="literal">NULL</code> if none. </p>
<p><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-set-window"></a><h3>gtk_gesture_set_window ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gesture_set_window (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkWindow</span> *window</code></em>);</pre>
<p>Sets a specific window to receive events about, so <em class="parameter"><code>gesture</code></em>
will effectively handle only events targeting <em class="parameter"><code>window</code></em>
, or
a child of it. <em class="parameter"><code>window</code></em>
must pertain to <a class="link" href="GtkEventController.html#gtk-event-controller-get-widget" title="gtk_event_controller_get_widget ()"><code class="function">gtk_event_controller_get_widget()</code></a>.</p>
<div class="refsect3">
<a name="gtk-gesture-set-window.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>a <span class="type">GdkWindow</span>, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-is-active"></a><h3>gtk_gesture_is_active ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_is_active (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns <code class="literal">TRUE</code> if the gesture is currently active.
A gesture is active meanwhile there are touch sequences
interacting with it.</p>
<div class="refsect3">
<a name="gtk-gesture-is-active.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-is-active.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if gesture is active</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-is-recognized"></a><h3>gtk_gesture_is_recognized ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_is_recognized (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns <code class="literal">TRUE</code> if the gesture is currently recognized.
A gesture is recognized if there are as many interacting
touch sequences as required by <em class="parameter"><code>gesture</code></em>
, and <span class="type">“check”</span>
returned <code class="literal">TRUE</code> for the sequences being currently interpreted.</p>
<div class="refsect3">
<a name="gtk-gesture-is-recognized.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-is-recognized.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if gesture is recognized</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-sequence-state"></a><h3>gtk_gesture_get_sequence_state ()</h3>
<pre class="programlisting"><a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState"><span class="returnvalue">GtkEventSequenceState</span></a>
gtk_gesture_get_sequence_state (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkEventSequence</span> *sequence</code></em>);</pre>
<p>Returns the <em class="parameter"><code>sequence</code></em>
state, as seen by <em class="parameter"><code>gesture</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gesture-get-sequence-state.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventSequence</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-sequence-state.returns"></a><h4>Returns</h4>
<p> The sequence state in <em class="parameter"><code>gesture</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-set-sequence-state"></a><h3>gtk_gesture_set_sequence_state ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_set_sequence_state (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkEventSequence</span> *sequence</code></em>,
<em class="parameter"><code><a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState"><span class="type">GtkEventSequenceState</span></a> state</code></em>);</pre>
<p>Sets the state of <em class="parameter"><code>sequence</code></em>
in <em class="parameter"><code>gesture</code></em>
. Sequences start
in state <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-NONE:CAPS"><span class="type">GTK_EVENT_SEQUENCE_NONE</span></a>, and whenever they change
state, they can never go back to that state. Likewise,
sequences in state <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-DENIED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_DENIED</span></a> cannot turn
back to a not denied state. With these rules, the lifetime
of an event sequence is constrained to the next four:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>None</p></li>
<li class="listitem"><p>None → Denied</p></li>
<li class="listitem"><p>None → Claimed</p></li>
<li class="listitem"><p>None → Claimed → Denied</p></li>
</ul></div>
<p>Note: Due to event handling ordering, it may be unsafe to
set the state on another gesture within a <a class="link" href="GtkGesture.html#GtkGesture-begin" title="The “begin” signal"><span class="type">“begin”</span></a>
signal handler, as the callback might be executed before
the other gesture knows about the sequence. A safe way to
perform this could be:</p>
<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
13
14
15
16
17</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"></span>
<span class="nf">first_gesture_begin_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkGesture</span><span class="w"> </span><span class="o">*</span><span class="n">first_gesture</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">GdkEventSequence</span><span class="w"> </span><span class="o">*</span><span class="n">sequence</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">gtk_gesture_set_sequence_state</span><span class="w"> </span><span class="p">(</span><span class="n">first_gesture</span><span class="p">,</span><span class="w"> </span><span class="n">sequence</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_EVENT_SEQUENCE_CLAIMED</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="n">gtk_gesture_set_sequence_state</span><span class="w"> </span><span class="p">(</span><span class="n">second_gesture</span><span class="p">,</span><span class="w"> </span><span class="n">sequence</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_EVENT_SEQUENCE_DENIED</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"></span>
<span class="nf">second_gesture_begin_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkGesture</span><span class="w"> </span><span class="o">*</span><span class="n">second_gesture</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">GdkEventSequence</span><span class="w"> </span><span class="o">*</span><span class="n">sequence</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_gesture_get_sequence_state</span><span class="w"> </span><span class="p">(</span><span class="n">first_gesture</span><span class="p">,</span><span class="w"> </span><span class="n">sequence</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_EVENT_SEQUENCE_CLAIMED</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">gtk_gesture_set_sequence_state</span><span class="w"> </span><span class="p">(</span><span class="n">second_gesture</span><span class="p">,</span><span class="w"> </span><span class="n">sequence</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_EVENT_SEQUENCE_DENIED</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>If both gestures are in the same group, just set the state on
the gesture emitting the event, the sequence will be already
be initialized to the group's global state when the second
gesture processes the event.</p>
<div class="refsect3">
<a name="gtk-gesture-set-sequence-state.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventSequence</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>the sequence state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-set-sequence-state.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>sequence</code></em>
is handled by <em class="parameter"><code>gesture</code></em>
,
and the state is changed successfully</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-set-state"></a><h3>gtk_gesture_set_state ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_set_state (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState"><span class="type">GtkEventSequenceState</span></a> state</code></em>);</pre>
<p>Sets the state of all sequences that <em class="parameter"><code>gesture</code></em>
is currently
interacting with. See <a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a>
for more details on sequence states.</p>
<div class="refsect3">
<a name="gtk-gesture-set-state.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>the sequence state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-set-state.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the state of at least one sequence
was changed successfully</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-sequences"></a><h3>gtk_gesture_get_sequences ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gtk_gesture_get_sequences (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns the list of <span class="type">GdkEventSequences</span> currently being interpreted
by <em class="parameter"><code>gesture</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gesture-get-sequences.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-sequences.returns"></a><h4>Returns</h4>
<p>A list
of <span class="type">GdkEventSequences</span>, the list elements are owned by GTK+
and must not be freed or modified, the list itself must be deleted
through <code class="function">g_list_free()</code>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkEventSequence]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-handles-sequence"></a><h3>gtk_gesture_handles_sequence ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_handles_sequence (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkEventSequence</span> *sequence</code></em>);</pre>
<p>Returns <code class="literal">TRUE</code> if <em class="parameter"><code>gesture</code></em>
is currently handling events corresponding to
<em class="parameter"><code>sequence</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gesture-handles-sequence.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventSequence</span> or <code class="literal">NULL</code>. </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>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-handles-sequence.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>gesture</code></em>
is handling <em class="parameter"><code>sequence</code></em>
, <code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-last-updated-sequence"></a><h3>gtk_gesture_get_last_updated_sequence ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkEventSequence</span> *
gtk_gesture_get_last_updated_sequence (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns the <span class="type">GdkEventSequence</span> that was last updated on <em class="parameter"><code>gesture</code></em>
.</p>
<div class="refsect3">
<a name="gtk-gesture-get-last-updated-sequence.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-last-updated-sequence.returns"></a><h4>Returns</h4>
<p>The last updated sequence. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<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></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-last-event"></a><h3>gtk_gesture_get_last_event ()</h3>
<pre class="programlisting">const <span class="returnvalue">GdkEvent</span> *
gtk_gesture_get_last_event (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkEventSequence</span> *sequence</code></em>);</pre>
<p>Returns the last event that was processed for <em class="parameter"><code>sequence</code></em>
.</p>
<p>Note that the returned pointer is only valid as long as the <em class="parameter"><code>sequence</code></em>
is still interpreted by the <em class="parameter"><code>gesture</code></em>
. If in doubt, you should make
a copy of the event.</p>
<div class="refsect3">
<a name="gtk-gesture-get-last-event.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventSequence</span>. </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>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-last-event.returns"></a><h4>Returns</h4>
<p>The last event from <em class="parameter"><code>sequence</code></em>
. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<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></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-point"></a><h3>gtk_gesture_get_point ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_get_point (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkEventSequence</span> *sequence</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *x</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *y</code></em>);</pre>
<p>If <em class="parameter"><code>sequence</code></em>
is currently being interpreted by <em class="parameter"><code>gesture</code></em>
, this
function returns <code class="literal">TRUE</code> and fills in <em class="parameter"><code>x</code></em>
and <em class="parameter"><code>y</code></em>
with the last coordinates
stored for that event sequence. The coordinates are always relative to the
widget allocation.</p>
<div class="refsect3">
<a name="gtk-gesture-get-point.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventSequence</span>, or <code class="literal">NULL</code> for pointer events. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>return location for X axis of the sequence coordinates. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>return location for Y axis of the sequence coordinates. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-point.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>sequence</code></em>
is currently interpreted</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-bounding-box"></a><h3>gtk_gesture_get_bounding_box ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_get_bounding_box (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">GdkRectangle</span> *rect</code></em>);</pre>
<p>If there are touch sequences being currently handled by <em class="parameter"><code>gesture</code></em>
,
this function returns <code class="literal">TRUE</code> and fills in <em class="parameter"><code>rect</code></em>
with the bounding
box containing all active touches. Otherwise, <code class="literal">FALSE</code> will be
returned.</p>
<p>Note: This function will yield unexpected results on touchpad
gestures. Since there is no correlation between physical and
pixel distances, these will look as if constrained in an
infinitely small area, <em class="parameter"><code>rect</code></em>
width and height will thus be 0
regardless of the number of touchpoints.</p>
<div class="refsect3">
<a name="gtk-gesture-get-bounding-box.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rect</p></td>
<td class="parameter_description"><p>bounding box containing all active touches. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-bounding-box.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if there are active touches, <code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-bounding-box-center"></a><h3>gtk_gesture_get_bounding_box_center ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_get_bounding_box_center (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *x</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *y</code></em>);</pre>
<p>If there are touch sequences being currently handled by <em class="parameter"><code>gesture</code></em>
,
this function returns <code class="literal">TRUE</code> and fills in <em class="parameter"><code>x</code></em>
and <em class="parameter"><code>y</code></em>
with the center
of the bounding box containing all active touches. Otherwise, <code class="literal">FALSE</code>
will be returned.</p>
<div class="refsect3">
<a name="gtk-gesture-get-bounding-box-center.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>X coordinate for the bounding box center. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>Y coordinate for the bounding box center. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-bounding-box-center.returns"></a><h4>Returns</h4>
<p> <code class="literal">FALSE</code> if no active touches are present, <code class="literal">TRUE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-group"></a><h3>gtk_gesture_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gesture_group (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *group_gesture</code></em>,
<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Adds <em class="parameter"><code>gesture</code></em>
to the same group than <em class="parameter"><code>group_gesture</code></em>
. Gestures
are by default isolated in their own groups.</p>
<p>When gestures are grouped, the state of <span class="type">GdkEventSequences</span>
is kept in sync for all of those, so calling <a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a>,
on one will transfer the same value to the others.</p>
<p>Groups also perform an "implicit grabbing" of sequences, if a
<span class="type">GdkEventSequence</span> state is set to <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_CLAIMED</span></a> on one group,
every other gesture group attached to the same <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> will switch the
state for that sequence to <a class="link" href="GtkGesture.html#GTK-EVENT-SEQUENCE-DENIED:CAPS"><span class="type">GTK_EVENT_SEQUENCE_DENIED</span></a>.</p>
<div class="refsect3">
<a name="gtk-gesture-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group_gesture</p></td>
<td class="parameter_description"><p><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> to group <em class="parameter"><code>gesture</code></em>
with</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-ungroup"></a><h3>gtk_gesture_ungroup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_gesture_ungroup (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Separates <em class="parameter"><code>gesture</code></em>
into an isolated group.</p>
<div class="refsect3">
<a name="gtk-gesture-ungroup.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-get-group"></a><h3>gtk_gesture_get_group ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gtk_gesture_get_group (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>);</pre>
<p>Returns all gestures in the group of <em class="parameter"><code>gesture</code></em>
</p>
<div class="refsect3">
<a name="gtk-gesture-get-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-get-group.returns"></a><h4>Returns</h4>
<p>The list
of <span class="type">GtkGestures</span>, free with <code class="function">g_list_free()</code>. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkGesture][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-gesture-is-grouped-with"></a><h3>gtk_gesture_is_grouped_with ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_gesture_is_grouped_with (<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture</code></em>,
<em class="parameter"><code><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *other</code></em>);</pre>
<p>Returns <code class="literal">TRUE</code> if both gestures pertain to the same group.</p>
<div class="refsect3">
<a name="gtk-gesture-is-grouped-with.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>other</p></td>
<td class="parameter_description"><p>another <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-gesture-is-grouped-with.returns"></a><h4>Returns</h4>
<p> whether the gestures are grouped</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGesture.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkGesture-struct"></a><h3>GtkGesture</h3>
<pre class="programlisting">typedef struct _GtkGesture GtkGesture;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkEventSequenceState"></a><h3>enum GtkEventSequenceState</h3>
<p>Describes the state of a <span class="type">GdkEventSequence</span> in a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a>.</p>
<div class="refsect3">
<a name="GtkEventSequenceState.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-EVENT-SEQUENCE-NONE:CAPS"></a>GTK_EVENT_SEQUENCE_NONE</p></td>
<td class="enum_member_description">
<p>The sequence is handled, but not grabbed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-EVENT-SEQUENCE-CLAIMED:CAPS"></a>GTK_EVENT_SEQUENCE_CLAIMED</p></td>
<td class="enum_member_description">
<p>The sequence is handled and grabbed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-EVENT-SEQUENCE-DENIED:CAPS"></a>GTK_EVENT_SEQUENCE_DENIED</p></td>
<td class="enum_member_description">
<p>The sequence is denied.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGesture.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkGesture--n-points"></a><h3>The <code class="literal">“n-points”</code> property</h3>
<pre class="programlisting"> “n-points” <span class="type">guint</span></pre>
<p>The number of touch points that trigger recognition on this gesture,</p>
<p>Owner: GtkGesture</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Allowed values: &gt;= 1</p>
<p>Default value: 1</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGesture--window"></a><h3>The <code class="literal">“window”</code> property</h3>
<pre class="programlisting"> “window” <span class="type">GdkWindow</span> *</pre>
<p>If non-<code class="literal">NULL</code>, the gesture will only listen for events that happen on
this <span class="type">GdkWindow</span>, or a child of it.</p>
<p>Owner: GtkGesture</p>
<p>Flags: Read / Write</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGesture.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkGesture-begin"></a><h3>The <code class="literal">“begin”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture,
<span class="type">GdkEventSequence</span> *sequence,
<span class="type">gpointer</span> user_data)</pre>
<p>This signal is emitted when the gesture is recognized. This means the
number of touch sequences matches <a class="link" href="GtkGesture.html#GtkGesture--n-points" title="The “n-points” property"><span class="type">“n-points”</span></a>, and the <span class="type">“check”</span>
handler(s) returned <span class="type">TRUE</span>.</p>
<p>Note: These conditions may also happen when an extra touch (eg. a third touch
on a 2-touches gesture) is lifted, in that situation <em class="parameter"><code>sequence</code></em>
won't pertain
to the current set of active touches, so don't rely on this being true.</p>
<div class="refsect3">
<a name="GtkGesture-begin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>the <span class="type">GdkEventSequence</span> that made the gesture to be recognized. </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>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGesture-cancel"></a><h3>The <code class="literal">“cancel”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture,
<span class="type">GdkEventSequence</span> *sequence,
<span class="type">gpointer</span> user_data)</pre>
<p>This signal is emitted whenever a sequence is cancelled. This usually
happens on active touches when <a class="link" href="GtkEventController.html#gtk-event-controller-reset" title="gtk_event_controller_reset ()"><code class="function">gtk_event_controller_reset()</code></a> is called
on <em class="parameter"><code>gesture</code></em>
(manually, due to grabs...), or the individual <em class="parameter"><code>sequence</code></em>
was claimed by parent widgets' controllers (see <a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a>).</p>
<p><em class="parameter"><code>gesture</code></em>
must forget everything about <em class="parameter"><code>sequence</code></em>
as a reaction to this signal.</p>
<div class="refsect3">
<a name="GtkGesture-cancel.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>the <span class="type">GdkEventSequence</span> that was cancelled. </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>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGesture-end"></a><h3>The <code class="literal">“end”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture,
<span class="type">GdkEventSequence</span> *sequence,
<span class="type">gpointer</span> user_data)</pre>
<p>This signal is emitted when <em class="parameter"><code>gesture</code></em>
either stopped recognizing the event
sequences as something to be handled (the <span class="type">“check”</span> handler returned
<code class="literal">FALSE</code>), or the number of touch sequences became higher or lower than
<a class="link" href="GtkGesture.html#GtkGesture--n-points" title="The “n-points” property"><span class="type">“n-points”</span></a>.</p>
<p>Note: <em class="parameter"><code>sequence</code></em>
might not pertain to the group of sequences that were
previously triggering recognition on <em class="parameter"><code>gesture</code></em>
(ie. a just pressed touch
sequence that exceeds <a class="link" href="GtkGesture.html#GtkGesture--n-points" title="The “n-points” property"><span class="type">“n-points”</span></a>). This situation may be detected
by checking through <a class="link" href="GtkGesture.html#gtk-gesture-handles-sequence" title="gtk_gesture_handles_sequence ()"><code class="function">gtk_gesture_handles_sequence()</code></a>.</p>
<div class="refsect3">
<a name="GtkGesture-end.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>the <span class="type">GdkEventSequence</span> that made gesture recognition to finish. </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>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGesture-sequence-state-changed"></a><h3>The <code class="literal">“sequence-state-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture,
<span class="type">GdkEventSequence</span> *sequence,
<a class="link" href="GtkGesture.html#GtkEventSequenceState" title="enum GtkEventSequenceState"><span class="type">GtkEventSequenceState</span></a> state,
<span class="type">gpointer</span> user_data)</pre>
<p>This signal is emitted whenever a sequence state changes. See
<a class="link" href="GtkGesture.html#gtk-gesture-set-sequence-state" title="gtk_gesture_set_sequence_state ()"><code class="function">gtk_gesture_set_sequence_state()</code></a> to know more about the expectable
sequence lifetimes.</p>
<div class="refsect3">
<a name="GtkGesture-sequence-state-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>the <span class="type">GdkEventSequence</span> that was cancelled. </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>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>the new sequence state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkGesture-update"></a><h3>The <code class="literal">“update”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> *gesture,
<span class="type">GdkEventSequence</span> *sequence,
<span class="type">gpointer</span> user_data)</pre>
<p>This signal is emitted whenever an event is handled while the gesture is
recognized. <em class="parameter"><code>sequence</code></em>
is guaranteed to pertain to the set of active touches.</p>
<div class="refsect3">
<a name="GtkGesture-update.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gesture</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sequence</p></td>
<td class="parameter_description"><p>the <span class="type">GdkEventSequence</span> that was updated. </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>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkGesture.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkEventController.html" title="GtkEventController"><span class="type">GtkEventController</span></a>, <a class="link" href="GtkGestureSingle.html" title="GtkGestureSingle"><span class="type">GtkGestureSingle</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>