1 ;/*****************************************************************************/
3 ;/* mouse-kernel.inc */
9 ;/* (C) 2003-2004 Ullrich von Bassewitz */
11 ;/* D-70794 Filderstadt */
12 ;/* EMail: uz@cc65.org */
17 ;/* This software is provided 'as-is', without any expressed or implied */
18 ;/* warranty. In no event will the authors be held liable for any damages */
19 ;/* arising from the use of this software. */
21 ;/* Permission is granted to anyone to use this software for any purpose, */
22 ;/* including commercial applications, and to alter it and redistribute it */
23 ;/* freely, subject to the following restrictions: */
25 ;/* 1. The origin of this software must not be misrepresented; you must not */
26 ;/* claim that you wrote the original software. If you use this software */
27 ;/* in a product, an acknowledgment in the product documentation would be */
28 ;/* appreciated but is not required. */
29 ;/* 2. Altered source versions must be plainly marked as such, and must not */
30 ;/* be misrepresented as being the original software. */
31 ;/* 3. This notice may not be removed or altered from any source */
34 ;/*****************************************************************************/
39 ;------------------------------------------------------------------------------
43 MOUSE_ERR_OK ; No error
44 MOUSE_ERR_NO_DRIVER ; No driver available
45 MOUSE_ERR_CANNOT_LOAD ; Error loading driver
46 MOUSE_ERR_INV_DRIVER ; Invalid driver
47 MOUSE_ERR_NO_DEVICE ; Mouse hardware not found
48 MOUSE_ERR_INV_IOCTL ; Invalid ioctl code
51 ;------------------------------------------------------------------------------
55 ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
56 VERSION .byte 1 ; Interface version
70 XPOS .word ; Mouse X position
71 YPOS .word ; Mouse Y position
72 CALLBACKS .struct ; Jump instructions
74 CHIDE .addr ; Jump address
84 ;------------------------------------------------------------------------------
85 ; The mouse callback structure
87 .struct MOUSE_CALLBACKS
88 HIDE .addr ; Hide the mouse cursor
89 SHOW .addr ; Show the mouse cursor
90 MOVEX .addr ; Move the mouse cursor
91 MOVEY .addr ; Dito for Y
94 ;------------------------------------------------------------------------------
95 ; The mouse API version, stored in MOUSE_HDR::VERSION
97 MOUSE_API_VERSION = $00
99 ;------------------------------------------------------------------------------
100 ; Mouse button definitions
103 MOUSE_BTN_RIGHT = $01
105 ;------------------------------------------------------------------------------
106 ; Structures used to return data from the mouse driver
119 ;------------------------------------------------------------------------------
122 .global _mouse_drv ; Pointer to driver
123 .global _mouse_hidden ; Counter, 0 = mouse is visible
125 ;------------------------------------------------------------------------------
126 ; C callable functions
128 .global _mouse_load_driver
129 .global _mouse_unload
130 .global _mouse_install
131 .global _mouse_uninstall
136 .global _mouse_buttons
141 ;------------------------------------------------------------------------------
142 ; Driver entry points
144 .global mouse_install
145 .global mouse_uninstall
150 .global mouse_buttons