1
XGETDEVICEMOTIONEVENTS(libmansuffix)
2
====================================
7
XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion
13
#include <X11/extensions/XInput.h>
15
XDeviceTimeCoord *XGetDeviceMotionEvents( Display *display,
21
int *axis_count_return);
24
Specifies the connection to the X server.
27
Specifies the device whose motion history is to be
31
Specify the time interval in which the events are
32
returned from the motionhistory buffer.You can pass a
33
timestamp or CurrentTime.
36
Returns the number of events from the motion history
40
Returns the mode of the device (Absolute or Relative).
43
Returns the count of axes being reported.
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.
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.
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.
67
XGetDeviceMotionEvents can generate a BadDevice, or BadMatch
72
The XDeviceTimeCoord structure contains:
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.
92
You should use XFreeDeviceMotionEvents to free the data
93
returned by this request.
95
Errors returned by this request: BadDevice, BadMatch.
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.
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.