The Mouse
*********

* Mouse Position::		Asking where the mouse is, or moving it.

Mouse Position
==============

The functions mouse-position, mouse-pixel-position, set-mouse-position and set-mouse-pixel-position give access to the current position of the mouse.

 -- Function: mouse-position &optional device
     This function returns a list (WINDOW X . Y) giving the current mouse window and position.  The position is given in character cells, where (0, 0) is the upper-left corner.

     DEVICE specifies the device on which to read the mouse position, and defaults to the selected device.  If the device is a mouseless terminal or SXEmacs hasn't been programmed to read its mouse position, it returns the device's selected window for WINDOW and nil for X and Y.

 -- Function: mouse-pixel-position &optional device
     This function returns a list (WINDOW X . Y) giving the current mouse window and position.  The position is given in pixel units, where (0, 0) is the upper-left corner.

     DEVICE specifies the device on which to read the mouse position, and defaults to the selected device.  If the device is a mouseless terminal or SXEmacs hasn't been programmed to read its mouse position, it returns the device's selected window for WINDOW and nil for X and Y.

 -- Function: set-mouse-position window x y
     This function warps the mouse to the center of character position X, Y in frame WINDOW.  The arguments X and Y are integers, giving the position in characters relative to the top left corner of WINDOW.

     Warping the mouse means changing the screen position of the mouse as if the user had moved the physical mouse---thus simulating the effect of actual mouse motion.

 -- Function: set-mouse-pixel-position window x y
     This function warps the mouse to pixel position X, Y in frame WINDOW.  The arguments X and Y are integers, giving the position in pixels relative to the top left corner of WINDOW.