1b877906bSopenharmony_ci/*************************************************************************
2b877906bSopenharmony_ci * GLFW 3.5 - www.glfw.org
3b877906bSopenharmony_ci * A library for OpenGL, window and input
4b877906bSopenharmony_ci *------------------------------------------------------------------------
5b877906bSopenharmony_ci * Copyright (c) 2002-2006 Marcus Geelnard
6b877906bSopenharmony_ci * Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
7b877906bSopenharmony_ci *
8b877906bSopenharmony_ci * This software is provided 'as-is', without any express or implied
9b877906bSopenharmony_ci * warranty. In no event will the authors be held liable for any damages
10b877906bSopenharmony_ci * arising from the use of this software.
11b877906bSopenharmony_ci *
12b877906bSopenharmony_ci * Permission is granted to anyone to use this software for any purpose,
13b877906bSopenharmony_ci * including commercial applications, and to alter it and redistribute it
14b877906bSopenharmony_ci * freely, subject to the following restrictions:
15b877906bSopenharmony_ci *
16b877906bSopenharmony_ci * 1. The origin of this software must not be misrepresented; you must not
17b877906bSopenharmony_ci *    claim that you wrote the original software. If you use this software
18b877906bSopenharmony_ci *    in a product, an acknowledgment in the product documentation would
19b877906bSopenharmony_ci *    be appreciated but is not required.
20b877906bSopenharmony_ci *
21b877906bSopenharmony_ci * 2. Altered source versions must be plainly marked as such, and must not
22b877906bSopenharmony_ci *    be misrepresented as being the original software.
23b877906bSopenharmony_ci *
24b877906bSopenharmony_ci * 3. This notice may not be removed or altered from any source
25b877906bSopenharmony_ci *    distribution.
26b877906bSopenharmony_ci *
27b877906bSopenharmony_ci *************************************************************************/
28b877906bSopenharmony_ci
29b877906bSopenharmony_ci#ifndef _glfw3_h_
30b877906bSopenharmony_ci#define _glfw3_h_
31b877906bSopenharmony_ci
32b877906bSopenharmony_ci#ifdef __cplusplus
33b877906bSopenharmony_ciextern "C" {
34b877906bSopenharmony_ci#endif
35b877906bSopenharmony_ci
36b877906bSopenharmony_ci
37b877906bSopenharmony_ci/*************************************************************************
38b877906bSopenharmony_ci * Doxygen documentation
39b877906bSopenharmony_ci *************************************************************************/
40b877906bSopenharmony_ci
41b877906bSopenharmony_ci/*! @file glfw3.h
42b877906bSopenharmony_ci *  @brief The header of the GLFW 3 API.
43b877906bSopenharmony_ci *
44b877906bSopenharmony_ci *  This is the header file of the GLFW 3 API.  It defines all its types and
45b877906bSopenharmony_ci *  declares all its functions.
46b877906bSopenharmony_ci *
47b877906bSopenharmony_ci *  For more information about how to use this file, see @ref build_include.
48b877906bSopenharmony_ci */
49b877906bSopenharmony_ci/*! @defgroup context Context reference
50b877906bSopenharmony_ci *  @brief Functions and types related to OpenGL and OpenGL ES contexts.
51b877906bSopenharmony_ci *
52b877906bSopenharmony_ci *  This is the reference documentation for OpenGL and OpenGL ES context related
53b877906bSopenharmony_ci *  functions.  For more task-oriented information, see the @ref context_guide.
54b877906bSopenharmony_ci */
55b877906bSopenharmony_ci/*! @defgroup vulkan Vulkan support reference
56b877906bSopenharmony_ci *  @brief Functions and types related to Vulkan.
57b877906bSopenharmony_ci *
58b877906bSopenharmony_ci *  This is the reference documentation for Vulkan related functions and types.
59b877906bSopenharmony_ci *  For more task-oriented information, see the @ref vulkan_guide.
60b877906bSopenharmony_ci */
61b877906bSopenharmony_ci/*! @defgroup init Initialization, version and error reference
62b877906bSopenharmony_ci *  @brief Functions and types related to initialization and error handling.
63b877906bSopenharmony_ci *
64b877906bSopenharmony_ci *  This is the reference documentation for initialization and termination of
65b877906bSopenharmony_ci *  the library, version management and error handling.  For more task-oriented
66b877906bSopenharmony_ci *  information, see the @ref intro_guide.
67b877906bSopenharmony_ci */
68b877906bSopenharmony_ci/*! @defgroup input Input reference
69b877906bSopenharmony_ci *  @brief Functions and types related to input handling.
70b877906bSopenharmony_ci *
71b877906bSopenharmony_ci *  This is the reference documentation for input related functions and types.
72b877906bSopenharmony_ci *  For more task-oriented information, see the @ref input_guide.
73b877906bSopenharmony_ci */
74b877906bSopenharmony_ci/*! @defgroup monitor Monitor reference
75b877906bSopenharmony_ci *  @brief Functions and types related to monitors.
76b877906bSopenharmony_ci *
77b877906bSopenharmony_ci *  This is the reference documentation for monitor related functions and types.
78b877906bSopenharmony_ci *  For more task-oriented information, see the @ref monitor_guide.
79b877906bSopenharmony_ci */
80b877906bSopenharmony_ci/*! @defgroup window Window reference
81b877906bSopenharmony_ci *  @brief Functions and types related to windows.
82b877906bSopenharmony_ci *
83b877906bSopenharmony_ci *  This is the reference documentation for window related functions and types,
84b877906bSopenharmony_ci *  including creation, deletion and event polling.  For more task-oriented
85b877906bSopenharmony_ci *  information, see the @ref window_guide.
86b877906bSopenharmony_ci */
87b877906bSopenharmony_ci
88b877906bSopenharmony_ci
89b877906bSopenharmony_ci/*************************************************************************
90b877906bSopenharmony_ci * Compiler- and platform-specific preprocessor work
91b877906bSopenharmony_ci *************************************************************************/
92b877906bSopenharmony_ci
93b877906bSopenharmony_ci/* If we are we on Windows, we want a single define for it.
94b877906bSopenharmony_ci */
95b877906bSopenharmony_ci#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
96b877906bSopenharmony_ci #define _WIN32
97b877906bSopenharmony_ci#endif /* _WIN32 */
98b877906bSopenharmony_ci
99b877906bSopenharmony_ci/* Include because most Windows GLU headers need wchar_t and
100b877906bSopenharmony_ci * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
101b877906bSopenharmony_ci * Include it unconditionally to avoid surprising side-effects.
102b877906bSopenharmony_ci */
103b877906bSopenharmony_ci#include <stddef.h>
104b877906bSopenharmony_ci
105b877906bSopenharmony_ci/* Include because it is needed by Vulkan and related functions.
106b877906bSopenharmony_ci * Include it unconditionally to avoid surprising side-effects.
107b877906bSopenharmony_ci */
108b877906bSopenharmony_ci#include <stdint.h>
109b877906bSopenharmony_ci
110b877906bSopenharmony_ci#if defined(GLFW_INCLUDE_VULKAN)
111b877906bSopenharmony_ci  #include <vulkan/vulkan.h>
112b877906bSopenharmony_ci#endif /* Vulkan header */
113b877906bSopenharmony_ci
114b877906bSopenharmony_ci/* The Vulkan header may have indirectly included windows.h (because of
115b877906bSopenharmony_ci * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.
116b877906bSopenharmony_ci */
117b877906bSopenharmony_ci
118b877906bSopenharmony_ci/* It is customary to use APIENTRY for OpenGL function pointer declarations on
119b877906bSopenharmony_ci * all platforms.  Additionally, the Windows OpenGL header needs APIENTRY.
120b877906bSopenharmony_ci */
121b877906bSopenharmony_ci#if !defined(APIENTRY)
122b877906bSopenharmony_ci #if defined(_WIN32)
123b877906bSopenharmony_ci  #define APIENTRY __stdcall
124b877906bSopenharmony_ci #else
125b877906bSopenharmony_ci  #define APIENTRY
126b877906bSopenharmony_ci #endif
127b877906bSopenharmony_ci #define GLFW_APIENTRY_DEFINED
128b877906bSopenharmony_ci#endif /* APIENTRY */
129b877906bSopenharmony_ci
130b877906bSopenharmony_ci/* Some Windows OpenGL headers need this.
131b877906bSopenharmony_ci */
132b877906bSopenharmony_ci#if !defined(WINGDIAPI) && defined(_WIN32)
133b877906bSopenharmony_ci #define WINGDIAPI __declspec(dllimport)
134b877906bSopenharmony_ci #define GLFW_WINGDIAPI_DEFINED
135b877906bSopenharmony_ci#endif /* WINGDIAPI */
136b877906bSopenharmony_ci
137b877906bSopenharmony_ci/* Some Windows GLU headers need this.
138b877906bSopenharmony_ci */
139b877906bSopenharmony_ci#if !defined(CALLBACK) && defined(_WIN32)
140b877906bSopenharmony_ci #define CALLBACK __stdcall
141b877906bSopenharmony_ci #define GLFW_CALLBACK_DEFINED
142b877906bSopenharmony_ci#endif /* CALLBACK */
143b877906bSopenharmony_ci
144b877906bSopenharmony_ci/* Include the chosen OpenGL or OpenGL ES headers.
145b877906bSopenharmony_ci */
146b877906bSopenharmony_ci#if defined(GLFW_INCLUDE_ES1)
147b877906bSopenharmony_ci
148b877906bSopenharmony_ci #include <GLES/gl.h>
149b877906bSopenharmony_ci #if defined(GLFW_INCLUDE_GLEXT)
150b877906bSopenharmony_ci  #include <GLES/glext.h>
151b877906bSopenharmony_ci #endif
152b877906bSopenharmony_ci
153b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_ES2)
154b877906bSopenharmony_ci
155b877906bSopenharmony_ci #include <GLES2/gl2.h>
156b877906bSopenharmony_ci #if defined(GLFW_INCLUDE_GLEXT)
157b877906bSopenharmony_ci  #include <GLES2/gl2ext.h>
158b877906bSopenharmony_ci #endif
159b877906bSopenharmony_ci
160b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_ES3)
161b877906bSopenharmony_ci
162b877906bSopenharmony_ci #include <GLES3/gl3.h>
163b877906bSopenharmony_ci #if defined(GLFW_INCLUDE_GLEXT)
164b877906bSopenharmony_ci  #include <GLES2/gl2ext.h>
165b877906bSopenharmony_ci #endif
166b877906bSopenharmony_ci
167b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_ES31)
168b877906bSopenharmony_ci
169b877906bSopenharmony_ci #include <GLES3/gl31.h>
170b877906bSopenharmony_ci #if defined(GLFW_INCLUDE_GLEXT)
171b877906bSopenharmony_ci  #include <GLES2/gl2ext.h>
172b877906bSopenharmony_ci #endif
173b877906bSopenharmony_ci
174b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_ES32)
175b877906bSopenharmony_ci
176b877906bSopenharmony_ci #include <GLES3/gl32.h>
177b877906bSopenharmony_ci #if defined(GLFW_INCLUDE_GLEXT)
178b877906bSopenharmony_ci  #include <GLES2/gl2ext.h>
179b877906bSopenharmony_ci #endif
180b877906bSopenharmony_ci
181b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_GLCOREARB)
182b877906bSopenharmony_ci
183b877906bSopenharmony_ci #if defined(__APPLE__)
184b877906bSopenharmony_ci
185b877906bSopenharmony_ci  #include <OpenGL/gl3.h>
186b877906bSopenharmony_ci  #if defined(GLFW_INCLUDE_GLEXT)
187b877906bSopenharmony_ci   #include <OpenGL/gl3ext.h>
188b877906bSopenharmony_ci  #endif /*GLFW_INCLUDE_GLEXT*/
189b877906bSopenharmony_ci
190b877906bSopenharmony_ci #else /*__APPLE__*/
191b877906bSopenharmony_ci
192b877906bSopenharmony_ci  #include <GL/glcorearb.h>
193b877906bSopenharmony_ci  #if defined(GLFW_INCLUDE_GLEXT)
194b877906bSopenharmony_ci   #include <GL/glext.h>
195b877906bSopenharmony_ci  #endif
196b877906bSopenharmony_ci
197b877906bSopenharmony_ci #endif /*__APPLE__*/
198b877906bSopenharmony_ci
199b877906bSopenharmony_ci#elif defined(GLFW_INCLUDE_GLU)
200b877906bSopenharmony_ci
201b877906bSopenharmony_ci #if defined(__APPLE__)
202b877906bSopenharmony_ci
203b877906bSopenharmony_ci  #if defined(GLFW_INCLUDE_GLU)
204b877906bSopenharmony_ci   #include <OpenGL/glu.h>
205b877906bSopenharmony_ci  #endif
206b877906bSopenharmony_ci
207b877906bSopenharmony_ci #else /*__APPLE__*/
208b877906bSopenharmony_ci
209b877906bSopenharmony_ci  #if defined(GLFW_INCLUDE_GLU)
210b877906bSopenharmony_ci   #include <GL/glu.h>
211b877906bSopenharmony_ci  #endif
212b877906bSopenharmony_ci
213b877906bSopenharmony_ci #endif /*__APPLE__*/
214b877906bSopenharmony_ci
215b877906bSopenharmony_ci#elif !defined(GLFW_INCLUDE_NONE) && \
216b877906bSopenharmony_ci      !defined(__gl_h_) && \
217b877906bSopenharmony_ci      !defined(__gles1_gl_h_) && \
218b877906bSopenharmony_ci      !defined(__gles2_gl2_h_) && \
219b877906bSopenharmony_ci      !defined(__gles2_gl3_h_) && \
220b877906bSopenharmony_ci      !defined(__gles2_gl31_h_) && \
221b877906bSopenharmony_ci      !defined(__gles2_gl32_h_) && \
222b877906bSopenharmony_ci      !defined(__gl_glcorearb_h_) && \
223b877906bSopenharmony_ci      !defined(__gl2_h_) /*legacy*/ && \
224b877906bSopenharmony_ci      !defined(__gl3_h_) /*legacy*/ && \
225b877906bSopenharmony_ci      !defined(__gl31_h_) /*legacy*/ && \
226b877906bSopenharmony_ci      !defined(__gl32_h_) /*legacy*/ && \
227b877906bSopenharmony_ci      !defined(__glcorearb_h_) /*legacy*/ && \
228b877906bSopenharmony_ci      !defined(__GL_H__) /*non-standard*/ && \
229b877906bSopenharmony_ci      !defined(__gltypes_h_) /*non-standard*/ && \
230b877906bSopenharmony_ci      !defined(__glee_h_) /*non-standard*/
231b877906bSopenharmony_ci
232b877906bSopenharmony_ci #if defined(__APPLE__)
233b877906bSopenharmony_ci
234b877906bSopenharmony_ci  #if !defined(GLFW_INCLUDE_GLEXT)
235b877906bSopenharmony_ci   #define GL_GLEXT_LEGACY
236b877906bSopenharmony_ci  #endif
237b877906bSopenharmony_ci  #include <OpenGL/gl.h>
238b877906bSopenharmony_ci
239b877906bSopenharmony_ci #else /*__APPLE__*/
240b877906bSopenharmony_ci
241b877906bSopenharmony_ci  #include <GL/gl.h>
242b877906bSopenharmony_ci  #if defined(GLFW_INCLUDE_GLEXT)
243b877906bSopenharmony_ci   #include <GL/glext.h>
244b877906bSopenharmony_ci  #endif
245b877906bSopenharmony_ci
246b877906bSopenharmony_ci #endif /*__APPLE__*/
247b877906bSopenharmony_ci
248b877906bSopenharmony_ci#endif /* OpenGL and OpenGL ES headers */
249b877906bSopenharmony_ci
250b877906bSopenharmony_ci#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
251b877906bSopenharmony_ci /* GLFW_DLL must be defined by applications that are linking against the DLL
252b877906bSopenharmony_ci  * version of the GLFW library.  _GLFW_BUILD_DLL is defined by the GLFW
253b877906bSopenharmony_ci  * configuration header when compiling the DLL version of the library.
254b877906bSopenharmony_ci  */
255b877906bSopenharmony_ci #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
256b877906bSopenharmony_ci#endif
257b877906bSopenharmony_ci
258b877906bSopenharmony_ci/* GLFWAPI is used to declare public API functions for export
259b877906bSopenharmony_ci * from the DLL / shared library / dynamic library.
260b877906bSopenharmony_ci */
261b877906bSopenharmony_ci#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
262b877906bSopenharmony_ci /* We are building GLFW as a Win32 DLL */
263b877906bSopenharmony_ci #define GLFWAPI __declspec(dllexport)
264b877906bSopenharmony_ci#elif defined(_WIN32) && defined(GLFW_DLL)
265b877906bSopenharmony_ci /* We are calling a GLFW Win32 DLL */
266b877906bSopenharmony_ci #define GLFWAPI __declspec(dllimport)
267b877906bSopenharmony_ci#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
268b877906bSopenharmony_ci /* We are building GLFW as a Unix shared library */
269b877906bSopenharmony_ci #define GLFWAPI __attribute__((visibility("default")))
270b877906bSopenharmony_ci#else
271b877906bSopenharmony_ci #define GLFWAPI
272b877906bSopenharmony_ci#endif
273b877906bSopenharmony_ci
274b877906bSopenharmony_ci
275b877906bSopenharmony_ci/*************************************************************************
276b877906bSopenharmony_ci * GLFW API tokens
277b877906bSopenharmony_ci *************************************************************************/
278b877906bSopenharmony_ci
279b877906bSopenharmony_ci/*! @name GLFW version macros
280b877906bSopenharmony_ci *  @{ */
281b877906bSopenharmony_ci/*! @brief The major version number of the GLFW header.
282b877906bSopenharmony_ci *
283b877906bSopenharmony_ci *  The major version number of the GLFW header.  This is incremented when the
284b877906bSopenharmony_ci *  API is changed in non-compatible ways.
285b877906bSopenharmony_ci *  @ingroup init
286b877906bSopenharmony_ci */
287b877906bSopenharmony_ci#define GLFW_VERSION_MAJOR          3
288b877906bSopenharmony_ci/*! @brief The minor version number of the GLFW header.
289b877906bSopenharmony_ci *
290b877906bSopenharmony_ci *  The minor version number of the GLFW header.  This is incremented when
291b877906bSopenharmony_ci *  features are added to the API but it remains backward-compatible.
292b877906bSopenharmony_ci *  @ingroup init
293b877906bSopenharmony_ci */
294b877906bSopenharmony_ci#define GLFW_VERSION_MINOR          5
295b877906bSopenharmony_ci/*! @brief The revision number of the GLFW header.
296b877906bSopenharmony_ci *
297b877906bSopenharmony_ci *  The revision number of the GLFW header.  This is incremented when a bug fix
298b877906bSopenharmony_ci *  release is made that does not contain any API changes.
299b877906bSopenharmony_ci *  @ingroup init
300b877906bSopenharmony_ci */
301b877906bSopenharmony_ci#define GLFW_VERSION_REVISION       0
302b877906bSopenharmony_ci/*! @} */
303b877906bSopenharmony_ci
304b877906bSopenharmony_ci/*! @brief One.
305b877906bSopenharmony_ci *
306b877906bSopenharmony_ci *  This is only semantic sugar for the number 1.  You can instead use `1` or
307b877906bSopenharmony_ci *  `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal
308b877906bSopenharmony_ci *  to one.
309b877906bSopenharmony_ci *
310b877906bSopenharmony_ci *  @ingroup init
311b877906bSopenharmony_ci */
312b877906bSopenharmony_ci#define GLFW_TRUE                   1
313b877906bSopenharmony_ci/*! @brief Zero.
314b877906bSopenharmony_ci *
315b877906bSopenharmony_ci *  This is only semantic sugar for the number 0.  You can instead use `0` or
316b877906bSopenharmony_ci *  `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is
317b877906bSopenharmony_ci *  equal to zero.
318b877906bSopenharmony_ci *
319b877906bSopenharmony_ci *  @ingroup init
320b877906bSopenharmony_ci */
321b877906bSopenharmony_ci#define GLFW_FALSE                  0
322b877906bSopenharmony_ci
323b877906bSopenharmony_ci/*! @name Key and button actions
324b877906bSopenharmony_ci *  @{ */
325b877906bSopenharmony_ci/*! @brief The key or mouse button was released.
326b877906bSopenharmony_ci *
327b877906bSopenharmony_ci *  The key or mouse button was released.
328b877906bSopenharmony_ci *
329b877906bSopenharmony_ci *  @ingroup input
330b877906bSopenharmony_ci */
331b877906bSopenharmony_ci#define GLFW_RELEASE                0
332b877906bSopenharmony_ci/*! @brief The key or mouse button was pressed.
333b877906bSopenharmony_ci *
334b877906bSopenharmony_ci *  The key or mouse button was pressed.
335b877906bSopenharmony_ci *
336b877906bSopenharmony_ci *  @ingroup input
337b877906bSopenharmony_ci */
338b877906bSopenharmony_ci#define GLFW_PRESS                  1
339b877906bSopenharmony_ci/*! @brief The key was held down until it repeated.
340b877906bSopenharmony_ci *
341b877906bSopenharmony_ci *  The key was held down until it repeated.
342b877906bSopenharmony_ci *
343b877906bSopenharmony_ci *  @ingroup input
344b877906bSopenharmony_ci */
345b877906bSopenharmony_ci#define GLFW_REPEAT                 2
346b877906bSopenharmony_ci/*! @} */
347b877906bSopenharmony_ci
348b877906bSopenharmony_ci/*! @defgroup hat_state Joystick hat states
349b877906bSopenharmony_ci *  @brief Joystick hat states.
350b877906bSopenharmony_ci *
351b877906bSopenharmony_ci *  See [joystick hat input](@ref joystick_hat) for how these are used.
352b877906bSopenharmony_ci *
353b877906bSopenharmony_ci *  @ingroup input
354b877906bSopenharmony_ci *  @{ */
355b877906bSopenharmony_ci#define GLFW_HAT_CENTERED           0
356b877906bSopenharmony_ci#define GLFW_HAT_UP                 1
357b877906bSopenharmony_ci#define GLFW_HAT_RIGHT              2
358b877906bSopenharmony_ci#define GLFW_HAT_DOWN               4
359b877906bSopenharmony_ci#define GLFW_HAT_LEFT               8
360b877906bSopenharmony_ci#define GLFW_HAT_RIGHT_UP           (GLFW_HAT_RIGHT | GLFW_HAT_UP)
361b877906bSopenharmony_ci#define GLFW_HAT_RIGHT_DOWN         (GLFW_HAT_RIGHT | GLFW_HAT_DOWN)
362b877906bSopenharmony_ci#define GLFW_HAT_LEFT_UP            (GLFW_HAT_LEFT  | GLFW_HAT_UP)
363b877906bSopenharmony_ci#define GLFW_HAT_LEFT_DOWN          (GLFW_HAT_LEFT  | GLFW_HAT_DOWN)
364b877906bSopenharmony_ci
365b877906bSopenharmony_ci/*! @ingroup input
366b877906bSopenharmony_ci */
367b877906bSopenharmony_ci#define GLFW_KEY_UNKNOWN            -1
368b877906bSopenharmony_ci
369b877906bSopenharmony_ci/*! @} */
370b877906bSopenharmony_ci
371b877906bSopenharmony_ci/*! @defgroup keys Keyboard key tokens
372b877906bSopenharmony_ci *  @brief Keyboard key tokens.
373b877906bSopenharmony_ci *
374b877906bSopenharmony_ci *  See [key input](@ref input_key) for how these are used.
375b877906bSopenharmony_ci *
376b877906bSopenharmony_ci *  These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60),
377b877906bSopenharmony_ci *  but re-arranged to map to 7-bit ASCII for printable keys (function keys are
378b877906bSopenharmony_ci *  put in the 256+ range).
379b877906bSopenharmony_ci *
380b877906bSopenharmony_ci *  The naming of the key codes follow these rules:
381b877906bSopenharmony_ci *   - The US keyboard layout is used
382b877906bSopenharmony_ci *   - Names of printable alphanumeric characters are used (e.g. "A", "R",
383b877906bSopenharmony_ci *     "3", etc.)
384b877906bSopenharmony_ci *   - For non-alphanumeric characters, Unicode:ish names are used (e.g.
385b877906bSopenharmony_ci *     "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not
386b877906bSopenharmony_ci *     correspond to the Unicode standard (usually for brevity)
387b877906bSopenharmony_ci *   - Keys that lack a clear US mapping are named "WORLD_x"
388b877906bSopenharmony_ci *   - For non-printable keys, custom names are used (e.g. "F4",
389b877906bSopenharmony_ci *     "BACKSPACE", etc.)
390b877906bSopenharmony_ci *
391b877906bSopenharmony_ci *  @ingroup input
392b877906bSopenharmony_ci *  @{
393b877906bSopenharmony_ci */
394b877906bSopenharmony_ci
395b877906bSopenharmony_ci/* Printable keys */
396b877906bSopenharmony_ci#define GLFW_KEY_SPACE              32
397b877906bSopenharmony_ci#define GLFW_KEY_APOSTROPHE         39  /* ' */
398b877906bSopenharmony_ci#define GLFW_KEY_COMMA              44  /* , */
399b877906bSopenharmony_ci#define GLFW_KEY_MINUS              45  /* - */
400b877906bSopenharmony_ci#define GLFW_KEY_PERIOD             46  /* . */
401b877906bSopenharmony_ci#define GLFW_KEY_SLASH              47  /* / */
402b877906bSopenharmony_ci#define GLFW_KEY_0                  48
403b877906bSopenharmony_ci#define GLFW_KEY_1                  49
404b877906bSopenharmony_ci#define GLFW_KEY_2                  50
405b877906bSopenharmony_ci#define GLFW_KEY_3                  51
406b877906bSopenharmony_ci#define GLFW_KEY_4                  52
407b877906bSopenharmony_ci#define GLFW_KEY_5                  53
408b877906bSopenharmony_ci#define GLFW_KEY_6                  54
409b877906bSopenharmony_ci#define GLFW_KEY_7                  55
410b877906bSopenharmony_ci#define GLFW_KEY_8                  56
411b877906bSopenharmony_ci#define GLFW_KEY_9                  57
412b877906bSopenharmony_ci#define GLFW_KEY_SEMICOLON          59  /* ; */
413b877906bSopenharmony_ci#define GLFW_KEY_EQUAL              61  /* = */
414b877906bSopenharmony_ci#define GLFW_KEY_A                  65
415b877906bSopenharmony_ci#define GLFW_KEY_B                  66
416b877906bSopenharmony_ci#define GLFW_KEY_C                  67
417b877906bSopenharmony_ci#define GLFW_KEY_D                  68
418b877906bSopenharmony_ci#define GLFW_KEY_E                  69
419b877906bSopenharmony_ci#define GLFW_KEY_F                  70
420b877906bSopenharmony_ci#define GLFW_KEY_G                  71
421b877906bSopenharmony_ci#define GLFW_KEY_H                  72
422b877906bSopenharmony_ci#define GLFW_KEY_I                  73
423b877906bSopenharmony_ci#define GLFW_KEY_J                  74
424b877906bSopenharmony_ci#define GLFW_KEY_K                  75
425b877906bSopenharmony_ci#define GLFW_KEY_L                  76
426b877906bSopenharmony_ci#define GLFW_KEY_M                  77
427b877906bSopenharmony_ci#define GLFW_KEY_N                  78
428b877906bSopenharmony_ci#define GLFW_KEY_O                  79
429b877906bSopenharmony_ci#define GLFW_KEY_P                  80
430b877906bSopenharmony_ci#define GLFW_KEY_Q                  81
431b877906bSopenharmony_ci#define GLFW_KEY_R                  82
432b877906bSopenharmony_ci#define GLFW_KEY_S                  83
433b877906bSopenharmony_ci#define GLFW_KEY_T                  84
434b877906bSopenharmony_ci#define GLFW_KEY_U                  85
435b877906bSopenharmony_ci#define GLFW_KEY_V                  86
436b877906bSopenharmony_ci#define GLFW_KEY_W                  87
437b877906bSopenharmony_ci#define GLFW_KEY_X                  88
438b877906bSopenharmony_ci#define GLFW_KEY_Y                  89
439b877906bSopenharmony_ci#define GLFW_KEY_Z                  90
440b877906bSopenharmony_ci#define GLFW_KEY_LEFT_BRACKET       91  /* [ */
441b877906bSopenharmony_ci#define GLFW_KEY_BACKSLASH          92  /* \ */
442b877906bSopenharmony_ci#define GLFW_KEY_RIGHT_BRACKET      93  /* ] */
443b877906bSopenharmony_ci#define GLFW_KEY_GRAVE_ACCENT       96  /* ` */
444b877906bSopenharmony_ci#define GLFW_KEY_WORLD_1            161 /* non-US #1 */
445b877906bSopenharmony_ci#define GLFW_KEY_WORLD_2            162 /* non-US #2 */
446b877906bSopenharmony_ci
447b877906bSopenharmony_ci/* Function keys */
448b877906bSopenharmony_ci#define GLFW_KEY_ESCAPE             256
449b877906bSopenharmony_ci#define GLFW_KEY_ENTER              257
450b877906bSopenharmony_ci#define GLFW_KEY_TAB                258
451b877906bSopenharmony_ci#define GLFW_KEY_BACKSPACE          259
452b877906bSopenharmony_ci#define GLFW_KEY_INSERT             260
453b877906bSopenharmony_ci#define GLFW_KEY_DELETE             261
454b877906bSopenharmony_ci#define GLFW_KEY_RIGHT              262
455b877906bSopenharmony_ci#define GLFW_KEY_LEFT               263
456b877906bSopenharmony_ci#define GLFW_KEY_DOWN               264
457b877906bSopenharmony_ci#define GLFW_KEY_UP                 265
458b877906bSopenharmony_ci#define GLFW_KEY_PAGE_UP            266
459b877906bSopenharmony_ci#define GLFW_KEY_PAGE_DOWN          267
460b877906bSopenharmony_ci#define GLFW_KEY_HOME               268
461b877906bSopenharmony_ci#define GLFW_KEY_END                269
462b877906bSopenharmony_ci#define GLFW_KEY_CAPS_LOCK          280
463b877906bSopenharmony_ci#define GLFW_KEY_SCROLL_LOCK        281
464b877906bSopenharmony_ci#define GLFW_KEY_NUM_LOCK           282
465b877906bSopenharmony_ci#define GLFW_KEY_PRINT_SCREEN       283
466b877906bSopenharmony_ci#define GLFW_KEY_PAUSE              284
467b877906bSopenharmony_ci#define GLFW_KEY_F1                 290
468b877906bSopenharmony_ci#define GLFW_KEY_F2                 291
469b877906bSopenharmony_ci#define GLFW_KEY_F3                 292
470b877906bSopenharmony_ci#define GLFW_KEY_F4                 293
471b877906bSopenharmony_ci#define GLFW_KEY_F5                 294
472b877906bSopenharmony_ci#define GLFW_KEY_F6                 295
473b877906bSopenharmony_ci#define GLFW_KEY_F7                 296
474b877906bSopenharmony_ci#define GLFW_KEY_F8                 297
475b877906bSopenharmony_ci#define GLFW_KEY_F9                 298
476b877906bSopenharmony_ci#define GLFW_KEY_F10                299
477b877906bSopenharmony_ci#define GLFW_KEY_F11                300
478b877906bSopenharmony_ci#define GLFW_KEY_F12                301
479b877906bSopenharmony_ci#define GLFW_KEY_F13                302
480b877906bSopenharmony_ci#define GLFW_KEY_F14                303
481b877906bSopenharmony_ci#define GLFW_KEY_F15                304
482b877906bSopenharmony_ci#define GLFW_KEY_F16                305
483b877906bSopenharmony_ci#define GLFW_KEY_F17                306
484b877906bSopenharmony_ci#define GLFW_KEY_F18                307
485b877906bSopenharmony_ci#define GLFW_KEY_F19                308
486b877906bSopenharmony_ci#define GLFW_KEY_F20                309
487b877906bSopenharmony_ci#define GLFW_KEY_F21                310
488b877906bSopenharmony_ci#define GLFW_KEY_F22                311
489b877906bSopenharmony_ci#define GLFW_KEY_F23                312
490b877906bSopenharmony_ci#define GLFW_KEY_F24                313
491b877906bSopenharmony_ci#define GLFW_KEY_F25                314
492b877906bSopenharmony_ci#define GLFW_KEY_KP_0               320
493b877906bSopenharmony_ci#define GLFW_KEY_KP_1               321
494b877906bSopenharmony_ci#define GLFW_KEY_KP_2               322
495b877906bSopenharmony_ci#define GLFW_KEY_KP_3               323
496b877906bSopenharmony_ci#define GLFW_KEY_KP_4               324
497b877906bSopenharmony_ci#define GLFW_KEY_KP_5               325
498b877906bSopenharmony_ci#define GLFW_KEY_KP_6               326
499b877906bSopenharmony_ci#define GLFW_KEY_KP_7               327
500b877906bSopenharmony_ci#define GLFW_KEY_KP_8               328
501b877906bSopenharmony_ci#define GLFW_KEY_KP_9               329
502b877906bSopenharmony_ci#define GLFW_KEY_KP_DECIMAL         330
503b877906bSopenharmony_ci#define GLFW_KEY_KP_DIVIDE          331
504b877906bSopenharmony_ci#define GLFW_KEY_KP_MULTIPLY        332
505b877906bSopenharmony_ci#define GLFW_KEY_KP_SUBTRACT        333
506b877906bSopenharmony_ci#define GLFW_KEY_KP_ADD             334
507b877906bSopenharmony_ci#define GLFW_KEY_KP_ENTER           335
508b877906bSopenharmony_ci#define GLFW_KEY_KP_EQUAL           336
509b877906bSopenharmony_ci#define GLFW_KEY_LEFT_SHIFT         340
510b877906bSopenharmony_ci#define GLFW_KEY_LEFT_CONTROL       341
511b877906bSopenharmony_ci#define GLFW_KEY_LEFT_ALT           342
512b877906bSopenharmony_ci#define GLFW_KEY_LEFT_SUPER         343
513b877906bSopenharmony_ci#define GLFW_KEY_RIGHT_SHIFT        344
514b877906bSopenharmony_ci#define GLFW_KEY_RIGHT_CONTROL      345
515b877906bSopenharmony_ci#define GLFW_KEY_RIGHT_ALT          346
516b877906bSopenharmony_ci#define GLFW_KEY_RIGHT_SUPER        347
517b877906bSopenharmony_ci#define GLFW_KEY_MENU               348
518b877906bSopenharmony_ci
519b877906bSopenharmony_ci#define GLFW_KEY_LAST               GLFW_KEY_MENU
520b877906bSopenharmony_ci
521b877906bSopenharmony_ci/*! @} */
522b877906bSopenharmony_ci
523b877906bSopenharmony_ci/*! @defgroup mods Modifier key flags
524b877906bSopenharmony_ci *  @brief Modifier key flags.
525b877906bSopenharmony_ci *
526b877906bSopenharmony_ci *  See [key input](@ref input_key) for how these are used.
527b877906bSopenharmony_ci *
528b877906bSopenharmony_ci *  @ingroup input
529b877906bSopenharmony_ci *  @{ */
530b877906bSopenharmony_ci
531b877906bSopenharmony_ci/*! @brief If this bit is set one or more Shift keys were held down.
532b877906bSopenharmony_ci *
533b877906bSopenharmony_ci *  If this bit is set one or more Shift keys were held down.
534b877906bSopenharmony_ci */
535b877906bSopenharmony_ci#define GLFW_MOD_SHIFT           0x0001
536b877906bSopenharmony_ci/*! @brief If this bit is set one or more Control keys were held down.
537b877906bSopenharmony_ci *
538b877906bSopenharmony_ci *  If this bit is set one or more Control keys were held down.
539b877906bSopenharmony_ci */
540b877906bSopenharmony_ci#define GLFW_MOD_CONTROL         0x0002
541b877906bSopenharmony_ci/*! @brief If this bit is set one or more Alt keys were held down.
542b877906bSopenharmony_ci *
543b877906bSopenharmony_ci *  If this bit is set one or more Alt keys were held down.
544b877906bSopenharmony_ci */
545b877906bSopenharmony_ci#define GLFW_MOD_ALT             0x0004
546b877906bSopenharmony_ci/*! @brief If this bit is set one or more Super keys were held down.
547b877906bSopenharmony_ci *
548b877906bSopenharmony_ci *  If this bit is set one or more Super keys were held down.
549b877906bSopenharmony_ci */
550b877906bSopenharmony_ci#define GLFW_MOD_SUPER           0x0008
551b877906bSopenharmony_ci/*! @brief If this bit is set the Caps Lock key is enabled.
552b877906bSopenharmony_ci *
553b877906bSopenharmony_ci *  If this bit is set the Caps Lock key is enabled and the @ref
554b877906bSopenharmony_ci *  GLFW_LOCK_KEY_MODS input mode is set.
555b877906bSopenharmony_ci */
556b877906bSopenharmony_ci#define GLFW_MOD_CAPS_LOCK       0x0010
557b877906bSopenharmony_ci/*! @brief If this bit is set the Num Lock key is enabled.
558b877906bSopenharmony_ci *
559b877906bSopenharmony_ci *  If this bit is set the Num Lock key is enabled and the @ref
560b877906bSopenharmony_ci *  GLFW_LOCK_KEY_MODS input mode is set.
561b877906bSopenharmony_ci */
562b877906bSopenharmony_ci#define GLFW_MOD_NUM_LOCK        0x0020
563b877906bSopenharmony_ci
564b877906bSopenharmony_ci/*! @} */
565b877906bSopenharmony_ci
566b877906bSopenharmony_ci/*! @defgroup buttons Mouse buttons
567b877906bSopenharmony_ci *  @brief Mouse button IDs.
568b877906bSopenharmony_ci *
569b877906bSopenharmony_ci *  See [mouse button input](@ref input_mouse_button) for how these are used.
570b877906bSopenharmony_ci *
571b877906bSopenharmony_ci *  @ingroup input
572b877906bSopenharmony_ci *  @{ */
573b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_1         0
574b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_2         1
575b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_3         2
576b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_4         3
577b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_5         4
578b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_6         5
579b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_7         6
580b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_8         7
581b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_LAST      GLFW_MOUSE_BUTTON_8
582b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_LEFT      GLFW_MOUSE_BUTTON_1
583b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_RIGHT     GLFW_MOUSE_BUTTON_2
584b877906bSopenharmony_ci#define GLFW_MOUSE_BUTTON_MIDDLE    GLFW_MOUSE_BUTTON_3
585b877906bSopenharmony_ci/*! @} */
586b877906bSopenharmony_ci
587b877906bSopenharmony_ci/*! @defgroup joysticks Joysticks
588b877906bSopenharmony_ci *  @brief Joystick IDs.
589b877906bSopenharmony_ci *
590b877906bSopenharmony_ci *  See [joystick input](@ref joystick) for how these are used.
591b877906bSopenharmony_ci *
592b877906bSopenharmony_ci *  @ingroup input
593b877906bSopenharmony_ci *  @{ */
594b877906bSopenharmony_ci#define GLFW_JOYSTICK_1             0
595b877906bSopenharmony_ci#define GLFW_JOYSTICK_2             1
596b877906bSopenharmony_ci#define GLFW_JOYSTICK_3             2
597b877906bSopenharmony_ci#define GLFW_JOYSTICK_4             3
598b877906bSopenharmony_ci#define GLFW_JOYSTICK_5             4
599b877906bSopenharmony_ci#define GLFW_JOYSTICK_6             5
600b877906bSopenharmony_ci#define GLFW_JOYSTICK_7             6
601b877906bSopenharmony_ci#define GLFW_JOYSTICK_8             7
602b877906bSopenharmony_ci#define GLFW_JOYSTICK_9             8
603b877906bSopenharmony_ci#define GLFW_JOYSTICK_10            9
604b877906bSopenharmony_ci#define GLFW_JOYSTICK_11            10
605b877906bSopenharmony_ci#define GLFW_JOYSTICK_12            11
606b877906bSopenharmony_ci#define GLFW_JOYSTICK_13            12
607b877906bSopenharmony_ci#define GLFW_JOYSTICK_14            13
608b877906bSopenharmony_ci#define GLFW_JOYSTICK_15            14
609b877906bSopenharmony_ci#define GLFW_JOYSTICK_16            15
610b877906bSopenharmony_ci#define GLFW_JOYSTICK_LAST          GLFW_JOYSTICK_16
611b877906bSopenharmony_ci/*! @} */
612b877906bSopenharmony_ci
613b877906bSopenharmony_ci/*! @defgroup gamepad_buttons Gamepad buttons
614b877906bSopenharmony_ci *  @brief Gamepad buttons.
615b877906bSopenharmony_ci *
616b877906bSopenharmony_ci *  See @ref gamepad for how these are used.
617b877906bSopenharmony_ci *
618b877906bSopenharmony_ci *  @ingroup input
619b877906bSopenharmony_ci *  @{ */
620b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_A               0
621b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_B               1
622b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_X               2
623b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_Y               3
624b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER     4
625b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER    5
626b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_BACK            6
627b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_START           7
628b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_GUIDE           8
629b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB      9
630b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB     10
631b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_DPAD_UP         11
632b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT      12
633b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN       13
634b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT       14
635b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_LAST            GLFW_GAMEPAD_BUTTON_DPAD_LEFT
636b877906bSopenharmony_ci
637b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_CROSS       GLFW_GAMEPAD_BUTTON_A
638b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_CIRCLE      GLFW_GAMEPAD_BUTTON_B
639b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_SQUARE      GLFW_GAMEPAD_BUTTON_X
640b877906bSopenharmony_ci#define GLFW_GAMEPAD_BUTTON_TRIANGLE    GLFW_GAMEPAD_BUTTON_Y
641b877906bSopenharmony_ci/*! @} */
642b877906bSopenharmony_ci
643b877906bSopenharmony_ci/*! @defgroup gamepad_axes Gamepad axes
644b877906bSopenharmony_ci *  @brief Gamepad axes.
645b877906bSopenharmony_ci *
646b877906bSopenharmony_ci *  See @ref gamepad for how these are used.
647b877906bSopenharmony_ci *
648b877906bSopenharmony_ci *  @ingroup input
649b877906bSopenharmony_ci *  @{ */
650b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_LEFT_X        0
651b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_LEFT_Y        1
652b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_RIGHT_X       2
653b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_RIGHT_Y       3
654b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER  4
655b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5
656b877906bSopenharmony_ci#define GLFW_GAMEPAD_AXIS_LAST          GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
657b877906bSopenharmony_ci/*! @} */
658b877906bSopenharmony_ci
659b877906bSopenharmony_ci/*! @defgroup errors Error codes
660b877906bSopenharmony_ci *  @brief Error codes.
661b877906bSopenharmony_ci *
662b877906bSopenharmony_ci *  See [error handling](@ref error_handling) for how these are used.
663b877906bSopenharmony_ci *
664b877906bSopenharmony_ci *  @ingroup init
665b877906bSopenharmony_ci *  @{ */
666b877906bSopenharmony_ci/*! @brief No error has occurred.
667b877906bSopenharmony_ci *
668b877906bSopenharmony_ci *  No error has occurred.
669b877906bSopenharmony_ci *
670b877906bSopenharmony_ci *  @analysis Yay.
671b877906bSopenharmony_ci */
672b877906bSopenharmony_ci#define GLFW_NO_ERROR               0
673b877906bSopenharmony_ci/*! @brief GLFW has not been initialized.
674b877906bSopenharmony_ci *
675b877906bSopenharmony_ci *  This occurs if a GLFW function was called that must not be called unless the
676b877906bSopenharmony_ci *  library is [initialized](@ref intro_init).
677b877906bSopenharmony_ci *
678b877906bSopenharmony_ci *  @analysis Application programmer error.  Initialize GLFW before calling any
679b877906bSopenharmony_ci *  function that requires initialization.
680b877906bSopenharmony_ci */
681b877906bSopenharmony_ci#define GLFW_NOT_INITIALIZED        0x00010001
682b877906bSopenharmony_ci/*! @brief No context is current for this thread.
683b877906bSopenharmony_ci *
684b877906bSopenharmony_ci *  This occurs if a GLFW function was called that needs and operates on the
685b877906bSopenharmony_ci *  current OpenGL or OpenGL ES context but no context is current on the calling
686b877906bSopenharmony_ci *  thread.  One such function is @ref glfwSwapInterval.
687b877906bSopenharmony_ci *
688b877906bSopenharmony_ci *  @analysis Application programmer error.  Ensure a context is current before
689b877906bSopenharmony_ci *  calling functions that require a current context.
690b877906bSopenharmony_ci */
691b877906bSopenharmony_ci#define GLFW_NO_CURRENT_CONTEXT     0x00010002
692b877906bSopenharmony_ci/*! @brief One of the arguments to the function was an invalid enum value.
693b877906bSopenharmony_ci *
694b877906bSopenharmony_ci *  One of the arguments to the function was an invalid enum value, for example
695b877906bSopenharmony_ci *  requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib.
696b877906bSopenharmony_ci *
697b877906bSopenharmony_ci *  @analysis Application programmer error.  Fix the offending call.
698b877906bSopenharmony_ci */
699b877906bSopenharmony_ci#define GLFW_INVALID_ENUM           0x00010003
700b877906bSopenharmony_ci/*! @brief One of the arguments to the function was an invalid value.
701b877906bSopenharmony_ci *
702b877906bSopenharmony_ci *  One of the arguments to the function was an invalid value, for example
703b877906bSopenharmony_ci *  requesting a non-existent OpenGL or OpenGL ES version like 2.7.
704b877906bSopenharmony_ci *
705b877906bSopenharmony_ci *  Requesting a valid but unavailable OpenGL or OpenGL ES version will instead
706b877906bSopenharmony_ci *  result in a @ref GLFW_VERSION_UNAVAILABLE error.
707b877906bSopenharmony_ci *
708b877906bSopenharmony_ci *  @analysis Application programmer error.  Fix the offending call.
709b877906bSopenharmony_ci */
710b877906bSopenharmony_ci#define GLFW_INVALID_VALUE          0x00010004
711b877906bSopenharmony_ci/*! @brief A memory allocation failed.
712b877906bSopenharmony_ci *
713b877906bSopenharmony_ci *  A memory allocation failed.
714b877906bSopenharmony_ci *
715b877906bSopenharmony_ci *  @analysis A bug in GLFW or the underlying operating system.  Report the bug
716b877906bSopenharmony_ci *  to our [issue tracker](https://github.com/glfw/glfw/issues).
717b877906bSopenharmony_ci */
718b877906bSopenharmony_ci#define GLFW_OUT_OF_MEMORY          0x00010005
719b877906bSopenharmony_ci/*! @brief GLFW could not find support for the requested API on the system.
720b877906bSopenharmony_ci *
721b877906bSopenharmony_ci *  GLFW could not find support for the requested API on the system.
722b877906bSopenharmony_ci *
723b877906bSopenharmony_ci *  @analysis The installed graphics driver does not support the requested
724b877906bSopenharmony_ci *  API, or does not support it via the chosen context creation API.
725b877906bSopenharmony_ci *  Below are a few examples.
726b877906bSopenharmony_ci *
727b877906bSopenharmony_ci *  @par
728b877906bSopenharmony_ci *  Some pre-installed Windows graphics drivers do not support OpenGL.  AMD only
729b877906bSopenharmony_ci *  supports OpenGL ES via EGL, while Nvidia and Intel only support it via
730b877906bSopenharmony_ci *  a WGL or GLX extension.  macOS does not provide OpenGL ES at all.  The Mesa
731b877906bSopenharmony_ci *  EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
732b877906bSopenharmony_ci *  driver.  Older graphics drivers do not support Vulkan.
733b877906bSopenharmony_ci */
734b877906bSopenharmony_ci#define GLFW_API_UNAVAILABLE        0x00010006
735b877906bSopenharmony_ci/*! @brief The requested OpenGL or OpenGL ES version is not available.
736b877906bSopenharmony_ci *
737b877906bSopenharmony_ci *  The requested OpenGL or OpenGL ES version (including any requested context
738b877906bSopenharmony_ci *  or framebuffer hints) is not available on this machine.
739b877906bSopenharmony_ci *
740b877906bSopenharmony_ci *  @analysis The machine does not support your requirements.  If your
741b877906bSopenharmony_ci *  application is sufficiently flexible, downgrade your requirements and try
742b877906bSopenharmony_ci *  again.  Otherwise, inform the user that their machine does not match your
743b877906bSopenharmony_ci *  requirements.
744b877906bSopenharmony_ci *
745b877906bSopenharmony_ci *  @par
746b877906bSopenharmony_ci *  Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0
747b877906bSopenharmony_ci *  comes out before the 4.x series gets that far, also fail with this error and
748b877906bSopenharmony_ci *  not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions
749b877906bSopenharmony_ci *  will exist.
750b877906bSopenharmony_ci */
751b877906bSopenharmony_ci#define GLFW_VERSION_UNAVAILABLE    0x00010007
752b877906bSopenharmony_ci/*! @brief A platform-specific error occurred that does not match any of the
753b877906bSopenharmony_ci *  more specific categories.
754b877906bSopenharmony_ci *
755b877906bSopenharmony_ci *  A platform-specific error occurred that does not match any of the more
756b877906bSopenharmony_ci *  specific categories.
757b877906bSopenharmony_ci *
758b877906bSopenharmony_ci *  @analysis A bug or configuration error in GLFW, the underlying operating
759b877906bSopenharmony_ci *  system or its drivers, or a lack of required resources.  Report the issue to
760b877906bSopenharmony_ci *  our [issue tracker](https://github.com/glfw/glfw/issues).
761b877906bSopenharmony_ci */
762b877906bSopenharmony_ci#define GLFW_PLATFORM_ERROR         0x00010008
763b877906bSopenharmony_ci/*! @brief The requested format is not supported or available.
764b877906bSopenharmony_ci *
765b877906bSopenharmony_ci *  If emitted during window creation, the requested pixel format is not
766b877906bSopenharmony_ci *  supported.
767b877906bSopenharmony_ci *
768b877906bSopenharmony_ci *  If emitted when querying the clipboard, the contents of the clipboard could
769b877906bSopenharmony_ci *  not be converted to the requested format.
770b877906bSopenharmony_ci *
771b877906bSopenharmony_ci *  @analysis If emitted during window creation, one or more
772b877906bSopenharmony_ci *  [hard constraints](@ref window_hints_hard) did not match any of the
773b877906bSopenharmony_ci *  available pixel formats.  If your application is sufficiently flexible,
774b877906bSopenharmony_ci *  downgrade your requirements and try again.  Otherwise, inform the user that
775b877906bSopenharmony_ci *  their machine does not match your requirements.
776b877906bSopenharmony_ci *
777b877906bSopenharmony_ci *  @par
778b877906bSopenharmony_ci *  If emitted when querying the clipboard, ignore the error or report it to
779b877906bSopenharmony_ci *  the user, as appropriate.
780b877906bSopenharmony_ci */
781b877906bSopenharmony_ci#define GLFW_FORMAT_UNAVAILABLE     0x00010009
782b877906bSopenharmony_ci/*! @brief The specified window does not have an OpenGL or OpenGL ES context.
783b877906bSopenharmony_ci *
784b877906bSopenharmony_ci *  A window that does not have an OpenGL or OpenGL ES context was passed to
785b877906bSopenharmony_ci *  a function that requires it to have one.
786b877906bSopenharmony_ci *
787b877906bSopenharmony_ci *  @analysis Application programmer error.  Fix the offending call.
788b877906bSopenharmony_ci */
789b877906bSopenharmony_ci#define GLFW_NO_WINDOW_CONTEXT      0x0001000A
790b877906bSopenharmony_ci/*! @brief The specified cursor shape is not available.
791b877906bSopenharmony_ci *
792b877906bSopenharmony_ci *  The specified standard cursor shape is not available, either because the
793b877906bSopenharmony_ci *  current platform cursor theme does not provide it or because it is not
794b877906bSopenharmony_ci *  available on the platform.
795b877906bSopenharmony_ci *
796b877906bSopenharmony_ci *  @analysis Platform or system settings limitation.  Pick another
797b877906bSopenharmony_ci *  [standard cursor shape](@ref shapes) or create a
798b877906bSopenharmony_ci *  [custom cursor](@ref cursor_custom).
799b877906bSopenharmony_ci */
800b877906bSopenharmony_ci#define GLFW_CURSOR_UNAVAILABLE     0x0001000B
801b877906bSopenharmony_ci/*! @brief The requested feature is not provided by the platform.
802b877906bSopenharmony_ci *
803b877906bSopenharmony_ci *  The requested feature is not provided by the platform, so GLFW is unable to
804b877906bSopenharmony_ci *  implement it.  The documentation for each function notes if it could emit
805b877906bSopenharmony_ci *  this error.
806b877906bSopenharmony_ci *
807b877906bSopenharmony_ci *  @analysis Platform or platform version limitation.  The error can be ignored
808b877906bSopenharmony_ci *  unless the feature is critical to the application.
809b877906bSopenharmony_ci *
810b877906bSopenharmony_ci *  @par
811b877906bSopenharmony_ci *  A function call that emits this error has no effect other than the error and
812b877906bSopenharmony_ci *  updating any existing out parameters.
813b877906bSopenharmony_ci */
814b877906bSopenharmony_ci#define GLFW_FEATURE_UNAVAILABLE    0x0001000C
815b877906bSopenharmony_ci/*! @brief The requested feature is not implemented for the platform.
816b877906bSopenharmony_ci *
817b877906bSopenharmony_ci *  The requested feature has not yet been implemented in GLFW for this platform.
818b877906bSopenharmony_ci *
819b877906bSopenharmony_ci *  @analysis An incomplete implementation of GLFW for this platform, hopefully
820b877906bSopenharmony_ci *  fixed in a future release.  The error can be ignored unless the feature is
821b877906bSopenharmony_ci *  critical to the application.
822b877906bSopenharmony_ci *
823b877906bSopenharmony_ci *  @par
824b877906bSopenharmony_ci *  A function call that emits this error has no effect other than the error and
825b877906bSopenharmony_ci *  updating any existing out parameters.
826b877906bSopenharmony_ci */
827b877906bSopenharmony_ci#define GLFW_FEATURE_UNIMPLEMENTED  0x0001000D
828b877906bSopenharmony_ci/*! @brief Platform unavailable or no matching platform was found.
829b877906bSopenharmony_ci *
830b877906bSopenharmony_ci *  If emitted during initialization, no matching platform was found.  If the @ref
831b877906bSopenharmony_ci *  GLFW_PLATFORM init hint was set to `GLFW_ANY_PLATFORM`, GLFW could not detect any of
832b877906bSopenharmony_ci *  the platforms supported by this library binary, except for the Null platform.  If the
833b877906bSopenharmony_ci *  init hint was set to a specific platform, it is either not supported by this library
834b877906bSopenharmony_ci *  binary or GLFW was not able to detect it.
835b877906bSopenharmony_ci *
836b877906bSopenharmony_ci *  If emitted by a native access function, GLFW was initialized for a different platform
837b877906bSopenharmony_ci *  than the function is for.
838b877906bSopenharmony_ci *
839b877906bSopenharmony_ci *  @analysis Failure to detect any platform usually only happens on non-macOS Unix
840b877906bSopenharmony_ci *  systems, either when no window system is running or the program was run from
841b877906bSopenharmony_ci *  a terminal that does not have the necessary environment variables.  Fall back to
842b877906bSopenharmony_ci *  a different platform if possible or notify the user that no usable platform was
843b877906bSopenharmony_ci *  detected.
844b877906bSopenharmony_ci *
845b877906bSopenharmony_ci *  Failure to detect a specific platform may have the same cause as above or be because
846b877906bSopenharmony_ci *  support for that platform was not compiled in.  Call @ref glfwPlatformSupported to
847b877906bSopenharmony_ci *  check whether a specific platform is supported by a library binary.
848b877906bSopenharmony_ci */
849b877906bSopenharmony_ci#define GLFW_PLATFORM_UNAVAILABLE   0x0001000E
850b877906bSopenharmony_ci/*! @} */
851b877906bSopenharmony_ci
852b877906bSopenharmony_ci/*! @addtogroup window
853b877906bSopenharmony_ci *  @{ */
854b877906bSopenharmony_ci/*! @brief Input focus window hint and attribute
855b877906bSopenharmony_ci *
856b877906bSopenharmony_ci *  Input focus [window hint](@ref GLFW_FOCUSED_hint) or
857b877906bSopenharmony_ci *  [window attribute](@ref GLFW_FOCUSED_attrib).
858b877906bSopenharmony_ci */
859b877906bSopenharmony_ci#define GLFW_FOCUSED                0x00020001
860b877906bSopenharmony_ci/*! @brief Window iconification window attribute
861b877906bSopenharmony_ci *
862b877906bSopenharmony_ci *  Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib).
863b877906bSopenharmony_ci */
864b877906bSopenharmony_ci#define GLFW_ICONIFIED              0x00020002
865b877906bSopenharmony_ci/*! @brief Window resize-ability window hint and attribute
866b877906bSopenharmony_ci *
867b877906bSopenharmony_ci *  Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and
868b877906bSopenharmony_ci *  [window attribute](@ref GLFW_RESIZABLE_attrib).
869b877906bSopenharmony_ci */
870b877906bSopenharmony_ci#define GLFW_RESIZABLE              0x00020003
871b877906bSopenharmony_ci/*! @brief Window visibility window hint and attribute
872b877906bSopenharmony_ci *
873b877906bSopenharmony_ci *  Window visibility [window hint](@ref GLFW_VISIBLE_hint) and
874b877906bSopenharmony_ci *  [window attribute](@ref GLFW_VISIBLE_attrib).
875b877906bSopenharmony_ci */
876b877906bSopenharmony_ci#define GLFW_VISIBLE                0x00020004
877b877906bSopenharmony_ci/*! @brief Window decoration window hint and attribute
878b877906bSopenharmony_ci *
879b877906bSopenharmony_ci *  Window decoration [window hint](@ref GLFW_DECORATED_hint) and
880b877906bSopenharmony_ci *  [window attribute](@ref GLFW_DECORATED_attrib).
881b877906bSopenharmony_ci */
882b877906bSopenharmony_ci#define GLFW_DECORATED              0x00020005
883b877906bSopenharmony_ci/*! @brief Window auto-iconification window hint and attribute
884b877906bSopenharmony_ci *
885b877906bSopenharmony_ci *  Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and
886b877906bSopenharmony_ci *  [window attribute](@ref GLFW_AUTO_ICONIFY_attrib).
887b877906bSopenharmony_ci */
888b877906bSopenharmony_ci#define GLFW_AUTO_ICONIFY           0x00020006
889b877906bSopenharmony_ci/*! @brief Window decoration window hint and attribute
890b877906bSopenharmony_ci *
891b877906bSopenharmony_ci *  Window decoration [window hint](@ref GLFW_FLOATING_hint) and
892b877906bSopenharmony_ci *  [window attribute](@ref GLFW_FLOATING_attrib).
893b877906bSopenharmony_ci */
894b877906bSopenharmony_ci#define GLFW_FLOATING               0x00020007
895b877906bSopenharmony_ci/*! @brief Window maximization window hint and attribute
896b877906bSopenharmony_ci *
897b877906bSopenharmony_ci *  Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and
898b877906bSopenharmony_ci *  [window attribute](@ref GLFW_MAXIMIZED_attrib).
899b877906bSopenharmony_ci */
900b877906bSopenharmony_ci#define GLFW_MAXIMIZED              0x00020008
901b877906bSopenharmony_ci/*! @brief Cursor centering window hint
902b877906bSopenharmony_ci *
903b877906bSopenharmony_ci *  Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint).
904b877906bSopenharmony_ci */
905b877906bSopenharmony_ci#define GLFW_CENTER_CURSOR          0x00020009
906b877906bSopenharmony_ci/*! @brief Window framebuffer transparency hint and attribute
907b877906bSopenharmony_ci *
908b877906bSopenharmony_ci *  Window framebuffer transparency
909b877906bSopenharmony_ci *  [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and
910b877906bSopenharmony_ci *  [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib).
911b877906bSopenharmony_ci */
912b877906bSopenharmony_ci#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A
913b877906bSopenharmony_ci/*! @brief Mouse cursor hover window attribute.
914b877906bSopenharmony_ci *
915b877906bSopenharmony_ci *  Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib).
916b877906bSopenharmony_ci */
917b877906bSopenharmony_ci#define GLFW_HOVERED                0x0002000B
918b877906bSopenharmony_ci/*! @brief Input focus on calling show window hint and attribute
919b877906bSopenharmony_ci *
920b877906bSopenharmony_ci *  Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or
921b877906bSopenharmony_ci *  [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib).
922b877906bSopenharmony_ci */
923b877906bSopenharmony_ci#define GLFW_FOCUS_ON_SHOW          0x0002000C
924b877906bSopenharmony_ci
925b877906bSopenharmony_ci/*! @brief Mouse input transparency window hint and attribute
926b877906bSopenharmony_ci *
927b877906bSopenharmony_ci *  Mouse input transparency [window hint](@ref GLFW_MOUSE_PASSTHROUGH_hint) or
928b877906bSopenharmony_ci *  [window attribute](@ref GLFW_MOUSE_PASSTHROUGH_attrib).
929b877906bSopenharmony_ci */
930b877906bSopenharmony_ci#define GLFW_MOUSE_PASSTHROUGH      0x0002000D
931b877906bSopenharmony_ci
932b877906bSopenharmony_ci/*! @brief Initial position x-coordinate window hint.
933b877906bSopenharmony_ci *
934b877906bSopenharmony_ci *  Initial position x-coordinate [window hint](@ref GLFW_POSITION_X).
935b877906bSopenharmony_ci */
936b877906bSopenharmony_ci#define GLFW_POSITION_X             0x0002000E
937b877906bSopenharmony_ci
938b877906bSopenharmony_ci/*! @brief Initial position y-coordinate window hint.
939b877906bSopenharmony_ci *
940b877906bSopenharmony_ci *  Initial position y-coordinate [window hint](@ref GLFW_POSITION_Y).
941b877906bSopenharmony_ci */
942b877906bSopenharmony_ci#define GLFW_POSITION_Y             0x0002000F
943b877906bSopenharmony_ci
944b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
945b877906bSopenharmony_ci *
946b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_RED_BITS).
947b877906bSopenharmony_ci */
948b877906bSopenharmony_ci#define GLFW_RED_BITS               0x00021001
949b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
950b877906bSopenharmony_ci *
951b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS).
952b877906bSopenharmony_ci */
953b877906bSopenharmony_ci#define GLFW_GREEN_BITS             0x00021002
954b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
955b877906bSopenharmony_ci *
956b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS).
957b877906bSopenharmony_ci */
958b877906bSopenharmony_ci#define GLFW_BLUE_BITS              0x00021003
959b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
960b877906bSopenharmony_ci *
961b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS).
962b877906bSopenharmony_ci */
963b877906bSopenharmony_ci#define GLFW_ALPHA_BITS             0x00021004
964b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
965b877906bSopenharmony_ci *
966b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS).
967b877906bSopenharmony_ci */
968b877906bSopenharmony_ci#define GLFW_DEPTH_BITS             0x00021005
969b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
970b877906bSopenharmony_ci *
971b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS).
972b877906bSopenharmony_ci */
973b877906bSopenharmony_ci#define GLFW_STENCIL_BITS           0x00021006
974b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
975b877906bSopenharmony_ci *
976b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS).
977b877906bSopenharmony_ci */
978b877906bSopenharmony_ci#define GLFW_ACCUM_RED_BITS         0x00021007
979b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
980b877906bSopenharmony_ci *
981b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS).
982b877906bSopenharmony_ci */
983b877906bSopenharmony_ci#define GLFW_ACCUM_GREEN_BITS       0x00021008
984b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
985b877906bSopenharmony_ci *
986b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS).
987b877906bSopenharmony_ci */
988b877906bSopenharmony_ci#define GLFW_ACCUM_BLUE_BITS        0x00021009
989b877906bSopenharmony_ci/*! @brief Framebuffer bit depth hint.
990b877906bSopenharmony_ci *
991b877906bSopenharmony_ci *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS).
992b877906bSopenharmony_ci */
993b877906bSopenharmony_ci#define GLFW_ACCUM_ALPHA_BITS       0x0002100A
994b877906bSopenharmony_ci/*! @brief Framebuffer auxiliary buffer hint.
995b877906bSopenharmony_ci *
996b877906bSopenharmony_ci *  Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS).
997b877906bSopenharmony_ci */
998b877906bSopenharmony_ci#define GLFW_AUX_BUFFERS            0x0002100B
999b877906bSopenharmony_ci/*! @brief OpenGL stereoscopic rendering hint.
1000b877906bSopenharmony_ci *
1001b877906bSopenharmony_ci *  OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO).
1002b877906bSopenharmony_ci */
1003b877906bSopenharmony_ci#define GLFW_STEREO                 0x0002100C
1004b877906bSopenharmony_ci/*! @brief Framebuffer MSAA samples hint.
1005b877906bSopenharmony_ci *
1006b877906bSopenharmony_ci *  Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES).
1007b877906bSopenharmony_ci */
1008b877906bSopenharmony_ci#define GLFW_SAMPLES                0x0002100D
1009b877906bSopenharmony_ci/*! @brief Framebuffer sRGB hint.
1010b877906bSopenharmony_ci *
1011b877906bSopenharmony_ci *  Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE).
1012b877906bSopenharmony_ci */
1013b877906bSopenharmony_ci#define GLFW_SRGB_CAPABLE           0x0002100E
1014b877906bSopenharmony_ci/*! @brief Monitor refresh rate hint.
1015b877906bSopenharmony_ci *
1016b877906bSopenharmony_ci *  Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE).
1017b877906bSopenharmony_ci */
1018b877906bSopenharmony_ci#define GLFW_REFRESH_RATE           0x0002100F
1019b877906bSopenharmony_ci/*! @brief Framebuffer double buffering hint and attribute.
1020b877906bSopenharmony_ci *
1021b877906bSopenharmony_ci *  Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER_hint) and
1022b877906bSopenharmony_ci *  [attribute](@ref GLFW_DOUBLEBUFFER_attrib).
1023b877906bSopenharmony_ci */
1024b877906bSopenharmony_ci#define GLFW_DOUBLEBUFFER           0x00021010
1025b877906bSopenharmony_ci
1026b877906bSopenharmony_ci/*! @brief Context client API hint and attribute.
1027b877906bSopenharmony_ci *
1028b877906bSopenharmony_ci *  Context client API [hint](@ref GLFW_CLIENT_API_hint) and
1029b877906bSopenharmony_ci *  [attribute](@ref GLFW_CLIENT_API_attrib).
1030b877906bSopenharmony_ci */
1031b877906bSopenharmony_ci#define GLFW_CLIENT_API             0x00022001
1032b877906bSopenharmony_ci/*! @brief Context client API major version hint and attribute.
1033b877906bSopenharmony_ci *
1034b877906bSopenharmony_ci *  Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint)
1035b877906bSopenharmony_ci *  and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib).
1036b877906bSopenharmony_ci */
1037b877906bSopenharmony_ci#define GLFW_CONTEXT_VERSION_MAJOR  0x00022002
1038b877906bSopenharmony_ci/*! @brief Context client API minor version hint and attribute.
1039b877906bSopenharmony_ci *
1040b877906bSopenharmony_ci *  Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint)
1041b877906bSopenharmony_ci *  and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib).
1042b877906bSopenharmony_ci */
1043b877906bSopenharmony_ci#define GLFW_CONTEXT_VERSION_MINOR  0x00022003
1044b877906bSopenharmony_ci/*! @brief Context client API revision number attribute.
1045b877906bSopenharmony_ci *
1046b877906bSopenharmony_ci *  Context client API revision number
1047b877906bSopenharmony_ci *  [attribute](@ref GLFW_CONTEXT_REVISION_attrib).
1048b877906bSopenharmony_ci */
1049b877906bSopenharmony_ci#define GLFW_CONTEXT_REVISION       0x00022004
1050b877906bSopenharmony_ci/*! @brief Context robustness hint and attribute.
1051b877906bSopenharmony_ci *
1052b877906bSopenharmony_ci *  Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint)
1053b877906bSopenharmony_ci *  and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib).
1054b877906bSopenharmony_ci */
1055b877906bSopenharmony_ci#define GLFW_CONTEXT_ROBUSTNESS     0x00022005
1056b877906bSopenharmony_ci/*! @brief OpenGL forward-compatibility hint and attribute.
1057b877906bSopenharmony_ci *
1058b877906bSopenharmony_ci *  OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)
1059b877906bSopenharmony_ci *  and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).
1060b877906bSopenharmony_ci */
1061b877906bSopenharmony_ci#define GLFW_OPENGL_FORWARD_COMPAT  0x00022006
1062b877906bSopenharmony_ci/*! @brief Debug mode context hint and attribute.
1063b877906bSopenharmony_ci *
1064b877906bSopenharmony_ci *  Debug mode context [hint](@ref GLFW_CONTEXT_DEBUG_hint) and
1065b877906bSopenharmony_ci *  [attribute](@ref GLFW_CONTEXT_DEBUG_attrib).
1066b877906bSopenharmony_ci */
1067b877906bSopenharmony_ci#define GLFW_CONTEXT_DEBUG          0x00022007
1068b877906bSopenharmony_ci/*! @brief Legacy name for compatibility.
1069b877906bSopenharmony_ci *
1070b877906bSopenharmony_ci *  This is an alias for compatibility with earlier versions.
1071b877906bSopenharmony_ci */
1072b877906bSopenharmony_ci#define GLFW_OPENGL_DEBUG_CONTEXT   GLFW_CONTEXT_DEBUG
1073b877906bSopenharmony_ci/*! @brief OpenGL profile hint and attribute.
1074b877906bSopenharmony_ci *
1075b877906bSopenharmony_ci *  OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and
1076b877906bSopenharmony_ci *  [attribute](@ref GLFW_OPENGL_PROFILE_attrib).
1077b877906bSopenharmony_ci */
1078b877906bSopenharmony_ci#define GLFW_OPENGL_PROFILE         0x00022008
1079b877906bSopenharmony_ci/*! @brief Context flush-on-release hint and attribute.
1080b877906bSopenharmony_ci *
1081b877906bSopenharmony_ci *  Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and
1082b877906bSopenharmony_ci *  [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib).
1083b877906bSopenharmony_ci */
1084b877906bSopenharmony_ci#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009
1085b877906bSopenharmony_ci/*! @brief Context error suppression hint and attribute.
1086b877906bSopenharmony_ci *
1087b877906bSopenharmony_ci *  Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and
1088b877906bSopenharmony_ci *  [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib).
1089b877906bSopenharmony_ci */
1090b877906bSopenharmony_ci#define GLFW_CONTEXT_NO_ERROR       0x0002200A
1091b877906bSopenharmony_ci/*! @brief Context creation API hint and attribute.
1092b877906bSopenharmony_ci *
1093b877906bSopenharmony_ci *  Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and
1094b877906bSopenharmony_ci *  [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib).
1095b877906bSopenharmony_ci */
1096b877906bSopenharmony_ci#define GLFW_CONTEXT_CREATION_API   0x0002200B
1097b877906bSopenharmony_ci/*! @brief Window content area scaling window
1098b877906bSopenharmony_ci *  [window hint](@ref GLFW_SCALE_TO_MONITOR).
1099b877906bSopenharmony_ci */
1100b877906bSopenharmony_ci#define GLFW_SCALE_TO_MONITOR       0x0002200C
1101b877906bSopenharmony_ci/*! @brief Window framebuffer scaling
1102b877906bSopenharmony_ci *  [window hint](@ref GLFW_SCALE_FRAMEBUFFER_hint).
1103b877906bSopenharmony_ci */
1104b877906bSopenharmony_ci#define GLFW_SCALE_FRAMEBUFFER      0x0002200D
1105b877906bSopenharmony_ci/*! @brief Legacy name for compatibility.
1106b877906bSopenharmony_ci *
1107b877906bSopenharmony_ci *  This is an alias for the
1108b877906bSopenharmony_ci *  [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint) window hint for
1109b877906bSopenharmony_ci *  compatibility with earlier versions.
1110b877906bSopenharmony_ci */
1111b877906bSopenharmony_ci#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001
1112b877906bSopenharmony_ci/*! @brief macOS specific
1113b877906bSopenharmony_ci *  [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).
1114b877906bSopenharmony_ci */
1115b877906bSopenharmony_ci#define GLFW_COCOA_FRAME_NAME         0x00023002
1116b877906bSopenharmony_ci/*! @brief macOS specific
1117b877906bSopenharmony_ci *  [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint).
1118b877906bSopenharmony_ci */
1119b877906bSopenharmony_ci#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003
1120b877906bSopenharmony_ci/*! @brief X11 specific
1121b877906bSopenharmony_ci *  [window hint](@ref GLFW_X11_CLASS_NAME_hint).
1122b877906bSopenharmony_ci */
1123b877906bSopenharmony_ci#define GLFW_X11_CLASS_NAME         0x00024001
1124b877906bSopenharmony_ci/*! @brief X11 specific
1125b877906bSopenharmony_ci *  [window hint](@ref GLFW_X11_CLASS_NAME_hint).
1126b877906bSopenharmony_ci */
1127b877906bSopenharmony_ci#define GLFW_X11_INSTANCE_NAME      0x00024002
1128b877906bSopenharmony_ci#define GLFW_WIN32_KEYBOARD_MENU    0x00025001
1129b877906bSopenharmony_ci/*! @brief Win32 specific [window hint](@ref GLFW_WIN32_SHOWDEFAULT_hint).
1130b877906bSopenharmony_ci */
1131b877906bSopenharmony_ci#define GLFW_WIN32_SHOWDEFAULT      0x00025002
1132b877906bSopenharmony_ci/*! @brief Wayland specific
1133b877906bSopenharmony_ci *  [window hint](@ref GLFW_WAYLAND_APP_ID_hint).
1134b877906bSopenharmony_ci *
1135b877906bSopenharmony_ci *  Allows specification of the Wayland app_id.
1136b877906bSopenharmony_ci */
1137b877906bSopenharmony_ci#define GLFW_WAYLAND_APP_ID         0x00026001
1138b877906bSopenharmony_ci/*! @} */
1139b877906bSopenharmony_ci
1140b877906bSopenharmony_ci#define GLFW_NO_API                          0
1141b877906bSopenharmony_ci#define GLFW_OPENGL_API             0x00030001
1142b877906bSopenharmony_ci#define GLFW_OPENGL_ES_API          0x00030002
1143b877906bSopenharmony_ci
1144b877906bSopenharmony_ci#define GLFW_NO_ROBUSTNESS                   0
1145b877906bSopenharmony_ci#define GLFW_NO_RESET_NOTIFICATION  0x00031001
1146b877906bSopenharmony_ci#define GLFW_LOSE_CONTEXT_ON_RESET  0x00031002
1147b877906bSopenharmony_ci
1148b877906bSopenharmony_ci#define GLFW_OPENGL_ANY_PROFILE              0
1149b877906bSopenharmony_ci#define GLFW_OPENGL_CORE_PROFILE    0x00032001
1150b877906bSopenharmony_ci#define GLFW_OPENGL_COMPAT_PROFILE  0x00032002
1151b877906bSopenharmony_ci
1152b877906bSopenharmony_ci#define GLFW_CURSOR                  0x00033001
1153b877906bSopenharmony_ci#define GLFW_STICKY_KEYS             0x00033002
1154b877906bSopenharmony_ci#define GLFW_STICKY_MOUSE_BUTTONS    0x00033003
1155b877906bSopenharmony_ci#define GLFW_LOCK_KEY_MODS           0x00033004
1156b877906bSopenharmony_ci#define GLFW_RAW_MOUSE_MOTION        0x00033005
1157b877906bSopenharmony_ci#define GLFW_UNLIMITED_MOUSE_BUTTONS 0x00033006
1158b877906bSopenharmony_ci
1159b877906bSopenharmony_ci#define GLFW_CURSOR_NORMAL          0x00034001
1160b877906bSopenharmony_ci#define GLFW_CURSOR_HIDDEN          0x00034002
1161b877906bSopenharmony_ci#define GLFW_CURSOR_DISABLED        0x00034003
1162b877906bSopenharmony_ci#define GLFW_CURSOR_CAPTURED        0x00034004
1163b877906bSopenharmony_ci
1164b877906bSopenharmony_ci#define GLFW_ANY_RELEASE_BEHAVIOR            0
1165b877906bSopenharmony_ci#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001
1166b877906bSopenharmony_ci#define GLFW_RELEASE_BEHAVIOR_NONE  0x00035002
1167b877906bSopenharmony_ci
1168b877906bSopenharmony_ci#define GLFW_NATIVE_CONTEXT_API     0x00036001
1169b877906bSopenharmony_ci#define GLFW_EGL_CONTEXT_API        0x00036002
1170b877906bSopenharmony_ci#define GLFW_OSMESA_CONTEXT_API     0x00036003
1171b877906bSopenharmony_ci
1172b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_NONE    0x00037001
1173b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_OPENGL  0x00037002
1174b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_OPENGLES 0x00037003
1175b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_D3D9    0x00037004
1176b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_D3D11   0x00037005
1177b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_VULKAN  0x00037007
1178b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE_METAL   0x00037008
1179b877906bSopenharmony_ci
1180b877906bSopenharmony_ci#define GLFW_WAYLAND_PREFER_LIBDECOR    0x00038001
1181b877906bSopenharmony_ci#define GLFW_WAYLAND_DISABLE_LIBDECOR   0x00038002
1182b877906bSopenharmony_ci
1183b877906bSopenharmony_ci#define GLFW_ANY_POSITION           0x80000000
1184b877906bSopenharmony_ci
1185b877906bSopenharmony_ci/*! @defgroup shapes Standard cursor shapes
1186b877906bSopenharmony_ci *  @brief Standard system cursor shapes.
1187b877906bSopenharmony_ci *
1188b877906bSopenharmony_ci *  These are the [standard cursor shapes](@ref cursor_standard) that can be
1189b877906bSopenharmony_ci *  requested from the platform (window system).
1190b877906bSopenharmony_ci *
1191b877906bSopenharmony_ci *  @ingroup input
1192b877906bSopenharmony_ci *  @{ */
1193b877906bSopenharmony_ci
1194b877906bSopenharmony_ci/*! @brief The regular arrow cursor shape.
1195b877906bSopenharmony_ci *
1196b877906bSopenharmony_ci *  The regular arrow cursor shape.
1197b877906bSopenharmony_ci */
1198b877906bSopenharmony_ci#define GLFW_ARROW_CURSOR           0x00036001
1199b877906bSopenharmony_ci/*! @brief The text input I-beam cursor shape.
1200b877906bSopenharmony_ci *
1201b877906bSopenharmony_ci *  The text input I-beam cursor shape.
1202b877906bSopenharmony_ci */
1203b877906bSopenharmony_ci#define GLFW_IBEAM_CURSOR           0x00036002
1204b877906bSopenharmony_ci/*! @brief The crosshair cursor shape.
1205b877906bSopenharmony_ci *
1206b877906bSopenharmony_ci *  The crosshair cursor shape.
1207b877906bSopenharmony_ci */
1208b877906bSopenharmony_ci#define GLFW_CROSSHAIR_CURSOR       0x00036003
1209b877906bSopenharmony_ci/*! @brief The pointing hand cursor shape.
1210b877906bSopenharmony_ci *
1211b877906bSopenharmony_ci *  The pointing hand cursor shape.
1212b877906bSopenharmony_ci */
1213b877906bSopenharmony_ci#define GLFW_POINTING_HAND_CURSOR   0x00036004
1214b877906bSopenharmony_ci/*! @brief The horizontal resize/move arrow shape.
1215b877906bSopenharmony_ci *
1216b877906bSopenharmony_ci *  The horizontal resize/move arrow shape.  This is usually a horizontal
1217b877906bSopenharmony_ci *  double-headed arrow.
1218b877906bSopenharmony_ci */
1219b877906bSopenharmony_ci#define GLFW_RESIZE_EW_CURSOR       0x00036005
1220b877906bSopenharmony_ci/*! @brief The vertical resize/move arrow shape.
1221b877906bSopenharmony_ci *
1222b877906bSopenharmony_ci *  The vertical resize/move shape.  This is usually a vertical double-headed
1223b877906bSopenharmony_ci *  arrow.
1224b877906bSopenharmony_ci */
1225b877906bSopenharmony_ci#define GLFW_RESIZE_NS_CURSOR       0x00036006
1226b877906bSopenharmony_ci/*! @brief The top-left to bottom-right diagonal resize/move arrow shape.
1227b877906bSopenharmony_ci *
1228b877906bSopenharmony_ci *  The top-left to bottom-right diagonal resize/move shape.  This is usually
1229b877906bSopenharmony_ci *  a diagonal double-headed arrow.
1230b877906bSopenharmony_ci *
1231b877906bSopenharmony_ci *  @note @macos This shape is provided by a private system API and may fail
1232b877906bSopenharmony_ci *  with @ref GLFW_CURSOR_UNAVAILABLE in the future.
1233b877906bSopenharmony_ci *
1234b877906bSopenharmony_ci *  @note @wayland This shape is provided by a newer standard not supported by
1235b877906bSopenharmony_ci *  all cursor themes.
1236b877906bSopenharmony_ci *
1237b877906bSopenharmony_ci *  @note @x11 This shape is provided by a newer standard not supported by all
1238b877906bSopenharmony_ci *  cursor themes.
1239b877906bSopenharmony_ci */
1240b877906bSopenharmony_ci#define GLFW_RESIZE_NWSE_CURSOR     0x00036007
1241b877906bSopenharmony_ci/*! @brief The top-right to bottom-left diagonal resize/move arrow shape.
1242b877906bSopenharmony_ci *
1243b877906bSopenharmony_ci *  The top-right to bottom-left diagonal resize/move shape.  This is usually
1244b877906bSopenharmony_ci *  a diagonal double-headed arrow.
1245b877906bSopenharmony_ci *
1246b877906bSopenharmony_ci *  @note @macos This shape is provided by a private system API and may fail
1247b877906bSopenharmony_ci *  with @ref GLFW_CURSOR_UNAVAILABLE in the future.
1248b877906bSopenharmony_ci *
1249b877906bSopenharmony_ci *  @note @wayland This shape is provided by a newer standard not supported by
1250b877906bSopenharmony_ci *  all cursor themes.
1251b877906bSopenharmony_ci *
1252b877906bSopenharmony_ci *  @note @x11 This shape is provided by a newer standard not supported by all
1253b877906bSopenharmony_ci *  cursor themes.
1254b877906bSopenharmony_ci */
1255b877906bSopenharmony_ci#define GLFW_RESIZE_NESW_CURSOR     0x00036008
1256b877906bSopenharmony_ci/*! @brief The omni-directional resize/move cursor shape.
1257b877906bSopenharmony_ci *
1258b877906bSopenharmony_ci *  The omni-directional resize cursor/move shape.  This is usually either
1259b877906bSopenharmony_ci *  a combined horizontal and vertical double-headed arrow or a grabbing hand.
1260b877906bSopenharmony_ci */
1261b877906bSopenharmony_ci#define GLFW_RESIZE_ALL_CURSOR      0x00036009
1262b877906bSopenharmony_ci/*! @brief The operation-not-allowed shape.
1263b877906bSopenharmony_ci *
1264b877906bSopenharmony_ci *  The operation-not-allowed shape.  This is usually a circle with a diagonal
1265b877906bSopenharmony_ci *  line through it.
1266b877906bSopenharmony_ci *
1267b877906bSopenharmony_ci *  @note @wayland This shape is provided by a newer standard not supported by
1268b877906bSopenharmony_ci *  all cursor themes.
1269b877906bSopenharmony_ci *
1270b877906bSopenharmony_ci *  @note @x11 This shape is provided by a newer standard not supported by all
1271b877906bSopenharmony_ci *  cursor themes.
1272b877906bSopenharmony_ci */
1273b877906bSopenharmony_ci#define GLFW_NOT_ALLOWED_CURSOR     0x0003600A
1274b877906bSopenharmony_ci/*! @brief Legacy name for compatibility.
1275b877906bSopenharmony_ci *
1276b877906bSopenharmony_ci *  This is an alias for compatibility with earlier versions.
1277b877906bSopenharmony_ci */
1278b877906bSopenharmony_ci#define GLFW_HRESIZE_CURSOR         GLFW_RESIZE_EW_CURSOR
1279b877906bSopenharmony_ci/*! @brief Legacy name for compatibility.
1280b877906bSopenharmony_ci *
1281b877906bSopenharmony_ci *  This is an alias for compatibility with earlier versions.
1282b877906bSopenharmony_ci */
1283b877906bSopenharmony_ci#define GLFW_VRESIZE_CURSOR         GLFW_RESIZE_NS_CURSOR
1284b877906bSopenharmony_ci/*! @brief Legacy name for compatibility.
1285b877906bSopenharmony_ci *
1286b877906bSopenharmony_ci *  This is an alias for compatibility with earlier versions.
1287b877906bSopenharmony_ci */
1288b877906bSopenharmony_ci#define GLFW_HAND_CURSOR            GLFW_POINTING_HAND_CURSOR
1289b877906bSopenharmony_ci/*! @} */
1290b877906bSopenharmony_ci
1291b877906bSopenharmony_ci#define GLFW_CONNECTED              0x00040001
1292b877906bSopenharmony_ci#define GLFW_DISCONNECTED           0x00040002
1293b877906bSopenharmony_ci
1294b877906bSopenharmony_ci/*! @addtogroup init
1295b877906bSopenharmony_ci *  @{ */
1296b877906bSopenharmony_ci/*! @brief Joystick hat buttons init hint.
1297b877906bSopenharmony_ci *
1298b877906bSopenharmony_ci *  Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).
1299b877906bSopenharmony_ci */
1300b877906bSopenharmony_ci#define GLFW_JOYSTICK_HAT_BUTTONS   0x00050001
1301b877906bSopenharmony_ci/*! @brief ANGLE rendering backend init hint.
1302b877906bSopenharmony_ci *
1303b877906bSopenharmony_ci *  ANGLE rendering backend [init hint](@ref GLFW_ANGLE_PLATFORM_TYPE_hint).
1304b877906bSopenharmony_ci */
1305b877906bSopenharmony_ci#define GLFW_ANGLE_PLATFORM_TYPE    0x00050002
1306b877906bSopenharmony_ci/*! @brief Platform selection init hint.
1307b877906bSopenharmony_ci *
1308b877906bSopenharmony_ci *  Platform selection [init hint](@ref GLFW_PLATFORM).
1309b877906bSopenharmony_ci */
1310b877906bSopenharmony_ci#define GLFW_PLATFORM               0x00050003
1311b877906bSopenharmony_ci/*! @brief macOS specific init hint.
1312b877906bSopenharmony_ci *
1313b877906bSopenharmony_ci *  macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).
1314b877906bSopenharmony_ci */
1315b877906bSopenharmony_ci#define GLFW_COCOA_CHDIR_RESOURCES  0x00051001
1316b877906bSopenharmony_ci/*! @brief macOS specific init hint.
1317b877906bSopenharmony_ci *
1318b877906bSopenharmony_ci *  macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint).
1319b877906bSopenharmony_ci */
1320b877906bSopenharmony_ci#define GLFW_COCOA_MENUBAR          0x00051002
1321b877906bSopenharmony_ci/*! @brief X11 specific init hint.
1322b877906bSopenharmony_ci *
1323b877906bSopenharmony_ci *  X11 specific [init hint](@ref GLFW_X11_XCB_VULKAN_SURFACE_hint).
1324b877906bSopenharmony_ci */
1325b877906bSopenharmony_ci#define GLFW_X11_XCB_VULKAN_SURFACE 0x00052001
1326b877906bSopenharmony_ci/*! @brief Wayland specific init hint.
1327b877906bSopenharmony_ci *
1328b877906bSopenharmony_ci *  Wayland specific [init hint](@ref GLFW_WAYLAND_LIBDECOR_hint).
1329b877906bSopenharmony_ci */
1330b877906bSopenharmony_ci#define GLFW_WAYLAND_LIBDECOR       0x00053001
1331b877906bSopenharmony_ci/*! @} */
1332b877906bSopenharmony_ci
1333b877906bSopenharmony_ci/*! @addtogroup init
1334b877906bSopenharmony_ci *  @{ */
1335b877906bSopenharmony_ci/*! @brief Hint value that enables automatic platform selection.
1336b877906bSopenharmony_ci *
1337b877906bSopenharmony_ci *  Hint value for @ref GLFW_PLATFORM that enables automatic platform selection.
1338b877906bSopenharmony_ci */
1339b877906bSopenharmony_ci#define GLFW_ANY_PLATFORM           0x00060000
1340b877906bSopenharmony_ci#define GLFW_PLATFORM_WIN32         0x00060001
1341b877906bSopenharmony_ci#define GLFW_PLATFORM_COCOA         0x00060002
1342b877906bSopenharmony_ci#define GLFW_PLATFORM_WAYLAND       0x00060003
1343b877906bSopenharmony_ci#define GLFW_PLATFORM_X11           0x00060004
1344b877906bSopenharmony_ci#define GLFW_PLATFORM_NULL          0x00060005
1345b877906bSopenharmony_ci/*! @} */
1346b877906bSopenharmony_ci
1347b877906bSopenharmony_ci#define GLFW_DONT_CARE              -1
1348b877906bSopenharmony_ci
1349b877906bSopenharmony_ci
1350b877906bSopenharmony_ci/*************************************************************************
1351b877906bSopenharmony_ci * GLFW API types
1352b877906bSopenharmony_ci *************************************************************************/
1353b877906bSopenharmony_ci
1354b877906bSopenharmony_ci/*! @brief Client API function pointer type.
1355b877906bSopenharmony_ci *
1356b877906bSopenharmony_ci *  Generic function pointer used for returning client API function pointers
1357b877906bSopenharmony_ci *  without forcing a cast from a regular pointer.
1358b877906bSopenharmony_ci *
1359b877906bSopenharmony_ci *  @sa @ref context_glext
1360b877906bSopenharmony_ci *  @sa @ref glfwGetProcAddress
1361b877906bSopenharmony_ci *
1362b877906bSopenharmony_ci *  @since Added in version 3.0.
1363b877906bSopenharmony_ci *
1364b877906bSopenharmony_ci *  @ingroup context
1365b877906bSopenharmony_ci */
1366b877906bSopenharmony_citypedef void (*GLFWglproc)(void);
1367b877906bSopenharmony_ci
1368b877906bSopenharmony_ci/*! @brief Vulkan API function pointer type.
1369b877906bSopenharmony_ci *
1370b877906bSopenharmony_ci *  Generic function pointer used for returning Vulkan API function pointers
1371b877906bSopenharmony_ci *  without forcing a cast from a regular pointer.
1372b877906bSopenharmony_ci *
1373b877906bSopenharmony_ci *  @sa @ref vulkan_proc
1374b877906bSopenharmony_ci *  @sa @ref glfwGetInstanceProcAddress
1375b877906bSopenharmony_ci *
1376b877906bSopenharmony_ci *  @since Added in version 3.2.
1377b877906bSopenharmony_ci *
1378b877906bSopenharmony_ci *  @ingroup vulkan
1379b877906bSopenharmony_ci */
1380b877906bSopenharmony_citypedef void (*GLFWvkproc)(void);
1381b877906bSopenharmony_ci
1382b877906bSopenharmony_ci/*! @brief Opaque monitor object.
1383b877906bSopenharmony_ci *
1384b877906bSopenharmony_ci *  Opaque monitor object.
1385b877906bSopenharmony_ci *
1386b877906bSopenharmony_ci *  @see @ref monitor_object
1387b877906bSopenharmony_ci *
1388b877906bSopenharmony_ci *  @since Added in version 3.0.
1389b877906bSopenharmony_ci *
1390b877906bSopenharmony_ci *  @ingroup monitor
1391b877906bSopenharmony_ci */
1392b877906bSopenharmony_citypedef struct GLFWmonitor GLFWmonitor;
1393b877906bSopenharmony_ci
1394b877906bSopenharmony_ci/*! @brief Opaque window object.
1395b877906bSopenharmony_ci *
1396b877906bSopenharmony_ci *  Opaque window object.
1397b877906bSopenharmony_ci *
1398b877906bSopenharmony_ci *  @see @ref window_object
1399b877906bSopenharmony_ci *
1400b877906bSopenharmony_ci *  @since Added in version 3.0.
1401b877906bSopenharmony_ci *
1402b877906bSopenharmony_ci *  @ingroup window
1403b877906bSopenharmony_ci */
1404b877906bSopenharmony_citypedef struct GLFWwindow GLFWwindow;
1405b877906bSopenharmony_ci
1406b877906bSopenharmony_ci/*! @brief Opaque cursor object.
1407b877906bSopenharmony_ci *
1408b877906bSopenharmony_ci *  Opaque cursor object.
1409b877906bSopenharmony_ci *
1410b877906bSopenharmony_ci *  @see @ref cursor_object
1411b877906bSopenharmony_ci *
1412b877906bSopenharmony_ci *  @since Added in version 3.1.
1413b877906bSopenharmony_ci *
1414b877906bSopenharmony_ci *  @ingroup input
1415b877906bSopenharmony_ci */
1416b877906bSopenharmony_citypedef struct GLFWcursor GLFWcursor;
1417b877906bSopenharmony_ci
1418b877906bSopenharmony_ci/*! @brief The function pointer type for memory allocation callbacks.
1419b877906bSopenharmony_ci *
1420b877906bSopenharmony_ci *  This is the function pointer type for memory allocation callbacks.  A memory
1421b877906bSopenharmony_ci *  allocation callback function has the following signature:
1422b877906bSopenharmony_ci *  @code
1423b877906bSopenharmony_ci *  void* function_name(size_t size, void* user)
1424b877906bSopenharmony_ci *  @endcode
1425b877906bSopenharmony_ci *
1426b877906bSopenharmony_ci *  This function must return either a memory block at least `size` bytes long,
1427b877906bSopenharmony_ci *  or `NULL` if allocation failed.  Note that not all parts of GLFW handle allocation
1428b877906bSopenharmony_ci *  failures gracefully yet.
1429b877906bSopenharmony_ci *
1430b877906bSopenharmony_ci *  This function must support being called during @ref glfwInit but before the library is
1431b877906bSopenharmony_ci *  flagged as initialized, as well as during @ref glfwTerminate after the library is no
1432b877906bSopenharmony_ci *  longer flagged as initialized.
1433b877906bSopenharmony_ci *
1434b877906bSopenharmony_ci *  Any memory allocated via this function will be deallocated via the same allocator
1435b877906bSopenharmony_ci *  during library termination or earlier.
1436b877906bSopenharmony_ci *
1437b877906bSopenharmony_ci *  Any memory allocated via this function must be suitably aligned for any object type.
1438b877906bSopenharmony_ci *  If you are using C99 or earlier, this alignment is platform-dependent but will be the
1439b877906bSopenharmony_ci *  same as what `malloc` provides.  If you are using C11 or later, this is the value of
1440b877906bSopenharmony_ci *  `alignof(max_align_t)`.
1441b877906bSopenharmony_ci *
1442b877906bSopenharmony_ci *  The size will always be greater than zero.  Allocations of size zero are filtered out
1443b877906bSopenharmony_ci *  before reaching the custom allocator.
1444b877906bSopenharmony_ci *
1445b877906bSopenharmony_ci *  If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
1446b877906bSopenharmony_ci *
1447b877906bSopenharmony_ci *  This function must not call any GLFW function.
1448b877906bSopenharmony_ci *
1449b877906bSopenharmony_ci *  @param[in] size The minimum size, in bytes, of the memory block.
1450b877906bSopenharmony_ci *  @param[in] user The user-defined pointer from the allocator.
1451b877906bSopenharmony_ci *  @return The address of the newly allocated memory block, or `NULL` if an
1452b877906bSopenharmony_ci *  error occurred.
1453b877906bSopenharmony_ci *
1454b877906bSopenharmony_ci *  @pointer_lifetime The returned memory block must be valid at least until it
1455b877906bSopenharmony_ci *  is deallocated.
1456b877906bSopenharmony_ci *
1457b877906bSopenharmony_ci *  @reentrancy This function should not call any GLFW function.
1458b877906bSopenharmony_ci *
1459b877906bSopenharmony_ci *  @thread_safety This function must support being called from any thread that calls GLFW
1460b877906bSopenharmony_ci *  functions.
1461b877906bSopenharmony_ci *
1462b877906bSopenharmony_ci *  @sa @ref init_allocator
1463b877906bSopenharmony_ci *  @sa @ref GLFWallocator
1464b877906bSopenharmony_ci *
1465b877906bSopenharmony_ci *  @since Added in version 3.4.
1466b877906bSopenharmony_ci *
1467b877906bSopenharmony_ci *  @ingroup init
1468b877906bSopenharmony_ci */
1469b877906bSopenharmony_citypedef void* (* GLFWallocatefun)(size_t size, void* user);
1470b877906bSopenharmony_ci
1471b877906bSopenharmony_ci/*! @brief The function pointer type for memory reallocation callbacks.
1472b877906bSopenharmony_ci *
1473b877906bSopenharmony_ci *  This is the function pointer type for memory reallocation callbacks.
1474b877906bSopenharmony_ci *  A memory reallocation callback function has the following signature:
1475b877906bSopenharmony_ci *  @code
1476b877906bSopenharmony_ci *  void* function_name(void* block, size_t size, void* user)
1477b877906bSopenharmony_ci *  @endcode
1478b877906bSopenharmony_ci *
1479b877906bSopenharmony_ci *  This function must return a memory block at least `size` bytes long, or
1480b877906bSopenharmony_ci *  `NULL` if allocation failed.  Note that not all parts of GLFW handle allocation
1481b877906bSopenharmony_ci *  failures gracefully yet.
1482b877906bSopenharmony_ci *
1483b877906bSopenharmony_ci *  This function must support being called during @ref glfwInit but before the library is
1484b877906bSopenharmony_ci *  flagged as initialized, as well as during @ref glfwTerminate after the library is no
1485b877906bSopenharmony_ci *  longer flagged as initialized.
1486b877906bSopenharmony_ci *
1487b877906bSopenharmony_ci *  Any memory allocated via this function will be deallocated via the same allocator
1488b877906bSopenharmony_ci *  during library termination or earlier.
1489b877906bSopenharmony_ci *
1490b877906bSopenharmony_ci *  Any memory allocated via this function must be suitably aligned for any object type.
1491b877906bSopenharmony_ci *  If you are using C99 or earlier, this alignment is platform-dependent but will be the
1492b877906bSopenharmony_ci *  same as what `realloc` provides.  If you are using C11 or later, this is the value of
1493b877906bSopenharmony_ci *  `alignof(max_align_t)`.
1494b877906bSopenharmony_ci *
1495b877906bSopenharmony_ci *  The block address will never be `NULL` and the size will always be greater than zero.
1496b877906bSopenharmony_ci *  Reallocations of a block to size zero are converted into deallocations before reaching
1497b877906bSopenharmony_ci *  the custom allocator.  Reallocations of `NULL` to a non-zero size are converted into
1498b877906bSopenharmony_ci *  regular allocations before reaching the custom allocator.
1499b877906bSopenharmony_ci *
1500b877906bSopenharmony_ci *  If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
1501b877906bSopenharmony_ci *
1502b877906bSopenharmony_ci *  This function must not call any GLFW function.
1503b877906bSopenharmony_ci *
1504b877906bSopenharmony_ci *  @param[in] block The address of the memory block to reallocate.
1505b877906bSopenharmony_ci *  @param[in] size The new minimum size, in bytes, of the memory block.
1506b877906bSopenharmony_ci *  @param[in] user The user-defined pointer from the allocator.
1507b877906bSopenharmony_ci *  @return The address of the newly allocated or resized memory block, or
1508b877906bSopenharmony_ci *  `NULL` if an error occurred.
1509b877906bSopenharmony_ci *
1510b877906bSopenharmony_ci *  @pointer_lifetime The returned memory block must be valid at least until it
1511b877906bSopenharmony_ci *  is deallocated.
1512b877906bSopenharmony_ci *
1513b877906bSopenharmony_ci *  @reentrancy This function should not call any GLFW function.
1514b877906bSopenharmony_ci *
1515b877906bSopenharmony_ci *  @thread_safety This function must support being called from any thread that calls GLFW
1516b877906bSopenharmony_ci *  functions.
1517b877906bSopenharmony_ci *
1518b877906bSopenharmony_ci *  @sa @ref init_allocator
1519b877906bSopenharmony_ci *  @sa @ref GLFWallocator
1520b877906bSopenharmony_ci *
1521b877906bSopenharmony_ci *  @since Added in version 3.4.
1522b877906bSopenharmony_ci *
1523b877906bSopenharmony_ci *  @ingroup init
1524b877906bSopenharmony_ci */
1525b877906bSopenharmony_citypedef void* (* GLFWreallocatefun)(void* block, size_t size, void* user);
1526b877906bSopenharmony_ci
1527b877906bSopenharmony_ci/*! @brief The function pointer type for memory deallocation callbacks.
1528b877906bSopenharmony_ci *
1529b877906bSopenharmony_ci *  This is the function pointer type for memory deallocation callbacks.
1530b877906bSopenharmony_ci *  A memory deallocation callback function has the following signature:
1531b877906bSopenharmony_ci *  @code
1532b877906bSopenharmony_ci *  void function_name(void* block, void* user)
1533b877906bSopenharmony_ci *  @endcode
1534b877906bSopenharmony_ci *
1535b877906bSopenharmony_ci *  This function may deallocate the specified memory block.  This memory block
1536b877906bSopenharmony_ci *  will have been allocated with the same allocator.
1537b877906bSopenharmony_ci *
1538b877906bSopenharmony_ci *  This function must support being called during @ref glfwInit but before the library is
1539b877906bSopenharmony_ci *  flagged as initialized, as well as during @ref glfwTerminate after the library is no
1540b877906bSopenharmony_ci *  longer flagged as initialized.
1541b877906bSopenharmony_ci *
1542b877906bSopenharmony_ci *  The block address will never be `NULL`.  Deallocations of `NULL` are filtered out
1543b877906bSopenharmony_ci *  before reaching the custom allocator.
1544b877906bSopenharmony_ci *
1545b877906bSopenharmony_ci *  If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
1546b877906bSopenharmony_ci *
1547b877906bSopenharmony_ci *  This function must not call any GLFW function.
1548b877906bSopenharmony_ci *
1549b877906bSopenharmony_ci *  @param[in] block The address of the memory block to deallocate.
1550b877906bSopenharmony_ci *  @param[in] user The user-defined pointer from the allocator.
1551b877906bSopenharmony_ci *
1552b877906bSopenharmony_ci *  @pointer_lifetime The specified memory block will not be accessed by GLFW
1553b877906bSopenharmony_ci *  after this function is called.
1554b877906bSopenharmony_ci *
1555b877906bSopenharmony_ci *  @reentrancy This function should not call any GLFW function.
1556b877906bSopenharmony_ci *
1557b877906bSopenharmony_ci *  @thread_safety This function must support being called from any thread that calls GLFW
1558b877906bSopenharmony_ci *  functions.
1559b877906bSopenharmony_ci *
1560b877906bSopenharmony_ci *  @sa @ref init_allocator
1561b877906bSopenharmony_ci *  @sa @ref GLFWallocator
1562b877906bSopenharmony_ci *
1563b877906bSopenharmony_ci *  @since Added in version 3.4.
1564b877906bSopenharmony_ci *
1565b877906bSopenharmony_ci *  @ingroup init
1566b877906bSopenharmony_ci */
1567b877906bSopenharmony_citypedef void (* GLFWdeallocatefun)(void* block, void* user);
1568b877906bSopenharmony_ci
1569b877906bSopenharmony_ci/*! @brief The function pointer type for error callbacks.
1570b877906bSopenharmony_ci *
1571b877906bSopenharmony_ci *  This is the function pointer type for error callbacks.  An error callback
1572b877906bSopenharmony_ci *  function has the following signature:
1573b877906bSopenharmony_ci *  @code
1574b877906bSopenharmony_ci *  void callback_name(int error_code, const char* description)
1575b877906bSopenharmony_ci *  @endcode
1576b877906bSopenharmony_ci *
1577b877906bSopenharmony_ci *  @param[in] error_code An [error code](@ref errors).  Future releases may add
1578b877906bSopenharmony_ci *  more error codes.
1579b877906bSopenharmony_ci *  @param[in] description A UTF-8 encoded string describing the error.
1580b877906bSopenharmony_ci *
1581b877906bSopenharmony_ci *  @pointer_lifetime The error description string is valid until the callback
1582b877906bSopenharmony_ci *  function returns.
1583b877906bSopenharmony_ci *
1584b877906bSopenharmony_ci *  @sa @ref error_handling
1585b877906bSopenharmony_ci *  @sa @ref glfwSetErrorCallback
1586b877906bSopenharmony_ci *
1587b877906bSopenharmony_ci *  @since Added in version 3.0.
1588b877906bSopenharmony_ci *
1589b877906bSopenharmony_ci *  @ingroup init
1590b877906bSopenharmony_ci */
1591b877906bSopenharmony_citypedef void (* GLFWerrorfun)(int error_code, const char* description);
1592b877906bSopenharmony_ci
1593b877906bSopenharmony_ci/*! @brief The function pointer type for window position callbacks.
1594b877906bSopenharmony_ci *
1595b877906bSopenharmony_ci *  This is the function pointer type for window position callbacks.  A window
1596b877906bSopenharmony_ci *  position callback function has the following signature:
1597b877906bSopenharmony_ci *  @code
1598b877906bSopenharmony_ci *  void callback_name(GLFWwindow* window, int xpos, int ypos)
1599b877906bSopenharmony_ci *  @endcode
1600b877906bSopenharmony_ci *
1601b877906bSopenharmony_ci *  @param[in] window The window that was moved.
1602b877906bSopenharmony_ci *  @param[in] xpos The new x-coordinate, in screen coordinates, of the
1603b877906bSopenharmony_ci *  upper-left corner of the content area of the window.
1604b877906bSopenharmony_ci *  @param[in] ypos The new y-coordinate, in screen coordinates, of the
1605b877906bSopenharmony_ci *  upper-left corner of the content area of the window.
1606b877906bSopenharmony_ci *
1607b877906bSopenharmony_ci *  @sa @ref window_pos
1608b877906bSopenharmony_ci *  @sa @ref glfwSetWindowPosCallback
1609b877906bSopenharmony_ci *
1610b877906bSopenharmony_ci *  @since Added in version 3.0.
1611b877906bSopenharmony_ci *
1612b877906bSopenharmony_ci *  @ingroup window
1613b877906bSopenharmony_ci */
1614b877906bSopenharmony_citypedef void (* GLFWwindowposfun)(GLFWwindow* window, int xpos, int ypos);
1615b877906bSopenharmony_ci
1616b877906bSopenharmony_ci/*! @brief The function pointer type for window size callbacks.
1617b877906bSopenharmony_ci *
1618b877906bSopenharmony_ci *  This is the function pointer type for window size callbacks.  A window size
1619b877906bSopenharmony_ci *  callback function has the following signature:
1620b877906bSopenharmony_ci *  @code
1621b877906bSopenharmony_ci *  void callback_name(GLFWwindow* window, int width, int height)
1622b877906bSopenharmony_ci *  @endcode
1623b877906bSopenharmony_ci *
1624b877906bSopenharmony_ci *  @param[in] window The window that was resized.
1625b877906bSopenharmony_ci *  @param[in] width The new width, in screen coordinates, of the window.
1626b877906bSopenharmony_ci *  @param[in] height The new height, in screen coordinates, of the window.
1627b877906bSopenharmony_ci *
1628b877906bSopenharmony_ci *  @sa @ref window_size
1629b877906bSopenharmony_ci *  @sa @ref glfwSetWindowSizeCallback
1630b877906bSopenharmony_ci *
1631b877906bSopenharmony_ci *  @since Added in version 1.0.
1632b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
1633b877906bSopenharmony_ci *
1634b877906bSopenharmony_ci *  @ingroup window
1635b877906bSopenharmony_ci */
1636b877906bSopenharmony_citypedef void (* GLFWwindowsizefun)(GLFWwindow* window, int width, int height);
1637b877906bSopenharmony_ci
1638b877906bSopenharmony_ci/*! @brief The function pointer type for window close callbacks.
1639b877906bSopenharmony_ci *
1640b877906bSopenharmony_ci *  This is the function pointer type for window close callbacks.  A window
1641b877906bSopenharmony_ci *  close callback function has the following signature:
1642b877906bSopenharmony_ci *  @code
1643b877906bSopenharmony_ci *  void function_name(GLFWwindow* window)
1644b877906bSopenharmony_ci *  @endcode
1645b877906bSopenharmony_ci *
1646b877906bSopenharmony_ci *  @param[in] window The window that the user attempted to close.
1647b877906bSopenharmony_ci *
1648b877906bSopenharmony_ci *  @sa @ref window_close
1649b877906bSopenharmony_ci *  @sa @ref glfwSetWindowCloseCallback
1650b877906bSopenharmony_ci *
1651b877906bSopenharmony_ci *  @since Added in version 2.5.
1652b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
1653b877906bSopenharmony_ci *
1654b877906bSopenharmony_ci *  @ingroup window
1655b877906bSopenharmony_ci */
1656b877906bSopenharmony_citypedef void (* GLFWwindowclosefun)(GLFWwindow* window);
1657b877906bSopenharmony_ci
1658b877906bSopenharmony_ci/*! @brief The function pointer type for window content refresh callbacks.
1659b877906bSopenharmony_ci *
1660b877906bSopenharmony_ci *  This is the function pointer type for window content refresh callbacks.
1661b877906bSopenharmony_ci *  A window content refresh callback function has the following signature:
1662b877906bSopenharmony_ci *  @code
1663b877906bSopenharmony_ci *  void function_name(GLFWwindow* window);
1664b877906bSopenharmony_ci *  @endcode
1665b877906bSopenharmony_ci *
1666b877906bSopenharmony_ci *  @param[in] window The window whose content needs to be refreshed.
1667b877906bSopenharmony_ci *
1668b877906bSopenharmony_ci *  @sa @ref window_refresh
1669b877906bSopenharmony_ci *  @sa @ref glfwSetWindowRefreshCallback
1670b877906bSopenharmony_ci *
1671b877906bSopenharmony_ci *  @since Added in version 2.5.
1672b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
1673b877906bSopenharmony_ci *
1674b877906bSopenharmony_ci *  @ingroup window
1675b877906bSopenharmony_ci */
1676b877906bSopenharmony_citypedef void (* GLFWwindowrefreshfun)(GLFWwindow* window);
1677b877906bSopenharmony_ci
1678b877906bSopenharmony_ci/*! @brief The function pointer type for window focus callbacks.
1679b877906bSopenharmony_ci *
1680b877906bSopenharmony_ci *  This is the function pointer type for window focus callbacks.  A window
1681b877906bSopenharmony_ci *  focus callback function has the following signature:
1682b877906bSopenharmony_ci *  @code
1683b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int focused)
1684b877906bSopenharmony_ci *  @endcode
1685b877906bSopenharmony_ci *
1686b877906bSopenharmony_ci *  @param[in] window The window that gained or lost input focus.
1687b877906bSopenharmony_ci *  @param[in] focused `GLFW_TRUE` if the window was given input focus, or
1688b877906bSopenharmony_ci *  `GLFW_FALSE` if it lost it.
1689b877906bSopenharmony_ci *
1690b877906bSopenharmony_ci *  @sa @ref window_focus
1691b877906bSopenharmony_ci *  @sa @ref glfwSetWindowFocusCallback
1692b877906bSopenharmony_ci *
1693b877906bSopenharmony_ci *  @since Added in version 3.0.
1694b877906bSopenharmony_ci *
1695b877906bSopenharmony_ci *  @ingroup window
1696b877906bSopenharmony_ci */
1697b877906bSopenharmony_citypedef void (* GLFWwindowfocusfun)(GLFWwindow* window, int focused);
1698b877906bSopenharmony_ci
1699b877906bSopenharmony_ci/*! @brief The function pointer type for window iconify callbacks.
1700b877906bSopenharmony_ci *
1701b877906bSopenharmony_ci *  This is the function pointer type for window iconify callbacks.  A window
1702b877906bSopenharmony_ci *  iconify callback function has the following signature:
1703b877906bSopenharmony_ci *  @code
1704b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int iconified)
1705b877906bSopenharmony_ci *  @endcode
1706b877906bSopenharmony_ci *
1707b877906bSopenharmony_ci *  @param[in] window The window that was iconified or restored.
1708b877906bSopenharmony_ci *  @param[in] iconified `GLFW_TRUE` if the window was iconified, or
1709b877906bSopenharmony_ci *  `GLFW_FALSE` if it was restored.
1710b877906bSopenharmony_ci *
1711b877906bSopenharmony_ci *  @sa @ref window_iconify
1712b877906bSopenharmony_ci *  @sa @ref glfwSetWindowIconifyCallback
1713b877906bSopenharmony_ci *
1714b877906bSopenharmony_ci *  @since Added in version 3.0.
1715b877906bSopenharmony_ci *
1716b877906bSopenharmony_ci *  @ingroup window
1717b877906bSopenharmony_ci */
1718b877906bSopenharmony_citypedef void (* GLFWwindowiconifyfun)(GLFWwindow* window, int iconified);
1719b877906bSopenharmony_ci
1720b877906bSopenharmony_ci/*! @brief The function pointer type for window maximize callbacks.
1721b877906bSopenharmony_ci *
1722b877906bSopenharmony_ci *  This is the function pointer type for window maximize callbacks.  A window
1723b877906bSopenharmony_ci *  maximize callback function has the following signature:
1724b877906bSopenharmony_ci *  @code
1725b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int maximized)
1726b877906bSopenharmony_ci *  @endcode
1727b877906bSopenharmony_ci *
1728b877906bSopenharmony_ci *  @param[in] window The window that was maximized or restored.
1729b877906bSopenharmony_ci *  @param[in] maximized `GLFW_TRUE` if the window was maximized, or
1730b877906bSopenharmony_ci *  `GLFW_FALSE` if it was restored.
1731b877906bSopenharmony_ci *
1732b877906bSopenharmony_ci *  @sa @ref window_maximize
1733b877906bSopenharmony_ci *  @sa glfwSetWindowMaximizeCallback
1734b877906bSopenharmony_ci *
1735b877906bSopenharmony_ci *  @since Added in version 3.3.
1736b877906bSopenharmony_ci *
1737b877906bSopenharmony_ci *  @ingroup window
1738b877906bSopenharmony_ci */
1739b877906bSopenharmony_citypedef void (* GLFWwindowmaximizefun)(GLFWwindow* window, int maximized);
1740b877906bSopenharmony_ci
1741b877906bSopenharmony_ci/*! @brief The function pointer type for framebuffer size callbacks.
1742b877906bSopenharmony_ci *
1743b877906bSopenharmony_ci *  This is the function pointer type for framebuffer size callbacks.
1744b877906bSopenharmony_ci *  A framebuffer size callback function has the following signature:
1745b877906bSopenharmony_ci *  @code
1746b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int width, int height)
1747b877906bSopenharmony_ci *  @endcode
1748b877906bSopenharmony_ci *
1749b877906bSopenharmony_ci *  @param[in] window The window whose framebuffer was resized.
1750b877906bSopenharmony_ci *  @param[in] width The new width, in pixels, of the framebuffer.
1751b877906bSopenharmony_ci *  @param[in] height The new height, in pixels, of the framebuffer.
1752b877906bSopenharmony_ci *
1753b877906bSopenharmony_ci *  @sa @ref window_fbsize
1754b877906bSopenharmony_ci *  @sa @ref glfwSetFramebufferSizeCallback
1755b877906bSopenharmony_ci *
1756b877906bSopenharmony_ci *  @since Added in version 3.0.
1757b877906bSopenharmony_ci *
1758b877906bSopenharmony_ci *  @ingroup window
1759b877906bSopenharmony_ci */
1760b877906bSopenharmony_citypedef void (* GLFWframebuffersizefun)(GLFWwindow* window, int width, int height);
1761b877906bSopenharmony_ci
1762b877906bSopenharmony_ci/*! @brief The function pointer type for window content scale callbacks.
1763b877906bSopenharmony_ci *
1764b877906bSopenharmony_ci *  This is the function pointer type for window content scale callbacks.
1765b877906bSopenharmony_ci *  A window content scale callback function has the following signature:
1766b877906bSopenharmony_ci *  @code
1767b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, float xscale, float yscale)
1768b877906bSopenharmony_ci *  @endcode
1769b877906bSopenharmony_ci *
1770b877906bSopenharmony_ci *  @param[in] window The window whose content scale changed.
1771b877906bSopenharmony_ci *  @param[in] xscale The new x-axis content scale of the window.
1772b877906bSopenharmony_ci *  @param[in] yscale The new y-axis content scale of the window.
1773b877906bSopenharmony_ci *
1774b877906bSopenharmony_ci *  @sa @ref window_scale
1775b877906bSopenharmony_ci *  @sa @ref glfwSetWindowContentScaleCallback
1776b877906bSopenharmony_ci *
1777b877906bSopenharmony_ci *  @since Added in version 3.3.
1778b877906bSopenharmony_ci *
1779b877906bSopenharmony_ci *  @ingroup window
1780b877906bSopenharmony_ci */
1781b877906bSopenharmony_citypedef void (* GLFWwindowcontentscalefun)(GLFWwindow* window, float xscale, float yscale);
1782b877906bSopenharmony_ci
1783b877906bSopenharmony_ci/*! @brief The function pointer type for mouse button callbacks.
1784b877906bSopenharmony_ci *
1785b877906bSopenharmony_ci *  This is the function pointer type for mouse button callback functions.
1786b877906bSopenharmony_ci *  A mouse button callback function has the following signature:
1787b877906bSopenharmony_ci *  @code
1788b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int button, int action, int mods)
1789b877906bSopenharmony_ci *  @endcode
1790b877906bSopenharmony_ci *
1791b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1792b877906bSopenharmony_ci *  @param[in] button The [mouse button](@ref buttons) that was pressed or
1793b877906bSopenharmony_ci *  released.
1794b877906bSopenharmony_ci *  @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.  Future releases
1795b877906bSopenharmony_ci *  may add more actions.
1796b877906bSopenharmony_ci *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were
1797b877906bSopenharmony_ci *  held down.
1798b877906bSopenharmony_ci *
1799b877906bSopenharmony_ci *  @sa @ref input_mouse_button
1800b877906bSopenharmony_ci *  @sa @ref glfwSetMouseButtonCallback
1801b877906bSopenharmony_ci *
1802b877906bSopenharmony_ci *  @since Added in version 1.0.
1803b877906bSopenharmony_ci *  @glfw3 Added window handle and modifier mask parameters.
1804b877906bSopenharmony_ci *
1805b877906bSopenharmony_ci *  @ingroup input
1806b877906bSopenharmony_ci */
1807b877906bSopenharmony_citypedef void (* GLFWmousebuttonfun)(GLFWwindow* window, int button, int action, int mods);
1808b877906bSopenharmony_ci
1809b877906bSopenharmony_ci/*! @brief The function pointer type for cursor position callbacks.
1810b877906bSopenharmony_ci *
1811b877906bSopenharmony_ci *  This is the function pointer type for cursor position callbacks.  A cursor
1812b877906bSopenharmony_ci *  position callback function has the following signature:
1813b877906bSopenharmony_ci *  @code
1814b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, double xpos, double ypos);
1815b877906bSopenharmony_ci *  @endcode
1816b877906bSopenharmony_ci *
1817b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1818b877906bSopenharmony_ci *  @param[in] xpos The new cursor x-coordinate, relative to the left edge of
1819b877906bSopenharmony_ci *  the content area.
1820b877906bSopenharmony_ci *  @param[in] ypos The new cursor y-coordinate, relative to the top edge of the
1821b877906bSopenharmony_ci *  content area.
1822b877906bSopenharmony_ci *
1823b877906bSopenharmony_ci *  @sa @ref cursor_pos
1824b877906bSopenharmony_ci *  @sa @ref glfwSetCursorPosCallback
1825b877906bSopenharmony_ci *
1826b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `GLFWmouseposfun`.
1827b877906bSopenharmony_ci *
1828b877906bSopenharmony_ci *  @ingroup input
1829b877906bSopenharmony_ci */
1830b877906bSopenharmony_citypedef void (* GLFWcursorposfun)(GLFWwindow* window, double xpos, double ypos);
1831b877906bSopenharmony_ci
1832b877906bSopenharmony_ci/*! @brief The function pointer type for cursor enter/leave callbacks.
1833b877906bSopenharmony_ci *
1834b877906bSopenharmony_ci *  This is the function pointer type for cursor enter/leave callbacks.
1835b877906bSopenharmony_ci *  A cursor enter/leave callback function has the following signature:
1836b877906bSopenharmony_ci *  @code
1837b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int entered)
1838b877906bSopenharmony_ci *  @endcode
1839b877906bSopenharmony_ci *
1840b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1841b877906bSopenharmony_ci *  @param[in] entered `GLFW_TRUE` if the cursor entered the window's content
1842b877906bSopenharmony_ci *  area, or `GLFW_FALSE` if it left it.
1843b877906bSopenharmony_ci *
1844b877906bSopenharmony_ci *  @sa @ref cursor_enter
1845b877906bSopenharmony_ci *  @sa @ref glfwSetCursorEnterCallback
1846b877906bSopenharmony_ci *
1847b877906bSopenharmony_ci *  @since Added in version 3.0.
1848b877906bSopenharmony_ci *
1849b877906bSopenharmony_ci *  @ingroup input
1850b877906bSopenharmony_ci */
1851b877906bSopenharmony_citypedef void (* GLFWcursorenterfun)(GLFWwindow* window, int entered);
1852b877906bSopenharmony_ci
1853b877906bSopenharmony_ci/*! @brief The function pointer type for scroll callbacks.
1854b877906bSopenharmony_ci *
1855b877906bSopenharmony_ci *  This is the function pointer type for scroll callbacks.  A scroll callback
1856b877906bSopenharmony_ci *  function has the following signature:
1857b877906bSopenharmony_ci *  @code
1858b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, double xoffset, double yoffset)
1859b877906bSopenharmony_ci *  @endcode
1860b877906bSopenharmony_ci *
1861b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1862b877906bSopenharmony_ci *  @param[in] xoffset The scroll offset along the x-axis.
1863b877906bSopenharmony_ci *  @param[in] yoffset The scroll offset along the y-axis.
1864b877906bSopenharmony_ci *
1865b877906bSopenharmony_ci *  @sa @ref scrolling
1866b877906bSopenharmony_ci *  @sa @ref glfwSetScrollCallback
1867b877906bSopenharmony_ci *
1868b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `GLFWmousewheelfun`.
1869b877906bSopenharmony_ci *
1870b877906bSopenharmony_ci *  @ingroup input
1871b877906bSopenharmony_ci */
1872b877906bSopenharmony_citypedef void (* GLFWscrollfun)(GLFWwindow* window, double xoffset, double yoffset);
1873b877906bSopenharmony_ci
1874b877906bSopenharmony_ci/*! @brief The function pointer type for keyboard key callbacks.
1875b877906bSopenharmony_ci *
1876b877906bSopenharmony_ci *  This is the function pointer type for keyboard key callbacks.  A keyboard
1877b877906bSopenharmony_ci *  key callback function has the following signature:
1878b877906bSopenharmony_ci *  @code
1879b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
1880b877906bSopenharmony_ci *  @endcode
1881b877906bSopenharmony_ci *
1882b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1883b877906bSopenharmony_ci *  @param[in] key The [keyboard key](@ref keys) that was pressed or released.
1884b877906bSopenharmony_ci *  @param[in] scancode The platform-specific scancode of the key.
1885b877906bSopenharmony_ci *  @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`.  Future
1886b877906bSopenharmony_ci *  releases may add more actions.
1887b877906bSopenharmony_ci *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were
1888b877906bSopenharmony_ci *  held down.
1889b877906bSopenharmony_ci *
1890b877906bSopenharmony_ci *  @sa @ref input_key
1891b877906bSopenharmony_ci *  @sa @ref glfwSetKeyCallback
1892b877906bSopenharmony_ci *
1893b877906bSopenharmony_ci *  @since Added in version 1.0.
1894b877906bSopenharmony_ci *  @glfw3 Added window handle, scancode and modifier mask parameters.
1895b877906bSopenharmony_ci *
1896b877906bSopenharmony_ci *  @ingroup input
1897b877906bSopenharmony_ci */
1898b877906bSopenharmony_citypedef void (* GLFWkeyfun)(GLFWwindow* window, int key, int scancode, int action, int mods);
1899b877906bSopenharmony_ci
1900b877906bSopenharmony_ci/*! @brief The function pointer type for Unicode character callbacks.
1901b877906bSopenharmony_ci *
1902b877906bSopenharmony_ci *  This is the function pointer type for Unicode character callbacks.
1903b877906bSopenharmony_ci *  A Unicode character callback function has the following signature:
1904b877906bSopenharmony_ci *  @code
1905b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, unsigned int codepoint)
1906b877906bSopenharmony_ci *  @endcode
1907b877906bSopenharmony_ci *
1908b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1909b877906bSopenharmony_ci *  @param[in] codepoint The Unicode code point of the character.
1910b877906bSopenharmony_ci *
1911b877906bSopenharmony_ci *  @sa @ref input_char
1912b877906bSopenharmony_ci *  @sa @ref glfwSetCharCallback
1913b877906bSopenharmony_ci *
1914b877906bSopenharmony_ci *  @since Added in version 2.4.
1915b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
1916b877906bSopenharmony_ci *
1917b877906bSopenharmony_ci *  @ingroup input
1918b877906bSopenharmony_ci */
1919b877906bSopenharmony_citypedef void (* GLFWcharfun)(GLFWwindow* window, unsigned int codepoint);
1920b877906bSopenharmony_ci
1921b877906bSopenharmony_ci/*! @brief The function pointer type for Unicode character with modifiers
1922b877906bSopenharmony_ci *  callbacks.
1923b877906bSopenharmony_ci *
1924b877906bSopenharmony_ci *  This is the function pointer type for Unicode character with modifiers
1925b877906bSopenharmony_ci *  callbacks.  It is called for each input character, regardless of what
1926b877906bSopenharmony_ci *  modifier keys are held down.  A Unicode character with modifiers callback
1927b877906bSopenharmony_ci *  function has the following signature:
1928b877906bSopenharmony_ci *  @code
1929b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
1930b877906bSopenharmony_ci *  @endcode
1931b877906bSopenharmony_ci *
1932b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1933b877906bSopenharmony_ci *  @param[in] codepoint The Unicode code point of the character.
1934b877906bSopenharmony_ci *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were
1935b877906bSopenharmony_ci *  held down.
1936b877906bSopenharmony_ci *
1937b877906bSopenharmony_ci *  @sa @ref input_char
1938b877906bSopenharmony_ci *  @sa @ref glfwSetCharModsCallback
1939b877906bSopenharmony_ci *
1940b877906bSopenharmony_ci *  @deprecated Scheduled for removal in version 4.0.
1941b877906bSopenharmony_ci *
1942b877906bSopenharmony_ci *  @since Added in version 3.1.
1943b877906bSopenharmony_ci *
1944b877906bSopenharmony_ci *  @ingroup input
1945b877906bSopenharmony_ci */
1946b877906bSopenharmony_citypedef void (* GLFWcharmodsfun)(GLFWwindow* window, unsigned int codepoint, int mods);
1947b877906bSopenharmony_ci
1948b877906bSopenharmony_ci/*! @brief The function pointer type for path drop callbacks.
1949b877906bSopenharmony_ci *
1950b877906bSopenharmony_ci *  This is the function pointer type for path drop callbacks.  A path drop
1951b877906bSopenharmony_ci *  callback function has the following signature:
1952b877906bSopenharmony_ci *  @code
1953b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int path_count, const char* paths[])
1954b877906bSopenharmony_ci *  @endcode
1955b877906bSopenharmony_ci *
1956b877906bSopenharmony_ci *  @param[in] window The window that received the event.
1957b877906bSopenharmony_ci *  @param[in] path_count The number of dropped paths.
1958b877906bSopenharmony_ci *  @param[in] paths The UTF-8 encoded file and/or directory path names.
1959b877906bSopenharmony_ci *
1960b877906bSopenharmony_ci *  @pointer_lifetime The path array and its strings are valid until the
1961b877906bSopenharmony_ci *  callback function returns.
1962b877906bSopenharmony_ci *
1963b877906bSopenharmony_ci *  @sa @ref path_drop
1964b877906bSopenharmony_ci *  @sa @ref glfwSetDropCallback
1965b877906bSopenharmony_ci *
1966b877906bSopenharmony_ci *  @since Added in version 3.1.
1967b877906bSopenharmony_ci *
1968b877906bSopenharmony_ci *  @ingroup input
1969b877906bSopenharmony_ci */
1970b877906bSopenharmony_citypedef void (* GLFWdropfun)(GLFWwindow* window, int path_count, const char* paths[]);
1971b877906bSopenharmony_ci
1972b877906bSopenharmony_ci/*! @brief The function pointer type for monitor configuration callbacks.
1973b877906bSopenharmony_ci *
1974b877906bSopenharmony_ci *  This is the function pointer type for monitor configuration callbacks.
1975b877906bSopenharmony_ci *  A monitor callback function has the following signature:
1976b877906bSopenharmony_ci *  @code
1977b877906bSopenharmony_ci *  void function_name(GLFWmonitor* monitor, int event)
1978b877906bSopenharmony_ci *  @endcode
1979b877906bSopenharmony_ci *
1980b877906bSopenharmony_ci *  @param[in] monitor The monitor that was connected or disconnected.
1981b877906bSopenharmony_ci *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future
1982b877906bSopenharmony_ci *  releases may add more events.
1983b877906bSopenharmony_ci *
1984b877906bSopenharmony_ci *  @sa @ref monitor_event
1985b877906bSopenharmony_ci *  @sa @ref glfwSetMonitorCallback
1986b877906bSopenharmony_ci *
1987b877906bSopenharmony_ci *  @since Added in version 3.0.
1988b877906bSopenharmony_ci *
1989b877906bSopenharmony_ci *  @ingroup monitor
1990b877906bSopenharmony_ci */
1991b877906bSopenharmony_citypedef void (* GLFWmonitorfun)(GLFWmonitor* monitor, int event);
1992b877906bSopenharmony_ci
1993b877906bSopenharmony_ci/*! @brief The function pointer type for joystick configuration callbacks.
1994b877906bSopenharmony_ci *
1995b877906bSopenharmony_ci *  This is the function pointer type for joystick configuration callbacks.
1996b877906bSopenharmony_ci *  A joystick configuration callback function has the following signature:
1997b877906bSopenharmony_ci *  @code
1998b877906bSopenharmony_ci *  void function_name(int jid, int event)
1999b877906bSopenharmony_ci *  @endcode
2000b877906bSopenharmony_ci *
2001b877906bSopenharmony_ci *  @param[in] jid The joystick that was connected or disconnected.
2002b877906bSopenharmony_ci *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future
2003b877906bSopenharmony_ci *  releases may add more events.
2004b877906bSopenharmony_ci *
2005b877906bSopenharmony_ci *  @sa @ref joystick_event
2006b877906bSopenharmony_ci *  @sa @ref glfwSetJoystickCallback
2007b877906bSopenharmony_ci *
2008b877906bSopenharmony_ci *  @since Added in version 3.2.
2009b877906bSopenharmony_ci *
2010b877906bSopenharmony_ci *  @ingroup input
2011b877906bSopenharmony_ci */
2012b877906bSopenharmony_citypedef void (* GLFWjoystickfun)(int jid, int event);
2013b877906bSopenharmony_ci
2014b877906bSopenharmony_ci/*! @brief Video mode type.
2015b877906bSopenharmony_ci *
2016b877906bSopenharmony_ci *  This describes a single video mode.
2017b877906bSopenharmony_ci *
2018b877906bSopenharmony_ci *  @sa @ref monitor_modes
2019b877906bSopenharmony_ci *  @sa @ref glfwGetVideoMode
2020b877906bSopenharmony_ci *  @sa @ref glfwGetVideoModes
2021b877906bSopenharmony_ci *
2022b877906bSopenharmony_ci *  @since Added in version 1.0.
2023b877906bSopenharmony_ci *  @glfw3 Added refresh rate member.
2024b877906bSopenharmony_ci *
2025b877906bSopenharmony_ci *  @ingroup monitor
2026b877906bSopenharmony_ci */
2027b877906bSopenharmony_citypedef struct GLFWvidmode
2028b877906bSopenharmony_ci{
2029b877906bSopenharmony_ci    /*! The width, in screen coordinates, of the video mode.
2030b877906bSopenharmony_ci     */
2031b877906bSopenharmony_ci    int width;
2032b877906bSopenharmony_ci    /*! The height, in screen coordinates, of the video mode.
2033b877906bSopenharmony_ci     */
2034b877906bSopenharmony_ci    int height;
2035b877906bSopenharmony_ci    /*! The bit depth of the red channel of the video mode.
2036b877906bSopenharmony_ci     */
2037b877906bSopenharmony_ci    int redBits;
2038b877906bSopenharmony_ci    /*! The bit depth of the green channel of the video mode.
2039b877906bSopenharmony_ci     */
2040b877906bSopenharmony_ci    int greenBits;
2041b877906bSopenharmony_ci    /*! The bit depth of the blue channel of the video mode.
2042b877906bSopenharmony_ci     */
2043b877906bSopenharmony_ci    int blueBits;
2044b877906bSopenharmony_ci    /*! The refresh rate, in Hz, of the video mode.
2045b877906bSopenharmony_ci     */
2046b877906bSopenharmony_ci    int refreshRate;
2047b877906bSopenharmony_ci} GLFWvidmode;
2048b877906bSopenharmony_ci
2049b877906bSopenharmony_ci/*! @brief Gamma ramp.
2050b877906bSopenharmony_ci *
2051b877906bSopenharmony_ci *  This describes the gamma ramp for a monitor.
2052b877906bSopenharmony_ci *
2053b877906bSopenharmony_ci *  @sa @ref monitor_gamma
2054b877906bSopenharmony_ci *  @sa @ref glfwGetGammaRamp
2055b877906bSopenharmony_ci *  @sa @ref glfwSetGammaRamp
2056b877906bSopenharmony_ci *
2057b877906bSopenharmony_ci *  @since Added in version 3.0.
2058b877906bSopenharmony_ci *
2059b877906bSopenharmony_ci *  @ingroup monitor
2060b877906bSopenharmony_ci */
2061b877906bSopenharmony_citypedef struct GLFWgammaramp
2062b877906bSopenharmony_ci{
2063b877906bSopenharmony_ci    /*! An array of value describing the response of the red channel.
2064b877906bSopenharmony_ci     */
2065b877906bSopenharmony_ci    unsigned short* red;
2066b877906bSopenharmony_ci    /*! An array of value describing the response of the green channel.
2067b877906bSopenharmony_ci     */
2068b877906bSopenharmony_ci    unsigned short* green;
2069b877906bSopenharmony_ci    /*! An array of value describing the response of the blue channel.
2070b877906bSopenharmony_ci     */
2071b877906bSopenharmony_ci    unsigned short* blue;
2072b877906bSopenharmony_ci    /*! The number of elements in each array.
2073b877906bSopenharmony_ci     */
2074b877906bSopenharmony_ci    unsigned int size;
2075b877906bSopenharmony_ci} GLFWgammaramp;
2076b877906bSopenharmony_ci
2077b877906bSopenharmony_ci/*! @brief Image data.
2078b877906bSopenharmony_ci *
2079b877906bSopenharmony_ci *  This describes a single 2D image.  See the documentation for each related
2080b877906bSopenharmony_ci *  function what the expected pixel format is.
2081b877906bSopenharmony_ci *
2082b877906bSopenharmony_ci *  @sa @ref cursor_custom
2083b877906bSopenharmony_ci *  @sa @ref window_icon
2084b877906bSopenharmony_ci *
2085b877906bSopenharmony_ci *  @since Added in version 2.1.
2086b877906bSopenharmony_ci *  @glfw3 Removed format and bytes-per-pixel members.
2087b877906bSopenharmony_ci *
2088b877906bSopenharmony_ci *  @ingroup window
2089b877906bSopenharmony_ci */
2090b877906bSopenharmony_citypedef struct GLFWimage
2091b877906bSopenharmony_ci{
2092b877906bSopenharmony_ci    /*! The width, in pixels, of this image.
2093b877906bSopenharmony_ci     */
2094b877906bSopenharmony_ci    int width;
2095b877906bSopenharmony_ci    /*! The height, in pixels, of this image.
2096b877906bSopenharmony_ci     */
2097b877906bSopenharmony_ci    int height;
2098b877906bSopenharmony_ci    /*! The pixel data of this image, arranged left-to-right, top-to-bottom.
2099b877906bSopenharmony_ci     */
2100b877906bSopenharmony_ci    unsigned char* pixels;
2101b877906bSopenharmony_ci} GLFWimage;
2102b877906bSopenharmony_ci
2103b877906bSopenharmony_ci/*! @brief Gamepad input state
2104b877906bSopenharmony_ci *
2105b877906bSopenharmony_ci *  This describes the input state of a gamepad.
2106b877906bSopenharmony_ci *
2107b877906bSopenharmony_ci *  @sa @ref gamepad
2108b877906bSopenharmony_ci *  @sa @ref glfwGetGamepadState
2109b877906bSopenharmony_ci *
2110b877906bSopenharmony_ci *  @since Added in version 3.3.
2111b877906bSopenharmony_ci *
2112b877906bSopenharmony_ci *  @ingroup input
2113b877906bSopenharmony_ci */
2114b877906bSopenharmony_citypedef struct GLFWgamepadstate
2115b877906bSopenharmony_ci{
2116b877906bSopenharmony_ci    /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
2117b877906bSopenharmony_ci     *  or `GLFW_RELEASE`.
2118b877906bSopenharmony_ci     */
2119b877906bSopenharmony_ci    unsigned char buttons[15];
2120b877906bSopenharmony_ci    /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
2121b877906bSopenharmony_ci     *  to 1.0 inclusive.
2122b877906bSopenharmony_ci     */
2123b877906bSopenharmony_ci    float axes[6];
2124b877906bSopenharmony_ci} GLFWgamepadstate;
2125b877906bSopenharmony_ci
2126b877906bSopenharmony_ci/*! @brief Custom heap memory allocator.
2127b877906bSopenharmony_ci *
2128b877906bSopenharmony_ci *  This describes a custom heap memory allocator for GLFW.  To set an allocator, pass it
2129b877906bSopenharmony_ci *  to @ref glfwInitAllocator before initializing the library.
2130b877906bSopenharmony_ci *
2131b877906bSopenharmony_ci *  @sa @ref init_allocator
2132b877906bSopenharmony_ci *  @sa @ref glfwInitAllocator
2133b877906bSopenharmony_ci *
2134b877906bSopenharmony_ci *  @since Added in version 3.4.
2135b877906bSopenharmony_ci *
2136b877906bSopenharmony_ci *  @ingroup init
2137b877906bSopenharmony_ci */
2138b877906bSopenharmony_citypedef struct GLFWallocator
2139b877906bSopenharmony_ci{
2140b877906bSopenharmony_ci    /*! The memory allocation function.  See @ref GLFWallocatefun for details about
2141b877906bSopenharmony_ci     *  allocation function.
2142b877906bSopenharmony_ci     */
2143b877906bSopenharmony_ci    GLFWallocatefun allocate;
2144b877906bSopenharmony_ci    /*! The memory reallocation function.  See @ref GLFWreallocatefun for details about
2145b877906bSopenharmony_ci     *  reallocation function.
2146b877906bSopenharmony_ci     */
2147b877906bSopenharmony_ci    GLFWreallocatefun reallocate;
2148b877906bSopenharmony_ci    /*! The memory deallocation function.  See @ref GLFWdeallocatefun for details about
2149b877906bSopenharmony_ci     *  deallocation function.
2150b877906bSopenharmony_ci     */
2151b877906bSopenharmony_ci    GLFWdeallocatefun deallocate;
2152b877906bSopenharmony_ci    /*! The user pointer for this custom allocator.  This value will be passed to the
2153b877906bSopenharmony_ci     *  allocator functions.
2154b877906bSopenharmony_ci     */
2155b877906bSopenharmony_ci    void* user;
2156b877906bSopenharmony_ci} GLFWallocator;
2157b877906bSopenharmony_ci
2158b877906bSopenharmony_ci
2159b877906bSopenharmony_ci/*************************************************************************
2160b877906bSopenharmony_ci * GLFW API functions
2161b877906bSopenharmony_ci *************************************************************************/
2162b877906bSopenharmony_ci
2163b877906bSopenharmony_ci/*! @brief Initializes the GLFW library.
2164b877906bSopenharmony_ci *
2165b877906bSopenharmony_ci *  This function initializes the GLFW library.  Before most GLFW functions can
2166b877906bSopenharmony_ci *  be used, GLFW must be initialized, and before an application terminates GLFW
2167b877906bSopenharmony_ci *  should be terminated in order to free any resources allocated during or
2168b877906bSopenharmony_ci *  after initialization.
2169b877906bSopenharmony_ci *
2170b877906bSopenharmony_ci *  If this function fails, it calls @ref glfwTerminate before returning.  If it
2171b877906bSopenharmony_ci *  succeeds, you should call @ref glfwTerminate before the application exits.
2172b877906bSopenharmony_ci *
2173b877906bSopenharmony_ci *  Additional calls to this function after successful initialization but before
2174b877906bSopenharmony_ci *  termination will return `GLFW_TRUE` immediately.
2175b877906bSopenharmony_ci *
2176b877906bSopenharmony_ci *  The @ref GLFW_PLATFORM init hint controls which platforms are considered during
2177b877906bSopenharmony_ci *  initialization.  This also depends on which platforms the library was compiled to
2178b877906bSopenharmony_ci *  support.
2179b877906bSopenharmony_ci *
2180b877906bSopenharmony_ci *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
2181b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2182b877906bSopenharmony_ci *
2183b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_PLATFORM_UNAVAILABLE and @ref
2184b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2185b877906bSopenharmony_ci *
2186b877906bSopenharmony_ci *  @remark @macos This function will change the current directory of the
2187b877906bSopenharmony_ci *  application to the `Contents/Resources` subdirectory of the application's
2188b877906bSopenharmony_ci *  bundle, if present.  This can be disabled with the @ref
2189b877906bSopenharmony_ci *  GLFW_COCOA_CHDIR_RESOURCES init hint.
2190b877906bSopenharmony_ci *
2191b877906bSopenharmony_ci *  @remark @macos This function will create the main menu and dock icon for the
2192b877906bSopenharmony_ci *  application.  If GLFW finds a `MainMenu.nib` it is loaded and assumed to
2193b877906bSopenharmony_ci *  contain a menu bar.  Otherwise a minimal menu bar is created manually with
2194b877906bSopenharmony_ci *  common commands like Hide, Quit and About.  The About entry opens a minimal
2195b877906bSopenharmony_ci *  about dialog with information from the application's bundle.  The menu bar
2196b877906bSopenharmony_ci *  and dock icon can be disabled entirely with the @ref GLFW_COCOA_MENUBAR init
2197b877906bSopenharmony_ci *  hint.
2198b877906bSopenharmony_ci *
2199b877906bSopenharmony_ci *  @remark __Wayland, X11:__ If the library was compiled with support for both
2200b877906bSopenharmony_ci *  Wayland and X11, and the @ref GLFW_PLATFORM init hint is set to
2201b877906bSopenharmony_ci *  `GLFW_ANY_PLATFORM`, the `XDG_SESSION_TYPE` environment variable affects
2202b877906bSopenharmony_ci *  which platform is picked.  If the environment variable is not set, or is set
2203b877906bSopenharmony_ci *  to something other than `wayland` or `x11`, the regular detection mechanism
2204b877906bSopenharmony_ci *  will be used instead.
2205b877906bSopenharmony_ci *
2206b877906bSopenharmony_ci *  @remark @x11 This function will set the `LC_CTYPE` category of the
2207b877906bSopenharmony_ci *  application locale according to the current environment if that category is
2208b877906bSopenharmony_ci *  still "C".  This is because the "C" locale breaks Unicode text input.
2209b877906bSopenharmony_ci *
2210b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2211b877906bSopenharmony_ci *
2212b877906bSopenharmony_ci *  @sa @ref intro_init
2213b877906bSopenharmony_ci *  @sa @ref glfwInitHint
2214b877906bSopenharmony_ci *  @sa @ref glfwInitAllocator
2215b877906bSopenharmony_ci *  @sa @ref glfwTerminate
2216b877906bSopenharmony_ci *
2217b877906bSopenharmony_ci *  @since Added in version 1.0.
2218b877906bSopenharmony_ci *
2219b877906bSopenharmony_ci *  @ingroup init
2220b877906bSopenharmony_ci */
2221b877906bSopenharmony_ciGLFWAPI int glfwInit(void);
2222b877906bSopenharmony_ci
2223b877906bSopenharmony_ci/*! @brief Terminates the GLFW library.
2224b877906bSopenharmony_ci *
2225b877906bSopenharmony_ci *  This function destroys all remaining windows and cursors, restores any
2226b877906bSopenharmony_ci *  modified gamma ramps and frees any other allocated resources.  Once this
2227b877906bSopenharmony_ci *  function is called, you must again call @ref glfwInit successfully before
2228b877906bSopenharmony_ci *  you will be able to use most GLFW functions.
2229b877906bSopenharmony_ci *
2230b877906bSopenharmony_ci *  If GLFW has been successfully initialized, this function should be called
2231b877906bSopenharmony_ci *  before the application exits.  If initialization fails, there is no need to
2232b877906bSopenharmony_ci *  call this function, as it is called by @ref glfwInit before it returns
2233b877906bSopenharmony_ci *  failure.
2234b877906bSopenharmony_ci *
2235b877906bSopenharmony_ci *  This function has no effect if GLFW is not initialized.
2236b877906bSopenharmony_ci *
2237b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
2238b877906bSopenharmony_ci *
2239b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2240b877906bSopenharmony_ci *
2241b877906bSopenharmony_ci *  @warning The contexts of any remaining windows must not be current on any
2242b877906bSopenharmony_ci *  other thread when this function is called.
2243b877906bSopenharmony_ci *
2244b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
2245b877906bSopenharmony_ci *
2246b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2247b877906bSopenharmony_ci *
2248b877906bSopenharmony_ci *  @sa @ref intro_init
2249b877906bSopenharmony_ci *  @sa @ref glfwInit
2250b877906bSopenharmony_ci *
2251b877906bSopenharmony_ci *  @since Added in version 1.0.
2252b877906bSopenharmony_ci *
2253b877906bSopenharmony_ci *  @ingroup init
2254b877906bSopenharmony_ci */
2255b877906bSopenharmony_ciGLFWAPI void glfwTerminate(void);
2256b877906bSopenharmony_ci
2257b877906bSopenharmony_ci/*! @brief Sets the specified init hint to the desired value.
2258b877906bSopenharmony_ci *
2259b877906bSopenharmony_ci *  This function sets hints for the next initialization of GLFW.
2260b877906bSopenharmony_ci *
2261b877906bSopenharmony_ci *  The values you set hints to are never reset by GLFW, but they only take
2262b877906bSopenharmony_ci *  effect during initialization.  Once GLFW has been initialized, any values
2263b877906bSopenharmony_ci *  you set will be ignored until the library is terminated and initialized
2264b877906bSopenharmony_ci *  again.
2265b877906bSopenharmony_ci *
2266b877906bSopenharmony_ci *  Some hints are platform specific.  These may be set on any platform but they
2267b877906bSopenharmony_ci *  will only affect their specific platform.  Other platforms will ignore them.
2268b877906bSopenharmony_ci *  Setting these hints requires no platform specific headers or functions.
2269b877906bSopenharmony_ci *
2270b877906bSopenharmony_ci *  @param[in] hint The [init hint](@ref init_hints) to set.
2271b877906bSopenharmony_ci *  @param[in] value The new value of the init hint.
2272b877906bSopenharmony_ci *
2273b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref
2274b877906bSopenharmony_ci *  GLFW_INVALID_VALUE.
2275b877906bSopenharmony_ci *
2276b877906bSopenharmony_ci *  @remarks This function may be called before @ref glfwInit.
2277b877906bSopenharmony_ci *
2278b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2279b877906bSopenharmony_ci *
2280b877906bSopenharmony_ci *  @sa init_hints
2281b877906bSopenharmony_ci *  @sa glfwInit
2282b877906bSopenharmony_ci *
2283b877906bSopenharmony_ci *  @since Added in version 3.3.
2284b877906bSopenharmony_ci *
2285b877906bSopenharmony_ci *  @ingroup init
2286b877906bSopenharmony_ci */
2287b877906bSopenharmony_ciGLFWAPI void glfwInitHint(int hint, int value);
2288b877906bSopenharmony_ci
2289b877906bSopenharmony_ci/*! @brief Sets the init allocator to the desired value.
2290b877906bSopenharmony_ci *
2291b877906bSopenharmony_ci *  To use the default allocator, call this function with a `NULL` argument.
2292b877906bSopenharmony_ci *
2293b877906bSopenharmony_ci *  If you specify an allocator struct, every member must be a valid function
2294b877906bSopenharmony_ci *  pointer.  If any member is `NULL`, this function will emit @ref
2295b877906bSopenharmony_ci *  GLFW_INVALID_VALUE and the init allocator will be unchanged.
2296b877906bSopenharmony_ci *
2297b877906bSopenharmony_ci *  The functions in the allocator must fulfil a number of requirements.  See the
2298b877906bSopenharmony_ci *  documentation for @ref GLFWallocatefun, @ref GLFWreallocatefun and @ref
2299b877906bSopenharmony_ci *  GLFWdeallocatefun for details.
2300b877906bSopenharmony_ci *
2301b877906bSopenharmony_ci *  @param[in] allocator The allocator to use at the next initialization, or
2302b877906bSopenharmony_ci *  `NULL` to use the default one.
2303b877906bSopenharmony_ci *
2304b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_INVALID_VALUE.
2305b877906bSopenharmony_ci *
2306b877906bSopenharmony_ci *  @pointer_lifetime The specified allocator is copied before this function
2307b877906bSopenharmony_ci *  returns.
2308b877906bSopenharmony_ci *
2309b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2310b877906bSopenharmony_ci *
2311b877906bSopenharmony_ci *  @sa @ref init_allocator
2312b877906bSopenharmony_ci *  @sa @ref glfwInit
2313b877906bSopenharmony_ci *
2314b877906bSopenharmony_ci *  @since Added in version 3.4.
2315b877906bSopenharmony_ci *
2316b877906bSopenharmony_ci *  @ingroup init
2317b877906bSopenharmony_ci */
2318b877906bSopenharmony_ciGLFWAPI void glfwInitAllocator(const GLFWallocator* allocator);
2319b877906bSopenharmony_ci
2320b877906bSopenharmony_ci#if defined(VK_VERSION_1_0)
2321b877906bSopenharmony_ci
2322b877906bSopenharmony_ci/*! @brief Sets the desired Vulkan `vkGetInstanceProcAddr` function.
2323b877906bSopenharmony_ci *
2324b877906bSopenharmony_ci *  This function sets the `vkGetInstanceProcAddr` function that GLFW will use for all
2325b877906bSopenharmony_ci *  Vulkan related entry point queries.
2326b877906bSopenharmony_ci *
2327b877906bSopenharmony_ci *  This feature is mostly useful on macOS, if your copy of the Vulkan loader is in
2328b877906bSopenharmony_ci *  a location where GLFW cannot find it through dynamic loading, or if you are still
2329b877906bSopenharmony_ci *  using the static library version of the loader.
2330b877906bSopenharmony_ci *
2331b877906bSopenharmony_ci *  If set to `NULL`, GLFW will try to load the Vulkan loader dynamically by its standard
2332b877906bSopenharmony_ci *  name and get this function from there.  This is the default behavior.
2333b877906bSopenharmony_ci *
2334b877906bSopenharmony_ci *  The standard name of the loader is `vulkan-1.dll` on Windows, `libvulkan.so.1` on
2335b877906bSopenharmony_ci *  Linux and other Unix-like systems and `libvulkan.1.dylib` on macOS.  If your code is
2336b877906bSopenharmony_ci *  also loading it via these names then you probably don't need to use this function.
2337b877906bSopenharmony_ci *
2338b877906bSopenharmony_ci *  The function address you set is never reset by GLFW, but it only takes effect during
2339b877906bSopenharmony_ci *  initialization.  Once GLFW has been initialized, any updates will be ignored until the
2340b877906bSopenharmony_ci *  library is terminated and initialized again.
2341b877906bSopenharmony_ci *
2342b877906bSopenharmony_ci *  @param[in] loader The address of the function to use, or `NULL`.
2343b877906bSopenharmony_ci *
2344b877906bSopenharmony_ci *  @par Loader function signature
2345b877906bSopenharmony_ci *  @code
2346b877906bSopenharmony_ci *  PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* name)
2347b877906bSopenharmony_ci *  @endcode
2348b877906bSopenharmony_ci *  For more information about this function, see the
2349b877906bSopenharmony_ci *  [Vulkan Registry](https://www.khronos.org/registry/vulkan/).
2350b877906bSopenharmony_ci *
2351b877906bSopenharmony_ci *  @errors None.
2352b877906bSopenharmony_ci *
2353b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2354b877906bSopenharmony_ci *
2355b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2356b877906bSopenharmony_ci *
2357b877906bSopenharmony_ci *  @sa @ref vulkan_loader
2358b877906bSopenharmony_ci *  @sa @ref glfwInit
2359b877906bSopenharmony_ci *
2360b877906bSopenharmony_ci *  @since Added in version 3.4.
2361b877906bSopenharmony_ci *
2362b877906bSopenharmony_ci *  @ingroup init
2363b877906bSopenharmony_ci */
2364b877906bSopenharmony_ciGLFWAPI void glfwInitVulkanLoader(PFN_vkGetInstanceProcAddr loader);
2365b877906bSopenharmony_ci
2366b877906bSopenharmony_ci#endif /*VK_VERSION_1_0*/
2367b877906bSopenharmony_ci
2368b877906bSopenharmony_ci/*! @brief Retrieves the version of the GLFW library.
2369b877906bSopenharmony_ci *
2370b877906bSopenharmony_ci *  This function retrieves the major, minor and revision numbers of the GLFW
2371b877906bSopenharmony_ci *  library.  It is intended for when you are using GLFW as a shared library and
2372b877906bSopenharmony_ci *  want to ensure that you are using the minimum required version.
2373b877906bSopenharmony_ci *
2374b877906bSopenharmony_ci *  Any or all of the version arguments may be `NULL`.
2375b877906bSopenharmony_ci *
2376b877906bSopenharmony_ci *  @param[out] major Where to store the major version number, or `NULL`.
2377b877906bSopenharmony_ci *  @param[out] minor Where to store the minor version number, or `NULL`.
2378b877906bSopenharmony_ci *  @param[out] rev Where to store the revision number, or `NULL`.
2379b877906bSopenharmony_ci *
2380b877906bSopenharmony_ci *  @errors None.
2381b877906bSopenharmony_ci *
2382b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2383b877906bSopenharmony_ci *
2384b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
2385b877906bSopenharmony_ci *
2386b877906bSopenharmony_ci *  @sa @ref intro_version
2387b877906bSopenharmony_ci *  @sa @ref glfwGetVersionString
2388b877906bSopenharmony_ci *
2389b877906bSopenharmony_ci *  @since Added in version 1.0.
2390b877906bSopenharmony_ci *
2391b877906bSopenharmony_ci *  @ingroup init
2392b877906bSopenharmony_ci */
2393b877906bSopenharmony_ciGLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
2394b877906bSopenharmony_ci
2395b877906bSopenharmony_ci/*! @brief Returns a string describing the compile-time configuration.
2396b877906bSopenharmony_ci *
2397b877906bSopenharmony_ci *  This function returns the compile-time generated
2398b877906bSopenharmony_ci *  [version string](@ref intro_version_string) of the GLFW library binary.  It describes
2399b877906bSopenharmony_ci *  the version, platforms, compiler and any platform or operating system specific
2400b877906bSopenharmony_ci *  compile-time options.  It should not be confused with the OpenGL or OpenGL ES version
2401b877906bSopenharmony_ci *  string, queried with `glGetString`.
2402b877906bSopenharmony_ci *
2403b877906bSopenharmony_ci *  __Do not use the version string__ to parse the GLFW library version.  The
2404b877906bSopenharmony_ci *  @ref glfwGetVersion function provides the version of the running library
2405b877906bSopenharmony_ci *  binary in numerical format.
2406b877906bSopenharmony_ci *
2407b877906bSopenharmony_ci *  __Do not use the version string__ to parse what platforms are supported.  The @ref
2408b877906bSopenharmony_ci *  glfwPlatformSupported function lets you query platform support.
2409b877906bSopenharmony_ci *
2410b877906bSopenharmony_ci *  @return The ASCII encoded GLFW version string.
2411b877906bSopenharmony_ci *
2412b877906bSopenharmony_ci *  @errors None.
2413b877906bSopenharmony_ci *
2414b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2415b877906bSopenharmony_ci *
2416b877906bSopenharmony_ci *  @pointer_lifetime The returned string is static and compile-time generated.
2417b877906bSopenharmony_ci *
2418b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
2419b877906bSopenharmony_ci *
2420b877906bSopenharmony_ci *  @sa @ref intro_version
2421b877906bSopenharmony_ci *  @sa @ref glfwGetVersion
2422b877906bSopenharmony_ci *
2423b877906bSopenharmony_ci *  @since Added in version 3.0.
2424b877906bSopenharmony_ci *
2425b877906bSopenharmony_ci *  @ingroup init
2426b877906bSopenharmony_ci */
2427b877906bSopenharmony_ciGLFWAPI const char* glfwGetVersionString(void);
2428b877906bSopenharmony_ci
2429b877906bSopenharmony_ci/*! @brief Returns and clears the last error for the calling thread.
2430b877906bSopenharmony_ci *
2431b877906bSopenharmony_ci *  This function returns and clears the [error code](@ref errors) of the last
2432b877906bSopenharmony_ci *  error that occurred on the calling thread, and optionally a UTF-8 encoded
2433b877906bSopenharmony_ci *  human-readable description of it.  If no error has occurred since the last
2434b877906bSopenharmony_ci *  call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is
2435b877906bSopenharmony_ci *  set to `NULL`.
2436b877906bSopenharmony_ci *
2437b877906bSopenharmony_ci *  @param[in] description Where to store the error description pointer, or `NULL`.
2438b877906bSopenharmony_ci *  @return The last error code for the calling thread, or @ref GLFW_NO_ERROR
2439b877906bSopenharmony_ci *  (zero).
2440b877906bSopenharmony_ci *
2441b877906bSopenharmony_ci *  @errors None.
2442b877906bSopenharmony_ci *
2443b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
2444b877906bSopenharmony_ci *  should not free it yourself.  It is guaranteed to be valid only until the
2445b877906bSopenharmony_ci *  next error occurs or the library is terminated.
2446b877906bSopenharmony_ci *
2447b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2448b877906bSopenharmony_ci *
2449b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
2450b877906bSopenharmony_ci *
2451b877906bSopenharmony_ci *  @sa @ref error_handling
2452b877906bSopenharmony_ci *  @sa @ref glfwSetErrorCallback
2453b877906bSopenharmony_ci *
2454b877906bSopenharmony_ci *  @since Added in version 3.3.
2455b877906bSopenharmony_ci *
2456b877906bSopenharmony_ci *  @ingroup init
2457b877906bSopenharmony_ci */
2458b877906bSopenharmony_ciGLFWAPI int glfwGetError(const char** description);
2459b877906bSopenharmony_ci
2460b877906bSopenharmony_ci/*! @brief Sets the error callback.
2461b877906bSopenharmony_ci *
2462b877906bSopenharmony_ci *  This function sets the error callback, which is called with an error code
2463b877906bSopenharmony_ci *  and a human-readable description each time a GLFW error occurs.
2464b877906bSopenharmony_ci *
2465b877906bSopenharmony_ci *  The error code is set before the callback is called.  Calling @ref
2466b877906bSopenharmony_ci *  glfwGetError from the error callback will return the same value as the error
2467b877906bSopenharmony_ci *  code argument.
2468b877906bSopenharmony_ci *
2469b877906bSopenharmony_ci *  The error callback is called on the thread where the error occurred.  If you
2470b877906bSopenharmony_ci *  are using GLFW from multiple threads, your error callback needs to be
2471b877906bSopenharmony_ci *  written accordingly.
2472b877906bSopenharmony_ci *
2473b877906bSopenharmony_ci *  Because the description string may have been generated specifically for that
2474b877906bSopenharmony_ci *  error, it is not guaranteed to be valid after the callback has returned.  If
2475b877906bSopenharmony_ci *  you wish to use it after the callback returns, you need to make a copy.
2476b877906bSopenharmony_ci *
2477b877906bSopenharmony_ci *  Once set, the error callback remains set even after the library has been
2478b877906bSopenharmony_ci *  terminated.
2479b877906bSopenharmony_ci *
2480b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
2481b877906bSopenharmony_ci *  callback.
2482b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set.
2483b877906bSopenharmony_ci *
2484b877906bSopenharmony_ci *  @callback_signature
2485b877906bSopenharmony_ci *  @code
2486b877906bSopenharmony_ci *  void callback_name(int error_code, const char* description)
2487b877906bSopenharmony_ci *  @endcode
2488b877906bSopenharmony_ci *  For more information about the callback parameters, see the
2489b877906bSopenharmony_ci *  [callback pointer type](@ref GLFWerrorfun).
2490b877906bSopenharmony_ci *
2491b877906bSopenharmony_ci *  @errors None.
2492b877906bSopenharmony_ci *
2493b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2494b877906bSopenharmony_ci *
2495b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2496b877906bSopenharmony_ci *
2497b877906bSopenharmony_ci *  @sa @ref error_handling
2498b877906bSopenharmony_ci *  @sa @ref glfwGetError
2499b877906bSopenharmony_ci *
2500b877906bSopenharmony_ci *  @since Added in version 3.0.
2501b877906bSopenharmony_ci *
2502b877906bSopenharmony_ci *  @ingroup init
2503b877906bSopenharmony_ci */
2504b877906bSopenharmony_ciGLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
2505b877906bSopenharmony_ci
2506b877906bSopenharmony_ci/*! @brief Returns the currently selected platform.
2507b877906bSopenharmony_ci *
2508b877906bSopenharmony_ci *  This function returns the platform that was selected during initialization.  The
2509b877906bSopenharmony_ci *  returned value will be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
2510b877906bSopenharmony_ci *  `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`.
2511b877906bSopenharmony_ci *
2512b877906bSopenharmony_ci *  @return The currently selected platform, or zero if an error occurred.
2513b877906bSopenharmony_ci *
2514b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2515b877906bSopenharmony_ci *
2516b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
2517b877906bSopenharmony_ci *
2518b877906bSopenharmony_ci *  @sa @ref platform
2519b877906bSopenharmony_ci *  @sa @ref glfwPlatformSupported
2520b877906bSopenharmony_ci *
2521b877906bSopenharmony_ci *  @since Added in version 3.4.
2522b877906bSopenharmony_ci *
2523b877906bSopenharmony_ci *  @ingroup init
2524b877906bSopenharmony_ci */
2525b877906bSopenharmony_ciGLFWAPI int glfwGetPlatform(void);
2526b877906bSopenharmony_ci
2527b877906bSopenharmony_ci/*! @brief Returns whether the library includes support for the specified platform.
2528b877906bSopenharmony_ci *
2529b877906bSopenharmony_ci *  This function returns whether the library was compiled with support for the specified
2530b877906bSopenharmony_ci *  platform.  The platform must be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
2531b877906bSopenharmony_ci *  `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`.
2532b877906bSopenharmony_ci *
2533b877906bSopenharmony_ci *  @param[in] platform The platform to query.
2534b877906bSopenharmony_ci *  @return `GLFW_TRUE` if the platform is supported, or `GLFW_FALSE` otherwise.
2535b877906bSopenharmony_ci *
2536b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_INVALID_ENUM.
2537b877906bSopenharmony_ci *
2538b877906bSopenharmony_ci *  @remark This function may be called before @ref glfwInit.
2539b877906bSopenharmony_ci *
2540b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
2541b877906bSopenharmony_ci *
2542b877906bSopenharmony_ci *  @sa @ref platform
2543b877906bSopenharmony_ci *  @sa @ref glfwGetPlatform
2544b877906bSopenharmony_ci *
2545b877906bSopenharmony_ci *  @since Added in version 3.4.
2546b877906bSopenharmony_ci *
2547b877906bSopenharmony_ci *  @ingroup init
2548b877906bSopenharmony_ci */
2549b877906bSopenharmony_ciGLFWAPI int glfwPlatformSupported(int platform);
2550b877906bSopenharmony_ci
2551b877906bSopenharmony_ci/*! @brief Returns the currently connected monitors.
2552b877906bSopenharmony_ci *
2553b877906bSopenharmony_ci *  This function returns an array of handles for all currently connected
2554b877906bSopenharmony_ci *  monitors.  The primary monitor is always first in the returned array.  If no
2555b877906bSopenharmony_ci *  monitors were found, this function returns `NULL`.
2556b877906bSopenharmony_ci *
2557b877906bSopenharmony_ci *  @param[out] count Where to store the number of monitors in the returned
2558b877906bSopenharmony_ci *  array.  This is set to zero if an error occurred.
2559b877906bSopenharmony_ci *  @return An array of monitor handles, or `NULL` if no monitors were found or
2560b877906bSopenharmony_ci *  if an [error](@ref error_handling) occurred.
2561b877906bSopenharmony_ci *
2562b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2563b877906bSopenharmony_ci *
2564b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
2565b877906bSopenharmony_ci *  should not free it yourself.  It is guaranteed to be valid only until the
2566b877906bSopenharmony_ci *  monitor configuration changes or the library is terminated.
2567b877906bSopenharmony_ci *
2568b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2569b877906bSopenharmony_ci *
2570b877906bSopenharmony_ci *  @sa @ref monitor_monitors
2571b877906bSopenharmony_ci *  @sa @ref monitor_event
2572b877906bSopenharmony_ci *  @sa @ref glfwGetPrimaryMonitor
2573b877906bSopenharmony_ci *
2574b877906bSopenharmony_ci *  @since Added in version 3.0.
2575b877906bSopenharmony_ci *
2576b877906bSopenharmony_ci *  @ingroup monitor
2577b877906bSopenharmony_ci */
2578b877906bSopenharmony_ciGLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
2579b877906bSopenharmony_ci
2580b877906bSopenharmony_ci/*! @brief Returns the primary monitor.
2581b877906bSopenharmony_ci *
2582b877906bSopenharmony_ci *  This function returns the primary monitor.  This is usually the monitor
2583b877906bSopenharmony_ci *  where elements like the task bar or global menu bar are located.
2584b877906bSopenharmony_ci *
2585b877906bSopenharmony_ci *  @return The primary monitor, or `NULL` if no monitors were found or if an
2586b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2587b877906bSopenharmony_ci *
2588b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2589b877906bSopenharmony_ci *
2590b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2591b877906bSopenharmony_ci *
2592b877906bSopenharmony_ci *  @remark The primary monitor is always first in the array returned by @ref
2593b877906bSopenharmony_ci *  glfwGetMonitors.
2594b877906bSopenharmony_ci *
2595b877906bSopenharmony_ci *  @sa @ref monitor_monitors
2596b877906bSopenharmony_ci *  @sa @ref glfwGetMonitors
2597b877906bSopenharmony_ci *
2598b877906bSopenharmony_ci *  @since Added in version 3.0.
2599b877906bSopenharmony_ci *
2600b877906bSopenharmony_ci *  @ingroup monitor
2601b877906bSopenharmony_ci */
2602b877906bSopenharmony_ciGLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
2603b877906bSopenharmony_ci
2604b877906bSopenharmony_ci/*! @brief Returns the position of the monitor's viewport on the virtual screen.
2605b877906bSopenharmony_ci *
2606b877906bSopenharmony_ci *  This function returns the position, in screen coordinates, of the upper-left
2607b877906bSopenharmony_ci *  corner of the specified monitor.
2608b877906bSopenharmony_ci *
2609b877906bSopenharmony_ci *  Any or all of the position arguments may be `NULL`.  If an error occurs, all
2610b877906bSopenharmony_ci *  non-`NULL` position arguments will be set to zero.
2611b877906bSopenharmony_ci *
2612b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2613b877906bSopenharmony_ci *  @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
2614b877906bSopenharmony_ci *  @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
2615b877906bSopenharmony_ci *
2616b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
2617b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2618b877906bSopenharmony_ci *
2619b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2620b877906bSopenharmony_ci *
2621b877906bSopenharmony_ci *  @sa @ref monitor_properties
2622b877906bSopenharmony_ci *
2623b877906bSopenharmony_ci *  @since Added in version 3.0.
2624b877906bSopenharmony_ci *
2625b877906bSopenharmony_ci *  @ingroup monitor
2626b877906bSopenharmony_ci */
2627b877906bSopenharmony_ciGLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
2628b877906bSopenharmony_ci
2629b877906bSopenharmony_ci/*! @brief Retrieves the work area of the monitor.
2630b877906bSopenharmony_ci *
2631b877906bSopenharmony_ci *  This function returns the position, in screen coordinates, of the upper-left
2632b877906bSopenharmony_ci *  corner of the work area of the specified monitor along with the work area
2633b877906bSopenharmony_ci *  size in screen coordinates. The work area is defined as the area of the
2634b877906bSopenharmony_ci *  monitor not occluded by the window system task bar where present. If no
2635b877906bSopenharmony_ci *  task bar exists then the work area is the monitor resolution in screen
2636b877906bSopenharmony_ci *  coordinates.
2637b877906bSopenharmony_ci *
2638b877906bSopenharmony_ci *  Any or all of the position and size arguments may be `NULL`.  If an error
2639b877906bSopenharmony_ci *  occurs, all non-`NULL` position and size arguments will be set to zero.
2640b877906bSopenharmony_ci *
2641b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2642b877906bSopenharmony_ci *  @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
2643b877906bSopenharmony_ci *  @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
2644b877906bSopenharmony_ci *  @param[out] width Where to store the monitor width, or `NULL`.
2645b877906bSopenharmony_ci *  @param[out] height Where to store the monitor height, or `NULL`.
2646b877906bSopenharmony_ci *
2647b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
2648b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2649b877906bSopenharmony_ci *
2650b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2651b877906bSopenharmony_ci *
2652b877906bSopenharmony_ci *  @sa @ref monitor_workarea
2653b877906bSopenharmony_ci *
2654b877906bSopenharmony_ci *  @since Added in version 3.3.
2655b877906bSopenharmony_ci *
2656b877906bSopenharmony_ci *  @ingroup monitor
2657b877906bSopenharmony_ci */
2658b877906bSopenharmony_ciGLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
2659b877906bSopenharmony_ci
2660b877906bSopenharmony_ci/*! @brief Returns the physical size of the monitor.
2661b877906bSopenharmony_ci *
2662b877906bSopenharmony_ci *  This function returns the size, in millimetres, of the display area of the
2663b877906bSopenharmony_ci *  specified monitor.
2664b877906bSopenharmony_ci *
2665b877906bSopenharmony_ci *  Some platforms do not provide accurate monitor size information, either
2666b877906bSopenharmony_ci *  because the monitor [EDID][] data is incorrect or because the driver does
2667b877906bSopenharmony_ci *  not report it accurately.
2668b877906bSopenharmony_ci *
2669b877906bSopenharmony_ci *  [EDID]: https://en.wikipedia.org/wiki/Extended_display_identification_data
2670b877906bSopenharmony_ci *
2671b877906bSopenharmony_ci *  Any or all of the size arguments may be `NULL`.  If an error occurs, all
2672b877906bSopenharmony_ci *  non-`NULL` size arguments will be set to zero.
2673b877906bSopenharmony_ci *
2674b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2675b877906bSopenharmony_ci *  @param[out] widthMM Where to store the width, in millimetres, of the
2676b877906bSopenharmony_ci *  monitor's display area, or `NULL`.
2677b877906bSopenharmony_ci *  @param[out] heightMM Where to store the height, in millimetres, of the
2678b877906bSopenharmony_ci *  monitor's display area, or `NULL`.
2679b877906bSopenharmony_ci *
2680b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2681b877906bSopenharmony_ci *
2682b877906bSopenharmony_ci *  @remark @win32 On Windows 8 and earlier the physical size is calculated from
2683b877906bSopenharmony_ci *  the current resolution and system DPI instead of querying the monitor EDID data.
2684b877906bSopenharmony_ci *
2685b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2686b877906bSopenharmony_ci *
2687b877906bSopenharmony_ci *  @sa @ref monitor_properties
2688b877906bSopenharmony_ci *
2689b877906bSopenharmony_ci *  @since Added in version 3.0.
2690b877906bSopenharmony_ci *
2691b877906bSopenharmony_ci *  @ingroup monitor
2692b877906bSopenharmony_ci */
2693b877906bSopenharmony_ciGLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);
2694b877906bSopenharmony_ci
2695b877906bSopenharmony_ci/*! @brief Retrieves the content scale for the specified monitor.
2696b877906bSopenharmony_ci *
2697b877906bSopenharmony_ci *  This function retrieves the content scale for the specified monitor.  The
2698b877906bSopenharmony_ci *  content scale is the ratio between the current DPI and the platform's
2699b877906bSopenharmony_ci *  default DPI.  This is especially important for text and any UI elements.  If
2700b877906bSopenharmony_ci *  the pixel dimensions of your UI scaled by this look appropriate on your
2701b877906bSopenharmony_ci *  machine then it should appear at a reasonable size on other machines
2702b877906bSopenharmony_ci *  regardless of their DPI and scaling settings.  This relies on the system DPI
2703b877906bSopenharmony_ci *  and scaling settings being somewhat correct.
2704b877906bSopenharmony_ci *
2705b877906bSopenharmony_ci *  The content scale may depend on both the monitor resolution and pixel
2706b877906bSopenharmony_ci *  density and on user settings.  It may be very different from the raw DPI
2707b877906bSopenharmony_ci *  calculated from the physical size and current resolution.
2708b877906bSopenharmony_ci *
2709b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2710b877906bSopenharmony_ci *  @param[out] xscale Where to store the x-axis content scale, or `NULL`.
2711b877906bSopenharmony_ci *  @param[out] yscale Where to store the y-axis content scale, or `NULL`.
2712b877906bSopenharmony_ci *
2713b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
2714b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2715b877906bSopenharmony_ci *
2716b877906bSopenharmony_ci *  @remark @wayland Fractional scaling information is not yet available for
2717b877906bSopenharmony_ci *  monitors, so this function only returns integer content scales.
2718b877906bSopenharmony_ci *
2719b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2720b877906bSopenharmony_ci *
2721b877906bSopenharmony_ci *  @sa @ref monitor_scale
2722b877906bSopenharmony_ci *  @sa @ref glfwGetWindowContentScale
2723b877906bSopenharmony_ci *
2724b877906bSopenharmony_ci *  @since Added in version 3.3.
2725b877906bSopenharmony_ci *
2726b877906bSopenharmony_ci *  @ingroup monitor
2727b877906bSopenharmony_ci */
2728b877906bSopenharmony_ciGLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale);
2729b877906bSopenharmony_ci
2730b877906bSopenharmony_ci/*! @brief Returns the name of the specified monitor.
2731b877906bSopenharmony_ci *
2732b877906bSopenharmony_ci *  This function returns a human-readable name, encoded as UTF-8, of the
2733b877906bSopenharmony_ci *  specified monitor.  The name typically reflects the make and model of the
2734b877906bSopenharmony_ci *  monitor and is not guaranteed to be unique among the connected monitors.
2735b877906bSopenharmony_ci *
2736b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2737b877906bSopenharmony_ci *  @return The UTF-8 encoded name of the monitor, or `NULL` if an
2738b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2739b877906bSopenharmony_ci *
2740b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2741b877906bSopenharmony_ci *
2742b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
2743b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified monitor is
2744b877906bSopenharmony_ci *  disconnected or the library is terminated.
2745b877906bSopenharmony_ci *
2746b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2747b877906bSopenharmony_ci *
2748b877906bSopenharmony_ci *  @sa @ref monitor_properties
2749b877906bSopenharmony_ci *
2750b877906bSopenharmony_ci *  @since Added in version 3.0.
2751b877906bSopenharmony_ci *
2752b877906bSopenharmony_ci *  @ingroup monitor
2753b877906bSopenharmony_ci */
2754b877906bSopenharmony_ciGLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
2755b877906bSopenharmony_ci
2756b877906bSopenharmony_ci/*! @brief Sets the user pointer of the specified monitor.
2757b877906bSopenharmony_ci *
2758b877906bSopenharmony_ci *  This function sets the user-defined pointer of the specified monitor.  The
2759b877906bSopenharmony_ci *  current value is retained until the monitor is disconnected.  The initial
2760b877906bSopenharmony_ci *  value is `NULL`.
2761b877906bSopenharmony_ci *
2762b877906bSopenharmony_ci *  This function may be called from the monitor callback, even for a monitor
2763b877906bSopenharmony_ci *  that is being disconnected.
2764b877906bSopenharmony_ci *
2765b877906bSopenharmony_ci *  @param[in] monitor The monitor whose pointer to set.
2766b877906bSopenharmony_ci *  @param[in] pointer The new value.
2767b877906bSopenharmony_ci *
2768b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2769b877906bSopenharmony_ci *
2770b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
2771b877906bSopenharmony_ci *  synchronized.
2772b877906bSopenharmony_ci *
2773b877906bSopenharmony_ci *  @sa @ref monitor_userptr
2774b877906bSopenharmony_ci *  @sa @ref glfwGetMonitorUserPointer
2775b877906bSopenharmony_ci *
2776b877906bSopenharmony_ci *  @since Added in version 3.3.
2777b877906bSopenharmony_ci *
2778b877906bSopenharmony_ci *  @ingroup monitor
2779b877906bSopenharmony_ci */
2780b877906bSopenharmony_ciGLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
2781b877906bSopenharmony_ci
2782b877906bSopenharmony_ci/*! @brief Returns the user pointer of the specified monitor.
2783b877906bSopenharmony_ci *
2784b877906bSopenharmony_ci *  This function returns the current value of the user-defined pointer of the
2785b877906bSopenharmony_ci *  specified monitor.  The initial value is `NULL`.
2786b877906bSopenharmony_ci *
2787b877906bSopenharmony_ci *  This function may be called from the monitor callback, even for a monitor
2788b877906bSopenharmony_ci *  that is being disconnected.
2789b877906bSopenharmony_ci *
2790b877906bSopenharmony_ci *  @param[in] monitor The monitor whose pointer to return.
2791b877906bSopenharmony_ci *
2792b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2793b877906bSopenharmony_ci *
2794b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
2795b877906bSopenharmony_ci *  synchronized.
2796b877906bSopenharmony_ci *
2797b877906bSopenharmony_ci *  @sa @ref monitor_userptr
2798b877906bSopenharmony_ci *  @sa @ref glfwSetMonitorUserPointer
2799b877906bSopenharmony_ci *
2800b877906bSopenharmony_ci *  @since Added in version 3.3.
2801b877906bSopenharmony_ci *
2802b877906bSopenharmony_ci *  @ingroup monitor
2803b877906bSopenharmony_ci */
2804b877906bSopenharmony_ciGLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
2805b877906bSopenharmony_ci
2806b877906bSopenharmony_ci/*! @brief Sets the monitor configuration callback.
2807b877906bSopenharmony_ci *
2808b877906bSopenharmony_ci *  This function sets the monitor configuration callback, or removes the
2809b877906bSopenharmony_ci *  currently set callback.  This is called when a monitor is connected to or
2810b877906bSopenharmony_ci *  disconnected from the system.
2811b877906bSopenharmony_ci *
2812b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
2813b877906bSopenharmony_ci *  callback.
2814b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
2815b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
2816b877906bSopenharmony_ci *
2817b877906bSopenharmony_ci *  @callback_signature
2818b877906bSopenharmony_ci *  @code
2819b877906bSopenharmony_ci *  void function_name(GLFWmonitor* monitor, int event)
2820b877906bSopenharmony_ci *  @endcode
2821b877906bSopenharmony_ci *  For more information about the callback parameters, see the
2822b877906bSopenharmony_ci *  [function pointer type](@ref GLFWmonitorfun).
2823b877906bSopenharmony_ci *
2824b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
2825b877906bSopenharmony_ci *
2826b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2827b877906bSopenharmony_ci *
2828b877906bSopenharmony_ci *  @sa @ref monitor_event
2829b877906bSopenharmony_ci *
2830b877906bSopenharmony_ci *  @since Added in version 3.0.
2831b877906bSopenharmony_ci *
2832b877906bSopenharmony_ci *  @ingroup monitor
2833b877906bSopenharmony_ci */
2834b877906bSopenharmony_ciGLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
2835b877906bSopenharmony_ci
2836b877906bSopenharmony_ci/*! @brief Returns the available video modes for the specified monitor.
2837b877906bSopenharmony_ci *
2838b877906bSopenharmony_ci *  This function returns an array of all video modes supported by the specified
2839b877906bSopenharmony_ci *  monitor.  The returned array is sorted in ascending order, first by color
2840b877906bSopenharmony_ci *  bit depth (the sum of all channel depths), then by resolution area (the
2841b877906bSopenharmony_ci *  product of width and height), then resolution width and finally by refresh
2842b877906bSopenharmony_ci *  rate.
2843b877906bSopenharmony_ci *
2844b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2845b877906bSopenharmony_ci *  @param[out] count Where to store the number of video modes in the returned
2846b877906bSopenharmony_ci *  array.  This is set to zero if an error occurred.
2847b877906bSopenharmony_ci *  @return An array of video modes, or `NULL` if an
2848b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2849b877906bSopenharmony_ci *
2850b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
2851b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2852b877906bSopenharmony_ci *
2853b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
2854b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified monitor is
2855b877906bSopenharmony_ci *  disconnected, this function is called again for that monitor or the library
2856b877906bSopenharmony_ci *  is terminated.
2857b877906bSopenharmony_ci *
2858b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2859b877906bSopenharmony_ci *
2860b877906bSopenharmony_ci *  @sa @ref monitor_modes
2861b877906bSopenharmony_ci *  @sa @ref glfwGetVideoMode
2862b877906bSopenharmony_ci *
2863b877906bSopenharmony_ci *  @since Added in version 1.0.
2864b877906bSopenharmony_ci *  @glfw3 Changed to return an array of modes for a specific monitor.
2865b877906bSopenharmony_ci *
2866b877906bSopenharmony_ci *  @ingroup monitor
2867b877906bSopenharmony_ci */
2868b877906bSopenharmony_ciGLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
2869b877906bSopenharmony_ci
2870b877906bSopenharmony_ci/*! @brief Returns the current mode of the specified monitor.
2871b877906bSopenharmony_ci *
2872b877906bSopenharmony_ci *  This function returns the current video mode of the specified monitor.  If
2873b877906bSopenharmony_ci *  you have created a full screen window for that monitor, the return value
2874b877906bSopenharmony_ci *  will depend on whether that window is iconified.
2875b877906bSopenharmony_ci *
2876b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2877b877906bSopenharmony_ci *  @return The current mode of the monitor, or `NULL` if an
2878b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2879b877906bSopenharmony_ci *
2880b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
2881b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
2882b877906bSopenharmony_ci *
2883b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
2884b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified monitor is
2885b877906bSopenharmony_ci *  disconnected or the library is terminated.
2886b877906bSopenharmony_ci *
2887b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2888b877906bSopenharmony_ci *
2889b877906bSopenharmony_ci *  @sa @ref monitor_modes
2890b877906bSopenharmony_ci *  @sa @ref glfwGetVideoModes
2891b877906bSopenharmony_ci *
2892b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwGetDesktopMode`.
2893b877906bSopenharmony_ci *
2894b877906bSopenharmony_ci *  @ingroup monitor
2895b877906bSopenharmony_ci */
2896b877906bSopenharmony_ciGLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
2897b877906bSopenharmony_ci
2898b877906bSopenharmony_ci/*! @brief Generates a gamma ramp and sets it for the specified monitor.
2899b877906bSopenharmony_ci *
2900b877906bSopenharmony_ci *  This function generates an appropriately sized gamma ramp from the specified
2901b877906bSopenharmony_ci *  exponent and then calls @ref glfwSetGammaRamp with it.  The value must be
2902b877906bSopenharmony_ci *  a finite number greater than zero.
2903b877906bSopenharmony_ci *
2904b877906bSopenharmony_ci *  The software controlled gamma ramp is applied _in addition_ to the hardware
2905b877906bSopenharmony_ci *  gamma correction, which today is usually an approximation of sRGB gamma.
2906b877906bSopenharmony_ci *  This means that setting a perfectly linear ramp, or gamma 1.0, will produce
2907b877906bSopenharmony_ci *  the default (usually sRGB-like) behavior.
2908b877906bSopenharmony_ci *
2909b877906bSopenharmony_ci *  For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
2910b877906bSopenharmony_ci *  GLFW_SRGB_CAPABLE hint.
2911b877906bSopenharmony_ci *
2912b877906bSopenharmony_ci *  @param[in] monitor The monitor whose gamma ramp to set.
2913b877906bSopenharmony_ci *  @param[in] gamma The desired exponent.
2914b877906bSopenharmony_ci *
2915b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_VALUE,
2916b877906bSopenharmony_ci *  @ref GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
2917b877906bSopenharmony_ci *
2918b877906bSopenharmony_ci *  @remark @wayland Gamma handling is a privileged protocol, this function
2919b877906bSopenharmony_ci *  will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.
2920b877906bSopenharmony_ci *
2921b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2922b877906bSopenharmony_ci *
2923b877906bSopenharmony_ci *  @sa @ref monitor_gamma
2924b877906bSopenharmony_ci *
2925b877906bSopenharmony_ci *  @since Added in version 3.0.
2926b877906bSopenharmony_ci *
2927b877906bSopenharmony_ci *  @ingroup monitor
2928b877906bSopenharmony_ci */
2929b877906bSopenharmony_ciGLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
2930b877906bSopenharmony_ci
2931b877906bSopenharmony_ci/*! @brief Returns the current gamma ramp for the specified monitor.
2932b877906bSopenharmony_ci *
2933b877906bSopenharmony_ci *  This function returns the current gamma ramp of the specified monitor.
2934b877906bSopenharmony_ci *
2935b877906bSopenharmony_ci *  @param[in] monitor The monitor to query.
2936b877906bSopenharmony_ci *  @return The current gamma ramp, or `NULL` if an
2937b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
2938b877906bSopenharmony_ci *
2939b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR
2940b877906bSopenharmony_ci *  and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
2941b877906bSopenharmony_ci *
2942b877906bSopenharmony_ci *  @remark @wayland Gamma handling is a privileged protocol, this function
2943b877906bSopenharmony_ci *  will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE while
2944b877906bSopenharmony_ci *  returning `NULL`.
2945b877906bSopenharmony_ci *
2946b877906bSopenharmony_ci *  @pointer_lifetime The returned structure and its arrays are allocated and
2947b877906bSopenharmony_ci *  freed by GLFW.  You should not free them yourself.  They are valid until the
2948b877906bSopenharmony_ci *  specified monitor is disconnected, this function is called again for that
2949b877906bSopenharmony_ci *  monitor or the library is terminated.
2950b877906bSopenharmony_ci *
2951b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2952b877906bSopenharmony_ci *
2953b877906bSopenharmony_ci *  @sa @ref monitor_gamma
2954b877906bSopenharmony_ci *
2955b877906bSopenharmony_ci *  @since Added in version 3.0.
2956b877906bSopenharmony_ci *
2957b877906bSopenharmony_ci *  @ingroup monitor
2958b877906bSopenharmony_ci */
2959b877906bSopenharmony_ciGLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
2960b877906bSopenharmony_ci
2961b877906bSopenharmony_ci/*! @brief Sets the current gamma ramp for the specified monitor.
2962b877906bSopenharmony_ci *
2963b877906bSopenharmony_ci *  This function sets the current gamma ramp for the specified monitor.  The
2964b877906bSopenharmony_ci *  original gamma ramp for that monitor is saved by GLFW the first time this
2965b877906bSopenharmony_ci *  function is called and is restored by @ref glfwTerminate.
2966b877906bSopenharmony_ci *
2967b877906bSopenharmony_ci *  The software controlled gamma ramp is applied _in addition_ to the hardware
2968b877906bSopenharmony_ci *  gamma correction, which today is usually an approximation of sRGB gamma.
2969b877906bSopenharmony_ci *  This means that setting a perfectly linear ramp, or gamma 1.0, will produce
2970b877906bSopenharmony_ci *  the default (usually sRGB-like) behavior.
2971b877906bSopenharmony_ci *
2972b877906bSopenharmony_ci *  For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
2973b877906bSopenharmony_ci *  GLFW_SRGB_CAPABLE hint.
2974b877906bSopenharmony_ci *
2975b877906bSopenharmony_ci *  @param[in] monitor The monitor whose gamma ramp to set.
2976b877906bSopenharmony_ci *  @param[in] ramp The gamma ramp to use.
2977b877906bSopenharmony_ci *
2978b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR
2979b877906bSopenharmony_ci *  and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
2980b877906bSopenharmony_ci *
2981b877906bSopenharmony_ci *  @remark The size of the specified gamma ramp should match the size of the
2982b877906bSopenharmony_ci *  current ramp for that monitor.
2983b877906bSopenharmony_ci *
2984b877906bSopenharmony_ci *  @remark @win32 The gamma ramp size must be 256.
2985b877906bSopenharmony_ci *
2986b877906bSopenharmony_ci *  @remark @wayland Gamma handling is a privileged protocol, this function
2987b877906bSopenharmony_ci *  will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.
2988b877906bSopenharmony_ci *
2989b877906bSopenharmony_ci *  @pointer_lifetime The specified gamma ramp is copied before this function
2990b877906bSopenharmony_ci *  returns.
2991b877906bSopenharmony_ci *
2992b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
2993b877906bSopenharmony_ci *
2994b877906bSopenharmony_ci *  @sa @ref monitor_gamma
2995b877906bSopenharmony_ci *
2996b877906bSopenharmony_ci *  @since Added in version 3.0.
2997b877906bSopenharmony_ci *
2998b877906bSopenharmony_ci *  @ingroup monitor
2999b877906bSopenharmony_ci */
3000b877906bSopenharmony_ciGLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
3001b877906bSopenharmony_ci
3002b877906bSopenharmony_ci/*! @brief Resets all window hints to their default values.
3003b877906bSopenharmony_ci *
3004b877906bSopenharmony_ci *  This function resets all window hints to their
3005b877906bSopenharmony_ci *  [default values](@ref window_hints_values).
3006b877906bSopenharmony_ci *
3007b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
3008b877906bSopenharmony_ci *
3009b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3010b877906bSopenharmony_ci *
3011b877906bSopenharmony_ci *  @sa @ref window_hints
3012b877906bSopenharmony_ci *  @sa @ref glfwWindowHint
3013b877906bSopenharmony_ci *  @sa @ref glfwWindowHintString
3014b877906bSopenharmony_ci *
3015b877906bSopenharmony_ci *  @since Added in version 3.0.
3016b877906bSopenharmony_ci *
3017b877906bSopenharmony_ci *  @ingroup window
3018b877906bSopenharmony_ci */
3019b877906bSopenharmony_ciGLFWAPI void glfwDefaultWindowHints(void);
3020b877906bSopenharmony_ci
3021b877906bSopenharmony_ci/*! @brief Sets the specified window hint to the desired value.
3022b877906bSopenharmony_ci *
3023b877906bSopenharmony_ci *  This function sets hints for the next call to @ref glfwCreateWindow.  The
3024b877906bSopenharmony_ci *  hints, once set, retain their values until changed by a call to this
3025b877906bSopenharmony_ci *  function or @ref glfwDefaultWindowHints, or until the library is terminated.
3026b877906bSopenharmony_ci *
3027b877906bSopenharmony_ci *  Only integer value hints can be set with this function.  String value hints
3028b877906bSopenharmony_ci *  are set with @ref glfwWindowHintString.
3029b877906bSopenharmony_ci *
3030b877906bSopenharmony_ci *  This function does not check whether the specified hint values are valid.
3031b877906bSopenharmony_ci *  If you set hints to invalid values this will instead be reported by the next
3032b877906bSopenharmony_ci *  call to @ref glfwCreateWindow.
3033b877906bSopenharmony_ci *
3034b877906bSopenharmony_ci *  Some hints are platform specific.  These may be set on any platform but they
3035b877906bSopenharmony_ci *  will only affect their specific platform.  Other platforms will ignore them.
3036b877906bSopenharmony_ci *  Setting these hints requires no platform specific headers or functions.
3037b877906bSopenharmony_ci *
3038b877906bSopenharmony_ci *  @param[in] hint The [window hint](@ref window_hints) to set.
3039b877906bSopenharmony_ci *  @param[in] value The new value of the window hint.
3040b877906bSopenharmony_ci *
3041b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3042b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
3043b877906bSopenharmony_ci *
3044b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3045b877906bSopenharmony_ci *
3046b877906bSopenharmony_ci *  @sa @ref window_hints
3047b877906bSopenharmony_ci *  @sa @ref glfwWindowHintString
3048b877906bSopenharmony_ci *  @sa @ref glfwDefaultWindowHints
3049b877906bSopenharmony_ci *
3050b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwOpenWindowHint`.
3051b877906bSopenharmony_ci *
3052b877906bSopenharmony_ci *  @ingroup window
3053b877906bSopenharmony_ci */
3054b877906bSopenharmony_ciGLFWAPI void glfwWindowHint(int hint, int value);
3055b877906bSopenharmony_ci
3056b877906bSopenharmony_ci/*! @brief Sets the specified window hint to the desired value.
3057b877906bSopenharmony_ci *
3058b877906bSopenharmony_ci *  This function sets hints for the next call to @ref glfwCreateWindow.  The
3059b877906bSopenharmony_ci *  hints, once set, retain their values until changed by a call to this
3060b877906bSopenharmony_ci *  function or @ref glfwDefaultWindowHints, or until the library is terminated.
3061b877906bSopenharmony_ci *
3062b877906bSopenharmony_ci *  Only string type hints can be set with this function.  Integer value hints
3063b877906bSopenharmony_ci *  are set with @ref glfwWindowHint.
3064b877906bSopenharmony_ci *
3065b877906bSopenharmony_ci *  This function does not check whether the specified hint values are valid.
3066b877906bSopenharmony_ci *  If you set hints to invalid values this will instead be reported by the next
3067b877906bSopenharmony_ci *  call to @ref glfwCreateWindow.
3068b877906bSopenharmony_ci *
3069b877906bSopenharmony_ci *  Some hints are platform specific.  These may be set on any platform but they
3070b877906bSopenharmony_ci *  will only affect their specific platform.  Other platforms will ignore them.
3071b877906bSopenharmony_ci *  Setting these hints requires no platform specific headers or functions.
3072b877906bSopenharmony_ci *
3073b877906bSopenharmony_ci *  @param[in] hint The [window hint](@ref window_hints) to set.
3074b877906bSopenharmony_ci *  @param[in] value The new value of the window hint.
3075b877906bSopenharmony_ci *
3076b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3077b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
3078b877906bSopenharmony_ci *
3079b877906bSopenharmony_ci *  @pointer_lifetime The specified string is copied before this function
3080b877906bSopenharmony_ci *  returns.
3081b877906bSopenharmony_ci *
3082b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3083b877906bSopenharmony_ci *
3084b877906bSopenharmony_ci *  @sa @ref window_hints
3085b877906bSopenharmony_ci *  @sa @ref glfwWindowHint
3086b877906bSopenharmony_ci *  @sa @ref glfwDefaultWindowHints
3087b877906bSopenharmony_ci *
3088b877906bSopenharmony_ci *  @since Added in version 3.3.
3089b877906bSopenharmony_ci *
3090b877906bSopenharmony_ci *  @ingroup window
3091b877906bSopenharmony_ci */
3092b877906bSopenharmony_ciGLFWAPI void glfwWindowHintString(int hint, const char* value);
3093b877906bSopenharmony_ci
3094b877906bSopenharmony_ci/*! @brief Creates a window and its associated context.
3095b877906bSopenharmony_ci *
3096b877906bSopenharmony_ci *  This function creates a window and its associated OpenGL or OpenGL ES
3097b877906bSopenharmony_ci *  context.  Most of the options controlling how the window and its context
3098b877906bSopenharmony_ci *  should be created are specified with [window hints](@ref window_hints).
3099b877906bSopenharmony_ci *
3100b877906bSopenharmony_ci *  Successful creation does not change which context is current.  Before you
3101b877906bSopenharmony_ci *  can use the newly created context, you need to
3102b877906bSopenharmony_ci *  [make it current](@ref context_current).  For information about the `share`
3103b877906bSopenharmony_ci *  parameter, see @ref context_sharing.
3104b877906bSopenharmony_ci *
3105b877906bSopenharmony_ci *  The created window, framebuffer and context may differ from what you
3106b877906bSopenharmony_ci *  requested, as not all parameters and hints are
3107b877906bSopenharmony_ci *  [hard constraints](@ref window_hints_hard).  This includes the size of the
3108b877906bSopenharmony_ci *  window, especially for full screen windows.  To query the actual attributes
3109b877906bSopenharmony_ci *  of the created window, framebuffer and context, see @ref
3110b877906bSopenharmony_ci *  glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.
3111b877906bSopenharmony_ci *
3112b877906bSopenharmony_ci *  To create a full screen window, you need to specify the monitor the window
3113b877906bSopenharmony_ci *  will cover.  If no monitor is specified, the window will be windowed mode.
3114b877906bSopenharmony_ci *  Unless you have a way for the user to choose a specific monitor, it is
3115b877906bSopenharmony_ci *  recommended that you pick the primary monitor.  For more information on how
3116b877906bSopenharmony_ci *  to query connected monitors, see @ref monitor_monitors.
3117b877906bSopenharmony_ci *
3118b877906bSopenharmony_ci *  For full screen windows, the specified size becomes the resolution of the
3119b877906bSopenharmony_ci *  window's _desired video mode_.  As long as a full screen window is not
3120b877906bSopenharmony_ci *  iconified, the supported video mode most closely matching the desired video
3121b877906bSopenharmony_ci *  mode is set for the specified monitor.  For more information about full
3122b877906bSopenharmony_ci *  screen windows, including the creation of so called _windowed full screen_
3123b877906bSopenharmony_ci *  or _borderless full screen_ windows, see @ref window_windowed_full_screen.
3124b877906bSopenharmony_ci *
3125b877906bSopenharmony_ci *  Once you have created the window, you can switch it between windowed and
3126b877906bSopenharmony_ci *  full screen mode with @ref glfwSetWindowMonitor.  This will not affect its
3127b877906bSopenharmony_ci *  OpenGL or OpenGL ES context.
3128b877906bSopenharmony_ci *
3129b877906bSopenharmony_ci *  By default, newly created windows use the placement recommended by the
3130b877906bSopenharmony_ci *  window system.  To create the window at a specific position, set the @ref
3131b877906bSopenharmony_ci *  GLFW_POSITION_X and @ref GLFW_POSITION_Y window hints before creation.  To
3132b877906bSopenharmony_ci *  restore the default behavior, set either or both hints back to
3133b877906bSopenharmony_ci *  `GLFW_ANY_POSITION`.
3134b877906bSopenharmony_ci *
3135b877906bSopenharmony_ci *  As long as at least one full screen window is not iconified, the screensaver
3136b877906bSopenharmony_ci *  is prohibited from starting.
3137b877906bSopenharmony_ci *
3138b877906bSopenharmony_ci *  Window systems put limits on window sizes.  Very large or very small window
3139b877906bSopenharmony_ci *  dimensions may be overridden by the window system on creation.  Check the
3140b877906bSopenharmony_ci *  actual [size](@ref window_size) after creation.
3141b877906bSopenharmony_ci *
3142b877906bSopenharmony_ci *  The [swap interval](@ref buffer_swap) is not set during window creation and
3143b877906bSopenharmony_ci *  the initial value may vary depending on driver settings and defaults.
3144b877906bSopenharmony_ci *
3145b877906bSopenharmony_ci *  @param[in] width The desired width, in screen coordinates, of the window.
3146b877906bSopenharmony_ci *  This must be greater than zero.
3147b877906bSopenharmony_ci *  @param[in] height The desired height, in screen coordinates, of the window.
3148b877906bSopenharmony_ci *  This must be greater than zero.
3149b877906bSopenharmony_ci *  @param[in] title The initial, UTF-8 encoded window title.
3150b877906bSopenharmony_ci *  @param[in] monitor The monitor to use for full screen mode, or `NULL` for
3151b877906bSopenharmony_ci *  windowed mode.
3152b877906bSopenharmony_ci *  @param[in] share The window whose context to share resources with, or `NULL`
3153b877906bSopenharmony_ci *  to not share resources.
3154b877906bSopenharmony_ci *  @return The handle of the created window, or `NULL` if an
3155b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
3156b877906bSopenharmony_ci *
3157b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3158b877906bSopenharmony_ci *  GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref
3159b877906bSopenharmony_ci *  GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE, @ref
3160b877906bSopenharmony_ci *  GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
3161b877906bSopenharmony_ci *
3162b877906bSopenharmony_ci *  @remark @win32 Window creation will fail if the Microsoft GDI software
3163b877906bSopenharmony_ci *  OpenGL implementation is the only one available.
3164b877906bSopenharmony_ci *
3165b877906bSopenharmony_ci *  @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it
3166b877906bSopenharmony_ci *  will be set as the initial icon for the window.  If no such icon is present,
3167b877906bSopenharmony_ci *  the `IDI_APPLICATION` icon will be used instead.  To set a different icon,
3168b877906bSopenharmony_ci *  see @ref glfwSetWindowIcon.
3169b877906bSopenharmony_ci *
3170b877906bSopenharmony_ci *  @remark @win32 The context to share resources with must not be current on
3171b877906bSopenharmony_ci *  any other thread.
3172b877906bSopenharmony_ci *
3173b877906bSopenharmony_ci *  @remark @macos The OS only supports core profile contexts for OpenGL
3174b877906bSopenharmony_ci *  versions 3.2 and later.  Before creating an OpenGL context of version 3.2 or
3175b877906bSopenharmony_ci *  later you must set the [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint)
3176b877906bSopenharmony_ci *  hint accordingly.  OpenGL 3.0 and 3.1 contexts are not supported at all
3177b877906bSopenharmony_ci *  on macOS.
3178b877906bSopenharmony_ci *
3179b877906bSopenharmony_ci *  @remark @macos The GLFW window has no icon, as it is not a document
3180b877906bSopenharmony_ci *  window, but the dock icon will be the same as the application bundle's icon.
3181b877906bSopenharmony_ci *  For more information on bundles, see the
3182b877906bSopenharmony_ci *  [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.
3183b877906bSopenharmony_ci *
3184b877906bSopenharmony_ci *  [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/
3185b877906bSopenharmony_ci *
3186b877906bSopenharmony_ci *  @remark @macos The window frame will not be rendered at full resolution on
3187b877906bSopenharmony_ci *  Retina displays unless the
3188b877906bSopenharmony_ci *  [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint)
3189b877906bSopenharmony_ci *  hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the
3190b877906bSopenharmony_ci *  application bundle's `Info.plist`.  For more information, see
3191b877906bSopenharmony_ci *  [High Resolution Guidelines for OS X][hidpi-guide] in the Mac Developer
3192b877906bSopenharmony_ci *  Library.  The GLFW test and example programs use a custom `Info.plist`
3193b877906bSopenharmony_ci *  template for this, which can be found as `CMake/Info.plist.in` in the source
3194b877906bSopenharmony_ci *  tree.
3195b877906bSopenharmony_ci *
3196b877906bSopenharmony_ci *  [hidpi-guide]: https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
3197b877906bSopenharmony_ci *
3198b877906bSopenharmony_ci *  @remark @macos When activating frame autosaving with
3199b877906bSopenharmony_ci *  [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified
3200b877906bSopenharmony_ci *  window size and position may be overridden by previously saved values.
3201b877906bSopenharmony_ci *
3202b877906bSopenharmony_ci *  @remark @wayland GLFW uses [libdecor][] where available to create its window
3203b877906bSopenharmony_ci *  decorations.  This in turn uses server-side XDG decorations where available
3204b877906bSopenharmony_ci *  and provides high quality client-side decorations on compositors like GNOME.
3205b877906bSopenharmony_ci *  If both XDG decorations and libdecor are unavailable, GLFW falls back to
3206b877906bSopenharmony_ci *  a very simple set of window decorations that only support moving, resizing
3207b877906bSopenharmony_ci *  and the window manager's right-click menu.
3208b877906bSopenharmony_ci *
3209b877906bSopenharmony_ci *  [libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor
3210b877906bSopenharmony_ci *
3211b877906bSopenharmony_ci *  @remark @x11 Some window managers will not respect the placement of
3212b877906bSopenharmony_ci *  initially hidden windows.
3213b877906bSopenharmony_ci *
3214b877906bSopenharmony_ci *  @remark @x11 Due to the asynchronous nature of X11, it may take a moment for
3215b877906bSopenharmony_ci *  a window to reach its requested state.  This means you may not be able to
3216b877906bSopenharmony_ci *  query the final size, position or other attributes directly after window
3217b877906bSopenharmony_ci *  creation.
3218b877906bSopenharmony_ci *
3219b877906bSopenharmony_ci *  @remark @x11 The class part of the `WM_CLASS` window property will by
3220b877906bSopenharmony_ci *  default be set to the window title passed to this function.  The instance
3221b877906bSopenharmony_ci *  part will use the contents of the `RESOURCE_NAME` environment variable, if
3222b877906bSopenharmony_ci *  present and not empty, or fall back to the window title.  Set the
3223b877906bSopenharmony_ci *  [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and
3224b877906bSopenharmony_ci *  [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to
3225b877906bSopenharmony_ci *  override this.
3226b877906bSopenharmony_ci *
3227b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3228b877906bSopenharmony_ci *
3229b877906bSopenharmony_ci *  @sa @ref window_creation
3230b877906bSopenharmony_ci *  @sa @ref glfwDestroyWindow
3231b877906bSopenharmony_ci *
3232b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwOpenWindow`.
3233b877906bSopenharmony_ci *
3234b877906bSopenharmony_ci *  @ingroup window
3235b877906bSopenharmony_ci */
3236b877906bSopenharmony_ciGLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
3237b877906bSopenharmony_ci
3238b877906bSopenharmony_ci/*! @brief Destroys the specified window and its context.
3239b877906bSopenharmony_ci *
3240b877906bSopenharmony_ci *  This function destroys the specified window and its context.  On calling
3241b877906bSopenharmony_ci *  this function, no further callbacks will be called for that window.
3242b877906bSopenharmony_ci *
3243b877906bSopenharmony_ci *  If the context of the specified window is current on the main thread, it is
3244b877906bSopenharmony_ci *  detached before being destroyed.
3245b877906bSopenharmony_ci *
3246b877906bSopenharmony_ci *  @param[in] window The window to destroy.
3247b877906bSopenharmony_ci *
3248b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3249b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3250b877906bSopenharmony_ci *
3251b877906bSopenharmony_ci *  @note The context of the specified window must not be current on any other
3252b877906bSopenharmony_ci *  thread when this function is called.
3253b877906bSopenharmony_ci *
3254b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
3255b877906bSopenharmony_ci *
3256b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3257b877906bSopenharmony_ci *
3258b877906bSopenharmony_ci *  @sa @ref window_creation
3259b877906bSopenharmony_ci *  @sa @ref glfwCreateWindow
3260b877906bSopenharmony_ci *
3261b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwCloseWindow`.
3262b877906bSopenharmony_ci *
3263b877906bSopenharmony_ci *  @ingroup window
3264b877906bSopenharmony_ci */
3265b877906bSopenharmony_ciGLFWAPI void glfwDestroyWindow(GLFWwindow* window);
3266b877906bSopenharmony_ci
3267b877906bSopenharmony_ci/*! @brief Checks the close flag of the specified window.
3268b877906bSopenharmony_ci *
3269b877906bSopenharmony_ci *  This function returns the value of the close flag of the specified window.
3270b877906bSopenharmony_ci *
3271b877906bSopenharmony_ci *  @param[in] window The window to query.
3272b877906bSopenharmony_ci *  @return The value of the close flag.
3273b877906bSopenharmony_ci *
3274b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
3275b877906bSopenharmony_ci *
3276b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
3277b877906bSopenharmony_ci *  synchronized.
3278b877906bSopenharmony_ci *
3279b877906bSopenharmony_ci *  @sa @ref window_close
3280b877906bSopenharmony_ci *
3281b877906bSopenharmony_ci *  @since Added in version 3.0.
3282b877906bSopenharmony_ci *
3283b877906bSopenharmony_ci *  @ingroup window
3284b877906bSopenharmony_ci */
3285b877906bSopenharmony_ciGLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
3286b877906bSopenharmony_ci
3287b877906bSopenharmony_ci/*! @brief Sets the close flag of the specified window.
3288b877906bSopenharmony_ci *
3289b877906bSopenharmony_ci *  This function sets the value of the close flag of the specified window.
3290b877906bSopenharmony_ci *  This can be used to override the user's attempt to close the window, or
3291b877906bSopenharmony_ci *  to signal that it should be closed.
3292b877906bSopenharmony_ci *
3293b877906bSopenharmony_ci *  @param[in] window The window whose flag to change.
3294b877906bSopenharmony_ci *  @param[in] value The new value.
3295b877906bSopenharmony_ci *
3296b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
3297b877906bSopenharmony_ci *
3298b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
3299b877906bSopenharmony_ci *  synchronized.
3300b877906bSopenharmony_ci *
3301b877906bSopenharmony_ci *  @sa @ref window_close
3302b877906bSopenharmony_ci *
3303b877906bSopenharmony_ci *  @since Added in version 3.0.
3304b877906bSopenharmony_ci *
3305b877906bSopenharmony_ci *  @ingroup window
3306b877906bSopenharmony_ci */
3307b877906bSopenharmony_ciGLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
3308b877906bSopenharmony_ci
3309b877906bSopenharmony_ci/*! @brief Returns the title of the specified window.
3310b877906bSopenharmony_ci *
3311b877906bSopenharmony_ci *  This function returns the window title, encoded as UTF-8, of the specified
3312b877906bSopenharmony_ci *  window.  This is the title set previously by @ref glfwCreateWindow
3313b877906bSopenharmony_ci *  or @ref glfwSetWindowTitle.
3314b877906bSopenharmony_ci *
3315b877906bSopenharmony_ci *  @param[in] window The window to query.
3316b877906bSopenharmony_ci *  @return The UTF-8 encoded window title, or `NULL` if an
3317b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
3318b877906bSopenharmony_ci *
3319b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
3320b877906bSopenharmony_ci *
3321b877906bSopenharmony_ci *  @remark The returned title is currently a copy of the title last set by @ref
3322b877906bSopenharmony_ci *  glfwCreateWindow or @ref glfwSetWindowTitle.  It does not include any
3323b877906bSopenharmony_ci *  additional text which may be appended by the platform or another program.
3324b877906bSopenharmony_ci *
3325b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
3326b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the next call to @ref
3327b877906bSopenharmony_ci *  glfwGetWindowTitle or @ref glfwSetWindowTitle, or until the library is
3328b877906bSopenharmony_ci *  terminated.
3329b877906bSopenharmony_ci *
3330b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3331b877906bSopenharmony_ci *
3332b877906bSopenharmony_ci *  @sa @ref window_title
3333b877906bSopenharmony_ci *  @sa @ref glfwSetWindowTitle
3334b877906bSopenharmony_ci *
3335b877906bSopenharmony_ci *  @since Added in version 3.4.
3336b877906bSopenharmony_ci *
3337b877906bSopenharmony_ci *  @ingroup window
3338b877906bSopenharmony_ci */
3339b877906bSopenharmony_ciGLFWAPI const char* glfwGetWindowTitle(GLFWwindow* window);
3340b877906bSopenharmony_ci
3341b877906bSopenharmony_ci/*! @brief Sets the title of the specified window.
3342b877906bSopenharmony_ci *
3343b877906bSopenharmony_ci *  This function sets the window title, encoded as UTF-8, of the specified
3344b877906bSopenharmony_ci *  window.
3345b877906bSopenharmony_ci *
3346b877906bSopenharmony_ci *  @param[in] window The window whose title to change.
3347b877906bSopenharmony_ci *  @param[in] title The UTF-8 encoded window title.
3348b877906bSopenharmony_ci *
3349b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3350b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3351b877906bSopenharmony_ci *
3352b877906bSopenharmony_ci *  @remark @macos The window title will not be updated until the next time you
3353b877906bSopenharmony_ci *  process events.
3354b877906bSopenharmony_ci *
3355b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3356b877906bSopenharmony_ci *
3357b877906bSopenharmony_ci *  @sa @ref window_title
3358b877906bSopenharmony_ci *  @sa @ref glfwGetWindowTitle
3359b877906bSopenharmony_ci *
3360b877906bSopenharmony_ci *  @since Added in version 1.0.
3361b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3362b877906bSopenharmony_ci *
3363b877906bSopenharmony_ci *  @ingroup window
3364b877906bSopenharmony_ci */
3365b877906bSopenharmony_ciGLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
3366b877906bSopenharmony_ci
3367b877906bSopenharmony_ci/*! @brief Sets the icon for the specified window.
3368b877906bSopenharmony_ci *
3369b877906bSopenharmony_ci *  This function sets the icon of the specified window.  If passed an array of
3370b877906bSopenharmony_ci *  candidate images, those of or closest to the sizes desired by the system are
3371b877906bSopenharmony_ci *  selected.  If no images are specified, the window reverts to its default
3372b877906bSopenharmony_ci *  icon.
3373b877906bSopenharmony_ci *
3374b877906bSopenharmony_ci *  The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
3375b877906bSopenharmony_ci *  bits per channel with the red channel first.  They are arranged canonically
3376b877906bSopenharmony_ci *  as packed sequential rows, starting from the top-left corner.
3377b877906bSopenharmony_ci *
3378b877906bSopenharmony_ci *  The desired image sizes varies depending on platform and system settings.
3379b877906bSopenharmony_ci *  The selected images will be rescaled as needed.  Good sizes include 16x16,
3380b877906bSopenharmony_ci *  32x32 and 48x48.
3381b877906bSopenharmony_ci *
3382b877906bSopenharmony_ci *  @param[in] window The window whose icon to set.
3383b877906bSopenharmony_ci *  @param[in] count The number of images in the specified array, or zero to
3384b877906bSopenharmony_ci *  revert to the default window icon.
3385b877906bSopenharmony_ci *  @param[in] images The images to create the icon from.  This is ignored if
3386b877906bSopenharmony_ci *  count is zero.
3387b877906bSopenharmony_ci *
3388b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3389b877906bSopenharmony_ci *  GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref
3390b877906bSopenharmony_ci *  GLFW_FEATURE_UNAVAILABLE (see remarks).
3391b877906bSopenharmony_ci *
3392b877906bSopenharmony_ci *  @pointer_lifetime The specified image data is copied before this function
3393b877906bSopenharmony_ci *  returns.
3394b877906bSopenharmony_ci *
3395b877906bSopenharmony_ci *  @remark @macos Regular windows do not have icons on macOS.  This function
3396b877906bSopenharmony_ci *  will emit @ref GLFW_FEATURE_UNAVAILABLE.  The dock icon will be the same as
3397b877906bSopenharmony_ci *  the application bundle's icon.  For more information on bundles, see the
3398b877906bSopenharmony_ci *  [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.
3399b877906bSopenharmony_ci *
3400b877906bSopenharmony_ci *  [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/
3401b877906bSopenharmony_ci *
3402b877906bSopenharmony_ci *  @remark @wayland There is no existing protocol to change an icon, the
3403b877906bSopenharmony_ci *  window will thus inherit the one defined in the application's desktop file.
3404b877906bSopenharmony_ci *  This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
3405b877906bSopenharmony_ci *
3406b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3407b877906bSopenharmony_ci *
3408b877906bSopenharmony_ci *  @sa @ref window_icon
3409b877906bSopenharmony_ci *
3410b877906bSopenharmony_ci *  @since Added in version 3.2.
3411b877906bSopenharmony_ci *
3412b877906bSopenharmony_ci *  @ingroup window
3413b877906bSopenharmony_ci */
3414b877906bSopenharmony_ciGLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);
3415b877906bSopenharmony_ci
3416b877906bSopenharmony_ci/*! @brief Retrieves the position of the content area of the specified window.
3417b877906bSopenharmony_ci *
3418b877906bSopenharmony_ci *  This function retrieves the position, in screen coordinates, of the
3419b877906bSopenharmony_ci *  upper-left corner of the content area of the specified window.
3420b877906bSopenharmony_ci *
3421b877906bSopenharmony_ci *  Any or all of the position arguments may be `NULL`.  If an error occurs, all
3422b877906bSopenharmony_ci *  non-`NULL` position arguments will be set to zero.
3423b877906bSopenharmony_ci *
3424b877906bSopenharmony_ci *  @param[in] window The window to query.
3425b877906bSopenharmony_ci *  @param[out] xpos Where to store the x-coordinate of the upper-left corner of
3426b877906bSopenharmony_ci *  the content area, or `NULL`.
3427b877906bSopenharmony_ci *  @param[out] ypos Where to store the y-coordinate of the upper-left corner of
3428b877906bSopenharmony_ci *  the content area, or `NULL`.
3429b877906bSopenharmony_ci *
3430b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3431b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
3432b877906bSopenharmony_ci *
3433b877906bSopenharmony_ci *  @remark @wayland There is no way for an application to retrieve the global
3434b877906bSopenharmony_ci *  position of its windows.  This function will emit @ref
3435b877906bSopenharmony_ci *  GLFW_FEATURE_UNAVAILABLE.
3436b877906bSopenharmony_ci *
3437b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3438b877906bSopenharmony_ci *
3439b877906bSopenharmony_ci *  @sa @ref window_pos
3440b877906bSopenharmony_ci *  @sa @ref glfwSetWindowPos
3441b877906bSopenharmony_ci *
3442b877906bSopenharmony_ci *  @since Added in version 3.0.
3443b877906bSopenharmony_ci *
3444b877906bSopenharmony_ci *  @ingroup window
3445b877906bSopenharmony_ci */
3446b877906bSopenharmony_ciGLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
3447b877906bSopenharmony_ci
3448b877906bSopenharmony_ci/*! @brief Sets the position of the content area of the specified window.
3449b877906bSopenharmony_ci *
3450b877906bSopenharmony_ci *  This function sets the position, in screen coordinates, of the upper-left
3451b877906bSopenharmony_ci *  corner of the content area of the specified windowed mode window.  If the
3452b877906bSopenharmony_ci *  window is a full screen window, this function does nothing.
3453b877906bSopenharmony_ci *
3454b877906bSopenharmony_ci *  __Do not use this function__ to move an already visible window unless you
3455b877906bSopenharmony_ci *  have very good reasons for doing so, as it will confuse and annoy the user.
3456b877906bSopenharmony_ci *
3457b877906bSopenharmony_ci *  The window manager may put limits on what positions are allowed.  GLFW
3458b877906bSopenharmony_ci *  cannot and should not override these limits.
3459b877906bSopenharmony_ci *
3460b877906bSopenharmony_ci *  @param[in] window The window to query.
3461b877906bSopenharmony_ci *  @param[in] xpos The x-coordinate of the upper-left corner of the content area.
3462b877906bSopenharmony_ci *  @param[in] ypos The y-coordinate of the upper-left corner of the content area.
3463b877906bSopenharmony_ci *
3464b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3465b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
3466b877906bSopenharmony_ci *
3467b877906bSopenharmony_ci *  @remark @wayland There is no way for an application to set the global
3468b877906bSopenharmony_ci *  position of its windows.  This function will emit @ref
3469b877906bSopenharmony_ci *  GLFW_FEATURE_UNAVAILABLE.
3470b877906bSopenharmony_ci *
3471b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3472b877906bSopenharmony_ci *
3473b877906bSopenharmony_ci *  @sa @ref window_pos
3474b877906bSopenharmony_ci *  @sa @ref glfwGetWindowPos
3475b877906bSopenharmony_ci *
3476b877906bSopenharmony_ci *  @since Added in version 1.0.
3477b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3478b877906bSopenharmony_ci *
3479b877906bSopenharmony_ci *  @ingroup window
3480b877906bSopenharmony_ci */
3481b877906bSopenharmony_ciGLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
3482b877906bSopenharmony_ci
3483b877906bSopenharmony_ci/*! @brief Retrieves the size of the content area of the specified window.
3484b877906bSopenharmony_ci *
3485b877906bSopenharmony_ci *  This function retrieves the size, in screen coordinates, of the content area
3486b877906bSopenharmony_ci *  of the specified window.  If you wish to retrieve the size of the
3487b877906bSopenharmony_ci *  framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.
3488b877906bSopenharmony_ci *
3489b877906bSopenharmony_ci *  Any or all of the size arguments may be `NULL`.  If an error occurs, all
3490b877906bSopenharmony_ci *  non-`NULL` size arguments will be set to zero.
3491b877906bSopenharmony_ci *
3492b877906bSopenharmony_ci *  @param[in] window The window whose size to retrieve.
3493b877906bSopenharmony_ci *  @param[out] width Where to store the width, in screen coordinates, of the
3494b877906bSopenharmony_ci *  content area, or `NULL`.
3495b877906bSopenharmony_ci *  @param[out] height Where to store the height, in screen coordinates, of the
3496b877906bSopenharmony_ci *  content area, or `NULL`.
3497b877906bSopenharmony_ci *
3498b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3499b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3500b877906bSopenharmony_ci *
3501b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3502b877906bSopenharmony_ci *
3503b877906bSopenharmony_ci *  @sa @ref window_size
3504b877906bSopenharmony_ci *  @sa @ref glfwSetWindowSize
3505b877906bSopenharmony_ci *
3506b877906bSopenharmony_ci *  @since Added in version 1.0.
3507b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3508b877906bSopenharmony_ci *
3509b877906bSopenharmony_ci *  @ingroup window
3510b877906bSopenharmony_ci */
3511b877906bSopenharmony_ciGLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
3512b877906bSopenharmony_ci
3513b877906bSopenharmony_ci/*! @brief Sets the size limits of the specified window.
3514b877906bSopenharmony_ci *
3515b877906bSopenharmony_ci *  This function sets the size limits of the content area of the specified
3516b877906bSopenharmony_ci *  window.  If the window is full screen, the size limits only take effect
3517b877906bSopenharmony_ci *  once it is made windowed.  If the window is not resizable, this function
3518b877906bSopenharmony_ci *  does nothing.
3519b877906bSopenharmony_ci *
3520b877906bSopenharmony_ci *  The size limits are applied immediately to a windowed mode window and may
3521b877906bSopenharmony_ci *  cause it to be resized.
3522b877906bSopenharmony_ci *
3523b877906bSopenharmony_ci *  The maximum dimensions must be greater than or equal to the minimum
3524b877906bSopenharmony_ci *  dimensions and all must be greater than or equal to zero.
3525b877906bSopenharmony_ci *
3526b877906bSopenharmony_ci *  @param[in] window The window to set limits for.
3527b877906bSopenharmony_ci *  @param[in] minwidth The minimum width, in screen coordinates, of the content
3528b877906bSopenharmony_ci *  area, or `GLFW_DONT_CARE`.
3529b877906bSopenharmony_ci *  @param[in] minheight The minimum height, in screen coordinates, of the
3530b877906bSopenharmony_ci *  content area, or `GLFW_DONT_CARE`.
3531b877906bSopenharmony_ci *  @param[in] maxwidth The maximum width, in screen coordinates, of the content
3532b877906bSopenharmony_ci *  area, or `GLFW_DONT_CARE`.
3533b877906bSopenharmony_ci *  @param[in] maxheight The maximum height, in screen coordinates, of the
3534b877906bSopenharmony_ci *  content area, or `GLFW_DONT_CARE`.
3535b877906bSopenharmony_ci *
3536b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3537b877906bSopenharmony_ci *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
3538b877906bSopenharmony_ci *
3539b877906bSopenharmony_ci *  @remark If you set size limits and an aspect ratio that conflict, the
3540b877906bSopenharmony_ci *  results are undefined.
3541b877906bSopenharmony_ci *
3542b877906bSopenharmony_ci *  @remark @wayland The size limits will not be applied until the window is
3543b877906bSopenharmony_ci *  actually resized, either by the user or by the compositor.
3544b877906bSopenharmony_ci *
3545b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3546b877906bSopenharmony_ci *
3547b877906bSopenharmony_ci *  @sa @ref window_sizelimits
3548b877906bSopenharmony_ci *  @sa @ref glfwSetWindowAspectRatio
3549b877906bSopenharmony_ci *
3550b877906bSopenharmony_ci *  @since Added in version 3.2.
3551b877906bSopenharmony_ci *
3552b877906bSopenharmony_ci *  @ingroup window
3553b877906bSopenharmony_ci */
3554b877906bSopenharmony_ciGLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
3555b877906bSopenharmony_ci
3556b877906bSopenharmony_ci/*! @brief Sets the aspect ratio of the specified window.
3557b877906bSopenharmony_ci *
3558b877906bSopenharmony_ci *  This function sets the required aspect ratio of the content area of the
3559b877906bSopenharmony_ci *  specified window.  If the window is full screen, the aspect ratio only takes
3560b877906bSopenharmony_ci *  effect once it is made windowed.  If the window is not resizable, this
3561b877906bSopenharmony_ci *  function does nothing.
3562b877906bSopenharmony_ci *
3563b877906bSopenharmony_ci *  The aspect ratio is specified as a numerator and a denominator and both
3564b877906bSopenharmony_ci *  values must be greater than zero.  For example, the common 16:9 aspect ratio
3565b877906bSopenharmony_ci *  is specified as 16 and 9, respectively.
3566b877906bSopenharmony_ci *
3567b877906bSopenharmony_ci *  If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect
3568b877906bSopenharmony_ci *  ratio limit is disabled.
3569b877906bSopenharmony_ci *
3570b877906bSopenharmony_ci *  The aspect ratio is applied immediately to a windowed mode window and may
3571b877906bSopenharmony_ci *  cause it to be resized.
3572b877906bSopenharmony_ci *
3573b877906bSopenharmony_ci *  @param[in] window The window to set limits for.
3574b877906bSopenharmony_ci *  @param[in] numer The numerator of the desired aspect ratio, or
3575b877906bSopenharmony_ci *  `GLFW_DONT_CARE`.
3576b877906bSopenharmony_ci *  @param[in] denom The denominator of the desired aspect ratio, or
3577b877906bSopenharmony_ci *  `GLFW_DONT_CARE`.
3578b877906bSopenharmony_ci *
3579b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3580b877906bSopenharmony_ci *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
3581b877906bSopenharmony_ci *
3582b877906bSopenharmony_ci *  @remark If you set size limits and an aspect ratio that conflict, the
3583b877906bSopenharmony_ci *  results are undefined.
3584b877906bSopenharmony_ci *
3585b877906bSopenharmony_ci *  @remark @wayland The aspect ratio will not be applied until the window is
3586b877906bSopenharmony_ci *  actually resized, either by the user or by the compositor.
3587b877906bSopenharmony_ci *
3588b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3589b877906bSopenharmony_ci *
3590b877906bSopenharmony_ci *  @sa @ref window_sizelimits
3591b877906bSopenharmony_ci *  @sa @ref glfwSetWindowSizeLimits
3592b877906bSopenharmony_ci *
3593b877906bSopenharmony_ci *  @since Added in version 3.2.
3594b877906bSopenharmony_ci *
3595b877906bSopenharmony_ci *  @ingroup window
3596b877906bSopenharmony_ci */
3597b877906bSopenharmony_ciGLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
3598b877906bSopenharmony_ci
3599b877906bSopenharmony_ci/*! @brief Sets the size of the content area of the specified window.
3600b877906bSopenharmony_ci *
3601b877906bSopenharmony_ci *  This function sets the size, in screen coordinates, of the content area of
3602b877906bSopenharmony_ci *  the specified window.
3603b877906bSopenharmony_ci *
3604b877906bSopenharmony_ci *  For full screen windows, this function updates the resolution of its desired
3605b877906bSopenharmony_ci *  video mode and switches to the video mode closest to it, without affecting
3606b877906bSopenharmony_ci *  the window's context.  As the context is unaffected, the bit depths of the
3607b877906bSopenharmony_ci *  framebuffer remain unchanged.
3608b877906bSopenharmony_ci *
3609b877906bSopenharmony_ci *  If you wish to update the refresh rate of the desired video mode in addition
3610b877906bSopenharmony_ci *  to its resolution, see @ref glfwSetWindowMonitor.
3611b877906bSopenharmony_ci *
3612b877906bSopenharmony_ci *  The window manager may put limits on what sizes are allowed.  GLFW cannot
3613b877906bSopenharmony_ci *  and should not override these limits.
3614b877906bSopenharmony_ci *
3615b877906bSopenharmony_ci *  @param[in] window The window to resize.
3616b877906bSopenharmony_ci *  @param[in] width The desired width, in screen coordinates, of the window
3617b877906bSopenharmony_ci *  content area.
3618b877906bSopenharmony_ci *  @param[in] height The desired height, in screen coordinates, of the window
3619b877906bSopenharmony_ci *  content area.
3620b877906bSopenharmony_ci *
3621b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3622b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3623b877906bSopenharmony_ci *
3624b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3625b877906bSopenharmony_ci *
3626b877906bSopenharmony_ci *  @sa @ref window_size
3627b877906bSopenharmony_ci *  @sa @ref glfwGetWindowSize
3628b877906bSopenharmony_ci *  @sa @ref glfwSetWindowMonitor
3629b877906bSopenharmony_ci *
3630b877906bSopenharmony_ci *  @since Added in version 1.0.
3631b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3632b877906bSopenharmony_ci *
3633b877906bSopenharmony_ci *  @ingroup window
3634b877906bSopenharmony_ci */
3635b877906bSopenharmony_ciGLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
3636b877906bSopenharmony_ci
3637b877906bSopenharmony_ci/*! @brief Retrieves the size of the framebuffer of the specified window.
3638b877906bSopenharmony_ci *
3639b877906bSopenharmony_ci *  This function retrieves the size, in pixels, of the framebuffer of the
3640b877906bSopenharmony_ci *  specified window.  If you wish to retrieve the size of the window in screen
3641b877906bSopenharmony_ci *  coordinates, see @ref glfwGetWindowSize.
3642b877906bSopenharmony_ci *
3643b877906bSopenharmony_ci *  Any or all of the size arguments may be `NULL`.  If an error occurs, all
3644b877906bSopenharmony_ci *  non-`NULL` size arguments will be set to zero.
3645b877906bSopenharmony_ci *
3646b877906bSopenharmony_ci *  @param[in] window The window whose framebuffer to query.
3647b877906bSopenharmony_ci *  @param[out] width Where to store the width, in pixels, of the framebuffer,
3648b877906bSopenharmony_ci *  or `NULL`.
3649b877906bSopenharmony_ci *  @param[out] height Where to store the height, in pixels, of the framebuffer,
3650b877906bSopenharmony_ci *  or `NULL`.
3651b877906bSopenharmony_ci *
3652b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3653b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3654b877906bSopenharmony_ci *
3655b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3656b877906bSopenharmony_ci *
3657b877906bSopenharmony_ci *  @sa @ref window_fbsize
3658b877906bSopenharmony_ci *  @sa @ref glfwSetFramebufferSizeCallback
3659b877906bSopenharmony_ci *
3660b877906bSopenharmony_ci *  @since Added in version 3.0.
3661b877906bSopenharmony_ci *
3662b877906bSopenharmony_ci *  @ingroup window
3663b877906bSopenharmony_ci */
3664b877906bSopenharmony_ciGLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
3665b877906bSopenharmony_ci
3666b877906bSopenharmony_ci/*! @brief Retrieves the size of the frame of the window.
3667b877906bSopenharmony_ci *
3668b877906bSopenharmony_ci *  This function retrieves the size, in screen coordinates, of each edge of the
3669b877906bSopenharmony_ci *  frame of the specified window.  This size includes the title bar, if the
3670b877906bSopenharmony_ci *  window has one.  The size of the frame may vary depending on the
3671b877906bSopenharmony_ci *  [window-related hints](@ref window_hints_wnd) used to create it.
3672b877906bSopenharmony_ci *
3673b877906bSopenharmony_ci *  Because this function retrieves the size of each window frame edge and not
3674b877906bSopenharmony_ci *  the offset along a particular coordinate axis, the retrieved values will
3675b877906bSopenharmony_ci *  always be zero or positive.
3676b877906bSopenharmony_ci *
3677b877906bSopenharmony_ci *  Any or all of the size arguments may be `NULL`.  If an error occurs, all
3678b877906bSopenharmony_ci *  non-`NULL` size arguments will be set to zero.
3679b877906bSopenharmony_ci *
3680b877906bSopenharmony_ci *  @param[in] window The window whose frame size to query.
3681b877906bSopenharmony_ci *  @param[out] left Where to store the size, in screen coordinates, of the left
3682b877906bSopenharmony_ci *  edge of the window frame, or `NULL`.
3683b877906bSopenharmony_ci *  @param[out] top Where to store the size, in screen coordinates, of the top
3684b877906bSopenharmony_ci *  edge of the window frame, or `NULL`.
3685b877906bSopenharmony_ci *  @param[out] right Where to store the size, in screen coordinates, of the
3686b877906bSopenharmony_ci *  right edge of the window frame, or `NULL`.
3687b877906bSopenharmony_ci *  @param[out] bottom Where to store the size, in screen coordinates, of the
3688b877906bSopenharmony_ci *  bottom edge of the window frame, or `NULL`.
3689b877906bSopenharmony_ci *
3690b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3691b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3692b877906bSopenharmony_ci *
3693b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3694b877906bSopenharmony_ci *
3695b877906bSopenharmony_ci *  @sa @ref window_size
3696b877906bSopenharmony_ci *
3697b877906bSopenharmony_ci *  @since Added in version 3.1.
3698b877906bSopenharmony_ci *
3699b877906bSopenharmony_ci *  @ingroup window
3700b877906bSopenharmony_ci */
3701b877906bSopenharmony_ciGLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
3702b877906bSopenharmony_ci
3703b877906bSopenharmony_ci/*! @brief Retrieves the content scale for the specified window.
3704b877906bSopenharmony_ci *
3705b877906bSopenharmony_ci *  This function retrieves the content scale for the specified window.  The
3706b877906bSopenharmony_ci *  content scale is the ratio between the current DPI and the platform's
3707b877906bSopenharmony_ci *  default DPI.  This is especially important for text and any UI elements.  If
3708b877906bSopenharmony_ci *  the pixel dimensions of your UI scaled by this look appropriate on your
3709b877906bSopenharmony_ci *  machine then it should appear at a reasonable size on other machines
3710b877906bSopenharmony_ci *  regardless of their DPI and scaling settings.  This relies on the system DPI
3711b877906bSopenharmony_ci *  and scaling settings being somewhat correct.
3712b877906bSopenharmony_ci *
3713b877906bSopenharmony_ci *  On platforms where each monitors can have its own content scale, the window
3714b877906bSopenharmony_ci *  content scale will depend on which monitor the system considers the window
3715b877906bSopenharmony_ci *  to be on.
3716b877906bSopenharmony_ci *
3717b877906bSopenharmony_ci *  @param[in] window The window to query.
3718b877906bSopenharmony_ci *  @param[out] xscale Where to store the x-axis content scale, or `NULL`.
3719b877906bSopenharmony_ci *  @param[out] yscale Where to store the y-axis content scale, or `NULL`.
3720b877906bSopenharmony_ci *
3721b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3722b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3723b877906bSopenharmony_ci *
3724b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3725b877906bSopenharmony_ci *
3726b877906bSopenharmony_ci *  @sa @ref window_scale
3727b877906bSopenharmony_ci *  @sa @ref glfwSetWindowContentScaleCallback
3728b877906bSopenharmony_ci *  @sa @ref glfwGetMonitorContentScale
3729b877906bSopenharmony_ci *
3730b877906bSopenharmony_ci *  @since Added in version 3.3.
3731b877906bSopenharmony_ci *
3732b877906bSopenharmony_ci *  @ingroup window
3733b877906bSopenharmony_ci */
3734b877906bSopenharmony_ciGLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale);
3735b877906bSopenharmony_ci
3736b877906bSopenharmony_ci/*! @brief Returns the opacity of the whole window.
3737b877906bSopenharmony_ci *
3738b877906bSopenharmony_ci *  This function returns the opacity of the window, including any decorations.
3739b877906bSopenharmony_ci *
3740b877906bSopenharmony_ci *  The opacity (or alpha) value is a positive finite number between zero and
3741b877906bSopenharmony_ci *  one, where zero is fully transparent and one is fully opaque.  If the system
3742b877906bSopenharmony_ci *  does not support whole window transparency, this function always returns one.
3743b877906bSopenharmony_ci *
3744b877906bSopenharmony_ci *  The initial opacity value for newly created windows is one.
3745b877906bSopenharmony_ci *
3746b877906bSopenharmony_ci *  @param[in] window The window to query.
3747b877906bSopenharmony_ci *  @return The opacity value of the specified window.
3748b877906bSopenharmony_ci *
3749b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3750b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3751b877906bSopenharmony_ci *
3752b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3753b877906bSopenharmony_ci *
3754b877906bSopenharmony_ci *  @sa @ref window_transparency
3755b877906bSopenharmony_ci *  @sa @ref glfwSetWindowOpacity
3756b877906bSopenharmony_ci *
3757b877906bSopenharmony_ci *  @since Added in version 3.3.
3758b877906bSopenharmony_ci *
3759b877906bSopenharmony_ci *  @ingroup window
3760b877906bSopenharmony_ci */
3761b877906bSopenharmony_ciGLFWAPI float glfwGetWindowOpacity(GLFWwindow* window);
3762b877906bSopenharmony_ci
3763b877906bSopenharmony_ci/*! @brief Sets the opacity of the whole window.
3764b877906bSopenharmony_ci *
3765b877906bSopenharmony_ci *  This function sets the opacity of the window, including any decorations.
3766b877906bSopenharmony_ci *
3767b877906bSopenharmony_ci *  The opacity (or alpha) value is a positive finite number between zero and
3768b877906bSopenharmony_ci *  one, where zero is fully transparent and one is fully opaque.
3769b877906bSopenharmony_ci *
3770b877906bSopenharmony_ci *  The initial opacity value for newly created windows is one.
3771b877906bSopenharmony_ci *
3772b877906bSopenharmony_ci *  A window created with framebuffer transparency may not use whole window
3773b877906bSopenharmony_ci *  transparency.  The results of doing this are undefined.
3774b877906bSopenharmony_ci *
3775b877906bSopenharmony_ci *  @param[in] window The window to set the opacity for.
3776b877906bSopenharmony_ci *  @param[in] opacity The desired opacity of the specified window.
3777b877906bSopenharmony_ci *
3778b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
3779b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
3780b877906bSopenharmony_ci *
3781b877906bSopenharmony_ci *  @remark @wayland There is no way to set an opacity factor for a window.
3782b877906bSopenharmony_ci *  This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
3783b877906bSopenharmony_ci *
3784b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3785b877906bSopenharmony_ci *
3786b877906bSopenharmony_ci *  @sa @ref window_transparency
3787b877906bSopenharmony_ci *  @sa @ref glfwGetWindowOpacity
3788b877906bSopenharmony_ci *
3789b877906bSopenharmony_ci *  @since Added in version 3.3.
3790b877906bSopenharmony_ci *
3791b877906bSopenharmony_ci *  @ingroup window
3792b877906bSopenharmony_ci */
3793b877906bSopenharmony_ciGLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity);
3794b877906bSopenharmony_ci
3795b877906bSopenharmony_ci/*! @brief Iconifies the specified window.
3796b877906bSopenharmony_ci *
3797b877906bSopenharmony_ci *  This function iconifies (minimizes) the specified window if it was
3798b877906bSopenharmony_ci *  previously restored.  If the window is already iconified, this function does
3799b877906bSopenharmony_ci *  nothing.
3800b877906bSopenharmony_ci *
3801b877906bSopenharmony_ci *  If the specified window is a full screen window, GLFW restores the original
3802b877906bSopenharmony_ci *  video mode of the monitor.  The window's desired video mode is set again
3803b877906bSopenharmony_ci *  when the window is restored.
3804b877906bSopenharmony_ci *
3805b877906bSopenharmony_ci *  @param[in] window The window to iconify.
3806b877906bSopenharmony_ci *
3807b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3808b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3809b877906bSopenharmony_ci *
3810b877906bSopenharmony_ci *  @remark @wayland Once a window is iconified, @ref glfwRestoreWindow won’t
3811b877906bSopenharmony_ci *  be able to restore it.  This is a design decision of the xdg-shell
3812b877906bSopenharmony_ci *  protocol.
3813b877906bSopenharmony_ci *
3814b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3815b877906bSopenharmony_ci *
3816b877906bSopenharmony_ci *  @sa @ref window_iconify
3817b877906bSopenharmony_ci *  @sa @ref glfwRestoreWindow
3818b877906bSopenharmony_ci *  @sa @ref glfwMaximizeWindow
3819b877906bSopenharmony_ci *
3820b877906bSopenharmony_ci *  @since Added in version 2.1.
3821b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3822b877906bSopenharmony_ci *
3823b877906bSopenharmony_ci *  @ingroup window
3824b877906bSopenharmony_ci */
3825b877906bSopenharmony_ciGLFWAPI void glfwIconifyWindow(GLFWwindow* window);
3826b877906bSopenharmony_ci
3827b877906bSopenharmony_ci/*! @brief Restores the specified window.
3828b877906bSopenharmony_ci *
3829b877906bSopenharmony_ci *  This function restores the specified window if it was previously iconified
3830b877906bSopenharmony_ci *  (minimized) or maximized.  If the window is already restored, this function
3831b877906bSopenharmony_ci *  does nothing.
3832b877906bSopenharmony_ci *
3833b877906bSopenharmony_ci *  If the specified window is an iconified full screen window, its desired
3834b877906bSopenharmony_ci *  video mode is set again for its monitor when the window is restored.
3835b877906bSopenharmony_ci *
3836b877906bSopenharmony_ci *  @param[in] window The window to restore.
3837b877906bSopenharmony_ci *
3838b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3839b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3840b877906bSopenharmony_ci *
3841b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3842b877906bSopenharmony_ci *
3843b877906bSopenharmony_ci *  @sa @ref window_iconify
3844b877906bSopenharmony_ci *  @sa @ref glfwIconifyWindow
3845b877906bSopenharmony_ci *  @sa @ref glfwMaximizeWindow
3846b877906bSopenharmony_ci *
3847b877906bSopenharmony_ci *  @since Added in version 2.1.
3848b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
3849b877906bSopenharmony_ci *
3850b877906bSopenharmony_ci *  @ingroup window
3851b877906bSopenharmony_ci */
3852b877906bSopenharmony_ciGLFWAPI void glfwRestoreWindow(GLFWwindow* window);
3853b877906bSopenharmony_ci
3854b877906bSopenharmony_ci/*! @brief Maximizes the specified window.
3855b877906bSopenharmony_ci *
3856b877906bSopenharmony_ci *  This function maximizes the specified window if it was previously not
3857b877906bSopenharmony_ci *  maximized.  If the window is already maximized, this function does nothing.
3858b877906bSopenharmony_ci *
3859b877906bSopenharmony_ci *  If the specified window is a full screen window, this function does nothing.
3860b877906bSopenharmony_ci *
3861b877906bSopenharmony_ci *  @param[in] window The window to maximize.
3862b877906bSopenharmony_ci *
3863b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3864b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3865b877906bSopenharmony_ci *
3866b877906bSopenharmony_ci *  @par Thread Safety
3867b877906bSopenharmony_ci *  This function may only be called from the main thread.
3868b877906bSopenharmony_ci *
3869b877906bSopenharmony_ci *  @sa @ref window_iconify
3870b877906bSopenharmony_ci *  @sa @ref glfwIconifyWindow
3871b877906bSopenharmony_ci *  @sa @ref glfwRestoreWindow
3872b877906bSopenharmony_ci *
3873b877906bSopenharmony_ci *  @since Added in GLFW 3.2.
3874b877906bSopenharmony_ci *
3875b877906bSopenharmony_ci *  @ingroup window
3876b877906bSopenharmony_ci */
3877b877906bSopenharmony_ciGLFWAPI void glfwMaximizeWindow(GLFWwindow* window);
3878b877906bSopenharmony_ci
3879b877906bSopenharmony_ci/*! @brief Makes the specified window visible.
3880b877906bSopenharmony_ci *
3881b877906bSopenharmony_ci *  This function makes the specified window visible if it was previously
3882b877906bSopenharmony_ci *  hidden.  If the window is already visible or is in full screen mode, this
3883b877906bSopenharmony_ci *  function does nothing.
3884b877906bSopenharmony_ci *
3885b877906bSopenharmony_ci *  By default, windowed mode windows are focused when shown
3886b877906bSopenharmony_ci *  Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint
3887b877906bSopenharmony_ci *  to change this behavior for all newly created windows, or change the
3888b877906bSopenharmony_ci *  behavior for an existing window with @ref glfwSetWindowAttrib.
3889b877906bSopenharmony_ci *
3890b877906bSopenharmony_ci *  @param[in] window The window to make visible.
3891b877906bSopenharmony_ci *
3892b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3893b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3894b877906bSopenharmony_ci *
3895b877906bSopenharmony_ci *  @remark @wayland Because Wayland wants every frame of the desktop to be
3896b877906bSopenharmony_ci *  complete, this function does not immediately make the window visible.
3897b877906bSopenharmony_ci *  Instead it will become visible the next time the window framebuffer is
3898b877906bSopenharmony_ci *  updated after this call.
3899b877906bSopenharmony_ci *
3900b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3901b877906bSopenharmony_ci *
3902b877906bSopenharmony_ci *  @sa @ref window_hide
3903b877906bSopenharmony_ci *  @sa @ref glfwHideWindow
3904b877906bSopenharmony_ci *
3905b877906bSopenharmony_ci *  @since Added in version 3.0.
3906b877906bSopenharmony_ci *
3907b877906bSopenharmony_ci *  @ingroup window
3908b877906bSopenharmony_ci */
3909b877906bSopenharmony_ciGLFWAPI void glfwShowWindow(GLFWwindow* window);
3910b877906bSopenharmony_ci
3911b877906bSopenharmony_ci/*! @brief Hides the specified window.
3912b877906bSopenharmony_ci *
3913b877906bSopenharmony_ci *  This function hides the specified window if it was previously visible.  If
3914b877906bSopenharmony_ci *  the window is already hidden or is in full screen mode, this function does
3915b877906bSopenharmony_ci *  nothing.
3916b877906bSopenharmony_ci *
3917b877906bSopenharmony_ci *  @param[in] window The window to hide.
3918b877906bSopenharmony_ci *
3919b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3920b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3921b877906bSopenharmony_ci *
3922b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3923b877906bSopenharmony_ci *
3924b877906bSopenharmony_ci *  @sa @ref window_hide
3925b877906bSopenharmony_ci *  @sa @ref glfwShowWindow
3926b877906bSopenharmony_ci *
3927b877906bSopenharmony_ci *  @since Added in version 3.0.
3928b877906bSopenharmony_ci *
3929b877906bSopenharmony_ci *  @ingroup window
3930b877906bSopenharmony_ci */
3931b877906bSopenharmony_ciGLFWAPI void glfwHideWindow(GLFWwindow* window);
3932b877906bSopenharmony_ci
3933b877906bSopenharmony_ci/*! @brief Brings the specified window to front and sets input focus.
3934b877906bSopenharmony_ci *
3935b877906bSopenharmony_ci *  This function brings the specified window to front and sets input focus.
3936b877906bSopenharmony_ci *  The window should already be visible and not iconified.
3937b877906bSopenharmony_ci *
3938b877906bSopenharmony_ci *  By default, both windowed and full screen mode windows are focused when
3939b877906bSopenharmony_ci *  initially created.  Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to
3940b877906bSopenharmony_ci *  disable this behavior.
3941b877906bSopenharmony_ci *
3942b877906bSopenharmony_ci *  Also by default, windowed mode windows are focused when shown
3943b877906bSopenharmony_ci *  with @ref glfwShowWindow. Set the
3944b877906bSopenharmony_ci *  [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior.
3945b877906bSopenharmony_ci *
3946b877906bSopenharmony_ci *  __Do not use this function__ to steal focus from other applications unless
3947b877906bSopenharmony_ci *  you are certain that is what the user wants.  Focus stealing can be
3948b877906bSopenharmony_ci *  extremely disruptive.
3949b877906bSopenharmony_ci *
3950b877906bSopenharmony_ci *  For a less disruptive way of getting the user's attention, see
3951b877906bSopenharmony_ci *  [attention requests](@ref window_attention).
3952b877906bSopenharmony_ci *
3953b877906bSopenharmony_ci *  @param[in] window The window to give input focus.
3954b877906bSopenharmony_ci *
3955b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3956b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3957b877906bSopenharmony_ci *
3958b877906bSopenharmony_ci *  @remark @wayland The compositor will likely ignore focus requests unless
3959b877906bSopenharmony_ci *  another window created by the same application already has input focus.
3960b877906bSopenharmony_ci *
3961b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3962b877906bSopenharmony_ci *
3963b877906bSopenharmony_ci *  @sa @ref window_focus
3964b877906bSopenharmony_ci *  @sa @ref window_attention
3965b877906bSopenharmony_ci *
3966b877906bSopenharmony_ci *  @since Added in version 3.2.
3967b877906bSopenharmony_ci *
3968b877906bSopenharmony_ci *  @ingroup window
3969b877906bSopenharmony_ci */
3970b877906bSopenharmony_ciGLFWAPI void glfwFocusWindow(GLFWwindow* window);
3971b877906bSopenharmony_ci
3972b877906bSopenharmony_ci/*! @brief Requests user attention to the specified window.
3973b877906bSopenharmony_ci *
3974b877906bSopenharmony_ci *  This function requests user attention to the specified window.  On
3975b877906bSopenharmony_ci *  platforms where this is not supported, attention is requested to the
3976b877906bSopenharmony_ci *  application as a whole.
3977b877906bSopenharmony_ci *
3978b877906bSopenharmony_ci *  Once the user has given attention, usually by focusing the window or
3979b877906bSopenharmony_ci *  application, the system will end the request automatically.
3980b877906bSopenharmony_ci *
3981b877906bSopenharmony_ci *  @param[in] window The window to request attention to.
3982b877906bSopenharmony_ci *
3983b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
3984b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
3985b877906bSopenharmony_ci *
3986b877906bSopenharmony_ci *  @remark @macos Attention is requested to the application as a whole, not the
3987b877906bSopenharmony_ci *  specific window.
3988b877906bSopenharmony_ci *
3989b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
3990b877906bSopenharmony_ci *
3991b877906bSopenharmony_ci *  @sa @ref window_attention
3992b877906bSopenharmony_ci *
3993b877906bSopenharmony_ci *  @since Added in version 3.3.
3994b877906bSopenharmony_ci *
3995b877906bSopenharmony_ci *  @ingroup window
3996b877906bSopenharmony_ci */
3997b877906bSopenharmony_ciGLFWAPI void glfwRequestWindowAttention(GLFWwindow* window);
3998b877906bSopenharmony_ci
3999b877906bSopenharmony_ci/*! @brief Returns the monitor that the window uses for full screen mode.
4000b877906bSopenharmony_ci *
4001b877906bSopenharmony_ci *  This function returns the handle of the monitor that the specified window is
4002b877906bSopenharmony_ci *  in full screen on.
4003b877906bSopenharmony_ci *
4004b877906bSopenharmony_ci *  @param[in] window The window to query.
4005b877906bSopenharmony_ci *  @return The monitor, or `NULL` if the window is in windowed mode or an
4006b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
4007b877906bSopenharmony_ci *
4008b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4009b877906bSopenharmony_ci *
4010b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4011b877906bSopenharmony_ci *
4012b877906bSopenharmony_ci *  @sa @ref window_monitor
4013b877906bSopenharmony_ci *  @sa @ref glfwSetWindowMonitor
4014b877906bSopenharmony_ci *
4015b877906bSopenharmony_ci *  @since Added in version 3.0.
4016b877906bSopenharmony_ci *
4017b877906bSopenharmony_ci *  @ingroup window
4018b877906bSopenharmony_ci */
4019b877906bSopenharmony_ciGLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
4020b877906bSopenharmony_ci
4021b877906bSopenharmony_ci/*! @brief Sets the mode, monitor, video mode and placement of a window.
4022b877906bSopenharmony_ci *
4023b877906bSopenharmony_ci *  This function sets the monitor that the window uses for full screen mode or,
4024b877906bSopenharmony_ci *  if the monitor is `NULL`, makes it windowed mode.
4025b877906bSopenharmony_ci *
4026b877906bSopenharmony_ci *  When setting a monitor, this function updates the width, height and refresh
4027b877906bSopenharmony_ci *  rate of the desired video mode and switches to the video mode closest to it.
4028b877906bSopenharmony_ci *  The window position is ignored when setting a monitor.
4029b877906bSopenharmony_ci *
4030b877906bSopenharmony_ci *  When the monitor is `NULL`, the position, width and height are used to
4031b877906bSopenharmony_ci *  place the window content area.  The refresh rate is ignored when no monitor
4032b877906bSopenharmony_ci *  is specified.
4033b877906bSopenharmony_ci *
4034b877906bSopenharmony_ci *  If you only wish to update the resolution of a full screen window or the
4035b877906bSopenharmony_ci *  size of a windowed mode window, see @ref glfwSetWindowSize.
4036b877906bSopenharmony_ci *
4037b877906bSopenharmony_ci *  When a window transitions from full screen to windowed mode, this function
4038b877906bSopenharmony_ci *  restores any previous window settings such as whether it is decorated,
4039b877906bSopenharmony_ci *  floating, resizable, has size or aspect ratio limits, etc.
4040b877906bSopenharmony_ci *
4041b877906bSopenharmony_ci *  @param[in] window The window whose monitor, size or video mode to set.
4042b877906bSopenharmony_ci *  @param[in] monitor The desired monitor, or `NULL` to set windowed mode.
4043b877906bSopenharmony_ci *  @param[in] xpos The desired x-coordinate of the upper-left corner of the
4044b877906bSopenharmony_ci *  content area.
4045b877906bSopenharmony_ci *  @param[in] ypos The desired y-coordinate of the upper-left corner of the
4046b877906bSopenharmony_ci *  content area.
4047b877906bSopenharmony_ci *  @param[in] width The desired with, in screen coordinates, of the content
4048b877906bSopenharmony_ci *  area or video mode.
4049b877906bSopenharmony_ci *  @param[in] height The desired height, in screen coordinates, of the content
4050b877906bSopenharmony_ci *  area or video mode.
4051b877906bSopenharmony_ci *  @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,
4052b877906bSopenharmony_ci *  or `GLFW_DONT_CARE`.
4053b877906bSopenharmony_ci *
4054b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4055b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
4056b877906bSopenharmony_ci *
4057b877906bSopenharmony_ci *  @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise
4058b877906bSopenharmony_ci *  affected by any resizing or mode switching, although you may need to update
4059b877906bSopenharmony_ci *  your viewport if the framebuffer size has changed.
4060b877906bSopenharmony_ci *
4061b877906bSopenharmony_ci *  @remark @wayland The desired window position is ignored, as there is no way
4062b877906bSopenharmony_ci *  for an application to set this property.
4063b877906bSopenharmony_ci *
4064b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4065b877906bSopenharmony_ci *
4066b877906bSopenharmony_ci *  @sa @ref window_monitor
4067b877906bSopenharmony_ci *  @sa @ref window_full_screen
4068b877906bSopenharmony_ci *  @sa @ref glfwGetWindowMonitor
4069b877906bSopenharmony_ci *  @sa @ref glfwSetWindowSize
4070b877906bSopenharmony_ci *
4071b877906bSopenharmony_ci *  @since Added in version 3.2.
4072b877906bSopenharmony_ci *
4073b877906bSopenharmony_ci *  @ingroup window
4074b877906bSopenharmony_ci */
4075b877906bSopenharmony_ciGLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
4076b877906bSopenharmony_ci
4077b877906bSopenharmony_ci/*! @brief Returns an attribute of the specified window.
4078b877906bSopenharmony_ci *
4079b877906bSopenharmony_ci *  This function returns the value of an attribute of the specified window or
4080b877906bSopenharmony_ci *  its OpenGL or OpenGL ES context.
4081b877906bSopenharmony_ci *
4082b877906bSopenharmony_ci *  @param[in] window The window to query.
4083b877906bSopenharmony_ci *  @param[in] attrib The [window attribute](@ref window_attribs) whose value to
4084b877906bSopenharmony_ci *  return.
4085b877906bSopenharmony_ci *  @return The value of the attribute, or zero if an
4086b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
4087b877906bSopenharmony_ci *
4088b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
4089b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
4090b877906bSopenharmony_ci *
4091b877906bSopenharmony_ci *  @remark Framebuffer related hints are not window attributes.  See @ref
4092b877906bSopenharmony_ci *  window_attribs_fb for more information.
4093b877906bSopenharmony_ci *
4094b877906bSopenharmony_ci *  @remark Zero is a valid value for many window and context related
4095b877906bSopenharmony_ci *  attributes so you cannot use a return value of zero as an indication of
4096b877906bSopenharmony_ci *  errors.  However, this function should not fail as long as it is passed
4097b877906bSopenharmony_ci *  valid arguments and the library has been [initialized](@ref intro_init).
4098b877906bSopenharmony_ci *
4099b877906bSopenharmony_ci *  @remark @wayland The Wayland protocol provides no way to check whether a
4100b877906bSopenharmony_ci *  window is iconfied, so @ref GLFW_ICONIFIED always returns `GLFW_FALSE`.
4101b877906bSopenharmony_ci *
4102b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4103b877906bSopenharmony_ci *
4104b877906bSopenharmony_ci *  @sa @ref window_attribs
4105b877906bSopenharmony_ci *  @sa @ref glfwSetWindowAttrib
4106b877906bSopenharmony_ci *
4107b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwGetWindowParam` and
4108b877906bSopenharmony_ci *  `glfwGetGLVersion`.
4109b877906bSopenharmony_ci *
4110b877906bSopenharmony_ci *  @ingroup window
4111b877906bSopenharmony_ci */
4112b877906bSopenharmony_ciGLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
4113b877906bSopenharmony_ci
4114b877906bSopenharmony_ci/*! @brief Sets an attribute of the specified window.
4115b877906bSopenharmony_ci *
4116b877906bSopenharmony_ci *  This function sets the value of an attribute of the specified window.
4117b877906bSopenharmony_ci *
4118b877906bSopenharmony_ci *  The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),
4119b877906bSopenharmony_ci *  [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),
4120b877906bSopenharmony_ci *  [GLFW_FLOATING](@ref GLFW_FLOATING_attrib),
4121b877906bSopenharmony_ci *  [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and
4122b877906bSopenharmony_ci *  [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib).
4123b877906bSopenharmony_ci *  [GLFW_MOUSE_PASSTHROUGH](@ref GLFW_MOUSE_PASSTHROUGH_attrib)
4124b877906bSopenharmony_ci *
4125b877906bSopenharmony_ci *  Some of these attributes are ignored for full screen windows.  The new
4126b877906bSopenharmony_ci *  value will take effect if the window is later made windowed.
4127b877906bSopenharmony_ci *
4128b877906bSopenharmony_ci *  Some of these attributes are ignored for windowed mode windows.  The new
4129b877906bSopenharmony_ci *  value will take effect if the window is later made full screen.
4130b877906bSopenharmony_ci *
4131b877906bSopenharmony_ci *  @param[in] window The window to set the attribute for.
4132b877906bSopenharmony_ci *  @param[in] attrib A supported window attribute.
4133b877906bSopenharmony_ci *  @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.
4134b877906bSopenharmony_ci *
4135b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
4136b877906bSopenharmony_ci *  GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref
4137b877906bSopenharmony_ci *  GLFW_FEATURE_UNAVAILABLE (see remarks).
4138b877906bSopenharmony_ci *
4139b877906bSopenharmony_ci *  @remark Calling @ref glfwGetWindowAttrib will always return the latest
4140b877906bSopenharmony_ci *  value, even if that value is ignored by the current mode of the window.
4141b877906bSopenharmony_ci *
4142b877906bSopenharmony_ci *  @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window attribute is
4143b877906bSopenharmony_ci *  not supported.  Setting this will emit @ref GLFW_FEATURE_UNAVAILABLE.
4144b877906bSopenharmony_ci *
4145b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4146b877906bSopenharmony_ci *
4147b877906bSopenharmony_ci *  @sa @ref window_attribs
4148b877906bSopenharmony_ci *  @sa @ref glfwGetWindowAttrib
4149b877906bSopenharmony_ci *
4150b877906bSopenharmony_ci *  @since Added in version 3.3.
4151b877906bSopenharmony_ci *
4152b877906bSopenharmony_ci *  @ingroup window
4153b877906bSopenharmony_ci */
4154b877906bSopenharmony_ciGLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value);
4155b877906bSopenharmony_ci
4156b877906bSopenharmony_ci/*! @brief Sets the user pointer of the specified window.
4157b877906bSopenharmony_ci *
4158b877906bSopenharmony_ci *  This function sets the user-defined pointer of the specified window.  The
4159b877906bSopenharmony_ci *  current value is retained until the window is destroyed.  The initial value
4160b877906bSopenharmony_ci *  is `NULL`.
4161b877906bSopenharmony_ci *
4162b877906bSopenharmony_ci *  @param[in] window The window whose pointer to set.
4163b877906bSopenharmony_ci *  @param[in] pointer The new value.
4164b877906bSopenharmony_ci *
4165b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4166b877906bSopenharmony_ci *
4167b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
4168b877906bSopenharmony_ci *  synchronized.
4169b877906bSopenharmony_ci *
4170b877906bSopenharmony_ci *  @sa @ref window_userptr
4171b877906bSopenharmony_ci *  @sa @ref glfwGetWindowUserPointer
4172b877906bSopenharmony_ci *
4173b877906bSopenharmony_ci *  @since Added in version 3.0.
4174b877906bSopenharmony_ci *
4175b877906bSopenharmony_ci *  @ingroup window
4176b877906bSopenharmony_ci */
4177b877906bSopenharmony_ciGLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
4178b877906bSopenharmony_ci
4179b877906bSopenharmony_ci/*! @brief Returns the user pointer of the specified window.
4180b877906bSopenharmony_ci *
4181b877906bSopenharmony_ci *  This function returns the current value of the user-defined pointer of the
4182b877906bSopenharmony_ci *  specified window.  The initial value is `NULL`.
4183b877906bSopenharmony_ci *
4184b877906bSopenharmony_ci *  @param[in] window The window whose pointer to return.
4185b877906bSopenharmony_ci *
4186b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4187b877906bSopenharmony_ci *
4188b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
4189b877906bSopenharmony_ci *  synchronized.
4190b877906bSopenharmony_ci *
4191b877906bSopenharmony_ci *  @sa @ref window_userptr
4192b877906bSopenharmony_ci *  @sa @ref glfwSetWindowUserPointer
4193b877906bSopenharmony_ci *
4194b877906bSopenharmony_ci *  @since Added in version 3.0.
4195b877906bSopenharmony_ci *
4196b877906bSopenharmony_ci *  @ingroup window
4197b877906bSopenharmony_ci */
4198b877906bSopenharmony_ciGLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
4199b877906bSopenharmony_ci
4200b877906bSopenharmony_ci/*! @brief Sets the position callback for the specified window.
4201b877906bSopenharmony_ci *
4202b877906bSopenharmony_ci *  This function sets the position callback of the specified window, which is
4203b877906bSopenharmony_ci *  called when the window is moved.  The callback is provided with the
4204b877906bSopenharmony_ci *  position, in screen coordinates, of the upper-left corner of the content
4205b877906bSopenharmony_ci *  area of the window.
4206b877906bSopenharmony_ci *
4207b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4208b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4209b877906bSopenharmony_ci *  callback.
4210b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4211b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4212b877906bSopenharmony_ci *
4213b877906bSopenharmony_ci *  @callback_signature
4214b877906bSopenharmony_ci *  @code
4215b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int xpos, int ypos)
4216b877906bSopenharmony_ci *  @endcode
4217b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4218b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowposfun).
4219b877906bSopenharmony_ci *
4220b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4221b877906bSopenharmony_ci *
4222b877906bSopenharmony_ci *  @remark @wayland This callback will never be called, as there is no way for
4223b877906bSopenharmony_ci *  an application to know its global position.
4224b877906bSopenharmony_ci *
4225b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4226b877906bSopenharmony_ci *
4227b877906bSopenharmony_ci *  @sa @ref window_pos
4228b877906bSopenharmony_ci *
4229b877906bSopenharmony_ci *  @since Added in version 3.0.
4230b877906bSopenharmony_ci *
4231b877906bSopenharmony_ci *  @ingroup window
4232b877906bSopenharmony_ci */
4233b877906bSopenharmony_ciGLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);
4234b877906bSopenharmony_ci
4235b877906bSopenharmony_ci/*! @brief Sets the size callback for the specified window.
4236b877906bSopenharmony_ci *
4237b877906bSopenharmony_ci *  This function sets the size callback of the specified window, which is
4238b877906bSopenharmony_ci *  called when the window is resized.  The callback is provided with the size,
4239b877906bSopenharmony_ci *  in screen coordinates, of the content area of the window.
4240b877906bSopenharmony_ci *
4241b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4242b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4243b877906bSopenharmony_ci *  callback.
4244b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4245b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4246b877906bSopenharmony_ci *
4247b877906bSopenharmony_ci *  @callback_signature
4248b877906bSopenharmony_ci *  @code
4249b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int width, int height)
4250b877906bSopenharmony_ci *  @endcode
4251b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4252b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowsizefun).
4253b877906bSopenharmony_ci *
4254b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4255b877906bSopenharmony_ci *
4256b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4257b877906bSopenharmony_ci *
4258b877906bSopenharmony_ci *  @sa @ref window_size
4259b877906bSopenharmony_ci *
4260b877906bSopenharmony_ci *  @since Added in version 1.0.
4261b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
4262b877906bSopenharmony_ci *
4263b877906bSopenharmony_ci *  @ingroup window
4264b877906bSopenharmony_ci */
4265b877906bSopenharmony_ciGLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);
4266b877906bSopenharmony_ci
4267b877906bSopenharmony_ci/*! @brief Sets the close callback for the specified window.
4268b877906bSopenharmony_ci *
4269b877906bSopenharmony_ci *  This function sets the close callback of the specified window, which is
4270b877906bSopenharmony_ci *  called when the user attempts to close the window, for example by clicking
4271b877906bSopenharmony_ci *  the close widget in the title bar.
4272b877906bSopenharmony_ci *
4273b877906bSopenharmony_ci *  The close flag is set before this callback is called, but you can modify it
4274b877906bSopenharmony_ci *  at any time with @ref glfwSetWindowShouldClose.
4275b877906bSopenharmony_ci *
4276b877906bSopenharmony_ci *  The close callback is not triggered by @ref glfwDestroyWindow.
4277b877906bSopenharmony_ci *
4278b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4279b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4280b877906bSopenharmony_ci *  callback.
4281b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4282b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4283b877906bSopenharmony_ci *
4284b877906bSopenharmony_ci *  @callback_signature
4285b877906bSopenharmony_ci *  @code
4286b877906bSopenharmony_ci *  void function_name(GLFWwindow* window)
4287b877906bSopenharmony_ci *  @endcode
4288b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4289b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowclosefun).
4290b877906bSopenharmony_ci *
4291b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4292b877906bSopenharmony_ci *
4293b877906bSopenharmony_ci *  @remark @macos Selecting Quit from the application menu will trigger the
4294b877906bSopenharmony_ci *  close callback for all windows.
4295b877906bSopenharmony_ci *
4296b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4297b877906bSopenharmony_ci *
4298b877906bSopenharmony_ci *  @sa @ref window_close
4299b877906bSopenharmony_ci *
4300b877906bSopenharmony_ci *  @since Added in version 2.5.
4301b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
4302b877906bSopenharmony_ci *
4303b877906bSopenharmony_ci *  @ingroup window
4304b877906bSopenharmony_ci */
4305b877906bSopenharmony_ciGLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);
4306b877906bSopenharmony_ci
4307b877906bSopenharmony_ci/*! @brief Sets the refresh callback for the specified window.
4308b877906bSopenharmony_ci *
4309b877906bSopenharmony_ci *  This function sets the refresh callback of the specified window, which is
4310b877906bSopenharmony_ci *  called when the content area of the window needs to be redrawn, for example
4311b877906bSopenharmony_ci *  if the window has been exposed after having been covered by another window.
4312b877906bSopenharmony_ci *
4313b877906bSopenharmony_ci *  On compositing window systems such as Aero, Compiz, Aqua or Wayland, where
4314b877906bSopenharmony_ci *  the window contents are saved off-screen, this callback may be called only
4315b877906bSopenharmony_ci *  very infrequently or never at all.
4316b877906bSopenharmony_ci *
4317b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4318b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4319b877906bSopenharmony_ci *  callback.
4320b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4321b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4322b877906bSopenharmony_ci *
4323b877906bSopenharmony_ci *  @callback_signature
4324b877906bSopenharmony_ci *  @code
4325b877906bSopenharmony_ci *  void function_name(GLFWwindow* window);
4326b877906bSopenharmony_ci *  @endcode
4327b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4328b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowrefreshfun).
4329b877906bSopenharmony_ci *
4330b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4331b877906bSopenharmony_ci *
4332b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4333b877906bSopenharmony_ci *
4334b877906bSopenharmony_ci *  @sa @ref window_refresh
4335b877906bSopenharmony_ci *
4336b877906bSopenharmony_ci *  @since Added in version 2.5.
4337b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
4338b877906bSopenharmony_ci *
4339b877906bSopenharmony_ci *  @ingroup window
4340b877906bSopenharmony_ci */
4341b877906bSopenharmony_ciGLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);
4342b877906bSopenharmony_ci
4343b877906bSopenharmony_ci/*! @brief Sets the focus callback for the specified window.
4344b877906bSopenharmony_ci *
4345b877906bSopenharmony_ci *  This function sets the focus callback of the specified window, which is
4346b877906bSopenharmony_ci *  called when the window gains or loses input focus.
4347b877906bSopenharmony_ci *
4348b877906bSopenharmony_ci *  After the focus callback is called for a window that lost input focus,
4349b877906bSopenharmony_ci *  synthetic key and mouse button release events will be generated for all such
4350b877906bSopenharmony_ci *  that had been pressed.  For more information, see @ref glfwSetKeyCallback
4351b877906bSopenharmony_ci *  and @ref glfwSetMouseButtonCallback.
4352b877906bSopenharmony_ci *
4353b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4354b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4355b877906bSopenharmony_ci *  callback.
4356b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4357b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4358b877906bSopenharmony_ci *
4359b877906bSopenharmony_ci *  @callback_signature
4360b877906bSopenharmony_ci *  @code
4361b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int focused)
4362b877906bSopenharmony_ci *  @endcode
4363b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4364b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowfocusfun).
4365b877906bSopenharmony_ci *
4366b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4367b877906bSopenharmony_ci *
4368b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4369b877906bSopenharmony_ci *
4370b877906bSopenharmony_ci *  @sa @ref window_focus
4371b877906bSopenharmony_ci *
4372b877906bSopenharmony_ci *  @since Added in version 3.0.
4373b877906bSopenharmony_ci *
4374b877906bSopenharmony_ci *  @ingroup window
4375b877906bSopenharmony_ci */
4376b877906bSopenharmony_ciGLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);
4377b877906bSopenharmony_ci
4378b877906bSopenharmony_ci/*! @brief Sets the iconify callback for the specified window.
4379b877906bSopenharmony_ci *
4380b877906bSopenharmony_ci *  This function sets the iconification callback of the specified window, which
4381b877906bSopenharmony_ci *  is called when the window is iconified or restored.
4382b877906bSopenharmony_ci *
4383b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4384b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4385b877906bSopenharmony_ci *  callback.
4386b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4387b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4388b877906bSopenharmony_ci *
4389b877906bSopenharmony_ci *  @callback_signature
4390b877906bSopenharmony_ci *  @code
4391b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int iconified)
4392b877906bSopenharmony_ci *  @endcode
4393b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4394b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowiconifyfun).
4395b877906bSopenharmony_ci *
4396b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4397b877906bSopenharmony_ci *
4398b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4399b877906bSopenharmony_ci *
4400b877906bSopenharmony_ci *  @sa @ref window_iconify
4401b877906bSopenharmony_ci *
4402b877906bSopenharmony_ci *  @since Added in version 3.0.
4403b877906bSopenharmony_ci *
4404b877906bSopenharmony_ci *  @ingroup window
4405b877906bSopenharmony_ci */
4406b877906bSopenharmony_ciGLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);
4407b877906bSopenharmony_ci
4408b877906bSopenharmony_ci/*! @brief Sets the maximize callback for the specified window.
4409b877906bSopenharmony_ci *
4410b877906bSopenharmony_ci *  This function sets the maximization callback of the specified window, which
4411b877906bSopenharmony_ci *  is called when the window is maximized or restored.
4412b877906bSopenharmony_ci *
4413b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4414b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4415b877906bSopenharmony_ci *  callback.
4416b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4417b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4418b877906bSopenharmony_ci *
4419b877906bSopenharmony_ci *  @callback_signature
4420b877906bSopenharmony_ci *  @code
4421b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int maximized)
4422b877906bSopenharmony_ci *  @endcode
4423b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4424b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowmaximizefun).
4425b877906bSopenharmony_ci *
4426b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4427b877906bSopenharmony_ci *
4428b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4429b877906bSopenharmony_ci *
4430b877906bSopenharmony_ci *  @sa @ref window_maximize
4431b877906bSopenharmony_ci *
4432b877906bSopenharmony_ci *  @since Added in version 3.3.
4433b877906bSopenharmony_ci *
4434b877906bSopenharmony_ci *  @ingroup window
4435b877906bSopenharmony_ci */
4436b877906bSopenharmony_ciGLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);
4437b877906bSopenharmony_ci
4438b877906bSopenharmony_ci/*! @brief Sets the framebuffer resize callback for the specified window.
4439b877906bSopenharmony_ci *
4440b877906bSopenharmony_ci *  This function sets the framebuffer resize callback of the specified window,
4441b877906bSopenharmony_ci *  which is called when the framebuffer of the specified window is resized.
4442b877906bSopenharmony_ci *
4443b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4444b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4445b877906bSopenharmony_ci *  callback.
4446b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4447b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4448b877906bSopenharmony_ci *
4449b877906bSopenharmony_ci *  @callback_signature
4450b877906bSopenharmony_ci *  @code
4451b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int width, int height)
4452b877906bSopenharmony_ci *  @endcode
4453b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4454b877906bSopenharmony_ci *  [function pointer type](@ref GLFWframebuffersizefun).
4455b877906bSopenharmony_ci *
4456b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4457b877906bSopenharmony_ci *
4458b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4459b877906bSopenharmony_ci *
4460b877906bSopenharmony_ci *  @sa @ref window_fbsize
4461b877906bSopenharmony_ci *
4462b877906bSopenharmony_ci *  @since Added in version 3.0.
4463b877906bSopenharmony_ci *
4464b877906bSopenharmony_ci *  @ingroup window
4465b877906bSopenharmony_ci */
4466b877906bSopenharmony_ciGLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback);
4467b877906bSopenharmony_ci
4468b877906bSopenharmony_ci/*! @brief Sets the window content scale callback for the specified window.
4469b877906bSopenharmony_ci *
4470b877906bSopenharmony_ci *  This function sets the window content scale callback of the specified window,
4471b877906bSopenharmony_ci *  which is called when the content scale of the specified window changes.
4472b877906bSopenharmony_ci *
4473b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
4474b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
4475b877906bSopenharmony_ci *  callback.
4476b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
4477b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
4478b877906bSopenharmony_ci *
4479b877906bSopenharmony_ci *  @callback_signature
4480b877906bSopenharmony_ci *  @code
4481b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, float xscale, float yscale)
4482b877906bSopenharmony_ci *  @endcode
4483b877906bSopenharmony_ci *  For more information about the callback parameters, see the
4484b877906bSopenharmony_ci *  [function pointer type](@ref GLFWwindowcontentscalefun).
4485b877906bSopenharmony_ci *
4486b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4487b877906bSopenharmony_ci *
4488b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4489b877906bSopenharmony_ci *
4490b877906bSopenharmony_ci *  @sa @ref window_scale
4491b877906bSopenharmony_ci *  @sa @ref glfwGetWindowContentScale
4492b877906bSopenharmony_ci *
4493b877906bSopenharmony_ci *  @since Added in version 3.3.
4494b877906bSopenharmony_ci *
4495b877906bSopenharmony_ci *  @ingroup window
4496b877906bSopenharmony_ci */
4497b877906bSopenharmony_ciGLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);
4498b877906bSopenharmony_ci
4499b877906bSopenharmony_ci/*! @brief Processes all pending events.
4500b877906bSopenharmony_ci *
4501b877906bSopenharmony_ci *  This function processes only those events that are already in the event
4502b877906bSopenharmony_ci *  queue and then returns immediately.  Processing events will cause the window
4503b877906bSopenharmony_ci *  and input callbacks associated with those events to be called.
4504b877906bSopenharmony_ci *
4505b877906bSopenharmony_ci *  On some platforms, a window move, resize or menu operation will cause event
4506b877906bSopenharmony_ci *  processing to block.  This is due to how event processing is designed on
4507b877906bSopenharmony_ci *  those platforms.  You can use the
4508b877906bSopenharmony_ci *  [window refresh callback](@ref window_refresh) to redraw the contents of
4509b877906bSopenharmony_ci *  your window when necessary during such operations.
4510b877906bSopenharmony_ci *
4511b877906bSopenharmony_ci *  Do not assume that callbacks you set will _only_ be called in response to
4512b877906bSopenharmony_ci *  event processing functions like this one.  While it is necessary to poll for
4513b877906bSopenharmony_ci *  events, window systems that require GLFW to register callbacks of its own
4514b877906bSopenharmony_ci *  can pass events to GLFW in response to many window system function calls.
4515b877906bSopenharmony_ci *  GLFW will pass those events on to the application callbacks before
4516b877906bSopenharmony_ci *  returning.
4517b877906bSopenharmony_ci *
4518b877906bSopenharmony_ci *  Event processing is not required for joystick input to work.
4519b877906bSopenharmony_ci *
4520b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4521b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
4522b877906bSopenharmony_ci *
4523b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
4524b877906bSopenharmony_ci *
4525b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4526b877906bSopenharmony_ci *
4527b877906bSopenharmony_ci *  @sa @ref events
4528b877906bSopenharmony_ci *  @sa @ref glfwWaitEvents
4529b877906bSopenharmony_ci *  @sa @ref glfwWaitEventsTimeout
4530b877906bSopenharmony_ci *
4531b877906bSopenharmony_ci *  @since Added in version 1.0.
4532b877906bSopenharmony_ci *
4533b877906bSopenharmony_ci *  @ingroup window
4534b877906bSopenharmony_ci */
4535b877906bSopenharmony_ciGLFWAPI void glfwPollEvents(void);
4536b877906bSopenharmony_ci
4537b877906bSopenharmony_ci/*! @brief Waits until events are queued and processes them.
4538b877906bSopenharmony_ci *
4539b877906bSopenharmony_ci *  This function puts the calling thread to sleep until at least one event is
4540b877906bSopenharmony_ci *  available in the event queue.  Once one or more events are available,
4541b877906bSopenharmony_ci *  it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue
4542b877906bSopenharmony_ci *  are processed and the function then returns immediately.  Processing events
4543b877906bSopenharmony_ci *  will cause the window and input callbacks associated with those events to be
4544b877906bSopenharmony_ci *  called.
4545b877906bSopenharmony_ci *
4546b877906bSopenharmony_ci *  Since not all events are associated with callbacks, this function may return
4547b877906bSopenharmony_ci *  without a callback having been called even if you are monitoring all
4548b877906bSopenharmony_ci *  callbacks.
4549b877906bSopenharmony_ci *
4550b877906bSopenharmony_ci *  On some platforms, a window move, resize or menu operation will cause event
4551b877906bSopenharmony_ci *  processing to block.  This is due to how event processing is designed on
4552b877906bSopenharmony_ci *  those platforms.  You can use the
4553b877906bSopenharmony_ci *  [window refresh callback](@ref window_refresh) to redraw the contents of
4554b877906bSopenharmony_ci *  your window when necessary during such operations.
4555b877906bSopenharmony_ci *
4556b877906bSopenharmony_ci *  Do not assume that callbacks you set will _only_ be called in response to
4557b877906bSopenharmony_ci *  event processing functions like this one.  While it is necessary to poll for
4558b877906bSopenharmony_ci *  events, window systems that require GLFW to register callbacks of its own
4559b877906bSopenharmony_ci *  can pass events to GLFW in response to many window system function calls.
4560b877906bSopenharmony_ci *  GLFW will pass those events on to the application callbacks before
4561b877906bSopenharmony_ci *  returning.
4562b877906bSopenharmony_ci *
4563b877906bSopenharmony_ci *  Event processing is not required for joystick input to work.
4564b877906bSopenharmony_ci *
4565b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4566b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
4567b877906bSopenharmony_ci *
4568b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
4569b877906bSopenharmony_ci *
4570b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4571b877906bSopenharmony_ci *
4572b877906bSopenharmony_ci *  @sa @ref events
4573b877906bSopenharmony_ci *  @sa @ref glfwPollEvents
4574b877906bSopenharmony_ci *  @sa @ref glfwWaitEventsTimeout
4575b877906bSopenharmony_ci *
4576b877906bSopenharmony_ci *  @since Added in version 2.5.
4577b877906bSopenharmony_ci *
4578b877906bSopenharmony_ci *  @ingroup window
4579b877906bSopenharmony_ci */
4580b877906bSopenharmony_ciGLFWAPI void glfwWaitEvents(void);
4581b877906bSopenharmony_ci
4582b877906bSopenharmony_ci/*! @brief Waits with timeout until events are queued and processes them.
4583b877906bSopenharmony_ci *
4584b877906bSopenharmony_ci *  This function puts the calling thread to sleep until at least one event is
4585b877906bSopenharmony_ci *  available in the event queue, or until the specified timeout is reached.  If
4586b877906bSopenharmony_ci *  one or more events are available, it behaves exactly like @ref
4587b877906bSopenharmony_ci *  glfwPollEvents, i.e. the events in the queue are processed and the function
4588b877906bSopenharmony_ci *  then returns immediately.  Processing events will cause the window and input
4589b877906bSopenharmony_ci *  callbacks associated with those events to be called.
4590b877906bSopenharmony_ci *
4591b877906bSopenharmony_ci *  The timeout value must be a positive finite number.
4592b877906bSopenharmony_ci *
4593b877906bSopenharmony_ci *  Since not all events are associated with callbacks, this function may return
4594b877906bSopenharmony_ci *  without a callback having been called even if you are monitoring all
4595b877906bSopenharmony_ci *  callbacks.
4596b877906bSopenharmony_ci *
4597b877906bSopenharmony_ci *  On some platforms, a window move, resize or menu operation will cause event
4598b877906bSopenharmony_ci *  processing to block.  This is due to how event processing is designed on
4599b877906bSopenharmony_ci *  those platforms.  You can use the
4600b877906bSopenharmony_ci *  [window refresh callback](@ref window_refresh) to redraw the contents of
4601b877906bSopenharmony_ci *  your window when necessary during such operations.
4602b877906bSopenharmony_ci *
4603b877906bSopenharmony_ci *  Do not assume that callbacks you set will _only_ be called in response to
4604b877906bSopenharmony_ci *  event processing functions like this one.  While it is necessary to poll for
4605b877906bSopenharmony_ci *  events, window systems that require GLFW to register callbacks of its own
4606b877906bSopenharmony_ci *  can pass events to GLFW in response to many window system function calls.
4607b877906bSopenharmony_ci *  GLFW will pass those events on to the application callbacks before
4608b877906bSopenharmony_ci *  returning.
4609b877906bSopenharmony_ci *
4610b877906bSopenharmony_ci *  Event processing is not required for joystick input to work.
4611b877906bSopenharmony_ci *
4612b877906bSopenharmony_ci *  @param[in] timeout The maximum amount of time, in seconds, to wait.
4613b877906bSopenharmony_ci *
4614b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
4615b877906bSopenharmony_ci *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
4616b877906bSopenharmony_ci *
4617b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
4618b877906bSopenharmony_ci *
4619b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4620b877906bSopenharmony_ci *
4621b877906bSopenharmony_ci *  @sa @ref events
4622b877906bSopenharmony_ci *  @sa @ref glfwPollEvents
4623b877906bSopenharmony_ci *  @sa @ref glfwWaitEvents
4624b877906bSopenharmony_ci *
4625b877906bSopenharmony_ci *  @since Added in version 3.2.
4626b877906bSopenharmony_ci *
4627b877906bSopenharmony_ci *  @ingroup window
4628b877906bSopenharmony_ci */
4629b877906bSopenharmony_ciGLFWAPI void glfwWaitEventsTimeout(double timeout);
4630b877906bSopenharmony_ci
4631b877906bSopenharmony_ci/*! @brief Posts an empty event to the event queue.
4632b877906bSopenharmony_ci *
4633b877906bSopenharmony_ci *  This function posts an empty event from the current thread to the event
4634b877906bSopenharmony_ci *  queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.
4635b877906bSopenharmony_ci *
4636b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4637b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
4638b877906bSopenharmony_ci *
4639b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
4640b877906bSopenharmony_ci *
4641b877906bSopenharmony_ci *  @sa @ref events
4642b877906bSopenharmony_ci *  @sa @ref glfwWaitEvents
4643b877906bSopenharmony_ci *  @sa @ref glfwWaitEventsTimeout
4644b877906bSopenharmony_ci *
4645b877906bSopenharmony_ci *  @since Added in version 3.1.
4646b877906bSopenharmony_ci *
4647b877906bSopenharmony_ci *  @ingroup window
4648b877906bSopenharmony_ci */
4649b877906bSopenharmony_ciGLFWAPI void glfwPostEmptyEvent(void);
4650b877906bSopenharmony_ci
4651b877906bSopenharmony_ci/*! @brief Returns the value of an input option for the specified window.
4652b877906bSopenharmony_ci *
4653b877906bSopenharmony_ci *  This function returns the value of an input option for the specified window.
4654b877906bSopenharmony_ci *  The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
4655b877906bSopenharmony_ci *  @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
4656b877906bSopenharmony_ci *  @ref GLFW_RAW_MOUSE_MOTION.
4657b877906bSopenharmony_ci *
4658b877906bSopenharmony_ci *  @param[in] window The window to query.
4659b877906bSopenharmony_ci *  @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
4660b877906bSopenharmony_ci *  `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
4661b877906bSopenharmony_ci *  `GLFW_RAW_MOUSE_MOTION`.
4662b877906bSopenharmony_ci *
4663b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4664b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
4665b877906bSopenharmony_ci *
4666b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4667b877906bSopenharmony_ci *
4668b877906bSopenharmony_ci *  @sa @ref glfwSetInputMode
4669b877906bSopenharmony_ci *
4670b877906bSopenharmony_ci *  @since Added in version 3.0.
4671b877906bSopenharmony_ci *
4672b877906bSopenharmony_ci *  @ingroup input
4673b877906bSopenharmony_ci */
4674b877906bSopenharmony_ciGLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
4675b877906bSopenharmony_ci
4676b877906bSopenharmony_ci/*! @brief Sets an input option for the specified window.
4677b877906bSopenharmony_ci *
4678b877906bSopenharmony_ci *  This function sets an input mode option for the specified window.  The mode
4679b877906bSopenharmony_ci *  must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
4680b877906bSopenharmony_ci *  @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS
4681b877906bSopenharmony_ci *  @ref GLFW_RAW_MOUSE_MOTION, or @ref GLFW_UNLIMITED_MOUSE_BUTTONS.
4682b877906bSopenharmony_ci *
4683b877906bSopenharmony_ci *  If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
4684b877906bSopenharmony_ci *  modes:
4685b877906bSopenharmony_ci *  - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.
4686b877906bSopenharmony_ci *  - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the
4687b877906bSopenharmony_ci *    content area of the window but does not restrict the cursor from leaving.
4688b877906bSopenharmony_ci *  - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual
4689b877906bSopenharmony_ci *    and unlimited cursor movement.  This is useful for implementing for
4690b877906bSopenharmony_ci *    example 3D camera controls.
4691b877906bSopenharmony_ci *  - `GLFW_CURSOR_CAPTURED` makes the cursor visible and confines it to the
4692b877906bSopenharmony_ci *    content area of the window.
4693b877906bSopenharmony_ci *
4694b877906bSopenharmony_ci *  If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to
4695b877906bSopenharmony_ci *  enable sticky keys, or `GLFW_FALSE` to disable it.  If sticky keys are
4696b877906bSopenharmony_ci *  enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`
4697b877906bSopenharmony_ci *  the next time it is called even if the key had been released before the
4698b877906bSopenharmony_ci *  call.  This is useful when you are only interested in whether keys have been
4699b877906bSopenharmony_ci *  pressed but not when or in which order.
4700b877906bSopenharmony_ci *
4701b877906bSopenharmony_ci *  If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either
4702b877906bSopenharmony_ci *  `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.
4703b877906bSopenharmony_ci *  If sticky mouse buttons are enabled, a mouse button press will ensure that
4704b877906bSopenharmony_ci *  @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even
4705b877906bSopenharmony_ci *  if the mouse button had been released before the call.  This is useful when
4706b877906bSopenharmony_ci *  you are only interested in whether mouse buttons have been pressed but not
4707b877906bSopenharmony_ci *  when or in which order.
4708b877906bSopenharmony_ci *
4709b877906bSopenharmony_ci *  If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to
4710b877906bSopenharmony_ci *  enable lock key modifier bits, or `GLFW_FALSE` to disable them.  If enabled,
4711b877906bSopenharmony_ci *  callbacks that receive modifier bits will also have the @ref
4712b877906bSopenharmony_ci *  GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on,
4713b877906bSopenharmony_ci *  and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on.
4714b877906bSopenharmony_ci *
4715b877906bSopenharmony_ci *  If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE`
4716b877906bSopenharmony_ci *  to enable raw (unscaled and unaccelerated) mouse motion when the cursor is
4717b877906bSopenharmony_ci *  disabled, or `GLFW_FALSE` to disable it.  If raw motion is not supported,
4718b877906bSopenharmony_ci *  attempting to set this will emit @ref GLFW_FEATURE_UNAVAILABLE.  Call @ref
4719b877906bSopenharmony_ci *  glfwRawMouseMotionSupported to check for support.
4720b877906bSopenharmony_ci *
4721b877906bSopenharmony_ci *  If the mode is `GLFW_UNLIMITED_MOUSE_BUTTONS`, the value must be either
4722b877906bSopenharmony_ci *  `GLFW_TRUE` to disable the mouse button limit when calling the mouse button
4723b877906bSopenharmony_ci *  callback, or `GLFW_FALSE` to limit the mouse buttons sent to the callback
4724b877906bSopenharmony_ci *  to the mouse button token values up to `GLFW_MOUSE_BUTTON_LAST`.
4725b877906bSopenharmony_ci *
4726b877906bSopenharmony_ci *  @param[in] window The window whose input mode to set.
4727b877906bSopenharmony_ci *  @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
4728b877906bSopenharmony_ci *  `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
4729b877906bSopenharmony_ci *  `GLFW_RAW_MOUSE_MOTION`.
4730b877906bSopenharmony_ci *  @param[in] value The new value of the specified input mode.
4731b877906bSopenharmony_ci *
4732b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
4733b877906bSopenharmony_ci *  GLFW_INVALID_ENUM, @ref GLFW_PLATFORM_ERROR and @ref
4734b877906bSopenharmony_ci *  GLFW_FEATURE_UNAVAILABLE (see above).
4735b877906bSopenharmony_ci *
4736b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4737b877906bSopenharmony_ci *
4738b877906bSopenharmony_ci *  @sa @ref glfwGetInputMode
4739b877906bSopenharmony_ci *
4740b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwEnable` and `glfwDisable`.
4741b877906bSopenharmony_ci *
4742b877906bSopenharmony_ci *  @ingroup input
4743b877906bSopenharmony_ci */
4744b877906bSopenharmony_ciGLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
4745b877906bSopenharmony_ci
4746b877906bSopenharmony_ci/*! @brief Returns whether raw mouse motion is supported.
4747b877906bSopenharmony_ci *
4748b877906bSopenharmony_ci *  This function returns whether raw mouse motion is supported on the current
4749b877906bSopenharmony_ci *  system.  This status does not change after GLFW has been initialized so you
4750b877906bSopenharmony_ci *  only need to check this once.  If you attempt to enable raw motion on
4751b877906bSopenharmony_ci *  a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted.
4752b877906bSopenharmony_ci *
4753b877906bSopenharmony_ci *  Raw mouse motion is closer to the actual motion of the mouse across
4754b877906bSopenharmony_ci *  a surface.  It is not affected by the scaling and acceleration applied to
4755b877906bSopenharmony_ci *  the motion of the desktop cursor.  That processing is suitable for a cursor
4756b877906bSopenharmony_ci *  while raw motion is better for controlling for example a 3D camera.  Because
4757b877906bSopenharmony_ci *  of this, raw mouse motion is only provided when the cursor is disabled.
4758b877906bSopenharmony_ci *
4759b877906bSopenharmony_ci *  @return `GLFW_TRUE` if raw mouse motion is supported on the current machine,
4760b877906bSopenharmony_ci *  or `GLFW_FALSE` otherwise.
4761b877906bSopenharmony_ci *
4762b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
4763b877906bSopenharmony_ci *
4764b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4765b877906bSopenharmony_ci *
4766b877906bSopenharmony_ci *  @sa @ref raw_mouse_motion
4767b877906bSopenharmony_ci *  @sa @ref glfwSetInputMode
4768b877906bSopenharmony_ci *
4769b877906bSopenharmony_ci *  @since Added in version 3.3.
4770b877906bSopenharmony_ci *
4771b877906bSopenharmony_ci *  @ingroup input
4772b877906bSopenharmony_ci */
4773b877906bSopenharmony_ciGLFWAPI int glfwRawMouseMotionSupported(void);
4774b877906bSopenharmony_ci
4775b877906bSopenharmony_ci/*! @brief Returns the layout-specific name of the specified printable key.
4776b877906bSopenharmony_ci *
4777b877906bSopenharmony_ci *  This function returns the name of the specified printable key, encoded as
4778b877906bSopenharmony_ci *  UTF-8.  This is typically the character that key would produce without any
4779b877906bSopenharmony_ci *  modifier keys, intended for displaying key bindings to the user.  For dead
4780b877906bSopenharmony_ci *  keys, it is typically the diacritic it would add to a character.
4781b877906bSopenharmony_ci *
4782b877906bSopenharmony_ci *  __Do not use this function__ for [text input](@ref input_char).  You will
4783b877906bSopenharmony_ci *  break text input for many languages even if it happens to work for yours.
4784b877906bSopenharmony_ci *
4785b877906bSopenharmony_ci *  If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key,
4786b877906bSopenharmony_ci *  otherwise the scancode is ignored.  If you specify a non-printable key, or
4787b877906bSopenharmony_ci *  `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this
4788b877906bSopenharmony_ci *  function returns `NULL` but does not emit an error.
4789b877906bSopenharmony_ci *
4790b877906bSopenharmony_ci *  This behavior allows you to always pass in the arguments in the
4791b877906bSopenharmony_ci *  [key callback](@ref input_key) without modification.
4792b877906bSopenharmony_ci *
4793b877906bSopenharmony_ci *  The printable keys are:
4794b877906bSopenharmony_ci *  - `GLFW_KEY_APOSTROPHE`
4795b877906bSopenharmony_ci *  - `GLFW_KEY_COMMA`
4796b877906bSopenharmony_ci *  - `GLFW_KEY_MINUS`
4797b877906bSopenharmony_ci *  - `GLFW_KEY_PERIOD`
4798b877906bSopenharmony_ci *  - `GLFW_KEY_SLASH`
4799b877906bSopenharmony_ci *  - `GLFW_KEY_SEMICOLON`
4800b877906bSopenharmony_ci *  - `GLFW_KEY_EQUAL`
4801b877906bSopenharmony_ci *  - `GLFW_KEY_LEFT_BRACKET`
4802b877906bSopenharmony_ci *  - `GLFW_KEY_RIGHT_BRACKET`
4803b877906bSopenharmony_ci *  - `GLFW_KEY_BACKSLASH`
4804b877906bSopenharmony_ci *  - `GLFW_KEY_WORLD_1`
4805b877906bSopenharmony_ci *  - `GLFW_KEY_WORLD_2`
4806b877906bSopenharmony_ci *  - `GLFW_KEY_0` to `GLFW_KEY_9`
4807b877906bSopenharmony_ci *  - `GLFW_KEY_A` to `GLFW_KEY_Z`
4808b877906bSopenharmony_ci *  - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`
4809b877906bSopenharmony_ci *  - `GLFW_KEY_KP_DECIMAL`
4810b877906bSopenharmony_ci *  - `GLFW_KEY_KP_DIVIDE`
4811b877906bSopenharmony_ci *  - `GLFW_KEY_KP_MULTIPLY`
4812b877906bSopenharmony_ci *  - `GLFW_KEY_KP_SUBTRACT`
4813b877906bSopenharmony_ci *  - `GLFW_KEY_KP_ADD`
4814b877906bSopenharmony_ci *  - `GLFW_KEY_KP_EQUAL`
4815b877906bSopenharmony_ci *
4816b877906bSopenharmony_ci *  Names for printable keys depend on keyboard layout, while names for
4817b877906bSopenharmony_ci *  non-printable keys are the same across layouts but depend on the application
4818b877906bSopenharmony_ci *  language and should be localized along with other user interface text.
4819b877906bSopenharmony_ci *
4820b877906bSopenharmony_ci *  @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.
4821b877906bSopenharmony_ci *  @param[in] scancode The scancode of the key to query.
4822b877906bSopenharmony_ci *  @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.
4823b877906bSopenharmony_ci *
4824b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
4825b877906bSopenharmony_ci *  GLFW_INVALID_VALUE, @ref GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
4826b877906bSopenharmony_ci *
4827b877906bSopenharmony_ci *  @remark The contents of the returned string may change when a keyboard
4828b877906bSopenharmony_ci *  layout change event is received.
4829b877906bSopenharmony_ci *
4830b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
4831b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the library is terminated.
4832b877906bSopenharmony_ci *
4833b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4834b877906bSopenharmony_ci *
4835b877906bSopenharmony_ci *  @sa @ref input_key_name
4836b877906bSopenharmony_ci *
4837b877906bSopenharmony_ci *  @since Added in version 3.2.
4838b877906bSopenharmony_ci *
4839b877906bSopenharmony_ci *  @ingroup input
4840b877906bSopenharmony_ci */
4841b877906bSopenharmony_ciGLFWAPI const char* glfwGetKeyName(int key, int scancode);
4842b877906bSopenharmony_ci
4843b877906bSopenharmony_ci/*! @brief Returns the platform-specific scancode of the specified key.
4844b877906bSopenharmony_ci *
4845b877906bSopenharmony_ci *  This function returns the platform-specific scancode of the specified key.
4846b877906bSopenharmony_ci *
4847b877906bSopenharmony_ci *  If the specified [key token](@ref keys) corresponds to a physical key not
4848b877906bSopenharmony_ci *  supported on the current platform then this method will return `-1`.
4849b877906bSopenharmony_ci *  Calling this function with anything other than a key token will return `-1`
4850b877906bSopenharmony_ci *  and generate a @ref GLFW_INVALID_ENUM error.
4851b877906bSopenharmony_ci *
4852b877906bSopenharmony_ci *  @param[in] key Any [key token](@ref keys).
4853b877906bSopenharmony_ci *  @return The platform-specific scancode for the key, or `-1` if the key is
4854b877906bSopenharmony_ci *  not supported on the current platform or an [error](@ref error_handling)
4855b877906bSopenharmony_ci *  occurred.
4856b877906bSopenharmony_ci *
4857b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4858b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
4859b877906bSopenharmony_ci *
4860b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
4861b877906bSopenharmony_ci *
4862b877906bSopenharmony_ci *  @sa @ref input_key
4863b877906bSopenharmony_ci *
4864b877906bSopenharmony_ci *  @since Added in version 3.3.
4865b877906bSopenharmony_ci *
4866b877906bSopenharmony_ci *  @ingroup input
4867b877906bSopenharmony_ci */
4868b877906bSopenharmony_ciGLFWAPI int glfwGetKeyScancode(int key);
4869b877906bSopenharmony_ci
4870b877906bSopenharmony_ci/*! @brief Returns the last reported state of a keyboard key for the specified
4871b877906bSopenharmony_ci *  window.
4872b877906bSopenharmony_ci *
4873b877906bSopenharmony_ci *  This function returns the last state reported for the specified key to the
4874b877906bSopenharmony_ci *  specified window.  The returned state is one of `GLFW_PRESS` or
4875b877906bSopenharmony_ci *  `GLFW_RELEASE`.  The action `GLFW_REPEAT` is only reported to the key callback.
4876b877906bSopenharmony_ci *
4877b877906bSopenharmony_ci *  If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns
4878b877906bSopenharmony_ci *  `GLFW_PRESS` the first time you call it for a key that was pressed, even if
4879b877906bSopenharmony_ci *  that key has already been released.
4880b877906bSopenharmony_ci *
4881b877906bSopenharmony_ci *  The key functions deal with physical keys, with [key tokens](@ref keys)
4882b877906bSopenharmony_ci *  named after their use on the standard US keyboard layout.  If you want to
4883b877906bSopenharmony_ci *  input text, use the Unicode character callback instead.
4884b877906bSopenharmony_ci *
4885b877906bSopenharmony_ci *  The [modifier key bit masks](@ref mods) are not key tokens and cannot be
4886b877906bSopenharmony_ci *  used with this function.
4887b877906bSopenharmony_ci *
4888b877906bSopenharmony_ci *  __Do not use this function__ to implement [text input](@ref input_char).
4889b877906bSopenharmony_ci *
4890b877906bSopenharmony_ci *  @param[in] window The desired window.
4891b877906bSopenharmony_ci *  @param[in] key The desired [keyboard key](@ref keys).  `GLFW_KEY_UNKNOWN` is
4892b877906bSopenharmony_ci *  not a valid key for this function.
4893b877906bSopenharmony_ci *  @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
4894b877906bSopenharmony_ci *
4895b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4896b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
4897b877906bSopenharmony_ci *
4898b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4899b877906bSopenharmony_ci *
4900b877906bSopenharmony_ci *  @sa @ref input_key
4901b877906bSopenharmony_ci *
4902b877906bSopenharmony_ci *  @since Added in version 1.0.
4903b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
4904b877906bSopenharmony_ci *
4905b877906bSopenharmony_ci *  @ingroup input
4906b877906bSopenharmony_ci */
4907b877906bSopenharmony_ciGLFWAPI int glfwGetKey(GLFWwindow* window, int key);
4908b877906bSopenharmony_ci
4909b877906bSopenharmony_ci/*! @brief Returns the last reported state of a mouse button for the specified
4910b877906bSopenharmony_ci *  window.
4911b877906bSopenharmony_ci *
4912b877906bSopenharmony_ci *  This function returns the last state reported for the specified mouse button
4913b877906bSopenharmony_ci *  to the specified window.  The returned state is one of `GLFW_PRESS` or
4914b877906bSopenharmony_ci *  `GLFW_RELEASE`.
4915b877906bSopenharmony_ci *
4916b877906bSopenharmony_ci *  If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
4917b877906bSopenharmony_ci *  returns `GLFW_PRESS` the first time you call it for a mouse button that was
4918b877906bSopenharmony_ci *  pressed, even if that mouse button has already been released.
4919b877906bSopenharmony_ci *
4920b877906bSopenharmony_ci *  The @ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode does not effect the
4921b877906bSopenharmony_ci *  limit on buttons which can be polled with this function.
4922b877906bSopenharmony_ci *
4923b877906bSopenharmony_ci *  @param[in] window The desired window.
4924b877906bSopenharmony_ci *  @param[in] button The desired [mouse button token](@ref buttons).
4925b877906bSopenharmony_ci *  @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
4926b877906bSopenharmony_ci *
4927b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4928b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
4929b877906bSopenharmony_ci *
4930b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4931b877906bSopenharmony_ci *
4932b877906bSopenharmony_ci *  @sa @ref input_mouse_button
4933b877906bSopenharmony_ci *
4934b877906bSopenharmony_ci *  @since Added in version 1.0.
4935b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
4936b877906bSopenharmony_ci *
4937b877906bSopenharmony_ci *  @ingroup input
4938b877906bSopenharmony_ci */
4939b877906bSopenharmony_ciGLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
4940b877906bSopenharmony_ci
4941b877906bSopenharmony_ci/*! @brief Retrieves the position of the cursor relative to the content area of
4942b877906bSopenharmony_ci *  the window.
4943b877906bSopenharmony_ci *
4944b877906bSopenharmony_ci *  This function returns the position of the cursor, in screen coordinates,
4945b877906bSopenharmony_ci *  relative to the upper-left corner of the content area of the specified
4946b877906bSopenharmony_ci *  window.
4947b877906bSopenharmony_ci *
4948b877906bSopenharmony_ci *  If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor
4949b877906bSopenharmony_ci *  position is unbounded and limited only by the minimum and maximum values of
4950b877906bSopenharmony_ci *  a `double`.
4951b877906bSopenharmony_ci *
4952b877906bSopenharmony_ci *  The coordinate can be converted to their integer equivalents with the
4953b877906bSopenharmony_ci *  `floor` function.  Casting directly to an integer type works for positive
4954b877906bSopenharmony_ci *  coordinates, but fails for negative ones.
4955b877906bSopenharmony_ci *
4956b877906bSopenharmony_ci *  Any or all of the position arguments may be `NULL`.  If an error occurs, all
4957b877906bSopenharmony_ci *  non-`NULL` position arguments will be set to zero.
4958b877906bSopenharmony_ci *
4959b877906bSopenharmony_ci *  @param[in] window The desired window.
4960b877906bSopenharmony_ci *  @param[out] xpos Where to store the cursor x-coordinate, relative to the
4961b877906bSopenharmony_ci *  left edge of the content area, or `NULL`.
4962b877906bSopenharmony_ci *  @param[out] ypos Where to store the cursor y-coordinate, relative to the to
4963b877906bSopenharmony_ci *  top edge of the content area, or `NULL`.
4964b877906bSopenharmony_ci *
4965b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
4966b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
4967b877906bSopenharmony_ci *
4968b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
4969b877906bSopenharmony_ci *
4970b877906bSopenharmony_ci *  @sa @ref cursor_pos
4971b877906bSopenharmony_ci *  @sa @ref glfwSetCursorPos
4972b877906bSopenharmony_ci *
4973b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwGetMousePos`.
4974b877906bSopenharmony_ci *
4975b877906bSopenharmony_ci *  @ingroup input
4976b877906bSopenharmony_ci */
4977b877906bSopenharmony_ciGLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
4978b877906bSopenharmony_ci
4979b877906bSopenharmony_ci/*! @brief Sets the position of the cursor, relative to the content area of the
4980b877906bSopenharmony_ci *  window.
4981b877906bSopenharmony_ci *
4982b877906bSopenharmony_ci *  This function sets the position, in screen coordinates, of the cursor
4983b877906bSopenharmony_ci *  relative to the upper-left corner of the content area of the specified
4984b877906bSopenharmony_ci *  window.  The window must have input focus.  If the window does not have
4985b877906bSopenharmony_ci *  input focus when this function is called, it fails silently.
4986b877906bSopenharmony_ci *
4987b877906bSopenharmony_ci *  __Do not use this function__ to implement things like camera controls.  GLFW
4988b877906bSopenharmony_ci *  already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the
4989b877906bSopenharmony_ci *  cursor, transparently re-centers it and provides unconstrained cursor
4990b877906bSopenharmony_ci *  motion.  See @ref glfwSetInputMode for more information.
4991b877906bSopenharmony_ci *
4992b877906bSopenharmony_ci *  If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is
4993b877906bSopenharmony_ci *  unconstrained and limited only by the minimum and maximum values of
4994b877906bSopenharmony_ci *  a `double`.
4995b877906bSopenharmony_ci *
4996b877906bSopenharmony_ci *  @param[in] window The desired window.
4997b877906bSopenharmony_ci *  @param[in] xpos The desired x-coordinate, relative to the left edge of the
4998b877906bSopenharmony_ci *  content area.
4999b877906bSopenharmony_ci *  @param[in] ypos The desired y-coordinate, relative to the top edge of the
5000b877906bSopenharmony_ci *  content area.
5001b877906bSopenharmony_ci *
5002b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5003b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
5004b877906bSopenharmony_ci *
5005b877906bSopenharmony_ci *  @remark @wayland This function will only work when the cursor mode is
5006b877906bSopenharmony_ci *  `GLFW_CURSOR_DISABLED`, otherwise it will emit @ref GLFW_FEATURE_UNAVAILABLE.
5007b877906bSopenharmony_ci *
5008b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5009b877906bSopenharmony_ci *
5010b877906bSopenharmony_ci *  @sa @ref cursor_pos
5011b877906bSopenharmony_ci *  @sa @ref glfwGetCursorPos
5012b877906bSopenharmony_ci *
5013b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwSetMousePos`.
5014b877906bSopenharmony_ci *
5015b877906bSopenharmony_ci *  @ingroup input
5016b877906bSopenharmony_ci */
5017b877906bSopenharmony_ciGLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
5018b877906bSopenharmony_ci
5019b877906bSopenharmony_ci/*! @brief Creates a custom cursor.
5020b877906bSopenharmony_ci *
5021b877906bSopenharmony_ci *  Creates a new custom cursor image that can be set for a window with @ref
5022b877906bSopenharmony_ci *  glfwSetCursor.  The cursor can be destroyed with @ref glfwDestroyCursor.
5023b877906bSopenharmony_ci *  Any remaining cursors are destroyed by @ref glfwTerminate.
5024b877906bSopenharmony_ci *
5025b877906bSopenharmony_ci *  The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
5026b877906bSopenharmony_ci *  bits per channel with the red channel first.  They are arranged canonically
5027b877906bSopenharmony_ci *  as packed sequential rows, starting from the top-left corner.
5028b877906bSopenharmony_ci *
5029b877906bSopenharmony_ci *  The cursor hotspot is specified in pixels, relative to the upper-left corner
5030b877906bSopenharmony_ci *  of the cursor image.  Like all other coordinate systems in GLFW, the X-axis
5031b877906bSopenharmony_ci *  points to the right and the Y-axis points down.
5032b877906bSopenharmony_ci *
5033b877906bSopenharmony_ci *  @param[in] image The desired cursor image.
5034b877906bSopenharmony_ci *  @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.
5035b877906bSopenharmony_ci *  @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.
5036b877906bSopenharmony_ci *  @return The handle of the created cursor, or `NULL` if an
5037b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5038b877906bSopenharmony_ci *
5039b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5040b877906bSopenharmony_ci *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
5041b877906bSopenharmony_ci *
5042b877906bSopenharmony_ci *  @pointer_lifetime The specified image data is copied before this function
5043b877906bSopenharmony_ci *  returns.
5044b877906bSopenharmony_ci *
5045b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5046b877906bSopenharmony_ci *
5047b877906bSopenharmony_ci *  @sa @ref cursor_object
5048b877906bSopenharmony_ci *  @sa @ref glfwDestroyCursor
5049b877906bSopenharmony_ci *  @sa @ref glfwCreateStandardCursor
5050b877906bSopenharmony_ci *
5051b877906bSopenharmony_ci *  @since Added in version 3.1.
5052b877906bSopenharmony_ci *
5053b877906bSopenharmony_ci *  @ingroup input
5054b877906bSopenharmony_ci */
5055b877906bSopenharmony_ciGLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot);
5056b877906bSopenharmony_ci
5057b877906bSopenharmony_ci/*! @brief Creates a cursor with a standard shape.
5058b877906bSopenharmony_ci *
5059b877906bSopenharmony_ci *  Returns a cursor with a standard shape, that can be set for a window with
5060b877906bSopenharmony_ci *  @ref glfwSetCursor.  The images for these cursors come from the system
5061b877906bSopenharmony_ci *  cursor theme and their exact appearance will vary between platforms.
5062b877906bSopenharmony_ci *
5063b877906bSopenharmony_ci *  Most of these shapes are guaranteed to exist on every supported platform but
5064b877906bSopenharmony_ci *  a few may not be present.  See the table below for details.
5065b877906bSopenharmony_ci *
5066b877906bSopenharmony_ci *  Cursor shape                   | Windows | macOS | X11    | Wayland
5067b877906bSopenharmony_ci *  ------------------------------ | ------- | ----- | ------ | -------
5068b877906bSopenharmony_ci *  @ref GLFW_ARROW_CURSOR         | Yes     | Yes   | Yes    | Yes
5069b877906bSopenharmony_ci *  @ref GLFW_IBEAM_CURSOR         | Yes     | Yes   | Yes    | Yes
5070b877906bSopenharmony_ci *  @ref GLFW_CROSSHAIR_CURSOR     | Yes     | Yes   | Yes    | Yes
5071b877906bSopenharmony_ci *  @ref GLFW_POINTING_HAND_CURSOR | Yes     | Yes   | Yes    | Yes
5072b877906bSopenharmony_ci *  @ref GLFW_RESIZE_EW_CURSOR     | Yes     | Yes   | Yes    | Yes
5073b877906bSopenharmony_ci *  @ref GLFW_RESIZE_NS_CURSOR     | Yes     | Yes   | Yes    | Yes
5074b877906bSopenharmony_ci *  @ref GLFW_RESIZE_NWSE_CURSOR   | Yes     | Yes<sup>1</sup> | Maybe<sup>2</sup> | Maybe<sup>2</sup>
5075b877906bSopenharmony_ci *  @ref GLFW_RESIZE_NESW_CURSOR   | Yes     | Yes<sup>1</sup> | Maybe<sup>2</sup> | Maybe<sup>2</sup>
5076b877906bSopenharmony_ci *  @ref GLFW_RESIZE_ALL_CURSOR    | Yes     | Yes   | Yes    | Yes
5077b877906bSopenharmony_ci *  @ref GLFW_NOT_ALLOWED_CURSOR   | Yes     | Yes   | Maybe<sup>2</sup> | Maybe<sup>2</sup>
5078b877906bSopenharmony_ci *
5079b877906bSopenharmony_ci *  1) This uses a private system API and may fail in the future.
5080b877906bSopenharmony_ci *
5081b877906bSopenharmony_ci *  2) This uses a newer standard that not all cursor themes support.
5082b877906bSopenharmony_ci *
5083b877906bSopenharmony_ci *  If the requested shape is not available, this function emits a @ref
5084b877906bSopenharmony_ci *  GLFW_CURSOR_UNAVAILABLE error and returns `NULL`.
5085b877906bSopenharmony_ci *
5086b877906bSopenharmony_ci *  @param[in] shape One of the [standard shapes](@ref shapes).
5087b877906bSopenharmony_ci *  @return A new cursor ready to use or `NULL` if an
5088b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5089b877906bSopenharmony_ci *
5090b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5091b877906bSopenharmony_ci *  GLFW_INVALID_ENUM, @ref GLFW_CURSOR_UNAVAILABLE and @ref
5092b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
5093b877906bSopenharmony_ci *
5094b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5095b877906bSopenharmony_ci *
5096b877906bSopenharmony_ci *  @sa @ref cursor_standard
5097b877906bSopenharmony_ci *  @sa @ref glfwCreateCursor
5098b877906bSopenharmony_ci *
5099b877906bSopenharmony_ci *  @since Added in version 3.1.
5100b877906bSopenharmony_ci *
5101b877906bSopenharmony_ci *  @ingroup input
5102b877906bSopenharmony_ci */
5103b877906bSopenharmony_ciGLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);
5104b877906bSopenharmony_ci
5105b877906bSopenharmony_ci/*! @brief Destroys a cursor.
5106b877906bSopenharmony_ci *
5107b877906bSopenharmony_ci *  This function destroys a cursor previously created with @ref
5108b877906bSopenharmony_ci *  glfwCreateCursor.  Any remaining cursors will be destroyed by @ref
5109b877906bSopenharmony_ci *  glfwTerminate.
5110b877906bSopenharmony_ci *
5111b877906bSopenharmony_ci *  If the specified cursor is current for any window, that window will be
5112b877906bSopenharmony_ci *  reverted to the default cursor.  This does not affect the cursor mode.
5113b877906bSopenharmony_ci *
5114b877906bSopenharmony_ci *  @param[in] cursor The cursor object to destroy.
5115b877906bSopenharmony_ci *
5116b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5117b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
5118b877906bSopenharmony_ci *
5119b877906bSopenharmony_ci *  @reentrancy This function must not be called from a callback.
5120b877906bSopenharmony_ci *
5121b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5122b877906bSopenharmony_ci *
5123b877906bSopenharmony_ci *  @sa @ref cursor_object
5124b877906bSopenharmony_ci *  @sa @ref glfwCreateCursor
5125b877906bSopenharmony_ci *
5126b877906bSopenharmony_ci *  @since Added in version 3.1.
5127b877906bSopenharmony_ci *
5128b877906bSopenharmony_ci *  @ingroup input
5129b877906bSopenharmony_ci */
5130b877906bSopenharmony_ciGLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);
5131b877906bSopenharmony_ci
5132b877906bSopenharmony_ci/*! @brief Sets the cursor for the window.
5133b877906bSopenharmony_ci *
5134b877906bSopenharmony_ci *  This function sets the cursor image to be used when the cursor is over the
5135b877906bSopenharmony_ci *  content area of the specified window.  The set cursor will only be visible
5136b877906bSopenharmony_ci *  when the [cursor mode](@ref cursor_mode) of the window is
5137b877906bSopenharmony_ci *  `GLFW_CURSOR_NORMAL`.
5138b877906bSopenharmony_ci *
5139b877906bSopenharmony_ci *  On some platforms, the set cursor may not be visible unless the window also
5140b877906bSopenharmony_ci *  has input focus.
5141b877906bSopenharmony_ci *
5142b877906bSopenharmony_ci *  @param[in] window The window to set the cursor for.
5143b877906bSopenharmony_ci *  @param[in] cursor The cursor to set, or `NULL` to switch back to the default
5144b877906bSopenharmony_ci *  arrow cursor.
5145b877906bSopenharmony_ci *
5146b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5147b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
5148b877906bSopenharmony_ci *
5149b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5150b877906bSopenharmony_ci *
5151b877906bSopenharmony_ci *  @sa @ref cursor_object
5152b877906bSopenharmony_ci *
5153b877906bSopenharmony_ci *  @since Added in version 3.1.
5154b877906bSopenharmony_ci *
5155b877906bSopenharmony_ci *  @ingroup input
5156b877906bSopenharmony_ci */
5157b877906bSopenharmony_ciGLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
5158b877906bSopenharmony_ci
5159b877906bSopenharmony_ci/*! @brief Sets the key callback.
5160b877906bSopenharmony_ci *
5161b877906bSopenharmony_ci *  This function sets the key callback of the specified window, which is called
5162b877906bSopenharmony_ci *  when a key is pressed, repeated or released.
5163b877906bSopenharmony_ci *
5164b877906bSopenharmony_ci *  The key functions deal with physical keys, with layout independent
5165b877906bSopenharmony_ci *  [key tokens](@ref keys) named after their values in the standard US keyboard
5166b877906bSopenharmony_ci *  layout.  If you want to input text, use the
5167b877906bSopenharmony_ci *  [character callback](@ref glfwSetCharCallback) instead.
5168b877906bSopenharmony_ci *
5169b877906bSopenharmony_ci *  When a window loses input focus, it will generate synthetic key release
5170b877906bSopenharmony_ci *  events for all pressed keys with associated key tokens.  You can tell these
5171b877906bSopenharmony_ci *  events from user-generated events by the fact that the synthetic ones are
5172b877906bSopenharmony_ci *  generated after the focus loss event has been processed, i.e. after the
5173b877906bSopenharmony_ci *  [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
5174b877906bSopenharmony_ci *
5175b877906bSopenharmony_ci *  The scancode of a key is specific to that platform or sometimes even to that
5176b877906bSopenharmony_ci *  machine.  Scancodes are intended to allow users to bind keys that don't have
5177b877906bSopenharmony_ci *  a GLFW key token.  Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their
5178b877906bSopenharmony_ci *  state is not saved and so it cannot be queried with @ref glfwGetKey.
5179b877906bSopenharmony_ci *
5180b877906bSopenharmony_ci *  Sometimes GLFW needs to generate synthetic key events, in which case the
5181b877906bSopenharmony_ci *  scancode may be zero.
5182b877906bSopenharmony_ci *
5183b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5184b877906bSopenharmony_ci *  @param[in] callback The new key callback, or `NULL` to remove the currently
5185b877906bSopenharmony_ci *  set callback.
5186b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5187b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5188b877906bSopenharmony_ci *
5189b877906bSopenharmony_ci *  @callback_signature
5190b877906bSopenharmony_ci *  @code
5191b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
5192b877906bSopenharmony_ci *  @endcode
5193b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5194b877906bSopenharmony_ci *  [function pointer type](@ref GLFWkeyfun).
5195b877906bSopenharmony_ci *
5196b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5197b877906bSopenharmony_ci *
5198b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5199b877906bSopenharmony_ci *
5200b877906bSopenharmony_ci *  @sa @ref input_key
5201b877906bSopenharmony_ci *
5202b877906bSopenharmony_ci *  @since Added in version 1.0.
5203b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
5204b877906bSopenharmony_ci *
5205b877906bSopenharmony_ci *  @ingroup input
5206b877906bSopenharmony_ci */
5207b877906bSopenharmony_ciGLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);
5208b877906bSopenharmony_ci
5209b877906bSopenharmony_ci/*! @brief Sets the Unicode character callback.
5210b877906bSopenharmony_ci *
5211b877906bSopenharmony_ci *  This function sets the character callback of the specified window, which is
5212b877906bSopenharmony_ci *  called when a Unicode character is input.
5213b877906bSopenharmony_ci *
5214b877906bSopenharmony_ci *  The character callback is intended for Unicode text input.  As it deals with
5215b877906bSopenharmony_ci *  characters, it is keyboard layout dependent, whereas the
5216b877906bSopenharmony_ci *  [key callback](@ref glfwSetKeyCallback) is not.  Characters do not map 1:1
5217b877906bSopenharmony_ci *  to physical keys, as a key may produce zero, one or more characters.  If you
5218b877906bSopenharmony_ci *  want to know whether a specific physical key was pressed or released, see
5219b877906bSopenharmony_ci *  the key callback instead.
5220b877906bSopenharmony_ci *
5221b877906bSopenharmony_ci *  The character callback behaves as system text input normally does and will
5222b877906bSopenharmony_ci *  not be called if modifier keys are held down that would prevent normal text
5223b877906bSopenharmony_ci *  input on that platform, for example a Super (Command) key on macOS or Alt key
5224b877906bSopenharmony_ci *  on Windows.
5225b877906bSopenharmony_ci *
5226b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5227b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5228b877906bSopenharmony_ci *  callback.
5229b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5230b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5231b877906bSopenharmony_ci *
5232b877906bSopenharmony_ci *  @callback_signature
5233b877906bSopenharmony_ci *  @code
5234b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, unsigned int codepoint)
5235b877906bSopenharmony_ci *  @endcode
5236b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5237b877906bSopenharmony_ci *  [function pointer type](@ref GLFWcharfun).
5238b877906bSopenharmony_ci *
5239b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5240b877906bSopenharmony_ci *
5241b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5242b877906bSopenharmony_ci *
5243b877906bSopenharmony_ci *  @sa @ref input_char
5244b877906bSopenharmony_ci *
5245b877906bSopenharmony_ci *  @since Added in version 2.4.
5246b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
5247b877906bSopenharmony_ci *
5248b877906bSopenharmony_ci *  @ingroup input
5249b877906bSopenharmony_ci */
5250b877906bSopenharmony_ciGLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);
5251b877906bSopenharmony_ci
5252b877906bSopenharmony_ci/*! @brief Sets the Unicode character with modifiers callback.
5253b877906bSopenharmony_ci *
5254b877906bSopenharmony_ci *  This function sets the character with modifiers callback of the specified
5255b877906bSopenharmony_ci *  window, which is called when a Unicode character is input regardless of what
5256b877906bSopenharmony_ci *  modifier keys are used.
5257b877906bSopenharmony_ci *
5258b877906bSopenharmony_ci *  The character with modifiers callback is intended for implementing custom
5259b877906bSopenharmony_ci *  Unicode character input.  For regular Unicode text input, see the
5260b877906bSopenharmony_ci *  [character callback](@ref glfwSetCharCallback).  Like the character
5261b877906bSopenharmony_ci *  callback, the character with modifiers callback deals with characters and is
5262b877906bSopenharmony_ci *  keyboard layout dependent.  Characters do not map 1:1 to physical keys, as
5263b877906bSopenharmony_ci *  a key may produce zero, one or more characters.  If you want to know whether
5264b877906bSopenharmony_ci *  a specific physical key was pressed or released, see the
5265b877906bSopenharmony_ci *  [key callback](@ref glfwSetKeyCallback) instead.
5266b877906bSopenharmony_ci *
5267b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5268b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5269b877906bSopenharmony_ci *  callback.
5270b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or an
5271b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5272b877906bSopenharmony_ci *
5273b877906bSopenharmony_ci *  @callback_signature
5274b877906bSopenharmony_ci *  @code
5275b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
5276b877906bSopenharmony_ci *  @endcode
5277b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5278b877906bSopenharmony_ci *  [function pointer type](@ref GLFWcharmodsfun).
5279b877906bSopenharmony_ci *
5280b877906bSopenharmony_ci *  @deprecated Scheduled for removal in version 4.0.
5281b877906bSopenharmony_ci *
5282b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5283b877906bSopenharmony_ci *
5284b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5285b877906bSopenharmony_ci *
5286b877906bSopenharmony_ci *  @sa @ref input_char
5287b877906bSopenharmony_ci *
5288b877906bSopenharmony_ci *  @since Added in version 3.1.
5289b877906bSopenharmony_ci *
5290b877906bSopenharmony_ci *  @ingroup input
5291b877906bSopenharmony_ci */
5292b877906bSopenharmony_ciGLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);
5293b877906bSopenharmony_ci
5294b877906bSopenharmony_ci/*! @brief Sets the mouse button callback.
5295b877906bSopenharmony_ci *
5296b877906bSopenharmony_ci *  This function sets the mouse button callback of the specified window, which
5297b877906bSopenharmony_ci *  is called when a mouse button is pressed or released.
5298b877906bSopenharmony_ci *
5299b877906bSopenharmony_ci *  When a window loses input focus, it will generate synthetic mouse button
5300b877906bSopenharmony_ci *  release events for all pressed mouse buttons with associated button tokens.
5301b877906bSopenharmony_ci *  You can tell these events from user-generated events by the fact that the
5302b877906bSopenharmony_ci *  synthetic ones are generated after the focus loss event has been processed,
5303b877906bSopenharmony_ci *  i.e. after the [window focus callback](@ref glfwSetWindowFocusCallback) has
5304b877906bSopenharmony_ci *  been called.
5305b877906bSopenharmony_ci *
5306b877906bSopenharmony_ci *  The reported `button` value can be higher than `GLFW_MOUSE_BUTTON_LAST` if
5307b877906bSopenharmony_ci *  the button does not have an associated [button token](@ref buttons) and the
5308b877906bSopenharmony_ci *  @ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode is set.
5309b877906bSopenharmony_ci *
5310b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5311b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5312b877906bSopenharmony_ci *  callback.
5313b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5314b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5315b877906bSopenharmony_ci *
5316b877906bSopenharmony_ci *  @callback_signature
5317b877906bSopenharmony_ci *  @code
5318b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int button, int action, int mods)
5319b877906bSopenharmony_ci *  @endcode
5320b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5321b877906bSopenharmony_ci *  [function pointer type](@ref GLFWmousebuttonfun).
5322b877906bSopenharmony_ci *
5323b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5324b877906bSopenharmony_ci *
5325b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5326b877906bSopenharmony_ci *
5327b877906bSopenharmony_ci *  @sa @ref input_mouse_button
5328b877906bSopenharmony_ci *
5329b877906bSopenharmony_ci *  @since Added in version 1.0.
5330b877906bSopenharmony_ci *  @glfw3 Added window handle parameter and return value.
5331b877906bSopenharmony_ci *
5332b877906bSopenharmony_ci *  @ingroup input
5333b877906bSopenharmony_ci */
5334b877906bSopenharmony_ciGLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
5335b877906bSopenharmony_ci
5336b877906bSopenharmony_ci/*! @brief Sets the cursor position callback.
5337b877906bSopenharmony_ci *
5338b877906bSopenharmony_ci *  This function sets the cursor position callback of the specified window,
5339b877906bSopenharmony_ci *  which is called when the cursor is moved.  The callback is provided with the
5340b877906bSopenharmony_ci *  position, in screen coordinates, relative to the upper-left corner of the
5341b877906bSopenharmony_ci *  content area of the window.
5342b877906bSopenharmony_ci *
5343b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5344b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5345b877906bSopenharmony_ci *  callback.
5346b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5347b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5348b877906bSopenharmony_ci *
5349b877906bSopenharmony_ci *  @callback_signature
5350b877906bSopenharmony_ci *  @code
5351b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, double xpos, double ypos);
5352b877906bSopenharmony_ci *  @endcode
5353b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5354b877906bSopenharmony_ci *  [function pointer type](@ref GLFWcursorposfun).
5355b877906bSopenharmony_ci *
5356b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5357b877906bSopenharmony_ci *
5358b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5359b877906bSopenharmony_ci *
5360b877906bSopenharmony_ci *  @sa @ref cursor_pos
5361b877906bSopenharmony_ci *
5362b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwSetMousePosCallback`.
5363b877906bSopenharmony_ci *
5364b877906bSopenharmony_ci *  @ingroup input
5365b877906bSopenharmony_ci */
5366b877906bSopenharmony_ciGLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
5367b877906bSopenharmony_ci
5368b877906bSopenharmony_ci/*! @brief Sets the cursor enter/leave callback.
5369b877906bSopenharmony_ci *
5370b877906bSopenharmony_ci *  This function sets the cursor boundary crossing callback of the specified
5371b877906bSopenharmony_ci *  window, which is called when the cursor enters or leaves the content area of
5372b877906bSopenharmony_ci *  the window.
5373b877906bSopenharmony_ci *
5374b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5375b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5376b877906bSopenharmony_ci *  callback.
5377b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5378b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5379b877906bSopenharmony_ci *
5380b877906bSopenharmony_ci *  @callback_signature
5381b877906bSopenharmony_ci *  @code
5382b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int entered)
5383b877906bSopenharmony_ci *  @endcode
5384b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5385b877906bSopenharmony_ci *  [function pointer type](@ref GLFWcursorenterfun).
5386b877906bSopenharmony_ci *
5387b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5388b877906bSopenharmony_ci *
5389b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5390b877906bSopenharmony_ci *
5391b877906bSopenharmony_ci *  @sa @ref cursor_enter
5392b877906bSopenharmony_ci *
5393b877906bSopenharmony_ci *  @since Added in version 3.0.
5394b877906bSopenharmony_ci *
5395b877906bSopenharmony_ci *  @ingroup input
5396b877906bSopenharmony_ci */
5397b877906bSopenharmony_ciGLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);
5398b877906bSopenharmony_ci
5399b877906bSopenharmony_ci/*! @brief Sets the scroll callback.
5400b877906bSopenharmony_ci *
5401b877906bSopenharmony_ci *  This function sets the scroll callback of the specified window, which is
5402b877906bSopenharmony_ci *  called when a scrolling device is used, such as a mouse wheel or scrolling
5403b877906bSopenharmony_ci *  area of a touchpad.
5404b877906bSopenharmony_ci *
5405b877906bSopenharmony_ci *  The scroll callback receives all scrolling input, like that from a mouse
5406b877906bSopenharmony_ci *  wheel or a touchpad scrolling area.
5407b877906bSopenharmony_ci *
5408b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5409b877906bSopenharmony_ci *  @param[in] callback The new scroll callback, or `NULL` to remove the
5410b877906bSopenharmony_ci *  currently set callback.
5411b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5412b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5413b877906bSopenharmony_ci *
5414b877906bSopenharmony_ci *  @callback_signature
5415b877906bSopenharmony_ci *  @code
5416b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, double xoffset, double yoffset)
5417b877906bSopenharmony_ci *  @endcode
5418b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5419b877906bSopenharmony_ci *  [function pointer type](@ref GLFWscrollfun).
5420b877906bSopenharmony_ci *
5421b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5422b877906bSopenharmony_ci *
5423b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5424b877906bSopenharmony_ci *
5425b877906bSopenharmony_ci *  @sa @ref scrolling
5426b877906bSopenharmony_ci *
5427b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwSetMouseWheelCallback`.
5428b877906bSopenharmony_ci *
5429b877906bSopenharmony_ci *  @ingroup input
5430b877906bSopenharmony_ci */
5431b877906bSopenharmony_ciGLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
5432b877906bSopenharmony_ci
5433b877906bSopenharmony_ci/*! @brief Sets the path drop callback.
5434b877906bSopenharmony_ci *
5435b877906bSopenharmony_ci *  This function sets the path drop callback of the specified window, which is
5436b877906bSopenharmony_ci *  called when one or more dragged paths are dropped on the window.
5437b877906bSopenharmony_ci *
5438b877906bSopenharmony_ci *  Because the path array and its strings may have been generated specifically
5439b877906bSopenharmony_ci *  for that event, they are not guaranteed to be valid after the callback has
5440b877906bSopenharmony_ci *  returned.  If you wish to use them after the callback returns, you need to
5441b877906bSopenharmony_ci *  make a deep copy.
5442b877906bSopenharmony_ci *
5443b877906bSopenharmony_ci *  @param[in] window The window whose callback to set.
5444b877906bSopenharmony_ci *  @param[in] callback The new file drop callback, or `NULL` to remove the
5445b877906bSopenharmony_ci *  currently set callback.
5446b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5447b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5448b877906bSopenharmony_ci *
5449b877906bSopenharmony_ci *  @callback_signature
5450b877906bSopenharmony_ci *  @code
5451b877906bSopenharmony_ci *  void function_name(GLFWwindow* window, int path_count, const char* paths[])
5452b877906bSopenharmony_ci *  @endcode
5453b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5454b877906bSopenharmony_ci *  [function pointer type](@ref GLFWdropfun).
5455b877906bSopenharmony_ci *
5456b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5457b877906bSopenharmony_ci *
5458b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5459b877906bSopenharmony_ci *
5460b877906bSopenharmony_ci *  @sa @ref path_drop
5461b877906bSopenharmony_ci *
5462b877906bSopenharmony_ci *  @since Added in version 3.1.
5463b877906bSopenharmony_ci *
5464b877906bSopenharmony_ci *  @ingroup input
5465b877906bSopenharmony_ci */
5466b877906bSopenharmony_ciGLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);
5467b877906bSopenharmony_ci
5468b877906bSopenharmony_ci/*! @brief Returns whether the specified joystick is present.
5469b877906bSopenharmony_ci *
5470b877906bSopenharmony_ci *  This function returns whether the specified joystick is present.
5471b877906bSopenharmony_ci *
5472b877906bSopenharmony_ci *  There is no need to call this function before other functions that accept
5473b877906bSopenharmony_ci *  a joystick ID, as they all check for presence before performing any other
5474b877906bSopenharmony_ci *  work.
5475b877906bSopenharmony_ci *
5476b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5477b877906bSopenharmony_ci *  @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.
5478b877906bSopenharmony_ci *
5479b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5480b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5481b877906bSopenharmony_ci *
5482b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5483b877906bSopenharmony_ci *
5484b877906bSopenharmony_ci *  @sa @ref joystick
5485b877906bSopenharmony_ci *
5486b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwGetJoystickParam`.
5487b877906bSopenharmony_ci *
5488b877906bSopenharmony_ci *  @ingroup input
5489b877906bSopenharmony_ci */
5490b877906bSopenharmony_ciGLFWAPI int glfwJoystickPresent(int jid);
5491b877906bSopenharmony_ci
5492b877906bSopenharmony_ci/*! @brief Returns the values of all axes of the specified joystick.
5493b877906bSopenharmony_ci *
5494b877906bSopenharmony_ci *  This function returns the values of all axes of the specified joystick.
5495b877906bSopenharmony_ci *  Each element in the array is a value between -1.0 and 1.0.
5496b877906bSopenharmony_ci *
5497b877906bSopenharmony_ci *  If the specified joystick is not present this function will return `NULL`
5498b877906bSopenharmony_ci *  but will not generate an error.  This can be used instead of first calling
5499b877906bSopenharmony_ci *  @ref glfwJoystickPresent.
5500b877906bSopenharmony_ci *
5501b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5502b877906bSopenharmony_ci *  @param[out] count Where to store the number of axis values in the returned
5503b877906bSopenharmony_ci *  array.  This is set to zero if the joystick is not present or an error
5504b877906bSopenharmony_ci *  occurred.
5505b877906bSopenharmony_ci *  @return An array of axis values, or `NULL` if the joystick is not present or
5506b877906bSopenharmony_ci *  an [error](@ref error_handling) occurred.
5507b877906bSopenharmony_ci *
5508b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5509b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5510b877906bSopenharmony_ci *
5511b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
5512b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5513b877906bSopenharmony_ci *  disconnected or the library is terminated.
5514b877906bSopenharmony_ci *
5515b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5516b877906bSopenharmony_ci *
5517b877906bSopenharmony_ci *  @sa @ref joystick_axis
5518b877906bSopenharmony_ci *
5519b877906bSopenharmony_ci *  @since Added in version 3.0.  Replaces `glfwGetJoystickPos`.
5520b877906bSopenharmony_ci *
5521b877906bSopenharmony_ci *  @ingroup input
5522b877906bSopenharmony_ci */
5523b877906bSopenharmony_ciGLFWAPI const float* glfwGetJoystickAxes(int jid, int* count);
5524b877906bSopenharmony_ci
5525b877906bSopenharmony_ci/*! @brief Returns the state of all buttons of the specified joystick.
5526b877906bSopenharmony_ci *
5527b877906bSopenharmony_ci *  This function returns the state of all buttons of the specified joystick.
5528b877906bSopenharmony_ci *  Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.
5529b877906bSopenharmony_ci *
5530b877906bSopenharmony_ci *  For backward compatibility with earlier versions that did not have @ref
5531b877906bSopenharmony_ci *  glfwGetJoystickHats, the button array also includes all hats, each
5532b877906bSopenharmony_ci *  represented as four buttons.  The hats are in the same order as returned by
5533b877906bSopenharmony_ci *  __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and
5534b877906bSopenharmony_ci *  _left_.  To disable these extra buttons, set the @ref
5535b877906bSopenharmony_ci *  GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.
5536b877906bSopenharmony_ci *
5537b877906bSopenharmony_ci *  If the specified joystick is not present this function will return `NULL`
5538b877906bSopenharmony_ci *  but will not generate an error.  This can be used instead of first calling
5539b877906bSopenharmony_ci *  @ref glfwJoystickPresent.
5540b877906bSopenharmony_ci *
5541b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5542b877906bSopenharmony_ci *  @param[out] count Where to store the number of button states in the returned
5543b877906bSopenharmony_ci *  array.  This is set to zero if the joystick is not present or an error
5544b877906bSopenharmony_ci *  occurred.
5545b877906bSopenharmony_ci *  @return An array of button states, or `NULL` if the joystick is not present
5546b877906bSopenharmony_ci *  or an [error](@ref error_handling) occurred.
5547b877906bSopenharmony_ci *
5548b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5549b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5550b877906bSopenharmony_ci *
5551b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
5552b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5553b877906bSopenharmony_ci *  disconnected or the library is terminated.
5554b877906bSopenharmony_ci *
5555b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5556b877906bSopenharmony_ci *
5557b877906bSopenharmony_ci *  @sa @ref joystick_button
5558b877906bSopenharmony_ci *
5559b877906bSopenharmony_ci *  @since Added in version 2.2.
5560b877906bSopenharmony_ci *  @glfw3 Changed to return a dynamic array.
5561b877906bSopenharmony_ci *
5562b877906bSopenharmony_ci *  @ingroup input
5563b877906bSopenharmony_ci */
5564b877906bSopenharmony_ciGLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count);
5565b877906bSopenharmony_ci
5566b877906bSopenharmony_ci/*! @brief Returns the state of all hats of the specified joystick.
5567b877906bSopenharmony_ci *
5568b877906bSopenharmony_ci *  This function returns the state of all hats of the specified joystick.
5569b877906bSopenharmony_ci *  Each element in the array is one of the following values:
5570b877906bSopenharmony_ci *
5571b877906bSopenharmony_ci *  Name                  | Value
5572b877906bSopenharmony_ci *  ----                  | -----
5573b877906bSopenharmony_ci *  `GLFW_HAT_CENTERED`   | 0
5574b877906bSopenharmony_ci *  `GLFW_HAT_UP`         | 1
5575b877906bSopenharmony_ci *  `GLFW_HAT_RIGHT`      | 2
5576b877906bSopenharmony_ci *  `GLFW_HAT_DOWN`       | 4
5577b877906bSopenharmony_ci *  `GLFW_HAT_LEFT`       | 8
5578b877906bSopenharmony_ci *  `GLFW_HAT_RIGHT_UP`   | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP`
5579b877906bSopenharmony_ci *  `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN`
5580b877906bSopenharmony_ci *  `GLFW_HAT_LEFT_UP`    | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP`
5581b877906bSopenharmony_ci *  `GLFW_HAT_LEFT_DOWN`  | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN`
5582b877906bSopenharmony_ci *
5583b877906bSopenharmony_ci *  The diagonal directions are bitwise combinations of the primary (up, right,
5584b877906bSopenharmony_ci *  down and left) directions and you can test for these individually by ANDing
5585b877906bSopenharmony_ci *  it with the corresponding direction.
5586b877906bSopenharmony_ci *
5587b877906bSopenharmony_ci *  @code
5588b877906bSopenharmony_ci *  if (hats[2] & GLFW_HAT_RIGHT)
5589b877906bSopenharmony_ci *  {
5590b877906bSopenharmony_ci *      // State of hat 2 could be right-up, right or right-down
5591b877906bSopenharmony_ci *  }
5592b877906bSopenharmony_ci *  @endcode
5593b877906bSopenharmony_ci *
5594b877906bSopenharmony_ci *  If the specified joystick is not present this function will return `NULL`
5595b877906bSopenharmony_ci *  but will not generate an error.  This can be used instead of first calling
5596b877906bSopenharmony_ci *  @ref glfwJoystickPresent.
5597b877906bSopenharmony_ci *
5598b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5599b877906bSopenharmony_ci *  @param[out] count Where to store the number of hat states in the returned
5600b877906bSopenharmony_ci *  array.  This is set to zero if the joystick is not present or an error
5601b877906bSopenharmony_ci *  occurred.
5602b877906bSopenharmony_ci *  @return An array of hat states, or `NULL` if the joystick is not present
5603b877906bSopenharmony_ci *  or an [error](@ref error_handling) occurred.
5604b877906bSopenharmony_ci *
5605b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5606b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5607b877906bSopenharmony_ci *
5608b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
5609b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5610b877906bSopenharmony_ci *  disconnected, this function is called again for that joystick or the library
5611b877906bSopenharmony_ci *  is terminated.
5612b877906bSopenharmony_ci *
5613b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5614b877906bSopenharmony_ci *
5615b877906bSopenharmony_ci *  @sa @ref joystick_hat
5616b877906bSopenharmony_ci *
5617b877906bSopenharmony_ci *  @since Added in version 3.3.
5618b877906bSopenharmony_ci *
5619b877906bSopenharmony_ci *  @ingroup input
5620b877906bSopenharmony_ci */
5621b877906bSopenharmony_ciGLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count);
5622b877906bSopenharmony_ci
5623b877906bSopenharmony_ci/*! @brief Returns the name of the specified joystick.
5624b877906bSopenharmony_ci *
5625b877906bSopenharmony_ci *  This function returns the name, encoded as UTF-8, of the specified joystick.
5626b877906bSopenharmony_ci *  The returned string is allocated and freed by GLFW.  You should not free it
5627b877906bSopenharmony_ci *  yourself.
5628b877906bSopenharmony_ci *
5629b877906bSopenharmony_ci *  If the specified joystick is not present this function will return `NULL`
5630b877906bSopenharmony_ci *  but will not generate an error.  This can be used instead of first calling
5631b877906bSopenharmony_ci *  @ref glfwJoystickPresent.
5632b877906bSopenharmony_ci *
5633b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5634b877906bSopenharmony_ci *  @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
5635b877906bSopenharmony_ci *  is not present or an [error](@ref error_handling) occurred.
5636b877906bSopenharmony_ci *
5637b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5638b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5639b877906bSopenharmony_ci *
5640b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
5641b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5642b877906bSopenharmony_ci *  disconnected or the library is terminated.
5643b877906bSopenharmony_ci *
5644b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5645b877906bSopenharmony_ci *
5646b877906bSopenharmony_ci *  @sa @ref joystick_name
5647b877906bSopenharmony_ci *
5648b877906bSopenharmony_ci *  @since Added in version 3.0.
5649b877906bSopenharmony_ci *
5650b877906bSopenharmony_ci *  @ingroup input
5651b877906bSopenharmony_ci */
5652b877906bSopenharmony_ciGLFWAPI const char* glfwGetJoystickName(int jid);
5653b877906bSopenharmony_ci
5654b877906bSopenharmony_ci/*! @brief Returns the SDL compatible GUID of the specified joystick.
5655b877906bSopenharmony_ci *
5656b877906bSopenharmony_ci *  This function returns the SDL compatible GUID, as a UTF-8 encoded
5657b877906bSopenharmony_ci *  hexadecimal string, of the specified joystick.  The returned string is
5658b877906bSopenharmony_ci *  allocated and freed by GLFW.  You should not free it yourself.
5659b877906bSopenharmony_ci *
5660b877906bSopenharmony_ci *  The GUID is what connects a joystick to a gamepad mapping.  A connected
5661b877906bSopenharmony_ci *  joystick will always have a GUID even if there is no gamepad mapping
5662b877906bSopenharmony_ci *  assigned to it.
5663b877906bSopenharmony_ci *
5664b877906bSopenharmony_ci *  If the specified joystick is not present this function will return `NULL`
5665b877906bSopenharmony_ci *  but will not generate an error.  This can be used instead of first calling
5666b877906bSopenharmony_ci *  @ref glfwJoystickPresent.
5667b877906bSopenharmony_ci *
5668b877906bSopenharmony_ci *  The GUID uses the format introduced in SDL 2.0.5.  This GUID tries to
5669b877906bSopenharmony_ci *  uniquely identify the make and model of a joystick but does not identify
5670b877906bSopenharmony_ci *  a specific unit, e.g. all wired Xbox 360 controllers will have the same
5671b877906bSopenharmony_ci *  GUID on that platform.  The GUID for a unit may vary between platforms
5672b877906bSopenharmony_ci *  depending on what hardware information the platform specific APIs provide.
5673b877906bSopenharmony_ci *
5674b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5675b877906bSopenharmony_ci *  @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick
5676b877906bSopenharmony_ci *  is not present or an [error](@ref error_handling) occurred.
5677b877906bSopenharmony_ci *
5678b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5679b877906bSopenharmony_ci *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
5680b877906bSopenharmony_ci *
5681b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
5682b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5683b877906bSopenharmony_ci *  disconnected or the library is terminated.
5684b877906bSopenharmony_ci *
5685b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5686b877906bSopenharmony_ci *
5687b877906bSopenharmony_ci *  @sa @ref gamepad
5688b877906bSopenharmony_ci *
5689b877906bSopenharmony_ci *  @since Added in version 3.3.
5690b877906bSopenharmony_ci *
5691b877906bSopenharmony_ci *  @ingroup input
5692b877906bSopenharmony_ci */
5693b877906bSopenharmony_ciGLFWAPI const char* glfwGetJoystickGUID(int jid);
5694b877906bSopenharmony_ci
5695b877906bSopenharmony_ci/*! @brief Sets the user pointer of the specified joystick.
5696b877906bSopenharmony_ci *
5697b877906bSopenharmony_ci *  This function sets the user-defined pointer of the specified joystick.  The
5698b877906bSopenharmony_ci *  current value is retained until the joystick is disconnected.  The initial
5699b877906bSopenharmony_ci *  value is `NULL`.
5700b877906bSopenharmony_ci *
5701b877906bSopenharmony_ci *  This function may be called from the joystick callback, even for a joystick
5702b877906bSopenharmony_ci *  that is being disconnected.
5703b877906bSopenharmony_ci *
5704b877906bSopenharmony_ci *  @param[in] jid The joystick whose pointer to set.
5705b877906bSopenharmony_ci *  @param[in] pointer The new value.
5706b877906bSopenharmony_ci *
5707b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5708b877906bSopenharmony_ci *
5709b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
5710b877906bSopenharmony_ci *  synchronized.
5711b877906bSopenharmony_ci *
5712b877906bSopenharmony_ci *  @sa @ref joystick_userptr
5713b877906bSopenharmony_ci *  @sa @ref glfwGetJoystickUserPointer
5714b877906bSopenharmony_ci *
5715b877906bSopenharmony_ci *  @since Added in version 3.3.
5716b877906bSopenharmony_ci *
5717b877906bSopenharmony_ci *  @ingroup input
5718b877906bSopenharmony_ci */
5719b877906bSopenharmony_ciGLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer);
5720b877906bSopenharmony_ci
5721b877906bSopenharmony_ci/*! @brief Returns the user pointer of the specified joystick.
5722b877906bSopenharmony_ci *
5723b877906bSopenharmony_ci *  This function returns the current value of the user-defined pointer of the
5724b877906bSopenharmony_ci *  specified joystick.  The initial value is `NULL`.
5725b877906bSopenharmony_ci *
5726b877906bSopenharmony_ci *  This function may be called from the joystick callback, even for a joystick
5727b877906bSopenharmony_ci *  that is being disconnected.
5728b877906bSopenharmony_ci *
5729b877906bSopenharmony_ci *  @param[in] jid The joystick whose pointer to return.
5730b877906bSopenharmony_ci *
5731b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5732b877906bSopenharmony_ci *
5733b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Access is not
5734b877906bSopenharmony_ci *  synchronized.
5735b877906bSopenharmony_ci *
5736b877906bSopenharmony_ci *  @sa @ref joystick_userptr
5737b877906bSopenharmony_ci *  @sa @ref glfwSetJoystickUserPointer
5738b877906bSopenharmony_ci *
5739b877906bSopenharmony_ci *  @since Added in version 3.3.
5740b877906bSopenharmony_ci *
5741b877906bSopenharmony_ci *  @ingroup input
5742b877906bSopenharmony_ci */
5743b877906bSopenharmony_ciGLFWAPI void* glfwGetJoystickUserPointer(int jid);
5744b877906bSopenharmony_ci
5745b877906bSopenharmony_ci/*! @brief Returns whether the specified joystick has a gamepad mapping.
5746b877906bSopenharmony_ci *
5747b877906bSopenharmony_ci *  This function returns whether the specified joystick is both present and has
5748b877906bSopenharmony_ci *  a gamepad mapping.
5749b877906bSopenharmony_ci *
5750b877906bSopenharmony_ci *  If the specified joystick is present but does not have a gamepad mapping
5751b877906bSopenharmony_ci *  this function will return `GLFW_FALSE` but will not generate an error.  Call
5752b877906bSopenharmony_ci *  @ref glfwJoystickPresent to check if a joystick is present regardless of
5753b877906bSopenharmony_ci *  whether it has a mapping.
5754b877906bSopenharmony_ci *
5755b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5756b877906bSopenharmony_ci *  @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping,
5757b877906bSopenharmony_ci *  or `GLFW_FALSE` otherwise.
5758b877906bSopenharmony_ci *
5759b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5760b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
5761b877906bSopenharmony_ci *
5762b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5763b877906bSopenharmony_ci *
5764b877906bSopenharmony_ci *  @sa @ref gamepad
5765b877906bSopenharmony_ci *  @sa @ref glfwGetGamepadState
5766b877906bSopenharmony_ci *
5767b877906bSopenharmony_ci *  @since Added in version 3.3.
5768b877906bSopenharmony_ci *
5769b877906bSopenharmony_ci *  @ingroup input
5770b877906bSopenharmony_ci */
5771b877906bSopenharmony_ciGLFWAPI int glfwJoystickIsGamepad(int jid);
5772b877906bSopenharmony_ci
5773b877906bSopenharmony_ci/*! @brief Sets the joystick configuration callback.
5774b877906bSopenharmony_ci *
5775b877906bSopenharmony_ci *  This function sets the joystick configuration callback, or removes the
5776b877906bSopenharmony_ci *  currently set callback.  This is called when a joystick is connected to or
5777b877906bSopenharmony_ci *  disconnected from the system.
5778b877906bSopenharmony_ci *
5779b877906bSopenharmony_ci *  For joystick connection and disconnection events to be delivered on all
5780b877906bSopenharmony_ci *  platforms, you need to call one of the [event processing](@ref events)
5781b877906bSopenharmony_ci *  functions.  Joystick disconnection may also be detected and the callback
5782b877906bSopenharmony_ci *  called by joystick functions.  The function will then return whatever it
5783b877906bSopenharmony_ci *  returns if the joystick is not present.
5784b877906bSopenharmony_ci *
5785b877906bSopenharmony_ci *  @param[in] callback The new callback, or `NULL` to remove the currently set
5786b877906bSopenharmony_ci *  callback.
5787b877906bSopenharmony_ci *  @return The previously set callback, or `NULL` if no callback was set or the
5788b877906bSopenharmony_ci *  library had not been [initialized](@ref intro_init).
5789b877906bSopenharmony_ci *
5790b877906bSopenharmony_ci *  @callback_signature
5791b877906bSopenharmony_ci *  @code
5792b877906bSopenharmony_ci *  void function_name(int jid, int event)
5793b877906bSopenharmony_ci *  @endcode
5794b877906bSopenharmony_ci *  For more information about the callback parameters, see the
5795b877906bSopenharmony_ci *  [function pointer type](@ref GLFWjoystickfun).
5796b877906bSopenharmony_ci *
5797b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5798b877906bSopenharmony_ci *
5799b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5800b877906bSopenharmony_ci *
5801b877906bSopenharmony_ci *  @sa @ref joystick_event
5802b877906bSopenharmony_ci *
5803b877906bSopenharmony_ci *  @since Added in version 3.2.
5804b877906bSopenharmony_ci *
5805b877906bSopenharmony_ci *  @ingroup input
5806b877906bSopenharmony_ci */
5807b877906bSopenharmony_ciGLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
5808b877906bSopenharmony_ci
5809b877906bSopenharmony_ci/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings.
5810b877906bSopenharmony_ci *
5811b877906bSopenharmony_ci *  This function parses the specified ASCII encoded string and updates the
5812b877906bSopenharmony_ci *  internal list with any gamepad mappings it finds.  This string may
5813b877906bSopenharmony_ci *  contain either a single gamepad mapping or many mappings separated by
5814b877906bSopenharmony_ci *  newlines.  The parser supports the full format of the `gamecontrollerdb.txt`
5815b877906bSopenharmony_ci *  source file including empty lines and comments.
5816b877906bSopenharmony_ci *
5817b877906bSopenharmony_ci *  See @ref gamepad_mapping for a description of the format.
5818b877906bSopenharmony_ci *
5819b877906bSopenharmony_ci *  If there is already a gamepad mapping for a given GUID in the internal list,
5820b877906bSopenharmony_ci *  it will be replaced by the one passed to this function.  If the library is
5821b877906bSopenharmony_ci *  terminated and re-initialized the internal list will revert to the built-in
5822b877906bSopenharmony_ci *  default.
5823b877906bSopenharmony_ci *
5824b877906bSopenharmony_ci *  @param[in] string The string containing the gamepad mappings.
5825b877906bSopenharmony_ci *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
5826b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5827b877906bSopenharmony_ci *
5828b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5829b877906bSopenharmony_ci *  GLFW_INVALID_VALUE.
5830b877906bSopenharmony_ci *
5831b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5832b877906bSopenharmony_ci *
5833b877906bSopenharmony_ci *  @sa @ref gamepad
5834b877906bSopenharmony_ci *  @sa @ref glfwJoystickIsGamepad
5835b877906bSopenharmony_ci *  @sa @ref glfwGetGamepadName
5836b877906bSopenharmony_ci *
5837b877906bSopenharmony_ci *  @since Added in version 3.3.
5838b877906bSopenharmony_ci *
5839b877906bSopenharmony_ci *  @ingroup input
5840b877906bSopenharmony_ci */
5841b877906bSopenharmony_ciGLFWAPI int glfwUpdateGamepadMappings(const char* string);
5842b877906bSopenharmony_ci
5843b877906bSopenharmony_ci/*! @brief Returns the human-readable gamepad name for the specified joystick.
5844b877906bSopenharmony_ci *
5845b877906bSopenharmony_ci *  This function returns the human-readable name of the gamepad from the
5846b877906bSopenharmony_ci *  gamepad mapping assigned to the specified joystick.
5847b877906bSopenharmony_ci *
5848b877906bSopenharmony_ci *  If the specified joystick is not present or does not have a gamepad mapping
5849b877906bSopenharmony_ci *  this function will return `NULL` but will not generate an error.  Call
5850b877906bSopenharmony_ci *  @ref glfwJoystickPresent to check whether it is present regardless of
5851b877906bSopenharmony_ci *  whether it has a mapping.
5852b877906bSopenharmony_ci *
5853b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5854b877906bSopenharmony_ci *  @return The UTF-8 encoded name of the gamepad, or `NULL` if the
5855b877906bSopenharmony_ci *  joystick is not present, does not have a mapping or an
5856b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5857b877906bSopenharmony_ci *
5858b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.
5859b877906bSopenharmony_ci *
5860b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
5861b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the specified joystick is
5862b877906bSopenharmony_ci *  disconnected, the gamepad mappings are updated or the library is terminated.
5863b877906bSopenharmony_ci *
5864b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5865b877906bSopenharmony_ci *
5866b877906bSopenharmony_ci *  @sa @ref gamepad
5867b877906bSopenharmony_ci *  @sa @ref glfwJoystickIsGamepad
5868b877906bSopenharmony_ci *
5869b877906bSopenharmony_ci *  @since Added in version 3.3.
5870b877906bSopenharmony_ci *
5871b877906bSopenharmony_ci *  @ingroup input
5872b877906bSopenharmony_ci */
5873b877906bSopenharmony_ciGLFWAPI const char* glfwGetGamepadName(int jid);
5874b877906bSopenharmony_ci
5875b877906bSopenharmony_ci/*! @brief Retrieves the state of the specified joystick remapped as a gamepad.
5876b877906bSopenharmony_ci *
5877b877906bSopenharmony_ci *  This function retrieves the state of the specified joystick remapped to
5878b877906bSopenharmony_ci *  an Xbox-like gamepad.
5879b877906bSopenharmony_ci *
5880b877906bSopenharmony_ci *  If the specified joystick is not present or does not have a gamepad mapping
5881b877906bSopenharmony_ci *  this function will return `GLFW_FALSE` but will not generate an error.  Call
5882b877906bSopenharmony_ci *  @ref glfwJoystickPresent to check whether it is present regardless of
5883b877906bSopenharmony_ci *  whether it has a mapping.
5884b877906bSopenharmony_ci *
5885b877906bSopenharmony_ci *  The Guide button may not be available for input as it is often hooked by the
5886b877906bSopenharmony_ci *  system or the Steam client.
5887b877906bSopenharmony_ci *
5888b877906bSopenharmony_ci *  Not all devices have all the buttons or axes provided by @ref
5889b877906bSopenharmony_ci *  GLFWgamepadstate.  Unavailable buttons and axes will always report
5890b877906bSopenharmony_ci *  `GLFW_RELEASE` and 0.0 respectively.
5891b877906bSopenharmony_ci *
5892b877906bSopenharmony_ci *  @param[in] jid The [joystick](@ref joysticks) to query.
5893b877906bSopenharmony_ci *  @param[out] state The gamepad input state of the joystick.
5894b877906bSopenharmony_ci *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is
5895b877906bSopenharmony_ci *  connected, it has no gamepad mapping or an [error](@ref error_handling)
5896b877906bSopenharmony_ci *  occurred.
5897b877906bSopenharmony_ci *
5898b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5899b877906bSopenharmony_ci *  GLFW_INVALID_ENUM.
5900b877906bSopenharmony_ci *
5901b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5902b877906bSopenharmony_ci *
5903b877906bSopenharmony_ci *  @sa @ref gamepad
5904b877906bSopenharmony_ci *  @sa @ref glfwUpdateGamepadMappings
5905b877906bSopenharmony_ci *  @sa @ref glfwJoystickIsGamepad
5906b877906bSopenharmony_ci *
5907b877906bSopenharmony_ci *  @since Added in version 3.3.
5908b877906bSopenharmony_ci *
5909b877906bSopenharmony_ci *  @ingroup input
5910b877906bSopenharmony_ci */
5911b877906bSopenharmony_ciGLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
5912b877906bSopenharmony_ci
5913b877906bSopenharmony_ci/*! @brief Sets the clipboard to the specified string.
5914b877906bSopenharmony_ci *
5915b877906bSopenharmony_ci *  This function sets the system clipboard to the specified, UTF-8 encoded
5916b877906bSopenharmony_ci *  string.
5917b877906bSopenharmony_ci *
5918b877906bSopenharmony_ci *  @param[in] window Deprecated.  Any valid window or `NULL`.
5919b877906bSopenharmony_ci *  @param[in] string A UTF-8 encoded string.
5920b877906bSopenharmony_ci *
5921b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
5922b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
5923b877906bSopenharmony_ci *
5924b877906bSopenharmony_ci *  @remark @win32 The clipboard on Windows has a single global lock for reading and
5925b877906bSopenharmony_ci *  writing.  GLFW tries to acquire it a few times, which is almost always enough.  If it
5926b877906bSopenharmony_ci *  cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.
5927b877906bSopenharmony_ci *  It is safe to try this multiple times.
5928b877906bSopenharmony_ci *
5929b877906bSopenharmony_ci *  @pointer_lifetime The specified string is copied before this function
5930b877906bSopenharmony_ci *  returns.
5931b877906bSopenharmony_ci *
5932b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5933b877906bSopenharmony_ci *
5934b877906bSopenharmony_ci *  @sa @ref clipboard
5935b877906bSopenharmony_ci *  @sa @ref glfwGetClipboardString
5936b877906bSopenharmony_ci *
5937b877906bSopenharmony_ci *  @since Added in version 3.0.
5938b877906bSopenharmony_ci *
5939b877906bSopenharmony_ci *  @ingroup input
5940b877906bSopenharmony_ci */
5941b877906bSopenharmony_ciGLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
5942b877906bSopenharmony_ci
5943b877906bSopenharmony_ci/*! @brief Returns the contents of the clipboard as a string.
5944b877906bSopenharmony_ci *
5945b877906bSopenharmony_ci *  This function returns the contents of the system clipboard, if it contains
5946b877906bSopenharmony_ci *  or is convertible to a UTF-8 encoded string.  If the clipboard is empty or
5947b877906bSopenharmony_ci *  if its contents cannot be converted, `NULL` is returned and a @ref
5948b877906bSopenharmony_ci *  GLFW_FORMAT_UNAVAILABLE error is generated.
5949b877906bSopenharmony_ci *
5950b877906bSopenharmony_ci *  @param[in] window Deprecated.  Any valid window or `NULL`.
5951b877906bSopenharmony_ci *  @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`
5952b877906bSopenharmony_ci *  if an [error](@ref error_handling) occurred.
5953b877906bSopenharmony_ci *
5954b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
5955b877906bSopenharmony_ci *  GLFW_FORMAT_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
5956b877906bSopenharmony_ci *
5957b877906bSopenharmony_ci *  @remark @win32 The clipboard on Windows has a single global lock for reading and
5958b877906bSopenharmony_ci *  writing.  GLFW tries to acquire it a few times, which is almost always enough.  If it
5959b877906bSopenharmony_ci *  cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.
5960b877906bSopenharmony_ci *  It is safe to try this multiple times.
5961b877906bSopenharmony_ci *
5962b877906bSopenharmony_ci *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
5963b877906bSopenharmony_ci *  should not free it yourself.  It is valid until the next call to @ref
5964b877906bSopenharmony_ci *  glfwGetClipboardString or @ref glfwSetClipboardString, or until the library
5965b877906bSopenharmony_ci *  is terminated.
5966b877906bSopenharmony_ci *
5967b877906bSopenharmony_ci *  @thread_safety This function must only be called from the main thread.
5968b877906bSopenharmony_ci *
5969b877906bSopenharmony_ci *  @sa @ref clipboard
5970b877906bSopenharmony_ci *  @sa @ref glfwSetClipboardString
5971b877906bSopenharmony_ci *
5972b877906bSopenharmony_ci *  @since Added in version 3.0.
5973b877906bSopenharmony_ci *
5974b877906bSopenharmony_ci *  @ingroup input
5975b877906bSopenharmony_ci */
5976b877906bSopenharmony_ciGLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
5977b877906bSopenharmony_ci
5978b877906bSopenharmony_ci/*! @brief Returns the GLFW time.
5979b877906bSopenharmony_ci *
5980b877906bSopenharmony_ci *  This function returns the current GLFW time, in seconds.  Unless the time
5981b877906bSopenharmony_ci *  has been set using @ref glfwSetTime it measures time elapsed since GLFW was
5982b877906bSopenharmony_ci *  initialized.
5983b877906bSopenharmony_ci *
5984b877906bSopenharmony_ci *  This function and @ref glfwSetTime are helper functions on top of @ref
5985b877906bSopenharmony_ci *  glfwGetTimerFrequency and @ref glfwGetTimerValue.
5986b877906bSopenharmony_ci *
5987b877906bSopenharmony_ci *  The resolution of the timer is system dependent, but is usually on the order
5988b877906bSopenharmony_ci *  of a few micro- or nanoseconds.  It uses the highest-resolution monotonic
5989b877906bSopenharmony_ci *  time source on each operating system.
5990b877906bSopenharmony_ci *
5991b877906bSopenharmony_ci *  @return The current time, in seconds, or zero if an
5992b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
5993b877906bSopenharmony_ci *
5994b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
5995b877906bSopenharmony_ci *
5996b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Reading and
5997b877906bSopenharmony_ci *  writing of the internal base time is not atomic, so it needs to be
5998b877906bSopenharmony_ci *  externally synchronized with calls to @ref glfwSetTime.
5999b877906bSopenharmony_ci *
6000b877906bSopenharmony_ci *  @sa @ref time
6001b877906bSopenharmony_ci *
6002b877906bSopenharmony_ci *  @since Added in version 1.0.
6003b877906bSopenharmony_ci *
6004b877906bSopenharmony_ci *  @ingroup input
6005b877906bSopenharmony_ci */
6006b877906bSopenharmony_ciGLFWAPI double glfwGetTime(void);
6007b877906bSopenharmony_ci
6008b877906bSopenharmony_ci/*! @brief Sets the GLFW time.
6009b877906bSopenharmony_ci *
6010b877906bSopenharmony_ci *  This function sets the current GLFW time, in seconds.  The value must be
6011b877906bSopenharmony_ci *  a positive finite number less than or equal to 18446744073.0, which is
6012b877906bSopenharmony_ci *  approximately 584.5 years.
6013b877906bSopenharmony_ci *
6014b877906bSopenharmony_ci *  This function and @ref glfwGetTime are helper functions on top of @ref
6015b877906bSopenharmony_ci *  glfwGetTimerFrequency and @ref glfwGetTimerValue.
6016b877906bSopenharmony_ci *
6017b877906bSopenharmony_ci *  @param[in] time The new value, in seconds.
6018b877906bSopenharmony_ci *
6019b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
6020b877906bSopenharmony_ci *  GLFW_INVALID_VALUE.
6021b877906bSopenharmony_ci *
6022b877906bSopenharmony_ci *  @remark The upper limit of GLFW time is calculated as
6023b877906bSopenharmony_ci *  floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations
6024b877906bSopenharmony_ci *  storing nanoseconds in 64 bits.  The limit may be increased in the future.
6025b877906bSopenharmony_ci *
6026b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  Reading and
6027b877906bSopenharmony_ci *  writing of the internal base time is not atomic, so it needs to be
6028b877906bSopenharmony_ci *  externally synchronized with calls to @ref glfwGetTime.
6029b877906bSopenharmony_ci *
6030b877906bSopenharmony_ci *  @sa @ref time
6031b877906bSopenharmony_ci *
6032b877906bSopenharmony_ci *  @since Added in version 2.2.
6033b877906bSopenharmony_ci *
6034b877906bSopenharmony_ci *  @ingroup input
6035b877906bSopenharmony_ci */
6036b877906bSopenharmony_ciGLFWAPI void glfwSetTime(double time);
6037b877906bSopenharmony_ci
6038b877906bSopenharmony_ci/*! @brief Returns the current value of the raw timer.
6039b877906bSopenharmony_ci *
6040b877906bSopenharmony_ci *  This function returns the current value of the raw timer, measured in
6041b877906bSopenharmony_ci *  1&nbsp;/&nbsp;frequency seconds.  To get the frequency, call @ref
6042b877906bSopenharmony_ci *  glfwGetTimerFrequency.
6043b877906bSopenharmony_ci *
6044b877906bSopenharmony_ci *  @return The value of the timer, or zero if an
6045b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6046b877906bSopenharmony_ci *
6047b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
6048b877906bSopenharmony_ci *
6049b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6050b877906bSopenharmony_ci *
6051b877906bSopenharmony_ci *  @sa @ref time
6052b877906bSopenharmony_ci *  @sa @ref glfwGetTimerFrequency
6053b877906bSopenharmony_ci *
6054b877906bSopenharmony_ci *  @since Added in version 3.2.
6055b877906bSopenharmony_ci *
6056b877906bSopenharmony_ci *  @ingroup input
6057b877906bSopenharmony_ci */
6058b877906bSopenharmony_ciGLFWAPI uint64_t glfwGetTimerValue(void);
6059b877906bSopenharmony_ci
6060b877906bSopenharmony_ci/*! @brief Returns the frequency, in Hz, of the raw timer.
6061b877906bSopenharmony_ci *
6062b877906bSopenharmony_ci *  This function returns the frequency, in Hz, of the raw timer.
6063b877906bSopenharmony_ci *
6064b877906bSopenharmony_ci *  @return The frequency of the timer, in Hz, or zero if an
6065b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6066b877906bSopenharmony_ci *
6067b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
6068b877906bSopenharmony_ci *
6069b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6070b877906bSopenharmony_ci *
6071b877906bSopenharmony_ci *  @sa @ref time
6072b877906bSopenharmony_ci *  @sa @ref glfwGetTimerValue
6073b877906bSopenharmony_ci *
6074b877906bSopenharmony_ci *  @since Added in version 3.2.
6075b877906bSopenharmony_ci *
6076b877906bSopenharmony_ci *  @ingroup input
6077b877906bSopenharmony_ci */
6078b877906bSopenharmony_ciGLFWAPI uint64_t glfwGetTimerFrequency(void);
6079b877906bSopenharmony_ci
6080b877906bSopenharmony_ci/*! @brief Makes the context of the specified window current for the calling
6081b877906bSopenharmony_ci *  thread.
6082b877906bSopenharmony_ci *
6083b877906bSopenharmony_ci *  This function makes the OpenGL or OpenGL ES context of the specified window
6084b877906bSopenharmony_ci *  current on the calling thread.  It can also detach the current context from
6085b877906bSopenharmony_ci *  the calling thread without making a new one current by passing in `NULL`.
6086b877906bSopenharmony_ci *
6087b877906bSopenharmony_ci *  A context must only be made current on a single thread at a time and each
6088b877906bSopenharmony_ci *  thread can have only a single current context at a time.  Making a context
6089b877906bSopenharmony_ci *  current detaches any previously current context on the calling thread.
6090b877906bSopenharmony_ci *
6091b877906bSopenharmony_ci *  When moving a context between threads, you must detach it (make it
6092b877906bSopenharmony_ci *  non-current) on the old thread before making it current on the new one.
6093b877906bSopenharmony_ci *
6094b877906bSopenharmony_ci *  By default, making a context non-current implicitly forces a pipeline flush.
6095b877906bSopenharmony_ci *  On machines that support `GL_KHR_context_flush_control`, you can control
6096b877906bSopenharmony_ci *  whether a context performs this flush by setting the
6097b877906bSopenharmony_ci *  [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint)
6098b877906bSopenharmony_ci *  hint.
6099b877906bSopenharmony_ci *
6100b877906bSopenharmony_ci *  The specified window must have an OpenGL or OpenGL ES context.  Specifying
6101b877906bSopenharmony_ci *  a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
6102b877906bSopenharmony_ci *  error.
6103b877906bSopenharmony_ci *
6104b877906bSopenharmony_ci *  @param[in] window The window whose context to make current, or `NULL` to
6105b877906bSopenharmony_ci *  detach the current context.
6106b877906bSopenharmony_ci *
6107b877906bSopenharmony_ci *  @remarks If the previously current context was created via a different
6108b877906bSopenharmony_ci *  context creation API than the one passed to this function, GLFW will still
6109b877906bSopenharmony_ci *  detach the previous one from its API before making the new one current.
6110b877906bSopenharmony_ci *
6111b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6112b877906bSopenharmony_ci *  GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
6113b877906bSopenharmony_ci *
6114b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6115b877906bSopenharmony_ci *
6116b877906bSopenharmony_ci *  @sa @ref context_current
6117b877906bSopenharmony_ci *  @sa @ref glfwGetCurrentContext
6118b877906bSopenharmony_ci *
6119b877906bSopenharmony_ci *  @since Added in version 3.0.
6120b877906bSopenharmony_ci *
6121b877906bSopenharmony_ci *  @ingroup context
6122b877906bSopenharmony_ci */
6123b877906bSopenharmony_ciGLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
6124b877906bSopenharmony_ci
6125b877906bSopenharmony_ci/*! @brief Returns the window whose context is current on the calling thread.
6126b877906bSopenharmony_ci *
6127b877906bSopenharmony_ci *  This function returns the window whose OpenGL or OpenGL ES context is
6128b877906bSopenharmony_ci *  current on the calling thread.
6129b877906bSopenharmony_ci *
6130b877906bSopenharmony_ci *  @return The window whose context is current, or `NULL` if no window's
6131b877906bSopenharmony_ci *  context is current.
6132b877906bSopenharmony_ci *
6133b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
6134b877906bSopenharmony_ci *
6135b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6136b877906bSopenharmony_ci *
6137b877906bSopenharmony_ci *  @sa @ref context_current
6138b877906bSopenharmony_ci *  @sa @ref glfwMakeContextCurrent
6139b877906bSopenharmony_ci *
6140b877906bSopenharmony_ci *  @since Added in version 3.0.
6141b877906bSopenharmony_ci *
6142b877906bSopenharmony_ci *  @ingroup context
6143b877906bSopenharmony_ci */
6144b877906bSopenharmony_ciGLFWAPI GLFWwindow* glfwGetCurrentContext(void);
6145b877906bSopenharmony_ci
6146b877906bSopenharmony_ci/*! @brief Swaps the front and back buffers of the specified window.
6147b877906bSopenharmony_ci *
6148b877906bSopenharmony_ci *  This function swaps the front and back buffers of the specified window when
6149b877906bSopenharmony_ci *  rendering with OpenGL or OpenGL ES.  If the swap interval is greater than
6150b877906bSopenharmony_ci *  zero, the GPU driver waits the specified number of screen updates before
6151b877906bSopenharmony_ci *  swapping the buffers.
6152b877906bSopenharmony_ci *
6153b877906bSopenharmony_ci *  The specified window must have an OpenGL or OpenGL ES context.  Specifying
6154b877906bSopenharmony_ci *  a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
6155b877906bSopenharmony_ci *  error.
6156b877906bSopenharmony_ci *
6157b877906bSopenharmony_ci *  This function does not apply to Vulkan.  If you are rendering with Vulkan,
6158b877906bSopenharmony_ci *  see `vkQueuePresentKHR` instead.
6159b877906bSopenharmony_ci *
6160b877906bSopenharmony_ci *  @param[in] window The window whose buffers to swap.
6161b877906bSopenharmony_ci *
6162b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6163b877906bSopenharmony_ci *  GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
6164b877906bSopenharmony_ci *
6165b877906bSopenharmony_ci *  @remark __EGL:__ The context of the specified window must be current on the
6166b877906bSopenharmony_ci *  calling thread.
6167b877906bSopenharmony_ci *
6168b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6169b877906bSopenharmony_ci *
6170b877906bSopenharmony_ci *  @sa @ref buffer_swap
6171b877906bSopenharmony_ci *  @sa @ref glfwSwapInterval
6172b877906bSopenharmony_ci *
6173b877906bSopenharmony_ci *  @since Added in version 1.0.
6174b877906bSopenharmony_ci *  @glfw3 Added window handle parameter.
6175b877906bSopenharmony_ci *
6176b877906bSopenharmony_ci *  @ingroup window
6177b877906bSopenharmony_ci */
6178b877906bSopenharmony_ciGLFWAPI void glfwSwapBuffers(GLFWwindow* window);
6179b877906bSopenharmony_ci
6180b877906bSopenharmony_ci/*! @brief Sets the swap interval for the current context.
6181b877906bSopenharmony_ci *
6182b877906bSopenharmony_ci *  This function sets the swap interval for the current OpenGL or OpenGL ES
6183b877906bSopenharmony_ci *  context, i.e. the number of screen updates to wait from the time @ref
6184b877906bSopenharmony_ci *  glfwSwapBuffers was called before swapping the buffers and returning.  This
6185b877906bSopenharmony_ci *  is sometimes called _vertical synchronization_, _vertical retrace
6186b877906bSopenharmony_ci *  synchronization_ or just _vsync_.
6187b877906bSopenharmony_ci *
6188b877906bSopenharmony_ci *  A context that supports either of the `WGL_EXT_swap_control_tear` and
6189b877906bSopenharmony_ci *  `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap
6190b877906bSopenharmony_ci *  intervals, which allows the driver to swap immediately even if a frame
6191b877906bSopenharmony_ci *  arrives a little bit late.  You can check for these extensions with @ref
6192b877906bSopenharmony_ci *  glfwExtensionSupported.
6193b877906bSopenharmony_ci *
6194b877906bSopenharmony_ci *  A context must be current on the calling thread.  Calling this function
6195b877906bSopenharmony_ci *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
6196b877906bSopenharmony_ci *
6197b877906bSopenharmony_ci *  This function does not apply to Vulkan.  If you are rendering with Vulkan,
6198b877906bSopenharmony_ci *  see the present mode of your swapchain instead.
6199b877906bSopenharmony_ci *
6200b877906bSopenharmony_ci *  @param[in] interval The minimum number of screen updates to wait for
6201b877906bSopenharmony_ci *  until the buffers are swapped by @ref glfwSwapBuffers.
6202b877906bSopenharmony_ci *
6203b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6204b877906bSopenharmony_ci *  GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
6205b877906bSopenharmony_ci *
6206b877906bSopenharmony_ci *  @remark This function is not called during context creation, leaving the
6207b877906bSopenharmony_ci *  swap interval set to whatever is the default for that API.  This is done
6208b877906bSopenharmony_ci *  because some swap interval extensions used by GLFW do not allow the swap
6209b877906bSopenharmony_ci *  interval to be reset to zero once it has been set to a non-zero value.
6210b877906bSopenharmony_ci *
6211b877906bSopenharmony_ci *  @remark Some GPU drivers do not honor the requested swap interval, either
6212b877906bSopenharmony_ci *  because of a user setting that overrides the application's request or due to
6213b877906bSopenharmony_ci *  bugs in the driver.
6214b877906bSopenharmony_ci *
6215b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6216b877906bSopenharmony_ci *
6217b877906bSopenharmony_ci *  @sa @ref buffer_swap
6218b877906bSopenharmony_ci *  @sa @ref glfwSwapBuffers
6219b877906bSopenharmony_ci *
6220b877906bSopenharmony_ci *  @since Added in version 1.0.
6221b877906bSopenharmony_ci *
6222b877906bSopenharmony_ci *  @ingroup context
6223b877906bSopenharmony_ci */
6224b877906bSopenharmony_ciGLFWAPI void glfwSwapInterval(int interval);
6225b877906bSopenharmony_ci
6226b877906bSopenharmony_ci/*! @brief Returns whether the specified extension is available.
6227b877906bSopenharmony_ci *
6228b877906bSopenharmony_ci *  This function returns whether the specified
6229b877906bSopenharmony_ci *  [API extension](@ref context_glext) is supported by the current OpenGL or
6230b877906bSopenharmony_ci *  OpenGL ES context.  It searches both for client API extension and context
6231b877906bSopenharmony_ci *  creation API extensions.
6232b877906bSopenharmony_ci *
6233b877906bSopenharmony_ci *  A context must be current on the calling thread.  Calling this function
6234b877906bSopenharmony_ci *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
6235b877906bSopenharmony_ci *
6236b877906bSopenharmony_ci *  As this functions retrieves and searches one or more extension strings each
6237b877906bSopenharmony_ci *  call, it is recommended that you cache its results if it is going to be used
6238b877906bSopenharmony_ci *  frequently.  The extension strings will not change during the lifetime of
6239b877906bSopenharmony_ci *  a context, so there is no danger in doing this.
6240b877906bSopenharmony_ci *
6241b877906bSopenharmony_ci *  This function does not apply to Vulkan.  If you are using Vulkan, see @ref
6242b877906bSopenharmony_ci *  glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`
6243b877906bSopenharmony_ci *  and `vkEnumerateDeviceExtensionProperties` instead.
6244b877906bSopenharmony_ci *
6245b877906bSopenharmony_ci *  @param[in] extension The ASCII encoded name of the extension.
6246b877906bSopenharmony_ci *  @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`
6247b877906bSopenharmony_ci *  otherwise.
6248b877906bSopenharmony_ci *
6249b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6250b877906bSopenharmony_ci *  GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref
6251b877906bSopenharmony_ci *  GLFW_PLATFORM_ERROR.
6252b877906bSopenharmony_ci *
6253b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6254b877906bSopenharmony_ci *
6255b877906bSopenharmony_ci *  @sa @ref context_glext
6256b877906bSopenharmony_ci *  @sa @ref glfwGetProcAddress
6257b877906bSopenharmony_ci *
6258b877906bSopenharmony_ci *  @since Added in version 1.0.
6259b877906bSopenharmony_ci *
6260b877906bSopenharmony_ci *  @ingroup context
6261b877906bSopenharmony_ci */
6262b877906bSopenharmony_ciGLFWAPI int glfwExtensionSupported(const char* extension);
6263b877906bSopenharmony_ci
6264b877906bSopenharmony_ci/*! @brief Returns the address of the specified function for the current
6265b877906bSopenharmony_ci *  context.
6266b877906bSopenharmony_ci *
6267b877906bSopenharmony_ci *  This function returns the address of the specified OpenGL or OpenGL ES
6268b877906bSopenharmony_ci *  [core or extension function](@ref context_glext), if it is supported
6269b877906bSopenharmony_ci *  by the current context.
6270b877906bSopenharmony_ci *
6271b877906bSopenharmony_ci *  A context must be current on the calling thread.  Calling this function
6272b877906bSopenharmony_ci *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
6273b877906bSopenharmony_ci *
6274b877906bSopenharmony_ci *  This function does not apply to Vulkan.  If you are rendering with Vulkan,
6275b877906bSopenharmony_ci *  see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and
6276b877906bSopenharmony_ci *  `vkGetDeviceProcAddr` instead.
6277b877906bSopenharmony_ci *
6278b877906bSopenharmony_ci *  @param[in] procname The ASCII encoded name of the function.
6279b877906bSopenharmony_ci *  @return The address of the function, or `NULL` if an
6280b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6281b877906bSopenharmony_ci *
6282b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6283b877906bSopenharmony_ci *  GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
6284b877906bSopenharmony_ci *
6285b877906bSopenharmony_ci *  @remark The address of a given function is not guaranteed to be the same
6286b877906bSopenharmony_ci *  between contexts.
6287b877906bSopenharmony_ci *
6288b877906bSopenharmony_ci *  @remark This function may return a non-`NULL` address despite the
6289b877906bSopenharmony_ci *  associated version or extension not being available.  Always check the
6290b877906bSopenharmony_ci *  context version or extension string first.
6291b877906bSopenharmony_ci *
6292b877906bSopenharmony_ci *  @pointer_lifetime The returned function pointer is valid until the context
6293b877906bSopenharmony_ci *  is destroyed or the library is terminated.
6294b877906bSopenharmony_ci *
6295b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6296b877906bSopenharmony_ci *
6297b877906bSopenharmony_ci *  @sa @ref context_glext
6298b877906bSopenharmony_ci *  @sa @ref glfwExtensionSupported
6299b877906bSopenharmony_ci *
6300b877906bSopenharmony_ci *  @since Added in version 1.0.
6301b877906bSopenharmony_ci *
6302b877906bSopenharmony_ci *  @ingroup context
6303b877906bSopenharmony_ci */
6304b877906bSopenharmony_ciGLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
6305b877906bSopenharmony_ci
6306b877906bSopenharmony_ci/*! @brief Returns whether the Vulkan loader and an ICD have been found.
6307b877906bSopenharmony_ci *
6308b877906bSopenharmony_ci *  This function returns whether the Vulkan loader and any minimally functional
6309b877906bSopenharmony_ci *  ICD have been found.
6310b877906bSopenharmony_ci *
6311b877906bSopenharmony_ci *  The availability of a Vulkan loader and even an ICD does not by itself guarantee that
6312b877906bSopenharmony_ci *  surface creation or even instance creation is possible.  Call @ref
6313b877906bSopenharmony_ci *  glfwGetRequiredInstanceExtensions to check whether the extensions necessary for Vulkan
6314b877906bSopenharmony_ci *  surface creation are available and @ref glfwGetPhysicalDevicePresentationSupport to
6315b877906bSopenharmony_ci *  check whether a queue family of a physical device supports image presentation.
6316b877906bSopenharmony_ci *
6317b877906bSopenharmony_ci *  @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE`
6318b877906bSopenharmony_ci *  otherwise.
6319b877906bSopenharmony_ci *
6320b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
6321b877906bSopenharmony_ci *
6322b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6323b877906bSopenharmony_ci *
6324b877906bSopenharmony_ci *  @sa @ref vulkan_support
6325b877906bSopenharmony_ci *
6326b877906bSopenharmony_ci *  @since Added in version 3.2.
6327b877906bSopenharmony_ci *
6328b877906bSopenharmony_ci *  @ingroup vulkan
6329b877906bSopenharmony_ci */
6330b877906bSopenharmony_ciGLFWAPI int glfwVulkanSupported(void);
6331b877906bSopenharmony_ci
6332b877906bSopenharmony_ci/*! @brief Returns the Vulkan instance extensions required by GLFW.
6333b877906bSopenharmony_ci *
6334b877906bSopenharmony_ci *  This function returns an array of names of Vulkan instance extensions required
6335b877906bSopenharmony_ci *  by GLFW for creating Vulkan surfaces for GLFW windows.  If successful, the
6336b877906bSopenharmony_ci *  list will always contain `VK_KHR_surface`, so if you don't require any
6337b877906bSopenharmony_ci *  additional extensions you can pass this list directly to the
6338b877906bSopenharmony_ci *  `VkInstanceCreateInfo` struct.
6339b877906bSopenharmony_ci *
6340b877906bSopenharmony_ci *  If Vulkan is not available on the machine, this function returns `NULL` and
6341b877906bSopenharmony_ci *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported
6342b877906bSopenharmony_ci *  to check whether Vulkan is at least minimally available.
6343b877906bSopenharmony_ci *
6344b877906bSopenharmony_ci *  If Vulkan is available but no set of extensions allowing window surface
6345b877906bSopenharmony_ci *  creation was found, this function returns `NULL`.  You may still use Vulkan
6346b877906bSopenharmony_ci *  for off-screen rendering and compute work.
6347b877906bSopenharmony_ci *
6348b877906bSopenharmony_ci *  @param[out] count Where to store the number of extensions in the returned
6349b877906bSopenharmony_ci *  array.  This is set to zero if an error occurred.
6350b877906bSopenharmony_ci *  @return An array of ASCII encoded extension names, or `NULL` if an
6351b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6352b877906bSopenharmony_ci *
6353b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
6354b877906bSopenharmony_ci *  GLFW_API_UNAVAILABLE.
6355b877906bSopenharmony_ci *
6356b877906bSopenharmony_ci *  @remark Additional extensions may be required by future versions of GLFW.
6357b877906bSopenharmony_ci *  You should check if any extensions you wish to enable are already in the
6358b877906bSopenharmony_ci *  returned array, as it is an error to specify an extension more than once in
6359b877906bSopenharmony_ci *  the `VkInstanceCreateInfo` struct.
6360b877906bSopenharmony_ci *
6361b877906bSopenharmony_ci *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You
6362b877906bSopenharmony_ci *  should not free it yourself.  It is guaranteed to be valid only until the
6363b877906bSopenharmony_ci *  library is terminated.
6364b877906bSopenharmony_ci *
6365b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6366b877906bSopenharmony_ci *
6367b877906bSopenharmony_ci *  @sa @ref vulkan_ext
6368b877906bSopenharmony_ci *  @sa @ref glfwCreateWindowSurface
6369b877906bSopenharmony_ci *
6370b877906bSopenharmony_ci *  @since Added in version 3.2.
6371b877906bSopenharmony_ci *
6372b877906bSopenharmony_ci *  @ingroup vulkan
6373b877906bSopenharmony_ci */
6374b877906bSopenharmony_ciGLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);
6375b877906bSopenharmony_ci
6376b877906bSopenharmony_ci#if defined(VK_VERSION_1_0)
6377b877906bSopenharmony_ci
6378b877906bSopenharmony_ci/*! @brief Returns the address of the specified Vulkan instance function.
6379b877906bSopenharmony_ci *
6380b877906bSopenharmony_ci *  This function returns the address of the specified Vulkan core or extension
6381b877906bSopenharmony_ci *  function for the specified instance.  If instance is set to `NULL` it can
6382b877906bSopenharmony_ci *  return any function exported from the Vulkan loader, including at least the
6383b877906bSopenharmony_ci *  following functions:
6384b877906bSopenharmony_ci *
6385b877906bSopenharmony_ci *  - `vkEnumerateInstanceExtensionProperties`
6386b877906bSopenharmony_ci *  - `vkEnumerateInstanceLayerProperties`
6387b877906bSopenharmony_ci *  - `vkCreateInstance`
6388b877906bSopenharmony_ci *  - `vkGetInstanceProcAddr`
6389b877906bSopenharmony_ci *
6390b877906bSopenharmony_ci *  If Vulkan is not available on the machine, this function returns `NULL` and
6391b877906bSopenharmony_ci *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported
6392b877906bSopenharmony_ci *  to check whether Vulkan is at least minimally available.
6393b877906bSopenharmony_ci *
6394b877906bSopenharmony_ci *  This function is equivalent to calling `vkGetInstanceProcAddr` with
6395b877906bSopenharmony_ci *  a platform-specific query of the Vulkan loader as a fallback.
6396b877906bSopenharmony_ci *
6397b877906bSopenharmony_ci *  @param[in] instance The Vulkan instance to query, or `NULL` to retrieve
6398b877906bSopenharmony_ci *  functions related to instance creation.
6399b877906bSopenharmony_ci *  @param[in] procname The ASCII encoded name of the function.
6400b877906bSopenharmony_ci *  @return The address of the function, or `NULL` if an
6401b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6402b877906bSopenharmony_ci *
6403b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
6404b877906bSopenharmony_ci *  GLFW_API_UNAVAILABLE.
6405b877906bSopenharmony_ci *
6406b877906bSopenharmony_ci *  @pointer_lifetime The returned function pointer is valid until the library
6407b877906bSopenharmony_ci *  is terminated.
6408b877906bSopenharmony_ci *
6409b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.
6410b877906bSopenharmony_ci *
6411b877906bSopenharmony_ci *  @sa @ref vulkan_proc
6412b877906bSopenharmony_ci *
6413b877906bSopenharmony_ci *  @since Added in version 3.2.
6414b877906bSopenharmony_ci *
6415b877906bSopenharmony_ci *  @ingroup vulkan
6416b877906bSopenharmony_ci */
6417b877906bSopenharmony_ciGLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);
6418b877906bSopenharmony_ci
6419b877906bSopenharmony_ci/*! @brief Returns whether the specified queue family can present images.
6420b877906bSopenharmony_ci *
6421b877906bSopenharmony_ci *  This function returns whether the specified queue family of the specified
6422b877906bSopenharmony_ci *  physical device supports presentation to the platform GLFW was built for.
6423b877906bSopenharmony_ci *
6424b877906bSopenharmony_ci *  If Vulkan or the required window surface creation instance extensions are
6425b877906bSopenharmony_ci *  not available on the machine, or if the specified instance was not created
6426b877906bSopenharmony_ci *  with the required extensions, this function returns `GLFW_FALSE` and
6427b877906bSopenharmony_ci *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported
6428b877906bSopenharmony_ci *  to check whether Vulkan is at least minimally available and @ref
6429b877906bSopenharmony_ci *  glfwGetRequiredInstanceExtensions to check what instance extensions are
6430b877906bSopenharmony_ci *  required.
6431b877906bSopenharmony_ci *
6432b877906bSopenharmony_ci *  @param[in] instance The instance that the physical device belongs to.
6433b877906bSopenharmony_ci *  @param[in] device The physical device that the queue family belongs to.
6434b877906bSopenharmony_ci *  @param[in] queuefamily The index of the queue family to query.
6435b877906bSopenharmony_ci *  @return `GLFW_TRUE` if the queue family supports presentation, or
6436b877906bSopenharmony_ci *  `GLFW_FALSE` otherwise.
6437b877906bSopenharmony_ci *
6438b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6439b877906bSopenharmony_ci *  GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
6440b877906bSopenharmony_ci *
6441b877906bSopenharmony_ci *  @remark @macos This function currently always returns `GLFW_TRUE`, as the
6442b877906bSopenharmony_ci *  `VK_MVK_macos_surface` and `VK_EXT_metal_surface` extensions do not provide
6443b877906bSopenharmony_ci *  a `vkGetPhysicalDevice*PresentationSupport` type function.
6444b877906bSopenharmony_ci *
6445b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  For
6446b877906bSopenharmony_ci *  synchronization details of Vulkan objects, see the Vulkan specification.
6447b877906bSopenharmony_ci *
6448b877906bSopenharmony_ci *  @sa @ref vulkan_present
6449b877906bSopenharmony_ci *
6450b877906bSopenharmony_ci *  @since Added in version 3.2.
6451b877906bSopenharmony_ci *
6452b877906bSopenharmony_ci *  @ingroup vulkan
6453b877906bSopenharmony_ci */
6454b877906bSopenharmony_ciGLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
6455b877906bSopenharmony_ci
6456b877906bSopenharmony_ci/*! @brief Creates a Vulkan surface for the specified window.
6457b877906bSopenharmony_ci *
6458b877906bSopenharmony_ci *  This function creates a Vulkan surface for the specified window.
6459b877906bSopenharmony_ci *
6460b877906bSopenharmony_ci *  If the Vulkan loader or at least one minimally functional ICD were not found,
6461b877906bSopenharmony_ci *  this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref
6462b877906bSopenharmony_ci *  GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported to check whether
6463b877906bSopenharmony_ci *  Vulkan is at least minimally available.
6464b877906bSopenharmony_ci *
6465b877906bSopenharmony_ci *  If the required window surface creation instance extensions are not
6466b877906bSopenharmony_ci *  available or if the specified instance was not created with these extensions
6467b877906bSopenharmony_ci *  enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and
6468b877906bSopenharmony_ci *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref
6469b877906bSopenharmony_ci *  glfwGetRequiredInstanceExtensions to check what instance extensions are
6470b877906bSopenharmony_ci *  required.
6471b877906bSopenharmony_ci *
6472b877906bSopenharmony_ci *  The window surface cannot be shared with another API so the window must
6473b877906bSopenharmony_ci *  have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib)
6474b877906bSopenharmony_ci *  set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error
6475b877906bSopenharmony_ci *  and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`.
6476b877906bSopenharmony_ci *
6477b877906bSopenharmony_ci *  The window surface must be destroyed before the specified Vulkan instance.
6478b877906bSopenharmony_ci *  It is the responsibility of the caller to destroy the window surface.  GLFW
6479b877906bSopenharmony_ci *  does not destroy it for you.  Call `vkDestroySurfaceKHR` to destroy the
6480b877906bSopenharmony_ci *  surface.
6481b877906bSopenharmony_ci *
6482b877906bSopenharmony_ci *  @param[in] instance The Vulkan instance to create the surface in.
6483b877906bSopenharmony_ci *  @param[in] window The window to create the surface for.
6484b877906bSopenharmony_ci *  @param[in] allocator The allocator to use, or `NULL` to use the default
6485b877906bSopenharmony_ci *  allocator.
6486b877906bSopenharmony_ci *  @param[out] surface Where to store the handle of the surface.  This is set
6487b877906bSopenharmony_ci *  to `VK_NULL_HANDLE` if an error occurred.
6488b877906bSopenharmony_ci *  @return `VK_SUCCESS` if successful, or a Vulkan error code if an
6489b877906bSopenharmony_ci *  [error](@ref error_handling) occurred.
6490b877906bSopenharmony_ci *
6491b877906bSopenharmony_ci *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
6492b877906bSopenharmony_ci *  GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE
6493b877906bSopenharmony_ci *
6494b877906bSopenharmony_ci *  @remark If an error occurs before the creation call is made, GLFW returns
6495b877906bSopenharmony_ci *  the Vulkan error code most appropriate for the error.  Appropriate use of
6496b877906bSopenharmony_ci *  @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should
6497b877906bSopenharmony_ci *  eliminate almost all occurrences of these errors.
6498b877906bSopenharmony_ci *
6499b877906bSopenharmony_ci *  @remark @macos GLFW prefers the `VK_EXT_metal_surface` extension, with the
6500b877906bSopenharmony_ci *  `VK_MVK_macos_surface` extension as a fallback.  The name of the selected
6501b877906bSopenharmony_ci *  extension, if any, is included in the array returned by @ref
6502b877906bSopenharmony_ci *  glfwGetRequiredInstanceExtensions.
6503b877906bSopenharmony_ci *
6504b877906bSopenharmony_ci *  @remark @macos This function creates and sets a `CAMetalLayer` instance for
6505b877906bSopenharmony_ci *  the window content view, which is required for MoltenVK to function.
6506b877906bSopenharmony_ci *
6507b877906bSopenharmony_ci *  @remark @x11 By default GLFW prefers the `VK_KHR_xcb_surface` extension,
6508b877906bSopenharmony_ci *  with the `VK_KHR_xlib_surface` extension as a fallback.  You can make
6509b877906bSopenharmony_ci *  `VK_KHR_xlib_surface` the preferred extension by setting the
6510b877906bSopenharmony_ci *  [GLFW_X11_XCB_VULKAN_SURFACE](@ref GLFW_X11_XCB_VULKAN_SURFACE_hint) init
6511b877906bSopenharmony_ci *  hint.  The name of the selected extension, if any, is included in the array
6512b877906bSopenharmony_ci *  returned by @ref glfwGetRequiredInstanceExtensions.
6513b877906bSopenharmony_ci *
6514b877906bSopenharmony_ci *  @thread_safety This function may be called from any thread.  For
6515b877906bSopenharmony_ci *  synchronization details of Vulkan objects, see the Vulkan specification.
6516b877906bSopenharmony_ci *
6517b877906bSopenharmony_ci *  @sa @ref vulkan_surface
6518b877906bSopenharmony_ci *  @sa @ref glfwGetRequiredInstanceExtensions
6519b877906bSopenharmony_ci *
6520b877906bSopenharmony_ci *  @since Added in version 3.2.
6521b877906bSopenharmony_ci *
6522b877906bSopenharmony_ci *  @ingroup vulkan
6523b877906bSopenharmony_ci */
6524b877906bSopenharmony_ciGLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
6525b877906bSopenharmony_ci
6526b877906bSopenharmony_ci#endif /*VK_VERSION_1_0*/
6527b877906bSopenharmony_ci
6528b877906bSopenharmony_ci
6529b877906bSopenharmony_ci/*************************************************************************
6530b877906bSopenharmony_ci * Global definition cleanup
6531b877906bSopenharmony_ci *************************************************************************/
6532b877906bSopenharmony_ci
6533b877906bSopenharmony_ci/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
6534b877906bSopenharmony_ci
6535b877906bSopenharmony_ci#ifdef GLFW_WINGDIAPI_DEFINED
6536b877906bSopenharmony_ci #undef WINGDIAPI
6537b877906bSopenharmony_ci #undef GLFW_WINGDIAPI_DEFINED
6538b877906bSopenharmony_ci#endif
6539b877906bSopenharmony_ci
6540b877906bSopenharmony_ci#ifdef GLFW_CALLBACK_DEFINED
6541b877906bSopenharmony_ci #undef CALLBACK
6542b877906bSopenharmony_ci #undef GLFW_CALLBACK_DEFINED
6543b877906bSopenharmony_ci#endif
6544b877906bSopenharmony_ci
6545b877906bSopenharmony_ci/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally
6546b877906bSopenharmony_ci * defined by some gl.h variants (OpenBSD) so define it after if needed.
6547b877906bSopenharmony_ci */
6548b877906bSopenharmony_ci#ifndef GLAPIENTRY
6549b877906bSopenharmony_ci #define GLAPIENTRY APIENTRY
6550b877906bSopenharmony_ci #define GLFW_GLAPIENTRY_DEFINED
6551b877906bSopenharmony_ci#endif
6552b877906bSopenharmony_ci
6553b877906bSopenharmony_ci/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
6554b877906bSopenharmony_ci
6555b877906bSopenharmony_ci
6556b877906bSopenharmony_ci#ifdef __cplusplus
6557b877906bSopenharmony_ci}
6558b877906bSopenharmony_ci#endif
6559b877906bSopenharmony_ci
6560b877906bSopenharmony_ci#endif /* _glfw3_h_ */
6561b877906bSopenharmony_ci
6562