<?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 % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<refentry id="AtkUtil">
<refmeta>
<refentrytitle role="top_of_page" id="AtkUtil.top_of_page">AtkUtil</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>ATK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AtkUtil</refname>
<refpurpose>A set of ATK utility functions for event and toolkit support.</refpurpose>
</refnamediv>

<refsect1 id="AtkUtil.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="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-add-focus-tracker">atk_add_focus_tracker</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="atk-remove-focus-tracker">atk_remove_focus_tracker</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="atk-focus-tracker-init">atk_focus_tracker_init</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="atk-focus-tracker-notify">atk_focus_tracker_notify</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"><phrase role="c_punctuation">(</phrase><link linkend="AtkEventListener">*AtkEventListener</link><phrase role="c_punctuation">)</phrase>&#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"><phrase role="c_punctuation">(</phrase><link linkend="AtkEventListenerInit">*AtkEventListenerInit</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-add-global-event-listener">atk_add_global_event_listener</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="atk-remove-global-event-listener">atk_remove_global_event_listener</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="AtkKeySnoopFunc">*AtkKeySnoopFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-add-key-event-listener">atk_add_key_event_listener</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="atk-remove-key-event-listener">atk_remove_key_event_listener</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-get-root">atk_get_root</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-get-focus-object">atk_get_focus_object</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-get-toolkit-name">atk_get_toolkit_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-get-toolkit-version">atk_get_toolkit_version</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-get-version">atk_get_version</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-DEFINE-TYPE:CAPS">ATK_DEFINE_TYPE</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-DEFINE-TYPE-EXTENDED:CAPS">ATK_DEFINE_TYPE_EXTENDED</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-DEFINE-TYPE-WITH-CODE:CAPS">ATK_DEFINE_TYPE_WITH_CODE</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-DEFINE-ABSTRACT-TYPE:CAPS">ATK_DEFINE_ABSTRACT_TYPE</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS">ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE</link><phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkUtil.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">struct</entry><entry role="function_name"><link linkend="AtkUtil-struct">AtkUtil</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AtkUtilClass">AtkUtilClass</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="AtkCoordType">AtkCoordType</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AtkKeyEventStruct">AtkKeyEventStruct</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="AtkKeyEventType">AtkKeyEventType</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkUtil.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GEnum">GEnum</link>
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> AtkCoordType
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AtkKeyEventType
    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AtkUtil
</screen>
</refsect1>


<refsect1 id="AtkUtil.description" role="desc">
<title role="desc.title">Description</title>
<para>A set of ATK utility functions which are used to support event
registration of various types, and obtaining the 'root' accessible
of a process and information about the current ATK implementation
and toolkit version.</para>

