summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gdkdevice.xml
blob: 36150fb096a8bec652fce033e90aff5ef2e66be5 (plain)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gdkdevice">
  <refnamediv>
    <refname>gtk.gdk.Device</refname>
    <refpurpose>an object for supporting input devices</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.gdk.Device</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--set-source">set_source</link></methodname>
	<methodparam><parameter
		       role="keyword">source</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--set-mode">set_mode</link></methodname>
	<methodparam><parameter
		       role="keyword">mode</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--set-key">set_key</link></methodname>
	<methodparam><parameter
		       role="keyword">index</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">keyval</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">modifiers</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--set-axis-use">set_axis_use</link></methodname>
	<methodparam><parameter
		       role="keyword">index</parameter></methodparam>
	<methodparam><parameter role="keyword">use</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--get-state">get_state</link></methodname>
	<methodparam><parameter
		       role="keyword">window</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--get-history">get_history</link></methodname>
	<methodparam><parameter
		       role="keyword">window</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">stop</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkdevice--get-axis">get_axis</link></methodname>
	<methodparam><parameter
		       role="keyword">axes</parameter></methodparam>
	<methodparam><parameter role="keyword">use</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

      <programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
	<methodname><link
linkend="function-gdk--devices-list">gtk.gdk.devices_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link
linkend="function-gdk--device-get-core-pointer">gtk.gdk.device_get_core_pointer</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis></programlisting>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gdkdevice">gtk.gdk.Device</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Attributes</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	<?dbhtml cellpadding="5"?>
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"axes"</entry>
	      <entry>Read</entry>
	      <entry>a tuple containing axes information. Each axes is
described by a tuple containing: use information (one of:
<literal>gtk.gdk.AXIS_IGNORE</literal>, <literal>gtk.gdk.AXIS_X</literal>,
<literal>gtk.gdk.AXIS_Y</literal>, <literal>gtk.gdk.AXIS_PRESSURE</literal>,
<literal>gtk.gdk.AXIS_XTILT</literal>,
<literal>gtk.gdk.AXIS_YTILT</literal>,
<literal>gtk.gdk.AXIS_WHEEL</literal>,
<literal>gtk.gdk.AXIS_LAST</literal>), the minimum and maximum axes
values.</entry>
	    </row>

	    <row valign="top">
	      <entry>"has_cursor"</entry>
	      <entry>Read</entry>
	      <entry>if <literal>True</literal> the pointer follows device
motion.</entry>
	    </row>

	    <row valign="top">
	      <entry>"keys"</entry>
	      <entry>Read</entry>
	      <entry>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.</entry>
	    </row>

	    <row valign="top">
	      <entry>"mode"</entry>
	      <entry>Read</entry>
	      <entry>the mode of this device - one of:
<literal>gtk.gdk.MODE_DISABLED</literal>,
<literal>gtk.gdk.MODE_SCREEN</literal>,
<literal>gtk.gdk.MODE_WINDOW</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"name"</entry>
	      <entry>Read</entry>
	      <entry>the name of this device.</entry>
	    </row>

	    <row valign="top">
	      <entry>"num_axes"</entry>
	      <entry>Read</entry>
	      <entry>the length of the <literal>axes</literal>
tuple.</entry>
	    </row>

	    <row valign="top">
	      <entry>"num_keys"</entry>
	      <entry>Read</entry>
	      <entry>the length of the <literal>keys</literal> tuple</entry>
	    </row>

	    <row valign="top">
	      <entry>"source"</entry>
	      <entry>Read</entry>
	      <entry>the type of this device - one of:
<literal>gtk.gdk.SOURCE_MOUSE</literal>,
<literal>gtk.gdk.SOURCE_PEN</literal>,
<literal>gtk.gdk.SOURCE_ERASER</literal>,
<literal>gtk.gdk.SOURCE_CURSOR</literal></entry>
	    </row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>In addition to the normal keyboard and mouse input devices,
