/* */
/* */
/* */
-/* (C) 2003-2004 Ullrich von Bassewitz */
-/* Römerstraße 52 */
-/* D-70794 Filderstadt */
-/* EMail: uz@cc65.org */
+/* (C) 2003-2011, Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* */
/* Structure containing the mouse coordinates */
struct mouse_pos {
- int x;
- int y;
+ int x;
+ int y;
};
/* Structure containing information about the mouse */
unsigned char buttons; /* Mouse button mask */
};
+/* Structure used for getbox/setbox */
+struct mouse_box {
+ int minx;
+ int miny;
+ int maxx;
+ int maxy;
+};
+
/* Structure containing mouse callback functions. These functions are declared
* in C notation here, but they cannot be C functions (at least not easily),
* since they may be called from within an interrupt.
void (*show) (void);
/* Show the mouse cursor */
- void (*movex) (void);
+ void __fastcall__ (*movex) (int x);
/* Move the mouse cursor to the new X coordinate. This function is called,
* even when the cursor is currently invisible.
*/
- void (*movey) (void);
+ void __fastcall__ (*movey) (int y);
/* Move the mouse cursor to the new Y coordinate. This function is called,
* even when the cursor is currently invisible.
*/
/* The default mouse callbacks */
extern const struct mouse_callbacks mouse_def_callbacks;
+/* The name of the standard mouse driver for a platform */
+extern const char mouse_stddrv[];
+
/*****************************************************************************/
const char* driver);
/* Load and install a mouse driver, return an error code. */
-unsigned char __fastcall__ mouse_unload (void);
+unsigned char mouse_unload (void);
/* Uninstall, then unload the currently loaded driver. */
unsigned char __fastcall__ mouse_install (const struct mouse_callbacks* c,
void* driver);
/* Install an already loaded driver. Returns an error code. */
-unsigned char __fastcall__ mouse_uninstall (void);
+unsigned char mouse_uninstall (void);
/* Uninstall the currently loaded driver. Returns an error code. */
const char* __fastcall__ mouse_geterrormsg (unsigned char code);
/* Get an error message describing the error in code. */
-void __fastcall__ mouse_hide (void);
+void mouse_hide (void);
/* Hide the mouse. The function manages a counter and may be called more than
* once. For each call to mouse_hide there must be a call to mouse_show to make
* the mouse visible again.
*/
-void __fastcall__ mouse_show (void);
+void mouse_show (void);
/* Show the mouse. See mouse_hide for more information. */
-void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
+void __fastcall__ mouse_setbox (const struct mouse_box* box);
/* Set the bounding box for the mouse pointer movement. The mouse X and Y
* coordinates will never go outside the given box.
* NOTE: The function does *not* check if the mouse is currently inside the
* are really what you want, you have to use your own cursor routines.
*/
+void __fastcall__ mouse_getbox (struct mouse_box* box);
+/* Get the current bounding box for the mouse pointer movement. */
+
void __fastcall__ mouse_move (int x, int y);
/* Set the mouse cursor to the given position. If a mouse cursor is defined
* and currently visible, the mouse cursor is also moved.
* inside the bounding box.
*/
-unsigned char __fastcall__ mouse_buttons (void);
+unsigned char mouse_buttons (void);
/* Return a bit mask encoding the states of the mouse buttons. Use the
* MOUSE_BTN_XXX flags to decode a specific button.
*/