</refsect1>
<refsect1 id="AtkUtil.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="atk-add-focus-tracker" role="function" condition="deprecated">
<title>atk_add_focus_tracker&#160;()</title>
<indexterm zone="atk-add-focus-tracker" role="deprecated"><primary>atk_add_focus_tracker</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_add_focus_tracker (<parameter><link linkend="AtkEventListener"><type>AtkEventListener</type></link> focus_tracker</parameter>);</programlisting>
<warning><para><literal>atk_add_focus_tracker</literal> has been deprecated since version 2.9.4 and should not be used in newly-written code.</para> <para>Focus tracking has been dropped as a feature
to be implemented by ATK itself. If you need focus tracking on your
implementation, subscribe to the <link linkend="AtkObject-state-change"><type>“state-change”</type></link> "focused" signal.</para>
</warning>
<para>Adds the specified function to the list of functions to be called
when an object receives focus.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="atk-add-focus-tracker.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>focus_tracker</para></entry>
<entry role="parameter_description"><para>Function to be added to the list of functions to be called
when an object receives focus.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-add-focus-tracker.returns" role="returns">
<title>Returns</title>
<para> added focus tracker id, or 0 on failure.</para>
</refsect3></refsect2>
<refsect2 id="atk-remove-focus-tracker" role="function" condition="deprecated">
<title>atk_remove_focus_tracker&#160;()</title>
<indexterm zone="atk-remove-focus-tracker" role="deprecated"><primary>atk_remove_focus_tracker</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_remove_focus_tracker (<parameter><link linkend="guint"><type>guint</type></link> tracker_id</parameter>);</programlisting>
<warning><para><literal>atk_remove_focus_tracker</literal> has been deprecated since version 2.9.4 and should not be used in newly-written code.</para> <para>Focus tracking has been dropped as a feature
to be implemented by ATK itself. If you need focus tracking on your
implementation, subscribe to the <link linkend="AtkObject-state-change"><type>“state-change”</type></link> "focused" signal.</para>
<para>Removes the specified focus tracker from the list of functions
to be called when any object receives focus.</para>
</warning>
<refsect3 id="atk-remove-focus-tracker.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>tracker_id</para></entry>
<entry role="parameter_description"><para>the id of the focus tracker to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-focus-tracker-init" role="function" condition="deprecated">
<title>atk_focus_tracker_init&#160;()</title>
<indexterm zone="atk-focus-tracker-init" role="deprecated"><primary>atk_focus_tracker_init</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_focus_tracker_init (<parameter><link linkend="AtkEventListenerInit"><type>AtkEventListenerInit</type></link> init</parameter>);</programlisting>
<warning><para><literal>atk_focus_tracker_init</literal> has been deprecated since version 2.9.4 and should not be used in newly-written code.</para> <para>Focus tracking has been dropped as a feature
to be implemented by ATK itself.</para>
</warning>
<para>Specifies the function to be called for focus tracker initialization.
This function should be called by an implementation of the
ATK interface if any specific work needs to be done to enable
focus tracking.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="atk-focus-tracker-init.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>init</para></entry>
<entry role="parameter_description"><para>Function to be called for focus tracker initialization</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-focus-tracker-notify" role="function" condition="deprecated">
<title>atk_focus_tracker_notify&#160;()</title>
<indexterm zone="atk-focus-tracker-notify" role="deprecated"><primary>atk_focus_tracker_notify</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_focus_tracker_notify (<parameter><link linkend="AtkObject"><type>AtkObject</type></link> *object</parameter>);</programlisting>
<warning><para><literal>atk_focus_tracker_notify</literal> has been deprecated since version 2.9.4 and should not be used in newly-written code.</para> <para>Focus tracking has been dropped as a feature
to be implemented by ATK itself. As <link linkend="AtkObject-focus-event"><type>“focus-event”</type></link> was
deprecated in favor of a <link linkend="AtkObject-state-change"><type>“state-change”</type></link> signal, in order
to notify a focus change on your implementation, you can use
<link linkend="atk-object-notify-state-change"><function>atk_object_notify_state_change()</function></link> instead.</para>
</warning>
<para>Cause the focus tracker functions which have been specified to be
executed for the object.</para>
<refsect3 id="atk-focus-tracker-notify.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>object</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkObject"><type>AtkObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AtkEventListener" role="function">
<title>AtkEventListener&#160;()</title>
<indexterm zone="AtkEventListener"><primary>AtkEventListener</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*AtkEventListener<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="AtkObject"><type>AtkObject</type></link> *obj</parameter>);</programlisting>
<para>A function which is called when an object emits a matching event,
as used in <link linkend="atk-add-focus-tracker"><type>atk_add_focus_tracker</type></link>.
Currently the only events for which object-specific handlers are
supported are events of type "focus:".  Most clients of ATK will prefer to 
attach signal handlers for the various ATK signals instead.</para>
<para>see atk_add_focus_tracker.</para>
<refsect3 id="AtkEventListener.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>obj</para></entry>
<entry role="parameter_description"><para>An <link linkend="AtkObject"><type>AtkObject</type></link> instance for whom the callback will be called when
the specified event (e.g. 'focus:') takes place.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AtkEventListenerInit" role="function">
<title>AtkEventListenerInit&#160;()</title>
<indexterm zone="AtkEventListenerInit"><primary>AtkEventListenerInit</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*AtkEventListenerInit<phrase role="c_punctuation">)</phrase> (<parameter><type>void</type></parameter>);</programlisting>
<para>An <link linkend="AtkEventListenerInit"><type>AtkEventListenerInit</type></link> function is a special function that is
called in order to initialize the per-object event registration system
used by <link linkend="AtkEventListener"><type>AtkEventListener</type></link>, if any preparation is required.  </para>
<para>see atk_focus_tracker_init.</para>
</refsect2>
<refsect2 id="atk-add-global-event-listener" role="function">
<title>atk_add_global_event_listener&#160;()</title>
<indexterm zone="atk-add-global-event-listener"><primary>atk_add_global_event_listener</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_add_global_event_listener (<parameter><link linkend="GSignalEmissionHook"><type>GSignalEmissionHook</type></link> listener</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *event_type</parameter>);</programlisting>
<para>Adds the specified function to the list of functions to be called
when an ATK event of type event_type occurs.</para>
<para>The format of event_type is the following:
 "ATK:&lt;atk_type&gt;:&lt;atk_event&gt;:&lt;atk_event_detail&gt;</para>
