From 9886114870807550ead715e453a53835d4b23afd Mon Sep 17 00:00:00 2001 From: deuce <> Date: Mon, 30 Aug 2004 02:21:00 +0000 Subject: [PATCH] Add macros for button-related stuff. --- src/conio/mouse.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/conio/mouse.h b/src/conio/mouse.h index ee383ed53e..37b0f9f4a5 100644 --- a/src/conio/mouse.h +++ b/src/conio/mouse.h @@ -15,6 +15,8 @@ struct mouse_event { #define CIOLIB_BUTTON_2 2 #define CIOLIB_BUTTON_3 4 +#define CIOLIB_BUTTON(x) (1<<(x-1)) + enum { CIOLIB_MOUSE_MOVE ,CIOLIB_BUTTON_1_PRESS @@ -46,4 +48,14 @@ enum { ,CIOLIB_BUTTON_3_DRAG_END }; +#define CIOLIB_BUTTON_PRESS(x) ((x-1)*9+1) +#define CIOLIB_BUTTON_RELEASE(x) ((x-1)*9+2) +#define CIOLIB_BUTTON_CLICK(x) ((x-1)*9+3) +#define CIOLIB_BUTTON_DBL_CLICK(x) ((x-1)*9+4) +#define CIOLIB_BUTTON_TRPL_CLICK(x) ((x-1)*9+5) +#define CIOLIB_BUTTON_QUAD_CLOCK(x) ((x-1)*9+6) +#define CIOLIB_BUTTON_DRAG_START(x) ((x-1)*9+7) +#define CIOLIB_BUTTON_DRAG_MOVE(x) ((x-1)*9+8) +#define CIOLIB_BUTTON_DRAG_END(x) ((x-1)*9+9) + #endif -- GitLab