null_platform.h (11827B)
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 // 161 typedef 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 // 179 typedef struct _GLFWmonitorNull 180 { 181 GLFWgammaramp ramp; 182 } _GLFWmonitorNull; 183 184 // Null-specific global data 185 // 186 typedef 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 196 void _glfwPollMonitorsNull(void); 197 198 GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform); 199 int _glfwInitNull(void); 200 void _glfwTerminateNull(void); 201 202 void _glfwFreeMonitorNull(_GLFWmonitor* monitor); 203 void _glfwGetMonitorPosNull(_GLFWmonitor* monitor, int* xpos, int* ypos); 204 void _glfwGetMonitorContentScaleNull(_GLFWmonitor* monitor, float* xscale, float* yscale); 205 void _glfwGetMonitorWorkareaNull(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height); 206 GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found); 207 GLFWbool _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode); 208 GLFWbool _glfwGetGammaRampNull(_GLFWmonitor* monitor, GLFWgammaramp* ramp); 209 void _glfwSetGammaRampNull(_GLFWmonitor* monitor, const GLFWgammaramp* ramp); 210 211 GLFWbool _glfwCreateWindowNull(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig); 212 void _glfwDestroyWindowNull(_GLFWwindow* window); 213 void _glfwSetWindowTitleNull(_GLFWwindow* window, const char* title); 214 void _glfwSetWindowIconNull(_GLFWwindow* window, int count, const GLFWimage* images); 215 void _glfwSetWindowMonitorNull(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); 216 void _glfwGetWindowPosNull(_GLFWwindow* window, int* xpos, int* ypos); 217 void _glfwSetWindowPosNull(_GLFWwindow* window, int xpos, int ypos); 218 void _glfwGetWindowSizeNull(_GLFWwindow* window, int* width, int* height); 219 void _glfwSetWindowSizeNull(_GLFWwindow* window, int width, int height); 220 void _glfwSetWindowSizeLimitsNull(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); 221 void _glfwSetWindowAspectRatioNull(_GLFWwindow* window, int n, int d); 222 void _glfwGetFramebufferSizeNull(_GLFWwindow* window, int* width, int* height); 223 void _glfwGetWindowFrameSizeNull(_GLFWwindow* window, int* left, int* top, int* right, int* bottom); 224 void _glfwGetWindowContentScaleNull(_GLFWwindow* window, float* xscale, float* yscale); 225 void _glfwIconifyWindowNull(_GLFWwindow* window); 226 void _glfwRestoreWindowNull(_GLFWwindow* window); 227 void _glfwMaximizeWindowNull(_GLFWwindow* window); 228 GLFWbool _glfwWindowMaximizedNull(_GLFWwindow* window); 229 GLFWbool _glfwWindowHoveredNull(_GLFWwindow* window); 230 GLFWbool _glfwFramebufferTransparentNull(_GLFWwindow* window); 231 void _glfwSetWindowResizableNull(_GLFWwindow* window, GLFWbool enabled); 232 void _glfwSetWindowDecoratedNull(_GLFWwindow* window, GLFWbool enabled); 233 void _glfwSetWindowFloatingNull(_GLFWwindow* window, GLFWbool enabled); 234 void _glfwSetWindowMousePassthroughNull(_GLFWwindow* window, GLFWbool enabled); 235 float _glfwGetWindowOpacityNull(_GLFWwindow* window); 236 void _glfwSetWindowOpacityNull(_GLFWwindow* window, float opacity); 237 void _glfwSetRawMouseMotionNull(_GLFWwindow *window, GLFWbool enabled); 238 GLFWbool _glfwRawMouseMotionSupportedNull(void); 239 void _glfwShowWindowNull(_GLFWwindow* window); 240 void _glfwRequestWindowAttentionNull(_GLFWwindow* window); 241 void _glfwHideWindowNull(_GLFWwindow* window); 242 void _glfwFocusWindowNull(_GLFWwindow* window); 243 GLFWbool _glfwWindowFocusedNull(_GLFWwindow* window); 244 GLFWbool _glfwWindowIconifiedNull(_GLFWwindow* window); 245 GLFWbool _glfwWindowVisibleNull(_GLFWwindow* window); 246 void _glfwPollEventsNull(void); 247 void _glfwWaitEventsNull(void); 248 void _glfwWaitEventsTimeoutNull(double timeout); 249 void _glfwPostEmptyEventNull(void); 250 void _glfwGetCursorPosNull(_GLFWwindow* window, double* xpos, double* ypos); 251 void _glfwSetCursorPosNull(_GLFWwindow* window, double x, double y); 252 void _glfwSetCursorModeNull(_GLFWwindow* window, int mode); 253 GLFWbool _glfwCreateCursorNull(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot); 254 GLFWbool _glfwCreateStandardCursorNull(_GLFWcursor* cursor, int shape); 255 void _glfwDestroyCursorNull(_GLFWcursor* cursor); 256 void _glfwSetCursorNull(_GLFWwindow* window, _GLFWcursor* cursor); 257 void _glfwSetClipboardStringNull(const char* string); 258 const char* _glfwGetClipboardStringNull(void); 259 const char* _glfwGetScancodeNameNull(int scancode); 260 int _glfwGetKeyScancodeNull(int key); 261 262 EGLenum _glfwGetEGLPlatformNull(EGLint** attribs); 263 EGLNativeDisplayType _glfwGetEGLNativeDisplayNull(void); 264 EGLNativeWindowType _glfwGetEGLNativeWindowNull(_GLFWwindow* window); 265 266 void _glfwGetRequiredInstanceExtensionsNull(char** extensions); 267 GLFWbool _glfwGetPhysicalDevicePresentationSupportNull(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); 268 VkResult _glfwCreateWindowSurfaceNull(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); 269 270 void _glfwPollMonitorsNull(void); 271