[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to move the mouse cursor position
- To: comp-lang-lisp-mcl@services.cambridge.apple.com
- Subject: How to move the mouse cursor position
- From: alanr@eliza.media-lab.media.mit.edu (Alan Ruttenberg)
- Date: Wed, 10 Aug 1994 06:35:02 GMT
- Distribution: comp
- Newsgroups: comp.lang.lisp.mcl
- Organization: MIT Media Laboratory Learning an Common Sense Group
- Sender: news@dizzy.media.mit.edu (USENET News System)
In article <UiFvl9m00iV503SqsO@andrew.cmu.edu> Michael Matessa <mm4b+@andrew.cmu.edu> writes:
Does anyone know how to change the mouse cursor position using MCL?
Yup. Don't tell the interface police. warp-mouse takes a delta - how
far to move the mouse from where it its, rather than an absolute
position.
(defparameter *mouse-global* (%int-to-ptr ccl::$mouse))
(defparameter *mouse-temp* (%int-to-ptr #x828))
(defparameter *mouse-raw* (%int-to-ptr ccl::$rawmouse))
(defun warp-mouse (delta)
(%put-long *mouse-global* (add-points (%get-long *mouse-global*) delta))
(%put-long *mouse-temp* (%get-long *mouse-global*) )
(%put-long *mouse-raw* (%get-long *mouse-global*)))