File: class-gdkdevice.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (126 lines) | stat: -rw-r--r-- 27,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.gdk.Device</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="previous" href="class-gdkcursor.html" title="gtk.gdk.Cursor"><link rel="next" href="class-gdkdisplay.html" title="gtk.gdk.Display"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.Device</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkcursor.html">Prev</a></td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gdkdisplay.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gdkdevice"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.gdk.Device</h2><p>gtk.gdk.Device &#8212; an object for supporting input devices</p></div><div class="refsect1" lang="en"><a name="id3165949"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Device</span></span>(<span class="ooclass"><span class="classname"><a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--set-source" title="gtk.gdk.Device.set_source">set_source</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>source</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--set-mode" title="gtk.gdk.Device.set_mode">set_mode</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mode</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--set-key" title="gtk.gdk.Device.set_key">set_key</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>keyval</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>modifiers</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--set-axis-use" title="gtk.gdk.Device.set_axis_use">set_axis_use</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>use</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--get-state" title="gtk.gdk.Device.get_state">get_state</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--get-history" title="gtk.gdk.Device.get_history">get_history</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>stop</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#method-gdkdevice--get-axis" title="gtk.gdk.Device.get_axis">get_axis</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>axes</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>use</tt></b></span></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>

<code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#function-gdk--devices-list" title="gtk.gdk.devices_list">gtk.gdk.devices_list</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gdkdevice.html#function-gdk--device-get-core-pointer" title="gtk.gdk.device_get_core_pointer">gtk.gdk.device_get_core_pointer</a></span>(<span class="methodparam"></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3297592"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gdkdevice.html" title="gtk.gdk.Device">gtk.gdk.Device</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3297553"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"axes"</td><td valign="top">Read</td><td valign="top">a tuple containing axes information. Each axes is
described by a tuple containing: use information (one of:
<tt class="literal">gtk.gdk.AXIS_IGNORE</tt>, <tt class="literal">gtk.gdk.AXIS_X</tt>,
<tt class="literal">gtk.gdk.AXIS_Y</tt>, <tt class="literal">gtk.gdk.AXIS_PRESSURE</tt>,
<tt class="literal">gtk.gdk.AXIS_XTILT</tt>,
<tt class="literal">gtk.gdk.AXIS_YTILT</tt>,
<tt class="literal">gtk.gdk.AXIS_WHEEL</tt>,
<tt class="literal">gtk.gdk.AXIS_LAST</tt>), the minimum and maximum axes
values.</td></tr><tr valign="top"><td valign="top">"has_cursor"</td><td valign="top">Read</td><td valign="top">if <tt class="literal">TRUE</tt> the pointer follows device
motion.</td></tr><tr valign="top"><td valign="top">"keys"</td><td valign="top">Read</td><td valign="top">a tuple describing the mapped macro buttons. Each macro
button is described by a tuple containing: a key value output when the macro
button is pressed and a set of modifiers output with the key value.</td></tr><tr valign="top"><td valign="top">"mode"</td><td valign="top">Read</td><td valign="top">the mode of this device - one of:
<tt class="literal">gtk.gdk.MODE_DISABLED</tt>,
<tt class="literal">gtk.gdk.MODE_SCREEN</tt>,
<tt class="literal">gtk.gdk.MODE_WINDOW</tt></td></tr><tr valign="top"><td valign="top">"name"</td><td valign="top">Read</td><td valign="top">the name of this device.</td></tr><tr valign="top"><td valign="top">"num_axes"</td><td valign="top">Read</td><td valign="top">the length of the <tt class="literal">axes</tt>
tuple.</td></tr><tr valign="top"><td valign="top">"num_keys"</td><td valign="top">Read</td><td valign="top">the length of the <tt class="literal">keys</tt> tuple</td></tr><tr valign="top"><td valign="top">"source"</td><td valign="top">Read</td><td valign="top">the type of this device - one of:
<tt class="literal">gtk.gdk.SOURCE_MOUSE</tt>,
<tt class="literal">gtk.gdk.SOURCE_PEN</tt>,
<tt class="literal">gtk.gdk.SOURCE_ERASER</tt>,
<tt class="literal">gtk.gdk.SOURCE_CURSOR</tt></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3132263"></a><h2>Description</h2><p>In addition to the normal keyboard and mouse input devices,
<tt class="literal">PyGTK</tt> also contains support for extended input devices.
In particular, this support is targeted at graphics tablets. Graphics
tablets typically return sub-pixel positioning information and possibly
information about the pressure and tilt of the stylus. Under X, the support
for extended devices is done through the XInput extension. Because handling
extended input devices may involve considerable overhead, they need to be
turned on for each <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>
individually using <a href="class-gdkwindow.html#method-gdkwindow--input-set-extension-events" title="gtk.gdk.Window.input_set_extension_events"><tt class="methodname">gtk.gdk.Window.input_set_extension_events</tt>()</a>. 
(Or, more typically, for <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> objects,
using the <a href="class-gtkwidget.html#method-gtkwidget--set-extension-events" title="gtk.Widget.set_extension_events"><tt class="methodname">gtk.Widget.set_extension_events</tt>()</a> 
method). As an additional complication, depending on the support from the
windowing system, its possible that a normal mouse cursor will not be
displayed for a particular extension device. If an application does not want
to deal with displaying a cursor itself, it can ask only to get extension
events from devices that will display a cursor, by passing the
<tt class="literal">gtk.gdk.EXTENSION_EVENTS_CURSOR</tt> value to the <a href="class-gdkwindow.html#method-gdkwindow--input-set-extension-events" title="gtk.gdk.Window.input_set_extension_events"><tt class="methodname">gtk.gdk.Window.input_set_extension_events</tt>()</a> 
method. Otherwise, the application must retrieve the device information
using the <a href="class-gdkdevice.html#function-gdk--devices-list" title="gtk.gdk.devices_list"><tt class="methodname">gtk.gdk.devices_list</tt>()</a> 
function, check the has_cursor field, and, if it is
<tt class="literal">FALSE</tt>, draw a cursor itself when it receives motion
events. </p><p>Each pointing device is assigned a unique integer ID; events from
a particular device can be identified by the <i class="parameter"><tt>deviceid</tt></i>
attribute in the event structure. The events generated by pointer devices
have also been extended to contain <i class="parameter"><tt>pressure</tt></i>,
<i class="parameter"><tt>xtilt</tt></i> and <i class="parameter"><tt>ytilt</tt></i> attributes
which contain the extended information reported as additional valuators from
the device. The <i class="parameter"><tt>pressure</tt></i> attribute ranges from 0.0 to
1.0, while the tilt attributes range from -1.0 to 1.0. (With -1.0
representing the maximum tilt to the left or up, and 1.0 representing the
maximum tilt to the right or down.) One additional attribute in each event
is the <i class="parameter"><tt>source</tt></i> attribute, which contains an
enumeration value describing the type of device; this currently can be one
of <tt class="literal">gtk.gdk.SOURCE_MOUSE</tt>,
<tt class="literal">gtk.gdk.SOURCE_PEN</tt>,
<tt class="literal">gtk.gdk.SOURCE_ERASER</tt>, or
<tt class="literal">gtk.gdk.SOURCE_CURSOR</tt>. This attribute is present to allow
simple applications to (for instance) delete when they detect eraser devices
without having to keep track of complicated per-device settings.</p><p>Various aspects of each device may be configured. The easiest way
of creating a GUI to allow the user to configure such a device is to use the
<a href="class-gtkinputdialog.html" title="gtk.InputDialog"><tt class="classname">gtk.InputDialog</tt></a>
widget in <tt class="literal">PyGTK</tt>. However, even when using this widget,
application writers will need to directly query and set the configuration
parameters in order to save the state between invocations of the
application. The configuration of devices is queried using the <a href="class-gdkdevice.html#function-gdk--devices-list" title="gtk.gdk.devices_list"><tt class="methodname">gtk.gdk.devices_list</tt>()</a> 
function. Each device must be activated using the <a href="class-gdkdevice.html#method-gdkdevice--set-mode" title="gtk.gdk.Device.set_mode"><tt class="methodname">set_mode</tt>()</a> 
method, which also controls whether the device's range is mapped to the
entire screen or to a single window. The mapping of the valuators of the
device onto the predefined valuator types is set using the <a href="class-gdkdevice.html#method-gdkdevice--set-axis-use" title="gtk.gdk.Device.set_axis_use"><tt class="methodname">set_axis_use</tt>()</a> 
method. And the source type for each device can be set with the <a href="class-gdkdevice.html#method-gdkdevice--set-source" title="gtk.gdk.Device.set_source"><tt class="methodname">set_source</tt>()</a> 
method.</p><p>Devices may also have associated keys or macro buttons. Such keys
can be globally set to map into normal X keyboard events. The mapping is set
using the <a href="class-gdkdevice.html#method-gdkdevice--set-key" title="gtk.gdk.Device.set_key"><tt class="methodname">set_key</tt>()</a> 
method. The interfaces in this section will most likely be considerably
modified in the future to accommodate devices that may have different sets of
additional valuators than the pressure xtilt and ytilt.</p></div><div class="refsect1" lang="en"><a name="id3224688"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gdkdevice--set-source"></a><h3>gtk.gdk.Device.set_source</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_source</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>source</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>source</tt></b>:</span></td><td>the source type of the
device</td></tr></tbody></table><p>The <tt class="methodname">set_source</tt>() method sets the source
type for the input device to the value specified by
<i class="parameter"><tt>source</tt></i>. The value of <i class="parameter"><tt>source</tt></i>
must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.gdk.SOURCE_MOUSE</tt></span></td><td>the device is a mouse. (This will be reported for the
core pointer, even if it is something else, such as a trackball.)</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.SOURCE_PEN</tt></span></td><td>the device is a stylus of a graphics tablet or similar
device.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.SOURCE_ERASER</tt></span></td><td>the device is an eraser. Typically, this would be the
other end of a stylus on a graphics tablet.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.SOURCE_CURSOR</tt></span></td><td>the device is a graphics tablet "puck" or similar
device.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--set-mode"></a><h3>gtk.gdk.Device.set_mode</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_mode</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mode</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>mode</tt></b>:</span></td><td>the input mode</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the mode was
successfully changed.</td></tr></tbody></table><p>The <tt class="methodname">set_mode</tt>() method sets the input
device mode to the value specified by <i class="parameter"><tt>mode</tt></i>. The value
of <i class="parameter"><tt>mode</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.gdk.MODE_DISABLED</tt></span></td><td>the device is disabled and will not report any
events.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.MODE_SCREEN</tt></span></td><td>the device is enabled. The device's coordinate space
maps to the entire screen.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.MODE_WINDOW</tt></span></td><td>the device is enabled. The device's coordinate space is
mapped to a single window. The manner in which this window is chosen is
undefined, but it will typically be the same way in which the focus window
for key events is determined.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--set-key"></a><h3>gtk.gdk.Device.set_key</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_key</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>keyval</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>modifiers</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>index</tt></b>:</span></td><td>the index of the macro button to
set.</td></tr><tr><td><span class="term"><b class="parameter"><tt>keyval</tt></b>:</span></td><td>the key value to generate.</td></tr><tr><td><span class="term"><b class="parameter"><tt>modifiers</tt></b>:</span></td><td>the modifiers to set.</td></tr></tbody></table><p>The <tt class="methodname">set_key</tt>() method sets the key event
to generate when a macro button of a device is pressed. The macro button is
specified by <i class="parameter"><tt>index</tt></i>. The key value and modifiers
generated are specified by <i class="parameter"><tt>keyval</tt></i> and
<i class="parameter"><tt>modifiers</tt></i> respectively.</p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--set-axis-use"></a><h3>gtk.gdk.Device.set_axis_use</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_axis_use</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>use</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>index</tt></b>:</span></td><td>the index of the axis.</td></tr><tr><td><span class="term"><b class="parameter"><tt>use</tt></b>:</span></td><td>how the axis is used.</td></tr></tbody></table><p>The <tt class="methodname">set_axis_use</tt>() method sets the axis
(specified by <i class="parameter"><tt>index</tt></i>) of the input device to be used
in the fashion specified by <i class="parameter"><tt>use</tt></i>. The value of
<i class="parameter"><tt>use</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_IGNORE</tt></span></td><td>the axis is ignored.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_X</tt></span></td><td>the axis is used as the x axis.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_Y</tt></span></td><td>the axis is used as the y axis.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_PRESSURE</tt></span></td><td>the axis is used for pressure information.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_XTILT</tt></span></td><td>the axis is used for x tilt information.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_YTILT</tt></span></td><td>the axis is used for y tilt information.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_WHEEL</tt></span></td><td>the axis is used for wheel information.</td></tr><tr><td><span class="term"><tt class="literal">gtk.gdk.AXIS_LAST</tt></span></td><td>a constant equal to the numerically highest axis
value.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--get-state"></a><h3>gtk.gdk.Device.get_state</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_state</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing: a tuple containing the axes
data; and, the modifiers in effect.</td></tr></tbody></table><p>The <tt class="methodname">get_state</tt>() method returns a tuple
containing:</p><div class="itemizedlist"><ul type="disc"><li>a tuple containing the axes data</li><li>the bitmask containing the set of key modifiers in
effect</li></ul></div><p>The state information is relative to the <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>
specified by <i class="parameter"><tt>window</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--get-history"></a><h3>gtk.gdk.Device.get_history</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_history</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>stop</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the earliest event time
limit</td></tr><tr><td><span class="term"><b class="parameter"><tt>stop</tt></b>:</span></td><td>the latest event time
limit</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing event tuples each with axes
data and a timestamp</td></tr></tbody></table><p>The <tt class="methodname">get_history</tt>() method returns a
tuple containing the motion history for the device with respect to the <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>
specified by window between the time limits specified by
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>stop</tt></i>. The motion
history is a tuple containing event motion tuples that each contain a
timestamp for the event and a tuple with the axes data for the event.</p></div><div class="refsect2" lang="en"><a name="method-gdkdevice--get-axis"></a><h3>gtk.gdk.Device.get_axis</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_axis</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>axes</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>use</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>axes</tt></b>:</span></td><td>a sequence of axes values</td></tr><tr><td><span class="term"><b class="parameter"><tt>use</tt></b>:</span></td><td>the axis use to match</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the axis value from <i class="parameter"><tt>axes</tt></i>
that matches the use type or <tt class="literal">None</tt> if there is no
match.</td></tr></tbody></table><p>The <tt class="methodname">get_axis</tt>() method returns the value
in <i class="parameter"><tt>axes</tt></i> whose axis matches the specified
<i class="parameter"><tt>use</tt></i>.</p></div></div><div class="refsect1" lang="en"><a name="id3092298"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gdk--devices-list"></a><h3>gtk.gdk.devices_list</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.gdk.devices_list</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list containing the <a href="class-gdkdevice.html" title="gtk.gdk.Device"><tt class="classname">gtk.gdk.Device</tt></a>
objects for the default display</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.devices_list</tt>() function returns
a list containing the <a href="class-gdkdevice.html" title="gtk.gdk.Device"><tt class="classname">gtk.gdk.Device</tt></a>
objects fro the default display.</p></div><div class="refsect2" lang="en"><a name="function-gdk--device-get-core-pointer"></a><h3>gtk.gdk.device_get_core_pointer</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.gdk.device_get_core_pointer</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the </td></tr></tbody></table><p>The <tt class="function">gtk.gdk.device_get_core_pointer</tt>()
function returns the device that is used as the core pointer.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkcursor.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gdkdisplay.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.Cursor</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.gdk.Display</td></tr></table></div></body></html>