gtk3/docs/reference/gdk/html/GdkDevice.html
2020-02-29 14:17:40 +00:00

2188 lines
111 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdkDevice: GDK 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="GdkMonitor.html" title="GdkMonitor">
<link rel="next" href="GdkDevicePad.html" title="GtkDevicePad">
<meta name="generator" content="GTK-Doc V1.32.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GdkDevice.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GdkDevice.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_derived_interfaces">  <span class="dim">|</span> 
<a href="#GdkDevice.derived-interfaces" class="shortcut">Known Derived Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GdkDevice.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GdkDevice.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GdkMonitor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GdkDevicePad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GdkDevice"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GdkDevice.top_of_page"></a>GdkDevice</span></h2>
<p>GdkDevice — Object representing an input device</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GdkDevice.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-name" title="gdk_device_get_name ()">gdk_device_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-vendor-id" title="gdk_device_get_vendor_id ()">gdk_device_get_vendor_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-product-id" title="gdk_device_get_product_id ()">gdk_device_get_product_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkInputSource</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-source" title="gdk_device_get_source ()">gdk_device_get_source</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-set-mode" title="gdk_device_set_mode ()">gdk_device_set_mode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkInputMode</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-mode" title="gdk_device_get_mode ()">gdk_device_get_mode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-set-key" title="gdk_device_set_key ()">gdk_device_set_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-key" title="gdk_device_get_key ()">gdk_device_get_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-set-axis-use" title="gdk_device_set_axis_use ()">gdk_device_set_axis_use</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkAxisUse</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-axis-use" title="gdk_device_get_axis_use ()">gdk_device_get_axis_use</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkDevice.html" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-associated-device" title="gdk_device_get_associated_device ()">gdk_device_get_associated_device</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-list-slave-devices" title="gdk_device_list_slave_devices ()">gdk_device_list_slave_devices</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkDeviceType</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-device-type" title="gdk_device_get_device_type ()">gdk_device_get_device_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-display" title="gdk_device_get_display ()">gdk_device_get_display</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-has-cursor" title="gdk_device_get_has_cursor ()">gdk_device_get_has_cursor</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-n-axes" title="gdk_device_get_n_axes ()">gdk_device_get_n_axes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-n-keys" title="gdk_device_get_n_keys ()">gdk_device_get_n_keys</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkAxisFlags</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-axes" title="gdk_device_get_axes ()">gdk_device_get_axes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-warp" title="gdk_device_warp ()">gdk_device_warp</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkSeat.html" title="GdkSeat"><span class="returnvalue">GdkSeat</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-seat" title="gdk_device_get_seat ()">gdk_device_get_seat</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkGrabStatus</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()">gdk_device_grab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()">gdk_device_ungrab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-state" title="gdk_device_get_state ()">gdk_device_get_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-position" title="gdk_device_get_position ()">gdk_device_get_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-position-double" title="gdk_device_get_position_double ()">gdk_device_get_position_double</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-window-at-position" title="gdk_device_get_window_at_position ()">gdk_device_get_window_at_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-window-at-position-double" title="gdk_device_get_window_at_position_double ()">gdk_device_get_window_at_position_double</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-history" title="gdk_device_get_history ()">gdk_device_get_history</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-free-history" title="gdk_device_free_history ()">gdk_device_free_history</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-axis" title="gdk_device_get_axis ()">gdk_device_get_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-list-axes" title="gdk_device_list_axes ()">gdk_device_list_axes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-axis-value" title="gdk_device_get_axis_value ()">gdk_device_get_axis_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-get-last-event-window" title="gdk_device_get_last_event_window ()">gdk_device_get_last_event_window</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint64</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-tool-get-serial" title="gdk_device_tool_get_serial ()">gdk_device_tool_get_serial</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GdkDeviceToolType</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevice.html#gdk-device-tool-get-tool-type" title="gdk_device_tool_get_tool_type ()">gdk_device_tool_get_tool_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevice.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--associated-device" title="The “associated-device” property">associated-device</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">GdkAxisFlags</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--axes" title="The “axes” property">axes</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--device-manager" title="The “device-manager” property">device-manager</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--display" title="The “display” property">display</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--has-cursor" title="The “has-cursor” property">has-cursor</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">GdkInputMode</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--input-mode" title="The “input-mode” property">input-mode</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">GdkInputSource</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--input-source" title="The “input-source” property">input-source</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">guint</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--n-axes" title="The “n-axes” property">n-axes</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--name" title="The “name” property">name</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">guint</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--num-touches" title="The “num-touches” property">num-touches</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--product-id" title="The “product-id” property">product-id</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--seat" title="The “seat” property">seat</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<span class="type">GdkDeviceTool</span> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--tool" title="The “tool” property">tool</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">GdkDeviceType</span></td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--type" title="The “type” property">type</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GdkDevice.html#GdkDevice--vendor-id" title="The “vendor-id” property">vendor-id</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevice.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GdkDevice.html#GdkDevice-changed" title="The “changed” signal">changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GdkDevice.html#GdkDevice-tool-changed" title="The “tool-changed” signal">tool-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevice.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name">GdkDevice</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkInputSource</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkInputMode</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkAxisUse</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkAxisFlags</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkDeviceToolType</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkDeviceType</td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name">GdkGrabOwnership</td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name">GdkTimeCoord</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevice.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> GdkDevice
</pre>
</div>
<div class="refsect1">
<a name="GdkDevice.derived-interfaces"></a><h2>Known Derived Interfaces</h2>
<p>
GdkDevice is required by
<a class="link" href="GdkDevicePad.html" title="GtkDevicePad">GdkDevicePad</a>.</p>
</div>
<div class="refsect1">
<a name="GdkDevice.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GdkDevice.description"></a><h2>Description</h2>
<p>The <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> object represents a single input device, such
as a keyboard, a mouse, a touchpad, etc.</p>
<p>See the <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> documentation for more information
about the various kinds of master and slave devices, and their
relationships.</p>
</div>
<div class="refsect1">
<a name="GdkDevice.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-device-get-name"></a><h3>gdk_device_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gdk_device_get_name (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Determines the name of the device.</p>
<div class="refsect3">
<a name="gdk-device-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-name.returns"></a><h4>Returns</h4>
<p> a name</p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-vendor-id"></a><h3>gdk_device_get_vendor_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gdk_device_get_vendor_id (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the vendor ID of this device, or <code class="literal">NULL</code> if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it.</p>
<p>This function, together with <a class="link" href="GdkDevice.html#gdk-device-get-product-id" title="gdk_device_get_product_id ()"><code class="function">gdk_device_get_product_id()</code></a>, can be used to eg.
compose <span class="type">GSettings</span> paths to store settings for this device.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="k">static</span> <span class="n">GSettings</span> <span class="o">*</span>
<span class="nf">get_device_settings</span> <span class="p">(</span><span class="n">GdkDevice</span> <span class="o">*</span><span class="n">device</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">vendor</span><span class="p">,</span> <span class="o">*</span><span class="n">product</span><span class="p">;</span>
<span class="n">GSettings</span> <span class="o">*</span><span class="n">settings</span><span class="p">;</span>
<span class="n">GdkDevice</span> <span class="o">*</span><span class="n">device</span><span class="p">;</span>
<span class="n">gchar</span> <span class="o">*</span><span class="n">path</span><span class="p">;</span>
<span class="n">vendor</span> <span class="o">=</span> <span class="n">gdk_device_get_vendor_id</span> <span class="p">(</span><span class="n">device</span><span class="p">);</span>
<span class="n">product</span> <span class="o">=</span> <span class="n">gdk_device_get_product_id</span> <span class="p">(</span><span class="n">device</span><span class="p">);</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">g_strdup_printf</span> <span class="p">(</span><span class="s">&quot;/org/example/app/devices/%s:%s/&quot;</span><span class="p">,</span> <span class="n">vendor</span><span class="p">,</span> <span class="n">product</span><span class="p">);</span>
<span class="n">settings</span> <span class="o">=</span> <span class="n">g_settings_new_with_path</span> <span class="p">(</span><span class="n">DEVICE_SCHEMA</span><span class="p">,</span> <span class="n">path</span><span class="p">);</span>
<span class="n">g_free</span> <span class="p">(</span><span class="n">path</span><span class="p">);</span>
<span class="k">return</span> <span class="n">settings</span><span class="p">;</span>
<span class="p">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="gdk-device-get-vendor-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a slave <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-vendor-id.returns"></a><h4>Returns</h4>
<p>the vendor ID, or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-product-id"></a><h3>gdk_device_get_product_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gdk_device_get_product_id (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the product ID of this device, or <code class="literal">NULL</code> if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it. See <a class="link" href="GdkDevice.html#gdk-device-get-vendor-id" title="gdk_device_get_vendor_id ()"><code class="function">gdk_device_get_vendor_id()</code></a> for more information.</p>
<div class="refsect3">
<a name="gdk-device-get-product-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a slave <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-product-id.returns"></a><h4>Returns</h4>
<p>the product ID, or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-source"></a><h3>gdk_device_get_source ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkInputSource</span>
gdk_device_get_source (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Determines the type of the device.</p>
<div class="refsect3">
<a name="gdk-device-get-source.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-source.returns"></a><h4>Returns</h4>
<p> a <span class="type">GdkInputSource</span></p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-mode"></a><h3>gdk_device_set_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_set_mode (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">GdkInputMode</span> mode</code></em>);</pre>
<p>Sets a the mode of an input device. The mode controls if the
device is active and whether the devices range is mapped to the
entire screen or to a single window.</p>
<p>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.</p>
<div class="refsect3">
<a name="gdk-device-set-mode.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>the input mode.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-set-mode.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the mode was successfully changed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-mode"></a><h3>gdk_device_get_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkInputMode</span>
gdk_device_get_mode (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Determines the mode of the device.</p>
<div class="refsect3">
<a name="gdk-device-get-mode.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-mode.returns"></a><h4>Returns</h4>
<p> a <span class="type">GdkInputSource</span></p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-key"></a><h3>gdk_device_set_key ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_set_key (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">guint</span> index_</code></em>,
<em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
<em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>);</pre>
<p>Specifies the X key event to generate when a macro button of a device
is pressed.</p>
<div class="refsect3">
<a name="gdk-device-set-key.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the macro button to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>the keyval to generate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>the modifiers to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-key"></a><h3>gdk_device_get_key ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_get_key (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">guint</span> index_</code></em>,
<em class="parameter"><code><span class="type">guint</span> *keyval</code></em>,
<em class="parameter"><code><span class="type">GdkModifierType</span> *modifiers</code></em>);</pre>
<p>If <em class="parameter"><code>index_</code></em>
has a valid keyval, this function will return <code class="literal">TRUE</code>
and fill in <em class="parameter"><code>keyval</code></em>
and <em class="parameter"><code>modifiers</code></em>
with the keyval settings.</p>
<div class="refsect3">
<a name="gdk-device-get-key.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the macro button to get.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>return value for the keyval. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>return value for modifiers. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-key.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if keyval is set for <em class="parameter"><code>index</code></em>
.</p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-axis-use"></a><h3>gdk_device_set_axis_use ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_set_axis_use (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">guint</span> index_</code></em>,
<em class="parameter"><code><span class="type">GdkAxisUse</span> use</code></em>);</pre>
<p>Specifies how an axis of a device is used.</p>
<div class="refsect3">
<a name="gdk-device-set-axis-use.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the axis</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use</p></td>
<td class="parameter_description"><p>specifies how the axis is used</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis-use"></a><h3>gdk_device_get_axis_use ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkAxisUse</span>
gdk_device_get_axis_use (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">guint</span> index_</code></em>);</pre>
<p>Returns the axis use for <em class="parameter"><code>index_</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-get-axis-use.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the axis.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-axis-use.returns"></a><h4>Returns</h4>
<p> a <span class="type">GdkAxisUse</span> specifying how the axis is used.</p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-associated-device"></a><h3>gdk_device_get_associated_device ()</h3>
<pre class="programlisting"><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *
gdk_device_get_associated_device (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the associated device to <em class="parameter"><code>device</code></em>
, if <em class="parameter"><code>device</code></em>
is of type
<code class="literal">GDK_DEVICE_TYPE_MASTER</code>, it will return the paired pointer or
keyboard.</p>
<p>If <em class="parameter"><code>device</code></em>
is of type <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>, it will return
the master device to which <em class="parameter"><code>device</code></em>
is attached to.</p>
<p>If <em class="parameter"><code>device</code></em>
is of type <code class="literal">GDK_DEVICE_TYPE_FLOATING</code>, <code class="literal">NULL</code> will be
returned, as there is no associated device.</p>
<div class="refsect3">
<a name="gdk-device-get-associated-device.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-associated-device.returns"></a><h4>Returns</h4>
<p>The associated device, or
<code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-list-slave-devices"></a><h3>gdk_device_list_slave_devices ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gdk_device_list_slave_devices (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>If the device if of type <code class="literal">GDK_DEVICE_TYPE_MASTER</code>, it will return
the list of slave devices attached to it, otherwise it will return
<code class="literal">NULL</code></p>
<div class="refsect3">
<a name="gdk-device-list-slave-devices.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-list-slave-devices.returns"></a><h4>Returns</h4>
<p>the list of slave devices, or <code class="literal">NULL</code>. The list must be
freed with <code class="function">g_list_free()</code>, the contents of the list are
owned by GTK+ and should not be freed. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkDevice]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-device-type"></a><h3>gdk_device_get_device_type ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkDeviceType</span>
gdk_device_get_device_type (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the device type for <em class="parameter"><code>device</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-get-device-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-device-type.returns"></a><h4>Returns</h4>
<p> the <span class="type">GdkDeviceType</span> for <em class="parameter"><code>device</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-display"></a><h3>gdk_device_get_display ()</h3>
<pre class="programlisting"><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
gdk_device_get_display (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> to which <em class="parameter"><code>device</code></em>
pertains.</p>
<div class="refsect3">
<a name="gdk-device-get-display.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-display.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>. This memory is owned
by GTK+, and must not be freed or unreffed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-has-cursor"></a><h3>gdk_device_get_has_cursor ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_get_has_cursor (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Determines whether the pointer follows device motion.
This is not meaningful for keyboard devices, which don't have a pointer.</p>
<div class="refsect3">
<a name="gdk-device-get-has-cursor.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-has-cursor.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the pointer follows device motion</p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-n-axes"></a><h3>gdk_device_get_n_axes ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_get_n_axes (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the number of axes the device currently has.</p>
<div class="refsect3">
<a name="gdk-device-get-n-axes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-n-axes.returns"></a><h4>Returns</h4>
<p> the number of axes.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-n-keys"></a><h3>gdk_device_get_n_keys ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_get_n_keys (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the number of keys the device currently has.</p>
<div class="refsect3">
<a name="gdk-device-get-n-keys.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-n-keys.returns"></a><h4>Returns</h4>
<p> the number of keys.</p>
</div>
<p class="since">Since: 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axes"></a><h3>gdk_device_get_axes ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkAxisFlags</span>
gdk_device_get_axes (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the axes currently available on the device.</p>
<div class="refsect3">
<a name="gdk-device-get-axes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-warp"></a><h3>gdk_device_warp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_warp (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>);</pre>
<p>Warps <em class="parameter"><code>device</code></em>
in <em class="parameter"><code>display</code></em>
to the point <em class="parameter"><code>x</code></em>
,<em class="parameter"><code>y</code></em>
on
the screen <em class="parameter"><code>screen</code></em>
, unless the device is confined
to a window 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.</p>
<p>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 <span class="type">GtkColorSelectionDialog</span>.</p>
<div class="refsect3">
<a name="gdk-device-warp.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the device to warp.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>the screen to warp <em class="parameter"><code>device</code></em>
to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>the X coordinate of the destination.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>the Y coordinate of the destination.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-seat"></a><h3>gdk_device_get_seat ()</h3>
<pre class="programlisting"><a class="link" href="GdkSeat.html" title="GdkSeat"><span class="returnvalue">GdkSeat</span></a> *
gdk_device_get_seat (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns the <a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a> the device belongs to.</p>
<div class="refsect3">
<a name="gdk-device-get-seat.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>A <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-seat.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a>. This memory is owned by GTK+ and
must not be freed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-grab"></a><h3>gdk_device_grab ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkGrabStatus</span>
gdk_device_grab (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
<em class="parameter"><code><span class="type">GdkGrabOwnership</span> grab_ownership</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> owner_events</code></em>,
<em class="parameter"><code><span class="type">GdkEventMask</span> event_mask</code></em>,
<em class="parameter"><code><a class="link" href="gdk3-Cursors.html#GdkCursor"><span class="type">GdkCursor</span></a> *cursor</code></em>,
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_device_grab</code> has been deprecated since version 3.20. and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkSeat.html#gdk-seat-grab" title="gdk_seat_grab ()"><code class="function">gdk_seat_grab()</code></a> instead.</p>
</div>
<p>Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with <a class="link" href="GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()"><code class="function">gdk_device_ungrab()</code></a>,
or the window becomes unviewable. This overrides any previous grab on the device
by this client.</p>
<p>Note that <em class="parameter"><code>device</code></em>
and <em class="parameter"><code>window</code></em>
need to be on the same display.</p>
<p>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.</p>
<p>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 window with <em class="parameter"><code>owner_events</code></em>
set to
<code class="literal">TRUE</code>.</p>
<p>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 <span class="type">GdkEventGrabBroken</span>
events that are emitted when the grab ends unvoluntarily.</p>
<div class="refsect3">
<a name="gdk-device-grab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>. To get the device you can use <a href="https://developer.gnome.org/gtk4/gtk4-General.html#gtk-get-current-event-device"><code class="function">gtk_get_current_event_device()</code></a>
or <a class="link" href="gdk3-Events.html#gdk-event-get-device" title="gdk_event_get_device ()"><code class="function">gdk_event_get_device()</code></a> if the grab is in reaction to an event. Also, you can use
<a class="link" href="GdkDeviceManager.html#gdk-device-manager-get-client-pointer" title="gdk_device_manager_get_client_pointer ()"><code class="function">gdk_device_manager_get_client_pointer()</code></a> but only in code that isnt triggered by a
<span class="type">GdkEvent</span> and there arent other means to get a meaningful <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> to operate on.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> which will own the grab (the grab window)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>grab_ownership</p></td>
<td class="parameter_description"><p>specifies the grab ownership.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>owner_events</p></td>
<td class="parameter_description"><p>if <code class="literal">FALSE</code> then all device events are reported with respect to
<em class="parameter"><code>window</code></em>
and are only reported if selected by <em class="parameter"><code>event_mask</code></em>
. If
<code class="literal">TRUE</code> then pointer events for this application are reported
as normal, but pointer events outside this application are
reported with respect to <em class="parameter"><code>window</code></em>
and only if selected by
<em class="parameter"><code>event_mask</code></em>
. In either mode, unreported events are discarded.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event_mask</p></td>
<td class="parameter_description"><p>specifies the event mask, which is used in accordance with
<em class="parameter"><code>owner_events</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cursor</p></td>
<td class="parameter_description"><p>the cursor to display while the grab is active if the device is
a pointer. If this is <code class="literal">NULL</code> then the normal cursors are used for
<em class="parameter"><code>window</code></em>
and its descendants, and the cursor for <em class="parameter"><code>window</code></em>
is used
elsewhere. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>the timestamp of the event which led to this pointer grab. This
usually comes from the <span class="type">GdkEvent</span> struct, though <code class="literal">GDK_CURRENT_TIME</code>
can be used if the time isnt known.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-grab.returns"></a><h4>Returns</h4>
<p> <code class="literal">GDK_GRAB_SUCCESS</code> if the grab was successful.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-ungrab"></a><h3>gdk_device_ungrab ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_ungrab (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_device_ungrab</code> has been deprecated since version 3.20. and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkSeat.html#gdk-seat-ungrab" title="gdk_seat_ungrab ()"><code class="function">gdk_seat_ungrab()</code></a> instead.</p>
</div>
<p>Release any grab on <em class="parameter"><code>device</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-ungrab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>a timestap (e.g. <code class="literal">GDK_CURRENT_TIME</code>).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-state"></a><h3>gdk_device_get_state ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_get_state (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *axes</code></em>,
<em class="parameter"><code><span class="type">GdkModifierType</span> *mask</code></em>);</pre>
<p>Gets the current state of a pointer device relative to <em class="parameter"><code>window</code></em>
. As a slave
devices coordinates are those of its master pointer, this
function may not be called on devices of type <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>,
unless there is an ongoing grab on them. See <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-device-get-state.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>axes</p></td>
<td class="parameter_description"><p>an array of doubles to store the values of
the axes of <em class="parameter"><code>device</code></em>
in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>location to store the modifiers, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-position"></a><h3>gdk_device_get_position ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_get_position (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> **screen</code></em>,
<em class="parameter"><code><span class="type">gint</span> *x</code></em>,
<em class="parameter"><code><span class="type">gint</span> *y</code></em>);</pre>
<p>Gets the current location of <em class="parameter"><code>device</code></em>
. As a slave device
coordinates are those of its master pointer, This function
may not be called on devices of type <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>,
unless there is an ongoing grab on them, see <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.</p>
<div class="refsect3">
<a name="gdk-device-get-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>pointer device to query status about.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>location to store the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
the <em class="parameter"><code>device</code></em>
is on, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>location to store root window X coordinate of <em class="parameter"><code>device</code></em>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>location to store root window Y coordinate of <em class="parameter"><code>device</code></em>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-position-double"></a><h3>gdk_device_get_position_double ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_get_position_double (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> **screen</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *x</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *y</code></em>);</pre>
<p>Gets the current location of <em class="parameter"><code>device</code></em>
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 <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>,
unless there is an ongoing grab on them. See <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.</p>
<div class="refsect3">
<a name="gdk-device-get-position-double.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>pointer device to query status about.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>location to store the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
the <em class="parameter"><code>device</code></em>
is on, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>location to store root window X coordinate of <em class="parameter"><code>device</code></em>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>location to store root window Y coordinate of <em class="parameter"><code>device</code></em>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-window-at-position"></a><h3>gdk_device_get_window_at_position ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
gdk_device_get_window_at_position (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">gint</span> *win_x</code></em>,
<em class="parameter"><code><span class="type">gint</span> *win_y</code></em>);</pre>
<p>Obtains the window underneath <em class="parameter"><code>device</code></em>
, returning the location of the device in <em class="parameter"><code>win_x</code></em>
and <em class="parameter"><code>win_y</code></em>
. Returns
<code class="literal">NULL</code> if the window tree under <em class="parameter"><code>device</code></em>
is not known to GDK (for example, belongs to another application).</p>
<p>As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>,
unless there is an ongoing grab on them, see <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.</p>
<div class="refsect3">
<a name="gdk-device-get-window-at-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> to query info to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>win_x</p></td>
<td class="parameter_description"><p>return location for the X coordinate of the device location,
relative to the window origin, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>win_y</p></td>
<td class="parameter_description"><p>return location for the Y coordinate of the device location,
relative to the window origin, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-window-at-position.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> under the
device position, or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-window-at-position-double"></a><h3>gdk_device_get_window_at_position_double ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
gdk_device_get_window_at_position_double
(<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *win_x</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *win_y</code></em>);</pre>
<p>Obtains the window underneath <em class="parameter"><code>device</code></em>
, returning the location of the device in <em class="parameter"><code>win_x</code></em>
and <em class="parameter"><code>win_y</code></em>
in
double precision. Returns <code class="literal">NULL</code> if the window tree under <em class="parameter"><code>device</code></em>
is not known to GDK (for example,
belongs to another application).</p>
<p>As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type <code class="literal">GDK_DEVICE_TYPE_SLAVE</code>,
unless there is an ongoing grab on them, see <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.</p>
<div class="refsect3">
<a name="gdk-device-get-window-at-position-double.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> to query info to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>win_x</p></td>
<td class="parameter_description"><p>return location for the X coordinate of the device location,
relative to the window origin, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>win_y</p></td>
<td class="parameter_description"><p>return location for the Y coordinate of the device location,
relative to the window origin, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-window-at-position-double.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> under the
device position, or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-history"></a><h3>gdk_device_get_history ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_get_history (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
<em class="parameter"><code><span class="type">guint32</span> start</code></em>,
<em class="parameter"><code><span class="type">guint32</span> stop</code></em>,
<em class="parameter"><code><span class="type">GdkTimeCoord</span> ***events</code></em>,
<em class="parameter"><code><span class="type">gint</span> *n_events</code></em>);</pre>
<p>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, <code class="literal">FALSE</code> will
be returned. (This is not distinguishable from the case where
motion history is supported and no events were found.)</p>
<p>Note that there is also <a class="link" href="gdk3-Windows.html#gdk-window-set-event-compression" title="gdk_window_set_event_compression ()"><code class="function">gdk_window_set_event_compression()</code></a> to get
more motion events delivered directly, independent of the windowing
system.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-device-get-history.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>the window with respect to which which the event coordinates will be reported</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>starting timestamp for range of events to return</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stop</p></td>
<td class="parameter_description"><p>ending timestamp for the range of events to return</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>events</p></td>
<td class="parameter_description"><p>location to store a newly-allocated array of <span class="type">GdkTimeCoord</span>, or
<code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_events][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>n_events</p></td>
<td class="parameter_description"><p>location to store the length of
<em class="parameter"><code>events</code></em>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-history.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the windowing system supports motion history and
at least one event was found.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-free-history"></a><h3>gdk_device_free_history ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_device_free_history (<em class="parameter"><code><span class="type">GdkTimeCoord</span> **events</code></em>,
<em class="parameter"><code><span class="type">gint</span> n_events</code></em>);</pre>
<p>Frees an array of <span class="type">GdkTimeCoord</span> that was returned by <a class="link" href="GdkDevice.html#gdk-device-get-history" title="gdk_device_get_history ()"><code class="function">gdk_device_get_history()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-device-free-history.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>events</p></td>
<td class="parameter_description"><p>an array of <span class="type">GdkTimeCoord</span>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_events]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>n_events</p></td>
<td class="parameter_description"><p>the length of the array.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis"></a><h3>gdk_device_get_axis ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_get_axis (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *axes</code></em>,
<em class="parameter"><code><span class="type">GdkAxisUse</span> use</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *value</code></em>);</pre>
<p>Interprets an array of double as axis values for a given device,
and locates the value in the array for a given axis use.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-device-get-axis.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>axes</p></td>
<td class="parameter_description"><p>pointer to an array of axes. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>use</p></td>
<td class="parameter_description"><p>the use to look for</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>location to store the found value. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-axis.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the given axis use was found, otherwise <code class="literal">FALSE</code></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-list-axes"></a><h3>gdk_device_list_axes ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gdk_device_list_axes (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Returns a <span class="type">GList</span> of <span class="type">GdkAtoms</span>, containing the labels for
the axes that <em class="parameter"><code>device</code></em>
currently has.</p>
<div class="refsect3">
<a name="gdk-device-list-axes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-list-axes.returns"></a><h4>Returns</h4>
<p>A <span class="type">GList</span> of <span class="type">GdkAtoms</span>, free with <code class="function">g_list_free()</code>. </p>
<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkAtom]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis-value"></a><h3>gdk_device_get_axis_value ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_device_get_axis_value (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *axes</code></em>,
<em class="parameter"><code><span class="type">GdkAtom</span> axis_label</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *value</code></em>);</pre>
<p>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 <a class="link" href="GdkDevice.html#gdk-device-list-axes" title="gdk_device_list_axes ()"><code class="function">gdk_device_list_axes()</code></a></p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-device-get-axis-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a pointer <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>axes</p></td>
<td class="parameter_description"><p>pointer to an array of axes. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>axis_label</p></td>
<td class="parameter_description"><p><span class="type">GdkAtom</span> with the axis label.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>location to store the found value. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-axis-value.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the given axis use was found, otherwise <code class="literal">FALSE</code>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-last-event-window"></a><h3>gdk_device_get_last_event_window ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
gdk_device_get_last_event_window (<em class="parameter"><code><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>Gets information about which window 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 = <code class="literal">FALSE</code>,
<code class="literal">NULL</code> may be returned even if the pointer is physically over one of this
application's windows.</p>
<div class="refsect3">
<a name="gdk-device-get-last-event-window.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>, with a source other than <code class="literal">GDK_SOURCE_KEYBOARD</code></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-get-last-event-window.returns"></a><h4>Returns</h4>
<p>the last window the device. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-tool-get-serial"></a><h3>gdk_device_tool_get_serial ()</h3>
<pre class="programlisting"><span class="returnvalue">guint64</span>
gdk_device_tool_get_serial (<em class="parameter"><code><span class="type">GdkDeviceTool</span> *tool</code></em>);</pre>
<p>Gets the serial of this tool, this value can be used to identify a
physical tool (eg. a tablet pen) across program executions.</p>
<div class="refsect3">
<a name="gdk-device-tool-get-serial.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>tool</p></td>
<td class="parameter_description"><p>a <span class="type">GdkDeviceTool</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-tool-get-serial.returns"></a><h4>Returns</h4>
<p> The serial ID for this tool</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-tool-get-tool-type"></a><h3>gdk_device_tool_get_tool_type ()</h3>
<pre class="programlisting"><span class="returnvalue">GdkDeviceToolType</span>
gdk_device_tool_get_tool_type (<em class="parameter"><code><span class="type">GdkDeviceTool</span> *tool</code></em>);</pre>
<p>Gets the <span class="type">GdkDeviceToolType</span> of the tool.</p>
<div class="refsect3">
<a name="gdk-device-tool-get-tool-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>tool</p></td>
<td class="parameter_description"><p>a <span class="type">GdkDeviceTool</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-tool-get-tool-type.returns"></a><h4>Returns</h4>
<p> 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.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GdkDevice.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GdkDevice--associated-device"></a><h3>The <code class="literal">“associated-device”</code> property</h3>
<pre class="programlisting"> “associated-device” <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *</pre>
<p>Associated pointer or keyboard with this device, if any. Devices of type <span class="type">GDK_DEVICE_TYPE_MASTER</span>
always come in keyboard/pointer pairs. Other device types will have a <code class="literal">NULL</code> associated device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--axes"></a><h3>The <code class="literal">“axes”</code> property</h3>
<pre class="programlisting"> “axes” <span class="type">GdkAxisFlags</span></pre>
<p>The axes currently available for this device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read</p>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--device-manager"></a><h3>The <code class="literal">“device-manager”</code> property</h3>
<pre class="programlisting"> “device-manager” <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *</pre>
<p>The <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> pertains to.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--display"></a><h3>The <code class="literal">“display”</code> property</h3>
<pre class="programlisting"> “display” <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</pre>
<p>The <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> pertains to.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--has-cursor"></a><h3>The <code class="literal">“has-cursor”</code> property</h3>
<pre class="programlisting"> “has-cursor” <span class="type">gboolean</span></pre>
<p>Whether the device is represented by a cursor on the screen. Devices of type
<code class="literal">GDK_DEVICE_TYPE_MASTER</code> will have <code class="literal">TRUE</code> here.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--input-mode"></a><h3>The <code class="literal">“input-mode”</code> property</h3>
<pre class="programlisting"> “input-mode” <span class="type">GdkInputMode</span></pre>
<p>Input mode for the device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write</p>
<p>Default value: GDK_MODE_DISABLED</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--input-source"></a><h3>The <code class="literal">“input-source”</code> property</h3>
<pre class="programlisting"> “input-source” <span class="type">GdkInputSource</span></pre>
<p>Source type for the device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: GDK_SOURCE_MOUSE</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--n-axes"></a><h3>The <code class="literal">“n-axes”</code> property</h3>
<pre class="programlisting"> “n-axes” <span class="type">guint</span></pre>
<p>Number of axes in the device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read</p>
<p>Default value: 0</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--name"></a><h3>The <code class="literal">“name”</code> property</h3>
<pre class="programlisting"> “name” <span class="type">gchar</span> *</pre>
<p>The device name.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--num-touches"></a><h3>The <code class="literal">“num-touches”</code> property</h3>
<pre class="programlisting"> “num-touches” <span class="type">guint</span></pre>
<p>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.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: 0</p>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--product-id"></a><h3>The <code class="literal">“product-id”</code> property</h3>
<pre class="programlisting"> “product-id” <span class="type">gchar</span> *</pre>
<p>Product ID of this device, see <a class="link" href="GdkDevice.html#gdk-device-get-product-id" title="gdk_device_get_product_id ()"><code class="function">gdk_device_get_product_id()</code></a>.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--seat"></a><h3>The <code class="literal">“seat”</code> property</h3>
<pre class="programlisting"> “seat” <a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a> *</pre>
<p><a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a> of this device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write</p>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--tool"></a><h3>The <code class="literal">“tool”</code> property</h3>
<pre class="programlisting"> “tool” <span class="type">GdkDeviceTool</span> *</pre>
<p>The tool that is currently used with this device.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--type"></a><h3>The <code class="literal">“type”</code> property</h3>
<pre class="programlisting"> “type” <span class="type">GdkDeviceType</span></pre>
<p>Device role in the device manager.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: GDK_DEVICE_TYPE_MASTER</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice--vendor-id"></a><h3>The <code class="literal">“vendor-id”</code> property</h3>
<pre class="programlisting"> “vendor-id” <span class="type">gchar</span> *</pre>
<p>Vendor ID of this device, see <a class="link" href="GdkDevice.html#gdk-device-get-vendor-id" title="gdk_device_get_vendor_id ()"><code class="function">gdk_device_get_vendor_id()</code></a>.</p>
<p>Owner: GdkDevice</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
</div>
<div class="refsect1">
<a name="GdkDevice.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GdkDevice-changed"></a><h3>The <code class="literal">“changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device,
<span class="type">gpointer</span> user_data)</pre>
<p>The ::changed signal is emitted either when the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>
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.</p>
<div class="refsect3">
<a name="GdkDevice-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> that changed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevice-tool-changed"></a><h3>The <code class="literal">“tool-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> *device,
<span class="type">GdkDeviceTool</span> *tool,
<span class="type">gpointer</span> user_data)</pre>
<p>The ::tool-changed signal is emitted on pen/eraser
<span class="type">GdkDevices</span> whenever tools enter or leave proximity.</p>
<div class="refsect3">
<a name="GdkDevice-tool-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> that changed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tool</p></td>
<td class="parameter_description"><p>The new current tool</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GdkDevice.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32.1</div>
</body>
</html>