Files
lovedos/src/mouse.h

32 lines
412 B
C
Raw Normal View History

#ifndef MOUSE_H
#define MOUSE_H
enum {
MOUSE_BUTTON_LEFT,
MOUSE_BUTTON_RIGHT,
MOUSE_BUTTON_MIDDLE,
MOUSE_BUTTON_MAX
};
enum {
MOUSE_PRESSED,
MOUSE_RELEASED,
MOUSE_MOVED
};
2016-10-15 15:52:16 +01:00
typedef struct {
int type;
2016-10-15 15:52:16 +01:00
int x, y;
int dx, dy;
int button;
} mouse_Event;
2016-10-15 15:52:16 +01:00
void mouse_init(void);
int mouse_poll(mouse_Event *e);
int mouse_isDown(int button);
int mouse_getX(void);
int mouse_getY(void);
#endif