]> git.sur5r.net Git - cc65/blobdiff - include/mouse.h
Stefan Haubenthal fixed a few typos.
[cc65] / include / mouse.h
index 4d19e89cf7ac753c2c10abc62afcc77f126133b5..3d62261851546377e787f6b12343b42719fdf5b6 100644 (file)
@@ -60,8 +60,8 @@
 
 /* Structure containing the mouse coordinates */
 struct mouse_pos {
-    int x;
-    int y;
+    int                x;
+    int                y;
 };
 
 /* Structure containing information about the mouse */
@@ -70,6 +70,14 @@ struct mouse_info {
     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.
@@ -96,7 +104,7 @@ struct mouse_callbacks {
 /* The default mouse callbacks */
 extern const struct mouse_callbacks mouse_def_callbacks;
 
-/* The name of the standard joystick driver for a platform */
+/* The name of the standard mouse driver for a platform */
 extern const char mouse_stddrv[];
 
 
@@ -133,7 +141,7 @@ void __fastcall__ mouse_hide (void);
 void __fastcall__ 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
@@ -149,6 +157,9 @@ void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
  * 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.