<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkGesture">
<refmeta>
<refentrytitle role="top_of_page" id="GtkGesture.top_of_page">GtkGesture</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkGesture</refname>
<refpurpose>Base class for gestures</refpurpose>
</refnamediv>

<refsect1 id="GtkGesture.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-get-device">gtk_gesture_get_device</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-is-active">gtk_gesture_is_active</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-is-recognized">gtk_gesture_is_recognized</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkEventSequenceState"><returnvalue>GtkEventSequenceState</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-get-sequence-state">gtk_gesture_get_sequence_state</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-set-sequence-state">gtk_gesture_set_sequence_state</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-set-state">gtk_gesture_set_state</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-get-sequences">gtk_gesture_get_sequences</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-handles-sequence">gtk_gesture_handles_sequence</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkEventSequence"><returnvalue>GdkEventSequence</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-get-last-updated-sequence">gtk_gesture_get_last_updated_sequence</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkEvent"><returnvalue>GdkEvent</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-get-last-event">gtk_gesture_get_last_event</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-get-point">gtk_gesture_get_point</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-get-bounding-box">gtk_gesture_get_bounding_box</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-get-bounding-box-center">gtk_gesture_get_bounding_box_center</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-group">gtk_gesture_group</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-ungroup">gtk_gesture_ungroup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-get-group">gtk_gesture_get_group</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-is-grouped-with">gtk_gesture_is_grouped_with</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesture.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GtkGesture--n-points">n-points</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesture.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkGesture-begin">begin</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkGesture-cancel">cancel</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkGesture-end">end</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkGesture-sequence-state-changed">sequence-state-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkGesture-update">update</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesture.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkGesture-struct">GtkGesture</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkEventSequenceState">GtkEventSequenceState</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesture.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkEventController">GtkEventController</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkGesture
            <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkGestureSingle">GtkGestureSingle</link>
            <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkGestureRotate">GtkGestureRotate</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkGestureZoom">GtkGestureZoom</link>
</screen>
</refsect1>

