<?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="GtkEventController">
<refmeta>
<refentrytitle role="top_of_page" id="GtkEventController.top_of_page">GtkEventController</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkEventController</refname>
<refpurpose>Self-contained handler of series of events</refpurpose>
</refnamediv>

<refsect1 id="GtkEventController.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="GtkPropagationPhase"><returnvalue>GtkPropagationPhase</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-propagation-phase">gtk_event_controller_get_propagation_phase</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-event-controller-set-propagation-phase">gtk_event_controller_set_propagation_phase</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkPropagationLimit"><returnvalue>GtkPropagationLimit</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-propagation-limit">gtk_event_controller_get_propagation_limit</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-event-controller-set-propagation-limit">gtk_event_controller_set_propagation_limit</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-widget">gtk_event_controller_get_widget</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-event-controller-reset">gtk_event_controller_reset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-name">gtk_event_controller_get_name</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-event-controller-set-name">gtk_event_controller_set_name</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-event-controller-get-current-event">gtk_event_controller_get_current_event</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-current-event-device">gtk_event_controller_get_current_event_device</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkModifierType"><returnvalue>GdkModifierType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-current-event-state">gtk_event_controller_get_current_event_state</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint32"><returnvalue>guint32</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-event-controller-get-current-event-time">gtk_event_controller_get_current_event_time</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEventController.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="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkEventController--name">name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkPropagationLimit"><type>GtkPropagationLimit</type></link></entry><entry role="property_name"><link linkend="GtkEventController--propagation-limit">propagation-limit</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkPropagationPhase"><type>GtkPropagationPhase</type></link></entry><entry role="property_name"><link linkend="GtkEventController--propagation-phase">propagation-phase</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkEventController--widget">widget</link></entry><entry role="property_flags">Read</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEventController.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> GtkEventController
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkGesture">GtkGesture</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkDropTarget">GtkDropTarget</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkDropTargetAsync">GtkDropTargetAsync</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEventControllerKey">GtkEventControllerKey</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEventControllerFocus">GtkEventControllerFocus</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEventControllerLegacy">GtkEventControllerLegacy</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEventControllerMotion">GtkEventControllerMotion</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEventControllerScroll">GtkEventControllerScroll</link>
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkPadController">GtkPadController</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkShortcutController">GtkShortcutController</link>
</screen>
</refsect1>

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

<refsect1 id="GtkEventController.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkEventController"><type>GtkEventController</type></link> is a base, low-level implementation for event
controllers. Those react to a series of <link linkend="GdkEvents"><type>GdkEvents</type></link>, and possibly trigger
actions as a consequence of those.</para>

</refsect1>
<refsect1 id="GtkEventController.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-event-controller-get-propagation-phase" role="function">
<title>gtk_event_controller_get_propagation_phase&#160;()</title>
<indexterm zone="gtk-event-controller-get-propagation-phase"><primary>gtk_event_controller_get_propagation_phase</primary></indexterm>
<programlisting language="C"><link linkend="GtkPropagationPhase"><returnvalue>GtkPropagationPhase</returnvalue></link>
gtk_event_controller_get_propagation_phase
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Gets the propagation phase at which <parameter>controller</parameter>
 handles events.</para>
<refsect3 id="gtk-event-controller-get-propagation-phase.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-propagation-phase.returns" role="returns">
<title>Returns</title>
<para> the propagation phase</para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-set-propagation-phase" role="function">
<title>gtk_event_controller_set_propagation_phase&#160;()</title>
<indexterm zone="gtk-event-controller-set-propagation-phase"><primary>gtk_event_controller_set_propagation_phase</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_event_controller_set_propagation_phase
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>,
                                <parameter><link linkend="GtkPropagationPhase"><type>GtkPropagationPhase</type></link> phase</parameter>);</programlisting>
<para>Sets the propagation phase at which a controller handles events.</para>
<para>If <parameter>phase</parameter>
 is <link linkend="GTK-PHASE-NONE:CAPS"><literal>GTK_PHASE_NONE</literal></link>, no automatic event handling will be
performed, but other additional gesture maintenance will. In that phase,
the events can be managed by calling <link linkend="gtk-event-controller-handle-event"><function>gtk_event_controller_handle_event()</function></link>.</para>
<refsect3 id="gtk-event-controller-set-propagation-phase.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>phase</para></entry>
<entry role="parameter_description"><para>a propagation phase</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-propagation-limit" role="function">
<title>gtk_event_controller_get_propagation_limit&#160;()</title>
<indexterm zone="gtk-event-controller-get-propagation-limit"><primary>gtk_event_controller_get_propagation_limit</primary></indexterm>
<programlisting language="C"><link linkend="GtkPropagationLimit"><returnvalue>GtkPropagationLimit</returnvalue></link>
gtk_event_controller_get_propagation_limit
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Gets the propagation limit of the event controller.</para>
<refsect3 id="gtk-event-controller-get-propagation-limit.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-propagation-limit.returns" role="returns">
<title>Returns</title>
<para> the propagation limit</para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-set-propagation-limit" role="function">
<title>gtk_event_controller_set_propagation_limit&#160;()</title>
<indexterm zone="gtk-event-controller-set-propagation-limit"><primary>gtk_event_controller_set_propagation_limit</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_event_controller_set_propagation_limit
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>,
                                <parameter><link linkend="GtkPropagationLimit"><type>GtkPropagationLimit</type></link> limit</parameter>);</programlisting>
