2011-05-01 17:04:30 +00:00
|
|
|
;
|
|
|
|
; Mouse callbacks for GEOS.
|
|
|
|
;
|
|
|
|
; GEOS has a built-in mouse architecture. Half of this file does nothing
|
|
|
|
; -- it exists merely to allow portable programs to link and run.
|
|
|
|
;
|
|
|
|
; 2.7.2001, Maciej 'YTM/Elysium' Witkowiak
|
|
|
|
; 2004-03-20, Ullrich von Bassewitz
|
|
|
|
; 2004-09-24, Greg King
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
; .constructor init_pointer
|
2011-05-01 17:04:30 +00:00
|
|
|
.export _mouse_def_callbacks
|
|
|
|
|
|
|
|
; .include "mouse-kernel.inc"
|
2013-05-09 11:56:54 +00:00
|
|
|
; .include "const.inc"
|
|
|
|
; .include "geossym.inc"
|
|
|
|
.include "jumptab.inc"
|
2011-05-01 17:04:30 +00:00
|
|
|
|
|
|
|
; .macpack generic
|
|
|
|
|
|
|
|
; The functions below must be interrupt-safe,
|
|
|
|
; because they might be called from an interrupt-handler.
|
|
|
|
|
|
|
|
; --------------------------------------------------------------------------
|
|
|
|
; Hide the mouse pointer. Always called with interrupts disabled.
|
|
|
|
|
|
|
|
hide := MouseOff
|
|
|
|
|
|
|
|
; --------------------------------------------------------------------------
|
|
|
|
; Show the mouse pointer. Always called with interrupts disabled.
|
|
|
|
|
|
|
|
show := MouseUp
|
|
|
|
|
|
|
|
; --------------------------------------------------------------------------
|
2014-01-17 20:09:15 +00:00
|
|
|
; Prepare to move the mouse pointer. Always called with interrupts disabled.
|
2011-05-01 17:04:30 +00:00
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
prep:
|
|
|
|
; Fall through
|
2011-05-01 17:04:30 +00:00
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
; --------------------------------------------------------------------------
|
|
|
|
; Draw the mouse pointer. Always called with interrupts disabled.
|
2011-05-01 17:04:30 +00:00
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
draw:
|
|
|
|
; Fall through
|
2011-05-01 17:04:30 +00:00
|
|
|
|
|
|
|
; --------------------------------------------------------------------------
|
2014-01-17 20:09:15 +00:00
|
|
|
; Move the mouse pointer X position to the value in .XA. Always called with
|
2011-05-01 17:04:30 +00:00
|
|
|
; interrupts disabled.
|
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
movex:
|
|
|
|
; Fall through
|
2011-05-01 17:04:30 +00:00
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
; --------------------------------------------------------------------------
|
|
|
|
; Move the mouse pointer Y position to the value in .XA. Always called with
|
|
|
|
; interrupts disabled.
|
2011-05-01 17:04:30 +00:00
|
|
|
|
2014-01-17 20:09:15 +00:00
|
|
|
movey:
|
|
|
|
rts
|
2011-05-01 17:04:30 +00:00
|
|
|
|
|
|
|
; --------------------------------------------------------------------------
|
|
|
|
; Callback structure
|
|
|
|
|
|
|
|
.rodata
|
|
|
|
|
|
|
|
_mouse_def_callbacks:
|
|
|
|
.addr hide
|
|
|
|
.addr show
|
2014-01-17 20:09:15 +00:00
|
|
|
.addr prep
|
|
|
|
.addr draw
|
2011-05-01 17:04:30 +00:00
|
|
|
.addr movex
|
|
|
|
.addr movey
|