home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
progmisc
/
euphor10.zip
/
MOUSE.E
< prev
next >
Wrap
Text File
|
1993-06-21
|
781b
|
30 lines
--------------------
-- Mouse Routines --
--------------------
-- Mouse Event Numbers:
global constant MOVE = 1, -- track every movement of the mouse
LEFT_DOWN = 2, -- the rest are button pressing/releasing
LEFT_UP = 4,
RIGHT_DOWN = 8,
RIGHT_UP = 16,
MIDDLE_DOWN = 32,
MIDDLE_UP = 64
constant GET_MOUSE = 14,
MOUSE_EVENTS = 15
global function get_mouse()
-- report mouse events,
-- returns -1 if no mouse event,
-- otherwise returns {event#, x-coord, y-coord}
return machine_func(GET_MOUSE, 0)
end function
global procedure mouse_events(integer events)
-- select the mouse events to be reported by get_mouse()
-- e.g. mouse_events(LEFT_UP + LEFT_DOWN + RIGHT_DOWN)
machine_proc(MOUSE_EVENTS, events)
end procedure