307 lines
5.1 KiB
HTML
307 lines
5.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XGETDEVICEMOTIONEVEN</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XGETDEVICEMOTIONEVEN</H1>
|
|
Section: (3)<BR>Updated: 06/19/2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion history
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<PRE>
|
|
#include <<A HREF="file:///usr/include/X11/extensions/XInput.h">X11/extensions/XInput.h</A>>
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
XDeviceTimeCoord *XGetDeviceMotionEvents( Display *display,
|
|
XDevice *device,
|
|
Time start,
|
|
Time stop,
|
|
int *nevents_return,
|
|
int *mode_return,
|
|
int *axis_count_return);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
device
|
|
Specifies the device whose motion history is to be
|
|
queried.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
start, stop
|
|
Specify the time interval in which the events are
|
|
returned from the motion history buffer. You can pass a
|
|
timestamp or CurrentTime.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
nevents_return
|
|
Returns the number of events from the motion history
|
|
buffer.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
mode_return
|
|
Returns the mode of the device (Absolute or Relative).
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
axis_count_return
|
|
Returns the count of axes being reported.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The server may retain the recent history of the device motion
|
|
and do so to a finer granularity than is reported by
|
|
DeviceMotionNotify events. The XGetDeviceMotionEvents request
|
|
makes this history available.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XGetDeviceMotionEvents request returns all events in the
|
|
motion history buffer that fall between the specified start and
|
|
stop times, inclusive. If the start time is later than the stop
|
|
time or if the start time is in the future, no events are
|
|
returned. If the stop time is in the future, it is equivalent
|
|
to specifying CurrentTime.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The mode indicates whether the device is reporting absolute
|
|
positional data (mode = Absolute ) or relative motion data
|
|
(mode = Relative ). Some devices allow their mode to be changed
|
|
via the XSetDeviceMode request. These constants are defined in
|
|
the file XI.h. The axis_count returns the number of axes or
|
|
valuators being reported by the device.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XGetDeviceMotionEvents can generate a BadDevice, or BadMatch
|
|
error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
Structures
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XDeviceTimeCoord structure contains:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
Time time;
|
|
int *data;
|
|
} XDeviceTimeCoord;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The time member is set to the time, in milliseconds. The data
|
|
member is a pointer to an array of integers. These integers are
|
|
set to the values of each valuator or axis reported by the
|
|
device. There is one element in the array per axis of motion
|
|
reported by the device. The value of the array elements depends
|
|
on the mode of the device. If the mode is Absolute, the values
|
|
are the raw values generated by the device. These may be scaled
|
|
by client programs using the maximum values that the device can
|
|
generate. The maximum value for each axis of the device is
|
|
reported in the max_val field of the XAxisInfo returned by the
|
|
XListInputDevices request. If the mode is Relative, the data
|
|
values are the relative values generated by the device.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
You should use XFreeDeviceMotionEvents to free the data
|
|
returned by this request.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
Errors returned by this request: BadDevice, BadMatch.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadDevice
|
|
An invalid device was specified. The specified device
|
|
does not exist or has not been opened by this client via
|
|
XOpenInputDevice. This error may also occur if the
|
|
specified device is the X keyboard or X pointer device.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadMatch
|
|
This error may occur if an XGetDeviceMotionEvents
|
|
request is made specifying a device that has no
|
|
valuators and reports no axes of motion.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">DIAGNOSTICS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:00 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|