1//========================================================================
2// GLFW 3.4 - www.glfw.org
3//------------------------------------------------------------------------
4// Copyright (c) 2002-2006 Marcus Geelnard
5// Copyright (c) 2006-2018 Camilla Löwy <[email protected]>
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10//
11// Permission is granted to anyone to use this software for any purpose,
12// including commercial applications, and to alter it and redistribute it
13// freely, subject to the following restrictions:
14//
15// 1. The origin of this software must not be misrepresented; you must not
16// claim that you wrote the original software. If you use this software
17// in a product, an acknowledgment in the product documentation would
18// be appreciated but is not required.
19//
20// 2. Altered source versions must be plainly marked as such, and must not
21// be misrepresented as being the original software.
22//
23// 3. This notice may not be removed or altered from any source
24// distribution.
25//
26//========================================================================
27
28#include "null_platform.h"
29
30#if defined(_GLFW_WIN32)
31 #include "win32_platform.h"
32#else
33 #define GLFW_WIN32_WINDOW_STATE
34 #define GLFW_WIN32_MONITOR_STATE
35 #define GLFW_WIN32_CURSOR_STATE
36 #define GLFW_WIN32_LIBRARY_WINDOW_STATE
37 #define GLFW_WGL_CONTEXT_STATE
38 #define GLFW_WGL_LIBRARY_CONTEXT_STATE
39#endif
40
41#if defined(_GLFW_COCOA)
42 #include "cocoa_platform.h"
43#else
44 #define GLFW_COCOA_WINDOW_STATE
45 #define GLFW_COCOA_MONITOR_STATE
46 #define GLFW_COCOA_CURSOR_STATE
47 #define GLFW_COCOA_LIBRARY_WINDOW_STATE
48 #define GLFW_NSGL_CONTEXT_STATE
49 #define GLFW_NSGL_LIBRARY_CONTEXT_STATE
50#endif
51
52#if defined(_GLFW_WAYLAND)
53 #include "wl_platform.h"
54#else
55 #define GLFW_WAYLAND_WINDOW_STATE
56 #define GLFW_WAYLAND_MONITOR_STATE
57 #define GLFW_WAYLAND_CURSOR_STATE
58 #define GLFW_WAYLAND_LIBRARY_WINDOW_STATE
59#endif
60
61#if defined(_GLFW_X11)
62 #include "x11_platform.h"
63#else
64 #define GLFW_X11_WINDOW_STATE
65 #define GLFW_X11_MONITOR_STATE
66 #define GLFW_X11_CURSOR_STATE
67 #define GLFW_X11_LIBRARY_WINDOW_STATE
68 #define GLFW_GLX_CONTEXT_STATE
69 #define GLFW_GLX_LIBRARY_CONTEXT_STATE
70#endif
71
72#include "null_joystick.h"
73
74#if defined(_GLFW_WIN32)
75 #include "win32_joystick.h"
76#else
77 #define GLFW_WIN32_JOYSTICK_STATE
78 #define GLFW_WIN32_LIBRARY_JOYSTICK_STATE
79#endif
80
81#if defined(_GLFW_COCOA)
82 #include "cocoa_joystick.h"
83#else
84 #define GLFW_COCOA_JOYSTICK_STATE
85 #define GLFW_COCOA_LIBRARY_JOYSTICK_STATE
86#endif
87
88#if (defined(_GLFW_X11) || defined(_GLFW_WAYLAND)) && defined(__linux__)
89 #include "linux_joystick.h"
90#else
91 #define GLFW_LINUX_JOYSTICK_STATE
92 #define GLFW_LINUX_LIBRARY_JOYSTICK_STATE
93#endif
94
95#if defined(_WIN32)
96 #include "win32_thread.h"
97 #define GLFW_POSIX_TLS_STATE
98 #define GLFW_POSIX_MUTEX_STATE
99#else
100 #include "posix_thread.h"
101 #define GLFW_WIN32_TLS_STATE
102 #define GLFW_WIN32_MUTEX_STATE
103#endif
104
105#if defined(_WIN32)
106 #include "win32_time.h"
107 #define GLFW_POSIX_LIBRARY_TIMER_STATE
108 #define GLFW_COCOA_LIBRARY_TIMER_STATE
109#elif defined(__APPLE__)
110 #include "cocoa_time.h"
111 #define GLFW_WIN32_LIBRARY_TIMER_STATE
112 #define GLFW_POSIX_LIBRARY_TIMER_STATE
113#else
114 #include "posix_time.h"
115 #define GLFW_WIN32_LIBRARY_TIMER_STATE
116 #define GLFW_COCOA_LIBRARY_TIMER_STATE
117#endif
118
119#define GLFW_PLATFORM_WINDOW_STATE \
120 GLFW_WIN32_WINDOW_STATE \
121 GLFW_COCOA_WINDOW_STATE \
122 GLFW_WAYLAND_WINDOW_STATE \
123 GLFW_X11_WINDOW_STATE \
124 GLFW_NULL_WINDOW_STATE \
125
126#define GLFW_PLATFORM_MONITOR_STATE \
127 GLFW_WIN32_MONITOR_STATE \
128 GLFW_COCOA_MONITOR_STATE \
129 GLFW_WAYLAND_MONITOR_STATE \
130 GLFW_X11_MONITOR_STATE \
131 GLFW_NULL_MONITOR_STATE \
132
133#define GLFW_PLATFORM_CURSOR_STATE \
134 GLFW_WIN32_CURSOR_STATE \
135 GLFW_COCOA_CURSOR_STATE \
136 GLFW_WAYLAND_CURSOR_STATE \
137 GLFW_X11_CURSOR_STATE \
138 GLFW_NULL_CURSOR_STATE \
139
140#define GLFW_PLATFORM_JOYSTICK_STATE \
141 GLFW_WIN32_JOYSTICK_STATE \
142 GLFW_COCOA_JOYSTICK_STATE \
143 GLFW_LINUX_JOYSTICK_STATE
144
145#define GLFW_PLATFORM_TLS_STATE \
146 GLFW_WIN32_TLS_STATE \
147 GLFW_POSIX_TLS_STATE \
148
149#define GLFW_PLATFORM_MUTEX_STATE \
150 GLFW_WIN32_MUTEX_STATE \
151 GLFW_POSIX_MUTEX_STATE \
152
153#define GLFW_PLATFORM_LIBRARY_WINDOW_STATE \
154 GLFW_WIN32_LIBRARY_WINDOW_STATE \
155 GLFW_COCOA_LIBRARY_WINDOW_STATE \
156 GLFW_WAYLAND_LIBRARY_WINDOW_STATE \
157 GLFW_X11_LIBRARY_WINDOW_STATE \
158 GLFW_NULL_LIBRARY_WINDOW_STATE \
159
160#define GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \
161 GLFW_WIN32_LIBRARY_JOYSTICK_STATE \
162 GLFW_COCOA_LIBRARY_JOYSTICK_STATE \
163 GLFW_LINUX_LIBRARY_JOYSTICK_STATE
164
165#define GLFW_PLATFORM_LIBRARY_TIMER_STATE \
166 GLFW_WIN32_LIBRARY_TIMER_STATE \
167 GLFW_COCOA_LIBRARY_TIMER_STATE \
168 GLFW_POSIX_LIBRARY_TIMER_STATE \
169
170#define GLFW_PLATFORM_CONTEXT_STATE \
171 GLFW_WGL_CONTEXT_STATE \
172 GLFW_NSGL_CONTEXT_STATE \
173 GLFW_GLX_CONTEXT_STATE
174
175#define GLFW_PLATFORM_LIBRARY_CONTEXT_STATE \
176 GLFW_WGL_LIBRARY_CONTEXT_STATE \
177 GLFW_NSGL_LIBRARY_CONTEXT_STATE \
178 GLFW_GLX_LIBRARY_CONTEXT_STATE
179
180