-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDGLMOUSE.H
More file actions
executable file
·43 lines (31 loc) · 912 Bytes
/
Copy pathDGLMOUSE.H
File metadata and controls
executable file
·43 lines (31 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef LIBDGL_DGLMOUSE_H
#define LIBDGL_DGLMOUSE_H
#include "dglcmn.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef uint8 MOUSE_BUTTON;
#define MOUSE_LEFTBUTTON 0x01
#define MOUSE_RIGHTBUTTON 0x02
#define MOUSE_CENTERBUTTON 0x04
extern volatile int mouse_x;
extern volatile int mouse_y;
extern volatile int mouse_buttons;
extern volatile int mouse_delta_x;
extern volatile int mouse_delta_y;
bool mouse_init(void);
bool mouse_shutdown(void);
bool mouse_is_initialized(void);
bool mouse_is_present(void);
void mouse_show(void);
void mouse_hide(void);
void mouse_set_bounds(int min_x, int min_y, int max_x, int max_y);
static bool mouse_button(int button);
// --------------------------------------------------------------------------
static bool mouse_button(int button) {
return (mouse_buttons & button) != 0;
}
#ifdef __cplusplus
}
#endif
#endif