-
Notifications
You must be signed in to change notification settings - Fork 4
/
host.h
113 lines (92 loc) · 2.61 KB
/
host.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#if (!defined(WINDOW_WIN32) && !defined(WINDOW_GTK3) && !defined(WINDOW_MINIMAL))
#ifdef __linux__
#define WINDOW_GTK3
#else
#define WINDOW_WIN32
#endif
#endif
#ifdef WINDOW_GTK3
//Which window protocol is in use. Only select one. Some IO drivers work only on some protocols.
//This refers to the deepest underlying API; for example X11, Wayland or Win32.
#define WNDPROT_X11
//#define WNDPROT_WINDOWS
//Which window toolkit to use. Pick exactly one.
//This refers to the top-level API that draws the widgets. Can be Qt, GTK+, Win32, or similar.
//#define WINDOW_GTK3
//#define WINDOW_WIN32
//Which input/video/audio drivers to enable. Multiple of each kind may be enabled.
#define INPUT_UDEV
#define INPUT_GDK
//#define INPUT_RAWINPUT
#define INPUT_XINPUT2
#define INPUT_X11
//#define INPUT_DIRECTINPUT
#define INPUTCUR_XRECORD
//#define INPUTCUR_RAWINPUT
#define INPUTCUR_X11
//#define INPUTCUR_WIN32
//#define VIDEO_D3D9
//#define VIDEO_DDRAW
#define VIDEO_OPENGL
//#define VIDEO_GDI
#define VIDEO_XSHM
//#define AUDIO_PULSEAUDIO//defined by the configure script
//#define AUDIO_DIRECTSOUND
//#define AUDIO_WASAPI
#endif
#ifdef WINDOW_WIN32
//Which window protocol is in use. Only select one. Some IO drivers work only on some protocols.
//#define WNDPROT_X11
#define WNDPROT_WINDOWS
//Which window toolkit to use. Pick exactly one.
//#define WINDOW_GTK3
//#define WINDOW_WIN32
//Which input/video/audio drivers to enable. Multiple of each kind may be enabled.
//#define INPUT_UDEV
//#define INPUT_GDK
#define INPUT_RAWINPUT
//#define INPUT_XINPUT2
//#define INPUT_X11
#define INPUT_DIRECTINPUT
//#define INPUTCUR_XRECORD
#define INPUTCUR_RAWINPUT
//#define INPUTCUR_X11
#define INPUTCUR_WIN32
#define VIDEO_D3D9
#define VIDEO_DDRAW
#define VIDEO_OPENGL
#define VIDEO_GDI
//#define VIDEO_XSHM
//#define AUDIO_PULSEAUDIO
#define AUDIO_DIRECTSOUND
#if _WIN32_WINNT > 0x0600
#define AUDIO_WASAPI
#endif
#endif
#ifdef __APPLE__
#define __unix__ 1 // you're a Unix, OSX, stop pretending not to be. Are you not proud of your heritage?
#error not implemented.
#endif
#ifdef __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#define LIKELY(expr) __builtin_expect(!!(expr), true)
#define UNLIKELY(expr) __builtin_expect(!!(expr), false)
#else
#define GCC_VERSION 0
#define LIKELY(expr) (expr)
#define UNLIKELY(expr) (expr)
#endif
#if __cplusplus >= 201103L
#define HAVE_MOVE
#endif
#if defined(__linux__) || GCC_VERSION >= 40900
#define HAVE_ASPRINTF
#endif
#ifdef WINDOW_GTK3
#define NEED_ICON_PNG
#endif
#ifdef WINDOW_WIN32
#define NEED_MANUAL_LAYOUT
#endif