Changed the mouse API: mouse_box is gone, there are now mouse_getbox and

mouse_setbox instead. Beware: Current drivers will crash until they're
changed!


git-svn-id: svn://svn.cc65.org/cc65/trunk@4230 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-09-26 11:11:14 +00:00
parent 8be28482ac
commit 16e6deaf86
5 changed files with 37 additions and 48 deletions

View 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.
@@ -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.