1XGetDeviceMotionEvents(3)         X FUNCTIONS        XGetDeviceMotionEvents(3)
2
3
4

NAME

6       XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion history
7

SYNTAX

9       XDeviceTimeCoord   *XGetDeviceMotionEvents(Display   *display,  XDevice
10              *device,  Time  start,  Time  stop,  int  *nevents_return,   int
11              *mode_return, int *axis_count_return);
12

ARGUMENTS

14       display     Specifies the connection to the X server.
15
16       device      Specifies the device whose motion history is to be queried.
17
18       start
19       stop        Specify  the time interval in which the events are returned
20                   from the motion history buffer.  You can pass  a  timestamp
21                   or CurrentTime.
22
23       nevents_return
24                   Returns  the  number of events from the motion history buf‐
25                   fer.
26
27       mode_return Returns the mode of the device (Absolute or Relative).
28
29       axis_count_return
30                   Returns the count of axes being reported.
31

DESCRIPTION

33       The server may retain the recent history of the device motion and do so
34       to  a  finer granularity than is reported by DeviceMotionNotify events.
35       The XGetDeviceMotionEvents request makes this history available.
36
37       The XGetDeviceMotionEvents request returns all  events  in  the  motion
38       history  buffer  that  fall between the specified start and stop times,
39       inclusive.  If the start time is later than the stop  time  or  if  the
40       start  time is in the future, no events are returned.  If the stop time
41       is in the future, it is equivalent to specifying CurrentTime.
42
43       The mode indicates whether the device is reporting absolute  positional
44       data  (mode=Absolute)  or  relative  motion data (mode=Relative).  Some
45       devices allow their mode to be changed via the XSetDeviceMode  request.
46       These  constants  are defined in the file XI.h.  The axis_count returns
47       the number of axes or valuators being reported by the device.
48
49       XGetDeviceMotionEvents can generate a BadDevice, or BadMatch error.
50

STRUCTURES

52       The XDeviceTimeCoord structure contains:
53
54       typedef struct {
55            Time time;
56            int *data;
57       } XDeviceTimeCoord;
58
59       The time member is set to the time, in milliseconds.  The  data  member
60       is  a  pointer  to an array of integers.  These integers are set to the
61       values of each valuator or axis reported by the device.  There  is  one
62       element  in  the  array per axis of motion reported by the device.  The
63       value of the array elements depends on the mode of the device.  If  the
64       mode  is  Absolute,  the  values  are  the  raw values generated by the
65       device.  These may be scaled by client programs using the maximum  val‐
66       ues  that  the device can generate.  The maximum value for each axis of
67       the device is reported in the max_val field of the  XAxisInfo  returned
68       by  the  XListInputDevices  request.  If the mode is Relative, the data
69       values are the relative values generated by the device.
70
71       You should use XFreeDeviceMotionEvents to free  the  data  returned  by
72       this request.
73
74       Errors returned by this request: BadDevice, BadMatch.
75

DIAGNOSTICS

77       BadDevice   An invalid device was specified.  The specified device does
78                   not exist or has not been opened by this client via  XOpen‐
79                   InputDevice.   This  error  may also occur if the specified
80                   device is the X keyboard or X pointer device.
81
82       BadMatch    This error may occur if an  XGetDeviceMotionEvents  request
83                   is  made  specifying  a  device  that  has no valuators and
84                   reports no axes of motion.
85

SEE ALSO

87       Programming with Xlib
88
89
90
91X Version 11                      libXi 1.1.1        XGetDeviceMotionEvents(3)
Impressum