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