<literal>PyGTK</literal> 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 <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
individually using <link
linkend="method-gdkwindow--input-set-extension-events"><methodname>gtk.gdk.Window.input_set_extension_events</methodname>()</link>. 
(Or, more typically, for <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> objects,
using the <link
linkend="method-gtkwidget--set-extension-events"><methodname>gtk.Widget.set_extension_events</methodname>()</link> 
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
<literal>gtk.gdk.EXTENSION_EVENTS_CURSOR</literal> value to the <link
linkend="method-gdkwindow--input-set-extension-events"><methodname>gtk.gdk.Window.input_set_extension_events</methodname>()</link> 
method. Otherwise, the application must retrieve the device information
using the <link
linkend="function-gdk--devices-list"><methodname>gtk.gdk.devices_list</methodname>()</link> 
function, check the has_cursor field, and, if it is
<literal>False</literal>, draw a cursor itself when it receives motion
events. </para>

    <para>Each pointing device is assigned a unique integer ID; events from
a particular device can be identified by the <parameter>deviceid</parameter>
attribute in the event structure. The events generated by pointer devices
have also been extended to contain <parameter>pressure</parameter>,
<parameter>xtilt</parameter> and <parameter>ytilt</parameter> attributes
which contain the extended information reported as additional valuators from
the device. The <parameter>pressure</parameter> 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 <parameter>source</parameter> attribute, which contains an
enumeration value describing the type of device; this currently can be one
of <literal>gtk.gdk.SOURCE_MOUSE</literal>,
<literal>gtk.gdk.SOURCE_PEN</literal>,
<literal>gtk.gdk.SOURCE_ERASER</literal>, or
<literal>gtk.gdk.SOURCE_CURSOR</literal>. 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.</para>

    <para>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
<link
linkend="class-gtkinputdialog"><classname>gtk.InputDialog</classname></link>
widget in <literal>PyGTK</literal>. 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 <link
linkend="function-gdk--devices-list"><methodname>gtk.gdk.devices_list</methodname>()</link> 
function. Each device must be activated using the <link
linkend="method-gdkdevice--set-mode"><methodname>set_mode</methodname>()</link> 
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 <link
linkend="method-gdkdevice--set-axis-use"><methodname>set_axis_use</methodname>()</link> 
method. And the source type for each device can be set with the <link
linkend="method-gdkdevice--set-source"><methodname>set_source</methodname>()</link> 
method.</para>

    <para>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 <link
linkend="method-gdkdevice--set-key"><methodname>set_key</methodname>()</link> 
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.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gdkdevice--set-source">
      <title>gtk.gdk.Device.set_source</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_source</methodname>
	  <methodparam><parameter
			 role="keyword">source</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">source</parameter>&nbsp;:</term>
	  <listitem><simpara>the source type of the
device</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_source</methodname>() method sets the source
type for the input device to the value specified by
<parameter>source</parameter>. The value of <parameter>source</parameter>
must be one of:</para>

      <variablelist>
	<varlistentry>
	  <term><literal>gtk.gdk.SOURCE_MOUSE</literal></term>
	  <listitem>
	    <simpara>the device is a mouse. (This will be reported for the
core pointer, even if it is something else, such as a trackball.)</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.SOURCE_PEN</literal></term>
	  <listitem>
	    <simpara>the device is a stylus of a graphics tablet or similar
device.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.SOURCE_ERASER</literal></term>
	  <listitem>
	    <simpara>the device is an eraser. Typically, this would be the
other end of a stylus on a graphics tablet.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.SOURCE_CURSOR</literal></term>
	  <listitem>
	    <simpara>the device is a graphics tablet "puck" or similar
device.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

  </refsect2>

    <refsect2 id="method-gdkdevice--set-mode">
      <title>gtk.gdk.Device.set_mode</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_mode</methodname>
	  <methodparam><parameter
			 role="keyword">mode</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mode</parameter>&nbsp;:</term>
	  <listitem><simpara>the input mode</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the mode was
successfully changed.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_mode</methodname>() method sets the input
device mode to the value specified by <parameter>mode</parameter>. The value
of <parameter>mode</parameter> must be one of:</para>

      <variablelist>
	<varlistentry>
	  <term><literal>gtk.gdk.MODE_DISABLED</literal></term>
	  <listitem>
	    <simpara>the device is disabled and will not report any
events.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.MODE_SCREEN</literal></term>
	  <listitem>
	    <simpara>the device is enabled. The device's coordinate space
maps to the entire screen.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.MODE_WINDOW</literal></term>
	  <listitem>
	    <simpara>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.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

  </refsect2>

    <refsect2 id="method-gdkdevice--set-key">
      <title>gtk.gdk.Device.set_key</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_key</methodname>
	  <methodparam><parameter
			 role="keyword">index</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">keyval</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">modifiers</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">index</parameter>&nbsp;:</term>
	  <listitem><simpara>the index of the macro button to
set.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">keyval</parameter>&nbsp;:</term>
	  <listitem><simpara>the key value to generate.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">modifiers</parameter>&nbsp;:</term>
	  <listitem><simpara>the modifiers to set.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_key</methodname>() method sets the key event
to generate when a macro button of a device is pressed. The macro button is
specified by <parameter>index</parameter>. The key value and modifiers
generated are specified by <parameter>keyval</parameter> and
<parameter>modifiers</parameter> respectively.</para>

  </refsect2>

    <refsect2 id="method-gdkdevice--set-axis-use">
      <title>gtk.gdk.Device.set_axis_use</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_axis_use</methodname>
	  <methodparam><parameter
			 role="keyword">index</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">use</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">index</parameter>&nbsp;:</term>
	  <listitem><simpara>the index of the axis.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">use</parameter>&nbsp;:</term>
	  <listitem><simpara>how the axis is used.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_axis_use</methodname>() method sets the axis
(specified by <parameter>index</parameter>) of the input device to be used
in the fashion specified by <parameter>use</parameter>. The value of
<parameter>use</parameter> must be one of:</para>

      <variablelist>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_IGNORE</literal></term>
	  <listitem>
	    <simpara>the axis is ignored.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_X</literal></term>
	  <listitem>
	    <simpara>the axis is used as the x axis.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_Y</literal></term>
	  <listitem>
	    <simpara>the axis is used as the y axis.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_PRESSURE</literal></term>
	  <listitem>
	    <simpara>the axis is used for pressure information.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_XTILT</literal></term>
	  <listitem>
	    <simpara>the axis is used for x tilt information.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_YTILT</literal></term>
	  <listitem>
	    <simpara>the axis is used for y tilt information.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_WHEEL</literal></term>
	  <listitem>
	    <simpara>the axis is used for wheel information.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.gdk.AXIS_LAST</literal></term>
	  <listitem>
	    <simpara>a constant equal to the numerically highest axis
value.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

    </refsect2>

    <refsect2 id="method-gdkdevice--get-state">
      <title>gtk.gdk.Device.get_state</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_state</methodname>
	  <methodparam><parameter
			 role="keyword">window</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">window</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing: a tuple containing the axes
data; and, the modifiers in effect.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_state</methodname>() method returns a tuple
containing:</para>

      <itemizedlist>
	<listitem>
	  <simpara>a tuple containing the axes data</simpara>
	</listitem>
	<listitem>
	  <simpara>the bitmask containing the set of key modifiers in
effect</simpara>
	</listitem>
      </itemizedlist>

      <para>The state information is relative to the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
specified by <parameter>window</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gdkdevice--get-history">
      <title>gtk.gdk.Device.get_history</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_history</methodname>
	  <methodparam><parameter
			 role="keyword">window</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">stop</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">window</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>the earliest event time
limit</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">stop</parameter>&nbsp;:</term>
	  <listitem><simpara>the latest event time
limit</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing event tuples each with axes
data and a timestamp</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_history</methodname>() method returns a
tuple containing the motion history for the device with respect to the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
specified by window between the time limits specified by
<parameter>start</parameter> and <parameter>stop</parameter>. 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.</para>

  </refsect2>

    <refsect2 id="method-gdkdevice--get-axis">
      <title>gtk.gdk.Device.get_axis</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_axis</methodname>
	  <methodparam><parameter
			 role="keyword">axes</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">use</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">axes</parameter>&nbsp;:</term>
	  <listitem><simpara>a sequence of axes values</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">use</parameter>&nbsp;:</term>
	  <listitem><simpara>the axis use to match</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the axis value from <parameter>axes</parameter>
that matches the use type or <literal>None</literal> if there is no
match.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_axis</methodname>() method returns the value
in <parameter>axes</parameter> whose axis matches the specified
<parameter>use</parameter>.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-gdk--devices-list">
      <title>gtk.gdk.devices_list</title>

      <programlisting><methodsynopsis language="python">
          <methodname>gtk.gdk.devices_list</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a list containing the <link
linkend="class-gdkdevice"><classname>gtk.gdk.Device</classname></link>
objects for the default display</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>The <function>gtk.gdk.devices_list</function>() function returns
a list containing the <link
linkend="class-gdkdevice"><classname>gtk.gdk.Device</classname></link>
objects fro the default display.</para>

    </refsect2>

    <refsect2 id="function-gdk--device-get-core-pointer">
      <title>gtk.gdk.device_get_core_pointer</title>

      <programlisting><methodsynopsis language="python">
          <methodname>gtk.gdk.device_get_core_pointer</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the </simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>The <function>gtk.gdk.device_get_core_pointer</function>()
function returns the device that is used as the core pointer.</para>

    </refsect2>

  </refsect1>

</refentry>