LEARN ABOUT HPUX
xgetmotionevents
XGetMotionEvents() XGetMotionEvents()
Name
XGetMotionEvents - get events from pointer motion history buffer.
Synopsis
XTimeCoord *XGetMotionEvents(display, w, start, stop, nevents_return)
Display *display;
Window w;
Time start, stop;
int *nevents_return;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
w Specifies the ID of the window whose associated pointer motion events will be returned.
start Specify the time interval for which the events are returned from the motion history buffer. Pass a time stamp (in milliseconds)
stop or CurrentTime.
nevents_return
Returns the number of events returned from the motion history buffer.
Returns
The list of pointer positions.
Description
XGetMotionEvents() returns all events in the motion history buffer that fall between the specified start and stop times (inclusive) and
that have coordinates that lie within (including borders) the specified window at its present placement. The x and y coordinates of the
XTimeCoord return structure are reported relative to the origin of w.
XGetMotionEvent returns NULL if the server does not support a motion history buffer (which is common), or if the start time is after the
stop time, or if the start time is in the future. If the stop time is in the future, it is equivalent to specifying the constant Current-
Time, since the server does not wait to report future events. A motion history buffer is supported if XDisplayMotionBufferSize() (display)
> 0. The pointer position at each pointer hardware interrupt is then stored for later retrieval.
Use XFree() to free the returned XTimeCoord structures when they are no longer needed.
For more information, see Volume One, Chapter 9, The Keyboard and Pointer.
Structures
typedef struct _XTimeCoord {
Time time;
short x, y;
} XTimeCoord;
Errors
BadWindow
See Also
XQLength(), XAllowEvents(), XCheckIfEvent(), XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(),
XEventsQueued(), XGetInputFocus(), XIfEvent(), XMaskEvent(), XNextEvent(), XPeekEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(), XSe-
lectInput(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWindowEvent().
Xlib - Input Handling XGetMotionEvents()