-
Notifications
You must be signed in to change notification settings - Fork 913
/
Copy pathmouse.h
47 lines (43 loc) · 945 Bytes
/
mouse.h
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
44
45
46
47
#pragma once
#ifndef MOUSE_H
#define MOUSE_H
#include "../base/os.h"
#include "../base/types.h"
#include <stdbool.h>
#if defined(IS_MACOSX)
#include <ApplicationServices/ApplicationServices.h>
typedef enum {
LEFT_BUTTON = kCGMouseButtonLeft,
RIGHT_BUTTON = kCGMouseButtonRight,
CENTER_BUTTON = kCGMouseButtonCenter,
WheelDown = 4,
WheelUp = 5,
WheelLeft = 6,
WheelRight = 7,
} MMMouseButton;
#elif defined(USE_X11)
enum _MMMouseButton {
LEFT_BUTTON = 1,
CENTER_BUTTON = 2,
RIGHT_BUTTON = 3,
WheelDown = 4,
WheelUp = 5,
WheelLeft = 6,
WheelRight = 7,
};
typedef unsigned int MMMouseButton;
#elif defined(IS_WINDOWS)
enum _MMMouseButton {
LEFT_BUTTON = 1,
CENTER_BUTTON = 2,
RIGHT_BUTTON = 3,
WheelDown = 4,
WheelUp = 5,
WheelLeft = 6,
WheelRight = 7,
};
typedef unsigned int MMMouseButton;
#else
#error "No mouse button constants set for platform"
#endif
#endif /* MOUSE_H */