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

<refsect1 id="GtkGestureLongPress.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-long-press-new">gtk_gesture_long_press_new</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-long-press-set-delay-factor">gtk_gesture_long_press_set_delay_factor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="double"><returnvalue>double</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-gesture-long-press-get-delay-factor">gtk_gesture_long_press_get_delay_factor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGestureLongPress.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="gdouble"><type>gdouble</type></link></entry><entry role="property_name"><link linkend="GtkGestureLongPress--delay-factor">delay-factor</link></entry><entry role="property_flags">Read / Write</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGestureLongPress.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="GtkGestureLongPress-struct">GtkGestureLongPress</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkGestureLongPress.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> GtkGestureLongPress
</screen>
</refsect1>

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

<refsect1 id="GtkGestureLongPress.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link> is a <link linkend="GtkGesture"><type>GtkGesture</type></link> implementation able to recognize
long presses, triggering the <link linkend="GtkGestureLongPress-pressed"><type>“pressed”</type></link> after the
timeout is exceeded.</para>
<para>If the touchpoint is lifted before the timeout passes, or if it drifts
too far of the initial press point, the <link linkend="GtkGestureLongPress-cancelled"><type>“cancelled”</type></link>
signal will be emitted.</para>

</refsect1>
<refsect1 id="GtkGestureLongPress.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-gesture-long-press-new" role="function">
<title>gtk_gesture_long_press_new&#160;()</title>
<indexterm zone="gtk-gesture-long-press-new"><primary>gtk_gesture_long_press_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkGesture"><returnvalue>GtkGesture</returnvalue></link>&#160;*
gtk_gesture_long_press_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns a newly created <link linkend="GtkGesture"><type>GtkGesture</type></link> that recognizes long presses.</para>
<refsect3 id="gtk-gesture-long-press-new.returns" role="returns">
<title>Returns</title>
<para> a newly created <link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-long-press-set-delay-factor" role="function">
<title>gtk_gesture_long_press_set_delay_factor&#160;()</title>
<indexterm zone="gtk-gesture-long-press-set-delay-factor"><primary>gtk_gesture_long_press_set_delay_factor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_gesture_long_press_set_delay_factor
                               (<parameter><link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link> *gesture</parameter>,
                                <parameter><link linkend="double"><type>double</type></link> delay_factor</parameter>);</programlisting>
<para>Applies the given delay factor. The default long press time will be
multiplied by this value. Valid values are in the range [0.5..2.0].</para>
<refsect3 id="gtk-gesture-long-press-set-delay-factor.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="GtkGestureLongPress"><type>GtkGestureLongPress</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>delay_factor</para></entry>
<entry role="parameter_description"><para>The delay factor to apply</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-gesture-long-press-get-delay-factor" role="function">
<title>gtk_gesture_long_press_get_delay_factor&#160;()</title>
<indexterm zone="gtk-gesture-long-press-get-delay-factor"><primary>gtk_gesture_long_press_get_delay_factor</primary></indexterm>
<programlisting language="C"><link linkend="double"><returnvalue>double</returnvalue></link>
gtk_gesture_long_press_get_delay_factor
                               (<parameter><link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link> *gesture</parameter>);</programlisting>
<para>Returns the delay factor as set by <link linkend="gtk-gesture-long-press-set-delay-factor"><function>gtk_gesture_long_press_set_delay_factor()</function></link>.</para>
<refsect3 id="gtk-gesture-long-press-get-delay-factor.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="GtkGestureLongPress"><type>GtkGestureLongPress</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-gesture-long-press-get-delay-factor.returns" role="returns">
<title>Returns</title>
<para> the delay factor</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkGestureLongPress.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkGestureLongPress-struct" role="struct">
<title>GtkGestureLongPress</title>
<indexterm zone="GtkGestureLongPress-struct"><primary>GtkGestureLongPress</primary></indexterm>
<programlisting language="C">typedef struct _GtkGestureLongPress GtkGestureLongPress;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkGestureLongPress.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkGestureLongPress--delay-factor" role="property"><title>The <literal>“delay-factor”</literal> property</title>
<indexterm zone="GtkGestureLongPress--delay-factor"><primary>GtkGestureLongPress:delay-factor</primary></indexterm>
<programlisting>  “delay-factor”             <link linkend="gdouble"><type>gdouble</type></link></programlisting>
<para>Factor by which to modify the default timeout.</para><para>Owner: GtkGestureLongPress</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0.5,2]</para>
<para>Default value: 1</para>
</refsect2>

</refsect1>
<refsect1 id="GtkGestureLongPress.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkGestureLongPress-cancelled" role="signal"><title>The <literal>“cancelled”</literal> signal</title>
<indexterm zone="GtkGestureLongPress-cancelled"><primary>GtkGestureLongPress::cancelled</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link> *gesture,
               <link linkend="gpointer"><type>gpointer</type></link>             user_data)</programlisting>
<para>This signal is emitted whenever a press moved too far, or was released
before <link linkend="GtkGestureLongPress-pressed"><type>“pressed”</type></link> happened.</para>
<refsect3 id="GtkGestureLongPress-cancelled.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"><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="GtkGestureLongPress-pressed" role="signal"><title>The <literal>“pressed”</literal> signal</title>
<indexterm zone="GtkGestureLongPress-pressed"><primary>GtkGestureLongPress::pressed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkGestureLongPress"><type>GtkGestureLongPress</type></link> *gesture,
               <link linkend="gdouble"><type>gdouble</type></link>              x,
               <link linkend="gdouble"><type>gdouble</type></link>              y,
               <link linkend="gpointer"><type>gpointer</type></link>             user_data)</programlisting>
<para>This signal is emitted whenever a press goes unmoved/unreleased longer than
what the GTK+ defaults tell.</para>
<refsect3 id="GtkGestureLongPress-pressed.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>x</para></entry>
<entry role="parameter_description"><para>the X coordinate where the press happened, relative to the widget allocation</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the Y coordinate where the press happened, relative to the widget allocation</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>
