]> git.sur5r.net Git - cc65/commitdiff
Wrapper for mouse_box
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 23 Mar 2004 21:49:37 +0000 (21:49 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 23 Mar 2004 21:49:37 +0000 (21:49 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2955 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/mouse/Makefile
libsrc/mouse/mouse_box.s [new file with mode: 0644]

index a2138d04a8654b236f285a433669770c28e698d2..a48ebf4ac78ad65ec62e5aa21460d904ca5a021a 100644 (file)
@@ -20,6 +20,7 @@
 C_OBJS =        mouse_load.o
 
 S_OBJS =        mouse-kernel.o  \
+                mouse_box.o     \
                 mouse_hide.o    \
                 mouse_info.o    \
                 mouse_ioctl.o   \
diff --git a/libsrc/mouse/mouse_box.s b/libsrc/mouse/mouse_box.s
new file mode 100644 (file)
index 0000000..e94feda
--- /dev/null
@@ -0,0 +1,33 @@
+;
+; Ullrich von Bassewitz, 2004-03-23
+;
+; void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
+; /* 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
+;  * given margins. The proper way to use this function therefore is:
+;  *
+;  *   - Hide the mouse
+;  *   - Set the bounding box
+;  *   - Place the mouse at the desired position
+;  *   - Show the mouse again.
+;  *
+;  * NOTE2: When setting the box to something that is larger than the actual
+;  * 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.
+;  */
+;
+
+        .import         incsp6
+
+        .include        "mouse-kernel.inc"
+
+.proc   _mouse_box
+
+        jsr     mouse_box               ; Call the driver
+        jmp     incsp6                  ; Cleanup the stack
+
+.endproc
+
+
+