<?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="GtkGesturePan">
<refmeta>
<refentrytitle role="top_of_page" id="GtkGesturePan.top_of_page">GtkGesturePan</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkGesturePan</refname>
<refpurpose>Pan gesture</refpurpose>
</refnamediv>

<refsect1 id="GtkGesturePan.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="GtkGesture"><returnvalue>GtkGesture</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-gesture-pan-new">gtk_gesture_pan_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkOrientation"><returnvalue>GtkOrientation</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-pan-get-orientation">gtk_gesture_pan_get_orientation</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-pan-set-orientation">gtk_gesture_pan_set_orientation</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesturePan.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="GtkOrientation"><type>GtkOrientation</type></link></entry><entry role="property_name"><link linkend="GtkGesturePan--orientation">orientation</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesturePan.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="GtkGesturePan-pan">pan</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesturePan.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="GtkGesturePan-struct">GtkGesturePan</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkPanDirection">GtkPanDirection</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGesturePan.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> <link linkend="GtkGesture">GtkGesture</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkGestureSingle">GtkGestureSingle</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkGestureDrag">GtkGestureDrag</link>
                    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkGesturePan
</screen>
</refsect1>

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

<refsect1 id="GtkGesturePan.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkGesturePan"><type>GtkGesturePan</type></link> is a <link linkend="GtkGesture"><type>GtkGesture</type></link> implementation able to recognize
pan gestures, those are drags that are locked to happen along one
axis. The axis that a <link linkend="GtkGesturePan"><type>GtkGesturePan</type></link> handles is defined at
construct time, and can be changed through
<link linkend="gtk-gesture-pan-set-orientation"><function>gtk_gesture_pan_set_orientation()</function></link>.</para>
<para>When the gesture starts to be recognized, <link linkend="GtkGesturePan"><type>GtkGesturePan</type></link> will
attempt to determine as early as possible whether the sequence
is moving in the expected direction, and denying the sequence if
this does not happen.</para>
<para>Once a panning gesture along the expected axis is recognized,
the <link linkend="GtkGesturePan-pan"><type>“pan”</type></link> signal will be emitted as input events
are received, containing the offset in the given axis.</para>

</refsect1>
<refsect1 id="GtkGesturePan.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-gesture-pan-new" role="function">
<title>gtk_gesture_pan_new&#160;()</title>
<indexterm zone="gtk-gesture-pan-new"><primary>gtk_gesture_pan_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkGesture"><returnvalue>GtkGesture</returnvalue></link>&#160;*
gtk_gesture_pan_new (<parameter><link linkend="GtkOrientation"><type>GtkOrientation</type></link> orientation</parameter>);</programlisting>
<para>Returns a newly created <link linkend="GtkGesture"><type>GtkGesture</type></link> that recognizes pan gestures.</para>
<refsect3 id="gtk-gesture-pan-new.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>orientation</para></entry>
<entry role="parameter_description"><para>expected orientation</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-pan-new.returns" role="returns">
<title>Returns</title>
<para> a newly created <link linkend="GtkGesturePan"><type>GtkGesturePan</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-pan-get-orientation" role="function">
<title>gtk_gesture_pan_get_orientation&#160;()</title>
<indexterm zone="gtk-gesture-pan-get-orientation"><primary>gtk_gesture_pan_get_orientation</primary></indexterm>
<programlisting language="C"><link linkend="GtkOrientation"><returnvalue>GtkOrientation</returnvalue></link>
gtk_gesture_pan_get_orientation (<parameter><link linkend="GtkGesturePan"><type>GtkGesturePan</type></link> *gesture</parameter>);</programlisting>
<para>Returns the orientation of the pan gestures that this <parameter>gesture</parameter>
 expects.</para>
<refsect3 id="gtk-gesture-pan-get-orientation.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="GtkGesturePan"><type>GtkGesturePan</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-pan-get-orientation.returns" role="returns">
<title>Returns</title>
<para> the expected orientation for pan gestures</para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-pan-set-orientation" role="function">
<title>gtk_gesture_pan_set_orientation&#160;()</title>
<indexterm zone="gtk-gesture-pan-set-orientation"><primary>gtk_gesture_pan_set_orientation</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_gesture_pan_set_orientation (<parameter><link linkend="GtkGesturePan"><type>GtkGesturePan</type></link> *gesture</parameter>,
                                 <parameter><link linkend="GtkOrientation"><type>GtkOrientation</type></link> orientation</parameter>);</programlisting>
<para>Sets the orientation to be expected on pan gestures.</para>
<refsect3 id="gtk-gesture-pan-set-orientation.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="GtkGesturePan"><type>GtkGesturePan</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>orientation</para></entry>
<entry role="parameter_description"><para>expected orientation</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkGesturePan.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkGesturePan-struct" role="struct">
<title>GtkGesturePan</title>
<indexterm zone="GtkGesturePan-struct"><primary>GtkGesturePan</primary></indexterm>
<programlisting language="C">typedef struct _GtkGesturePan GtkGesturePan;</programlisting>
</refsect2>
<refsect2 id="GtkPanDirection" role="enum">
<title>enum GtkPanDirection</title>
<indexterm zone="GtkPanDirection"><primary>GtkPanDirection</primary></indexterm>
<para>Describes the panning direction of a <link linkend="GtkGesturePan"><type>GtkGesturePan</type></link></para>
<refsect3 id="GtkPanDirection.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-PAN-DIRECTION-LEFT:CAPS">GTK_PAN_DIRECTION_LEFT</para></entry>
<entry role="enum_member_description"><para>panned towards the left</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PAN-DIRECTION-RIGHT:CAPS">GTK_PAN_DIRECTION_RIGHT</para></entry>
<entry role="enum_member_description"><para>panned towards the right</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PAN-DIRECTION-UP:CAPS">GTK_PAN_DIRECTION_UP</para></entry>
<entry role="enum_member_description"><para>panned upwards</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PAN-DIRECTION-DOWN:CAPS">GTK_PAN_DIRECTION_DOWN</para></entry>
<entry role="enum_member_description"><para>panned downwards</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkGesturePan.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkGesturePan--orientation" role="property"><title>The <literal>“orientation”</literal> property</title>
<indexterm zone="GtkGesturePan--orientation"><primary>GtkGesturePan:orientation</primary></indexterm>
<programlisting>  “orientation”              <link linkend="GtkOrientation"><type>GtkOrientation</type></link></programlisting>
<para>The expected orientation of pan gestures.</para>
<para>Owner: GtkGesturePan</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_ORIENTATION_HORIZONTAL</para>
</refsect2>

</refsect1>
<refsect1 id="GtkGesturePan.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkGesturePan-pan" role="signal"><title>The <literal>“pan”</literal> signal</title>
<indexterm zone="GtkGesturePan-pan"><primary>GtkGesturePan::pan</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGesturePan"><type>GtkGesturePan</type></link>  *gesture,
               <link linkend="GtkPanDirection"><type>GtkPanDirection</type></link> direction,
               <link linkend="gdouble"><type>gdouble</type></link>         offset,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>This signal is emitted once a panning gesture along the
expected axis is detected.</para>
<refsect3 id="GtkGesturePan-pan.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>direction</para></entry>
<entry role="parameter_description"><para>current direction of the pan gesture</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>offset</para></entry>
<entry role="parameter_description"><para>Offset along the gesture orientation</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>

</refentry>
