Next: Managing Input Focus, Previous: Sending Events, Up: Events and Input [Contents][Index]
The CLX functions affecting pointer position are discussed in the following paragraphs.
A window specifying the coordinate system for the returned position.
Returns the current pointer coordinates relative to the given window. If query-pointer returns nil for same-screen-p, the pointer is not on the same screen as the window. In this case, query-pointer returns a value of nil for child and a value of zero for x and y. If query-pointer returns true for same-screen-p, the returned x and y are relative to the origin of window. The child is the child of the window containing the pointer, if any. The state-mask returned gives the current state of the modifier keys and pointer buttons. The returned root is the root window currently containing the pointer. The returned root-x and root-y specify the pointer coordinates relative to root.
Type int16.
Type int16.
Type boolean.
Type window or null.
Type card16.
Type int16.
Type int16.
Type window.
A display.
Returns the root window currently containing the display pointer and the current position of the pointer relative to the root.
Type int16.
Type int16.
Type window.
A window specifying the coordinate system for the returned position.
Returns the current pointer coordinates relative to the given window. If pointer-position returns nil for same-screen-p, the pointer is not on the same screen as the window. In this case, pointer-position returns a value of nil for child and a value of zero for x and y. If pointer-position returns true for same-screen-p, the returned x and y are relative to the origin of window.
Type int16.
Type int16.
Type boolean.
Type window or null.
The window containing the returned motion events.
timestamp values for the time interval for returned motion events.
The form of the returned motion events.
Many X server implementations maintain a more precise history of pointer motion between event notifications. The pointer position at each pointer hardware interrupt can be stored into a buffer for later retrieval.This is called the motion history buffer. A paint program, for example, may want to have a precise history of where the pointer traveled, even though for most other applications this amount of detail is grossly excessive.
The motion-events function returns all events in the motion history buffer that fall between the specified :start and :stop timestamps (inclusive) and have coordinates that lie within the specified window (including borders) at its present placement. If the :start time is later than the :stop time or if the :start time is in the future, no events are returned.
Type (repeat-seq (int16 x) (int16 y) (timestamp time))
.
The window into which the pointer is moved.
The new position of the pointer relative to the destination.
Moves the pointer to the given coordinates relative to the destination window. warp-pointer should be rarely be used since the user should normally be in control of the pointer position. warp-pointer generates events just as if the user had instantaneously moved the pointer from one position to another.
warp-pointer cannot move the pointer outside the confine-to window of an active pointer grab; an attempt to do so only moves the pointer as far as the closest edge of the confine-to window.
A display.
The offsets used to adjust the pointer position.
Moves the pointer by the given offsets. This function should rarely be used since the user should normally be in control of the pointer position. warp-pointer-relative generates events just as if the user had instantaneously moved the pointer from one position to another.
warp-pointer-relative cannot move the pointer outside the confine-to window of an active pointer grab; an attempt to do so only moves the pointer as far as the closest edge of the confine-to window.
The window into which the pointer is moved.
The new position of the pointer relative to the destination.
The window that must currently contain the pointer.
The source rectangle that must currently contain the pointer.
Moves the pointer to the given position relative to the destination window. However, the move can only take place if the pointer is currently contained in a visible portion of the specified rectangle of the source window. If source-height is zero, it is replaced with the current height of source window minus source-y. If source-width is zero, it is replaced with the current width of source window minus source-x.
warp-pointer-if-inside generates events just as if the user had instantaneously moved the pointer from one position to another. warp-pointer-if-inside cannot move the pointer outside the confine-to window of an active pointer grab; an attempt to do so only moves the pointer as far as the closest edge of the confine-to window.
The offsets used to adjust the pointer position.
The window that must currently contain the pointer.
The source rectangle that must currently contain the pointer.
Moves the pointer by the given offsets. However, the move can only take place if the pointer is currently contained in a visible portion of the specified rectangle of the source window. If source-height is zero, it is replaced with the current height of source-window minus source-y. If source-width is zero, it is replaced with the current width of source-window minus source-x.
warp-pointer-relative-if-inside generates events just as if the user had instantaneously moved the pointer from one position to another. warp-pointer-relative-if-inside cannot move the pointer outside the confine-to window of an active pointer grab; an attempt to do so only moves the pointer as far as the closest edge of the confine-to window.
Next: Managing Input Focus, Previous: Sending Events, Up: Events and Input [Contents][Index]