<?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="GtkEventControllerFocus">
<refmeta>
<refentrytitle role="top_of_page" id="GtkEventControllerFocus.top_of_page">GtkEventControllerFocus</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkEventControllerFocus</refname>
<refpurpose>Event controller for focus</refpurpose>
</refnamediv>

<refsect1 id="GtkEventControllerFocus.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="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-event-controller-focus-new">gtk_event_controller_focus_new</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-event-controller-focus-contains-focus">gtk_event_controller_focus_contains_focus</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-event-controller-focus-is-focus">gtk_event_controller_focus_is_focus</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEventControllerFocus.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="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkEventControllerFocus--contains-focus">contains-focus</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkEventControllerFocus--is-focus">is-focus</link></entry><entry role="property_flags">Read</entry></row>

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

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

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

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

<refsect1 id="GtkEventControllerFocus.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link> is an event controller meant for situations
where you need to know where the focus is.</para>

</refsect1>
<refsect1 id="GtkEventControllerFocus.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-event-controller-focus-new" role="function">
<title>gtk_event_controller_focus_new&#160;()</title>
<indexterm zone="gtk-event-controller-focus-new"><primary>gtk_event_controller_focus_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
gtk_event_controller_focus_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new event controller that will handle focus events.</para>
<refsect3 id="gtk-event-controller-focus-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-focus-contains-focus" role="function">
<title>gtk_event_controller_focus_contains_focus&#160;()</title>
<indexterm zone="gtk-event-controller-focus-contains-focus"><primary>gtk_event_controller_focus_contains_focus</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_event_controller_focus_contains_focus
                               (<parameter><link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link> *self</parameter>);</programlisting>
<para>Returns the value of the GtkEventControllerFocus:contains-focus property.</para>
<refsect3 id="gtk-event-controller-focus-contains-focus.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-focus-contains-focus.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if focus is within <parameter>self</parameter>
or one of its children</para>
</refsect3></refsect2>
<refsect2 id="gtk-event-controller-focus-is-focus" role="function">
<title>gtk_event_controller_focus_is_focus&#160;()</title>
<indexterm zone="gtk-event-controller-focus-is-focus"><primary>gtk_event_controller_focus_is_focus</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_event_controller_focus_is_focus (<parameter><link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link> *self</parameter>);</programlisting>
<para>Returns the value of the GtkEventControllerFocus:is-focus property.</para>
<refsect3 id="gtk-event-controller-focus-is-focus.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-event-controller-focus-is-focus.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if focus is within <parameter>self</parameter>
but not one of its children</para>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkEventControllerFocus.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkEventControllerFocus--contains-focus" role="property"><title>The <literal>“contains-focus”</literal> property</title>
<indexterm zone="GtkEventControllerFocus--contains-focus"><primary>GtkEventControllerFocus:contains-focus</primary></indexterm>
<programlisting>  “contains-focus”           <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether focus is contain in the controllers widget. See
See <link linkend="GtkEventControllerFocus--is-focus"><type>“is-focus”</type></link> for whether the focus is in the widget itself
or inside a descendent.</para>
<para>When handling focus events, this property is updated
before <link linkend="GtkEventControllerFocus-enter"><type>“enter”</type></link> or
<link linkend="GtkEventControllerFocus-leave"><type>“leave”</type></link> are emitted.</para>
<para>Owner: GtkEventControllerFocus</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkEventControllerFocus--is-focus" role="property"><title>The <literal>“is-focus”</literal> property</title>
<indexterm zone="GtkEventControllerFocus--is-focus"><primary>GtkEventControllerFocus:is-focus</primary></indexterm>
<programlisting>  “is-focus”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether focus is in the controllers widget itself,
opposed to in a descendent widget. See also
<link linkend="GtkEventControllerFocus--contains-focus"><type>“contains-focus”</type></link>.</para>
<para>When handling focus events, this property is updated
before <link linkend="GtkEventControllerKey-focus-in"><type>“focus-in”</type></link> or
<link linkend="GtkEventControllerKey-focus-out"><type>“focus-out”</type></link> are emitted.</para>
<para>Owner: GtkEventControllerFocus</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEventControllerFocus.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkEventControllerFocus-enter" role="signal"><title>The <literal>“enter”</literal> signal</title>
<indexterm zone="GtkEventControllerFocus-enter"><primary>GtkEventControllerFocus::enter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link> *controller,
               <link linkend="gpointer"><type>gpointer</type></link>                 user_data)</programlisting>
<para>This signal is emitted whenever the focus enters into the
widget or one of its descendents.</para>
<para>Note that this means you may not get an ::enter signal
even though the widget becomes the focus location, in
certain cases (such as when the focus moves from a descendent
of the widget to the widget itself). If you are interested
in these cases, you can monitor the <link linkend="GtkEventControllerFocus--is-focus"><type>“is-focus”</type></link>
property for changes.</para>
<refsect3 id="GtkEventControllerFocus-enter.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>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="GtkEventControllerFocus-leave" role="signal"><title>The <literal>“leave”</literal> signal</title>
<indexterm zone="GtkEventControllerFocus-leave"><primary>GtkEventControllerFocus::leave</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkEventControllerFocus"><type>GtkEventControllerFocus</type></link> *controller,
               <link linkend="gpointer"><type>gpointer</type></link>                 user_data)</programlisting>
<para>This signal is emitted whenever the focus leaves the
widget hierarchy that is rooted at the widget that the
controller is attached to.</para>
<para>Note that this means you may not get a ::leave signal
even though the focus moves away from the widget, in
certain cases (such as when the focus moves from the widget
to a descendent). If you are interested in these cases, you
can monitor the <link linkend="GtkEventControllerFocus--is-focus"><type>“is-focus”</type></link> property
for changes.</para>
<refsect3 id="GtkEventControllerFocus-leave.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>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>
</refsect1>
<refsect1 id="GtkEventControllerFocus.see-also">
<title>See Also</title>
<para><link linkend="GtkEventController"><type>GtkEventController</type></link></para>

</refsect1>

</refentry>
