<?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">
]>
<refentry id="GdkDevice">
<refmeta>
<refentrytitle role="top_of_page" id="GdkDevice.top_of_page">GdkDevice</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkDevice</refname>
<refpurpose>Object representing an input device</refpurpose>
</refnamediv>

<refsect1 id="GdkDevice.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-name">gdk_device_get_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="gdk-device-get-vendor-id">gdk_device_get_vendor_id</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="gdk-device-get-product-id">gdk_device_get_product_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkInputSource"><returnvalue>GdkInputSource</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-get-source">gdk_device_get_source</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="gdk-device-set-mode">gdk_device_set_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkInputMode"><returnvalue>GdkInputMode</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-get-mode">gdk_device_get_mode</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="gdk-device-set-key">gdk_device_set_key</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="gdk-device-get-key">gdk_device_get_key</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="gdk-device-set-axis-use">gdk_device_set_axis_use</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkAxisUse"><returnvalue>GdkAxisUse</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-get-axis-use">gdk_device_get_axis_use</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="gdk-device-get-associated-device">gdk_device_get_associated_device</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-list-slave-devices">gdk_device_list_slave_devices</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDeviceType"><returnvalue>GdkDeviceType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-get-device-type">gdk_device_get_device_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-display">gdk_device_get_display</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="gdk-device-get-has-cursor">gdk_device_get_has_cursor</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"><link linkend="gdk-device-get-n-axes">gdk_device_get_n_axes</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"><link linkend="gdk-device-get-n-keys">gdk_device_get_n_keys</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkAxisFlags"><returnvalue>GdkAxisFlags</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-get-axes">gdk_device_get_axes</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="gdk-device-warp">gdk_device_warp</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSeat"><returnvalue>GdkSeat</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-seat">gdk_device_get_seat</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkGrabStatus"><returnvalue>GdkGrabStatus</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-grab">gdk_device_grab</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="gdk-device-ungrab">gdk_device_ungrab</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="gdk-device-get-state">gdk_device_get_state</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="gdk-device-get-position">gdk_device_get_position</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="gdk-device-get-position-double">gdk_device_get_position_double</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-surface-at-position">gdk_device_get_surface_at_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-surface-at-position-double">gdk_device_get_surface_at_position_double</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="gdk-device-get-history">gdk_device_get_history</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="gdk-device-free-history">gdk_device_free_history</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="gdk-device-get-axis">gdk_device_get_axis</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-list-axes">gdk_device_list_axes</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="gdk-device-get-axis-value">gdk_device_get_axis_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-device-get-last-event-surface">gdk_device_get_last_event_surface</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="guint64"><returnvalue>guint64</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-tool-get-serial">gdk_device_tool_get_serial</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDeviceToolType"><returnvalue>GdkDeviceToolType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-tool-get-tool-type">gdk_device_tool_get_tool_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint64"><returnvalue>guint64</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-device-tool-get-hardware-id">gdk_device_tool_get_hardware_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkDevice.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="GdkDevice"><type>GdkDevice</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--associated-device">associated-device</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkAxisFlags"><type>GdkAxisFlags</type></link></entry><entry role="property_name"><link linkend="GdkDevice--axes">axes</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--display">display</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GdkDevice--has-cursor">has-cursor</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="GdkInputMode"><type>GdkInputMode</type></link></entry><entry role="property_name"><link linkend="GdkDevice--input-mode">input-mode</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkInputSource"><type>GdkInputSource</type></link></entry><entry role="property_name"><link linkend="GdkDevice--input-source">input-source</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GdkDevice--n-axes">n-axes</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--name">name</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GdkDevice--num-touches">num-touches</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--product-id">product-id</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="GdkSeat"><type>GdkSeat</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--seat">seat</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--tool">tool</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkDeviceType"><type>GdkDeviceType</type></link></entry><entry role="property_name"><link linkend="GdkDevice--type">type</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDevice--vendor-id">vendor-id</link></entry><entry role="property_flags">Read / Write / Construct Only</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkDevice.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signals_return" colwidth="150px"/>
<colspec colname="signals_name" colwidth="300px"/>
<colspec colname="signals_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkDevice-changed">changed</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="GdkDevice-tool-changed">tool-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkDevice.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkDevice-struct">GdkDevice</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkInputSource">GdkInputSource</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkInputMode">GdkInputMode</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkAxisUse">GdkAxisUse</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkAxisFlags">GdkAxisFlags</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkDeviceToolType">GdkDeviceToolType</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkDeviceType">GdkDeviceType</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkGrabOwnership">GdkGrabOwnership</link></entry></row>



<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GdkTimeCoord">GdkTimeCoord</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkDevice.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> GdkDevice
</screen>
</refsect1>
<refsect1 id="GdkDevice.derived-interfaces" role="derived_interfaces">
<title role="derived_interfaces.title">Known Derived Interfaces</title>
<para>
GdkDevice is required by
 <link linkend="GdkDevicePad">GdkDevicePad</link>.</para>

</refsect1>

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

<refsect1 id="GdkDevice.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GdkDevice"><type>GdkDevice</type></link> object represents a single input device, such
as a keyboard, a mouse, a touchpad, etc.</para>
<para>See the <link linkend="GdkSeat"><type>GdkSeat</type></link> documentation for more information
about the various kinds of master and slave devices, and their
relationships.</para>

