1XGETDEVICEMOTIONEVEN(3)                                XGETDEVICEMOTIONEVEN(3)
2
3
4

NAME

6       XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion history
7

SYNOPSIS

9       #include <X11/extensions/XInput.h>
10
11       XDeviceTimeCoord *XGetDeviceMotionEvents( Display *display,
12                                                 XDevice *device,
13                                                 Time start,
14                                                 Time stop,
15                                                 int *nevents_return,
16                                                 int *mode_return,
17                                                 int *axis_count_return);
18
19       display
20              Specifies the connection to the X server.
21
22       device
23              Specifies the device whose motion history is to be
24              queried.
25
26       start, stop
27              Specify the time interval in which the events are
28              returned from the motionhistory buffer.You can pass a
29              timestamp or CurrentTime.
30
31       nevents_return
32              Returns the number of events from the motion history
33              buffer.
34
35       mode_return
36              Returns the mode of the device (Absolute or Relative).
37
38       axis_count_return
39              Returns the count of axes being reported.
40

DESCRIPTION

42           The server may retain the recent history of the device motion
43           and do so to a finer granularity than is reported by
44           DeviceMotionNotify events. The XGetDeviceMotionEvents request
45           makes this history available.
46
47           The XGetDeviceMotionEvents request returns all events in the
48           motion history buffer that fall between the specified start and
49           stop times, inclusive. If the start time is later than the stop
50           time or if the start time is in the future, no events are
51           returned. If the stop time is in the future, it is equivalent
52           to specifying CurrentTime.
53
54           The mode indicates whether the device is reporting absolute
55           positional data (mode = Absolute ) or relative motion data
56           (mode = Relative ). Some devices allow their mode to be changed
57           via the XSetDeviceMode request. These constants are defined in
58           the file XI.h. The axis_count returns the number of axes or
59           valuators being reported by the device.
60
61           XGetDeviceMotionEvents can generate a BadDevice, or BadMatch
62           error.
63
64       Structures
65
66           The XDeviceTimeCoord structure contains:
67
68           typedef struct {
69               Time time;
70               int *data;
71           } XDeviceTimeCoord;
72
73           The time member is set to the time, in milliseconds. The data
74           member is a pointer to an array of integers. These integers are
75           set to the values of each valuator or axis reported by the
76           device. There is one element in the array per axis of motion
77           reported by the device. The value of the array elements depends
78           on the mode of the device. If the mode is Absolute, the values
79           are the raw values generated by the device. These may be scaled
80           by client programs using the maximum values that the device can
81           generate. The maximum value for each axis of the device is
82           reported in the max_val field of the XAxisInfo returned by the
83           XListInputDevices request. If the mode is Relative, the data
84           values are the relative values generated by the device.
85
86           You should use XFreeDeviceMotionEvents to free the data
87           returned by this request.
88
89           Errors returned by this request: BadDevice, BadMatch.
90

DIAGNOSTICS

92           BadDevice
93                  An invalid device was specified. The specified device
94                  does not exist or has not been opened by this client via
95                  XOpenInputDevice. This error may also occur if the
96                  specified device is the X keyboard or X pointer device.
97
98           BadMatch
99                  This error may occur if an XGetDeviceMotionEvents
100                  request is made specifying a device that has no
101                  valuators and reports no axes of motion.
102
103
104
105                                  03/09/2013           XGETDEVICEMOTIONEVEN(3)
Impressum