<refsect1 id="GtkGesture.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkGesture.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkGesture"><type>GtkGesture</type></link> 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 <link linkend="NULL:CAPS"><literal>NULL</literal></link> <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> value for these).</para>
<para>The number of touches that a <link linkend="GtkGesture"><type>GtkGesture</type></link> need to be recognized is controlled
by the <link linkend="GtkGesture--n-points"><type>“n-points”</type></link> 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.</para>
<para>As soon as the gesture has the expected number of touches, the gesture will
run the <link linkend="GtkGesture-check"><type>“check”</type></link> signal regularly on input events until the gesture
is recognized, the criteria to consider a gesture as "recognized" is left to
<link linkend="GtkGesture"><type>GtkGesture</type></link> subclasses.</para>
<para>A recognized gesture will then emit the following signals:</para>
<itemizedlist>
<listitem><para><link linkend="GtkGesture-begin"><type>“begin”</type></link> when the gesture is recognized.</para></listitem>
<listitem><para>A number of <link linkend="GtkGesture-update"><type>“update”</type></link>, whenever an input event is processed.</para></listitem>
<listitem>
<para><link linkend="GtkGesture-end"><type>“end”</type></link> when the gesture is no longer recognized.</para>
</listitem>
</itemizedlist>
<refsect3><title>Event propagation</title><para>In order to receive events, a gesture needs to either set a propagation phase
through <link linkend="gtk-event-controller-set-propagation-phase"><function>gtk_event_controller_set_propagation_phase()</function></link>, or feed those manually
through <link linkend="gtk-event-controller-handle-event"><function>gtk_event_controller_handle_event()</function></link>.</para>
<para>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.</para>
<para>After the capture phase, GTK+ emits the traditional <link linkend="GtkWidget-event"><type>“event”</type></link> signal.
Gestures with the <link linkend="GTK-PHASE-TARGET:CAPS"><literal>GTK_PHASE_TARGET</literal></link> phase are fed events from the default
<link linkend="GtkWidget-event"><type>“event”</type></link> handlers.</para>
<para>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.</para>
</refsect3>
<refsect3 id="touch-sequence-states"><title>States of a sequence</title><para>Whenever input interaction happens, a single event may trigger a cascade of
<link linkend="GtkGestures"><type>GtkGestures</type></link>, 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 <link linkend="GdkEventSequences"><type>GdkEventSequences</type></link>
triggering those.</para>
<para>Within a widget, gestures can be grouped through <link linkend="gtk-gesture-group"><function>gtk_gesture_group()</function></link>,
grouped gestures synchronize the state of sequences, so calling
<link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link> on one will effectively propagate
the state throughout the group.</para>
<para>By default, all sequences start out in the <link linkend="GTK-EVENT-SEQUENCE-NONE:CAPS"><type>GTK_EVENT_SEQUENCE_NONE</type></link> state,
sequences in this state trigger the gesture event handler, but event
propagation will continue unstopped by gestures.</para>
<para>If a sequence enters into the <link linkend="GTK-EVENT-SEQUENCE-DENIED:CAPS"><type>GTK_EVENT_SEQUENCE_DENIED</type></link> 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.</para>
<para>If a sequence enters in the <link linkend="GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><type>GTK_EVENT_SEQUENCE_CLAIMED</type></link> state, the gesture
group will grab all interaction on the sequence, by:</para>
<itemizedlist>
<listitem><para>Setting the same sequence to <link linkend="GTK-EVENT-SEQUENCE-DENIED:CAPS"><type>GTK_EVENT_SEQUENCE_DENIED</type></link> on every other gesture
group within the widget, and every gesture on parent widgets in the propagation
chain.</para></listitem>
<listitem><para>calling <link linkend="GtkGesture-cancel"><type>“cancel”</type></link> on every gesture in widgets underneath in the
propagation chain.</para></listitem>
<listitem>
<para>Stopping event propagation after the gesture group handles the event.</para>
</listitem>
</itemizedlist>
<para>Note: if a sequence is set early to <link linkend="GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><type>GTK_EVENT_SEQUENCE_CLAIMED</type></link> on
<link linkend="GDK-TOUCH-BEGIN:CAPS"><type>GDK_TOUCH_BEGIN</type></link>/<link linkend="GDK-BUTTON-PRESS:CAPS"><type>GDK_BUTTON_PRESS</type></link> (so those events are captured before
reaching the event widget, this implies <link linkend="GTK-PHASE-CAPTURE:CAPS"><type>GTK_PHASE_CAPTURE</type></link>), one similar
event will emulated if the sequence changes to <link linkend="GTK-EVENT-SEQUENCE-DENIED:CAPS"><type>GTK_EVENT_SEQUENCE_DENIED</type></link>.
This way event coherence is preserved before event propagation is unstopped
again.</para>
<para>Sequence states can't be changed freely, see <link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link>
to know about the possible lifetimes of a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link>.</para>
</refsect3>
<refsect3><title>Touchpad gestures</title><para>On the platforms that support it, <link linkend="GtkGesture"><type>GtkGesture</type></link> will handle transparently
touchpad gesture events. The only precautions users of <link linkend="GtkGesture"><type>GtkGesture</type></link> should do
to enable this support are:</para>
<itemizedlist>
<listitem><para>Enabling <link linkend="GDK-TOUCHPAD-GESTURE-MASK:CAPS"><literal>GDK_TOUCHPAD_GESTURE_MASK</literal></link> on their <link linkend="GdkSurfaces"><type>GdkSurfaces</type></link></para></listitem>
<listitem><para>If the gesture has <link linkend="GTK-PHASE-NONE:CAPS"><literal>GTK_PHASE_NONE</literal></link>, ensuring events of type
<link linkend="GDK-TOUCHPAD-SWIPE:CAPS"><literal>GDK_TOUCHPAD_SWIPE</literal></link> and <link linkend="GDK-TOUCHPAD-PINCH:CAPS"><literal>GDK_TOUCHPAD_PINCH</literal></link> are handled by the <link linkend="GtkGesture"><type>GtkGesture</type></link></para></listitem>
</itemizedlist>
</refsect3>

