1b877906bSopenharmony_ci//========================================================================
2b877906bSopenharmony_ci// GLFW 3.5 Win32 - www.glfw.org
3b877906bSopenharmony_ci//------------------------------------------------------------------------
4b877906bSopenharmony_ci// Copyright (c) 2002-2006 Marcus Geelnard
5b877906bSopenharmony_ci// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
6b877906bSopenharmony_ci//
7b877906bSopenharmony_ci// This software is provided 'as-is', without any express or implied
8b877906bSopenharmony_ci// warranty. In no event will the authors be held liable for any damages
9b877906bSopenharmony_ci// arising from the use of this software.
10b877906bSopenharmony_ci//
11b877906bSopenharmony_ci// Permission is granted to anyone to use this software for any purpose,
12b877906bSopenharmony_ci// including commercial applications, and to alter it and redistribute it
13b877906bSopenharmony_ci// freely, subject to the following restrictions:
14b877906bSopenharmony_ci//
15b877906bSopenharmony_ci// 1. The origin of this software must not be misrepresented; you must not
16b877906bSopenharmony_ci//    claim that you wrote the original software. If you use this software
17b877906bSopenharmony_ci//    in a product, an acknowledgment in the product documentation would
18b877906bSopenharmony_ci//    be appreciated but is not required.
19b877906bSopenharmony_ci//
20b877906bSopenharmony_ci// 2. Altered source versions must be plainly marked as such, and must not
21b877906bSopenharmony_ci//    be misrepresented as being the original software.
22b877906bSopenharmony_ci//
23b877906bSopenharmony_ci// 3. This notice may not be removed or altered from any source
24b877906bSopenharmony_ci//    distribution.
25b877906bSopenharmony_ci//
26b877906bSopenharmony_ci//========================================================================
27b877906bSopenharmony_ci
28b877906bSopenharmony_ci// We don't need all the fancy stuff
29b877906bSopenharmony_ci#ifndef NOMINMAX
30b877906bSopenharmony_ci #define NOMINMAX
31b877906bSopenharmony_ci#endif
32b877906bSopenharmony_ci
33b877906bSopenharmony_ci#ifndef VC_EXTRALEAN
34b877906bSopenharmony_ci #define VC_EXTRALEAN
35b877906bSopenharmony_ci#endif
36b877906bSopenharmony_ci
37b877906bSopenharmony_ci#ifndef WIN32_LEAN_AND_MEAN
38b877906bSopenharmony_ci #define WIN32_LEAN_AND_MEAN
39b877906bSopenharmony_ci#endif
40b877906bSopenharmony_ci
41b877906bSopenharmony_ci// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
42b877906bSopenharmony_ci// example to allow applications to correctly declare a GL_KHR_debug callback)
43b877906bSopenharmony_ci// but windows.h assumes no one will define APIENTRY before it does
44b877906bSopenharmony_ci#undef APIENTRY
45b877906bSopenharmony_ci
46b877906bSopenharmony_ci// GLFW on Windows is Unicode only and does not work in MBCS mode
47b877906bSopenharmony_ci#ifndef UNICODE
48b877906bSopenharmony_ci #define UNICODE
49b877906bSopenharmony_ci#endif
50b877906bSopenharmony_ci
51b877906bSopenharmony_ci// GLFW requires Windows XP or later
52b877906bSopenharmony_ci#if WINVER < 0x0501
53b877906bSopenharmony_ci #undef WINVER
54b877906bSopenharmony_ci #define WINVER 0x0501
55b877906bSopenharmony_ci#endif
56b877906bSopenharmony_ci#if _WIN32_WINNT < 0x0501
57b877906bSopenharmony_ci #undef _WIN32_WINNT
58b877906bSopenharmony_ci #define _WIN32_WINNT 0x0501
59b877906bSopenharmony_ci#endif
60b877906bSopenharmony_ci
61b877906bSopenharmony_ci// GLFW uses DirectInput8 interfaces
62b877906bSopenharmony_ci#define DIRECTINPUT_VERSION 0x0800
63b877906bSopenharmony_ci
64b877906bSopenharmony_ci// GLFW uses OEM cursor resources
65b877906bSopenharmony_ci#define OEMRESOURCE
66b877906bSopenharmony_ci
67b877906bSopenharmony_ci#include <wctype.h>
68b877906bSopenharmony_ci#include <windows.h>
69b877906bSopenharmony_ci#include <dinput.h>
70b877906bSopenharmony_ci#include <xinput.h>
71b877906bSopenharmony_ci#include <dbt.h>
72b877906bSopenharmony_ci
73b877906bSopenharmony_ci// HACK: Define macros that some windows.h variants don't
74b877906bSopenharmony_ci#ifndef WM_MOUSEHWHEEL
75b877906bSopenharmony_ci #define WM_MOUSEHWHEEL 0x020E
76b877906bSopenharmony_ci#endif
77b877906bSopenharmony_ci#ifndef WM_DWMCOMPOSITIONCHANGED
78b877906bSopenharmony_ci #define WM_DWMCOMPOSITIONCHANGED 0x031E
79b877906bSopenharmony_ci#endif
80b877906bSopenharmony_ci#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
81b877906bSopenharmony_ci #define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
82b877906bSopenharmony_ci#endif
83b877906bSopenharmony_ci#ifndef WM_COPYGLOBALDATA
84b877906bSopenharmony_ci #define WM_COPYGLOBALDATA 0x0049
85b877906bSopenharmony_ci#endif
86b877906bSopenharmony_ci#ifndef WM_UNICHAR
87b877906bSopenharmony_ci #define WM_UNICHAR 0x0109
88b877906bSopenharmony_ci#endif
89b877906bSopenharmony_ci#ifndef UNICODE_NOCHAR
90b877906bSopenharmony_ci #define UNICODE_NOCHAR 0xFFFF
91b877906bSopenharmony_ci#endif
92b877906bSopenharmony_ci#ifndef WM_DPICHANGED
93b877906bSopenharmony_ci #define WM_DPICHANGED 0x02E0
94b877906bSopenharmony_ci#endif
95b877906bSopenharmony_ci#ifndef GET_XBUTTON_WPARAM
96b877906bSopenharmony_ci #define GET_XBUTTON_WPARAM(w) (HIWORD(w))
97b877906bSopenharmony_ci#endif
98b877906bSopenharmony_ci#ifndef EDS_ROTATEDMODE
99b877906bSopenharmony_ci #define EDS_ROTATEDMODE 0x00000004
100b877906bSopenharmony_ci#endif
101b877906bSopenharmony_ci#ifndef DISPLAY_DEVICE_ACTIVE
102b877906bSopenharmony_ci #define DISPLAY_DEVICE_ACTIVE 0x00000001
103b877906bSopenharmony_ci#endif
104b877906bSopenharmony_ci#ifndef _WIN32_WINNT_WINBLUE
105b877906bSopenharmony_ci #define _WIN32_WINNT_WINBLUE 0x0603
106b877906bSopenharmony_ci#endif
107b877906bSopenharmony_ci#ifndef _WIN32_WINNT_WIN8
108b877906bSopenharmony_ci #define _WIN32_WINNT_WIN8 0x0602
109b877906bSopenharmony_ci#endif
110b877906bSopenharmony_ci#ifndef WM_GETDPISCALEDSIZE
111b877906bSopenharmony_ci #define WM_GETDPISCALEDSIZE 0x02e4
112b877906bSopenharmony_ci#endif
113b877906bSopenharmony_ci#ifndef USER_DEFAULT_SCREEN_DPI
114b877906bSopenharmony_ci #define USER_DEFAULT_SCREEN_DPI 96
115b877906bSopenharmony_ci#endif
116b877906bSopenharmony_ci#ifndef OCR_HAND
117b877906bSopenharmony_ci #define OCR_HAND 32649
118b877906bSopenharmony_ci#endif
119b877906bSopenharmony_ci
120b877906bSopenharmony_ci#if WINVER < 0x0601
121b877906bSopenharmony_citypedef struct
122b877906bSopenharmony_ci{
123b877906bSopenharmony_ci    DWORD cbSize;
124b877906bSopenharmony_ci    DWORD ExtStatus;
125b877906bSopenharmony_ci} CHANGEFILTERSTRUCT;
126b877906bSopenharmony_ci#ifndef MSGFLT_ALLOW
127b877906bSopenharmony_ci #define MSGFLT_ALLOW 1
128b877906bSopenharmony_ci#endif
129b877906bSopenharmony_ci#endif /*Windows 7*/
130b877906bSopenharmony_ci
131b877906bSopenharmony_ci#if WINVER < 0x0600
132b877906bSopenharmony_ci#define DWM_BB_ENABLE 0x00000001
133b877906bSopenharmony_ci#define DWM_BB_BLURREGION 0x00000002
134b877906bSopenharmony_citypedef struct
135b877906bSopenharmony_ci{
136b877906bSopenharmony_ci    DWORD dwFlags;
137b877906bSopenharmony_ci    BOOL fEnable;
138b877906bSopenharmony_ci    HRGN hRgnBlur;
139b877906bSopenharmony_ci    BOOL fTransitionOnMaximized;
140b877906bSopenharmony_ci} DWM_BLURBEHIND;
141b877906bSopenharmony_ci#else
142b877906bSopenharmony_ci #include <dwmapi.h>
143b877906bSopenharmony_ci#endif /*Windows Vista*/
144b877906bSopenharmony_ci
145b877906bSopenharmony_ci#ifndef DPI_ENUMS_DECLARED
146b877906bSopenharmony_citypedef enum
147b877906bSopenharmony_ci{
148b877906bSopenharmony_ci    PROCESS_DPI_UNAWARE = 0,
149b877906bSopenharmony_ci    PROCESS_SYSTEM_DPI_AWARE = 1,
150b877906bSopenharmony_ci    PROCESS_PER_MONITOR_DPI_AWARE = 2
151b877906bSopenharmony_ci} PROCESS_DPI_AWARENESS;
152b877906bSopenharmony_citypedef enum
153b877906bSopenharmony_ci{
154b877906bSopenharmony_ci    MDT_EFFECTIVE_DPI = 0,
155b877906bSopenharmony_ci    MDT_ANGULAR_DPI = 1,
156b877906bSopenharmony_ci    MDT_RAW_DPI = 2,
157b877906bSopenharmony_ci    MDT_DEFAULT = MDT_EFFECTIVE_DPI
158b877906bSopenharmony_ci} MONITOR_DPI_TYPE;
159b877906bSopenharmony_ci#endif /*DPI_ENUMS_DECLARED*/
160b877906bSopenharmony_ci
161b877906bSopenharmony_ci#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
162b877906bSopenharmony_ci#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4)
163b877906bSopenharmony_ci#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/
164b877906bSopenharmony_ci
165b877906bSopenharmony_ci// Replacement for versionhelpers.h macros, as we cannot rely on the
166b877906bSopenharmony_ci// application having a correct embedded manifest
167b877906bSopenharmony_ci//
168b877906bSopenharmony_ci#define IsWindowsVistaOrGreater()                                     \
169b877906bSopenharmony_ci    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_VISTA),   \
170b877906bSopenharmony_ci                                        LOBYTE(_WIN32_WINNT_VISTA), 0)
171b877906bSopenharmony_ci#define IsWindows7OrGreater()                                         \
172b877906bSopenharmony_ci    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN7),    \
173b877906bSopenharmony_ci                                        LOBYTE(_WIN32_WINNT_WIN7), 0)
174b877906bSopenharmony_ci#define IsWindows8OrGreater()                                         \
175b877906bSopenharmony_ci    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8),    \
176b877906bSopenharmony_ci                                        LOBYTE(_WIN32_WINNT_WIN8), 0)
177b877906bSopenharmony_ci#define IsWindows8Point1OrGreater()                                   \
178b877906bSopenharmony_ci    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \
179b877906bSopenharmony_ci                                        LOBYTE(_WIN32_WINNT_WINBLUE), 0)
180b877906bSopenharmony_ci
181b877906bSopenharmony_ci// Windows 10 Anniversary Update
182b877906bSopenharmony_ci#define _glfwIsWindows10Version1607OrGreaterWin32() \
183b877906bSopenharmony_ci    _glfwIsWindows10BuildOrGreaterWin32(14393)
184b877906bSopenharmony_ci// Windows 10 Creators Update
185b877906bSopenharmony_ci#define _glfwIsWindows10Version1703OrGreaterWin32() \
186b877906bSopenharmony_ci    _glfwIsWindows10BuildOrGreaterWin32(15063)
187b877906bSopenharmony_ci
188b877906bSopenharmony_ci// HACK: Define macros that some xinput.h variants don't
189b877906bSopenharmony_ci#ifndef XINPUT_CAPS_WIRELESS
190b877906bSopenharmony_ci #define XINPUT_CAPS_WIRELESS 0x0002
191b877906bSopenharmony_ci#endif
192b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_WHEEL
193b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_WHEEL 0x02
194b877906bSopenharmony_ci#endif
195b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK
196b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
197b877906bSopenharmony_ci#endif
198b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK
199b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04
200b877906bSopenharmony_ci#endif
201b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD
202b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
203b877906bSopenharmony_ci#endif
204b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_GUITAR
205b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_GUITAR 0x06
206b877906bSopenharmony_ci#endif
207b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT
208b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
209b877906bSopenharmony_ci#endif
210b877906bSopenharmony_ci#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD
211b877906bSopenharmony_ci #define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13
212b877906bSopenharmony_ci#endif
213b877906bSopenharmony_ci#ifndef XUSER_MAX_COUNT
214b877906bSopenharmony_ci #define XUSER_MAX_COUNT 4
215b877906bSopenharmony_ci#endif
216b877906bSopenharmony_ci
217b877906bSopenharmony_ci// HACK: Define macros that some dinput.h variants don't
218b877906bSopenharmony_ci#ifndef DIDFT_OPTIONAL
219b877906bSopenharmony_ci #define DIDFT_OPTIONAL 0x80000000
220b877906bSopenharmony_ci#endif
221b877906bSopenharmony_ci
222b877906bSopenharmony_ci#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
223b877906bSopenharmony_ci#define WGL_SUPPORT_OPENGL_ARB 0x2010
224b877906bSopenharmony_ci#define WGL_DRAW_TO_WINDOW_ARB 0x2001
225b877906bSopenharmony_ci#define WGL_PIXEL_TYPE_ARB 0x2013
226b877906bSopenharmony_ci#define WGL_TYPE_RGBA_ARB 0x202b
227b877906bSopenharmony_ci#define WGL_ACCELERATION_ARB 0x2003
228b877906bSopenharmony_ci#define WGL_NO_ACCELERATION_ARB 0x2025
229b877906bSopenharmony_ci#define WGL_RED_BITS_ARB 0x2015
230b877906bSopenharmony_ci#define WGL_RED_SHIFT_ARB 0x2016
231b877906bSopenharmony_ci#define WGL_GREEN_BITS_ARB 0x2017
232b877906bSopenharmony_ci#define WGL_GREEN_SHIFT_ARB 0x2018
233b877906bSopenharmony_ci#define WGL_BLUE_BITS_ARB 0x2019
234b877906bSopenharmony_ci#define WGL_BLUE_SHIFT_ARB 0x201a
235b877906bSopenharmony_ci#define WGL_ALPHA_BITS_ARB 0x201b
236b877906bSopenharmony_ci#define WGL_ALPHA_SHIFT_ARB 0x201c
237b877906bSopenharmony_ci#define WGL_ACCUM_BITS_ARB 0x201d
238b877906bSopenharmony_ci#define WGL_ACCUM_RED_BITS_ARB 0x201e
239b877906bSopenharmony_ci#define WGL_ACCUM_GREEN_BITS_ARB 0x201f
240b877906bSopenharmony_ci#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
241b877906bSopenharmony_ci#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
242b877906bSopenharmony_ci#define WGL_DEPTH_BITS_ARB 0x2022
243b877906bSopenharmony_ci#define WGL_STENCIL_BITS_ARB 0x2023
244b877906bSopenharmony_ci#define WGL_AUX_BUFFERS_ARB 0x2024
245b877906bSopenharmony_ci#define WGL_STEREO_ARB 0x2012
246b877906bSopenharmony_ci#define WGL_DOUBLE_BUFFER_ARB 0x2011
247b877906bSopenharmony_ci#define WGL_SAMPLES_ARB 0x2042
248b877906bSopenharmony_ci#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9
249b877906bSopenharmony_ci#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
250b877906bSopenharmony_ci#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
251b877906bSopenharmony_ci#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
252b877906bSopenharmony_ci#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
253b877906bSopenharmony_ci#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
254b877906bSopenharmony_ci#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
255b877906bSopenharmony_ci#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
256b877906bSopenharmony_ci#define WGL_CONTEXT_FLAGS_ARB 0x2094
257b877906bSopenharmony_ci#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
258b877906bSopenharmony_ci#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
259b877906bSopenharmony_ci#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
260b877906bSopenharmony_ci#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
261b877906bSopenharmony_ci#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
262b877906bSopenharmony_ci#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
263b877906bSopenharmony_ci#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
264b877906bSopenharmony_ci#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
265b877906bSopenharmony_ci#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
266b877906bSopenharmony_ci#define WGL_COLORSPACE_EXT 0x309d
267b877906bSopenharmony_ci#define WGL_COLORSPACE_SRGB_EXT 0x3089
268b877906bSopenharmony_ci
269b877906bSopenharmony_ci#define ERROR_INVALID_VERSION_ARB 0x2095
270b877906bSopenharmony_ci#define ERROR_INVALID_PROFILE_ARB 0x2096
271b877906bSopenharmony_ci#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
272b877906bSopenharmony_ci
273b877906bSopenharmony_ci// xinput.dll function pointer typedefs
274b877906bSopenharmony_citypedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
275b877906bSopenharmony_citypedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
276b877906bSopenharmony_ci#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
277b877906bSopenharmony_ci#define XInputGetState _glfw.win32.xinput.GetState
278b877906bSopenharmony_ci
279b877906bSopenharmony_ci// dinput8.dll function pointer typedefs
280b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN);
281b877906bSopenharmony_ci#define DirectInput8Create _glfw.win32.dinput8.Create
282b877906bSopenharmony_ci
283b877906bSopenharmony_ci// user32.dll function pointer typedefs
284b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_SetProcessDPIAware)(void);
285b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_ChangeWindowMessageFilterEx)(HWND,UINT,DWORD,CHANGEFILTERSTRUCT*);
286b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND);
287b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE);
288b877906bSopenharmony_citypedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND);
289b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);
290b877906bSopenharmony_citypedef int (WINAPI * PFN_GetSystemMetricsForDpi)(int,UINT);
291b877906bSopenharmony_ci#define SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware_
292b877906bSopenharmony_ci#define ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx_
293b877906bSopenharmony_ci#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_
294b877906bSopenharmony_ci#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_
295b877906bSopenharmony_ci#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_
296b877906bSopenharmony_ci#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_
297b877906bSopenharmony_ci#define GetSystemMetricsForDpi _glfw.win32.user32.GetSystemMetricsForDpi_
298b877906bSopenharmony_ci
299b877906bSopenharmony_ci// dwmapi.dll function pointer typedefs
300b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*);
301b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_DwmFlush)(VOID);
302b877906bSopenharmony_citypedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*);
303b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_DwmGetColorizationColor)(DWORD*,BOOL*);
304b877906bSopenharmony_ci#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled
305b877906bSopenharmony_ci#define DwmFlush _glfw.win32.dwmapi.Flush
306b877906bSopenharmony_ci#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow
307b877906bSopenharmony_ci#define DwmGetColorizationColor _glfw.win32.dwmapi.GetColorizationColor
308b877906bSopenharmony_ci
309b877906bSopenharmony_ci// shcore.dll function pointer typedefs
310b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS);
311b877906bSopenharmony_citypedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);
312b877906bSopenharmony_ci#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_
313b877906bSopenharmony_ci#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_
314b877906bSopenharmony_ci
315b877906bSopenharmony_ci// ntdll.dll function pointer typedefs
316b877906bSopenharmony_citypedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG);
317b877906bSopenharmony_ci#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_
318b877906bSopenharmony_ci
319b877906bSopenharmony_ci// WGL extension pointer typedefs
320b877906bSopenharmony_citypedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
321b877906bSopenharmony_citypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
322b877906bSopenharmony_citypedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
323b877906bSopenharmony_citypedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
324b877906bSopenharmony_citypedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
325b877906bSopenharmony_ci#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
326b877906bSopenharmony_ci#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
327b877906bSopenharmony_ci#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
328b877906bSopenharmony_ci#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
329b877906bSopenharmony_ci#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
330b877906bSopenharmony_ci
331b877906bSopenharmony_ci// opengl32.dll function pointer typedefs
332b877906bSopenharmony_citypedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
333b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
334b877906bSopenharmony_citypedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
335b877906bSopenharmony_citypedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);
336b877906bSopenharmony_citypedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
337b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
338b877906bSopenharmony_citypedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
339b877906bSopenharmony_ci#define wglCreateContext _glfw.wgl.CreateContext
340b877906bSopenharmony_ci#define wglDeleteContext _glfw.wgl.DeleteContext
341b877906bSopenharmony_ci#define wglGetProcAddress _glfw.wgl.GetProcAddress
342b877906bSopenharmony_ci#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
343b877906bSopenharmony_ci#define wglGetCurrentContext _glfw.wgl.GetCurrentContext
344b877906bSopenharmony_ci#define wglMakeCurrent _glfw.wgl.MakeCurrent
345b877906bSopenharmony_ci#define wglShareLists _glfw.wgl.ShareLists
346b877906bSopenharmony_ci
347b877906bSopenharmony_citypedef VkFlags VkWin32SurfaceCreateFlagsKHR;
348b877906bSopenharmony_ci
349b877906bSopenharmony_citypedef struct VkWin32SurfaceCreateInfoKHR
350b877906bSopenharmony_ci{
351b877906bSopenharmony_ci    VkStructureType                 sType;
352b877906bSopenharmony_ci    const void*                     pNext;
353b877906bSopenharmony_ci    VkWin32SurfaceCreateFlagsKHR    flags;
354b877906bSopenharmony_ci    HINSTANCE                       hinstance;
355b877906bSopenharmony_ci    HWND                            hwnd;
356b877906bSopenharmony_ci} VkWin32SurfaceCreateInfoKHR;
357b877906bSopenharmony_ci
358b877906bSopenharmony_citypedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
359b877906bSopenharmony_citypedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);
360b877906bSopenharmony_ci
361b877906bSopenharmony_ci#define GLFW_WIN32_WINDOW_STATE         _GLFWwindowWin32  win32;
362b877906bSopenharmony_ci#define GLFW_WIN32_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32;
363b877906bSopenharmony_ci#define GLFW_WIN32_MONITOR_STATE        _GLFWmonitorWin32 win32;
364b877906bSopenharmony_ci#define GLFW_WIN32_CURSOR_STATE         _GLFWcursorWin32  win32;
365b877906bSopenharmony_ci
366b877906bSopenharmony_ci#define GLFW_WGL_CONTEXT_STATE          _GLFWcontextWGL wgl;
367b877906bSopenharmony_ci#define GLFW_WGL_LIBRARY_CONTEXT_STATE  _GLFWlibraryWGL wgl;
368b877906bSopenharmony_ci
369b877906bSopenharmony_ci
370b877906bSopenharmony_ci// WGL-specific per-context data
371b877906bSopenharmony_ci//
372b877906bSopenharmony_citypedef struct _GLFWcontextWGL
373b877906bSopenharmony_ci{
374b877906bSopenharmony_ci    HDC       dc;
375b877906bSopenharmony_ci    HGLRC     handle;
376b877906bSopenharmony_ci    int       interval;
377b877906bSopenharmony_ci} _GLFWcontextWGL;
378b877906bSopenharmony_ci
379b877906bSopenharmony_ci// WGL-specific global data
380b877906bSopenharmony_ci//
381b877906bSopenharmony_citypedef struct _GLFWlibraryWGL
382b877906bSopenharmony_ci{
383b877906bSopenharmony_ci    HINSTANCE                           instance;
384b877906bSopenharmony_ci    PFN_wglCreateContext                CreateContext;
385b877906bSopenharmony_ci    PFN_wglDeleteContext                DeleteContext;
386b877906bSopenharmony_ci    PFN_wglGetProcAddress               GetProcAddress;
387b877906bSopenharmony_ci    PFN_wglGetCurrentDC                 GetCurrentDC;
388b877906bSopenharmony_ci    PFN_wglGetCurrentContext            GetCurrentContext;
389b877906bSopenharmony_ci    PFN_wglMakeCurrent                  MakeCurrent;
390b877906bSopenharmony_ci    PFN_wglShareLists                   ShareLists;
391b877906bSopenharmony_ci
392b877906bSopenharmony_ci    PFNWGLSWAPINTERVALEXTPROC           SwapIntervalEXT;
393b877906bSopenharmony_ci    PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
394b877906bSopenharmony_ci    PFNWGLGETEXTENSIONSSTRINGEXTPROC    GetExtensionsStringEXT;
395b877906bSopenharmony_ci    PFNWGLGETEXTENSIONSSTRINGARBPROC    GetExtensionsStringARB;
396b877906bSopenharmony_ci    PFNWGLCREATECONTEXTATTRIBSARBPROC   CreateContextAttribsARB;
397b877906bSopenharmony_ci    GLFWbool                            EXT_swap_control;
398b877906bSopenharmony_ci    GLFWbool                            EXT_colorspace;
399b877906bSopenharmony_ci    GLFWbool                            ARB_multisample;
400b877906bSopenharmony_ci    GLFWbool                            ARB_framebuffer_sRGB;
401b877906bSopenharmony_ci    GLFWbool                            EXT_framebuffer_sRGB;
402b877906bSopenharmony_ci    GLFWbool                            ARB_pixel_format;
403b877906bSopenharmony_ci    GLFWbool                            ARB_create_context;
404b877906bSopenharmony_ci    GLFWbool                            ARB_create_context_profile;
405b877906bSopenharmony_ci    GLFWbool                            EXT_create_context_es2_profile;
406b877906bSopenharmony_ci    GLFWbool                            ARB_create_context_robustness;
407b877906bSopenharmony_ci    GLFWbool                            ARB_create_context_no_error;
408b877906bSopenharmony_ci    GLFWbool                            ARB_context_flush_control;
409b877906bSopenharmony_ci} _GLFWlibraryWGL;
410b877906bSopenharmony_ci
411b877906bSopenharmony_ci// Win32-specific per-window data
412b877906bSopenharmony_ci//
413b877906bSopenharmony_citypedef struct _GLFWwindowWin32
414b877906bSopenharmony_ci{
415b877906bSopenharmony_ci    HWND                handle;
416b877906bSopenharmony_ci    HICON               bigIcon;
417b877906bSopenharmony_ci    HICON               smallIcon;
418b877906bSopenharmony_ci
419b877906bSopenharmony_ci    GLFWbool            cursorTracked;
420b877906bSopenharmony_ci    GLFWbool            frameAction;
421b877906bSopenharmony_ci    GLFWbool            iconified;
422b877906bSopenharmony_ci    GLFWbool            maximized;
423b877906bSopenharmony_ci    // Whether to enable framebuffer transparency on DWM
424b877906bSopenharmony_ci    GLFWbool            transparent;
425b877906bSopenharmony_ci    GLFWbool            scaleToMonitor;
426b877906bSopenharmony_ci    GLFWbool            keymenu;
427b877906bSopenharmony_ci    GLFWbool            showDefault;
428b877906bSopenharmony_ci
429b877906bSopenharmony_ci    // Cached size used to filter out duplicate events
430b877906bSopenharmony_ci    int                 width, height;
431b877906bSopenharmony_ci
432b877906bSopenharmony_ci    // The last received cursor position, regardless of source
433b877906bSopenharmony_ci    int                 lastCursorPosX, lastCursorPosY;
434b877906bSopenharmony_ci    // The last received high surrogate when decoding pairs of UTF-16 messages
435b877906bSopenharmony_ci    WCHAR               highSurrogate;
436b877906bSopenharmony_ci} _GLFWwindowWin32;
437b877906bSopenharmony_ci
438b877906bSopenharmony_ci// Win32-specific global data
439b877906bSopenharmony_ci//
440b877906bSopenharmony_citypedef struct _GLFWlibraryWin32
441b877906bSopenharmony_ci{
442b877906bSopenharmony_ci    HINSTANCE           instance;
443b877906bSopenharmony_ci    HWND                helperWindowHandle;
444b877906bSopenharmony_ci    ATOM                helperWindowClass;
445b877906bSopenharmony_ci    ATOM                mainWindowClass;
446b877906bSopenharmony_ci    HDEVNOTIFY          deviceNotificationHandle;
447b877906bSopenharmony_ci    int                 acquiredMonitorCount;
448b877906bSopenharmony_ci    char*               clipboardString;
449b877906bSopenharmony_ci    short int           keycodes[512];
450b877906bSopenharmony_ci    short int           scancodes[GLFW_KEY_LAST + 1];
451b877906bSopenharmony_ci    char                keynames[GLFW_KEY_LAST + 1][5];
452b877906bSopenharmony_ci    // Where to place the cursor when re-enabled
453b877906bSopenharmony_ci    double              restoreCursorPosX, restoreCursorPosY;
454b877906bSopenharmony_ci    // The window whose disabled cursor mode is active
455b877906bSopenharmony_ci    _GLFWwindow*        disabledCursorWindow;
456b877906bSopenharmony_ci    // The window the cursor is captured in
457b877906bSopenharmony_ci    _GLFWwindow*        capturedCursorWindow;
458b877906bSopenharmony_ci    RAWINPUT*           rawInput;
459b877906bSopenharmony_ci    int                 rawInputSize;
460b877906bSopenharmony_ci    UINT                mouseTrailSize;
461b877906bSopenharmony_ci    // The cursor handle to use to hide the cursor (NULL or a transparent cursor)
462b877906bSopenharmony_ci    HCURSOR             blankCursor;
463b877906bSopenharmony_ci
464b877906bSopenharmony_ci    struct {
465b877906bSopenharmony_ci        HINSTANCE                       instance;
466b877906bSopenharmony_ci        PFN_DirectInput8Create          Create;
467b877906bSopenharmony_ci        IDirectInput8W*                 api;
468b877906bSopenharmony_ci    } dinput8;
469b877906bSopenharmony_ci
470b877906bSopenharmony_ci    struct {
471b877906bSopenharmony_ci        HINSTANCE                       instance;
472b877906bSopenharmony_ci        PFN_XInputGetCapabilities       GetCapabilities;
473b877906bSopenharmony_ci        PFN_XInputGetState              GetState;
474b877906bSopenharmony_ci    } xinput;
475b877906bSopenharmony_ci
476b877906bSopenharmony_ci    struct {
477b877906bSopenharmony_ci        HINSTANCE                       instance;
478b877906bSopenharmony_ci        PFN_SetProcessDPIAware          SetProcessDPIAware_;
479b877906bSopenharmony_ci        PFN_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx_;
480b877906bSopenharmony_ci        PFN_EnableNonClientDpiScaling   EnableNonClientDpiScaling_;
481b877906bSopenharmony_ci        PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_;
482b877906bSopenharmony_ci        PFN_GetDpiForWindow             GetDpiForWindow_;
483b877906bSopenharmony_ci        PFN_AdjustWindowRectExForDpi    AdjustWindowRectExForDpi_;
484b877906bSopenharmony_ci        PFN_GetSystemMetricsForDpi      GetSystemMetricsForDpi_;
485b877906bSopenharmony_ci    } user32;
486b877906bSopenharmony_ci
487b877906bSopenharmony_ci    struct {
488b877906bSopenharmony_ci        HINSTANCE                       instance;
489b877906bSopenharmony_ci        PFN_DwmIsCompositionEnabled     IsCompositionEnabled;
490b877906bSopenharmony_ci        PFN_DwmFlush                    Flush;
491b877906bSopenharmony_ci        PFN_DwmEnableBlurBehindWindow   EnableBlurBehindWindow;
492b877906bSopenharmony_ci        PFN_DwmGetColorizationColor     GetColorizationColor;
493b877906bSopenharmony_ci    } dwmapi;
494b877906bSopenharmony_ci
495b877906bSopenharmony_ci    struct {
496b877906bSopenharmony_ci        HINSTANCE                       instance;
497b877906bSopenharmony_ci        PFN_SetProcessDpiAwareness      SetProcessDpiAwareness_;
498b877906bSopenharmony_ci        PFN_GetDpiForMonitor            GetDpiForMonitor_;
499b877906bSopenharmony_ci    } shcore;
500b877906bSopenharmony_ci
501b877906bSopenharmony_ci    struct {
502b877906bSopenharmony_ci        HINSTANCE                       instance;
503b877906bSopenharmony_ci        PFN_RtlVerifyVersionInfo        RtlVerifyVersionInfo_;
504b877906bSopenharmony_ci    } ntdll;
505b877906bSopenharmony_ci} _GLFWlibraryWin32;
506b877906bSopenharmony_ci
507b877906bSopenharmony_ci// Win32-specific per-monitor data
508b877906bSopenharmony_ci//
509b877906bSopenharmony_citypedef struct _GLFWmonitorWin32
510b877906bSopenharmony_ci{
511b877906bSopenharmony_ci    HMONITOR            handle;
512b877906bSopenharmony_ci    // This size matches the static size of DISPLAY_DEVICE.DeviceName
513b877906bSopenharmony_ci    WCHAR               adapterName[32];
514b877906bSopenharmony_ci    WCHAR               displayName[32];
515b877906bSopenharmony_ci    char                publicAdapterName[32];
516b877906bSopenharmony_ci    char                publicDisplayName[32];
517b877906bSopenharmony_ci    GLFWbool            modesPruned;
518b877906bSopenharmony_ci    GLFWbool            modeChanged;
519b877906bSopenharmony_ci} _GLFWmonitorWin32;
520b877906bSopenharmony_ci
521b877906bSopenharmony_ci// Win32-specific per-cursor data
522b877906bSopenharmony_ci//
523b877906bSopenharmony_citypedef struct _GLFWcursorWin32
524b877906bSopenharmony_ci{
525b877906bSopenharmony_ci    HCURSOR             handle;
526b877906bSopenharmony_ci} _GLFWcursorWin32;
527b877906bSopenharmony_ci
528b877906bSopenharmony_ci
529b877906bSopenharmony_ciGLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform);
530b877906bSopenharmony_ciint _glfwInitWin32(void);
531b877906bSopenharmony_civoid _glfwTerminateWin32(void);
532b877906bSopenharmony_ci
533b877906bSopenharmony_ciWCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source);
534b877906bSopenharmony_cichar* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source);
535b877906bSopenharmony_ciBOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp);
536b877906bSopenharmony_ciBOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build);
537b877906bSopenharmony_civoid _glfwInputErrorWin32(int error, const char* description);
538b877906bSopenharmony_civoid _glfwUpdateKeyNamesWin32(void);
539b877906bSopenharmony_ci
540b877906bSopenharmony_civoid _glfwPollMonitorsWin32(void);
541b877906bSopenharmony_civoid _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired);
542b877906bSopenharmony_civoid _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor);
543b877906bSopenharmony_civoid _glfwGetHMONITORContentScaleWin32(HMONITOR handle, float* xscale, float* yscale);
544b877906bSopenharmony_ci
545b877906bSopenharmony_ciGLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
546b877906bSopenharmony_civoid _glfwDestroyWindowWin32(_GLFWwindow* window);
547b877906bSopenharmony_civoid _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title);
548b877906bSopenharmony_civoid _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images);
549b877906bSopenharmony_civoid _glfwGetWindowPosWin32(_GLFWwindow* window, int* xpos, int* ypos);
550b877906bSopenharmony_civoid _glfwSetWindowPosWin32(_GLFWwindow* window, int xpos, int ypos);
551b877906bSopenharmony_civoid _glfwGetWindowSizeWin32(_GLFWwindow* window, int* width, int* height);
552b877906bSopenharmony_civoid _glfwSetWindowSizeWin32(_GLFWwindow* window, int width, int height);
553b877906bSopenharmony_civoid _glfwSetWindowSizeLimitsWin32(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
554b877906bSopenharmony_civoid _glfwSetWindowAspectRatioWin32(_GLFWwindow* window, int numer, int denom);
555b877906bSopenharmony_civoid _glfwGetFramebufferSizeWin32(_GLFWwindow* window, int* width, int* height);
556b877906bSopenharmony_civoid _glfwGetWindowFrameSizeWin32(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
557b877906bSopenharmony_civoid _glfwGetWindowContentScaleWin32(_GLFWwindow* window, float* xscale, float* yscale);
558b877906bSopenharmony_civoid _glfwIconifyWindowWin32(_GLFWwindow* window);
559b877906bSopenharmony_civoid _glfwRestoreWindowWin32(_GLFWwindow* window);
560b877906bSopenharmony_civoid _glfwMaximizeWindowWin32(_GLFWwindow* window);
561b877906bSopenharmony_civoid _glfwShowWindowWin32(_GLFWwindow* window);
562b877906bSopenharmony_civoid _glfwHideWindowWin32(_GLFWwindow* window);
563b877906bSopenharmony_civoid _glfwRequestWindowAttentionWin32(_GLFWwindow* window);
564b877906bSopenharmony_civoid _glfwFocusWindowWin32(_GLFWwindow* window);
565b877906bSopenharmony_civoid _glfwSetWindowMonitorWin32(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
566b877906bSopenharmony_ciGLFWbool _glfwWindowFocusedWin32(_GLFWwindow* window);
567b877906bSopenharmony_ciGLFWbool _glfwWindowIconifiedWin32(_GLFWwindow* window);
568b877906bSopenharmony_ciGLFWbool _glfwWindowVisibleWin32(_GLFWwindow* window);
569b877906bSopenharmony_ciGLFWbool _glfwWindowMaximizedWin32(_GLFWwindow* window);
570b877906bSopenharmony_ciGLFWbool _glfwWindowHoveredWin32(_GLFWwindow* window);
571b877906bSopenharmony_ciGLFWbool _glfwFramebufferTransparentWin32(_GLFWwindow* window);
572b877906bSopenharmony_civoid _glfwSetWindowResizableWin32(_GLFWwindow* window, GLFWbool enabled);
573b877906bSopenharmony_civoid _glfwSetWindowDecoratedWin32(_GLFWwindow* window, GLFWbool enabled);
574b877906bSopenharmony_civoid _glfwSetWindowFloatingWin32(_GLFWwindow* window, GLFWbool enabled);
575b877906bSopenharmony_civoid _glfwSetWindowMousePassthroughWin32(_GLFWwindow* window, GLFWbool enabled);
576b877906bSopenharmony_cifloat _glfwGetWindowOpacityWin32(_GLFWwindow* window);
577b877906bSopenharmony_civoid _glfwSetWindowOpacityWin32(_GLFWwindow* window, float opacity);
578b877906bSopenharmony_ci
579b877906bSopenharmony_civoid _glfwSetRawMouseMotionWin32(_GLFWwindow *window, GLFWbool enabled);
580b877906bSopenharmony_ciGLFWbool _glfwRawMouseMotionSupportedWin32(void);
581b877906bSopenharmony_ci
582b877906bSopenharmony_civoid _glfwPollEventsWin32(void);
583b877906bSopenharmony_civoid _glfwWaitEventsWin32(void);
584b877906bSopenharmony_civoid _glfwWaitEventsTimeoutWin32(double timeout);
585b877906bSopenharmony_civoid _glfwPostEmptyEventWin32(void);
586b877906bSopenharmony_ci
587b877906bSopenharmony_civoid _glfwGetCursorPosWin32(_GLFWwindow* window, double* xpos, double* ypos);
588b877906bSopenharmony_civoid _glfwSetCursorPosWin32(_GLFWwindow* window, double xpos, double ypos);
589b877906bSopenharmony_civoid _glfwSetCursorModeWin32(_GLFWwindow* window, int mode);
590b877906bSopenharmony_ciconst char* _glfwGetScancodeNameWin32(int scancode);
591b877906bSopenharmony_ciint _glfwGetKeyScancodeWin32(int key);
592b877906bSopenharmony_ciGLFWbool _glfwCreateCursorWin32(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
593b877906bSopenharmony_ciGLFWbool _glfwCreateStandardCursorWin32(_GLFWcursor* cursor, int shape);
594b877906bSopenharmony_civoid _glfwDestroyCursorWin32(_GLFWcursor* cursor);
595b877906bSopenharmony_civoid _glfwSetCursorWin32(_GLFWwindow* window, _GLFWcursor* cursor);
596b877906bSopenharmony_civoid _glfwSetClipboardStringWin32(const char* string);
597b877906bSopenharmony_ciconst char* _glfwGetClipboardStringWin32(void);
598b877906bSopenharmony_ci
599b877906bSopenharmony_ciEGLenum _glfwGetEGLPlatformWin32(EGLint** attribs);
600b877906bSopenharmony_ciEGLNativeDisplayType _glfwGetEGLNativeDisplayWin32(void);
601b877906bSopenharmony_ciEGLNativeWindowType _glfwGetEGLNativeWindowWin32(_GLFWwindow* window);
602b877906bSopenharmony_ci
603b877906bSopenharmony_civoid _glfwGetRequiredInstanceExtensionsWin32(char** extensions);
604b877906bSopenharmony_ciGLFWbool _glfwGetPhysicalDevicePresentationSupportWin32(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
605b877906bSopenharmony_ciVkResult _glfwCreateWindowSurfaceWin32(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
606b877906bSopenharmony_ci
607b877906bSopenharmony_civoid _glfwFreeMonitorWin32(_GLFWmonitor* monitor);
608b877906bSopenharmony_civoid _glfwGetMonitorPosWin32(_GLFWmonitor* monitor, int* xpos, int* ypos);
609b877906bSopenharmony_civoid _glfwGetMonitorContentScaleWin32(_GLFWmonitor* monitor, float* xscale, float* yscale);
610b877906bSopenharmony_civoid _glfwGetMonitorWorkareaWin32(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
611b877906bSopenharmony_ciGLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count);
612b877906bSopenharmony_ciGLFWbool _glfwGetVideoModeWin32(_GLFWmonitor* monitor, GLFWvidmode* mode);
613b877906bSopenharmony_ciGLFWbool _glfwGetGammaRampWin32(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
614b877906bSopenharmony_civoid _glfwSetGammaRampWin32(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
615b877906bSopenharmony_ci
616b877906bSopenharmony_ciGLFWbool _glfwInitJoysticksWin32(void);
617b877906bSopenharmony_civoid _glfwTerminateJoysticksWin32(void);
618b877906bSopenharmony_ciGLFWbool _glfwPollJoystickWin32(_GLFWjoystick* js, int mode);
619b877906bSopenharmony_ciconst char* _glfwGetMappingNameWin32(void);
620b877906bSopenharmony_civoid _glfwUpdateGamepadGUIDWin32(char* guid);
621b877906bSopenharmony_ci
622b877906bSopenharmony_ciGLFWbool _glfwInitWGL(void);
623b877906bSopenharmony_civoid _glfwTerminateWGL(void);
624b877906bSopenharmony_ciGLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
625b877906bSopenharmony_ci                               const _GLFWctxconfig* ctxconfig,
626b877906bSopenharmony_ci                               const _GLFWfbconfig* fbconfig);
627b877906bSopenharmony_ci
628