glfw3.c 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/GLFW/CMakeLists.txt +368 -0
  2. package/GLFW/cocoa_init.m +694 -0
  3. package/GLFW/cocoa_joystick.h +49 -0
  4. package/GLFW/cocoa_joystick.m +485 -0
  5. package/GLFW/cocoa_monitor.m +643 -0
  6. package/GLFW/cocoa_platform.h +302 -0
  7. package/GLFW/cocoa_time.c +57 -0
  8. package/GLFW/cocoa_time.h +35 -0
  9. package/GLFW/cocoa_window.m +2072 -0
  10. package/GLFW/context.c +765 -0
  11. package/GLFW/egl_context.c +911 -0
  12. package/GLFW/glfw.rc.in +30 -0
  13. package/GLFW/glfw3.c +109 -0
  14. package/GLFW/glfw3.h +6564 -0
  15. package/GLFW/glfw3native.h +663 -0
  16. package/GLFW/glx_context.c +719 -0
  17. package/GLFW/init.c +528 -0
  18. package/GLFW/input.c +1505 -0
  19. package/GLFW/internal.h +1022 -0
  20. package/GLFW/linux_joystick.c +436 -0
  21. package/GLFW/linux_joystick.h +64 -0
  22. package/GLFW/mappings.h +1001 -0
  23. package/GLFW/mappings.h.in +82 -0
  24. package/GLFW/monitor.c +548 -0
  25. package/GLFW/nsgl_context.m +384 -0
  26. package/GLFW/null_init.c +264 -0
  27. package/GLFW/null_joystick.c +56 -0
  28. package/GLFW/null_joystick.h +32 -0
  29. package/GLFW/null_monitor.c +160 -0
  30. package/GLFW/null_platform.h +271 -0
  31. package/GLFW/null_window.c +719 -0
  32. package/GLFW/osmesa_context.c +383 -0
  33. package/GLFW/platform.c +214 -0
  34. package/GLFW/platform.h +212 -0
  35. package/GLFW/posix_module.c +53 -0
  36. package/GLFW/posix_poll.c +83 -0
  37. package/GLFW/posix_poll.h +30 -0
  38. package/GLFW/posix_thread.c +107 -0
  39. package/GLFW/posix_thread.h +49 -0
  40. package/GLFW/posix_time.c +65 -0
  41. package/GLFW/posix_time.h +41 -0
  42. package/GLFW/vulkan.c +328 -0
  43. package/GLFW/wgl_context.c +798 -0
  44. package/GLFW/win32_init.c +731 -0
  45. package/GLFW/win32_joystick.c +767 -0
  46. package/GLFW/win32_joystick.h +51 -0
  47. package/GLFW/win32_module.c +51 -0
  48. package/GLFW/win32_monitor.c +569 -0
  49. package/GLFW/win32_platform.h +631 -0
  50. package/GLFW/win32_thread.c +100 -0
  51. package/GLFW/win32_thread.h +53 -0
  52. package/GLFW/win32_time.c +54 -0
  53. package/GLFW/win32_time.h +43 -0
  54. package/GLFW/win32_window.c +2592 -0
  55. package/GLFW/window.c +1172 -0
  56. package/GLFW/wl_init.c +1003 -0
  57. package/GLFW/wl_monitor.c +274 -0
  58. package/GLFW/wl_platform.h +691 -0
  59. package/GLFW/wl_window.c +3308 -0
  60. package/GLFW/x11_init.c +1656 -0
  61. package/GLFW/x11_monitor.c +641 -0
  62. package/GLFW/x11_platform.h +1004 -0
  63. package/GLFW/x11_window.c +3357 -0
  64. package/GLFW/xkb_unicode.c +943 -0
  65. package/GLFW/xkb_unicode.h +30 -0
  66. package/LICENSE +22 -0
  67. package/README.md +236 -0
  68. package/package.json +32 -0