</refsect1>
<refsect1 id="GdkDevice.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-device-get-name" role="function">
<title>gdk_device_get_name&#160;()</title>
<indexterm zone="gdk-device-get-name"><primary>gdk_device_get_name</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gdk_device_get_name (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Determines the name of the device.</para>
<refsect3 id="gdk-device-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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-name.returns" role="returns">
<title>Returns</title>
<para> a name</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-vendor-id" role="function">
<title>gdk_device_get_vendor_id&#160;()</title>
<indexterm zone="gdk-device-get-vendor-id"><primary>gdk_device_get_vendor_id</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gdk_device_get_vendor_id (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the vendor ID of this device, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it.</para>
<para>This function, together with <link linkend="gdk-device-get-product-id"><function>gdk_device_get_product_id()</function></link>, can be used to eg.
compose <link linkend="GSettings"><type>GSettings</type></link> paths to store settings for this device.</para>
<informalexample><programlisting><![CDATA[
 static GSettings *
 get_device_settings (GdkDevice *device)
 {
   const gchar *vendor, *product;
   GSettings *settings;
   GdkDevice *device;
   gchar *path;

   vendor = gdk_device_get_vendor_id (device);
   product = gdk_device_get_product_id (device);

   path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product);
   settings = g_settings_new_with_path (DEVICE_SCHEMA, path);
   g_free (path);

   return settings;
 }
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gdk-device-get-vendor-id.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>device</para></entry>
<entry role="parameter_description"><para>a slave <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-vendor-id.returns" role="returns">
<title>Returns</title>
<para>the vendor ID, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-product-id" role="function">
<title>gdk_device_get_product_id&#160;()</title>
<indexterm zone="gdk-device-get-product-id"><primary>gdk_device_get_product_id</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gdk_device_get_product_id (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the product ID of this device, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it. See <link linkend="gdk-device-get-vendor-id"><function>gdk_device_get_vendor_id()</function></link> for more information.</para>
<refsect3 id="gdk-device-get-product-id.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>device</para></entry>
<entry role="parameter_description"><para>a slave <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-product-id.returns" role="returns">
<title>Returns</title>
<para>the product ID, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-source" role="function">
<title>gdk_device_get_source&#160;()</title>
<indexterm zone="gdk-device-get-source"><primary>gdk_device_get_source</primary></indexterm>
<programlisting language="C"><link linkend="GdkInputSource"><returnvalue>GdkInputSource</returnvalue></link>
gdk_device_get_source (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Determines the type of the device.</para>
<refsect3 id="gdk-device-get-source.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-source.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GdkInputSource"><type>GdkInputSource</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-set-mode" role="function">
<title>gdk_device_set_mode&#160;()</title>
<indexterm zone="gdk-device-set-mode"><primary>gdk_device_set_mode</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_set_mode (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                     <parameter><link linkend="GdkInputMode"><type>GdkInputMode</type></link> mode</parameter>);</programlisting>
<para>Sets a the mode of an input device. The mode controls if the
device is active and whether the device’s range is mapped to the
entire screen or to a single surface.</para>
<para>Note: This is only meaningful for floating devices, master devices (and
slaves connected to these) drive the pointer cursor, which is not limited
by the input mode.</para>
<refsect3 id="gdk-device-set-mode.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mode</para></entry>
<entry role="parameter_description"><para>the input mode.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-set-mode.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the mode was successfully changed.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-mode" role="function">
<title>gdk_device_get_mode&#160;()</title>
<indexterm zone="gdk-device-get-mode"><primary>gdk_device_get_mode</primary></indexterm>
<programlisting language="C"><link linkend="GdkInputMode"><returnvalue>GdkInputMode</returnvalue></link>
gdk_device_get_mode (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Determines the mode of the device.</para>
<refsect3 id="gdk-device-get-mode.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-mode.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GdkInputSource"><type>GdkInputSource</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-set-key" role="function">
<title>gdk_device_set_key&#160;()</title>
<indexterm zone="gdk-device-set-key"><primary>gdk_device_set_key</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_set_key (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                    <parameter><link linkend="guint"><type>guint</type></link> index_</parameter>,
                    <parameter><link linkend="guint"><type>guint</type></link> keyval</parameter>,
                    <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> modifiers</parameter>);</programlisting>
<para>Specifies the X key event to generate when a macro button of a device
is pressed.</para>
<refsect3 id="gdk-device-set-key.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index of the macro button to set</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>keyval</para></entry>
<entry role="parameter_description"><para>the keyval to generate</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>modifiers</para></entry>
<entry role="parameter_description"><para>the modifiers to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-key" role="function">
<title>gdk_device_get_key&#160;()</title>
<indexterm zone="gdk-device-get-key"><primary>gdk_device_get_key</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_get_key (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                    <parameter><link linkend="guint"><type>guint</type></link> index_</parameter>,
                    <parameter><link linkend="guint"><type>guint</type></link> *keyval</parameter>,
                    <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> *modifiers</parameter>);</programlisting>
<para>If <parameter>index_</parameter>
 has a valid keyval, this function will return <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
and fill in <parameter>keyval</parameter>
 and <parameter>modifiers</parameter>
 with the keyval settings.</para>
<refsect3 id="gdk-device-get-key.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index of the macro button to get.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>keyval</para></entry>
<entry role="parameter_description"><para>return value for the keyval. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>modifiers</para></entry>
<entry role="parameter_description"><para>return value for modifiers. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-key.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if keyval is set for <parameter>index</parameter>
.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-set-axis-use" role="function">
<title>gdk_device_set_axis_use&#160;()</title>
<indexterm zone="gdk-device-set-axis-use"><primary>gdk_device_set_axis_use</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_set_axis_use (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> index_</parameter>,
                         <parameter><link linkend="GdkAxisUse"><type>GdkAxisUse</type></link> use</parameter>);</programlisting>
<para>Specifies how an axis of a device is used.</para>
<refsect3 id="gdk-device-set-axis-use.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>device</para></entry>
<entry role="parameter_description"><para>a pointer <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index of the axis</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>use</para></entry>
<entry role="parameter_description"><para>specifies how the axis is used</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-axis-use" role="function">
<title>gdk_device_get_axis_use&#160;()</title>
<indexterm zone="gdk-device-get-axis-use"><primary>gdk_device_get_axis_use</primary></indexterm>
<programlisting language="C"><link linkend="GdkAxisUse"><returnvalue>GdkAxisUse</returnvalue></link>
gdk_device_get_axis_use (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> index_</parameter>);</programlisting>
<para>Returns the axis use for <parameter>index_</parameter>
.</para>
<refsect3 id="gdk-device-get-axis-use.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>device</para></entry>
<entry role="parameter_description"><para>a pointer <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index of the axis.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-axis-use.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GdkAxisUse"><type>GdkAxisUse</type></link> specifying how the axis is used.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-associated-device" role="function">
<title>gdk_device_get_associated_device&#160;()</title>
<indexterm zone="gdk-device-get-associated-device"><primary>gdk_device_get_associated_device</primary></indexterm>
<programlisting language="C"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
gdk_device_get_associated_device (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the associated device to <parameter>device</parameter>
, if <parameter>device</parameter>
 is of type
<link linkend="GDK-DEVICE-TYPE-MASTER:CAPS"><literal>GDK_DEVICE_TYPE_MASTER</literal></link>, it will return the paired pointer or
keyboard.</para>
<para>If <parameter>device</parameter>
 is of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>, it will return
the master device to which <parameter>device</parameter>
 is attached to.</para>
<para>If <parameter>device</parameter>
 is of type <link linkend="GDK-DEVICE-TYPE-FLOATING:CAPS"><literal>GDK_DEVICE_TYPE_FLOATING</literal></link>, <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be
returned, as there is no associated device.</para>
<refsect3 id="gdk-device-get-associated-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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-associated-device.returns" role="returns">
<title>Returns</title>
<para>The associated device, or
<link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-list-slave-devices" role="function">
<title>gdk_device_list_slave_devices&#160;()</title>
<indexterm zone="gdk-device-list-slave-devices"><primary>gdk_device_list_slave_devices</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gdk_device_list_slave_devices (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>If the device if of type <link linkend="GDK-DEVICE-TYPE-MASTER:CAPS"><literal>GDK_DEVICE_TYPE_MASTER</literal></link>, it will return
the list of slave devices attached to it, otherwise it will return
<link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
<refsect3 id="gdk-device-list-slave-devices.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-list-slave-devices.returns" role="returns">
<title>Returns</title>
<para>the list of slave devices, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. The list must be
freed with <link linkend="g-list-free"><function>g_list_free()</function></link>, the contents of the list are
owned by GTK+ and should not be freed. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer container</acronym>][<acronym>element-type</acronym> GdkDevice]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-device-type" role="function">
<title>gdk_device_get_device_type&#160;()</title>
<indexterm zone="gdk-device-get-device-type"><primary>gdk_device_get_device_type</primary></indexterm>
<programlisting language="C"><link linkend="GdkDeviceType"><returnvalue>GdkDeviceType</returnvalue></link>
gdk_device_get_device_type (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the device type for <parameter>device</parameter>
.</para>
<refsect3 id="gdk-device-get-device-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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-device-type.returns" role="returns">
<title>Returns</title>
<para> the <link linkend="GdkDeviceType"><type>GdkDeviceType</type></link> for <parameter>device</parameter>
.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-display" role="function">
<title>gdk_device_get_display&#160;()</title>
<indexterm zone="gdk-device-get-display"><primary>gdk_device_get_display</primary></indexterm>
<programlisting language="C"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
gdk_device_get_display (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> to which <parameter>device</parameter>
 pertains.</para>
<refsect3 id="gdk-device-get-display.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-display.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. This memory is owned
by GTK+, and must not be freed or unreffed. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-has-cursor" role="function">
<title>gdk_device_get_has_cursor&#160;()</title>
<indexterm zone="gdk-device-get-has-cursor"><primary>gdk_device_get_has_cursor</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_get_has_cursor (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Determines whether the pointer follows device motion.
This is not meaningful for keyboard devices, which don't have a pointer.</para>
<refsect3 id="gdk-device-get-has-cursor.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-has-cursor.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the pointer follows device motion</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-n-axes" role="function">
<title>gdk_device_get_n_axes&#160;()</title>
<indexterm zone="gdk-device-get-n-axes"><primary>gdk_device_get_n_axes</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gdk_device_get_n_axes (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the number of axes the device currently has.</para>
<refsect3 id="gdk-device-get-n-axes.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>device</para></entry>
<entry role="parameter_description"><para>a pointer <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-n-axes.returns" role="returns">
<title>Returns</title>
<para> the number of axes.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-n-keys" role="function">
<title>gdk_device_get_n_keys&#160;()</title>
<indexterm zone="gdk-device-get-n-keys"><primary>gdk_device_get_n_keys</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gdk_device_get_n_keys (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the number of keys the device currently has.</para>
<refsect3 id="gdk-device-get-n-keys.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-n-keys.returns" role="returns">
<title>Returns</title>
<para> the number of keys.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-axes" role="function">
<title>gdk_device_get_axes&#160;()</title>
<indexterm zone="gdk-device-get-axes"><primary>gdk_device_get_axes</primary></indexterm>
<programlisting language="C"><link linkend="GdkAxisFlags"><returnvalue>GdkAxisFlags</returnvalue></link>
gdk_device_get_axes (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the axes currently available on the device.</para>
<refsect3 id="gdk-device-get-axes.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-warp" role="function">
<title>gdk_device_warp&#160;()</title>
<indexterm zone="gdk-device-warp"><primary>gdk_device_warp</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_warp (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                 <parameter><link linkend="gint"><type>gint</type></link> x</parameter>,
                 <parameter><link linkend="gint"><type>gint</type></link> y</parameter>);</programlisting>
<para>Warps <parameter>device</parameter>
 in <parameter>display</parameter>
 to the point <parameter>x</parameter>
,<parameter>y</parameter>
,
unless the device is confined to a surface by a grab,
in which case it will be moved
as far as allowed by the grab. Warping the pointer
creates events as if the user had moved the mouse
instantaneously to the destination.</para>
<para>Note that the pointer should normally be under the
control of the user. This function was added to cover
some rare use cases like keyboard navigation support
for the color picker in the <link linkend="GtkColorSelectionDialog"><type>GtkColorSelectionDialog</type></link>.</para>
<refsect3 id="gdk-device-warp.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>device</para></entry>
<entry role="parameter_description"><para>the device to warp.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the X coordinate of the destination.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the Y coordinate of the destination.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-seat" role="function">
<title>gdk_device_get_seat&#160;()</title>
<indexterm zone="gdk-device-get-seat"><primary>gdk_device_get_seat</primary></indexterm>
<programlisting language="C"><link linkend="GdkSeat"><returnvalue>GdkSeat</returnvalue></link>&#160;*
gdk_device_get_seat (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the <link linkend="GdkSeat"><type>GdkSeat</type></link> the device belongs to.</para>
<refsect3 id="gdk-device-get-seat.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>device</para></entry>
<entry role="parameter_description"><para>A <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-seat.returns" role="returns">
<title>Returns</title>
<para>A <link linkend="GdkSeat"><type>GdkSeat</type></link>. This memory is owned by GTK+ and
must not be freed. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-grab" role="function" condition="deprecated:Use gdk_seat_grab() instead.">
<title>gdk_device_grab&#160;()</title>
<indexterm zone="gdk-device-grab" role="deprecated"><primary>gdk_device_grab</primary></indexterm>
<programlisting language="C"><link linkend="GdkGrabStatus"><returnvalue>GdkGrabStatus</returnvalue></link>
gdk_device_grab (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                 <parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                 <parameter><link linkend="GdkGrabOwnership"><type>GdkGrabOwnership</type></link> grab_ownership</parameter>,
                 <parameter><link linkend="gboolean"><type>gboolean</type></link> owner_events</parameter>,
                 <parameter><link linkend="GdkEventMask"><type>GdkEventMask</type></link> event_mask</parameter>,
                 <parameter><link linkend="GdkCursor"><type>GdkCursor</type></link> *cursor</parameter>,
                 <parameter><link linkend="guint32"><type>guint32</type></link> time_</parameter>);</programlisting>
<warning><para><literal>gdk_device_grab</literal> is deprecated and should not be used in newly-written code.</para> <para>Use <link linkend="gdk-seat-grab"><function>gdk_seat_grab()</function></link> instead.</para>
</warning>
<para>Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with <link linkend="gdk-device-ungrab"><function>gdk_device_ungrab()</function></link>,
or the surface becomes unviewable. This overrides any previous grab on the device
by this client.</para>
<para>Note that <parameter>device</parameter>
 and <parameter>surface</parameter>
 need to be on the same display.</para>
<para>Device grabs are used for operations which need complete control over the
given device events (either pointer or keyboard). For example in GTK+ this
is used for Drag and Drop operations, popup menus and such.</para>
<para>Note that if the event mask of an X window has selected both button press
and button release events, then a button press event will cause an automatic
pointer grab until the button is released. X does this automatically since
most applications expect to receive button press and release events in pairs.
It is equivalent to a pointer grab on the surface with <parameter>owner_events</parameter>
 set to
<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.</para>
<para>If you set up anything at the time you take the grab that needs to be
cleaned up when the grab ends, you should handle the <link linkend="GdkEventGrabBroken"><type>GdkEventGrabBroken</type></link>
events that are emitted when the grab ends unvoluntarily.</para>
<refsect3 id="gdk-device-grab.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>. To get the device you can use <link linkend="gtk-get-current-event-device"><function>gtk_get_current_event_device()</function></link>
or <link linkend="gdk-event-get-device"><function>gdk_event_get_device()</function></link> if the grab is in reaction to an event. Also, you can use
<link linkend="gdk-seat-get-pointer"><function>gdk_seat_get_pointer()</function></link> but only in code that isn’t triggered by a
<link linkend="GdkEvent"><type>GdkEvent</type></link> and there aren’t other means to get a meaningful <link linkend="GdkDevice"><type>GdkDevice</type></link> to operate on.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkSurface"><type>GdkSurface</type></link> which will own the grab (the grab surface)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>grab_ownership</para></entry>
<entry role="parameter_description"><para>specifies the grab ownership.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>owner_events</para></entry>
<entry role="parameter_description"><para>if <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> then all device events are reported with respect to
<parameter>surface</parameter>
and are only reported if selected by <parameter>event_mask</parameter>
. If
<link linkend="TRUE:CAPS"><literal>TRUE</literal></link> then pointer events for this application are reported
as normal, but pointer events outside this application are
reported with respect to <parameter>surface</parameter>
and only if selected by
<parameter>event_mask</parameter>
. In either mode, unreported events are discarded.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>event_mask</para></entry>
<entry role="parameter_description"><para>specifies the event mask, which is used in accordance with
<parameter>owner_events</parameter>
.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cursor</para></entry>
<entry role="parameter_description"><para>the cursor to display while the grab is active if the device is
a pointer. If this is <link linkend="NULL:CAPS"><literal>NULL</literal></link> then the normal cursors are used for
<parameter>surface</parameter>
and its descendants, and the cursor for <parameter>surface</parameter>
is used
elsewhere. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>time_</para></entry>
<entry role="parameter_description"><para>the timestamp of the event which led to this pointer grab. This
usually comes from the <link linkend="GdkEvent"><type>GdkEvent</type></link> struct, though <link linkend="GDK-CURRENT-TIME:CAPS"><literal>GDK_CURRENT_TIME</literal></link>
can be used if the time isn’t known.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-grab.returns" role="returns">
<title>Returns</title>
<para> <link linkend="GDK-GRAB-SUCCESS:CAPS"><literal>GDK_GRAB_SUCCESS</literal></link> if the grab was successful.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-ungrab" role="function" condition="deprecated:3.20. Use gdk_seat_ungrab() instead.">
<title>gdk_device_ungrab&#160;()</title>
<indexterm zone="gdk-device-ungrab" role="deprecated"><primary>gdk_device_ungrab</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_ungrab (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                   <parameter><link linkend="guint32"><type>guint32</type></link> time_</parameter>);</programlisting>
<warning><para><literal>gdk_device_ungrab</literal> has been deprecated since version 3.20. and should not be used in newly-written code.</para> <para>Use <link linkend="gdk-seat-ungrab"><function>gdk_seat_ungrab()</function></link> instead.</para>
</warning>
<para>Release any grab on <parameter>device</parameter>
.</para>
<refsect3 id="gdk-device-ungrab.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>time_</para></entry>
<entry role="parameter_description"><para>a timestap (e.g. <link linkend="GDK-CURRENT-TIME:CAPS"><literal>GDK_CURRENT_TIME</literal></link>).</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-state" role="function">
<title>gdk_device_get_state&#160;()</title>
<indexterm zone="gdk-device-get-state"><primary>gdk_device_get_state</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_get_state (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                      <parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                      <parameter><link linkend="gdouble"><type>gdouble</type></link> *axes</parameter>,
                      <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> *mask</parameter>);</programlisting>
<para>Gets the current state of a pointer device relative to <parameter>surface</parameter>
. As a slave
device’s coordinates are those of its master pointer, this
function may not be called on devices of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>,
unless there is an ongoing grab on them. See <link linkend="gdk-device-grab"><function>gdk_device_grab()</function></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-device-get-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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>axes</para></entry>
<entry role="parameter_description"><para>an array of doubles to store the values of
the axes of <parameter>device</parameter>
in, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>array</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>mask</para></entry>
<entry role="parameter_description"><para>location to store the modifiers, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>optional</acronym>][<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-position" role="function">
<title>gdk_device_get_position&#160;()</title>
<indexterm zone="gdk-device-get-position"><primary>gdk_device_get_position</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_get_position (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                         <parameter><link linkend="gint"><type>gint</type></link> *x</parameter>,
                         <parameter><link linkend="gint"><type>gint</type></link> *y</parameter>);</programlisting>
<para>Gets the current location of <parameter>device</parameter>
. As a slave device
coordinates are those of its master pointer, This function
may not be called on devices of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>,
unless there is an ongoing grab on them, see <link linkend="gdk-device-grab"><function>gdk_device_grab()</function></link>.</para>
<refsect3 id="gdk-device-get-position.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>device</para></entry>
<entry role="parameter_description"><para>pointer device to query status about.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>location to store root window X coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>location to store root window Y coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-position-double" role="function">
<title>gdk_device_get_position_double&#160;()</title>
<indexterm zone="gdk-device-get-position-double"><primary>gdk_device_get_position_double</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_get_position_double (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *x</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *y</parameter>);</programlisting>
<para>Gets the current location of <parameter>device</parameter>
 in double precision. As a slave device's
coordinates are those of its master pointer, this function
may not be called on devices of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>,
unless there is an ongoing grab on them. See <link linkend="gdk-device-grab"><function>gdk_device_grab()</function></link>.</para>
<refsect3 id="gdk-device-get-position-double.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>device</para></entry>
<entry role="parameter_description"><para>pointer device to query status about.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>location to store root window X coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>location to store root window Y coordinate of <parameter>device</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-surface-at-position" role="function">
<title>gdk_device_get_surface_at_position&#160;()</title>
<indexterm zone="gdk-device-get-surface-at-position"><primary>gdk_device_get_surface_at_position</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_device_get_surface_at_position (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> *win_x</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> *win_y</parameter>);</programlisting>
<para>Obtains the surface underneath <parameter>device</parameter>
, returning the location of the device in <parameter>win_x</parameter>
 and <parameter>win_y</parameter>
. Returns
<link linkend="NULL:CAPS"><literal>NULL</literal></link> if the surface tree under <parameter>device</parameter>
 is not known to GDK (for example, belongs to another application).</para>
<para>As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>,
unless there is an ongoing grab on them, see <link linkend="gdk-device-grab"><function>gdk_device_grab()</function></link>.</para>
<refsect3 id="gdk-device-get-surface-at-position.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>device</para></entry>
<entry role="parameter_description"><para>pointer <link linkend="GdkDevice"><type>GdkDevice</type></link> to query info to.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>win_x</para></entry>
<entry role="parameter_description"><para>return location for the X coordinate of the device location,
relative to the surface origin, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>win_y</para></entry>
<entry role="parameter_description"><para>return location for the Y coordinate of the device location,
relative to the surface origin, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-surface-at-position.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GdkSurface"><type>GdkSurface</type></link> under the
device position, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-surface-at-position-double" role="function">
<title>gdk_device_get_surface_at_position_double&#160;()</title>
<indexterm zone="gdk-device-get-surface-at-position-double"><primary>gdk_device_get_surface_at_position_double</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_device_get_surface_at_position_double
                               (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *win_x</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *win_y</parameter>);</programlisting>
<para>Obtains the surface underneath <parameter>device</parameter>
, returning the location of the device in <parameter>win_x</parameter>
 and <parameter>win_y</parameter>
 in
double precision. Returns <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the surface tree under <parameter>device</parameter>
 is not known to GDK (for example,
belongs to another application).</para>
<para>As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type <link linkend="GDK-DEVICE-TYPE-SLAVE:CAPS"><literal>GDK_DEVICE_TYPE_SLAVE</literal></link>,
unless there is an ongoing grab on them, see <link linkend="gdk-device-grab"><function>gdk_device_grab()</function></link>.</para>
<refsect3 id="gdk-device-get-surface-at-position-double.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>device</para></entry>
<entry role="parameter_description"><para>pointer <link linkend="GdkDevice"><type>GdkDevice</type></link> to query info to.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>win_x</para></entry>
<entry role="parameter_description"><para>return location for the X coordinate of the device location,
relative to the surface origin, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>win_y</para></entry>
<entry role="parameter_description"><para>return location for the Y coordinate of the device location,
relative to the surface origin, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-surface-at-position-double.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GdkSurface"><type>GdkSurface</type></link> under the
device position, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-history" role="function">
<title>gdk_device_get_history&#160;()</title>
<indexterm zone="gdk-device-get-history"><primary>gdk_device_get_history</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_get_history (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                        <parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                        <parameter><link linkend="guint32"><type>guint32</type></link> start</parameter>,
                        <parameter><link linkend="guint32"><type>guint32</type></link> stop</parameter>,
                        <parameter><link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link> ***events</parameter>,
                        <parameter><link linkend="gint"><type>gint</type></link> *n_events</parameter>);</programlisting>
<para>Obtains the motion history for a pointer device; given a starting and
ending timestamp, return all events in the motion history for
the device in the given range of time. Some windowing systems
do not support motion history, in which case, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will
be returned. (This is not distinguishable from the case where
motion history is supported and no events were found.)</para>
<para>Note that there is also <link linkend="gdk-surface-set-event-compression"><function>gdk_surface_set_event_compression()</function></link> to get
more motion events delivered directly, independent of the windowing
system.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-device-get-history.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the surface with respect to which which the event coordinates will be reported</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>starting timestamp for range of events to return</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>stop</para></entry>
<entry role="parameter_description"><para>ending timestamp for the range of events to return</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>events</para></entry>
<entry role="parameter_description"><para>location to store a newly-allocated array of <link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link>, or
<link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_events][<acronym>out</acronym>][<acronym>transfer full</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_events</para></entry>
<entry role="parameter_description"><para>location to store the length of
<parameter>events</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-history.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the windowing system supports motion history and
at least one event was found.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-free-history" role="function">
<title>gdk_device_free_history&#160;()</title>
<indexterm zone="gdk-device-free-history"><primary>gdk_device_free_history</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_device_free_history (<parameter><link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link> **events</parameter>,
                         <parameter><link linkend="gint"><type>gint</type></link> n_events</parameter>);</programlisting>
<para>Frees an array of <link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link> that was returned by <link linkend="gdk-device-get-history"><function>gdk_device_get_history()</function></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-device-free-history.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>events</para></entry>
<entry role="parameter_description"><para>an array of <link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_events]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_events</para></entry>
<entry role="parameter_description"><para>the length of the array.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-axis" role="function">
<title>gdk_device_get_axis&#160;()</title>
<indexterm zone="gdk-device-get-axis"><primary>gdk_device_get_axis</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_get_axis (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                     <parameter><link linkend="gdouble"><type>gdouble</type></link> *axes</parameter>,
                     <parameter><link linkend="GdkAxisUse"><type>GdkAxisUse</type></link> use</parameter>,
                     <parameter><link linkend="gdouble"><type>gdouble</type></link> *value</parameter>);</programlisting>
<para>Interprets an array of double as axis values for a given device,
and locates the value in the array for a given axis use.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-device-get-axis.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>axes</para></entry>
<entry role="parameter_description"><para>pointer to an array of axes. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>use</para></entry>
<entry role="parameter_description"><para>the use to look for</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>location to store the found value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-axis.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the given axis use was found, otherwise <link linkend="FALSE:CAPS"><literal>FALSE</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-list-axes" role="function">
<title>gdk_device_list_axes&#160;()</title>
<indexterm zone="gdk-device-list-axes"><primary>gdk_device_list_axes</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gdk_device_list_axes (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns a <link linkend="GList"><type>GList</type></link> of <link linkend="GdkAtoms"><type>GdkAtoms</type></link>, containing the labels for
the axes that <parameter>device</parameter>
 currently has.</para>
<refsect3 id="gdk-device-list-axes.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>device</para></entry>
<entry role="parameter_description"><para>a pointer <link linkend="GdkDevice"><type>GdkDevice</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-list-axes.returns" role="returns">
<title>Returns</title>
<para>A <link linkend="GList"><type>GList</type></link> of strings, free with <link linkend="g-list-free"><function>g_list_free()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer container</acronym>][<acronym>element-type</acronym> GdkAtom]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-axis-value" role="function">
<title>gdk_device_get_axis_value&#160;()</title>
<indexterm zone="gdk-device-get-axis-value"><primary>gdk_device_get_axis_value</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_device_get_axis_value (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> *axes</parameter>,
                           <parameter><link linkend="GdkAtom"><type>GdkAtom</type></link> axis_label</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> *value</parameter>);</programlisting>
<para>Interprets an array of double as axis values for a given device,
and locates the value in the array for a given axis label, as returned
by <link linkend="gdk-device-list-axes"><function>gdk_device_list_axes()</function></link></para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-device-get-axis-value.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>device</para></entry>
<entry role="parameter_description"><para>a pointer <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>axes</para></entry>
<entry role="parameter_description"><para>pointer to an array of axes. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>axis_label</para></entry>
<entry role="parameter_description"><para>name of the label</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>location to store the found value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-axis-value.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the given axis use was found, otherwise <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-get-last-event-surface" role="function">
<title>gdk_device_get_last_event_surface&#160;()</title>
<indexterm zone="gdk-device-get-last-event-surface"><primary>gdk_device_get_last_event_surface</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_device_get_last_event_surface (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Gets information about which surface the given pointer device is in, based on events
that have been received so far from the display server. If another application
has a pointer grab, or this application has a grab with owner_events = <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>,
<link linkend="NULL:CAPS"><literal>NULL</literal></link> may be returned even if the pointer is physically over one of this
application's surfaces.</para>
<refsect3 id="gdk-device-get-last-event-surface.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>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>, with a source other than <link linkend="GDK-SOURCE-KEYBOARD:CAPS"><literal>GDK_SOURCE_KEYBOARD</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-get-last-event-surface.returns" role="returns">
<title>Returns</title>
<para>the last surface the device. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>allow-none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-device-tool-get-serial" role="function">
<title>gdk_device_tool_get_serial&#160;()</title>
<indexterm zone="gdk-device-tool-get-serial"><primary>gdk_device_tool_get_serial</primary></indexterm>
<programlisting language="C"><link linkend="guint64"><returnvalue>guint64</returnvalue></link>
gdk_device_tool_get_serial (<parameter><link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link> *tool</parameter>);</programlisting>
<para>Gets the serial of this tool, this value can be used to identify a
physical tool (eg. a tablet pen) across program executions.</para>
<refsect3 id="gdk-device-tool-get-serial.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>tool</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-tool-get-serial.returns" role="returns">
<title>Returns</title>
<para> The serial ID for this tool</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-tool-get-tool-type" role="function">
<title>gdk_device_tool_get_tool_type&#160;()</title>
<indexterm zone="gdk-device-tool-get-tool-type"><primary>gdk_device_tool_get_tool_type</primary></indexterm>
<programlisting language="C"><link linkend="GdkDeviceToolType"><returnvalue>GdkDeviceToolType</returnvalue></link>
gdk_device_tool_get_tool_type (<parameter><link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link> *tool</parameter>);</programlisting>
<para>Gets the <link linkend="GdkDeviceToolType"><type>GdkDeviceToolType</type></link> of the tool.</para>
<refsect3 id="gdk-device-tool-get-tool-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>tool</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-tool-get-tool-type.returns" role="returns">
<title>Returns</title>
<para> The physical type for this tool. This can be used to figure out what
sort of pen is being used, such as an airbrush or a pencil.</para>
</refsect3></refsect2>
<refsect2 id="gdk-device-tool-get-hardware-id" role="function">
<title>gdk_device_tool_get_hardware_id&#160;()</title>
<indexterm zone="gdk-device-tool-get-hardware-id"><primary>gdk_device_tool_get_hardware_id</primary></indexterm>
<programlisting language="C"><link linkend="guint64"><returnvalue>guint64</returnvalue></link>
gdk_device_tool_get_hardware_id (<parameter><link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link> *tool</parameter>);</programlisting>
<para>Gets the hardware ID of this tool, or 0 if it's not known. When
non-zero, the identificator is unique for the given tool model,
meaning that two identical tools will share the same <parameter>hardware_id</parameter>
,
but will have different serial numbers (see <link linkend="gdk-device-tool-get-serial"><function>gdk_device_tool_get_serial()</function></link>).</para>
<para>This is a more concrete (and device specific) method to identify
a <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link> than <link linkend="gdk-device-tool-get-tool-type"><function>gdk_device_tool_get_tool_type()</function></link>, as a tablet
may support multiple devices with the same <link linkend="GdkDeviceToolType"><type>GdkDeviceToolType</type></link>,
but having different hardware identificators.</para>
<refsect3 id="gdk-device-tool-get-hardware-id.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>tool</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-device-tool-get-hardware-id.returns" role="returns">
<title>Returns</title>
<para> The hardware identificator of this tool.</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GdkDevice.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkDevice-struct" role="struct">
<title>GdkDevice</title>
<indexterm zone="GdkDevice-struct"><primary>GdkDevice</primary></indexterm>
<programlisting language="C">typedef struct _GdkDevice GdkDevice;</programlisting>
<para>The GdkDevice struct contains only private fields and
should not be accessed directly.</para>
</refsect2>
<refsect2 id="GdkInputSource" role="enum">
<title>enum GdkInputSource</title>
<indexterm zone="GdkInputSource"><primary>GdkInputSource</primary></indexterm>
<para>An enumeration describing the type of an input device in general terms.</para>
<refsect3 id="GdkInputSource.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="GDK-SOURCE-MOUSE:CAPS">GDK_SOURCE_MOUSE</para></entry>
<entry role="enum_member_description"><para>the device is a mouse. (This will be reported for the core
                   pointer, even if it is something else, such as a trackball.)</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-PEN:CAPS">GDK_SOURCE_PEN</para></entry>
<entry role="enum_member_description"><para>the device is a stylus of a graphics tablet or similar device.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-ERASER:CAPS">GDK_SOURCE_ERASER</para></entry>
<entry role="enum_member_description"><para>the device is an eraser. Typically, this would be the other end
                    of a stylus on a graphics tablet.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-CURSOR:CAPS">GDK_SOURCE_CURSOR</para></entry>
<entry role="enum_member_description"><para>the device is a graphics tablet “puck” or similar device.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-KEYBOARD:CAPS">GDK_SOURCE_KEYBOARD</para></entry>
<entry role="enum_member_description"><para>the device is a keyboard.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-TOUCHSCREEN:CAPS">GDK_SOURCE_TOUCHSCREEN</para></entry>
<entry role="enum_member_description"><para>the device is a direct-input touch device, such
    as a touchscreen or tablet. This device type has been added in 3.4.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-TOUCHPAD:CAPS">GDK_SOURCE_TOUCHPAD</para></entry>
<entry role="enum_member_description"><para>the device is an indirect touch device, such
    as a touchpad. This device type has been added in 3.4.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-TRACKPOINT:CAPS">GDK_SOURCE_TRACKPOINT</para></entry>
<entry role="enum_member_description"><para>the device is a trackpoint. This device type has been
    added in 3.22</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-SOURCE-TABLET-PAD:CAPS">GDK_SOURCE_TABLET_PAD</para></entry>
<entry role="enum_member_description"><para>the device is a "pad", a collection of buttons,
    rings and strips found in drawing tablets. This device type has been
    added in 3.22.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkInputMode" role="enum">
<title>enum GdkInputMode</title>
<indexterm zone="GdkInputMode"><primary>GdkInputMode</primary></indexterm>
<para>An enumeration that describes the mode of an input device.</para>
<refsect3 id="GdkInputMode.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="GDK-MODE-DISABLED:CAPS">GDK_MODE_DISABLED</para></entry>
<entry role="enum_member_description"><para>the device is disabled and will not report any events.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-MODE-SCREEN:CAPS">GDK_MODE_SCREEN</para></entry>
<entry role="enum_member_description"><para>the device is enabled. The device’s coordinate space
                  maps to the entire screen.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-MODE-SURFACE:CAPS">GDK_MODE_SURFACE</para></entry>
<entry role="enum_member_description"><para>the device is enabled. The device’s coordinate space
                  is mapped to a single surface. The manner in which this surface
                  is chosen is undefined, but it will typically be the same
                  way in which the focus surface for key events is determined.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkAxisUse" role="enum">
<title>enum GdkAxisUse</title>
<indexterm zone="GdkAxisUse"><primary>GdkAxisUse</primary></indexterm>
<para>An enumeration describing the way in which a device
axis (valuator) maps onto the predefined valuator
types that GTK+ understands.</para>
<para>Note that the X and Y axes are not really needed; pointer devices
report their location via the x/y members of events regardless. Whether
X and Y are present as axes depends on the GDK backend.</para>
<refsect3 id="GdkAxisUse.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="GDK-AXIS-IGNORE:CAPS">GDK_AXIS_IGNORE</para></entry>
<entry role="enum_member_description"><para>the axis is ignored.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-X:CAPS">GDK_AXIS_X</para></entry>
<entry role="enum_member_description"><para>the axis is used as the x axis.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-Y:CAPS">GDK_AXIS_Y</para></entry>
<entry role="enum_member_description"><para>the axis is used as the y axis.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-PRESSURE:CAPS">GDK_AXIS_PRESSURE</para></entry>
<entry role="enum_member_description"><para>the axis is used for pressure information.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-XTILT:CAPS">GDK_AXIS_XTILT</para></entry>
<entry role="enum_member_description"><para>the axis is used for x tilt information.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-YTILT:CAPS">GDK_AXIS_YTILT</para></entry>
<entry role="enum_member_description"><para>the axis is used for y tilt information.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-WHEEL:CAPS">GDK_AXIS_WHEEL</para></entry>
<entry role="enum_member_description"><para>the axis is used for wheel information.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-DISTANCE:CAPS">GDK_AXIS_DISTANCE</para></entry>
<entry role="enum_member_description"><para>the axis is used for pen/tablet distance information</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-ROTATION:CAPS">GDK_AXIS_ROTATION</para></entry>
<entry role="enum_member_description"><para>the axis is used for pen rotation information</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-SLIDER:CAPS">GDK_AXIS_SLIDER</para></entry>
<entry role="enum_member_description"><para>the axis is used for pen slider information</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-LAST:CAPS">GDK_AXIS_LAST</para></entry>
<entry role="enum_member_description"><para>a constant equal to the numerically highest axis value.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkAxisFlags" role="enum">
<title>enum GdkAxisFlags</title>
<indexterm zone="GdkAxisFlags"><primary>GdkAxisFlags</primary></indexterm>
<para>Flags describing the current capabilities of a device/tool.</para>
<refsect3 id="GdkAxisFlags.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="GDK-AXIS-FLAG-X:CAPS">GDK_AXIS_FLAG_X</para></entry>
<entry role="enum_member_description"><para>X axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-Y:CAPS">GDK_AXIS_FLAG_Y</para></entry>
<entry role="enum_member_description"><para>Y axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-PRESSURE:CAPS">GDK_AXIS_FLAG_PRESSURE</para></entry>
<entry role="enum_member_description"><para>Pressure axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-XTILT:CAPS">GDK_AXIS_FLAG_XTILT</para></entry>
<entry role="enum_member_description"><para>X tilt axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-YTILT:CAPS">GDK_AXIS_FLAG_YTILT</para></entry>
<entry role="enum_member_description"><para>Y tilt axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-WHEEL:CAPS">GDK_AXIS_FLAG_WHEEL</para></entry>
<entry role="enum_member_description"><para>Wheel axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-DISTANCE:CAPS">GDK_AXIS_FLAG_DISTANCE</para></entry>
<entry role="enum_member_description"><para>Distance axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-ROTATION:CAPS">GDK_AXIS_FLAG_ROTATION</para></entry>
<entry role="enum_member_description"><para>Z-axis rotation is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-AXIS-FLAG-SLIDER:CAPS">GDK_AXIS_FLAG_SLIDER</para></entry>
<entry role="enum_member_description"><para>Slider axis is present</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkDeviceToolType" role="enum">
<title>enum GdkDeviceToolType</title>
<indexterm zone="GdkDeviceToolType"><primary>GdkDeviceToolType</primary></indexterm>
<para>Indicates the specific type of tool being used being a tablet. Such as an
airbrush, pencil, etc.</para>
<refsect3 id="GdkDeviceToolType.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="GDK-DEVICE-TOOL-TYPE-UNKNOWN:CAPS">GDK_DEVICE_TOOL_TYPE_UNKNOWN</para></entry>
<entry role="enum_member_description"><para>Tool is of an unknown type.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-PEN:CAPS">GDK_DEVICE_TOOL_TYPE_PEN</para></entry>
<entry role="enum_member_description"><para>Tool is a standard tablet stylus.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-ERASER:CAPS">GDK_DEVICE_TOOL_TYPE_ERASER</para></entry>
<entry role="enum_member_description"><para>Tool is standard tablet eraser.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-BRUSH:CAPS">GDK_DEVICE_TOOL_TYPE_BRUSH</para></entry>
<entry role="enum_member_description"><para>Tool is a brush stylus.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-PENCIL:CAPS">GDK_DEVICE_TOOL_TYPE_PENCIL</para></entry>
<entry role="enum_member_description"><para>Tool is a pencil stylus.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-AIRBRUSH:CAPS">GDK_DEVICE_TOOL_TYPE_AIRBRUSH</para></entry>
<entry role="enum_member_description"><para>Tool is an airbrush stylus.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-MOUSE:CAPS">GDK_DEVICE_TOOL_TYPE_MOUSE</para></entry>
<entry role="enum_member_description"><para>Tool is a mouse.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TOOL-TYPE-LENS:CAPS">GDK_DEVICE_TOOL_TYPE_LENS</para></entry>
<entry role="enum_member_description"><para>Tool is a lens cursor.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkDeviceType" role="enum">
<title>enum GdkDeviceType</title>
<indexterm zone="GdkDeviceType"><primary>GdkDeviceType</primary></indexterm>
<para>Indicates the device type.</para>
<refsect3 id="GdkDeviceType.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="GDK-DEVICE-TYPE-MASTER:CAPS">GDK_DEVICE_TYPE_MASTER</para></entry>
<entry role="enum_member_description"><para>Device is a master (or virtual) device. There will
                         be an associated focus indicator on the screen.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TYPE-SLAVE:CAPS">GDK_DEVICE_TYPE_SLAVE</para></entry>
<entry role="enum_member_description"><para>Device is a slave (or physical) device.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DEVICE-TYPE-FLOATING:CAPS">GDK_DEVICE_TYPE_FLOATING</para></entry>
<entry role="enum_member_description"><para>Device is a physical device, currently not attached to
                           any seat.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkGrabOwnership" role="enum">
<title>enum GdkGrabOwnership</title>
<indexterm zone="GdkGrabOwnership"><primary>GdkGrabOwnership</primary></indexterm>
<para>Defines how device grabs interact with other devices.</para>
<refsect3 id="GdkGrabOwnership.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="GDK-OWNERSHIP-NONE:CAPS">GDK_OWNERSHIP_NONE</para></entry>
<entry role="enum_member_description"><para>All other devices’ events are allowed.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-OWNERSHIP-SURFACE:CAPS">GDK_OWNERSHIP_SURFACE</para></entry>
<entry role="enum_member_description"><para>Other devices’ events are blocked for the grab surface.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-OWNERSHIP-APPLICATION:CAPS">GDK_OWNERSHIP_APPLICATION</para></entry>
<entry role="enum_member_description"><para>Other devices’ events are blocked for the whole application.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkTimeCoord" role="struct">
<title>struct GdkTimeCoord</title>
<indexterm zone="GdkTimeCoord"><primary>GdkTimeCoord</primary></indexterm>
<programlisting language="C">struct GdkTimeCoord {
  guint32 time;
  gdouble axes[GDK_MAX_TIMECOORD_AXES];
};
</programlisting>
<para>A <link linkend="GdkTimeCoord"><type>GdkTimeCoord</type></link> stores a single event in a motion history.</para>
<refsect3 id="GdkTimeCoord.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="guint32"><type>guint32</type></link>&#160;<structfield id="GdkTimeCoord.time">time</structfield>;</para></entry>
<entry role="struct_member_description"><para>The timestamp for this event.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gdouble"><type>gdouble</type></link>&#160;<structfield id="GdkTimeCoord.axes">axes</structfield>[GDK_MAX_TIMECOORD_AXES];</para></entry>
<entry role="struct_member_description"><para>the values of the device’s axes.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>
<refsect1 id="GdkDevice.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GdkDevice--associated-device" role="property"><title>The <literal>“associated-device”</literal> property</title>
<indexterm zone="GdkDevice--associated-device"><primary>GdkDevice:associated-device</primary></indexterm>
<programlisting>  “associated-device”        <link linkend="GdkDevice"><type>GdkDevice</type></link>&#160;*</programlisting>
<para>Associated pointer or keyboard with this device, if any. Devices of type <link linkend="GDK-DEVICE-TYPE-MASTER:CAPS"><type>GDK_DEVICE_TYPE_MASTER</type></link>
always come in keyboard/pointer pairs. Other device types will have a <link linkend="NULL:CAPS"><literal>NULL</literal></link> associated device.</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GdkDevice--axes" role="property"><title>The <literal>“axes”</literal> property</title>
<indexterm zone="GdkDevice--axes"><primary>GdkDevice:axes</primary></indexterm>
<programlisting>  “axes”                     <link linkend="GdkAxisFlags"><type>GdkAxisFlags</type></link></programlisting>
<para>The axes currently available for this device.</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GdkDevice--display" role="property"><title>The <literal>“display”</literal> property</title>
<indexterm zone="GdkDevice--display"><primary>GdkDevice:display</primary></indexterm>
<programlisting>  “display”                  <link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDisplay"><type>GdkDisplay</type></link> the <link linkend="GdkDevice"><type>GdkDevice</type></link> pertains to.</para>
<para>Flags: Read / Write / Construct Only</para>
</refsect2>
<refsect2 id="GdkDevice--has-cursor" role="property"><title>The <literal>“has-cursor”</literal> property</title>
<indexterm zone="GdkDevice--has-cursor"><primary>GdkDevice:has-cursor</primary></indexterm>
<programlisting>  “has-cursor”               <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the device is represented by a cursor on the screen. Devices of type
<link linkend="GDK-DEVICE-TYPE-MASTER:CAPS"><literal>GDK_DEVICE_TYPE_MASTER</literal></link> will have <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> here.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GdkDevice--input-mode" role="property"><title>The <literal>“input-mode”</literal> property</title>
<indexterm zone="GdkDevice--input-mode"><primary>GdkDevice:input-mode</primary></indexterm>
<programlisting>  “input-mode”               <link linkend="GdkInputMode"><type>GdkInputMode</type></link></programlisting>
<para>Input mode for the device.</para><para>Flags: Read / Write</para>
<para>Default value: GDK_MODE_DISABLED</para>
</refsect2>
<refsect2 id="GdkDevice--input-source" role="property"><title>The <literal>“input-source”</literal> property</title>
<indexterm zone="GdkDevice--input-source"><primary>GdkDevice:input-source</primary></indexterm>
<programlisting>  “input-source”             <link linkend="GdkInputSource"><type>GdkInputSource</type></link></programlisting>
<para>Source type for the device.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: GDK_SOURCE_MOUSE</para>
</refsect2>
<refsect2 id="GdkDevice--n-axes" role="property"><title>The <literal>“n-axes”</literal> property</title>
<indexterm zone="GdkDevice--n-axes"><primary>GdkDevice:n-axes</primary></indexterm>
<programlisting>  “n-axes”                   <link linkend="guint"><type>guint</type></link></programlisting>
<para>Number of axes in the device.</para>
<para>Flags: Read</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GdkDevice--name" role="property"><title>The <literal>“name”</literal> property</title>
<indexterm zone="GdkDevice--name"><primary>GdkDevice:name</primary></indexterm>
<programlisting>  “name”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The device name.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GdkDevice--num-touches" role="property"><title>The <literal>“num-touches”</literal> property</title>
<indexterm zone="GdkDevice--num-touches"><primary>GdkDevice:num-touches</primary></indexterm>
<programlisting>  “num-touches”              <link linkend="guint"><type>guint</type></link></programlisting>
<para>The maximal number of concurrent touches on a touch device.
Will be 0 if the device is not a touch device or if the number
of touches is unknown.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GdkDevice--product-id" role="property"><title>The <literal>“product-id”</literal> property</title>
<indexterm zone="GdkDevice--product-id"><primary>GdkDevice:product-id</primary></indexterm>
<programlisting>  “product-id”               <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Product ID of this device, see <link linkend="gdk-device-get-product-id"><function>gdk_device_get_product_id()</function></link>.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GdkDevice--seat" role="property"><title>The <literal>“seat”</literal> property</title>
<indexterm zone="GdkDevice--seat"><primary>GdkDevice:seat</primary></indexterm>
<programlisting>  “seat”                     <link linkend="GdkSeat"><type>GdkSeat</type></link>&#160;*</programlisting>
<para><link linkend="GdkSeat"><type>GdkSeat</type></link> of this device.</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GdkDevice--tool" role="property"><title>The <literal>“tool”</literal> property</title>
<indexterm zone="GdkDevice--tool"><primary>GdkDevice:tool</primary></indexterm>
<programlisting>  “tool”                     <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link>&#160;*</programlisting>
<para>The tool that is currently used with this device.</para><para>Flags: Read</para>
</refsect2>
<refsect2 id="GdkDevice--type" role="property"><title>The <literal>“type”</literal> property</title>
<indexterm zone="GdkDevice--type"><primary>GdkDevice:type</primary></indexterm>
<programlisting>  “type”                     <link linkend="GdkDeviceType"><type>GdkDeviceType</type></link></programlisting>
<para>Device role in the device manager.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: GDK_DEVICE_TYPE_MASTER</para>
</refsect2>
<refsect2 id="GdkDevice--vendor-id" role="property"><title>The <literal>“vendor-id”</literal> property</title>
<indexterm zone="GdkDevice--vendor-id"><primary>GdkDevice:vendor-id</primary></indexterm>
<programlisting>  “vendor-id”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Vendor ID of this device, see <link linkend="gdk-device-get-vendor-id"><function>gdk_device_get_vendor_id()</function></link>.</para>
<para>Flags: Read / Write / Construct Only</para>
<para>Default value: NULL</para>
</refsect2>

</refsect1>
<refsect1 id="GdkDevice.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GdkDevice-changed" role="signal"><title>The <literal>“changed”</literal> signal</title>
<indexterm zone="GdkDevice-changed"><primary>GdkDevice::changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkDevice"><type>GdkDevice</type></link> *device,
               <link linkend="gpointer"><type>gpointer</type></link>   user_data)</programlisting>
<para>The ::changed signal is emitted either when the <link linkend="GdkDevice"><type>GdkDevice</type></link>
has changed the number of either axes or keys. For example
In X this will normally happen when the slave device routing
events through the master device changes (for example, user
switches from the USB mouse to a tablet), in that case the
master device will change to reflect the new slave device
axes and keys.</para>
<refsect3 id="GdkDevice-changed.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>device</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDevice"><type>GdkDevice</type></link> that changed.</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="GdkDevice-tool-changed" role="signal"><title>The <literal>“tool-changed”</literal> signal</title>
<indexterm zone="GdkDevice-tool-changed"><primary>GdkDevice::tool-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkDevice"><type>GdkDevice</type></link>     *device,
               <link linkend="GdkDeviceTool"><type>GdkDeviceTool</type></link> *tool,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::tool-changed signal is emitted on pen/eraser
<link linkend="GdkDevices"><type>GdkDevices</type></link> whenever tools enter or leave proximity.</para>
<refsect3 id="GdkDevice-tool-changed.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>device</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDevice"><type>GdkDevice</type></link> that changed.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tool</para></entry>
<entry role="parameter_description"><para>The new current tool</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="GdkDevice.see-also">
<title>See Also</title>
<para><link linkend="GdkSeat"><type>GdkSeat</type></link></para>

</refsect1>

</refentry>
