]> git.sur5r.net Git - cc65/blobdiff - include/mouse.h
Remove this copy of the apple include file - a copy was added to asminc
[cc65] / include / mouse.h
index a27cdf85762211798a752e16cadca3f193dd7bae..136bfd15e7b04ceb6d43a4a7ab12bd4838620017 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003      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                                                */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
@@ -82,12 +82,23 @@ struct mouse_callbacks {
     void (*show) (void);
     /* Show the mouse cursor */
 
-    void (*move) (void);
-    /* Move the mouse cursor. This function is called, even when the cursor
-     * is currently invisible.
+    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 __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[];
+
 
 
 /*****************************************************************************/
@@ -96,21 +107,23 @@ struct mouse_callbacks {
 
 
 
-unsigned char __fastcall__ mouse_set_callbacks (const struct mouse_callbacks* c);
-/* Sets the callbacks to be used by the driver. */
-
-unsigned char __fastcall__ mouse_load_driver (const char* driver);
+unsigned char __fastcall__ mouse_load_driver (const struct mouse_callbacks* c,
+                                              const char* driver);
 /* Load and install a mouse driver, return an error code. */
 
 unsigned char __fastcall__ mouse_unload (void);
 /* Uninstall, then unload the currently loaded driver. */
 
-unsigned char __fastcall__ mouse_install (void* 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);
 /* 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);
 /* 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
@@ -132,7 +145,7 @@ void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
  *     - Show the mouse again.
  *
  * NOTE2: When setting the box to something that is larger than the actual
- * screen, the positioning of the mouse cursor will fail. If such margins
+ * screen, the positioning of the mouse cursor can fail. If such margins
  * are really what you want, you have to use your own cursor routines.
  */
 
@@ -155,8 +168,8 @@ void __fastcall__ mouse_info (struct mouse_info* info);
 /* Return the state of the mouse buttons and the position of the mouse */
 
 unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data);
-/* Call the driver specific ioctl function. NON PORTABLE! Returns an error 
- * code. 
+/* Call the driver specific ioctl function. NON PORTABLE! Returns an error
+ * code.
  */