(MOUSE message [parameters])

that translates the message to (%mouse) calls. The messages mouse recognises are:

Message Args Result Comments

{\itt 'RESET\index{RESET@{\tt RESET}}}

#-buttons
This message should be the first sent when dealing with the mouse. It returns -1 if no mouse is avaliable.
{\itt 'SHOW\index{SHOW@{\tt SHOW}}}
Increments the mouse's visibility count. The count initially is -1, can be incremented or decremented, but can never become positive (calls to {\itt 'SHOW} are without effect if the count is ≥ 0). The pointer is visible only when the count is = 0.
{\itt 'HIDE\index{HIDE@{\tt HIDE}}}
Decrements the mouse's visiblity count.
{\itt 'INQ\index{INQ@{\tt INQ}}}

( buttons-down x y)
buttons-down is a list containing any of {\itt 'LEFT}, {\itt 'RIGHT} and {\itt CENTER}. The x– and y-positions are thought in 640×200 units, although they can be redefined to any scaling. They are always in linear correspondence with the ``Mickeys''.
{\itt 'MOVE\index{MOVE@{\tt MOVE}}}
x y
Moves the pointer to an absolute location. As always, (0, 0) is the upper left corner. The values are clipped to the limiting rectangle.
{\itt 'PRESS\index{PRESS@{\tt PRESS}}}
button
( buttons-down count x y)
There is an additional field compared to {\itt 'INQ}: the number of times the button has been pressed. All other values refer to the mouse state when the last ``press'' occured. The count is reset to 0 after this call.

button is a symbol.

{\itt 'RELEASE\index{RELEASE@{\tt RELEASE}}}
button
( buttons-down count x y)
Just like {\itt 'PRESS}, except it returns the release count.
{\itt 'LIMITS\index{LIMITS@{\tt LIMITS}}}
{\itt 'HORIZONTAL} x0 x1
Sets the mouse's horizontal viewport. It will not be able to move out of that area. If it is outside at the moment of the call, it will be projected to the border.
{\itt 'LIMITS\index{LIMITS@{\tt LIMITS}}}
{\itt 'VERTICAL} y0 y1
Sets the mouse's vertical viewport.
{\itt 'LIMITS\index{LIMITS@{\tt LIMITS}}}
{\itt 'BOTH} x0 x1 y0 y1
Sets the mouse's viewport.
{\itt 'SHAPE\index{SHAPE@{\tt SHAPE}}}
shape
Sets the graphics pointer. shape is a list: ( x-hot-spot y-hot-spot and-mask xor-mask), where the masks are lists of 16 integers. This function does not affect the text-mode pointer.
{\itt 'CURSOR\index{CURSOR@{\tt CURSOR}}}
name
cursor
Returns a predefined pointer for {\itt 'SHAPE}. Two sources were used to grab bitmapped pointers: the X Windows shared library (in openwin/share/lib/include/bitmaps), and an MSDOS package called ``Precise Point''. Both sources were used without permission.

name is a symbol, and can have values {\itt 'CENTER}, {\itt 'KEYBOARD}, {\itt 'LEFT}, {\itt 'RIGHT}, {\itt 'STAR6}, {\itt 'TARGET} (X Windows) and {\itt 'ARROW}, {\itt 'BLOCK}, {\itt 'CIRCLE}, {\itt 'EXCLAIM}, {\itt 'HAND}, {\itt 'HOURGLAS}, {\itt 'KITE}, {\itt 'MESH}, {\itt 'SMALL}, {\itt 'SQUARE}, {\itt 'STAR4}, {\itt 'TEXT}, {\itt 'X} (Precise Point).

{\itt 'TEXT-TYPE\index{TEXT-TYPE@{\tt TEXT-TYPE}}}
{\itt 'SOFTWARE} and xor
Sets the text-mode pointer to software, i.e. to modification of characters on the screen. and and xor are pairs: ( character . attribute). As a simple example,
(mouse 'TEXT-TYPE 'SOFTWARE
       (cons (integer->char \#xff) \#xff)
       (cons (integer->char 0) \#x80))}
would make the character under the pointer blink.
{\itt 'TEXT-TYPE\index{TEXT-TYPE@{\tt TEXT-TYPE}}}
{\itt 'HARDWARE} start end
Sets the text-mode pointer to hardware, i.e. uses the cursor generator of the graphics adapter. start and end are the start– and end-rows of the cursor, usually in range 0–8 or 0–16. Note that the cursor then serves two uses; this mode should be useful especially in an editor, if the mouse moves are interpreted as cursor positioning.
{\itt 'MICKEYS\index{MICKEYS@{\tt MICKEYS}}}

( x y)
Returns the mouse's movement in Mickeys since the previous call to this function. A Mickey is the mouse's fundamental unit, $\approx$ 1/200inch.
{\itt 'HANDLER\index{HANDLER@{\tt HANDLER}}}
handler
old-handler
Installs an event handler. A handler is a list: ( events . procedure), where events is a list containing any of {\itt 'MOVE}, {\itt 'LEFT-DOWN}, {\itt 'LEFT-UP}, {\itt 'LEFT} (both left-button messages), {\itt 'RIGHT-DOWN}, {\itt 'RIGHT-UP}, {\itt 'RIGHT}, {\itt 'CENTER-DOWN}, {\itt 'CENTER-UP}, {\itt 'CENTER}, {\itt 'DOWN}, {\itt 'UP}, and {\itt 'BUTTONS}. When one of these events occurs, procedure will be called. procedure's arguments are ( triggering-events buttons-down x y mickeys-x mickeys-y event-time). Note that triggering-events is a list, because it may contain more than one event.

An important thing to mention is that normally procedure will not be reinvoked before it returns. Events that occur during procedure's execution are lost. In particular, if procedure does not return (in case of error, for instance), mouse events remain disabled. They can be re-enabled with the next command.

{\itt 'ENABLE\index{ENABLE@{\tt ENABLE}}}
Re-enables event handling. With this, re-entrant mouse-handlers can be written!

In its normal operating mode, mouse stacks up mouse messages and dispatches them one at a time, sending the next message when the dispatch of the previous one returned. If this function is called, the message-dispatching system is spawned; in effect, calling this function from within an event handler may result in the handler being called ``re-entrantly''.

{\itt 'DISABLE\index{DISABLE@{\tt DISABLE}}}
This message suppresses re-entrancy by cancelling the effect of a previous {\itt 'ENABLE}.
{\itt 'PEN-ON\index{PEN-ON@{\tt PEN-ON}}}
Microsoft Manual says ``Light-Pen emulation: Enables light pen emulation by the mouse driver for IBM BASIC. A ``pen down'' condition is created by simultaneously pressing the left and right mouse buttons.'' I tried darn hard to understand this, without success.
{\itt 'PEN-OFF\index{PEN-OFF@{\tt PEN-OFF}}}
ditto.
{\itt 'MICKEY-RATIO\index{MICKEY-RATIO@{\tt MICKEY-RATIO}}}
x y
Sets the number of Mickeys per 8 pixels for horizontal and vertical mouse motion.
{\itt 'EXCLUDE\index{EXCLUDE@{\tt EXCLUDE}}}
x0 x1 y0 y1
Defines a rectangle within which the mouse is invisible.
{\itt 'SPEED-THRESHOLD\index{SPEED-THRESHOLD@{\tt SPEED-THRESHOLD}}}
speed
Sets the speed limit between simple– and double-speed motion, in Mickeys per second.
{\itt 'SENSITIVITY\index{SENSITIVITY@{\tt SENSITIVITY}}}
[x y speed]
( x y speed)
Reads or sets the Mickey ratio and speed threshold.
{\itt 'INTERRUPT-RATE\index{INTERRUPT-RATE@{\tt INTERRUPT-RATE}}}
rate
rate can be {\itt 'NONE}, 30, 50, 100 or 200, and governs the tradeoff between graphic resolution and application performance. It is applicable only to the INPORT mouse (see {\itt 'INFORMATION}).
{\itt 'POINTER-PAGE\index{POINTER-PAGE@{\tt POINTER-PAGE}}}
[page]
page
Reads or sets the display page for the mouse pointer.
{\itt 'LANGUAGE\index{LANGUAGE@{\tt LANGUAGE}}}
[language]
language
Reads or sets the language for mouse driver messages. language can be any of {\itt 'ENGLISH}, {\itt 'FRENCH}, {\itt 'DUTCH}, {\itt 'GERMAN}, {\itt 'SWEDISH}, {\itt 'FINNISH}, {\itt 'SPANISH}, {\itt 'PORTUGESE} or {\itt 'ITALIAN}.
{\itt 'INFORMATION\index{INFORMATION@{\tt INFORMATION}}}

( version type IRQ)
Returns information on the mouse driver. version is a floating-point number. type is a symbol: {\itt 'BUS}, {\itt 'SERIAL}, {\itt 'INPORT}, {\itt 'PS/2} or {\itt 'HP}. IRQ is an integer.