<para>Where "ATK" works as the namespace, &lt;atk_interface&gt; is the name of
the ATK type (interface or object), &lt;atk_event&gt; is the name of the
signal defined on that interface and &lt;atk_event_detail&gt; is the
gsignal detail of that signal. You can find more info about gsignal
details here:
http://developer.gnome.org/gobject/stable/gobject-Signals.html</para>
<para>The first three parameters are mandatory. The last one is optional.</para>
<para>For example:
  ATK:AtkObject:state-change
  ATK:AtkText:text-selection-changed
  ATK:AtkText:text-insert:system</para>
<para>Toolkit implementor note: ATK provides a default implementation for
this virtual method. ATK implementors are discouraged from
reimplementing this method.</para>
<para>Toolkit implementor note: this method is not intended to be used by
ATK implementors but by ATK consumers.</para>
<para>ATK consumers note: as this method adds a listener for a given ATK
type, that type should be already registered on the GType system
before calling this method. A simple way to do that is creating an
instance of <link linkend="AtkNoOpObject"><type>AtkNoOpObject</type></link>. This class implements all ATK
interfaces, so creating the instance will register all ATK types as
a collateral effect.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="atk-add-global-event-listener.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>listener</para></entry>
<entry role="parameter_description"><para>the listener to notify</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>event_type</para></entry>
<entry role="parameter_description"><para>the type of event for which notification is requested</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-add-global-event-listener.returns" role="returns">
<title>Returns</title>
<para> added event listener id, or 0 on failure.</para>
</refsect3></refsect2>
<refsect2 id="atk-remove-global-event-listener" role="function">
<title>atk_remove_global_event_listener&#160;()</title>
<indexterm zone="atk-remove-global-event-listener"><primary>atk_remove_global_event_listener</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_remove_global_event_listener (<parameter><link linkend="guint"><type>guint</type></link> listener_id</parameter>);</programlisting>
<para><parameter>listener_id</parameter>
 is the value returned by <link linkend="atk-add-global-event-listener"><type>atk_add_global_event_listener</type></link>
when you registered that event listener.</para>
<para>Toolkit implementor note: ATK provides a default implementation for
this virtual method. ATK implementors are discouraged from
reimplementing this method.</para>
<para>Toolkit implementor note: this method is not intended to be used by
ATK implementors but by ATK consumers.</para>
<para>Removes the specified event listener</para>
<refsect3 id="atk-remove-global-event-listener.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>listener_id</para></entry>
<entry role="parameter_description"><para>the id of the event listener to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AtkKeySnoopFunc" role="function">
<title>AtkKeySnoopFunc&#160;()</title>
<indexterm zone="AtkKeySnoopFunc"><primary>AtkKeySnoopFunc</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*AtkKeySnoopFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="AtkKeyEventStruct"><type>AtkKeyEventStruct</type></link> *event</parameter>,
                    <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>An <link linkend="AtkKeySnoopFunc"><type>AtkKeySnoopFunc</type></link> is a type of callback which is called whenever a key event occurs, 
