master
ブランチ master
Tetris / deps / raylib / src / external / glfw / src / null_platform.h
11.5 KB、271行 生 Blame 履歴
1//========================================================================
2// GLFW 3.4 - www.glfw.org
3//------------------------------------------------------------------------
4// Copyright (c) 2016 Google Inc.
5// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
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#define GLFW_NULL_WINDOW_STATE _GLFWwindowNull null;
29#define GLFW_NULL_LIBRARY_WINDOW_STATE _GLFWlibraryNull null;
30#define GLFW_NULL_MONITOR_STATE _GLFWmonitorNull null;
31
32#define GLFW_NULL_CONTEXT_STATE
33#define GLFW_NULL_CURSOR_STATE
34#define GLFW_NULL_LIBRARY_CONTEXT_STATE
35
36#define GLFW_NULL_SC_FIRST GLFW_NULL_SC_SPACE
37#define GLFW_NULL_SC_SPACE 1
38#define GLFW_NULL_SC_APOSTROPHE 2
39#define GLFW_NULL_SC_COMMA 3
40#define GLFW_NULL_SC_MINUS 4
41#define GLFW_NULL_SC_PERIOD 5
42#define GLFW_NULL_SC_SLASH 6
43#define GLFW_NULL_SC_0 7
44#define GLFW_NULL_SC_1 8
45#define GLFW_NULL_SC_2 9
46#define GLFW_NULL_SC_3 10
47#define GLFW_NULL_SC_4 11
48#define GLFW_NULL_SC_5 12
49#define GLFW_NULL_SC_6 13
50#define GLFW_NULL_SC_7 14
51#define GLFW_NULL_SC_8 15
52#define GLFW_NULL_SC_9 16
53#define GLFW_NULL_SC_SEMICOLON 17
54#define GLFW_NULL_SC_EQUAL 18
55#define GLFW_NULL_SC_LEFT_BRACKET 19
56#define GLFW_NULL_SC_BACKSLASH 20
57#define GLFW_NULL_SC_RIGHT_BRACKET 21
58#define GLFW_NULL_SC_GRAVE_ACCENT 22
59#define GLFW_NULL_SC_WORLD_1 23
60#define GLFW_NULL_SC_WORLD_2 24
61#define GLFW_NULL_SC_ESCAPE 25
62#define GLFW_NULL_SC_ENTER 26
63#define GLFW_NULL_SC_TAB 27
64#define GLFW_NULL_SC_BACKSPACE 28
65#define GLFW_NULL_SC_INSERT 29
66#define GLFW_NULL_SC_DELETE 30
67#define GLFW_NULL_SC_RIGHT 31
68#define GLFW_NULL_SC_LEFT 32
69#define GLFW_NULL_SC_DOWN 33
70#define GLFW_NULL_SC_UP 34
71#define GLFW_NULL_SC_PAGE_UP 35
72#define GLFW_NULL_SC_PAGE_DOWN 36
73#define GLFW_NULL_SC_HOME 37
74#define GLFW_NULL_SC_END 38
75#define GLFW_NULL_SC_CAPS_LOCK 39
76#define GLFW_NULL_SC_SCROLL_LOCK 40
77#define GLFW_NULL_SC_NUM_LOCK 41
78#define GLFW_NULL_SC_PRINT_SCREEN 42
79#define GLFW_NULL_SC_PAUSE 43
80#define GLFW_NULL_SC_A 44
81#define GLFW_NULL_SC_B 45
82#define GLFW_NULL_SC_C 46
83#define GLFW_NULL_SC_D 47
84#define GLFW_NULL_SC_E 48
85#define GLFW_NULL_SC_F 49
86#define GLFW_NULL_SC_G 50
87#define GLFW_NULL_SC_H 51
88#define GLFW_NULL_SC_I 52
89#define GLFW_NULL_SC_J 53
90#define GLFW_NULL_SC_K 54
91#define GLFW_NULL_SC_L 55
92#define GLFW_NULL_SC_M 56
93#define GLFW_NULL_SC_N 57
94#define GLFW_NULL_SC_O 58
95#define GLFW_NULL_SC_P 59
96#define GLFW_NULL_SC_Q 60
97#define GLFW_NULL_SC_R 61
98#define GLFW_NULL_SC_S 62
99#define GLFW_NULL_SC_T 63
100#define GLFW_NULL_SC_U 64
101#define GLFW_NULL_SC_V 65
102#define GLFW_NULL_SC_W 66
103#define GLFW_NULL_SC_X 67
104#define GLFW_NULL_SC_Y 68
105#define GLFW_NULL_SC_Z 69
106#define GLFW_NULL_SC_F1 70
107#define GLFW_NULL_SC_F2 71
108#define GLFW_NULL_SC_F3 72
109#define GLFW_NULL_SC_F4 73
110#define GLFW_NULL_SC_F5 74
111#define GLFW_NULL_SC_F6 75
112#define GLFW_NULL_SC_F7 76
113#define GLFW_NULL_SC_F8 77
114#define GLFW_NULL_SC_F9 78
115#define GLFW_NULL_SC_F10 79
116#define GLFW_NULL_SC_F11 80
117#define GLFW_NULL_SC_F12 81
118#define GLFW_NULL_SC_F13 82
119#define GLFW_NULL_SC_F14 83
120#define GLFW_NULL_SC_F15 84
121#define GLFW_NULL_SC_F16 85
122#define GLFW_NULL_SC_F17 86
123#define GLFW_NULL_SC_F18 87
124#define GLFW_NULL_SC_F19 88
125#define GLFW_NULL_SC_F20 89
126#define GLFW_NULL_SC_F21 90
127#define GLFW_NULL_SC_F22 91
128#define GLFW_NULL_SC_F23 92
129#define GLFW_NULL_SC_F24 93
130#define GLFW_NULL_SC_F25 94
131#define GLFW_NULL_SC_KP_0 95
132#define GLFW_NULL_SC_KP_1 96
133#define GLFW_NULL_SC_KP_2 97
134#define GLFW_NULL_SC_KP_3 98
135#define GLFW_NULL_SC_KP_4 99
136#define GLFW_NULL_SC_KP_5 100
137#define GLFW_NULL_SC_KP_6 101
138#define GLFW_NULL_SC_KP_7 102
139#define GLFW_NULL_SC_KP_8 103
140#define GLFW_NULL_SC_KP_9 104
141#define GLFW_NULL_SC_KP_DECIMAL 105
142#define GLFW_NULL_SC_KP_DIVIDE 106
143#define GLFW_NULL_SC_KP_MULTIPLY 107
144#define GLFW_NULL_SC_KP_SUBTRACT 108
145#define GLFW_NULL_SC_KP_ADD 109
146#define GLFW_NULL_SC_KP_ENTER 110
147#define GLFW_NULL_SC_KP_EQUAL 111
148#define GLFW_NULL_SC_LEFT_SHIFT 112
149#define GLFW_NULL_SC_LEFT_CONTROL 113
150#define GLFW_NULL_SC_LEFT_ALT 114
151#define GLFW_NULL_SC_LEFT_SUPER 115
152#define GLFW_NULL_SC_RIGHT_SHIFT 116
153#define GLFW_NULL_SC_RIGHT_CONTROL 117
154#define GLFW_NULL_SC_RIGHT_ALT 118
155#define GLFW_NULL_SC_RIGHT_SUPER 119
156#define GLFW_NULL_SC_MENU 120
157#define GLFW_NULL_SC_LAST GLFW_NULL_SC_MENU
158
159// Null-specific per-window data
160//
161typedef struct _GLFWwindowNull
162{
163 int xpos;
164 int ypos;
165 int width;
166 int height;
167 GLFWbool visible;
168 GLFWbool iconified;
169 GLFWbool maximized;
170 GLFWbool resizable;
171 GLFWbool decorated;
172 GLFWbool floating;
173 GLFWbool transparent;
174 float opacity;
175} _GLFWwindowNull;
176
177// Null-specific per-monitor data
178//
179typedef struct _GLFWmonitorNull
180{
181 GLFWgammaramp ramp;
182} _GLFWmonitorNull;
183
184// Null-specific global data
185//
186typedef struct _GLFWlibraryNull
187{
188 int xcursor;
189 int ycursor;
190 char* clipboardString;
191 _GLFWwindow* focusedWindow;
192 uint16_t keycodes[GLFW_NULL_SC_LAST + 1];
193 uint8_t scancodes[GLFW_KEY_LAST + 1];
194} _GLFWlibraryNull;
195
196void _glfwPollMonitorsNull(void);
197
198GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform);
199int _glfwInitNull(void);
200void _glfwTerminateNull(void);
201
202void _glfwFreeMonitorNull(_GLFWmonitor* monitor);
203void _glfwGetMonitorPosNull(_GLFWmonitor* monitor, int* xpos, int* ypos);
204void _glfwGetMonitorContentScaleNull(_GLFWmonitor* monitor, float* xscale, float* yscale);
205void _glfwGetMonitorWorkareaNull(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
206GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found);
207GLFWbool _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode);
208GLFWbool _glfwGetGammaRampNull(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
209void _glfwSetGammaRampNull(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
210
211GLFWbool _glfwCreateWindowNull(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
212void _glfwDestroyWindowNull(_GLFWwindow* window);
213void _glfwSetWindowTitleNull(_GLFWwindow* window, const char* title);
214void _glfwSetWindowIconNull(_GLFWwindow* window, int count, const GLFWimage* images);
215void _glfwSetWindowMonitorNull(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
216void _glfwGetWindowPosNull(_GLFWwindow* window, int* xpos, int* ypos);
217void _glfwSetWindowPosNull(_GLFWwindow* window, int xpos, int ypos);
218void _glfwGetWindowSizeNull(_GLFWwindow* window, int* width, int* height);
219void _glfwSetWindowSizeNull(_GLFWwindow* window, int width, int height);
220void _glfwSetWindowSizeLimitsNull(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
221void _glfwSetWindowAspectRatioNull(_GLFWwindow* window, int n, int d);
222void _glfwGetFramebufferSizeNull(_GLFWwindow* window, int* width, int* height);
223void _glfwGetWindowFrameSizeNull(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
224void _glfwGetWindowContentScaleNull(_GLFWwindow* window, float* xscale, float* yscale);
225void _glfwIconifyWindowNull(_GLFWwindow* window);
226void _glfwRestoreWindowNull(_GLFWwindow* window);
227void _glfwMaximizeWindowNull(_GLFWwindow* window);
228GLFWbool _glfwWindowMaximizedNull(_GLFWwindow* window);
229GLFWbool _glfwWindowHoveredNull(_GLFWwindow* window);
230GLFWbool _glfwFramebufferTransparentNull(_GLFWwindow* window);
231void _glfwSetWindowResizableNull(_GLFWwindow* window, GLFWbool enabled);
232void _glfwSetWindowDecoratedNull(_GLFWwindow* window, GLFWbool enabled);
233void _glfwSetWindowFloatingNull(_GLFWwindow* window, GLFWbool enabled);
234void _glfwSetWindowMousePassthroughNull(_GLFWwindow* window, GLFWbool enabled);
235float _glfwGetWindowOpacityNull(_GLFWwindow* window);
236void _glfwSetWindowOpacityNull(_GLFWwindow* window, float opacity);
237void _glfwSetRawMouseMotionNull(_GLFWwindow *window, GLFWbool enabled);
238GLFWbool _glfwRawMouseMotionSupportedNull(void);
239void _glfwShowWindowNull(_GLFWwindow* window);
240void _glfwRequestWindowAttentionNull(_GLFWwindow* window);
241void _glfwHideWindowNull(_GLFWwindow* window);
242void _glfwFocusWindowNull(_GLFWwindow* window);
243GLFWbool _glfwWindowFocusedNull(_GLFWwindow* window);
244GLFWbool _glfwWindowIconifiedNull(_GLFWwindow* window);
245GLFWbool _glfwWindowVisibleNull(_GLFWwindow* window);
246void _glfwPollEventsNull(void);
247void _glfwWaitEventsNull(void);
248void _glfwWaitEventsTimeoutNull(double timeout);
249void _glfwPostEmptyEventNull(void);
250void _glfwGetCursorPosNull(_GLFWwindow* window, double* xpos, double* ypos);
251void _glfwSetCursorPosNull(_GLFWwindow* window, double x, double y);
252void _glfwSetCursorModeNull(_GLFWwindow* window, int mode);
253GLFWbool _glfwCreateCursorNull(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
254GLFWbool _glfwCreateStandardCursorNull(_GLFWcursor* cursor, int shape);
255void _glfwDestroyCursorNull(_GLFWcursor* cursor);
256void _glfwSetCursorNull(_GLFWwindow* window, _GLFWcursor* cursor);
257void _glfwSetClipboardStringNull(const char* string);
258const char* _glfwGetClipboardStringNull(void);
259const char* _glfwGetScancodeNameNull(int scancode);
260int _glfwGetKeyScancodeNull(int key);
261
262EGLenum _glfwGetEGLPlatformNull(EGLint** attribs);
263EGLNativeDisplayType _glfwGetEGLNativeDisplayNull(void);
264EGLNativeWindowType _glfwGetEGLNativeWindowNull(_GLFWwindow* window);
265
266void _glfwGetRequiredInstanceExtensionsNull(char** extensions);
267GLFWbool _glfwGetPhysicalDevicePresentationSupportNull(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
268VkResult _glfwCreateWindowSurfaceNull(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
269
270void _glfwPollMonitorsNull(void);
271