125,6 → 125,66 |
int mouse_setthreshold(int t); |
void mouse_hook(MOUSE_HANDLER h); |
|
|
/* |
* |
* mouse autocursor management |
* |
*/ |
|
/* commands for mouse_grxcursor() & mouse_txtcursor() */ |
#define DISABLE 0x00 |
#define ENABLE 0x01 |
|
/* flags for mouse_grxcursor() & mouse_txtcursor() (to use with '|') */ |
#define WITHOUTSEM 0x10 |
#define AUTOOFF 0x20 |
|
/* mask to extrac the status from autocursormode */ |
#define STATUSMASK 0x0f |
|
/* flags for autocursormode (there are some other flags into mouse.h) */ |
#define GRXCURSOR 0x100 |
#define TXTCURSOR 0x200 |
|
/* dimensions of the grx shape */ |
#define MOUSESHAPEDX 16 |
#define MOUSESHAPEDY 16 |
|
/* hot-spot of the grx image (coordinates of the center's shape, zero-based) */ |
#define MOUSEHOTSPOTX 3 |
#define MOUSEHOTSPOTY 1 |
|
/* those macros can be used to set the correct mouse_limit() when |
* the graphics autocursor is enable (to avoid wrong shape position because |
* there is not graphics clip functions) |
*/ |
#define XMINLIMIT(dimx,dimy) (MOUSEHOTSPOTX) |
#define XMAXLIMIT(dimx,dimy) ((dimx)-MOUSESHAPEDX+MOUSEHOTSPOTX) |
#define YMINLIMIT(dimx,dimy) (MOUSEHOTSPOTY) |
#define YMAXLIMIT(dimx,dimy) ((dimy)-MOUSESHAPEDY+MOUSEHOTSPOTY) |
|
#define mouse_grxlimit(dimx,dimy) mouse_limit(\ |
XMINLIMIT(dimx,dimy), \ |
YMINLIMIT(dimx,dimy), \ |
XMAXLIMIT(dimx,dimy), \ |
YMAXLIMIT(dimx,dimy) \ |
) |
|
/* these are used to select the mouse shape */ |
int mouse_txtshape(DWORD img); |
int mouse_grxshape(BYTE *shape, BYTE *mask, int bpp_in); |
|
/* enable/disable mouse pointer */ |
/* (return <0 on error) */ |
/* (for the cmd parameter see above) */ |
int mouse_grxcursor(int cmd, int bpp); |
int mouse_txtcursor(int cmd); |
|
/* mouse on/off (or show/hide) */ |
void (*mouse_on)(void); |
void (*mouse_off)(void); |
|
#ifdef __cplusplus |
}; |
#endif |