@@ -0,0 +1,302 @@
1
+ //========================================================================
2
+ // GLFW 3.4 macOS - www.glfw.org
3
+ //------------------------------------------------------------------------
4
+ // Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
5
+ //
6
+ // This software is provided 'as-is', without any express or implied
7
+ // warranty. In no event will the authors be held liable for any damages
8
+ // arising from the use of this software.
9
+ //
10
+ // Permission is granted to anyone to use this software for any purpose,
11
+ // including commercial applications, and to alter it and redistribute it
12
+ // freely, subject to the following restrictions:
13
+ //
14
+ // 1. The origin of this software must not be misrepresented; you must not
15
+ // claim that you wrote the original software. If you use this software
16
+ // in a product, an acknowledgment in the product documentation would
17
+ // be appreciated but is not required.
18
+ //
19
+ // 2. Altered source versions must be plainly marked as such, and must not
20
+ // be misrepresented as being the original software.
21
+ //
22
+ // 3. This notice may not be removed or altered from any source
23
+ // distribution.
24
+ //
25
+ //========================================================================
26
+
27
+ #include <stdint.h>
28
+
29
+ #include <Carbon/Carbon.h>
30
+ #include <IOKit/hid/IOHIDLib.h>
31
+
32
+ // NOTE: All of NSGL was deprecated in the 10.14 SDK
33
+ // This disables the pointless warnings for every symbol we use
34
+ #ifndef GL_SILENCE_DEPRECATION
35
+ #define GL_SILENCE_DEPRECATION
36
+ #endif
37
+
38
+ #if defined(__OBJC__)
39
+ #import <Cocoa/Cocoa.h>
40
+ #else
41
+ typedef void* id;
42
+ #endif
43
+
44
+ // NOTE: Many Cocoa enum values have been renamed and we need to build across
45
+ // SDK versions where one is unavailable or deprecated.
46
+ // We use the newer names in code and replace them with the older names if
47
+ // the base SDK does not provide the newer names.
48
+
49
+ #if MAC_OS_X_VERSION_MAX_ALLOWED < 101400
50
+ #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval
51
+ #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity
52
+ #endif
53
+
54
+ #if MAC_OS_X_VERSION_MAX_ALLOWED < 101200
55
+ #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat
56
+ #define NSEventMaskAny NSAnyEventMask
57
+ #define NSEventMaskKeyUp NSKeyUpMask
58
+ #define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
59
+ #define NSEventModifierFlagCommand NSCommandKeyMask
60
+ #define NSEventModifierFlagControl NSControlKeyMask
61
+ #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
62
+ #define NSEventModifierFlagOption NSAlternateKeyMask
63
+ #define NSEventModifierFlagShift NSShiftKeyMask
64
+ #define NSEventTypeApplicationDefined NSApplicationDefined
65
+ #define NSWindowStyleMaskBorderless NSBorderlessWindowMask
66
+ #define NSWindowStyleMaskClosable NSClosableWindowMask
67
+ #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
68
+ #define NSWindowStyleMaskResizable NSResizableWindowMask
69
+ #define NSWindowStyleMaskTitled NSTitledWindowMask
70
+ #endif
71
+
72
+ // NOTE: Many Cocoa dynamically linked constants have been renamed and we need
73
+ // to build across SDK versions where one is unavailable or deprecated.
74
+ // We use the newer names in code and replace them with the older names if
75
+ // the deployment target is older than the newer names.
76
+
77
+ #if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
78
+ #define NSPasteboardTypeURL NSURLPboardType
79
+ #endif
80
+
81
+ typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
82
+ typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
83
+
84
+ typedef struct VkMacOSSurfaceCreateInfoMVK
85
+ {
86
+ VkStructureType sType;
87
+ const void* pNext;
88
+ VkMacOSSurfaceCreateFlagsMVK flags;
89
+ const void* pView;
90
+ } VkMacOSSurfaceCreateInfoMVK;
91
+
92
+ typedef struct VkMetalSurfaceCreateInfoEXT
93
+ {
94
+ VkStructureType sType;
95
+ const void* pNext;
96
+ VkMetalSurfaceCreateFlagsEXT flags;
97
+ const void* pLayer;
98
+ } VkMetalSurfaceCreateInfoEXT;
99
+
100
+ typedef VkResult (APIENTRY *PFN_vkCreateMacOSSurfaceMVK)(VkInstance,const VkMacOSSurfaceCreateInfoMVK*,const VkAllocationCallbacks*,VkSurfaceKHR*);
101
+ typedef VkResult (APIENTRY *PFN_vkCreateMetalSurfaceEXT)(VkInstance,const VkMetalSurfaceCreateInfoEXT*,const VkAllocationCallbacks*,VkSurfaceKHR*);
102
+
103
+ #define GLFW_COCOA_WINDOW_STATE _GLFWwindowNS ns;
104
+ #define GLFW_COCOA_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns;
105
+ #define GLFW_COCOA_MONITOR_STATE _GLFWmonitorNS ns;
106
+ #define GLFW_COCOA_CURSOR_STATE _GLFWcursorNS ns;
107
+
108
+ #define GLFW_NSGL_CONTEXT_STATE _GLFWcontextNSGL nsgl;
109
+ #define GLFW_NSGL_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl;
110
+
111
+ // HIToolbox.framework pointer typedefs
112
+ #define kTISPropertyUnicodeKeyLayoutData _glfw.ns.tis.kPropertyUnicodeKeyLayoutData
113
+ typedef TISInputSourceRef (*PFN_TISCopyCurrentKeyboardLayoutInputSource)(void);
114
+ #define TISCopyCurrentKeyboardLayoutInputSource _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource
115
+ typedef void* (*PFN_TISGetInputSourceProperty)(TISInputSourceRef,CFStringRef);
116
+ #define TISGetInputSourceProperty _glfw.ns.tis.GetInputSourceProperty
117
+ typedef UInt8 (*PFN_LMGetKbdType)(void);
118
+ #define LMGetKbdType _glfw.ns.tis.GetKbdType
119
+
120
+
121
+ // NSGL-specific per-context data
122
+ //
123
+ typedef struct _GLFWcontextNSGL
124
+ {
125
+ id pixelFormat;
126
+ id object;
127
+ } _GLFWcontextNSGL;
128
+
129
+ // NSGL-specific global data
130
+ //
131
+ typedef struct _GLFWlibraryNSGL
132
+ {
133
+ // dlopen handle for OpenGL.framework (for glfwGetProcAddress)
134
+ CFBundleRef framework;
135
+ } _GLFWlibraryNSGL;
136
+
137
+ // Cocoa-specific per-window data
138
+ //
139
+ typedef struct _GLFWwindowNS
140
+ {
141
+ id object;
142
+ id delegate;
143
+ id view;
144
+ id layer;
145
+
146
+ GLFWbool maximized;
147
+ GLFWbool occluded;
148
+ GLFWbool scaleFramebuffer;
149
+
150
+ // Cached window properties to filter out duplicate events
151
+ int width, height;
152
+ int fbWidth, fbHeight;
153
+ float xscale, yscale;
154
+
155
+ // The total sum of the distances the cursor has been warped
156
+ // since the last cursor motion event was processed
157
+ // This is kept to counteract Cocoa doing the same internally
158
+ double cursorWarpDeltaX, cursorWarpDeltaY;
159
+ } _GLFWwindowNS;
160
+
161
+ // Cocoa-specific global data
162
+ //
163
+ typedef struct _GLFWlibraryNS
164
+ {
165
+ CGEventSourceRef eventSource;
166
+ id delegate;
167
+ GLFWbool cursorHidden;
168
+ TISInputSourceRef inputSource;
169
+ IOHIDManagerRef hidManager;
170
+ id unicodeData;
171
+ id helper;
172
+ id keyUpMonitor;
173
+ id nibObjects;
174
+
175
+ char keynames[GLFW_KEY_LAST + 1][17];
176
+ short int keycodes[256];
177
+ short int scancodes[GLFW_KEY_LAST + 1];
178
+ char* clipboardString;
179
+ CGPoint cascadePoint;
180
+ // Where to place the cursor when re-enabled
181
+ double restoreCursorPosX, restoreCursorPosY;
182
+ // The window whose disabled cursor mode is active
183
+ _GLFWwindow* disabledCursorWindow;
184
+
185
+ struct {
186
+ CFBundleRef bundle;
187
+ PFN_TISCopyCurrentKeyboardLayoutInputSource CopyCurrentKeyboardLayoutInputSource;
188
+ PFN_TISGetInputSourceProperty GetInputSourceProperty;
189
+ PFN_LMGetKbdType GetKbdType;
190
+ CFStringRef kPropertyUnicodeKeyLayoutData;
191
+ } tis;
192
+ } _GLFWlibraryNS;
193
+
194
+ // Cocoa-specific per-monitor data
195
+ //
196
+ typedef struct _GLFWmonitorNS
197
+ {
198
+ CGDirectDisplayID displayID;
199
+ CGDisplayModeRef previousMode;
200
+ uint32_t unitNumber;
201
+ id screen;
202
+ double fallbackRefreshRate;
203
+ } _GLFWmonitorNS;
204
+
205
+ // Cocoa-specific per-cursor data
206
+ //
207
+ typedef struct _GLFWcursorNS
208
+ {
209
+ id object;
210
+ } _GLFWcursorNS;
211
+
212
+
213
+ GLFWbool _glfwConnectCocoa(int platformID, _GLFWplatform* platform);
214
+ int _glfwInitCocoa(void);
215
+ void _glfwTerminateCocoa(void);
216
+
217
+ GLFWbool _glfwCreateWindowCocoa(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
218
+ void _glfwDestroyWindowCocoa(_GLFWwindow* window);
219
+ void _glfwSetWindowTitleCocoa(_GLFWwindow* window, const char* title);
220
+ void _glfwSetWindowIconCocoa(_GLFWwindow* window, int count, const GLFWimage* images);
221
+ void _glfwGetWindowPosCocoa(_GLFWwindow* window, int* xpos, int* ypos);
222
+ void _glfwSetWindowPosCocoa(_GLFWwindow* window, int xpos, int ypos);
223
+ void _glfwGetWindowSizeCocoa(_GLFWwindow* window, int* width, int* height);
224
+ void _glfwSetWindowSizeCocoa(_GLFWwindow* window, int width, int height);
225
+ void _glfwSetWindowSizeLimitsCocoa(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
226
+ void _glfwSetWindowAspectRatioCocoa(_GLFWwindow* window, int numer, int denom);
227
+ void _glfwGetFramebufferSizeCocoa(_GLFWwindow* window, int* width, int* height);
228
+ void _glfwGetWindowFrameSizeCocoa(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
229
+ void _glfwGetWindowContentScaleCocoa(_GLFWwindow* window, float* xscale, float* yscale);
230
+ void _glfwIconifyWindowCocoa(_GLFWwindow* window);
231
+ void _glfwRestoreWindowCocoa(_GLFWwindow* window);
232
+ void _glfwMaximizeWindowCocoa(_GLFWwindow* window);
233
+ void _glfwShowWindowCocoa(_GLFWwindow* window);
234
+ void _glfwHideWindowCocoa(_GLFWwindow* window);
235
+ void _glfwRequestWindowAttentionCocoa(_GLFWwindow* window);
236
+ void _glfwFocusWindowCocoa(_GLFWwindow* window);
237
+ void _glfwSetWindowMonitorCocoa(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
238
+ GLFWbool _glfwWindowFocusedCocoa(_GLFWwindow* window);
239
+ GLFWbool _glfwWindowIconifiedCocoa(_GLFWwindow* window);
240
+ GLFWbool _glfwWindowVisibleCocoa(_GLFWwindow* window);
241
+ GLFWbool _glfwWindowMaximizedCocoa(_GLFWwindow* window);
242
+ GLFWbool _glfwWindowHoveredCocoa(_GLFWwindow* window);
243
+ GLFWbool _glfwFramebufferTransparentCocoa(_GLFWwindow* window);
244
+ void _glfwSetWindowResizableCocoa(_GLFWwindow* window, GLFWbool enabled);
245
+ void _glfwSetWindowDecoratedCocoa(_GLFWwindow* window, GLFWbool enabled);
246
+ void _glfwSetWindowFloatingCocoa(_GLFWwindow* window, GLFWbool enabled);
247
+ float _glfwGetWindowOpacityCocoa(_GLFWwindow* window);
248
+ void _glfwSetWindowOpacityCocoa(_GLFWwindow* window, float opacity);
249
+ void _glfwSetWindowMousePassthroughCocoa(_GLFWwindow* window, GLFWbool enabled);
250
+
251
+ void _glfwSetRawMouseMotionCocoa(_GLFWwindow *window, GLFWbool enabled);
252
+ GLFWbool _glfwRawMouseMotionSupportedCocoa(void);
253
+
254
+ void _glfwPollEventsCocoa(void);
255
+ void _glfwWaitEventsCocoa(void);
256
+ void _glfwWaitEventsTimeoutCocoa(double timeout);
257
+ void _glfwPostEmptyEventCocoa(void);
258
+
259
+ void _glfwGetCursorPosCocoa(_GLFWwindow* window, double* xpos, double* ypos);
260
+ void _glfwSetCursorPosCocoa(_GLFWwindow* window, double xpos, double ypos);
261
+ void _glfwSetCursorModeCocoa(_GLFWwindow* window, int mode);
262
+ const char* _glfwGetScancodeNameCocoa(int scancode);
263
+ int _glfwGetKeyScancodeCocoa(int key);
264
+ GLFWbool _glfwCreateCursorCocoa(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
265
+ GLFWbool _glfwCreateStandardCursorCocoa(_GLFWcursor* cursor, int shape);
266
+ void _glfwDestroyCursorCocoa(_GLFWcursor* cursor);
267
+ void _glfwSetCursorCocoa(_GLFWwindow* window, _GLFWcursor* cursor);
268
+ void _glfwSetClipboardStringCocoa(const char* string);
269
+ const char* _glfwGetClipboardStringCocoa(void);
270
+
271
+ EGLenum _glfwGetEGLPlatformCocoa(EGLint** attribs);
272
+ EGLNativeDisplayType _glfwGetEGLNativeDisplayCocoa(void);
273
+ EGLNativeWindowType _glfwGetEGLNativeWindowCocoa(_GLFWwindow* window);
274
+
275
+ void _glfwGetRequiredInstanceExtensionsCocoa(char** extensions);
276
+ GLFWbool _glfwGetPhysicalDevicePresentationSupportCocoa(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
277
+ VkResult _glfwCreateWindowSurfaceCocoa(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
278
+
279
+ void _glfwFreeMonitorCocoa(_GLFWmonitor* monitor);
280
+ void _glfwGetMonitorPosCocoa(_GLFWmonitor* monitor, int* xpos, int* ypos);
281
+ void _glfwGetMonitorContentScaleCocoa(_GLFWmonitor* monitor, float* xscale, float* yscale);
282
+ void _glfwGetMonitorWorkareaCocoa(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
283
+ GLFWvidmode* _glfwGetVideoModesCocoa(_GLFWmonitor* monitor, int* count);
284
+ GLFWbool _glfwGetVideoModeCocoa(_GLFWmonitor* monitor, GLFWvidmode* mode);
285
+ GLFWbool _glfwGetGammaRampCocoa(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
286
+ void _glfwSetGammaRampCocoa(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
287
+
288
+ void _glfwPollMonitorsCocoa(void);
289
+ void _glfwSetVideoModeCocoa(_GLFWmonitor* monitor, const GLFWvidmode* desired);
290
+ void _glfwRestoreVideoModeCocoa(_GLFWmonitor* monitor);
291
+
292
+ float _glfwTransformYCocoa(float y);
293
+
294
+ void* _glfwLoadLocalVulkanLoaderCocoa(void);
295
+
296
+ GLFWbool _glfwInitNSGL(void);
297
+ void _glfwTerminateNSGL(void);
298
+ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
299
+ const _GLFWctxconfig* ctxconfig,
300
+ const _GLFWfbconfig* fbconfig);
301
+ void _glfwDestroyContextNSGL(_GLFWwindow* window);
302
+
@@ -0,0 +1,57 @@
1
+ //========================================================================
2
+ // GLFW 3.4 macOS - www.glfw.org
3
+ //------------------------------------------------------------------------
4
+ // Copyright (c) 2009-2016 Camilla Löwy <elmindreda@glfw.org>
5
+ //
6
+ // This software is provided 'as-is', without any express or implied
7
+ // warranty. In no event will the authors be held liable for any damages
8
+ // arising from the use of this software.
9
+ //
10
+ // Permission is granted to anyone to use this software for any purpose,
11
+ // including commercial applications, and to alter it and redistribute it
12
+ // freely, subject to the following restrictions:
13
+ //
14
+ // 1. The origin of this software must not be misrepresented; you must not
15
+ // claim that you wrote the original software. If you use this software
16
+ // in a product, an acknowledgment in the product documentation would
17
+ // be appreciated but is not required.
18
+ //
19
+ // 2. Altered source versions must be plainly marked as such, and must not
20
+ // be misrepresented as being the original software.
21
+ //
22
+ // 3. This notice may not be removed or altered from any source
23
+ // distribution.
24
+ //
25
+ //========================================================================
26
+
27
+ #include "internal.h"
28
+
29
+ #if defined(GLFW_BUILD_COCOA_TIMER)
30
+
31
+ #include <mach/mach_time.h>
32
+
33
+
34
+ //////////////////////////////////////////////////////////////////////////
35
+ ////// GLFW platform API //////
36
+ //////////////////////////////////////////////////////////////////////////
37
+
38
+ void _glfwPlatformInitTimer(void)
39
+ {
40
+ mach_timebase_info_data_t info;
41
+ mach_timebase_info(&info);
42
+
43
+ _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer;
44
+ }
45
+
46
+ uint64_t _glfwPlatformGetTimerValue(void)
47
+ {
48
+ return mach_absolute_time();
49
+ }
50
+
51
+ uint64_t _glfwPlatformGetTimerFrequency(void)
52
+ {
53
+ return _glfw.timer.ns.frequency;
54
+ }
55
+
56
+ #endif // GLFW_BUILD_COCOA_TIMER
57
+
@@ -0,0 +1,35 @@
1
+ //========================================================================
2
+ // GLFW 3.4 macOS - www.glfw.org
3
+ //------------------------------------------------------------------------
4
+ // Copyright (c) 2009-2021 Camilla Löwy <elmindreda@glfw.org>
5
+ //
6
+ // This software is provided 'as-is', without any express or implied
7
+ // warranty. In no event will the authors be held liable for any damages
8
+ // arising from the use of this software.
9
+ //
10
+ // Permission is granted to anyone to use this software for any purpose,
11
+ // including commercial applications, and to alter it and redistribute it
12
+ // freely, subject to the following restrictions:
13
+ //
14
+ // 1. The origin of this software must not be misrepresented; you must not
15
+ // claim that you wrote the original software. If you use this software
16
+ // in a product, an acknowledgment in the product documentation would
17
+ // be appreciated but is not required.
18
+ //
19
+ // 2. Altered source versions must be plainly marked as such, and must not
20
+ // be misrepresented as being the original software.
21
+ //
22
+ // 3. This notice may not be removed or altered from any source
23
+ // distribution.
24
+ //
25
+ //========================================================================
26
+
27
+ #define GLFW_COCOA_LIBRARY_TIMER_STATE _GLFWtimerNS ns;
28
+
29
+ // Cocoa-specific global timer data
30
+ //
31
+ typedef struct _GLFWtimerNS
32
+ {
33
+ uint64_t frequency;
34
+ } _GLFWtimerNS;
35
+