--- np2/macosx/mousemng.h 2003/10/24 12:35:19 1.4 +++ np2/macosx/mousemng.h 2003/11/12 19:56:50 1.5 @@ -1,52 +1,35 @@ -#if defined(NP2GCC) - -#define MOUSE_MASK 7 - -#define M_RES 0x00 -#define M_XOR 0x40 -#define M_SET 0x80 - - -#define MOUSE_OFF (M_RES | 0) -#define MOUSE_ON (M_SET | 0) -#define MOUSE_XOR (M_XOR | 0) -#define MOUSE_CONT (M_RES | 1) -#define MOUSE_STOP (M_SET | 1) -#define MOUSE_CONT_M (M_RES | 2) -#define MOUSE_STOP_M (M_SET | 2) - - -#define MOUSE_LEFTDOWN 0 -#define MOUSE_LEFTUP 1 -#define MOUSE_RIGHTDOWN 2 -#define MOUSE_RIGHTUP 3 +enum { + uPD8255A_LEFTBIT = 0x80, + uPD8255A_RIGHTBIT = 0x20 +}; #ifdef __cplusplus extern "C" { #endif -BYTE mousemng_getstat(short *x, short *y, int clear); - -#ifdef __cplusplus -} -#endif - -BYTE mouse_flag(void); -void mouse_running(BYTE flg); -void mouse_callback(HIPoint delta); -BYTE mouse_btn(BYTE btn); - -#else -#ifdef __cplusplus -extern "C" { -#endif - BYTE mousemng_getstat(SINT16 *x, SINT16 *y, int clear); #ifdef __cplusplus } #endif -#endif +enum { + MOUSEMNG_LEFTDOWN = 0, + MOUSEMNG_LEFTUP, + MOUSEMNG_RIGHTDOWN, + MOUSEMNG_RIGHTUP +}; + +enum { + MOUSEPROC_SYSTEM = 0, + MOUSEPROC_MACUI +}; + +void mousemng_initialize(void); +void mousemng_callback(HIPoint delta); +BOOL mousemng_buttonevent(UINT event); +void mousemng_enable(UINT proc); +void mousemng_disable(UINT proc); +void mousemng_toggle(UINT proc);