00001 00007 // /** 00008 // *@defgroup mouseh mouse.h 00009 // *Handles mouse input 00010 // *@note Does not trigger mouse events; events are handled by the mousehandler function in the handler.c 00011 // *routines. The mousehandler function is called by this modules mousecheck function via a function pointer. 00012 // *@{ 00013 // */ 00014 00015 /*----------------------------------------------------------------------------------------------------------*/ 00016 00017 typedef enum mouse_events { 00018 MOUSE_L = 0x1, 00019 MOUSE_L_NEW = 0x2, 00020 MOUSE_R = 0x4, 00021 MOUSE_R_NEW = 0x8, 00022 MOUSE_M = 0x10, 00023 MOUSE_M_NEW = 0x20 00024 } MOUSEEVENTS; 00025 00026 /*----------------------------------------------------------------------------------------------------------*/ 00027 00028 typedef struct mouse { 00029 MOUSEEVENTS button; 00030 int x; 00031 int y; 00032 int z; 00033 int dx; 00034 int dy; 00035 int dz; 00036 } MOUSE; 00037 00038 /*----------------------------------------------------------------------------------------------------------*/ 00039 00040 typedef void* (*MOUSE_CALLBACK)(MOUSE*, void*); 00041 00042 /*----------------------------------------------------------------------------------------------------------*/ 00043 00044 void mousedown(ALLEGRO_MOUSE_EVENT *mouse_data); 00045 00046 /*----------------------------------------------------------------------------------------------------------*/ 00047 00048 void mouseup(ALLEGRO_MOUSE_EVENT *mouse_data); 00049 00050 /*----------------------------------------------------------------------------------------------------------*/ 00051 00052 void mouseaxes(ALLEGRO_MOUSE_EVENT *mouse_data); 00053 00054 /*----------------------------------------------------------------------------------------------------------*/ 00055 00056 void mouseupdate(void); 00057 00058 /*----------------------------------------------------------------------------------------------------------*/ 00059 00060 void* mousecheck(MOUSE_CALLBACK func, void* data); 00061 00062 /*----------------------------------------------------------------------------------------------------------*/ 00063 00064 // /** 00065 // *@} 00066 // */