if registered via atk_add_key_event_listener.  It allows for pre-emptive 
interception of key events via the return code as described below.</para>
<refsect3 id="AtkKeySnoopFunc.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>event</para></entry>
<entry role="parameter_description"><para>an AtkKeyEventStruct containing information about the key event for which
notification is being given.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>a block of data which will be passed to the event listener, on notification.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="AtkKeySnoopFunc.returns" role="returns">
<title>Returns</title>
<para> TRUE (nonzero) if the event emission should be stopped and the event
discarded without being passed to the normal GUI recipient; FALSE (zero) if the
event dispatch to the client application should proceed as normal.</para>
<para>see atk_add_key_event_listener.</para>
</refsect3></refsect2>
<refsect2 id="atk-add-key-event-listener" role="function">
<title>atk_add_key_event_listener&#160;()</title>
<indexterm zone="atk-add-key-event-listener"><primary>atk_add_key_event_listener</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_add_key_event_listener (<parameter><link linkend="AtkKeySnoopFunc"><type>AtkKeySnoopFunc</type></link> listener</parameter>,
                            <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>Adds the specified function to the list of functions to be called
       when a key event occurs.  The <parameter>data</parameter>
 element will be passed to the
       <link linkend="AtkKeySnoopFunc"><type>AtkKeySnoopFunc</type></link> (<parameter>listener</parameter>
) as the <parameter>func_data</parameter>
 param, on notification.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="atk-add-key-event-listener.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>listener</para></entry>
<entry role="parameter_description"><para>the listener to notify</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>a <link linkend="gpointer"><type>gpointer</type></link> that points to a block of data that should be sent to the registered listeners,
along with the event notification, when it occurs.  </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-add-key-event-listener.returns" role="returns">
<title>Returns</title>
<para> added event listener id, or 0 on failure.</para>
</refsect3></refsect2>
<refsect2 id="atk-remove-key-event-listener" role="function">
<title>atk_remove_key_event_listener&#160;()</title>
<indexterm zone="atk-remove-key-event-listener"><primary>atk_remove_key_event_listener</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_remove_key_event_listener (<parameter><link linkend="guint"><type>guint</type></link> listener_id</parameter>);</programlisting>
<para><parameter>listener_id</parameter>
 is the value returned by <link linkend="atk-add-key-event-listener"><type>atk_add_key_event_listener</type></link>
when you registered that event listener.</para>
<para>Removes the specified event listener.</para>
<refsect3 id="atk-remove-key-event-listener.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>listener_id</para></entry>
<entry role="parameter_description"><para>the id of the event listener to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-get-root" role="function">
<title>atk_get_root&#160;()</title>
<indexterm zone="atk-get-root"><primary>atk_get_root</primary></indexterm>
<programlisting language="C"><link linkend="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
atk_get_root (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets the root accessible container for the current application.</para>
<refsect3 id="atk-get-root.returns" role="returns">
<title>Returns</title>
<para>the root accessible container for the current
application. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="atk-get-focus-object" role="function" condition="since:1.6">
<title>atk_get_focus_object&#160;()</title>
<indexterm zone="atk-get-focus-object" role="1.6"><primary>atk_get_focus_object</primary></indexterm>
<programlisting language="C"><link linkend="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
atk_get_focus_object (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets the currently focused object.</para>
<refsect3 id="atk-get-focus-object.returns" role="returns">
<title>Returns</title>
<para>the currently focused object for the current
application. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="atk-get-toolkit-name" role="function">
<title>atk_get_toolkit_name&#160;()</title>
<indexterm zone="atk-get-toolkit-name"><primary>atk_get_toolkit_name</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
atk_get_toolkit_name (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets name string for the GUI toolkit implementing ATK for this application.</para>
<refsect3 id="atk-get-toolkit-name.returns" role="returns">
<title>Returns</title>
<para> name string for the GUI toolkit implementing ATK for this application</para>
</refsect3></refsect2>
<refsect2 id="atk-get-toolkit-version" role="function">
<title>atk_get_toolkit_version&#160;()</title>
<indexterm zone="atk-get-toolkit-version"><primary>atk_get_toolkit_version</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
atk_get_toolkit_version (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets version string for the GUI toolkit implementing ATK for this application.</para>
<refsect3 id="atk-get-toolkit-version.returns" role="returns">
<title>Returns</title>
<para> version string for the GUI toolkit implementing ATK for this application</para>
</refsect3></refsect2>
<refsect2 id="atk-get-version" role="function" condition="since:1.20">
<title>atk_get_version&#160;()</title>
<indexterm zone="atk-get-version" role="1.20"><primary>atk_get_version</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
atk_get_version (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets the current version for ATK.</para>
<refsect3 id="atk-get-version.returns" role="returns">
<title>Returns</title>
<para> version string for ATK</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.20">1.20</link></para></refsect2>
<refsect2 id="ATK-DEFINE-TYPE:CAPS" role="macro" condition="since:1.22">
<title>ATK_DEFINE_TYPE()</title>
<indexterm zone="ATK-DEFINE-TYPE:CAPS" role="1.22"><primary>ATK_DEFINE_TYPE</primary></indexterm>
<programlisting language="C">#define ATK_DEFINE_TYPE(TN, t_n, T_P)			       ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
</programlisting>
<para>A convenience macro for type ATK implementations, which declares a class
initialization function, an instance initialization function (see <link linkend="GTypeInfo"><type>GTypeInfo</type></link>
for information about these) and a static variable named
<parameter>t_n</parameter>
 _parent_class pointing to the parent class. Furthermore, it
defines a <link linkend="get-type"><function>_get_type()</function></link> function.</para>
<refsect3 id="ATK-DEFINE-TYPE.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>TN</para></entry>
<entry role="parameter_description"><para>The name of the new type, in Camel case.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>t_n</para></entry>
<entry role="parameter_description"><para>The name of the new type, in lowercase, with words separated by '_'.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>T_P</para></entry>
<entry role="parameter_description"><para>The <link linkend="GType"><type>GType</type></link> of the parent type.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="ATK-DEFINE-TYPE-EXTENDED:CAPS" role="macro" condition="since:1.22">
<title>ATK_DEFINE_TYPE_EXTENDED()</title>
<indexterm zone="ATK-DEFINE-TYPE-EXTENDED:CAPS" role="1.22"><primary>ATK_DEFINE_TYPE_EXTENDED</primary></indexterm>
<programlisting language="C">#define ATK_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
</programlisting>
<para>The most general convenience macro for ATK type implementations, on which
<link linkend="ATK-DEFINE-TYPE:CAPS"><function>ATK_DEFINE_TYPE()</function></link>, etc are based.</para>
<refsect3 id="ATK-DEFINE-TYPE-EXTENDED.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>TN</para></entry>
<entry role="parameter_description"><para>The name of the new type, in Camel case.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>t_n</para></entry>
<entry role="parameter_description"><para>The name of the new type, in lowercase, with words separated by '_'.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>T_P</para></entry>
<entry role="parameter_description"><para>The <link linkend="GType"><type>GType</type></link> of the parent type.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_f_</para></entry>
<entry role="parameter_description"><para><link linkend="GTypeFlags"><type>GTypeFlags</type></link> to pass to <link linkend="g-type-register-static"><function>g_type_register_static()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_C_</para></entry>
<entry role="parameter_description"><para>Custom code that gets inserted in the <link linkend="get-type"><function>_get_type()</function></link> function.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="ATK-DEFINE-TYPE-WITH-CODE:CAPS" role="macro" condition="since:1.22">
<title>ATK_DEFINE_TYPE_WITH_CODE()</title>
<indexterm zone="ATK-DEFINE-TYPE-WITH-CODE:CAPS" role="1.22"><primary>ATK_DEFINE_TYPE_WITH_CODE</primary></indexterm>
<programlisting language="C">#define ATK_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)	      _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
</programlisting>
<para>A convenience macro for ATK type implementations.
Similar to <link linkend="ATK-DEFINE-TYPE:CAPS"><function>ATK_DEFINE_TYPE()</function></link>, but allows you to insert custom code into the
<link linkend="get-type"><function>_get_type()</function></link> function, e.g. interface implementations via <link linkend="G-IMPLEMENT-INTERFACE:CAPS"><function>G_IMPLEMENT_INTERFACE()</function></link>.</para>
<refsect3 id="ATK-DEFINE-TYPE-WITH-CODE.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>TN</para></entry>
<entry role="parameter_description"><para>The name of the new type, in Camel case.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>t_n</para></entry>
<entry role="parameter_description"><para>The name of the new type in lowercase, with words separated by '_'.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>T_P</para></entry>
<entry role="parameter_description"><para>The <link linkend="GType"><type>GType</type></link> of the parent type.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_C_</para></entry>
<entry role="parameter_description"><para>Custom code that gets inserted in the <link linkend="get-type"><function>_get_type()</function></link> function.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="ATK-DEFINE-ABSTRACT-TYPE:CAPS" role="macro" condition="since:1.22">
<title>ATK_DEFINE_ABSTRACT_TYPE()</title>
<indexterm zone="ATK-DEFINE-ABSTRACT-TYPE:CAPS" role="1.22"><primary>ATK_DEFINE_ABSTRACT_TYPE</primary></indexterm>
<programlisting language="C">#define ATK_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)		       ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
</programlisting>
<para>A convenience macro for ATK type implementations.
Similar to <link linkend="ATK-DEFINE-TYPE:CAPS"><function>ATK_DEFINE_TYPE()</function></link>, but defines an abstract type.</para>
<refsect3 id="ATK-DEFINE-ABSTRACT-TYPE.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>TN</para></entry>
<entry role="parameter_description"><para>The name of the new type, in Camel case.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>t_n</para></entry>
<entry role="parameter_description"><para>The name of the new type, in lowercase, with words separated by '_'.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>T_P</para></entry>
<entry role="parameter_description"><para>The <link linkend="GType"><type>GType</type></link> of the parent type.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="ATK-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS" role="macro" condition="since:1.22">
<title>ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE()</title>
<indexterm zone="ATK-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS" role="1.22"><primary>ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE</primary></indexterm>
<programlisting language="C">#define ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
</programlisting>
<para>A convenience macro for ATK type implementations.
Similar to <link linkend="ATK-DEFINE-TYPE-WITH-CODE:CAPS"><function>ATK_DEFINE_TYPE_WITH_CODE()</function></link>, but defines an abstract type.</para>
<refsect3 id="ATK-DEFINE-ABSTRACT-TYPE-WITH-CODE.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>TN</para></entry>
<entry role="parameter_description"><para>The name of the new type, in Camel case.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>t_n</para></entry>
<entry role="parameter_description"><para>The name of the new type, in lowercase, with words separated by '_'.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>T_P</para></entry>
<entry role="parameter_description"><para>The <link linkend="GType"><type>GType</type></link> of the parent type.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_C_</para></entry>
<entry role="parameter_description"><para>Custom code that gets inserted in the <link linkend="get-type"><function>_get_type()</function></link> function.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>

</refsect1>
<refsect1 id="AtkUtil.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AtkUtil-struct" role="struct">
<title>struct AtkUtil</title>
<indexterm zone="AtkUtil-struct"><primary>AtkUtil</primary></indexterm>
<programlisting language="C">struct AtkUtil;</programlisting>
</refsect2>
<refsect2 id="AtkUtilClass" role="struct">
<title>struct AtkUtilClass</title>
<indexterm zone="AtkUtilClass"><primary>AtkUtilClass</primary></indexterm>
<programlisting language="C">struct AtkUtilClass {
   GObjectClass parent;
   guint        (* add_global_event_listener)    (GSignalEmissionHook listener,
						  const gchar        *event_type);
   void         (* remove_global_event_listener) (guint               listener_id);
   guint&#160;(* add_key_event_listener) 	 (AtkKeySnoopFunc     listener,
						  gpointer data);
   void         (* remove_key_event_listener)    (guint               listener_id);
   AtkObject*   (* get_root)                     (void);
   const gchar* (* get_toolkit_name)             (void);
   const gchar* (* get_toolkit_version)          (void);
};
</programlisting>
<refsect3 id="AtkUtilClass.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="GObjectClass"><type>GObjectClass</type></link>&#160;<structfield id="AtkUtilClass.parent">parent</structfield>;</para></entry>
<entry /><entry />
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.add-global-event-listener">add_global_event_listener</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>adds the specified function to the list
of functions to be called when an ATK event occurs. ATK
implementors are discouraged from reimplementing this method.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.remove-global-event-listener">remove_global_event_listener</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>removes the specified function to
the list of functions to be called when an ATK event occurs. ATK
implementors are discouraged from reimplementing this method.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.add-key-event-listener">add_key_event_listener</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>adds the specified function to the list of
functions to be called when a key event occurs.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.remove-key-event-listener">remove_key_event_listener</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>remove the specified function to the
list of functions to be called when a key event occurs.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.get-root">get_root</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>gets the root accessible container for the current
application.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.get-toolkit-name">get_toolkit_name</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>gets name string for the GUI toolkit
implementing ATK for this application.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="AtkUtilClass.get-toolkit-version">get_toolkit_version</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>gets version string for the GUI toolkit
implementing ATK for this application.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="AtkCoordType" role="enum">
<title>enum AtkCoordType</title>
<indexterm zone="AtkCoordType"><primary>AtkCoordType</primary></indexterm>
<para>Specifies how xy coordinates are to be interpreted. Used by functions such
as <link linkend="atk-component-get-position"><function>atk_component_get_position()</function></link> and <link linkend="atk-text-get-character-extents"><function>atk_text_get_character_extents()</function></link></para>
<refsect3 id="AtkCoordType.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="ATK-XY-SCREEN:CAPS">ATK_XY_SCREEN</para></entry>
<entry role="enum_member_description"><para>specifies xy coordinates relative to the screen</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="ATK-XY-WINDOW:CAPS">ATK_XY_WINDOW</para></entry>
<entry role="enum_member_description"><para>specifies xy coordinates relative to the widget's
top-level window</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="ATK-XY-PARENT:CAPS">ATK_XY_PARENT</para></entry>
<entry role="enum_member_description"><para>specifies xy coordinates relative to the widget's
immediate parent. Since: 2.30</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AtkKeyEventStruct" role="struct">
<title>struct AtkKeyEventStruct</title>
<indexterm zone="AtkKeyEventStruct"><primary>AtkKeyEventStruct</primary></indexterm>
<programlisting language="C">struct AtkKeyEventStruct {
  gint type;
  guint state;
  guint keyval;
  gint length;
  gchar *string;
  guint16 keycode;
  guint32 timestamp;

};
</programlisting>
<para>Encapsulates information about a key event.</para>
<refsect3 id="AtkKeyEventStruct.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="gint"><type>gint</type></link>&#160;<structfield id="AtkKeyEventStruct.type">type</structfield>;</para></entry>
<entry role="struct_member_description"><para>An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="guint"><type>guint</type></link>&#160;<structfield id="AtkKeyEventStruct.state">state</structfield>;</para></entry>
<entry role="struct_member_description"><para>A bitmask representing the state of the modifier keys immediately after the event takes place.
The meaning of the bits is currently defined to match the bitmask used by GDK in
GdkEventType.state, see
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html<link linkend="GdkEventKey"><type>GdkEventKey</type></link></para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="guint"><type>guint</type></link>&#160;<structfield id="AtkKeyEventStruct.keyval">keyval</structfield>;</para></entry>
<entry role="struct_member_description"><para>A guint representing a keysym value corresponding to those used by GDK and X11: see
/usr/X11/include/keysymdef.h.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gint"><type>gint</type></link>&#160;<structfield id="AtkKeyEventStruct.length">length</structfield>;</para></entry>
<entry role="struct_member_description"><para>The length of member <link linkend="string"><type>string</type></link>.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gchar"><type>gchar</type></link>&#160;*<structfield id="AtkKeyEventStruct.string">string</structfield>;</para></entry>
<entry role="struct_member_description"><para>A string containing one of the following: either a string approximating the text that would
result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress.
Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0",
"semicolon", "aacute".  Keypad keys have the prefix "KP".</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="guint16"><type>guint16</type></link>&#160;<structfield id="AtkKeyEventStruct.keycode">keycode</structfield>;</para></entry>
<entry role="struct_member_description"><para>The raw hardware code that generated the key event.  This field is raraly useful.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="guint32"><type>guint32</type></link>&#160;<structfield id="AtkKeyEventStruct.timestamp">timestamp</structfield>;</para></entry>
<entry role="struct_member_description"><para>A timestamp in milliseconds indicating when the event occurred.
These timestamps are relative to a starting point which should be considered arbitrary,
and only used to compare the dispatch times of events to one another.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="AtkKeyEventType" role="enum">
<title>enum AtkKeyEventType</title>
<indexterm zone="AtkKeyEventType"><primary>AtkKeyEventType</primary></indexterm>
<para>Specifies the type of a keyboard evemt.</para>
<refsect3 id="AtkKeyEventType.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="ATK-KEY-EVENT-PRESS:CAPS">ATK_KEY_EVENT_PRESS</para></entry>
<entry role="enum_member_description"><para>specifies a key press event</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="ATK-KEY-EVENT-RELEASE:CAPS">ATK_KEY_EVENT_RELEASE</para></entry>
<entry role="enum_member_description"><para>specifies a key release event</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="ATK-KEY-EVENT-LAST-DEFINED:CAPS">ATK_KEY_EVENT_LAST_DEFINED</para></entry>
<entry role="enum_member_description"><para>Not a valid value; specifies end of enumeration</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>

</refentry>