<para>Sets the event propagation limit on the event controller.</para>
<para>If the limit is set to %<parameter>GTK_LIMIT_SAME_NATIVE</parameter>
, the controller
won't handle events that are targeted at widgets on a different
surface, such as popovers.</para>
<refsect3 id="gtk-event-controller-set-propagation-limit.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>limit</para></entry>
<entry role="parameter_description"><para>the propagation limit</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-widget" role="function">
<title>gtk_event_controller_get_widget&#160;()</title>
<indexterm zone="gtk-event-controller-get-widget"><primary>gtk_event_controller_get_widget</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_event_controller_get_widget (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Returns the <link linkend="GtkWidget"><type>GtkWidget</type></link> this controller relates to.</para>
<refsect3 id="gtk-event-controller-get-widget.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-widget.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkWidget"><type>GtkWidget</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-reset" role="function">
<title>gtk_event_controller_reset&#160;()</title>
<indexterm zone="gtk-event-controller-reset"><primary>gtk_event_controller_reset</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_event_controller_reset (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Resets the <parameter>controller</parameter>
 to a clean state. Every interaction
the controller did through <link linkend="gtk-event-controller-handle-event"><function>gtk_event_controller_handle_event()</function></link>
will be dropped at this point.</para>
<refsect3 id="gtk-event-controller-reset.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-name" role="function">
<title>gtk_event_controller_get_name&#160;()</title>
<indexterm zone="gtk-event-controller-get-name"><primary>gtk_event_controller_get_name</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_event_controller_get_name (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Gets the name of <parameter>controller</parameter>
.</para>
<refsect3 id="gtk-event-controller-get-name.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-set-name" role="function">
<title>gtk_event_controller_set_name&#160;()</title>
<indexterm zone="gtk-event-controller-set-name"><primary>gtk_event_controller_set_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_event_controller_set_name (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>);</programlisting>
<para>Sets a name on the controller that can be used for
debugging.</para>
<refsect3 id="gtk-event-controller-set-name.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>a name for <parameter>controller</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-current-event" role="function">
<title>gtk_event_controller_get_current_event&#160;()</title>
<indexterm zone="gtk-event-controller-get-current-event"><primary>gtk_event_controller_get_current_event</primary></indexterm>
<programlisting language="C"><link linkend="GdkEvent"><returnvalue>GdkEvent</returnvalue></link>&#160;*
gtk_event_controller_get_current_event
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Returns the event that is currently being handled by the
controller, and <link linkend="NULL:CAPS"><literal>NULL</literal></link> at other times.</para>
<refsect3 id="gtk-event-controller-get-current-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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-current-event.returns" role="returns">
<title>Returns</title>
<para>the event is current handled by <parameter>controller</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-current-event-device" role="function">
<title>gtk_event_controller_get_current_event_device&#160;()</title>
<indexterm zone="gtk-event-controller-get-current-event-device"><primary>gtk_event_controller_get_current_event_device</primary></indexterm>
<programlisting language="C"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
gtk_event_controller_get_current_event_device
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Returns the device of the event that is currently being
handled by the controller, and <link linkend="NULL:CAPS"><literal>NULL</literal></link> otherwise.</para>
<refsect3 id="gtk-event-controller-get-current-event-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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-current-event-device.returns" role="returns">
<title>Returns</title>
<para>device of the event is current handled by <parameter>controller</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-current-event-state" role="function">
<title>gtk_event_controller_get_current_event_state&#160;()</title>
<indexterm zone="gtk-event-controller-get-current-event-state"><primary>gtk_event_controller_get_current_event_state</primary></indexterm>
<programlisting language="C"><link linkend="GdkModifierType"><returnvalue>GdkModifierType</returnvalue></link>
gtk_event_controller_get_current_event_state
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Returns the modifier state of the event that is currently being
handled by the controller, and 0 otherwise.</para>
<refsect3 id="gtk-event-controller-get-current-event-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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-current-event-state.returns" role="returns">
<title>Returns</title>
<para> modifier state of the event is current handled by <parameter>controller</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-get-current-event-time" role="function">
<title>gtk_event_controller_get_current_event_time&#160;()</title>
<indexterm zone="gtk-event-controller-get-current-event-time"><primary>gtk_event_controller_get_current_event_time</primary></indexterm>
<programlisting language="C"><link linkend="guint32"><returnvalue>guint32</returnvalue></link>
gtk_event_controller_get_current_event_time
                               (<parameter><link linkend="GtkEventController"><type>GtkEventController</type></link> *controller</parameter>);</programlisting>
<para>Returns the timestamp of the event that is currently being
handled by the controller, and 0 otherwise.</para>
<refsect3 id="gtk-event-controller-get-current-event-time.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>controller</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventController"><type>GtkEventController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-get-current-event-time.returns" role="returns">
<title>Returns</title>
<para> timestamp of the event is current handled by <parameter>controller</parameter>
</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkEventController.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkEventController-struct" role="struct">
<title>GtkEventController</title>
<indexterm zone="GtkEventController-struct"><primary>GtkEventController</primary></indexterm>
<programlisting language="C">typedef struct _GtkEventController GtkEventController;</programlisting>
</refsect2>
<refsect2 id="GtkPropagationPhase" role="enum">
<title>enum GtkPropagationPhase</title>
<indexterm zone="GtkPropagationPhase"><primary>GtkPropagationPhase</primary></indexterm>
<para>Describes the stage at which events are fed into a <link linkend="GtkEventController"><type>GtkEventController</type></link>.</para>
<refsect3 id="GtkPropagationPhase.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-PHASE-NONE:CAPS">GTK_PHASE_NONE</para></entry>
<entry role="enum_member_description"><para>Events are not delivered automatically. Those can be
manually fed through <link linkend="gtk-event-controller-handle-event"><function>gtk_event_controller_handle_event()</function></link>. This should
only be used when full control about when, or whether the controller
handles the event is needed.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PHASE-CAPTURE:CAPS">GTK_PHASE_CAPTURE</para></entry>
<entry role="enum_member_description"><para>Events are delivered in the capture phase. The
capture phase happens before the bubble phase, runs from the toplevel down
to the event widget. This option should only be used on containers that
might possibly handle events before their children do.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PHASE-BUBBLE:CAPS">GTK_PHASE_BUBBLE</para></entry>
<entry role="enum_member_description"><para>Events are delivered in the bubble phase. The bubble
phase happens after the capture phase, and before the default handlers
are run. This phase runs from the event widget, up to the toplevel.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-PHASE-TARGET:CAPS">GTK_PHASE_TARGET</para></entry>
<entry role="enum_member_description"><para>Events are delivered in the default widget event handlers,
note that widget implementations must chain up on button, motion, touch and
grab broken handlers for controllers in this phase to be run.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkPropagationLimit" role="enum">
<title>enum GtkPropagationLimit</title>
<indexterm zone="GtkPropagationLimit"><primary>GtkPropagationLimit</primary></indexterm>
<para>Describes limits of a <link linkend="GtkEventController"><type>GtkEventController</type></link> for handling events
targeting other widgets.</para>
<refsect3 id="GtkPropagationLimit.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-LIMIT-NONE:CAPS">GTK_LIMIT_NONE</para></entry>
<entry role="enum_member_description"><para>Events are handled regardless of what their
target is.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-LIMIT-SAME-NATIVE:CAPS">GTK_LIMIT_SAME_NATIVE</para></entry>
<entry role="enum_member_description"><para>Events are only handled if their target
is in the same <link linkend="GtkNative"><type>GtkNative</type></link> as the event controllers widget. Note
that some event types have two targets (origin and destination).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkEventController.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkEventController--name" role="property"><title>The <literal>“name”</literal> property</title>
<indexterm zone="GtkEventController--name"><primary>GtkEventController:name</primary></indexterm>
<programlisting>  “name”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Name for this controller.</para><para>Owner: GtkEventController</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkEventController--propagation-limit" role="property"><title>The <literal>“propagation-limit”</literal> property</title>
<indexterm zone="GtkEventController--propagation-limit"><primary>GtkEventController:propagation-limit</primary></indexterm>
<programlisting>  “propagation-limit”        <link linkend="GtkPropagationLimit"><type>GtkPropagationLimit</type></link></programlisting>
<para>The limit for which events this controller will handle.</para>
<para>Owner: GtkEventController</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_LIMIT_SAME_NATIVE</para>
</refsect2>
<refsect2 id="GtkEventController--propagation-phase" role="property"><title>The <literal>“propagation-phase”</literal> property</title>
<indexterm zone="GtkEventController--propagation-phase"><primary>GtkEventController:propagation-phase</primary></indexterm>
<programlisting>  “propagation-phase”        <link linkend="GtkPropagationPhase"><type>GtkPropagationPhase</type></link></programlisting>
<para>The propagation phase at which this controller will handle events.</para>
<para>Owner: GtkEventController</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_PHASE_BUBBLE</para>
</refsect2>
<refsect2 id="GtkEventController--widget" role="property"><title>The <literal>“widget”</literal> property</title>
<indexterm zone="GtkEventController--widget"><primary>GtkEventController:widget</primary></indexterm>
<programlisting>  “widget”                   <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The widget receiving the <link linkend="GdkEvents"><type>GdkEvents</type></link> that the controller will handle.</para>
<para>Owner: GtkEventController</para>
<para>Flags: Read</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEventController.see-also">
<title>See Also</title>
<para><link linkend="GtkGesture"><type>GtkGesture</type></link></para>

</refsect1>

</refentry>
