1XGETDEVICEMOTIONEVENTS(libmansuffix)
2====================================
3
4NAME
5----
6
7   XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion
8   history
9
10SYNOPSIS
11--------
12
13   #include <X11/extensions/XInput.h>
14
15   XDeviceTimeCoord *XGetDeviceMotionEvents( Display *display,
16                                             XDevice *device,
17                                             Time start,
18                                             Time stop,
19                                             int *nevents_return,
20                                             int *mode_return,
21                                             int *axis_count_return);
22
23   display
24          Specifies the connection to the X server.
25
26   device
27          Specifies the device whose motion history is to be
28          queried.
29
30   start, stop
31          Specify the time interval in which the events are
32          returned from the motion history buffer. You can pass a
33          timestamp or CurrentTime.
34
35   nevents_return
36          Returns the number of events from the motion history
37          buffer.
38
39   mode_return
40          Returns the mode of the device (Absolute or Relative).
41
42   axis_count_return
43          Returns the count of axes being reported.
44
45DESCRIPTION
46-----------
47
48   The server may retain the recent history of the device motion
49   and do so to a finer granularity than is reported by
50   DeviceMotionNotify events. The XGetDeviceMotionEvents request
51   makes this history available.
52
53   The XGetDeviceMotionEvents request returns all events in the
54   motion history buffer that fall between the specified start and
55   stop times, inclusive. If the start time is later than the stop
56   time or if the start time is in the future, no events are
57   returned. If the stop time is in the future, it is equivalent
58   to specifying CurrentTime.
59
60   The mode indicates whether the device is reporting absolute
61   positional data (mode = Absolute ) or relative motion data
62   (mode = Relative ). Some devices allow their mode to be changed
63   via the XSetDeviceMode request. These constants are defined in
64   the file XI.h. The axis_count returns the number of axes or
65   valuators being reported by the device.
66
67   XGetDeviceMotionEvents can generate a BadDevice, or BadMatch
68   error.
69
70Structures
71
72   The XDeviceTimeCoord structure contains:
73
74                typedef struct {
75                    Time time;
76                    int *data;
77                } XDeviceTimeCoord;
78
79   The time member is set to the time, in milliseconds. The data
80   member is a pointer to an array of integers. These integers are
81   set to the values of each valuator or axis reported by the
82   device. There is one element in the array per axis of motion
83   reported by the device. The value of the array elements depends
84   on the mode of the device. If the mode is Absolute, the values
85   are the raw values generated by the device. These may be scaled
86   by client programs using the maximum values that the device can
87   generate. The maximum value for each axis of the device is
88   reported in the max_val field of the XAxisInfo returned by the
89   XListInputDevices request. If the mode is Relative, the data
90   values are the relative values generated by the device.
91
92   You should use XFreeDeviceMotionEvents to free the data
93   returned by this request.
94
95   Errors returned by this request: BadDevice, BadMatch.
96
97DIAGNOSTICS
98-----------
99
100   BadDevice
101          An invalid device was specified. The specified device
102          does not exist or has not been opened by this client via
103          XOpenInputDevice. This error may also occur if the
104          specified device is the X keyboard or X pointer device.
105
106   BadMatch
107          This error may occur if an XGetDeviceMotionEvents
108          request is made specifying a device that has no
109          valuators and reports no axes of motion.
110