;/* */
;/* mouse-kernel.inc */
;/* */
-;/* Mouse API */
+;/* Mouse API */
;/* */
;/* */
;/* */
-;/* (C) 2003-2006 Ullrich von Bassewitz */
-;/* Römerstraße 52 */
-;/* D-70794 Filderstadt */
-;/* EMail: uz@cc65.org */
+;/* (C) 2003-2009, Ullrich von Bassewitz */
+;/* Roemerstrasse 52 */
+;/* D-70794 Filderstadt */
+;/* EMail: uz@cc65.org */
;/* */
;/* */
;/* */
;------------------------------------------------------------------------------
; The driver header
-.struct MOUSE_HDR
- ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
- VERSION .byte 1 ; Interface version
- JUMPTAB .struct
- INSTALL .addr
- UNINSTALL .addr
- HIDE .addr
- SHOW .addr
- BOX .addr
- MOVE .addr
- BUTTONS .addr
- POS .addr
+.struct MOUSE_HDR
+ ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
+ VERSION .byte 1 ; Interface version
+ LIBREF .addr ; Library reference
+ JUMPTAB .struct
+ INSTALL .addr
+ UNINSTALL .addr
+ HIDE .addr
+ SHOW .addr
+ SETBOX .addr
+ GETBOX .addr
+ MOVE .addr
+ BUTTONS .addr
+ POS .addr
INFO .addr
IOCTL .addr
- IRQ .addr
- .endstruct
+ IRQ .addr
+ .endstruct
FLAGS .byte ; Mouse driver flags
CALLBACKS .struct ; Jump instructions
.byte ; JMP opcode
.byte
CSHOW .addr
.byte
+ CPREP .addr
+ .byte
+ CDRAW .addr
+ .byte
CMOVEX .addr
.byte
CMOVEY .addr
;------------------------------------------------------------------------------
; The mouse callback structure
-.struct MOUSE_CALLBACKS
- HIDE .addr ; Hide the mouse cursor
- SHOW .addr ; Show the mouse cursor
- MOVEX .addr ; Move the mouse cursor
- MOVEY .addr ; Dito for Y
+.struct MOUSE_CALLBACKS
+ HIDE .addr ; Hide the mouse cursor
+ SHOW .addr ; Show the mouse cursor
+ PREP .addr ; Prepare to move the mouse cursor
+ DRAW .addr ; Draw the mouse cursor
+ MOVEX .addr ; Move the mouse cursor to X coord
+ MOVEY .addr ; Move the mouse cursor to Y coord
.endstruct
;------------------------------------------------------------------------------
; The mouse API version, stored in MOUSE_HDR::VERSION
-MOUSE_API_VERSION = $01
+MOUSE_API_VERSION = $05
;------------------------------------------------------------------------------
; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.
;------------------------------------------------------------------------------
; Mouse button definitions
-MOUSE_BTN_LEFT = $10
+MOUSE_BTN_LEFT = $10
MOUSE_BTN_RIGHT = $01
;------------------------------------------------------------------------------
BUTTONS .byte
.endstruct
+.struct MOUSE_BOX
+ MINX .word
+ MINY .word
+ MAXX .word
+ MAXY .word
+.endstruct
;------------------------------------------------------------------------------
; Variables
- .global _mouse_drv ; Pointer to driver
+ .global _mouse_drv ; Pointer to driver
.global _mouse_hidden ; Counter, 0 = mouse is visible
;------------------------------------------------------------------------------
.global _mouse_geterrormsg
.global _mouse_hide
.global _mouse_show
- .global _mouse_box
+ .global _mouse_setbox
+ .global _mouse_getbox
.global _mouse_move
.global _mouse_buttons
.global _mouse_pos
.global _mouse_info
.global _mouse_ioctl
+ .global _mouse_clear_ptr
+
;------------------------------------------------------------------------------
-; Driver entry points
+; Driver entry points (asm callable)
.global mouse_install
.global mouse_uninstall
.global mouse_hide
.global mouse_show
- .global mouse_box
+ .global mouse_setbox
+ .global mouse_getbox
.global mouse_move
.global mouse_buttons
.global mouse_pos
.global mouse_info
.global mouse_ioctl
-
-