2016-09-24 10:41:12 +01:00
|
|
|
#ifndef MOUSE_H
|
|
|
|
|
#define MOUSE_H
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
MOUSE_BUTTON_LEFT,
|
|
|
|
|
MOUSE_BUTTON_RIGHT,
|
|
|
|
|
MOUSE_BUTTON_MIDDLE,
|
|
|
|
|
MOUSE_BUTTON_MAX,
|
|
|
|
|
};
|
|
|
|
|
|
2016-10-15 15:52:16 +01:00
|
|
|
typedef struct {
|
|
|
|
|
int inited;
|
|
|
|
|
int x, y;
|
|
|
|
|
int lastX, lastY;
|
|
|
|
|
int buttonsPressed[MOUSE_BUTTON_MAX];
|
|
|
|
|
int buttonsReleased[MOUSE_BUTTON_MAX];
|
|
|
|
|
int buttonsDown[MOUSE_BUTTON_MAX];
|
|
|
|
|
} mouse_State;
|
|
|
|
|
|
2016-09-24 10:41:12 +01:00
|
|
|
void mouse_init(void);
|
|
|
|
|
void mouse_update(void);
|
2016-10-15 15:52:16 +01:00
|
|
|
mouse_State* mouse_getState(void);
|
2016-09-24 10:41:12 +01:00
|
|
|
|
|
|
|
|
#endif
|