</refsect1>
<refsect1 id="GtkGesture.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-gesture-get-device" role="function">
<title>gtk_gesture_get_device&#160;()</title>
<indexterm zone="gtk-gesture-get-device"><primary>gtk_gesture_get_device</primary></indexterm>
<programlisting language="C"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
gtk_gesture_get_device (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns the master <link linkend="GdkDevice"><type>GdkDevice</type></link> that is currently operating
on <parameter>gesture</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the gesture is not being interacted.</para>
<refsect3 id="gtk-gesture-get-device.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-device.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-is-active" role="function">
<title>gtk_gesture_is_active&#160;()</title>
<indexterm zone="gtk-gesture-is-active"><primary>gtk_gesture_is_active</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_is_active (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the gesture is currently active.
A gesture is active meanwhile there are touch sequences
interacting with it.</para>
<refsect3 id="gtk-gesture-is-active.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-is-active.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if gesture is active</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-is-recognized" role="function">
<title>gtk_gesture_is_recognized&#160;()</title>
<indexterm zone="gtk-gesture-is-recognized"><primary>gtk_gesture_is_recognized</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_is_recognized (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the gesture is currently recognized.
A gesture is recognized if there are as many interacting
touch sequences as required by <parameter>gesture</parameter>
, and <link linkend="GtkGesture-check"><type>“check”</type></link>
returned <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for the sequences being currently interpreted.</para>
<refsect3 id="gtk-gesture-is-recognized.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-is-recognized.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if gesture is recognized</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-sequence-state" role="function">
<title>gtk_gesture_get_sequence_state&#160;()</title>
<indexterm zone="gtk-gesture-get-sequence-state"><primary>gtk_gesture_get_sequence_state</primary></indexterm>
<programlisting language="C"><link linkend="GtkEventSequenceState"><returnvalue>GtkEventSequenceState</returnvalue></link>
gtk_gesture_get_sequence_state (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                                <parameter><link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence</parameter>);</programlisting>
<para>Returns the <parameter>sequence</parameter>
 state, as seen by <parameter>gesture</parameter>
.</para>
<refsect3 id="gtk-gesture-get-sequence-state.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-sequence-state.returns" role="returns">
<title>Returns</title>
<para> The sequence state in <parameter>gesture</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-set-sequence-state" role="function">
<title>gtk_gesture_set_sequence_state&#160;()</title>
<indexterm zone="gtk-gesture-set-sequence-state"><primary>gtk_gesture_set_sequence_state</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_set_sequence_state (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                                <parameter><link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence</parameter>,
                                <parameter><link linkend="GtkEventSequenceState"><type>GtkEventSequenceState</type></link> state</parameter>);</programlisting>
<para>Sets the state of <parameter>sequence</parameter>
 in <parameter>gesture</parameter>
. Sequences start
in state <link linkend="GTK-EVENT-SEQUENCE-NONE:CAPS"><type>GTK_EVENT_SEQUENCE_NONE</type></link>, and whenever they change
state, they can never go back to that state. Likewise,
sequences in state <link linkend="GTK-EVENT-SEQUENCE-DENIED:CAPS"><type>GTK_EVENT_SEQUENCE_DENIED</type></link> cannot turn
back to a not denied state. With these rules, the lifetime
of an event sequence is constrained to the next four:</para>
<itemizedlist>
<listitem><para>None</para></listitem>
<listitem><para>None → Denied</para></listitem>
<listitem><para>None → Claimed</para></listitem>
<listitem>
<para>None → Claimed → Denied</para>
</listitem>
</itemizedlist>
<para>Note: Due to event handling ordering, it may be unsafe to
set the state on another gesture within a <link linkend="GtkGesture-begin"><type>“begin”</type></link>
signal handler, as the callback might be executed before
the other gesture knows about the sequence. A safe way to
perform this could be:</para>
<informalexample><programlisting role="example"><![CDATA[
static void
first_gesture_begin_cb (GtkGesture       *first_gesture,
                        GdkEventSequence *sequence,
                        gpointer          user_data)
{
  gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
  gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
}

static void
second_gesture_begin_cb (GtkGesture       *second_gesture,
                         GdkEventSequence *sequence,
                         gpointer          user_data)
{
  if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
    gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
}
]]></programlisting></informalexample>
<para></para>
<para>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.</para>
<refsect3 id="gtk-gesture-set-sequence-state.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>state</para></entry>
<entry role="parameter_description"><para>the sequence state</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-set-sequence-state.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>sequence</parameter>
is handled by <parameter>gesture</parameter>
,
and the state is changed successfully</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-set-state" role="function">
<title>gtk_gesture_set_state&#160;()</title>
<indexterm zone="gtk-gesture-set-state"><primary>gtk_gesture_set_state</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_set_state (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                       <parameter><link linkend="GtkEventSequenceState"><type>GtkEventSequenceState</type></link> state</parameter>);</programlisting>
<para>Sets the state of all sequences that <parameter>gesture</parameter>
 is currently
interacting with. See <link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link>
for more details on sequence states.</para>
<refsect3 id="gtk-gesture-set-state.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>state</para></entry>
<entry role="parameter_description"><para>the sequence state</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-set-state.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the state of at least one sequence
was changed successfully</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-sequences" role="function">
<title>gtk_gesture_get_sequences&#160;()</title>
<indexterm zone="gtk-gesture-get-sequences"><primary>gtk_gesture_get_sequences</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gtk_gesture_get_sequences (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns the list of <link linkend="GdkEventSequences"><type>GdkEventSequences</type></link> currently being interpreted
by <parameter>gesture</parameter>
.</para>
<refsect3 id="gtk-gesture-get-sequences.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-sequences.returns" role="returns">
<title>Returns</title>
<para>A list
of <link linkend="GdkEventSequences"><type>GdkEventSequences</type></link>, the list elements are owned by GTK+
and must not be freed or modified, the list itself must be deleted
through <link linkend="g-list-free"><function>g_list_free()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer container</acronym>][<acronym>element-type</acronym> GdkEventSequence]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-handles-sequence" role="function">
<title>gtk_gesture_handles_sequence&#160;()</title>
<indexterm zone="gtk-gesture-handles-sequence"><primary>gtk_gesture_handles_sequence</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_handles_sequence (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                              <parameter><link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>gesture</parameter>
 is currently handling events corresponding to
<parameter>sequence</parameter>
.</para>
<refsect3 id="gtk-gesture-handles-sequence.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-handles-sequence.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>gesture</parameter>
is handling <parameter>sequence</parameter>
, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-last-updated-sequence" role="function">
<title>gtk_gesture_get_last_updated_sequence&#160;()</title>
<indexterm zone="gtk-gesture-get-last-updated-sequence"><primary>gtk_gesture_get_last_updated_sequence</primary></indexterm>
<programlisting language="C"><link linkend="GdkEventSequence"><returnvalue>GdkEventSequence</returnvalue></link>&#160;*
gtk_gesture_get_last_updated_sequence (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that was last updated on <parameter>gesture</parameter>
.</para>
<refsect3 id="gtk-gesture-get-last-updated-sequence.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-last-updated-sequence.returns" role="returns">
<title>Returns</title>
<para>The last updated sequence. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-last-event" role="function">
<title>gtk_gesture_get_last_event&#160;()</title>
<indexterm zone="gtk-gesture-get-last-event"><primary>gtk_gesture_get_last_event</primary></indexterm>
<programlisting language="C"><link linkend="GdkEvent"><returnvalue>GdkEvent</returnvalue></link>&#160;*
gtk_gesture_get_last_event (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                            <parameter><link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence</parameter>);</programlisting>
<para>Returns the last event that was processed for <parameter>sequence</parameter>
.</para>
<para>Note that the returned pointer is only valid as long as the <parameter>sequence</parameter>

is still interpreted by the <parameter>gesture</parameter>
. If in doubt, you should make
a copy of the event.</para>
<refsect3 id="gtk-gesture-get-last-event.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-last-event.returns" role="returns">
<title>Returns</title>
<para>The last event from <parameter>sequence</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-point" role="function">
<title>gtk_gesture_get_point&#160;()</title>
<indexterm zone="gtk-gesture-get-point"><primary>gtk_gesture_get_point</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_get_point (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                       <parameter><link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence</parameter>,
                       <parameter><link linkend="gdouble"><type>gdouble</type></link> *x</parameter>,
                       <parameter><link linkend="gdouble"><type>gdouble</type></link> *y</parameter>);</programlisting>
<para>If <parameter>sequence</parameter>
 is currently being interpreted by <parameter>gesture</parameter>
, this
function returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and fills in <parameter>x</parameter>
 and <parameter>y</parameter>
 with the last coordinates
stored for that event sequence. The coordinates are always relative to the
widget allocation.</para>
<refsect3 id="gtk-gesture-get-point.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for pointer events. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>return location for X axis of the sequence coordinates. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>return location for Y axis of the sequence coordinates. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-point.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>sequence</parameter>
is currently interpreted</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-bounding-box" role="function">
<title>gtk_gesture_get_bounding_box&#160;()</title>
<indexterm zone="gtk-gesture-get-bounding-box"><primary>gtk_gesture_get_bounding_box</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_get_bounding_box (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                              <parameter><link linkend="GdkRectangle"><type>GdkRectangle</type></link> *rect</parameter>);</programlisting>
<para>If there are touch sequences being currently handled by <parameter>gesture</parameter>
,
this function returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and fills in <parameter>rect</parameter>
 with the bounding
box containing all active touches. Otherwise, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be
returned.</para>
<para>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, <parameter>rect</parameter>
 width and height will thus be 0
regardless of the number of touchpoints.</para>
<refsect3 id="gtk-gesture-get-bounding-box.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>bounding box containing all active touches. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-bounding-box.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if there are active touches, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-bounding-box-center" role="function">
<title>gtk_gesture_get_bounding_box_center&#160;()</title>
<indexterm zone="gtk-gesture-get-bounding-box-center"><primary>gtk_gesture_get_bounding_box_center</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_get_bounding_box_center (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                                     <parameter><link linkend="gdouble"><type>gdouble</type></link> *x</parameter>,
                                     <parameter><link linkend="gdouble"><type>gdouble</type></link> *y</parameter>);</programlisting>
<para>If there are touch sequences being currently handled by <parameter>gesture</parameter>
,
this function returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and fills in <parameter>x</parameter>
 and <parameter>y</parameter>
 with the center
of the bounding box containing all active touches. Otherwise, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
will be returned.</para>
<refsect3 id="gtk-gesture-get-bounding-box-center.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>X coordinate for the bounding box center. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>Y coordinate for the bounding box center. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-bounding-box-center.returns" role="returns">
<title>Returns</title>
<para> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if no active touches are present, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> otherwise</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-group" role="function">
<title>gtk_gesture_group&#160;()</title>
<indexterm zone="gtk-gesture-group"><primary>gtk_gesture_group</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_gesture_group (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *group_gesture</parameter>,
                   <parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Adds <parameter>gesture</parameter>
 to the same group than <parameter>group_gesture</parameter>
. Gestures
are by default isolated in their own groups.</para>
<para>Both gestures must have been added to the same widget before they
can be grouped. </para>
<para>When gestures are grouped, the state of <link linkend="GdkEventSequences"><type>GdkEventSequences</type></link>
is kept in sync for all of those, so calling <link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link>,
on one will transfer the same value to the others.</para>
<para>Groups also perform an "implicit grabbing" of sequences, if a
<link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> state is set to <link linkend="GTK-EVENT-SEQUENCE-CLAIMED:CAPS"><type>GTK_EVENT_SEQUENCE_CLAIMED</type></link> on one group,
every other gesture group attached to the same <link linkend="GtkWidget"><type>GtkWidget</type></link> will switch the
state for that sequence to <link linkend="GTK-EVENT-SEQUENCE-DENIED:CAPS"><type>GTK_EVENT_SEQUENCE_DENIED</type></link>.</para>
<refsect3 id="gtk-gesture-group.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>group_gesture</para></entry>
<entry role="parameter_description"><para><link linkend="GtkGesture"><type>GtkGesture</type></link> to group <parameter>gesture</parameter>
with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-ungroup" role="function">
<title>gtk_gesture_ungroup&#160;()</title>
<indexterm zone="gtk-gesture-ungroup"><primary>gtk_gesture_ungroup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_gesture_ungroup (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Separates <parameter>gesture</parameter>
 into an isolated group.</para>
<refsect3 id="gtk-gesture-ungroup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-get-group" role="function">
<title>gtk_gesture_get_group&#160;()</title>
<indexterm zone="gtk-gesture-get-group"><primary>gtk_gesture_get_group</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gtk_gesture_get_group (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>);</programlisting>
<para>Returns all gestures in the group of <parameter>gesture</parameter>
</para>
<refsect3 id="gtk-gesture-get-group.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-get-group.returns" role="returns">
<title>Returns</title>
<para>The list
of <link linkend="GtkGestures"><type>GtkGestures</type></link>, free with <link linkend="g-list-free"><function>g_list_free()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> GtkGesture][<acronym>transfer container</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-is-grouped-with" role="function">
<title>gtk_gesture_is_grouped_with&#160;()</title>
<indexterm zone="gtk-gesture-is-grouped-with"><primary>gtk_gesture_is_grouped_with</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_gesture_is_grouped_with (<parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *gesture</parameter>,
                             <parameter><link linkend="GtkGesture"><type>GtkGesture</type></link> *other</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if both gestures pertain to the same group.</para>
<refsect3 id="gtk-gesture-is-grouped-with.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="GtkGesture"><type>GtkGesture</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-is-grouped-with.returns" role="returns">
<title>Returns</title>
<para> whether the gestures are grouped</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkGesture.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkGesture-struct" role="struct">
<title>GtkGesture</title>
<indexterm zone="GtkGesture-struct"><primary>GtkGesture</primary></indexterm>
<programlisting language="C">typedef struct _GtkGesture GtkGesture;</programlisting>
</refsect2>
<refsect2 id="GtkEventSequenceState" role="enum">
<title>enum GtkEventSequenceState</title>
<indexterm zone="GtkEventSequenceState"><primary>GtkEventSequenceState</primary></indexterm>
<para>Describes the state of a <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> in a <link linkend="GtkGesture"><type>GtkGesture</type></link>.</para>
<refsect3 id="GtkEventSequenceState.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EVENT-SEQUENCE-NONE:CAPS">GTK_EVENT_SEQUENCE_NONE</para></entry>
<entry role="enum_member_description"><para>The sequence is handled, but not grabbed.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EVENT-SEQUENCE-CLAIMED:CAPS">GTK_EVENT_SEQUENCE_CLAIMED</para></entry>
<entry role="enum_member_description"><para>The sequence is handled and grabbed.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EVENT-SEQUENCE-DENIED:CAPS">GTK_EVENT_SEQUENCE_DENIED</para></entry>
<entry role="enum_member_description"><para>The sequence is denied.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkGesture.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkGesture--n-points" role="property"><title>The <literal>“n-points”</literal> property</title>
<indexterm zone="GtkGesture--n-points"><primary>GtkGesture:n-points</primary></indexterm>
<programlisting>  “n-points”                 <link linkend="guint"><type>guint</type></link></programlisting>
<para>The number of touch points that trigger recognition on this gesture,</para>
<para>Owner: GtkGesture</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
<para>Allowed values: &gt;= 1</para>
<para>Default value: 1</para>
</refsect2>

</refsect1>
<refsect1 id="GtkGesture.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkGesture-begin" role="signal"><title>The <literal>“begin”</literal> signal</title>
<indexterm zone="GtkGesture-begin"><primary>GtkGesture::begin</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesture"><type>GtkGesture</type></link>       *gesture,
               <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>This signal is emitted when the gesture is recognized. This means the
number of touch sequences matches <link linkend="GtkGesture--n-points"><type>“n-points”</type></link>, and the <link linkend="GtkGesture-check"><type>“check”</type></link>
handler(s) returned <link linkend="TRUE:CAPS"><type>TRUE</type></link>.</para>
<para>Note: These conditions may also happen when an extra touch (eg. a third touch
on a 2-touches gesture) is lifted, in that situation <parameter>sequence</parameter>
 won't pertain
to the current set of active touches, so don't rely on this being true.</para>
<refsect3 id="GtkGesture-begin.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that made the gesture to be recognized</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkGesture-cancel" role="signal"><title>The <literal>“cancel”</literal> signal</title>
<indexterm zone="GtkGesture-cancel"><primary>GtkGesture::cancel</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesture"><type>GtkGesture</type></link>       *gesture,
               <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>This signal is emitted whenever a sequence is cancelled. This usually
happens on active touches when <link linkend="gtk-event-controller-reset"><function>gtk_event_controller_reset()</function></link> is called
on <parameter>gesture</parameter>
 (manually, due to grabs...), or the individual <parameter>sequence</parameter>

was claimed by parent widgets' controllers (see <link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link>).</para>
<para><parameter>gesture</parameter>
 must forget everything about <parameter>sequence</parameter>
 as a reaction to this signal.</para>
<refsect3 id="GtkGesture-cancel.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that was cancelled</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkGesture-end" role="signal"><title>The <literal>“end”</literal> signal</title>
<indexterm zone="GtkGesture-end"><primary>GtkGesture::end</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesture"><type>GtkGesture</type></link>       *gesture,
               <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>This signal is emitted when <parameter>gesture</parameter>
 either stopped recognizing the event
sequences as something to be handled (the <link linkend="GtkGesture-check"><type>“check”</type></link> handler returned
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>), or the number of touch sequences became higher or lower than
<link linkend="GtkGesture--n-points"><type>“n-points”</type></link>.</para>
<para>Note: <parameter>sequence</parameter>
 might not pertain to the group of sequences that were
previously triggering recognition on <parameter>gesture</parameter>
 (ie. a just pressed touch
sequence that exceeds <link linkend="GtkGesture--n-points"><type>“n-points”</type></link>). This situation may be detected
by checking through <link linkend="gtk-gesture-handles-sequence"><function>gtk_gesture_handles_sequence()</function></link>.</para>
<refsect3 id="GtkGesture-end.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that made gesture recognition to finish</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkGesture-sequence-state-changed" role="signal"><title>The <literal>“sequence-state-changed”</literal> signal</title>
<indexterm zone="GtkGesture-sequence-state-changed"><primary>GtkGesture::sequence-state-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesture"><type>GtkGesture</type></link>           *gesture,
               <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link>     *sequence,
               <link linkend="GtkEventSequenceState"><type>GtkEventSequenceState</type></link> state,
               <link linkend="gpointer"><type>gpointer</type></link>              user_data)</programlisting>
<para>This signal is emitted whenever a sequence state changes. See
<link linkend="gtk-gesture-set-sequence-state"><function>gtk_gesture_set_sequence_state()</function></link> to know more about the expectable
sequence lifetimes.</para>
<refsect3 id="GtkGesture-sequence-state-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that was cancelled</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>state</para></entry>
<entry role="parameter_description"><para>the new sequence state</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkGesture-update" role="signal"><title>The <literal>“update”</literal> signal</title>
<indexterm zone="GtkGesture-update"><primary>GtkGesture::update</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesture"><type>GtkGesture</type></link>       *gesture,
               <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> *sequence,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>This signal is emitted whenever an event is handled while the gesture is
recognized. <parameter>sequence</parameter>
 is guaranteed to pertain to the set of active touches.</para>
<refsect3 id="GtkGesture-update.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>gesture</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sequence</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkEventSequence"><type>GdkEventSequence</type></link> that was updated</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkGesture.see-also">
<title>See Also</title>
<para><link linkend="GtkEventController"><type>GtkEventController</type></link>, <link linkend="GtkGestureSingle"><type>GtkGestureSingle</type></link></para>

</refsect1>

</refentry>
