diff --git a/.gitignore b/.gitignore
index 0a2c069..78b2b7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@ Release/
.vs/
*/Debug/
*/Release/
+*/x64/
bin/
.ycm_extra_conf.py
.cache
+libs
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..357d9a8
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,18 @@
+[submodule "ext/repos/glm"]
+ path = ext/repos/glm
+ url = git@github.com:g-truc/glm.git
+[submodule "ext/repos/msdf-atlas-gen"]
+ path = ext/repos/msdf-atlas-gen
+ url = git@github.com:Chlumsky/msdf-atlas-gen.git
+[submodule "ext/repos/freetype"]
+ path = ext/repos/freetype
+ url = git@github.com:freetype/freetype.git
+[submodule "ext/repos/stb"]
+ path = ext/repos/stb
+ url = git@github.com:nothings/stb.git
+[submodule "ext/repos/glfw"]
+ path = ext/repos/glfw
+ url = git@github.com:glfw/glfw.git
+[submodule "ext/repos/shaderc"]
+ path = ext/repos/shaderc
+ url = git@github.com:google/shaderc.git
diff --git a/Copium.sln b/Copium.sln
index 6ea5e79..1e81e23 100644
--- a/Copium.sln
+++ b/Copium.sln
@@ -4,6 +4,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopiumEngine", "CopiumEngine\CopiumEngine.vcxproj", "{E660A65F-1AD7-4A3B-842B-1E0080FCFC35}"
+ ProjectSection(ProjectDependencies) = postProject
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3} = {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF} = {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490} = {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}
+ {8887886E-367C-40E8-BDC2-901F4F21571E} = {8887886E-367C-40E8-BDC2-901F4F21571E}
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C} = {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{6076C304-B981-471F-BDA0-57A33D9D6832}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdfgen-core", "ext\projects\msdfgen-core\msdfgen-core.vcxproj", "{2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdfgen-ext", "ext\projects\msdfgen-ext\msdfgen-ext.vcxproj", "{10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "ext\projects\freetype\freetype.vcxproj", "{837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdf-atlas-gen", "ext\projects\msdf-atlas-gen\msdf-atlas-gen.vcxproj", "{8887886E-367C-40E8-BDC2-901F4F21571E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glfw3", "ext\projects\glfw3\glfw3.vcxproj", "{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,10 +40,57 @@ Global
{E660A65F-1AD7-4A3B-842B-1E0080FCFC35}.Release|x64.Build.0 = Release|x64
{E660A65F-1AD7-4A3B-842B-1E0080FCFC35}.Release|x86.ActiveCfg = Release|Win32
{E660A65F-1AD7-4A3B-842B-1E0080FCFC35}.Release|x86.Build.0 = Release|Win32
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Debug|x64.ActiveCfg = Debug|x64
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Debug|x64.Build.0 = Debug|x64
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Debug|x86.ActiveCfg = Debug|Win32
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Debug|x86.Build.0 = Debug|Win32
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Release|x64.ActiveCfg = Release|x64
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Release|x64.Build.0 = Release|x64
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Release|x86.ActiveCfg = Release|Win32
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF}.Release|x86.Build.0 = Release|Win32
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Debug|x64.ActiveCfg = Debug|x64
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Debug|x64.Build.0 = Debug|x64
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Debug|x86.ActiveCfg = Debug|Win32
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Debug|x86.Build.0 = Debug|Win32
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Release|x64.ActiveCfg = Release|x64
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Release|x64.Build.0 = Release|x64
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Release|x86.ActiveCfg = Release|Win32
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3}.Release|x86.Build.0 = Release|Win32
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Debug|x64.ActiveCfg = Debug|x64
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Debug|x64.Build.0 = Debug|x64
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Debug|x86.ActiveCfg = Debug|Win32
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Debug|x86.Build.0 = Debug|Win32
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Release|x64.ActiveCfg = Release|x64
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Release|x64.Build.0 = Release|x64
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Release|x86.ActiveCfg = Release|Win32
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}.Release|x86.Build.0 = Release|Win32
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Debug|x64.ActiveCfg = Debug|x64
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Debug|x64.Build.0 = Debug|x64
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Debug|x86.ActiveCfg = Debug|Win32
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Debug|x86.Build.0 = Debug|Win32
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Release|x64.ActiveCfg = Release|x64
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Release|x64.Build.0 = Release|x64
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Release|x86.ActiveCfg = Release|Win32
+ {8887886E-367C-40E8-BDC2-901F4F21571E}.Release|x86.Build.0 = Release|Win32
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Debug|x64.ActiveCfg = Debug|x64
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Debug|x64.Build.0 = Debug|x64
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Debug|x86.ActiveCfg = Debug|Win32
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Debug|x86.Build.0 = Debug|Win32
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x64.ActiveCfg = Release|x64
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x64.Build.0 = Release|x64
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x86.ActiveCfg = Release|Win32
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {2D82E1D6-0F23-4D08-BC2D-B0EBBEC359FF} = {6076C304-B981-471F-BDA0-57A33D9D6832}
+ {10CC866F-E9FC-48BF-98DD-1FB7F0775DE3} = {6076C304-B981-471F-BDA0-57A33D9D6832}
+ {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490} = {6076C304-B981-471F-BDA0-57A33D9D6832}
+ {8887886E-367C-40E8-BDC2-901F4F21571E} = {6076C304-B981-471F-BDA0-57A33D9D6832}
+ {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C} = {6076C304-B981-471F-BDA0-57A33D9D6832}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8CA46360-3BB7-4DFC-8319-7D4372B4C851}
EndGlobalSection
diff --git a/CopiumEngine/CopiumEngine.vcxproj b/CopiumEngine/CopiumEngine.vcxproj
index ecbeddb..e2c9f28 100644
--- a/CopiumEngine/CopiumEngine.vcxproj
+++ b/CopiumEngine/CopiumEngine.vcxproj
@@ -79,9 +79,11 @@
true
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);false
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);
@@ -115,9 +117,9 @@
Level3true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE;MSDF_ATLAS_PUBLIC=;MSDFGEN_PUBLIC=true
- $(ProjectDir)ext/include/;C:/VulkanSDK/1.3.236.0/Include;$(ProjectDir)src/;$(ProjectDir)ext/include/msdfgen/;%(AdditionalIncludeDirectories)
+ $(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;%(AdditionalIncludeDirectories)stdcpp17trueMultiThreadedDebugDLL
@@ -125,8 +127,8 @@
Consoletrue
- $(ProjectDir)ext/lib/;C:/VulkanSDK/1.3.236.0/Lib;%(AdditionalLibraryDirectories)
- vulkan-1.lib;glfw3.lib;shaderc_combinedd.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetyped.lib;%(AdditionalDependencies)
+ $(SolutionDir)libs\$(Platform)\$(Configuration)\;C:/VulkanSDK/1.3.236.0/Lib;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;glfw3.lib;shaderc_combinedd.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetype.lib;%(AdditionalDependencies)
@@ -143,9 +145,9 @@
truetruetrue
- NDEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE;MSDF_ATLAS_PUBLIC=;MSDFGEN_PUBLIC=true
- $(ProjectDir)ext/include/;C:/VulkanSDK/1.3.236.0/Include;$(ProjectDir)src/;$(ProjectDir)ext/include/msdfgen/;%(AdditionalIncludeDirectories)
+ $(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;%(AdditionalIncludeDirectories)stdcpp17true
diff --git a/CopiumEngine/CopiumEngine.vcxproj.filters b/CopiumEngine/CopiumEngine.vcxproj.filters
index 16f1010..6b89672 100644
--- a/CopiumEngine/CopiumEngine.vcxproj.filters
+++ b/CopiumEngine/CopiumEngine.vcxproj.filters
@@ -180,6 +180,9 @@
Source Files
+
+ Source Files
+
@@ -362,5 +365,14 @@
Header Files
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
\ No newline at end of file
diff --git a/CopiumEngine/ext/include/GLFW/glfw3.h b/CopiumEngine/ext/include/GLFW/glfw3.h
deleted file mode 100644
index 31b201a..0000000
--- a/CopiumEngine/ext/include/GLFW/glfw3.h
+++ /dev/null
@@ -1,5912 +0,0 @@
-/*************************************************************************
- * GLFW 3.3 - www.glfw.org
- * A library for OpenGL, window and input
- *------------------------------------------------------------------------
- * Copyright (c) 2002-2006 Marcus Geelnard
- * Copyright (c) 2006-2019 Camilla Löwy
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would
- * be appreciated but is not required.
- *
- * 2. Altered source versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * 3. This notice may not be removed or altered from any source
- * distribution.
- *
- *************************************************************************/
-
-#ifndef _glfw3_h_
-#define _glfw3_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*************************************************************************
- * Doxygen documentation
- *************************************************************************/
-
-/*! @file glfw3.h
- * @brief The header of the GLFW 3 API.
- *
- * This is the header file of the GLFW 3 API. It defines all its types and
- * declares all its functions.
- *
- * For more information about how to use this file, see @ref build_include.
- */
-/*! @defgroup context Context reference
- * @brief Functions and types related to OpenGL and OpenGL ES contexts.
- *
- * This is the reference documentation for OpenGL and OpenGL ES context related
- * functions. For more task-oriented information, see the @ref context_guide.
- */
-/*! @defgroup vulkan Vulkan support reference
- * @brief Functions and types related to Vulkan.
- *
- * This is the reference documentation for Vulkan related functions and types.
- * For more task-oriented information, see the @ref vulkan_guide.
- */
-/*! @defgroup init Initialization, version and error reference
- * @brief Functions and types related to initialization and error handling.
- *
- * This is the reference documentation for initialization and termination of
- * the library, version management and error handling. For more task-oriented
- * information, see the @ref intro_guide.
- */
-/*! @defgroup input Input reference
- * @brief Functions and types related to input handling.
- *
- * This is the reference documentation for input related functions and types.
- * For more task-oriented information, see the @ref input_guide.
- */
-/*! @defgroup monitor Monitor reference
- * @brief Functions and types related to monitors.
- *
- * This is the reference documentation for monitor related functions and types.
- * For more task-oriented information, see the @ref monitor_guide.
- */
-/*! @defgroup window Window reference
- * @brief Functions and types related to windows.
- *
- * This is the reference documentation for window related functions and types,
- * including creation, deletion and event polling. For more task-oriented
- * information, see the @ref window_guide.
- */
-
-
-/*************************************************************************
- * Compiler- and platform-specific preprocessor work
- *************************************************************************/
-
-/* If we are we on Windows, we want a single define for it.
- */
-#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
- #define _WIN32
-#endif /* _WIN32 */
-
-/* Include because most Windows GLU headers need wchar_t and
- * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
- * Include it unconditionally to avoid surprising side-effects.
- */
-#include
-
-/* Include because it is needed by Vulkan and related functions.
- * Include it unconditionally to avoid surprising side-effects.
- */
-#include
-
-#if defined(GLFW_INCLUDE_VULKAN)
- #include
-#endif /* Vulkan header */
-
-/* The Vulkan header may have indirectly included windows.h (because of
- * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.
- */
-
-/* It is customary to use APIENTRY for OpenGL function pointer declarations on
- * all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
- */
-#if !defined(APIENTRY)
- #if defined(_WIN32)
- #define APIENTRY __stdcall
- #else
- #define APIENTRY
- #endif
- #define GLFW_APIENTRY_DEFINED
-#endif /* APIENTRY */
-
-/* Some Windows OpenGL headers need this.
- */
-#if !defined(WINGDIAPI) && defined(_WIN32)
- #define WINGDIAPI __declspec(dllimport)
- #define GLFW_WINGDIAPI_DEFINED
-#endif /* WINGDIAPI */
-
-/* Some Windows GLU headers need this.
- */
-#if !defined(CALLBACK) && defined(_WIN32)
- #define CALLBACK __stdcall
- #define GLFW_CALLBACK_DEFINED
-#endif /* CALLBACK */
-
-/* Include the chosen OpenGL or OpenGL ES headers.
- */
-#if defined(GLFW_INCLUDE_ES1)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
-#elif defined(GLFW_INCLUDE_ES2)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
-#elif defined(GLFW_INCLUDE_ES3)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
-#elif defined(GLFW_INCLUDE_ES31)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
-#elif defined(GLFW_INCLUDE_ES32)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
-#elif defined(GLFW_INCLUDE_GLCOREARB)
-
- #if defined(__APPLE__)
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif /*GLFW_INCLUDE_GLEXT*/
-
- #else /*__APPLE__*/
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
- #endif /*__APPLE__*/
-
-#elif defined(GLFW_INCLUDE_GLU)
-
- #if defined(__APPLE__)
-
- #if defined(GLFW_INCLUDE_GLU)
- #include
- #endif
-
- #else /*__APPLE__*/
-
- #if defined(GLFW_INCLUDE_GLU)
- #include
- #endif
-
- #endif /*__APPLE__*/
-
-#elif !defined(GLFW_INCLUDE_NONE) && \
- !defined(__gl_h_) && \
- !defined(__gles1_gl_h_) && \
- !defined(__gles2_gl2_h_) && \
- !defined(__gles2_gl3_h_) && \
- !defined(__gles2_gl31_h_) && \
- !defined(__gles2_gl32_h_) && \
- !defined(__gl_glcorearb_h_) && \
- !defined(__gl2_h_) /*legacy*/ && \
- !defined(__gl3_h_) /*legacy*/ && \
- !defined(__gl31_h_) /*legacy*/ && \
- !defined(__gl32_h_) /*legacy*/ && \
- !defined(__glcorearb_h_) /*legacy*/ && \
- !defined(__GL_H__) /*non-standard*/ && \
- !defined(__gltypes_h_) /*non-standard*/ && \
- !defined(__glee_h_) /*non-standard*/
-
- #if defined(__APPLE__)
-
- #if !defined(GLFW_INCLUDE_GLEXT)
- #define GL_GLEXT_LEGACY
- #endif
- #include
-
- #else /*__APPLE__*/
-
- #include
- #if defined(GLFW_INCLUDE_GLEXT)
- #include
- #endif
-
- #endif /*__APPLE__*/
-
-#endif /* OpenGL and OpenGL ES headers */
-
-#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
- /* GLFW_DLL must be defined by applications that are linking against the DLL
- * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW
- * configuration header when compiling the DLL version of the library.
- */
- #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
-#endif
-
-/* GLFWAPI is used to declare public API functions for export
- * from the DLL / shared library / dynamic library.
- */
-#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
- /* We are building GLFW as a Win32 DLL */
- #define GLFWAPI __declspec(dllexport)
-#elif defined(_WIN32) && defined(GLFW_DLL)
- /* We are calling a GLFW Win32 DLL */
- #define GLFWAPI __declspec(dllimport)
-#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
- /* We are building GLFW as a Unix shared library */
- #define GLFWAPI __attribute__((visibility("default")))
-#else
- #define GLFWAPI
-#endif
-
-
-/*************************************************************************
- * GLFW API tokens
- *************************************************************************/
-
-/*! @name GLFW version macros
- * @{ */
-/*! @brief The major version number of the GLFW header.
- *
- * The major version number of the GLFW header. This is incremented when the
- * API is changed in non-compatible ways.
- * @ingroup init
- */
-#define GLFW_VERSION_MAJOR 3
-/*! @brief The minor version number of the GLFW header.
- *
- * The minor version number of the GLFW header. This is incremented when
- * features are added to the API but it remains backward-compatible.
- * @ingroup init
- */
-#define GLFW_VERSION_MINOR 3
-/*! @brief The revision number of the GLFW header.
- *
- * The revision number of the GLFW header. This is incremented when a bug fix
- * release is made that does not contain any API changes.
- * @ingroup init
- */
-#define GLFW_VERSION_REVISION 8
-/*! @} */
-
-/*! @brief One.
- *
- * This is only semantic sugar for the number 1. You can instead use `1` or
- * `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal
- * to one.
- *
- * @ingroup init
- */
-#define GLFW_TRUE 1
-/*! @brief Zero.
- *
- * This is only semantic sugar for the number 0. You can instead use `0` or
- * `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is
- * equal to zero.
- *
- * @ingroup init
- */
-#define GLFW_FALSE 0
-
-/*! @name Key and button actions
- * @{ */
-/*! @brief The key or mouse button was released.
- *
- * The key or mouse button was released.
- *
- * @ingroup input
- */
-#define GLFW_RELEASE 0
-/*! @brief The key or mouse button was pressed.
- *
- * The key or mouse button was pressed.
- *
- * @ingroup input
- */
-#define GLFW_PRESS 1
-/*! @brief The key was held down until it repeated.
- *
- * The key was held down until it repeated.
- *
- * @ingroup input
- */
-#define GLFW_REPEAT 2
-/*! @} */
-
-/*! @defgroup hat_state Joystick hat states
- * @brief Joystick hat states.
- *
- * See [joystick hat input](@ref joystick_hat) for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_HAT_CENTERED 0
-#define GLFW_HAT_UP 1
-#define GLFW_HAT_RIGHT 2
-#define GLFW_HAT_DOWN 4
-#define GLFW_HAT_LEFT 8
-#define GLFW_HAT_RIGHT_UP (GLFW_HAT_RIGHT | GLFW_HAT_UP)
-#define GLFW_HAT_RIGHT_DOWN (GLFW_HAT_RIGHT | GLFW_HAT_DOWN)
-#define GLFW_HAT_LEFT_UP (GLFW_HAT_LEFT | GLFW_HAT_UP)
-#define GLFW_HAT_LEFT_DOWN (GLFW_HAT_LEFT | GLFW_HAT_DOWN)
-/*! @} */
-
-/*! @defgroup keys Keyboard keys
- * @brief Keyboard key IDs.
- *
- * See [key input](@ref input_key) for how these are used.
- *
- * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60),
- * but re-arranged to map to 7-bit ASCII for printable keys (function keys are
- * put in the 256+ range).
- *
- * The naming of the key codes follow these rules:
- * - The US keyboard layout is used
- * - Names of printable alpha-numeric characters are used (e.g. "A", "R",
- * "3", etc.)
- * - For non-alphanumeric characters, Unicode:ish names are used (e.g.
- * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not
- * correspond to the Unicode standard (usually for brevity)
- * - Keys that lack a clear US mapping are named "WORLD_x"
- * - For non-printable keys, custom names are used (e.g. "F4",
- * "BACKSPACE", etc.)
- *
- * @ingroup input
- * @{
- */
-
-/* The unknown key */
-#define GLFW_KEY_UNKNOWN -1
-
-/* Printable keys */
-#define GLFW_KEY_SPACE 32
-#define GLFW_KEY_APOSTROPHE 39 /* ' */
-#define GLFW_KEY_COMMA 44 /* , */
-#define GLFW_KEY_MINUS 45 /* - */
-#define GLFW_KEY_PERIOD 46 /* . */
-#define GLFW_KEY_SLASH 47 /* / */
-#define GLFW_KEY_0 48
-#define GLFW_KEY_1 49
-#define GLFW_KEY_2 50
-#define GLFW_KEY_3 51
-#define GLFW_KEY_4 52
-#define GLFW_KEY_5 53
-#define GLFW_KEY_6 54
-#define GLFW_KEY_7 55
-#define GLFW_KEY_8 56
-#define GLFW_KEY_9 57
-#define GLFW_KEY_SEMICOLON 59 /* ; */
-#define GLFW_KEY_EQUAL 61 /* = */
-#define GLFW_KEY_A 65
-#define GLFW_KEY_B 66
-#define GLFW_KEY_C 67
-#define GLFW_KEY_D 68
-#define GLFW_KEY_E 69
-#define GLFW_KEY_F 70
-#define GLFW_KEY_G 71
-#define GLFW_KEY_H 72
-#define GLFW_KEY_I 73
-#define GLFW_KEY_J 74
-#define GLFW_KEY_K 75
-#define GLFW_KEY_L 76
-#define GLFW_KEY_M 77
-#define GLFW_KEY_N 78
-#define GLFW_KEY_O 79
-#define GLFW_KEY_P 80
-#define GLFW_KEY_Q 81
-#define GLFW_KEY_R 82
-#define GLFW_KEY_S 83
-#define GLFW_KEY_T 84
-#define GLFW_KEY_U 85
-#define GLFW_KEY_V 86
-#define GLFW_KEY_W 87
-#define GLFW_KEY_X 88
-#define GLFW_KEY_Y 89
-#define GLFW_KEY_Z 90
-#define GLFW_KEY_LEFT_BRACKET 91 /* [ */
-#define GLFW_KEY_BACKSLASH 92 /* \ */
-#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */
-#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */
-#define GLFW_KEY_WORLD_1 161 /* non-US #1 */
-#define GLFW_KEY_WORLD_2 162 /* non-US #2 */
-
-/* Function keys */
-#define GLFW_KEY_ESCAPE 256
-#define GLFW_KEY_ENTER 257
-#define GLFW_KEY_TAB 258
-#define GLFW_KEY_BACKSPACE 259
-#define GLFW_KEY_INSERT 260
-#define GLFW_KEY_DELETE 261
-#define GLFW_KEY_RIGHT 262
-#define GLFW_KEY_LEFT 263
-#define GLFW_KEY_DOWN 264
-#define GLFW_KEY_UP 265
-#define GLFW_KEY_PAGE_UP 266
-#define GLFW_KEY_PAGE_DOWN 267
-#define GLFW_KEY_HOME 268
-#define GLFW_KEY_END 269
-#define GLFW_KEY_CAPS_LOCK 280
-#define GLFW_KEY_SCROLL_LOCK 281
-#define GLFW_KEY_NUM_LOCK 282
-#define GLFW_KEY_PRINT_SCREEN 283
-#define GLFW_KEY_PAUSE 284
-#define GLFW_KEY_F1 290
-#define GLFW_KEY_F2 291
-#define GLFW_KEY_F3 292
-#define GLFW_KEY_F4 293
-#define GLFW_KEY_F5 294
-#define GLFW_KEY_F6 295
-#define GLFW_KEY_F7 296
-#define GLFW_KEY_F8 297
-#define GLFW_KEY_F9 298
-#define GLFW_KEY_F10 299
-#define GLFW_KEY_F11 300
-#define GLFW_KEY_F12 301
-#define GLFW_KEY_F13 302
-#define GLFW_KEY_F14 303
-#define GLFW_KEY_F15 304
-#define GLFW_KEY_F16 305
-#define GLFW_KEY_F17 306
-#define GLFW_KEY_F18 307
-#define GLFW_KEY_F19 308
-#define GLFW_KEY_F20 309
-#define GLFW_KEY_F21 310
-#define GLFW_KEY_F22 311
-#define GLFW_KEY_F23 312
-#define GLFW_KEY_F24 313
-#define GLFW_KEY_F25 314
-#define GLFW_KEY_KP_0 320
-#define GLFW_KEY_KP_1 321
-#define GLFW_KEY_KP_2 322
-#define GLFW_KEY_KP_3 323
-#define GLFW_KEY_KP_4 324
-#define GLFW_KEY_KP_5 325
-#define GLFW_KEY_KP_6 326
-#define GLFW_KEY_KP_7 327
-#define GLFW_KEY_KP_8 328
-#define GLFW_KEY_KP_9 329
-#define GLFW_KEY_KP_DECIMAL 330
-#define GLFW_KEY_KP_DIVIDE 331
-#define GLFW_KEY_KP_MULTIPLY 332
-#define GLFW_KEY_KP_SUBTRACT 333
-#define GLFW_KEY_KP_ADD 334
-#define GLFW_KEY_KP_ENTER 335
-#define GLFW_KEY_KP_EQUAL 336
-#define GLFW_KEY_LEFT_SHIFT 340
-#define GLFW_KEY_LEFT_CONTROL 341
-#define GLFW_KEY_LEFT_ALT 342
-#define GLFW_KEY_LEFT_SUPER 343
-#define GLFW_KEY_RIGHT_SHIFT 344
-#define GLFW_KEY_RIGHT_CONTROL 345
-#define GLFW_KEY_RIGHT_ALT 346
-#define GLFW_KEY_RIGHT_SUPER 347
-#define GLFW_KEY_MENU 348
-
-#define GLFW_KEY_LAST GLFW_KEY_MENU
-
-/*! @} */
-
-/*! @defgroup mods Modifier key flags
- * @brief Modifier key flags.
- *
- * See [key input](@ref input_key) for how these are used.
- *
- * @ingroup input
- * @{ */
-
-/*! @brief If this bit is set one or more Shift keys were held down.
- *
- * If this bit is set one or more Shift keys were held down.
- */
-#define GLFW_MOD_SHIFT 0x0001
-/*! @brief If this bit is set one or more Control keys were held down.
- *
- * If this bit is set one or more Control keys were held down.
- */
-#define GLFW_MOD_CONTROL 0x0002
-/*! @brief If this bit is set one or more Alt keys were held down.
- *
- * If this bit is set one or more Alt keys were held down.
- */
-#define GLFW_MOD_ALT 0x0004
-/*! @brief If this bit is set one or more Super keys were held down.
- *
- * If this bit is set one or more Super keys were held down.
- */
-#define GLFW_MOD_SUPER 0x0008
-/*! @brief If this bit is set the Caps Lock key is enabled.
- *
- * If this bit is set the Caps Lock key is enabled and the @ref
- * GLFW_LOCK_KEY_MODS input mode is set.
- */
-#define GLFW_MOD_CAPS_LOCK 0x0010
-/*! @brief If this bit is set the Num Lock key is enabled.
- *
- * If this bit is set the Num Lock key is enabled and the @ref
- * GLFW_LOCK_KEY_MODS input mode is set.
- */
-#define GLFW_MOD_NUM_LOCK 0x0020
-
-/*! @} */
-
-/*! @defgroup buttons Mouse buttons
- * @brief Mouse button IDs.
- *
- * See [mouse button input](@ref input_mouse_button) for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_MOUSE_BUTTON_1 0
-#define GLFW_MOUSE_BUTTON_2 1
-#define GLFW_MOUSE_BUTTON_3 2
-#define GLFW_MOUSE_BUTTON_4 3
-#define GLFW_MOUSE_BUTTON_5 4
-#define GLFW_MOUSE_BUTTON_6 5
-#define GLFW_MOUSE_BUTTON_7 6
-#define GLFW_MOUSE_BUTTON_8 7
-#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8
-#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1
-#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2
-#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3
-/*! @} */
-
-/*! @defgroup joysticks Joysticks
- * @brief Joystick IDs.
- *
- * See [joystick input](@ref joystick) for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_JOYSTICK_1 0
-#define GLFW_JOYSTICK_2 1
-#define GLFW_JOYSTICK_3 2
-#define GLFW_JOYSTICK_4 3
-#define GLFW_JOYSTICK_5 4
-#define GLFW_JOYSTICK_6 5
-#define GLFW_JOYSTICK_7 6
-#define GLFW_JOYSTICK_8 7
-#define GLFW_JOYSTICK_9 8
-#define GLFW_JOYSTICK_10 9
-#define GLFW_JOYSTICK_11 10
-#define GLFW_JOYSTICK_12 11
-#define GLFW_JOYSTICK_13 12
-#define GLFW_JOYSTICK_14 13
-#define GLFW_JOYSTICK_15 14
-#define GLFW_JOYSTICK_16 15
-#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
-/*! @} */
-
-/*! @defgroup gamepad_buttons Gamepad buttons
- * @brief Gamepad buttons.
- *
- * See @ref gamepad for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_GAMEPAD_BUTTON_A 0
-#define GLFW_GAMEPAD_BUTTON_B 1
-#define GLFW_GAMEPAD_BUTTON_X 2
-#define GLFW_GAMEPAD_BUTTON_Y 3
-#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4
-#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5
-#define GLFW_GAMEPAD_BUTTON_BACK 6
-#define GLFW_GAMEPAD_BUTTON_START 7
-#define GLFW_GAMEPAD_BUTTON_GUIDE 8
-#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9
-#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10
-#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11
-#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12
-#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13
-#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14
-#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT
-
-#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A
-#define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B
-#define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X
-#define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y
-/*! @} */
-
-/*! @defgroup gamepad_axes Gamepad axes
- * @brief Gamepad axes.
- *
- * See @ref gamepad for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_GAMEPAD_AXIS_LEFT_X 0
-#define GLFW_GAMEPAD_AXIS_LEFT_Y 1
-#define GLFW_GAMEPAD_AXIS_RIGHT_X 2
-#define GLFW_GAMEPAD_AXIS_RIGHT_Y 3
-#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4
-#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5
-#define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
-/*! @} */
-
-/*! @defgroup errors Error codes
- * @brief Error codes.
- *
- * See [error handling](@ref error_handling) for how these are used.
- *
- * @ingroup init
- * @{ */
-/*! @brief No error has occurred.
- *
- * No error has occurred.
- *
- * @analysis Yay.
- */
-#define GLFW_NO_ERROR 0
-/*! @brief GLFW has not been initialized.
- *
- * This occurs if a GLFW function was called that must not be called unless the
- * library is [initialized](@ref intro_init).
- *
- * @analysis Application programmer error. Initialize GLFW before calling any
- * function that requires initialization.
- */
-#define GLFW_NOT_INITIALIZED 0x00010001
-/*! @brief No context is current for this thread.
- *
- * This occurs if a GLFW function was called that needs and operates on the
- * current OpenGL or OpenGL ES context but no context is current on the calling
- * thread. One such function is @ref glfwSwapInterval.
- *
- * @analysis Application programmer error. Ensure a context is current before
- * calling functions that require a current context.
- */
-#define GLFW_NO_CURRENT_CONTEXT 0x00010002
-/*! @brief One of the arguments to the function was an invalid enum value.
- *
- * One of the arguments to the function was an invalid enum value, for example
- * requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_INVALID_ENUM 0x00010003
-/*! @brief One of the arguments to the function was an invalid value.
- *
- * One of the arguments to the function was an invalid value, for example
- * requesting a non-existent OpenGL or OpenGL ES version like 2.7.
- *
- * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead
- * result in a @ref GLFW_VERSION_UNAVAILABLE error.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_INVALID_VALUE 0x00010004
-/*! @brief A memory allocation failed.
- *
- * A memory allocation failed.
- *
- * @analysis A bug in GLFW or the underlying operating system. Report the bug
- * to our [issue tracker](https://github.com/glfw/glfw/issues).
- */
-#define GLFW_OUT_OF_MEMORY 0x00010005
-/*! @brief GLFW could not find support for the requested API on the system.
- *
- * GLFW could not find support for the requested API on the system.
- *
- * @analysis The installed graphics driver does not support the requested
- * API, or does not support it via the chosen context creation backend.
- * Below are a few examples.
- *
- * @par
- * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
- * supports OpenGL ES via EGL, while Nvidia and Intel only support it via
- * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa
- * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
- * driver. Older graphics drivers do not support Vulkan.
- */
-#define GLFW_API_UNAVAILABLE 0x00010006
-/*! @brief The requested OpenGL or OpenGL ES version is not available.
- *
- * The requested OpenGL or OpenGL ES version (including any requested context
- * or framebuffer hints) is not available on this machine.
- *
- * @analysis The machine does not support your requirements. If your
- * application is sufficiently flexible, downgrade your requirements and try
- * again. Otherwise, inform the user that their machine does not match your
- * requirements.
- *
- * @par
- * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0
- * comes out before the 4.x series gets that far, also fail with this error and
- * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions
- * will exist.
- */
-#define GLFW_VERSION_UNAVAILABLE 0x00010007
-/*! @brief A platform-specific error occurred that does not match any of the
- * more specific categories.
- *
- * A platform-specific error occurred that does not match any of the more
- * specific categories.
- *
- * @analysis A bug or configuration error in GLFW, the underlying operating
- * system or its drivers, or a lack of required resources. Report the issue to
- * our [issue tracker](https://github.com/glfw/glfw/issues).
- */
-#define GLFW_PLATFORM_ERROR 0x00010008
-/*! @brief The requested format is not supported or available.
- *
- * If emitted during window creation, the requested pixel format is not
- * supported.
- *
- * If emitted when querying the clipboard, the contents of the clipboard could
- * not be converted to the requested format.
- *
- * @analysis If emitted during window creation, one or more
- * [hard constraints](@ref window_hints_hard) did not match any of the
- * available pixel formats. If your application is sufficiently flexible,
- * downgrade your requirements and try again. Otherwise, inform the user that
- * their machine does not match your requirements.
- *
- * @par
- * If emitted when querying the clipboard, ignore the error or report it to
- * the user, as appropriate.
- */
-#define GLFW_FORMAT_UNAVAILABLE 0x00010009
-/*! @brief The specified window does not have an OpenGL or OpenGL ES context.
- *
- * A window that does not have an OpenGL or OpenGL ES context was passed to
- * a function that requires it to have one.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_NO_WINDOW_CONTEXT 0x0001000A
-/*! @} */
-
-/*! @addtogroup window
- * @{ */
-/*! @brief Input focus window hint and attribute
- *
- * Input focus [window hint](@ref GLFW_FOCUSED_hint) or
- * [window attribute](@ref GLFW_FOCUSED_attrib).
- */
-#define GLFW_FOCUSED 0x00020001
-/*! @brief Window iconification window attribute
- *
- * Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib).
- */
-#define GLFW_ICONIFIED 0x00020002
-/*! @brief Window resize-ability window hint and attribute
- *
- * Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and
- * [window attribute](@ref GLFW_RESIZABLE_attrib).
- */
-#define GLFW_RESIZABLE 0x00020003
-/*! @brief Window visibility window hint and attribute
- *
- * Window visibility [window hint](@ref GLFW_VISIBLE_hint) and
- * [window attribute](@ref GLFW_VISIBLE_attrib).
- */
-#define GLFW_VISIBLE 0x00020004
-/*! @brief Window decoration window hint and attribute
- *
- * Window decoration [window hint](@ref GLFW_DECORATED_hint) and
- * [window attribute](@ref GLFW_DECORATED_attrib).
- */
-#define GLFW_DECORATED 0x00020005
-/*! @brief Window auto-iconification window hint and attribute
- *
- * Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and
- * [window attribute](@ref GLFW_AUTO_ICONIFY_attrib).
- */
-#define GLFW_AUTO_ICONIFY 0x00020006
-/*! @brief Window decoration window hint and attribute
- *
- * Window decoration [window hint](@ref GLFW_FLOATING_hint) and
- * [window attribute](@ref GLFW_FLOATING_attrib).
- */
-#define GLFW_FLOATING 0x00020007
-/*! @brief Window maximization window hint and attribute
- *
- * Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and
- * [window attribute](@ref GLFW_MAXIMIZED_attrib).
- */
-#define GLFW_MAXIMIZED 0x00020008
-/*! @brief Cursor centering window hint
- *
- * Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint).
- */
-#define GLFW_CENTER_CURSOR 0x00020009
-/*! @brief Window framebuffer transparency hint and attribute
- *
- * Window framebuffer transparency
- * [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and
- * [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib).
- */
-#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A
-/*! @brief Mouse cursor hover window attribute.
- *
- * Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib).
- */
-#define GLFW_HOVERED 0x0002000B
-/*! @brief Input focus on calling show window hint and attribute
- *
- * Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or
- * [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib).
- */
-#define GLFW_FOCUS_ON_SHOW 0x0002000C
-
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_RED_BITS).
- */
-#define GLFW_RED_BITS 0x00021001
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS).
- */
-#define GLFW_GREEN_BITS 0x00021002
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS).
- */
-#define GLFW_BLUE_BITS 0x00021003
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS).
- */
-#define GLFW_ALPHA_BITS 0x00021004
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS).
- */
-#define GLFW_DEPTH_BITS 0x00021005
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS).
- */
-#define GLFW_STENCIL_BITS 0x00021006
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS).
- */
-#define GLFW_ACCUM_RED_BITS 0x00021007
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS).
- */
-#define GLFW_ACCUM_GREEN_BITS 0x00021008
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS).
- */
-#define GLFW_ACCUM_BLUE_BITS 0x00021009
-/*! @brief Framebuffer bit depth hint.
- *
- * Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS).
- */
-#define GLFW_ACCUM_ALPHA_BITS 0x0002100A
-/*! @brief Framebuffer auxiliary buffer hint.
- *
- * Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS).
- */
-#define GLFW_AUX_BUFFERS 0x0002100B
-/*! @brief OpenGL stereoscopic rendering hint.
- *
- * OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO).
- */
-#define GLFW_STEREO 0x0002100C
-/*! @brief Framebuffer MSAA samples hint.
- *
- * Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES).
- */
-#define GLFW_SAMPLES 0x0002100D
-/*! @brief Framebuffer sRGB hint.
- *
- * Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE).
- */
-#define GLFW_SRGB_CAPABLE 0x0002100E
-/*! @brief Monitor refresh rate hint.
- *
- * Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE).
- */
-#define GLFW_REFRESH_RATE 0x0002100F
-/*! @brief Framebuffer double buffering hint.
- *
- * Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER).
- */
-#define GLFW_DOUBLEBUFFER 0x00021010
-
-/*! @brief Context client API hint and attribute.
- *
- * Context client API [hint](@ref GLFW_CLIENT_API_hint) and
- * [attribute](@ref GLFW_CLIENT_API_attrib).
- */
-#define GLFW_CLIENT_API 0x00022001
-/*! @brief Context client API major version hint and attribute.
- *
- * Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint)
- * and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib).
- */
-#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002
-/*! @brief Context client API minor version hint and attribute.
- *
- * Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint)
- * and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib).
- */
-#define GLFW_CONTEXT_VERSION_MINOR 0x00022003
-/*! @brief Context client API revision number attribute.
- *
- * Context client API revision number
- * [attribute](@ref GLFW_CONTEXT_REVISION_attrib).
- */
-#define GLFW_CONTEXT_REVISION 0x00022004
-/*! @brief Context robustness hint and attribute.
- *
- * Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint)
- * and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib).
- */
-#define GLFW_CONTEXT_ROBUSTNESS 0x00022005
-/*! @brief OpenGL forward-compatibility hint and attribute.
- *
- * OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)
- * and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).
- */
-#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
-/*! @brief Debug mode context hint and attribute.
- *
- * Debug mode context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and
- * [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib).
- */
-#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
-/*! @brief OpenGL profile hint and attribute.
- *
- * OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and
- * [attribute](@ref GLFW_OPENGL_PROFILE_attrib).
- */
-#define GLFW_OPENGL_PROFILE 0x00022008
-/*! @brief Context flush-on-release hint and attribute.
- *
- * Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and
- * [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib).
- */
-#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009
-/*! @brief Context error suppression hint and attribute.
- *
- * Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and
- * [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib).
- */
-#define GLFW_CONTEXT_NO_ERROR 0x0002200A
-/*! @brief Context creation API hint and attribute.
- *
- * Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and
- * [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib).
- */
-#define GLFW_CONTEXT_CREATION_API 0x0002200B
-/*! @brief Window content area scaling window
- * [window hint](@ref GLFW_SCALE_TO_MONITOR).
- */
-#define GLFW_SCALE_TO_MONITOR 0x0002200C
-/*! @brief macOS specific
- * [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).
- */
-#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001
-/*! @brief macOS specific
- * [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).
- */
-#define GLFW_COCOA_FRAME_NAME 0x00023002
-/*! @brief macOS specific
- * [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint).
- */
-#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003
-/*! @brief X11 specific
- * [window hint](@ref GLFW_X11_CLASS_NAME_hint).
- */
-#define GLFW_X11_CLASS_NAME 0x00024001
-/*! @brief X11 specific
- * [window hint](@ref GLFW_X11_CLASS_NAME_hint).
- */
-#define GLFW_X11_INSTANCE_NAME 0x00024002
-/*! @} */
-
-#define GLFW_NO_API 0
-#define GLFW_OPENGL_API 0x00030001
-#define GLFW_OPENGL_ES_API 0x00030002
-
-#define GLFW_NO_ROBUSTNESS 0
-#define GLFW_NO_RESET_NOTIFICATION 0x00031001
-#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002
-
-#define GLFW_OPENGL_ANY_PROFILE 0
-#define GLFW_OPENGL_CORE_PROFILE 0x00032001
-#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002
-
-#define GLFW_CURSOR 0x00033001
-#define GLFW_STICKY_KEYS 0x00033002
-#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003
-#define GLFW_LOCK_KEY_MODS 0x00033004
-#define GLFW_RAW_MOUSE_MOTION 0x00033005
-
-#define GLFW_CURSOR_NORMAL 0x00034001
-#define GLFW_CURSOR_HIDDEN 0x00034002
-#define GLFW_CURSOR_DISABLED 0x00034003
-
-#define GLFW_ANY_RELEASE_BEHAVIOR 0
-#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001
-#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002
-
-#define GLFW_NATIVE_CONTEXT_API 0x00036001
-#define GLFW_EGL_CONTEXT_API 0x00036002
-#define GLFW_OSMESA_CONTEXT_API 0x00036003
-
-/*! @defgroup shapes Standard cursor shapes
- * @brief Standard system cursor shapes.
- *
- * See [standard cursor creation](@ref cursor_standard) for how these are used.
- *
- * @ingroup input
- * @{ */
-
-/*! @brief The regular arrow cursor shape.
- *
- * The regular arrow cursor.
- */
-#define GLFW_ARROW_CURSOR 0x00036001
-/*! @brief The text input I-beam cursor shape.
- *
- * The text input I-beam cursor shape.
- */
-#define GLFW_IBEAM_CURSOR 0x00036002
-/*! @brief The crosshair shape.
- *
- * The crosshair shape.
- */
-#define GLFW_CROSSHAIR_CURSOR 0x00036003
-/*! @brief The hand shape.
- *
- * The hand shape.
- */
-#define GLFW_HAND_CURSOR 0x00036004
-/*! @brief The horizontal resize arrow shape.
- *
- * The horizontal resize arrow shape.
- */
-#define GLFW_HRESIZE_CURSOR 0x00036005
-/*! @brief The vertical resize arrow shape.
- *
- * The vertical resize arrow shape.
- */
-#define GLFW_VRESIZE_CURSOR 0x00036006
-/*! @} */
-
-#define GLFW_CONNECTED 0x00040001
-#define GLFW_DISCONNECTED 0x00040002
-
-/*! @addtogroup init
- * @{ */
-/*! @brief Joystick hat buttons init hint.
- *
- * Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).
- */
-#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001
-/*! @brief macOS specific init hint.
- *
- * macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).
- */
-#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001
-/*! @brief macOS specific init hint.
- *
- * macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint).
- */
-#define GLFW_COCOA_MENUBAR 0x00051002
-/*! @} */
-
-#define GLFW_DONT_CARE -1
-
-
-/*************************************************************************
- * GLFW API types
- *************************************************************************/
-
-/*! @brief Client API function pointer type.
- *
- * Generic function pointer used for returning client API function pointers
- * without forcing a cast from a regular pointer.
- *
- * @sa @ref context_glext
- * @sa @ref glfwGetProcAddress
- *
- * @since Added in version 3.0.
- *
- * @ingroup context
- */
-typedef void (*GLFWglproc)(void);
-
-/*! @brief Vulkan API function pointer type.
- *
- * Generic function pointer used for returning Vulkan API function pointers
- * without forcing a cast from a regular pointer.
- *
- * @sa @ref vulkan_proc
- * @sa @ref glfwGetInstanceProcAddress
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-typedef void (*GLFWvkproc)(void);
-
-/*! @brief Opaque monitor object.
- *
- * Opaque monitor object.
- *
- * @see @ref monitor_object
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef struct GLFWmonitor GLFWmonitor;
-
-/*! @brief Opaque window object.
- *
- * Opaque window object.
- *
- * @see @ref window_object
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef struct GLFWwindow GLFWwindow;
-
-/*! @brief Opaque cursor object.
- *
- * Opaque cursor object.
- *
- * @see @ref cursor_object
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-typedef struct GLFWcursor GLFWcursor;
-
-/*! @brief The function pointer type for error callbacks.
- *
- * This is the function pointer type for error callbacks. An error callback
- * function has the following signature:
- * @code
- * void callback_name(int error_code, const char* description)
- * @endcode
- *
- * @param[in] error_code An [error code](@ref errors). Future releases may add
- * more error codes.
- * @param[in] description A UTF-8 encoded string describing the error.
- *
- * @pointer_lifetime The error description string is valid until the callback
- * function returns.
- *
- * @sa @ref error_handling
- * @sa @ref glfwSetErrorCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-typedef void (* GLFWerrorfun)(int error_code, const char* description);
-
-/*! @brief The function pointer type for window position callbacks.
- *
- * This is the function pointer type for window position callbacks. A window
- * position callback function has the following signature:
- * @code
- * void callback_name(GLFWwindow* window, int xpos, int ypos)
- * @endcode
- *
- * @param[in] window The window that was moved.
- * @param[in] xpos The new x-coordinate, in screen coordinates, of the
- * upper-left corner of the content area of the window.
- * @param[in] ypos The new y-coordinate, in screen coordinates, of the
- * upper-left corner of the content area of the window.
- *
- * @sa @ref window_pos
- * @sa @ref glfwSetWindowPosCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowposfun)(GLFWwindow* window, int xpos, int ypos);
-
-/*! @brief The function pointer type for window size callbacks.
- *
- * This is the function pointer type for window size callbacks. A window size
- * callback function has the following signature:
- * @code
- * void callback_name(GLFWwindow* window, int width, int height)
- * @endcode
- *
- * @param[in] window The window that was resized.
- * @param[in] width The new width, in screen coordinates, of the window.
- * @param[in] height The new height, in screen coordinates, of the window.
- *
- * @sa @ref window_size
- * @sa @ref glfwSetWindowSizeCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowsizefun)(GLFWwindow* window, int width, int height);
-
-/*! @brief The function pointer type for window close callbacks.
- *
- * This is the function pointer type for window close callbacks. A window
- * close callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window)
- * @endcode
- *
- * @param[in] window The window that the user attempted to close.
- *
- * @sa @ref window_close
- * @sa @ref glfwSetWindowCloseCallback
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowclosefun)(GLFWwindow* window);
-
-/*! @brief The function pointer type for window content refresh callbacks.
- *
- * This is the function pointer type for window content refresh callbacks.
- * A window content refresh callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window);
- * @endcode
- *
- * @param[in] window The window whose content needs to be refreshed.
- *
- * @sa @ref window_refresh
- * @sa @ref glfwSetWindowRefreshCallback
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowrefreshfun)(GLFWwindow* window);
-
-/*! @brief The function pointer type for window focus callbacks.
- *
- * This is the function pointer type for window focus callbacks. A window
- * focus callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int focused)
- * @endcode
- *
- * @param[in] window The window that gained or lost input focus.
- * @param[in] focused `GLFW_TRUE` if the window was given input focus, or
- * `GLFW_FALSE` if it lost it.
- *
- * @sa @ref window_focus
- * @sa @ref glfwSetWindowFocusCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowfocusfun)(GLFWwindow* window, int focused);
-
-/*! @brief The function pointer type for window iconify callbacks.
- *
- * This is the function pointer type for window iconify callbacks. A window
- * iconify callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int iconified)
- * @endcode
- *
- * @param[in] window The window that was iconified or restored.
- * @param[in] iconified `GLFW_TRUE` if the window was iconified, or
- * `GLFW_FALSE` if it was restored.
- *
- * @sa @ref window_iconify
- * @sa @ref glfwSetWindowIconifyCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowiconifyfun)(GLFWwindow* window, int iconified);
-
-/*! @brief The function pointer type for window maximize callbacks.
- *
- * This is the function pointer type for window maximize callbacks. A window
- * maximize callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int maximized)
- * @endcode
- *
- * @param[in] window The window that was maximized or restored.
- * @param[in] maximized `GLFW_TRUE` if the window was maximized, or
- * `GLFW_FALSE` if it was restored.
- *
- * @sa @ref window_maximize
- * @sa glfwSetWindowMaximizeCallback
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowmaximizefun)(GLFWwindow* window, int maximized);
-
-/*! @brief The function pointer type for framebuffer size callbacks.
- *
- * This is the function pointer type for framebuffer size callbacks.
- * A framebuffer size callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int width, int height)
- * @endcode
- *
- * @param[in] window The window whose framebuffer was resized.
- * @param[in] width The new width, in pixels, of the framebuffer.
- * @param[in] height The new height, in pixels, of the framebuffer.
- *
- * @sa @ref window_fbsize
- * @sa @ref glfwSetFramebufferSizeCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWframebuffersizefun)(GLFWwindow* window, int width, int height);
-
-/*! @brief The function pointer type for window content scale callbacks.
- *
- * This is the function pointer type for window content scale callbacks.
- * A window content scale callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, float xscale, float yscale)
- * @endcode
- *
- * @param[in] window The window whose content scale changed.
- * @param[in] xscale The new x-axis content scale of the window.
- * @param[in] yscale The new y-axis content scale of the window.
- *
- * @sa @ref window_scale
- * @sa @ref glfwSetWindowContentScaleCallback
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowcontentscalefun)(GLFWwindow* window, float xscale, float yscale);
-
-/*! @brief The function pointer type for mouse button callbacks.
- *
- * This is the function pointer type for mouse button callback functions.
- * A mouse button callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int button, int action, int mods)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] button The [mouse button](@ref buttons) that was pressed or
- * released.
- * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. Future releases
- * may add more actions.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_mouse_button
- * @sa @ref glfwSetMouseButtonCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle and modifier mask parameters.
- *
- * @ingroup input
- */
-typedef void (* GLFWmousebuttonfun)(GLFWwindow* window, int button, int action, int mods);
-
-/*! @brief The function pointer type for cursor position callbacks.
- *
- * This is the function pointer type for cursor position callbacks. A cursor
- * position callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, double xpos, double ypos);
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] xpos The new cursor x-coordinate, relative to the left edge of
- * the content area.
- * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the
- * content area.
- *
- * @sa @ref cursor_pos
- * @sa @ref glfwSetCursorPosCallback
- *
- * @since Added in version 3.0. Replaces `GLFWmouseposfun`.
- *
- * @ingroup input
- */
-typedef void (* GLFWcursorposfun)(GLFWwindow* window, double xpos, double ypos);
-
-/*! @brief The function pointer type for cursor enter/leave callbacks.
- *
- * This is the function pointer type for cursor enter/leave callbacks.
- * A cursor enter/leave callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int entered)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] entered `GLFW_TRUE` if the cursor entered the window's content
- * area, or `GLFW_FALSE` if it left it.
- *
- * @sa @ref cursor_enter
- * @sa @ref glfwSetCursorEnterCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-typedef void (* GLFWcursorenterfun)(GLFWwindow* window, int entered);
-
-/*! @brief The function pointer type for scroll callbacks.
- *
- * This is the function pointer type for scroll callbacks. A scroll callback
- * function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, double xoffset, double yoffset)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] xoffset The scroll offset along the x-axis.
- * @param[in] yoffset The scroll offset along the y-axis.
- *
- * @sa @ref scrolling
- * @sa @ref glfwSetScrollCallback
- *
- * @since Added in version 3.0. Replaces `GLFWmousewheelfun`.
- *
- * @ingroup input
- */
-typedef void (* GLFWscrollfun)(GLFWwindow* window, double xoffset, double yoffset);
-
-/*! @brief The function pointer type for keyboard key callbacks.
- *
- * This is the function pointer type for keyboard key callbacks. A keyboard
- * key callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] key The [keyboard key](@ref keys) that was pressed or released.
- * @param[in] scancode The system-specific scancode of the key.
- * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. Future
- * releases may add more actions.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_key
- * @sa @ref glfwSetKeyCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle, scancode and modifier mask parameters.
- *
- * @ingroup input
- */
-typedef void (* GLFWkeyfun)(GLFWwindow* window, int key, int scancode, int action, int mods);
-
-/*! @brief The function pointer type for Unicode character callbacks.
- *
- * This is the function pointer type for Unicode character callbacks.
- * A Unicode character callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, unsigned int codepoint)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] codepoint The Unicode code point of the character.
- *
- * @sa @ref input_char
- * @sa @ref glfwSetCharCallback
- *
- * @since Added in version 2.4.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-typedef void (* GLFWcharfun)(GLFWwindow* window, unsigned int codepoint);
-
-/*! @brief The function pointer type for Unicode character with modifiers
- * callbacks.
- *
- * This is the function pointer type for Unicode character with modifiers
- * callbacks. It is called for each input character, regardless of what
- * modifier keys are held down. A Unicode character with modifiers callback
- * function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] codepoint The Unicode code point of the character.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_char
- * @sa @ref glfwSetCharModsCallback
- *
- * @deprecated Scheduled for removal in version 4.0.
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-typedef void (* GLFWcharmodsfun)(GLFWwindow* window, unsigned int codepoint, int mods);
-
-/*! @brief The function pointer type for path drop callbacks.
- *
- * This is the function pointer type for path drop callbacks. A path drop
- * callback function has the following signature:
- * @code
- * void function_name(GLFWwindow* window, int path_count, const char* paths[])
- * @endcode
- *
- * @param[in] window The window that received the event.
- * @param[in] path_count The number of dropped paths.
- * @param[in] paths The UTF-8 encoded file and/or directory path names.
- *
- * @pointer_lifetime The path array and its strings are valid until the
- * callback function returns.
- *
- * @sa @ref path_drop
- * @sa @ref glfwSetDropCallback
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-typedef void (* GLFWdropfun)(GLFWwindow* window, int path_count, const char* paths[]);
-
-/*! @brief The function pointer type for monitor configuration callbacks.
- *
- * This is the function pointer type for monitor configuration callbacks.
- * A monitor callback function has the following signature:
- * @code
- * void function_name(GLFWmonitor* monitor, int event)
- * @endcode
- *
- * @param[in] monitor The monitor that was connected or disconnected.
- * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future
- * releases may add more events.
- *
- * @sa @ref monitor_event
- * @sa @ref glfwSetMonitorCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef void (* GLFWmonitorfun)(GLFWmonitor* monitor, int event);
-
-/*! @brief The function pointer type for joystick configuration callbacks.
- *
- * This is the function pointer type for joystick configuration callbacks.
- * A joystick configuration callback function has the following signature:
- * @code
- * void function_name(int jid, int event)
- * @endcode
- *
- * @param[in] jid The joystick that was connected or disconnected.
- * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future
- * releases may add more events.
- *
- * @sa @ref joystick_event
- * @sa @ref glfwSetJoystickCallback
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-typedef void (* GLFWjoystickfun)(int jid, int event);
-
-/*! @brief Video mode type.
- *
- * This describes a single video mode.
- *
- * @sa @ref monitor_modes
- * @sa @ref glfwGetVideoMode
- * @sa @ref glfwGetVideoModes
- *
- * @since Added in version 1.0.
- * @glfw3 Added refresh rate member.
- *
- * @ingroup monitor
- */
-typedef struct GLFWvidmode
-{
- /*! The width, in screen coordinates, of the video mode.
- */
- int width;
- /*! The height, in screen coordinates, of the video mode.
- */
- int height;
- /*! The bit depth of the red channel of the video mode.
- */
- int redBits;
- /*! The bit depth of the green channel of the video mode.
- */
- int greenBits;
- /*! The bit depth of the blue channel of the video mode.
- */
- int blueBits;
- /*! The refresh rate, in Hz, of the video mode.
- */
- int refreshRate;
-} GLFWvidmode;
-
-/*! @brief Gamma ramp.
- *
- * This describes the gamma ramp for a monitor.
- *
- * @sa @ref monitor_gamma
- * @sa @ref glfwGetGammaRamp
- * @sa @ref glfwSetGammaRamp
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef struct GLFWgammaramp
-{
- /*! An array of value describing the response of the red channel.
- */
- unsigned short* red;
- /*! An array of value describing the response of the green channel.
- */
- unsigned short* green;
- /*! An array of value describing the response of the blue channel.
- */
- unsigned short* blue;
- /*! The number of elements in each array.
- */
- unsigned int size;
-} GLFWgammaramp;
-
-/*! @brief Image data.
- *
- * This describes a single 2D image. See the documentation for each related
- * function what the expected pixel format is.
- *
- * @sa @ref cursor_custom
- * @sa @ref window_icon
- *
- * @since Added in version 2.1.
- * @glfw3 Removed format and bytes-per-pixel members.
- *
- * @ingroup window
- */
-typedef struct GLFWimage
-{
- /*! The width, in pixels, of this image.
- */
- int width;
- /*! The height, in pixels, of this image.
- */
- int height;
- /*! The pixel data of this image, arranged left-to-right, top-to-bottom.
- */
- unsigned char* pixels;
-} GLFWimage;
-
-/*! @brief Gamepad input state
- *
- * This describes the input state of a gamepad.
- *
- * @sa @ref gamepad
- * @sa @ref glfwGetGamepadState
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-typedef struct GLFWgamepadstate
-{
- /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
- * or `GLFW_RELEASE`.
- */
- unsigned char buttons[15];
- /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
- * to 1.0 inclusive.
- */
- float axes[6];
-} GLFWgamepadstate;
-
-
-/*************************************************************************
- * GLFW API functions
- *************************************************************************/
-
-/*! @brief Initializes the GLFW library.
- *
- * This function initializes the GLFW library. Before most GLFW functions can
- * be used, GLFW must be initialized, and before an application terminates GLFW
- * should be terminated in order to free any resources allocated during or
- * after initialization.
- *
- * If this function fails, it calls @ref glfwTerminate before returning. If it
- * succeeds, you should call @ref glfwTerminate before the application exits.
- *
- * Additional calls to this function after successful initialization but before
- * termination will return `GLFW_TRUE` immediately.
- *
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
- *
- * @remark @macos This function will change the current directory of the
- * application to the `Contents/Resources` subdirectory of the application's
- * bundle, if present. This can be disabled with the @ref
- * GLFW_COCOA_CHDIR_RESOURCES init hint.
- *
- * @remark @x11 This function will set the `LC_CTYPE` category of the
- * application locale according to the current environment if that category is
- * still "C". This is because the "C" locale breaks Unicode text input.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref intro_init
- * @sa @ref glfwTerminate
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI int glfwInit(void);
-
-/*! @brief Terminates the GLFW library.
- *
- * This function destroys all remaining windows and cursors, restores any
- * modified gamma ramps and frees any other allocated resources. Once this
- * function is called, you must again call @ref glfwInit successfully before
- * you will be able to use most GLFW functions.
- *
- * If GLFW has been successfully initialized, this function should be called
- * before the application exits. If initialization fails, there is no need to
- * call this function, as it is called by @ref glfwInit before it returns
- * failure.
- *
- * This function has no effect if GLFW is not initialized.
- *
- * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @warning The contexts of any remaining windows must not be current on any
- * other thread when this function is called.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref intro_init
- * @sa @ref glfwInit
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI void glfwTerminate(void);
-
-/*! @brief Sets the specified init hint to the desired value.
- *
- * This function sets hints for the next initialization of GLFW.
- *
- * The values you set hints to are never reset by GLFW, but they only take
- * effect during initialization. Once GLFW has been initialized, any values
- * you set will be ignored until the library is terminated and initialized
- * again.
- *
- * Some hints are platform specific. These may be set on any platform but they
- * will only affect their specific platform. Other platforms will ignore them.
- * Setting these hints requires no platform specific headers or functions.
- *
- * @param[in] hint The [init hint](@ref init_hints) to set.
- * @param[in] value The new value of the init hint.
- *
- * @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref
- * GLFW_INVALID_VALUE.
- *
- * @remarks This function may be called before @ref glfwInit.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa init_hints
- * @sa glfwInit
- *
- * @since Added in version 3.3.
- *
- * @ingroup init
- */
-GLFWAPI void glfwInitHint(int hint, int value);
-
-/*! @brief Retrieves the version of the GLFW library.
- *
- * This function retrieves the major, minor and revision numbers of the GLFW
- * library. It is intended for when you are using GLFW as a shared library and
- * want to ensure that you are using the minimum required version.
- *
- * Any or all of the version arguments may be `NULL`.
- *
- * @param[out] major Where to store the major version number, or `NULL`.
- * @param[out] minor Where to store the minor version number, or `NULL`.
- * @param[out] rev Where to store the revision number, or `NULL`.
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref intro_version
- * @sa @ref glfwGetVersionString
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
-
-/*! @brief Returns a string describing the compile-time configuration.
- *
- * This function returns the compile-time generated
- * [version string](@ref intro_version_string) of the GLFW library binary. It
- * describes the version, platform, compiler and any platform-specific
- * compile-time options. It should not be confused with the OpenGL or OpenGL
- * ES version string, queried with `glGetString`.
- *
- * __Do not use the version string__ to parse the GLFW library version. The
- * @ref glfwGetVersion function provides the version of the running library
- * binary in numerical format.
- *
- * @return The ASCII encoded GLFW version string.
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @pointer_lifetime The returned string is static and compile-time generated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref intro_version
- * @sa @ref glfwGetVersion
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-GLFWAPI const char* glfwGetVersionString(void);
-
-/*! @brief Returns and clears the last error for the calling thread.
- *
- * This function returns and clears the [error code](@ref errors) of the last
- * error that occurred on the calling thread, and optionally a UTF-8 encoded
- * human-readable description of it. If no error has occurred since the last
- * call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is
- * set to `NULL`.
- *
- * @param[in] description Where to store the error description pointer, or `NULL`.
- * @return The last error code for the calling thread, or @ref GLFW_NO_ERROR
- * (zero).
- *
- * @errors None.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is guaranteed to be valid only until the
- * next error occurs or the library is terminated.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref error_handling
- * @sa @ref glfwSetErrorCallback
- *
- * @since Added in version 3.3.
- *
- * @ingroup init
- */
-GLFWAPI int glfwGetError(const char** description);
-
-/*! @brief Sets the error callback.
- *
- * This function sets the error callback, which is called with an error code
- * and a human-readable description each time a GLFW error occurs.
- *
- * The error code is set before the callback is called. Calling @ref
- * glfwGetError from the error callback will return the same value as the error
- * code argument.
- *
- * The error callback is called on the thread where the error occurred. If you
- * are using GLFW from multiple threads, your error callback needs to be
- * written accordingly.
- *
- * Because the description string may have been generated specifically for that
- * error, it is not guaranteed to be valid after the callback has returned. If
- * you wish to use it after the callback returns, you need to make a copy.
- *
- * Once set, the error callback remains set even after the library has been
- * terminated.
- *
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set.
- *
- * @callback_signature
- * @code
- * void callback_name(int error_code, const char* description)
- * @endcode
- * For more information about the callback parameters, see the
- * [callback pointer type](@ref GLFWerrorfun).
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref error_handling
- * @sa @ref glfwGetError
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
-
-/*! @brief Returns the currently connected monitors.
- *
- * This function returns an array of handles for all currently connected
- * monitors. The primary monitor is always first in the returned array. If no
- * monitors were found, this function returns `NULL`.
- *
- * @param[out] count Where to store the number of monitors in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of monitor handles, or `NULL` if no monitors were found or
- * if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is guaranteed to be valid only until the
- * monitor configuration changes or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_monitors
- * @sa @ref monitor_event
- * @sa @ref glfwGetPrimaryMonitor
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
-
-/*! @brief Returns the primary monitor.
- *
- * This function returns the primary monitor. This is usually the monitor
- * where elements like the task bar or global menu bar are located.
- *
- * @return The primary monitor, or `NULL` if no monitors were found or if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @remark The primary monitor is always first in the array returned by @ref
- * glfwGetMonitors.
- *
- * @sa @ref monitor_monitors
- * @sa @ref glfwGetMonitors
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
-
-/*! @brief Returns the position of the monitor's viewport on the virtual screen.
- *
- * This function returns the position, in screen coordinates, of the upper-left
- * corner of the specified monitor.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
- * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
-
-/*! @brief Retrieves the work area of the monitor.
- *
- * This function returns the position, in screen coordinates, of the upper-left
- * corner of the work area of the specified monitor along with the work area
- * size in screen coordinates. The work area is defined as the area of the
- * monitor not occluded by the operating system task bar where present. If no
- * task bar exists then the work area is the monitor resolution in screen
- * coordinates.
- *
- * Any or all of the position and size arguments may be `NULL`. If an error
- * occurs, all non-`NULL` position and size arguments will be set to zero.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
- * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
- * @param[out] width Where to store the monitor width, or `NULL`.
- * @param[out] height Where to store the monitor height, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_workarea
- *
- * @since Added in version 3.3.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
-
-/*! @brief Returns the physical size of the monitor.
- *
- * This function returns the size, in millimetres, of the display area of the
- * specified monitor.
- *
- * Some systems do not provide accurate monitor size information, either
- * because the monitor
- * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data)
- * data is incorrect or because the driver does not report it accurately.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] widthMM Where to store the width, in millimetres, of the
- * monitor's display area, or `NULL`.
- * @param[out] heightMM Where to store the height, in millimetres, of the
- * monitor's display area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @win32 On Windows 8 and earlier the physical size is calculated from
- * the current resolution and system DPI instead of querying the monitor EDID data.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);
-
-/*! @brief Retrieves the content scale for the specified monitor.
- *
- * This function retrieves the content scale for the specified monitor. The
- * content scale is the ratio between the current DPI and the platform's
- * default DPI. This is especially important for text and any UI elements. If
- * the pixel dimensions of your UI scaled by this look appropriate on your
- * machine then it should appear at a reasonable size on other machines
- * regardless of their DPI and scaling settings. This relies on the system DPI
- * and scaling settings being somewhat correct.
- *
- * The content scale may depend on both the monitor resolution and pixel
- * density and on user settings. It may be very different from the raw DPI
- * calculated from the physical size and current resolution.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] xscale Where to store the x-axis content scale, or `NULL`.
- * @param[out] yscale Where to store the y-axis content scale, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_scale
- * @sa @ref glfwGetWindowContentScale
- *
- * @since Added in version 3.3.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale);
-
-/*! @brief Returns the name of the specified monitor.
- *
- * This function returns a human-readable name, encoded as UTF-8, of the
- * specified monitor. The name typically reflects the make and model of the
- * monitor and is not guaranteed to be unique among the connected monitors.
- *
- * @param[in] monitor The monitor to query.
- * @return The UTF-8 encoded name of the monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
-
-/*! @brief Sets the user pointer of the specified monitor.
- *
- * This function sets the user-defined pointer of the specified monitor. The
- * current value is retained until the monitor is disconnected. The initial
- * value is `NULL`.
- *
- * This function may be called from the monitor callback, even for a monitor
- * that is being disconnected.
- *
- * @param[in] monitor The monitor whose pointer to set.
- * @param[in] pointer The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref monitor_userptr
- * @sa @ref glfwGetMonitorUserPointer
- *
- * @since Added in version 3.3.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
-
-/*! @brief Returns the user pointer of the specified monitor.
- *
- * This function returns the current value of the user-defined pointer of the
- * specified monitor. The initial value is `NULL`.
- *
- * This function may be called from the monitor callback, even for a monitor
- * that is being disconnected.
- *
- * @param[in] monitor The monitor whose pointer to return.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref monitor_userptr
- * @sa @ref glfwSetMonitorUserPointer
- *
- * @since Added in version 3.3.
- *
- * @ingroup monitor
- */
-GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
-
-/*! @brief Sets the monitor configuration callback.
- *
- * This function sets the monitor configuration callback, or removes the
- * currently set callback. This is called when a monitor is connected to or
- * disconnected from the system.
- *
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWmonitor* monitor, int event)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWmonitorfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_event
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
-
-/*! @brief Returns the available video modes for the specified monitor.
- *
- * This function returns an array of all video modes supported by the specified
- * monitor. The returned array is sorted in ascending order, first by color
- * bit depth (the sum of all channel depths), then by resolution area (the
- * product of width and height), then resolution width and finally by refresh
- * rate.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] count Where to store the number of video modes in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of video modes, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected, this function is called again for that monitor or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_modes
- * @sa @ref glfwGetVideoMode
- *
- * @since Added in version 1.0.
- * @glfw3 Changed to return an array of modes for a specific monitor.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
-
-/*! @brief Returns the current mode of the specified monitor.
- *
- * This function returns the current video mode of the specified monitor. If
- * you have created a full screen window for that monitor, the return value
- * will depend on whether that window is iconified.
- *
- * @param[in] monitor The monitor to query.
- * @return The current mode of the monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_modes
- * @sa @ref glfwGetVideoModes
- *
- * @since Added in version 3.0. Replaces `glfwGetDesktopMode`.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
-
-/*! @brief Generates a gamma ramp and sets it for the specified monitor.
- *
- * This function generates an appropriately sized gamma ramp from the specified
- * exponent and then calls @ref glfwSetGammaRamp with it. The value must be
- * a finite number greater than zero.
- *
- * The software controlled gamma ramp is applied _in addition_ to the hardware
- * gamma correction, which today is usually an approximation of sRGB gamma.
- * This means that setting a perfectly linear ramp, or gamma 1.0, will produce
- * the default (usually sRGB-like) behavior.
- *
- * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
- * GLFW_SRGB_CAPABLE hint.
- *
- * @param[in] monitor The monitor whose gamma ramp to set.
- * @param[in] gamma The desired exponent.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland Gamma handling is a privileged protocol, this function
- * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
-
-/*! @brief Returns the current gamma ramp for the specified monitor.
- *
- * This function returns the current gamma ramp of the specified monitor.
- *
- * @param[in] monitor The monitor to query.
- * @return The current gamma ramp, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland Gamma handling is a privileged protocol, this function
- * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while
- * returning `NULL`.
- *
- * @pointer_lifetime The returned structure and its arrays are allocated and
- * freed by GLFW. You should not free them yourself. They are valid until the
- * specified monitor is disconnected, this function is called again for that
- * monitor or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
-
-/*! @brief Sets the current gamma ramp for the specified monitor.
- *
- * This function sets the current gamma ramp for the specified monitor. The
- * original gamma ramp for that monitor is saved by GLFW the first time this
- * function is called and is restored by @ref glfwTerminate.
- *
- * The software controlled gamma ramp is applied _in addition_ to the hardware
- * gamma correction, which today is usually an approximation of sRGB gamma.
- * This means that setting a perfectly linear ramp, or gamma 1.0, will produce
- * the default (usually sRGB-like) behavior.
- *
- * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
- * GLFW_SRGB_CAPABLE hint.
- *
- * @param[in] monitor The monitor whose gamma ramp to set.
- * @param[in] ramp The gamma ramp to use.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark The size of the specified gamma ramp should match the size of the
- * current ramp for that monitor.
- *
- * @remark @win32 The gamma ramp size must be 256.
- *
- * @remark @wayland Gamma handling is a privileged protocol, this function
- * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified gamma ramp is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
-
-/*! @brief Resets all window hints to their default values.
- *
- * This function resets all window hints to their
- * [default values](@ref window_hints_values).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hints
- * @sa @ref glfwWindowHint
- * @sa @ref glfwWindowHintString
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwDefaultWindowHints(void);
-
-/*! @brief Sets the specified window hint to the desired value.
- *
- * This function sets hints for the next call to @ref glfwCreateWindow. The
- * hints, once set, retain their values until changed by a call to this
- * function or @ref glfwDefaultWindowHints, or until the library is terminated.
- *
- * Only integer value hints can be set with this function. String value hints
- * are set with @ref glfwWindowHintString.
- *
- * This function does not check whether the specified hint values are valid.
- * If you set hints to invalid values this will instead be reported by the next
- * call to @ref glfwCreateWindow.
- *
- * Some hints are platform specific. These may be set on any platform but they
- * will only affect their specific platform. Other platforms will ignore them.
- * Setting these hints requires no platform specific headers or functions.
- *
- * @param[in] hint The [window hint](@ref window_hints) to set.
- * @param[in] value The new value of the window hint.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hints
- * @sa @ref glfwWindowHintString
- * @sa @ref glfwDefaultWindowHints
- *
- * @since Added in version 3.0. Replaces `glfwOpenWindowHint`.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWindowHint(int hint, int value);
-
-/*! @brief Sets the specified window hint to the desired value.
- *
- * This function sets hints for the next call to @ref glfwCreateWindow. The
- * hints, once set, retain their values until changed by a call to this
- * function or @ref glfwDefaultWindowHints, or until the library is terminated.
- *
- * Only string type hints can be set with this function. Integer value hints
- * are set with @ref glfwWindowHint.
- *
- * This function does not check whether the specified hint values are valid.
- * If you set hints to invalid values this will instead be reported by the next
- * call to @ref glfwCreateWindow.
- *
- * Some hints are platform specific. These may be set on any platform but they
- * will only affect their specific platform. Other platforms will ignore them.
- * Setting these hints requires no platform specific headers or functions.
- *
- * @param[in] hint The [window hint](@ref window_hints) to set.
- * @param[in] value The new value of the window hint.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @pointer_lifetime The specified string is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hints
- * @sa @ref glfwWindowHint
- * @sa @ref glfwDefaultWindowHints
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWindowHintString(int hint, const char* value);
-
-/*! @brief Creates a window and its associated context.
- *
- * This function creates a window and its associated OpenGL or OpenGL ES
- * context. Most of the options controlling how the window and its context
- * should be created are specified with [window hints](@ref window_hints).
- *
- * Successful creation does not change which context is current. Before you
- * can use the newly created context, you need to
- * [make it current](@ref context_current). For information about the `share`
- * parameter, see @ref context_sharing.
- *
- * The created window, framebuffer and context may differ from what you
- * requested, as not all parameters and hints are
- * [hard constraints](@ref window_hints_hard). This includes the size of the
- * window, especially for full screen windows. To query the actual attributes
- * of the created window, framebuffer and context, see @ref
- * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.
- *
- * To create a full screen window, you need to specify the monitor the window
- * will cover. If no monitor is specified, the window will be windowed mode.
- * Unless you have a way for the user to choose a specific monitor, it is
- * recommended that you pick the primary monitor. For more information on how
- * to query connected monitors, see @ref monitor_monitors.
- *
- * For full screen windows, the specified size becomes the resolution of the
- * window's _desired video mode_. As long as a full screen window is not
- * iconified, the supported video mode most closely matching the desired video
- * mode is set for the specified monitor. For more information about full
- * screen windows, including the creation of so called _windowed full screen_
- * or _borderless full screen_ windows, see @ref window_windowed_full_screen.
- *
- * Once you have created the window, you can switch it between windowed and
- * full screen mode with @ref glfwSetWindowMonitor. This will not affect its
- * OpenGL or OpenGL ES context.
- *
- * By default, newly created windows use the placement recommended by the
- * window system. To create the window at a specific position, make it
- * initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window
- * hint, set its [position](@ref window_pos) and then [show](@ref window_hide)
- * it.
- *
- * As long as at least one full screen window is not iconified, the screensaver
- * is prohibited from starting.
- *
- * Window systems put limits on window sizes. Very large or very small window
- * dimensions may be overridden by the window system on creation. Check the
- * actual [size](@ref window_size) after creation.
- *
- * The [swap interval](@ref buffer_swap) is not set during window creation and
- * the initial value may vary depending on driver settings and defaults.
- *
- * @param[in] width The desired width, in screen coordinates, of the window.
- * This must be greater than zero.
- * @param[in] height The desired height, in screen coordinates, of the window.
- * This must be greater than zero.
- * @param[in] title The initial, UTF-8 encoded window title.
- * @param[in] monitor The monitor to use for full screen mode, or `NULL` for
- * windowed mode.
- * @param[in] share The window whose context to share resources with, or `NULL`
- * to not share resources.
- * @return The handle of the created window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref
- * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @win32 Window creation will fail if the Microsoft GDI software
- * OpenGL implementation is the only one available.
- *
- * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it
- * will be set as the initial icon for the window. If no such icon is present,
- * the `IDI_APPLICATION` icon will be used instead. To set a different icon,
- * see @ref glfwSetWindowIcon.
- *
- * @remark @win32 The context to share resources with must not be current on
- * any other thread.
- *
- * @remark @macos The OS only supports forward-compatible core profile contexts
- * for OpenGL versions 3.2 and later. Before creating an OpenGL context of
- * version 3.2 or later you must set the
- * [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and
- * [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly.
- * OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.
- *
- * @remark @macos The GLFW window has no icon, as it is not a document
- * window, but the dock icon will be the same as the application bundle's icon.
- * For more information on bundles, see the
- * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
- * in the Mac Developer Library.
- *
- * @remark @macos The first time a window is created the menu bar is created.
- * If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu
- * bar. Otherwise a minimal menu bar is created manually with common commands
- * like Hide, Quit and About. The About entry opens a minimal about dialog
- * with information from the application's bundle. Menu bar creation can be
- * disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint.
- *
- * @remark @macos On OS X 10.10 and later the window frame will not be rendered
- * at full resolution on Retina displays unless the
- * [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint)
- * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the
- * application bundle's `Info.plist`. For more information, see
- * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html)
- * in the Mac Developer Library. The GLFW test and example programs use
- * a custom `Info.plist` template for this, which can be found as
- * `CMake/MacOSXBundleInfo.plist.in` in the source tree.
- *
- * @remark @macos When activating frame autosaving with
- * [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified
- * window size and position may be overridden by previously saved values.
- *
- * @remark @x11 Some window managers will not respect the placement of
- * initially hidden windows.
- *
- * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for
- * a window to reach its requested state. This means you may not be able to
- * query the final size, position or other attributes directly after window
- * creation.
- *
- * @remark @x11 The class part of the `WM_CLASS` window property will by
- * default be set to the window title passed to this function. The instance
- * part will use the contents of the `RESOURCE_NAME` environment variable, if
- * present and not empty, or fall back to the window title. Set the
- * [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and
- * [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to
- * override this.
- *
- * @remark @wayland Compositors should implement the xdg-decoration protocol
- * for GLFW to decorate the window properly. If this protocol isn't
- * supported, or if the compositor prefers client-side decorations, a very
- * simple fallback frame will be drawn using the wp_viewporter protocol. A
- * compositor can still emit close, maximize or fullscreen events, using for
- * instance a keybind mechanism. If neither of these protocols is supported,
- * the window won't be decorated.
- *
- * @remark @wayland A full screen window will not attempt to change the mode,
- * no matter what the requested size or refresh rate.
- *
- * @remark @wayland Screensaver inhibition requires the idle-inhibit protocol
- * to be implemented in the user's compositor.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_creation
- * @sa @ref glfwDestroyWindow
- *
- * @since Added in version 3.0. Replaces `glfwOpenWindow`.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
-
-/*! @brief Destroys the specified window and its context.
- *
- * This function destroys the specified window and its context. On calling
- * this function, no further callbacks will be called for that window.
- *
- * If the context of the specified window is current on the main thread, it is
- * detached before being destroyed.
- *
- * @param[in] window The window to destroy.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @note The context of the specified window must not be current on any other
- * thread when this function is called.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_creation
- * @sa @ref glfwCreateWindow
- *
- * @since Added in version 3.0. Replaces `glfwCloseWindow`.
- *
- * @ingroup window
- */
-GLFWAPI void glfwDestroyWindow(GLFWwindow* window);
-
-/*! @brief Checks the close flag of the specified window.
- *
- * This function returns the value of the close flag of the specified window.
- *
- * @param[in] window The window to query.
- * @return The value of the close flag.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_close
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
-
-/*! @brief Sets the close flag of the specified window.
- *
- * This function sets the value of the close flag of the specified window.
- * This can be used to override the user's attempt to close the window, or
- * to signal that it should be closed.
- *
- * @param[in] window The window whose flag to change.
- * @param[in] value The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_close
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
-
-/*! @brief Sets the title of the specified window.
- *
- * This function sets the window title, encoded as UTF-8, of the specified
- * window.
- *
- * @param[in] window The window whose title to change.
- * @param[in] title The UTF-8 encoded window title.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @macos The window title will not be updated until the next time you
- * process events.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_title
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
-
-/*! @brief Sets the icon for the specified window.
- *
- * This function sets the icon of the specified window. If passed an array of
- * candidate images, those of or closest to the sizes desired by the system are
- * selected. If no images are specified, the window reverts to its default
- * icon.
- *
- * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
- * bits per channel with the red channel first. They are arranged canonically
- * as packed sequential rows, starting from the top-left corner.
- *
- * The desired image sizes varies depending on platform and system settings.
- * The selected images will be rescaled as needed. Good sizes include 16x16,
- * 32x32 and 48x48.
- *
- * @param[in] window The window whose icon to set.
- * @param[in] count The number of images in the specified array, or zero to
- * revert to the default window icon.
- * @param[in] images The images to create the icon from. This is ignored if
- * count is zero.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified image data is copied before this function
- * returns.
- *
- * @remark @macos The GLFW window has no icon, as it is not a document
- * window, so this function does nothing. The dock icon will be the same as
- * the application bundle's icon. For more information on bundles, see the
- * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
- * in the Mac Developer Library.
- *
- * @remark @wayland There is no existing protocol to change an icon, the
- * window will thus inherit the one defined in the application's desktop file.
- * This function always emits @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_icon
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);
-
-/*! @brief Retrieves the position of the content area of the specified window.
- *
- * This function retrieves the position, in screen coordinates, of the
- * upper-left corner of the content area of the specified window.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] window The window to query.
- * @param[out] xpos Where to store the x-coordinate of the upper-left corner of
- * the content area, or `NULL`.
- * @param[out] ypos Where to store the y-coordinate of the upper-left corner of
- * the content area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland There is no way for an application to retrieve the global
- * position of its windows, this function will always emit @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- * @sa @ref glfwSetWindowPos
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
-
-/*! @brief Sets the position of the content area of the specified window.
- *
- * This function sets the position, in screen coordinates, of the upper-left
- * corner of the content area of the specified windowed mode window. If the
- * window is a full screen window, this function does nothing.
- *
- * __Do not use this function__ to move an already visible window unless you
- * have very good reasons for doing so, as it will confuse and annoy the user.
- *
- * The window manager may put limits on what positions are allowed. GLFW
- * cannot and should not override these limits.
- *
- * @param[in] window The window to query.
- * @param[in] xpos The x-coordinate of the upper-left corner of the content area.
- * @param[in] ypos The y-coordinate of the upper-left corner of the content area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland There is no way for an application to set the global
- * position of its windows, this function will always emit @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- * @sa @ref glfwGetWindowPos
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
-
-/*! @brief Retrieves the size of the content area of the specified window.
- *
- * This function retrieves the size, in screen coordinates, of the content area
- * of the specified window. If you wish to retrieve the size of the
- * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose size to retrieve.
- * @param[out] width Where to store the width, in screen coordinates, of the
- * content area, or `NULL`.
- * @param[out] height Where to store the height, in screen coordinates, of the
- * content area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- * @sa @ref glfwSetWindowSize
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
-
-/*! @brief Sets the size limits of the specified window.
- *
- * This function sets the size limits of the content area of the specified
- * window. If the window is full screen, the size limits only take effect
- * once it is made windowed. If the window is not resizable, this function
- * does nothing.
- *
- * The size limits are applied immediately to a windowed mode window and may
- * cause it to be resized.
- *
- * The maximum dimensions must be greater than or equal to the minimum
- * dimensions and all must be greater than or equal to zero.
- *
- * @param[in] window The window to set limits for.
- * @param[in] minwidth The minimum width, in screen coordinates, of the content
- * area, or `GLFW_DONT_CARE`.
- * @param[in] minheight The minimum height, in screen coordinates, of the
- * content area, or `GLFW_DONT_CARE`.
- * @param[in] maxwidth The maximum width, in screen coordinates, of the content
- * area, or `GLFW_DONT_CARE`.
- * @param[in] maxheight The maximum height, in screen coordinates, of the
- * content area, or `GLFW_DONT_CARE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark If you set size limits and an aspect ratio that conflict, the
- * results are undefined.
- *
- * @remark @wayland The size limits will not be applied until the window is
- * actually resized, either by the user or by the compositor.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_sizelimits
- * @sa @ref glfwSetWindowAspectRatio
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
-
-/*! @brief Sets the aspect ratio of the specified window.
- *
- * This function sets the required aspect ratio of the content area of the
- * specified window. If the window is full screen, the aspect ratio only takes
- * effect once it is made windowed. If the window is not resizable, this
- * function does nothing.
- *
- * The aspect ratio is specified as a numerator and a denominator and both
- * values must be greater than zero. For example, the common 16:9 aspect ratio
- * is specified as 16 and 9, respectively.
- *
- * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect
- * ratio limit is disabled.
- *
- * The aspect ratio is applied immediately to a windowed mode window and may
- * cause it to be resized.
- *
- * @param[in] window The window to set limits for.
- * @param[in] numer The numerator of the desired aspect ratio, or
- * `GLFW_DONT_CARE`.
- * @param[in] denom The denominator of the desired aspect ratio, or
- * `GLFW_DONT_CARE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark If you set size limits and an aspect ratio that conflict, the
- * results are undefined.
- *
- * @remark @wayland The aspect ratio will not be applied until the window is
- * actually resized, either by the user or by the compositor.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_sizelimits
- * @sa @ref glfwSetWindowSizeLimits
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
-
-/*! @brief Sets the size of the content area of the specified window.
- *
- * This function sets the size, in screen coordinates, of the content area of
- * the specified window.
- *
- * For full screen windows, this function updates the resolution of its desired
- * video mode and switches to the video mode closest to it, without affecting
- * the window's context. As the context is unaffected, the bit depths of the
- * framebuffer remain unchanged.
- *
- * If you wish to update the refresh rate of the desired video mode in addition
- * to its resolution, see @ref glfwSetWindowMonitor.
- *
- * The window manager may put limits on what sizes are allowed. GLFW cannot
- * and should not override these limits.
- *
- * @param[in] window The window to resize.
- * @param[in] width The desired width, in screen coordinates, of the window
- * content area.
- * @param[in] height The desired height, in screen coordinates, of the window
- * content area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland A full screen window will not attempt to change the mode,
- * no matter what the requested size.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- * @sa @ref glfwGetWindowSize
- * @sa @ref glfwSetWindowMonitor
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
-
-/*! @brief Retrieves the size of the framebuffer of the specified window.
- *
- * This function retrieves the size, in pixels, of the framebuffer of the
- * specified window. If you wish to retrieve the size of the window in screen
- * coordinates, see @ref glfwGetWindowSize.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose framebuffer to query.
- * @param[out] width Where to store the width, in pixels, of the framebuffer,
- * or `NULL`.
- * @param[out] height Where to store the height, in pixels, of the framebuffer,
- * or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_fbsize
- * @sa @ref glfwSetFramebufferSizeCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
-
-/*! @brief Retrieves the size of the frame of the window.
- *
- * This function retrieves the size, in screen coordinates, of each edge of the
- * frame of the specified window. This size includes the title bar, if the
- * window has one. The size of the frame may vary depending on the
- * [window-related hints](@ref window_hints_wnd) used to create it.
- *
- * Because this function retrieves the size of each window frame edge and not
- * the offset along a particular coordinate axis, the retrieved values will
- * always be zero or positive.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose frame size to query.
- * @param[out] left Where to store the size, in screen coordinates, of the left
- * edge of the window frame, or `NULL`.
- * @param[out] top Where to store the size, in screen coordinates, of the top
- * edge of the window frame, or `NULL`.
- * @param[out] right Where to store the size, in screen coordinates, of the
- * right edge of the window frame, or `NULL`.
- * @param[out] bottom Where to store the size, in screen coordinates, of the
- * bottom edge of the window frame, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- *
- * @since Added in version 3.1.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
-
-/*! @brief Retrieves the content scale for the specified window.
- *
- * This function retrieves the content scale for the specified window. The
- * content scale is the ratio between the current DPI and the platform's
- * default DPI. This is especially important for text and any UI elements. If
- * the pixel dimensions of your UI scaled by this look appropriate on your
- * machine then it should appear at a reasonable size on other machines
- * regardless of their DPI and scaling settings. This relies on the system DPI
- * and scaling settings being somewhat correct.
- *
- * On systems where each monitors can have its own content scale, the window
- * content scale will depend on which monitor the system considers the window
- * to be on.
- *
- * @param[in] window The window to query.
- * @param[out] xscale Where to store the x-axis content scale, or `NULL`.
- * @param[out] yscale Where to store the y-axis content scale, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_scale
- * @sa @ref glfwSetWindowContentScaleCallback
- * @sa @ref glfwGetMonitorContentScale
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale);
-
-/*! @brief Returns the opacity of the whole window.
- *
- * This function returns the opacity of the window, including any decorations.
- *
- * The opacity (or alpha) value is a positive finite number between zero and
- * one, where zero is fully transparent and one is fully opaque. If the system
- * does not support whole window transparency, this function always returns one.
- *
- * The initial opacity value for newly created windows is one.
- *
- * @param[in] window The window to query.
- * @return The opacity value of the specified window.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_transparency
- * @sa @ref glfwSetWindowOpacity
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window);
-
-/*! @brief Sets the opacity of the whole window.
- *
- * This function sets the opacity of the window, including any decorations.
- *
- * The opacity (or alpha) value is a positive finite number between zero and
- * one, where zero is fully transparent and one is fully opaque.
- *
- * The initial opacity value for newly created windows is one.
- *
- * A window created with framebuffer transparency may not use whole window
- * transparency. The results of doing this are undefined.
- *
- * @param[in] window The window to set the opacity for.
- * @param[in] opacity The desired opacity of the specified window.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_transparency
- * @sa @ref glfwGetWindowOpacity
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity);
-
-/*! @brief Iconifies the specified window.
- *
- * This function iconifies (minimizes) the specified window if it was
- * previously restored. If the window is already iconified, this function does
- * nothing.
- *
- * If the specified window is a full screen window, GLFW restores the original
- * video mode of the monitor. The window's desired video mode is set again
- * when the window is restored.
- *
- * @param[in] window The window to iconify.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa @ref glfwRestoreWindow
- * @sa @ref glfwMaximizeWindow
- *
- * @since Added in version 2.1.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwIconifyWindow(GLFWwindow* window);
-
-/*! @brief Restores the specified window.
- *
- * This function restores the specified window if it was previously iconified
- * (minimized) or maximized. If the window is already restored, this function
- * does nothing.
- *
- * If the specified window is an iconified full screen window, its desired
- * video mode is set again for its monitor when the window is restored.
- *
- * @param[in] window The window to restore.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa @ref glfwIconifyWindow
- * @sa @ref glfwMaximizeWindow
- *
- * @since Added in version 2.1.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwRestoreWindow(GLFWwindow* window);
-
-/*! @brief Maximizes the specified window.
- *
- * This function maximizes the specified window if it was previously not
- * maximized. If the window is already maximized, this function does nothing.
- *
- * If the specified window is a full screen window, this function does nothing.
- *
- * @param[in] window The window to maximize.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @par Thread Safety
- * This function may only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa @ref glfwIconifyWindow
- * @sa @ref glfwRestoreWindow
- *
- * @since Added in GLFW 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwMaximizeWindow(GLFWwindow* window);
-
-/*! @brief Makes the specified window visible.
- *
- * This function makes the specified window visible if it was previously
- * hidden. If the window is already visible or is in full screen mode, this
- * function does nothing.
- *
- * By default, windowed mode windows are focused when shown
- * Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint
- * to change this behavior for all newly created windows, or change the
- * behavior for an existing window with @ref glfwSetWindowAttrib.
- *
- * @param[in] window The window to make visible.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland Because Wayland wants every frame of the desktop to be
- * complete, this function does not immediately make the window visible.
- * Instead it will become visible the next time the window framebuffer is
- * updated after this call.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hide
- * @sa @ref glfwHideWindow
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwShowWindow(GLFWwindow* window);
-
-/*! @brief Hides the specified window.
- *
- * This function hides the specified window if it was previously visible. If
- * the window is already hidden or is in full screen mode, this function does
- * nothing.
- *
- * @param[in] window The window to hide.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hide
- * @sa @ref glfwShowWindow
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwHideWindow(GLFWwindow* window);
-
-/*! @brief Brings the specified window to front and sets input focus.
- *
- * This function brings the specified window to front and sets input focus.
- * The window should already be visible and not iconified.
- *
- * By default, both windowed and full screen mode windows are focused when
- * initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to
- * disable this behavior.
- *
- * Also by default, windowed mode windows are focused when shown
- * with @ref glfwShowWindow. Set the
- * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior.
- *
- * __Do not use this function__ to steal focus from other applications unless
- * you are certain that is what the user wants. Focus stealing can be
- * extremely disruptive.
- *
- * For a less disruptive way of getting the user's attention, see
- * [attention requests](@ref window_attention).
- *
- * @param[in] window The window to give input focus.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland It is not possible for an application to bring its windows
- * to front, this function will always emit @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_focus
- * @sa @ref window_attention
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwFocusWindow(GLFWwindow* window);
-
-/*! @brief Requests user attention to the specified window.
- *
- * This function requests user attention to the specified window. On
- * platforms where this is not supported, attention is requested to the
- * application as a whole.
- *
- * Once the user has given attention, usually by focusing the window or
- * application, the system will end the request automatically.
- *
- * @param[in] window The window to request attention to.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @macos Attention is requested to the application as a whole, not the
- * specific window.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_attention
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window);
-
-/*! @brief Returns the monitor that the window uses for full screen mode.
- *
- * This function returns the handle of the monitor that the specified window is
- * in full screen on.
- *
- * @param[in] window The window to query.
- * @return The monitor, or `NULL` if the window is in windowed mode or an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_monitor
- * @sa @ref glfwSetWindowMonitor
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
-
-/*! @brief Sets the mode, monitor, video mode and placement of a window.
- *
- * This function sets the monitor that the window uses for full screen mode or,
- * if the monitor is `NULL`, makes it windowed mode.
- *
- * When setting a monitor, this function updates the width, height and refresh
- * rate of the desired video mode and switches to the video mode closest to it.
- * The window position is ignored when setting a monitor.
- *
- * When the monitor is `NULL`, the position, width and height are used to
- * place the window content area. The refresh rate is ignored when no monitor
- * is specified.
- *
- * If you only wish to update the resolution of a full screen window or the
- * size of a windowed mode window, see @ref glfwSetWindowSize.
- *
- * When a window transitions from full screen to windowed mode, this function
- * restores any previous window settings such as whether it is decorated,
- * floating, resizable, has size or aspect ratio limits, etc.
- *
- * @param[in] window The window whose monitor, size or video mode to set.
- * @param[in] monitor The desired monitor, or `NULL` to set windowed mode.
- * @param[in] xpos The desired x-coordinate of the upper-left corner of the
- * content area.
- * @param[in] ypos The desired y-coordinate of the upper-left corner of the
- * content area.
- * @param[in] width The desired with, in screen coordinates, of the content
- * area or video mode.
- * @param[in] height The desired height, in screen coordinates, of the content
- * area or video mode.
- * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,
- * or `GLFW_DONT_CARE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise
- * affected by any resizing or mode switching, although you may need to update
- * your viewport if the framebuffer size has changed.
- *
- * @remark @wayland The desired window position is ignored, as there is no way
- * for an application to set this property.
- *
- * @remark @wayland Setting the window to full screen will not attempt to
- * change the mode, no matter what the requested size or refresh rate.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_monitor
- * @sa @ref window_full_screen
- * @sa @ref glfwGetWindowMonitor
- * @sa @ref glfwSetWindowSize
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
-
-/*! @brief Returns an attribute of the specified window.
- *
- * This function returns the value of an attribute of the specified window or
- * its OpenGL or OpenGL ES context.
- *
- * @param[in] window The window to query.
- * @param[in] attrib The [window attribute](@ref window_attribs) whose value to
- * return.
- * @return The value of the attribute, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark Framebuffer related hints are not window attributes. See @ref
- * window_attribs_fb for more information.
- *
- * @remark Zero is a valid value for many window and context related
- * attributes so you cannot use a return value of zero as an indication of
- * errors. However, this function should not fail as long as it is passed
- * valid arguments and the library has been [initialized](@ref intro_init).
- *
- * @remark @wayland The Wayland protocol provides no way to check whether a
- * window is iconfied, so @ref GLFW_ICONIFIED always returns `GLFW_FALSE`.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_attribs
- * @sa @ref glfwSetWindowAttrib
- *
- * @since Added in version 3.0. Replaces `glfwGetWindowParam` and
- * `glfwGetGLVersion`.
- *
- * @ingroup window
- */
-GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
-
-/*! @brief Sets an attribute of the specified window.
- *
- * This function sets the value of an attribute of the specified window.
- *
- * The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),
- * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),
- * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib),
- * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and
- * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib).
- *
- * Some of these attributes are ignored for full screen windows. The new
- * value will take effect if the window is later made windowed.
- *
- * Some of these attributes are ignored for windowed mode windows. The new
- * value will take effect if the window is later made full screen.
- *
- * @param[in] window The window to set the attribute for.
- * @param[in] attrib A supported window attribute.
- * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark Calling @ref glfwGetWindowAttrib will always return the latest
- * value, even if that value is ignored by the current mode of the window.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_attribs
- * @sa @ref glfwGetWindowAttrib
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value);
-
-/*! @brief Sets the user pointer of the specified window.
- *
- * This function sets the user-defined pointer of the specified window. The
- * current value is retained until the window is destroyed. The initial value
- * is `NULL`.
- *
- * @param[in] window The window whose pointer to set.
- * @param[in] pointer The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_userptr
- * @sa @ref glfwGetWindowUserPointer
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
-
-/*! @brief Returns the user pointer of the specified window.
- *
- * This function returns the current value of the user-defined pointer of the
- * specified window. The initial value is `NULL`.
- *
- * @param[in] window The window whose pointer to return.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_userptr
- * @sa @ref glfwSetWindowUserPointer
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
-
-/*! @brief Sets the position callback for the specified window.
- *
- * This function sets the position callback of the specified window, which is
- * called when the window is moved. The callback is provided with the
- * position, in screen coordinates, of the upper-left corner of the content
- * area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int xpos, int ypos)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowposfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @wayland This callback will never be called, as there is no way for
- * an application to know its global position.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);
-
-/*! @brief Sets the size callback for the specified window.
- *
- * This function sets the size callback of the specified window, which is
- * called when the window is resized. The callback is provided with the size,
- * in screen coordinates, of the content area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int width, int height)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowsizefun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);
-
-/*! @brief Sets the close callback for the specified window.
- *
- * This function sets the close callback of the specified window, which is
- * called when the user attempts to close the window, for example by clicking
- * the close widget in the title bar.
- *
- * The close flag is set before this callback is called, but you can modify it
- * at any time with @ref glfwSetWindowShouldClose.
- *
- * The close callback is not triggered by @ref glfwDestroyWindow.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowclosefun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @macos Selecting Quit from the application menu will trigger the
- * close callback for all windows.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_close
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);
-
-/*! @brief Sets the refresh callback for the specified window.
- *
- * This function sets the refresh callback of the specified window, which is
- * called when the content area of the window needs to be redrawn, for example
- * if the window has been exposed after having been covered by another window.
- *
- * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where
- * the window contents are saved off-screen, this callback may be called only
- * very infrequently or never at all.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window);
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowrefreshfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_refresh
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);
-
-/*! @brief Sets the focus callback for the specified window.
- *
- * This function sets the focus callback of the specified window, which is
- * called when the window gains or loses input focus.
- *
- * After the focus callback is called for a window that lost input focus,
- * synthetic key and mouse button release events will be generated for all such
- * that had been pressed. For more information, see @ref glfwSetKeyCallback
- * and @ref glfwSetMouseButtonCallback.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int focused)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowfocusfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_focus
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);
-
-/*! @brief Sets the iconify callback for the specified window.
- *
- * This function sets the iconification callback of the specified window, which
- * is called when the window is iconified or restored.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int iconified)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowiconifyfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @wayland The XDG-shell protocol has no event for iconification, so
- * this callback will never be called.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);
-
-/*! @brief Sets the maximize callback for the specified window.
- *
- * This function sets the maximization callback of the specified window, which
- * is called when the window is maximized or restored.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int maximized)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowmaximizefun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_maximize
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);
-
-/*! @brief Sets the framebuffer resize callback for the specified window.
- *
- * This function sets the framebuffer resize callback of the specified window,
- * which is called when the framebuffer of the specified window is resized.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int width, int height)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWframebuffersizefun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_fbsize
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback);
-
-/*! @brief Sets the window content scale callback for the specified window.
- *
- * This function sets the window content scale callback of the specified window,
- * which is called when the content scale of the specified window changes.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, float xscale, float yscale)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWwindowcontentscalefun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_scale
- * @sa @ref glfwGetWindowContentScale
- *
- * @since Added in version 3.3.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);
-
-/*! @brief Processes all pending events.
- *
- * This function processes only those events that are already in the event
- * queue and then returns immediately. Processing events will cause the window
- * and input callbacks associated with those events to be called.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * Do not assume that callbacks you set will _only_ be called in response to
- * event processing functions like this one. While it is necessary to poll for
- * events, window systems that require GLFW to register callbacks of its own
- * can pass events to GLFW in response to many window system function calls.
- * GLFW will pass those events on to the application callbacks before
- * returning.
- *
- * Event processing is not required for joystick input to work.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa @ref glfwWaitEvents
- * @sa @ref glfwWaitEventsTimeout
- *
- * @since Added in version 1.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwPollEvents(void);
-
-/*! @brief Waits until events are queued and processes them.
- *
- * This function puts the calling thread to sleep until at least one event is
- * available in the event queue. Once one or more events are available,
- * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue
- * are processed and the function then returns immediately. Processing events
- * will cause the window and input callbacks associated with those events to be
- * called.
- *
- * Since not all events are associated with callbacks, this function may return
- * without a callback having been called even if you are monitoring all
- * callbacks.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * Do not assume that callbacks you set will _only_ be called in response to
- * event processing functions like this one. While it is necessary to poll for
- * events, window systems that require GLFW to register callbacks of its own
- * can pass events to GLFW in response to many window system function calls.
- * GLFW will pass those events on to the application callbacks before
- * returning.
- *
- * Event processing is not required for joystick input to work.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa @ref glfwPollEvents
- * @sa @ref glfwWaitEventsTimeout
- *
- * @since Added in version 2.5.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWaitEvents(void);
-
-/*! @brief Waits with timeout until events are queued and processes them.
- *
- * This function puts the calling thread to sleep until at least one event is
- * available in the event queue, or until the specified timeout is reached. If
- * one or more events are available, it behaves exactly like @ref
- * glfwPollEvents, i.e. the events in the queue are processed and the function
- * then returns immediately. Processing events will cause the window and input
- * callbacks associated with those events to be called.
- *
- * The timeout value must be a positive finite number.
- *
- * Since not all events are associated with callbacks, this function may return
- * without a callback having been called even if you are monitoring all
- * callbacks.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * Do not assume that callbacks you set will _only_ be called in response to
- * event processing functions like this one. While it is necessary to poll for
- * events, window systems that require GLFW to register callbacks of its own
- * can pass events to GLFW in response to many window system function calls.
- * GLFW will pass those events on to the application callbacks before
- * returning.
- *
- * Event processing is not required for joystick input to work.
- *
- * @param[in] timeout The maximum amount of time, in seconds, to wait.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa @ref glfwPollEvents
- * @sa @ref glfwWaitEvents
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWaitEventsTimeout(double timeout);
-
-/*! @brief Posts an empty event to the event queue.
- *
- * This function posts an empty event from the current thread to the event
- * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref events
- * @sa @ref glfwWaitEvents
- * @sa @ref glfwWaitEventsTimeout
- *
- * @since Added in version 3.1.
- *
- * @ingroup window
- */
-GLFWAPI void glfwPostEmptyEvent(void);
-
-/*! @brief Returns the value of an input option for the specified window.
- *
- * This function returns the value of an input option for the specified window.
- * The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
- * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
- * @ref GLFW_RAW_MOUSE_MOTION.
- *
- * @param[in] window The window to query.
- * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
- * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
- * `GLFW_RAW_MOUSE_MOTION`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref glfwSetInputMode
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
-
-/*! @brief Sets an input option for the specified window.
- *
- * This function sets an input mode option for the specified window. The mode
- * must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
- * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
- * @ref GLFW_RAW_MOUSE_MOTION.
- *
- * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
- * modes:
- * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.
- * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the
- * content area of the window but does not restrict the cursor from leaving.
- * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual
- * and unlimited cursor movement. This is useful for implementing for
- * example 3D camera controls.
- *
- * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to
- * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are
- * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`
- * the next time it is called even if the key had been released before the
- * call. This is useful when you are only interested in whether keys have been
- * pressed but not when or in which order.
- *
- * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either
- * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.
- * If sticky mouse buttons are enabled, a mouse button press will ensure that
- * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even
- * if the mouse button had been released before the call. This is useful when
- * you are only interested in whether mouse buttons have been pressed but not
- * when or in which order.
- *
- * If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to
- * enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled,
- * callbacks that receive modifier bits will also have the @ref
- * GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on,
- * and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on.
- *
- * If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE`
- * to enable raw (unscaled and unaccelerated) mouse motion when the cursor is
- * disabled, or `GLFW_FALSE` to disable it. If raw motion is not supported,
- * attempting to set this will emit @ref GLFW_PLATFORM_ERROR. Call @ref
- * glfwRawMouseMotionSupported to check for support.
- *
- * @param[in] window The window whose input mode to set.
- * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
- * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
- * `GLFW_RAW_MOUSE_MOTION`.
- * @param[in] value The new value of the specified input mode.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref glfwGetInputMode
- *
- * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
-
-/*! @brief Returns whether raw mouse motion is supported.
- *
- * This function returns whether raw mouse motion is supported on the current
- * system. This status does not change after GLFW has been initialized so you
- * only need to check this once. If you attempt to enable raw motion on
- * a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted.
- *
- * Raw mouse motion is closer to the actual motion of the mouse across
- * a surface. It is not affected by the scaling and acceleration applied to
- * the motion of the desktop cursor. That processing is suitable for a cursor
- * while raw motion is better for controlling for example a 3D camera. Because
- * of this, raw mouse motion is only provided when the cursor is disabled.
- *
- * @return `GLFW_TRUE` if raw mouse motion is supported on the current machine,
- * or `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref raw_mouse_motion
- * @sa @ref glfwSetInputMode
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI int glfwRawMouseMotionSupported(void);
-
-/*! @brief Returns the layout-specific name of the specified printable key.
- *
- * This function returns the name of the specified printable key, encoded as
- * UTF-8. This is typically the character that key would produce without any
- * modifier keys, intended for displaying key bindings to the user. For dead
- * keys, it is typically the diacritic it would add to a character.
- *
- * __Do not use this function__ for [text input](@ref input_char). You will
- * break text input for many languages even if it happens to work for yours.
- *
- * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key,
- * otherwise the scancode is ignored. If you specify a non-printable key, or
- * `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this
- * function returns `NULL` but does not emit an error.
- *
- * This behavior allows you to always pass in the arguments in the
- * [key callback](@ref input_key) without modification.
- *
- * The printable keys are:
- * - `GLFW_KEY_APOSTROPHE`
- * - `GLFW_KEY_COMMA`
- * - `GLFW_KEY_MINUS`
- * - `GLFW_KEY_PERIOD`
- * - `GLFW_KEY_SLASH`
- * - `GLFW_KEY_SEMICOLON`
- * - `GLFW_KEY_EQUAL`
- * - `GLFW_KEY_LEFT_BRACKET`
- * - `GLFW_KEY_RIGHT_BRACKET`
- * - `GLFW_KEY_BACKSLASH`
- * - `GLFW_KEY_WORLD_1`
- * - `GLFW_KEY_WORLD_2`
- * - `GLFW_KEY_0` to `GLFW_KEY_9`
- * - `GLFW_KEY_A` to `GLFW_KEY_Z`
- * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`
- * - `GLFW_KEY_KP_DECIMAL`
- * - `GLFW_KEY_KP_DIVIDE`
- * - `GLFW_KEY_KP_MULTIPLY`
- * - `GLFW_KEY_KP_SUBTRACT`
- * - `GLFW_KEY_KP_ADD`
- * - `GLFW_KEY_KP_EQUAL`
- *
- * Names for printable keys depend on keyboard layout, while names for
- * non-printable keys are the same across layouts but depend on the application
- * language and should be localized along with other user interface text.
- *
- * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.
- * @param[in] scancode The scancode of the key to query.
- * @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark The contents of the returned string may change when a keyboard
- * layout change event is received.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key_name
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetKeyName(int key, int scancode);
-
-/*! @brief Returns the platform-specific scancode of the specified key.
- *
- * This function returns the platform-specific scancode of the specified key.
- *
- * If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this
- * method will return `-1`.
- *
- * @param[in] key Any [named key](@ref keys).
- * @return The platform-specific scancode for the key, or `-1` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref input_key
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetKeyScancode(int key);
-
-/*! @brief Returns the last reported state of a keyboard key for the specified
- * window.
- *
- * This function returns the last state reported for the specified key to the
- * specified window. The returned state is one of `GLFW_PRESS` or
- * `GLFW_RELEASE`. The action `GLFW_REPEAT` is only reported to the key callback.
- *
- * If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns
- * `GLFW_PRESS` the first time you call it for a key that was pressed, even if
- * that key has already been released.
- *
- * The key functions deal with physical keys, with [key tokens](@ref keys)
- * named after their use on the standard US keyboard layout. If you want to
- * input text, use the Unicode character callback instead.
- *
- * The [modifier key bit masks](@ref mods) are not key tokens and cannot be
- * used with this function.
- *
- * __Do not use this function__ to implement [text input](@ref input_char).
- *
- * @param[in] window The desired window.
- * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is
- * not a valid key for this function.
- * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
-
-/*! @brief Returns the last reported state of a mouse button for the specified
- * window.
- *
- * This function returns the last state reported for the specified mouse button
- * to the specified window. The returned state is one of `GLFW_PRESS` or
- * `GLFW_RELEASE`.
- *
- * If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
- * returns `GLFW_PRESS` the first time you call it for a mouse button that was
- * pressed, even if that mouse button has already been released.
- *
- * @param[in] window The desired window.
- * @param[in] button The desired [mouse button](@ref buttons).
- * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_mouse_button
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
-
-/*! @brief Retrieves the position of the cursor relative to the content area of
- * the window.
- *
- * This function returns the position of the cursor, in screen coordinates,
- * relative to the upper-left corner of the content area of the specified
- * window.
- *
- * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor
- * position is unbounded and limited only by the minimum and maximum values of
- * a `double`.
- *
- * The coordinate can be converted to their integer equivalents with the
- * `floor` function. Casting directly to an integer type works for positive
- * coordinates, but fails for negative ones.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] window The desired window.
- * @param[out] xpos Where to store the cursor x-coordinate, relative to the
- * left edge of the content area, or `NULL`.
- * @param[out] ypos Where to store the cursor y-coordinate, relative to the to
- * top edge of the content area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- * @sa @ref glfwSetCursorPos
- *
- * @since Added in version 3.0. Replaces `glfwGetMousePos`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
-
-/*! @brief Sets the position of the cursor, relative to the content area of the
- * window.
- *
- * This function sets the position, in screen coordinates, of the cursor
- * relative to the upper-left corner of the content area of the specified
- * window. The window must have input focus. If the window does not have
- * input focus when this function is called, it fails silently.
- *
- * __Do not use this function__ to implement things like camera controls. GLFW
- * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the
- * cursor, transparently re-centers it and provides unconstrained cursor
- * motion. See @ref glfwSetInputMode for more information.
- *
- * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is
- * unconstrained and limited only by the minimum and maximum values of
- * a `double`.
- *
- * @param[in] window The desired window.
- * @param[in] xpos The desired x-coordinate, relative to the left edge of the
- * content area.
- * @param[in] ypos The desired y-coordinate, relative to the top edge of the
- * content area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @wayland This function will only work when the cursor mode is
- * `GLFW_CURSOR_DISABLED`, otherwise it will do nothing.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- * @sa @ref glfwGetCursorPos
- *
- * @since Added in version 3.0. Replaces `glfwSetMousePos`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
-
-/*! @brief Creates a custom cursor.
- *
- * Creates a new custom cursor image that can be set for a window with @ref
- * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor.
- * Any remaining cursors are destroyed by @ref glfwTerminate.
- *
- * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
- * bits per channel with the red channel first. They are arranged canonically
- * as packed sequential rows, starting from the top-left corner.
- *
- * The cursor hotspot is specified in pixels, relative to the upper-left corner
- * of the cursor image. Like all other coordinate systems in GLFW, the X-axis
- * points to the right and the Y-axis points down.
- *
- * @param[in] image The desired cursor image.
- * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.
- * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.
- * @return The handle of the created cursor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified image data is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa @ref glfwDestroyCursor
- * @sa @ref glfwCreateStandardCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot);
-
-/*! @brief Creates a cursor with a standard shape.
- *
- * Returns a cursor with a [standard shape](@ref shapes), that can be set for
- * a window with @ref glfwSetCursor.
- *
- * @param[in] shape One of the [standard shapes](@ref shapes).
- * @return A new cursor ready to use or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa @ref glfwCreateCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);
-
-/*! @brief Destroys a cursor.
- *
- * This function destroys a cursor previously created with @ref
- * glfwCreateCursor. Any remaining cursors will be destroyed by @ref
- * glfwTerminate.
- *
- * If the specified cursor is current for any window, that window will be
- * reverted to the default cursor. This does not affect the cursor mode.
- *
- * @param[in] cursor The cursor object to destroy.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa @ref glfwCreateCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);
-
-/*! @brief Sets the cursor for the window.
- *
- * This function sets the cursor image to be used when the cursor is over the
- * content area of the specified window. The set cursor will only be visible
- * when the [cursor mode](@ref cursor_mode) of the window is
- * `GLFW_CURSOR_NORMAL`.
- *
- * On some platforms, the set cursor may not be visible unless the window also
- * has input focus.
- *
- * @param[in] window The window to set the cursor for.
- * @param[in] cursor The cursor to set, or `NULL` to switch back to the default
- * arrow cursor.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
-
-/*! @brief Sets the key callback.
- *
- * This function sets the key callback of the specified window, which is called
- * when a key is pressed, repeated or released.
- *
- * The key functions deal with physical keys, with layout independent
- * [key tokens](@ref keys) named after their values in the standard US keyboard
- * layout. If you want to input text, use the
- * [character callback](@ref glfwSetCharCallback) instead.
- *
- * When a window loses input focus, it will generate synthetic key release
- * events for all pressed keys. You can tell these events from user-generated
- * events by the fact that the synthetic ones are generated after the focus
- * loss event has been processed, i.e. after the
- * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
- *
- * The scancode of a key is specific to that platform or sometimes even to that
- * machine. Scancodes are intended to allow users to bind keys that don't have
- * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their
- * state is not saved and so it cannot be queried with @ref glfwGetKey.
- *
- * Sometimes GLFW needs to generate synthetic key events, in which case the
- * scancode may be zero.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new key callback, or `NULL` to remove the currently
- * set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWkeyfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);
-
-/*! @brief Sets the Unicode character callback.
- *
- * This function sets the character callback of the specified window, which is
- * called when a Unicode character is input.
- *
- * The character callback is intended for Unicode text input. As it deals with
- * characters, it is keyboard layout dependent, whereas the
- * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1
- * to physical keys, as a key may produce zero, one or more characters. If you
- * want to know whether a specific physical key was pressed or released, see
- * the key callback instead.
- *
- * The character callback behaves as system text input normally does and will
- * not be called if modifier keys are held down that would prevent normal text
- * input on that platform, for example a Super (Command) key on macOS or Alt key
- * on Windows.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, unsigned int codepoint)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWcharfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_char
- *
- * @since Added in version 2.4.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);
-
-/*! @brief Sets the Unicode character with modifiers callback.
- *
- * This function sets the character with modifiers callback of the specified
- * window, which is called when a Unicode character is input regardless of what
- * modifier keys are used.
- *
- * The character with modifiers callback is intended for implementing custom
- * Unicode character input. For regular Unicode text input, see the
- * [character callback](@ref glfwSetCharCallback). Like the character
- * callback, the character with modifiers callback deals with characters and is
- * keyboard layout dependent. Characters do not map 1:1 to physical keys, as
- * a key may produce zero, one or more characters. If you want to know whether
- * a specific physical key was pressed or released, see the
- * [key callback](@ref glfwSetKeyCallback) instead.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or an
- * [error](@ref error_handling) occurred.
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWcharmodsfun).
- *
- * @deprecated Scheduled for removal in version 4.0.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_char
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);
-
-/*! @brief Sets the mouse button callback.
- *
- * This function sets the mouse button callback of the specified window, which
- * is called when a mouse button is pressed or released.
- *
- * When a window loses input focus, it will generate synthetic mouse button
- * release events for all pressed mouse buttons. You can tell these events
- * from user-generated events by the fact that the synthetic ones are generated
- * after the focus loss event has been processed, i.e. after the
- * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int button, int action, int mods)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWmousebuttonfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_mouse_button
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
-
-/*! @brief Sets the cursor position callback.
- *
- * This function sets the cursor position callback of the specified window,
- * which is called when the cursor is moved. The callback is provided with the
- * position, in screen coordinates, relative to the upper-left corner of the
- * content area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, double xpos, double ypos);
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWcursorposfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- *
- * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
-
-/*! @brief Sets the cursor enter/leave callback.
- *
- * This function sets the cursor boundary crossing callback of the specified
- * window, which is called when the cursor enters or leaves the content area of
- * the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int entered)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWcursorenterfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_enter
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);
-
-/*! @brief Sets the scroll callback.
- *
- * This function sets the scroll callback of the specified window, which is
- * called when a scrolling device is used, such as a mouse wheel or scrolling
- * area of a touchpad.
- *
- * The scroll callback receives all scrolling input, like that from a mouse
- * wheel or a touchpad scrolling area.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new scroll callback, or `NULL` to remove the
- * currently set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, double xoffset, double yoffset)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWscrollfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref scrolling
- *
- * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`.
- *
- * @ingroup input
- */
-GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
-
-/*! @brief Sets the path drop callback.
- *
- * This function sets the path drop callback of the specified window, which is
- * called when one or more dragged paths are dropped on the window.
- *
- * Because the path array and its strings may have been generated specifically
- * for that event, they are not guaranteed to be valid after the callback has
- * returned. If you wish to use them after the callback returns, you need to
- * make a deep copy.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] callback The new file drop callback, or `NULL` to remove the
- * currently set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(GLFWwindow* window, int path_count, const char* paths[])
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWdropfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @wayland File drop is currently unimplemented.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref path_drop
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);
-
-/*! @brief Returns whether the specified joystick is present.
- *
- * This function returns whether the specified joystick is present.
- *
- * There is no need to call this function before other functions that accept
- * a joystick ID, as they all check for presence before performing any other
- * work.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick
- *
- * @since Added in version 3.0. Replaces `glfwGetJoystickParam`.
- *
- * @ingroup input
- */
-GLFWAPI int glfwJoystickPresent(int jid);
-
-/*! @brief Returns the values of all axes of the specified joystick.
- *
- * This function returns the values of all axes of the specified joystick.
- * Each element in the array is a value between -1.0 and 1.0.
- *
- * If the specified joystick is not present this function will return `NULL`
- * but will not generate an error. This can be used instead of first calling
- * @ref glfwJoystickPresent.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @param[out] count Where to store the number of axis values in the returned
- * array. This is set to zero if the joystick is not present or an error
- * occurred.
- * @return An array of axis values, or `NULL` if the joystick is not present or
- * an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_axis
- *
- * @since Added in version 3.0. Replaces `glfwGetJoystickPos`.
- *
- * @ingroup input
- */
-GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count);
-
-/*! @brief Returns the state of all buttons of the specified joystick.
- *
- * This function returns the state of all buttons of the specified joystick.
- * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * For backward compatibility with earlier versions that did not have @ref
- * glfwGetJoystickHats, the button array also includes all hats, each
- * represented as four buttons. The hats are in the same order as returned by
- * __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and
- * _left_. To disable these extra buttons, set the @ref
- * GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.
- *
- * If the specified joystick is not present this function will return `NULL`
- * but will not generate an error. This can be used instead of first calling
- * @ref glfwJoystickPresent.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @param[out] count Where to store the number of button states in the returned
- * array. This is set to zero if the joystick is not present or an error
- * occurred.
- * @return An array of button states, or `NULL` if the joystick is not present
- * or an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_button
- *
- * @since Added in version 2.2.
- * @glfw3 Changed to return a dynamic array.
- *
- * @ingroup input
- */
-GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count);
-
-/*! @brief Returns the state of all hats of the specified joystick.
- *
- * This function returns the state of all hats of the specified joystick.
- * Each element in the array is one of the following values:
- *
- * Name | Value
- * ---- | -----
- * `GLFW_HAT_CENTERED` | 0
- * `GLFW_HAT_UP` | 1
- * `GLFW_HAT_RIGHT` | 2
- * `GLFW_HAT_DOWN` | 4
- * `GLFW_HAT_LEFT` | 8
- * `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP`
- * `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN`
- * `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP`
- * `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN`
- *
- * The diagonal directions are bitwise combinations of the primary (up, right,
- * down and left) directions and you can test for these individually by ANDing
- * it with the corresponding direction.
- *
- * @code
- * if (hats[2] & GLFW_HAT_RIGHT)
- * {
- * // State of hat 2 could be right-up, right or right-down
- * }
- * @endcode
- *
- * If the specified joystick is not present this function will return `NULL`
- * but will not generate an error. This can be used instead of first calling
- * @ref glfwJoystickPresent.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @param[out] count Where to store the number of hat states in the returned
- * array. This is set to zero if the joystick is not present or an error
- * occurred.
- * @return An array of hat states, or `NULL` if the joystick is not present
- * or an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected, this function is called again for that joystick or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_hat
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count);
-
-/*! @brief Returns the name of the specified joystick.
- *
- * This function returns the name, encoded as UTF-8, of the specified joystick.
- * The returned string is allocated and freed by GLFW. You should not free it
- * yourself.
- *
- * If the specified joystick is not present this function will return `NULL`
- * but will not generate an error. This can be used instead of first calling
- * @ref glfwJoystickPresent.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
- * is not present or an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_name
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetJoystickName(int jid);
-
-/*! @brief Returns the SDL compatible GUID of the specified joystick.
- *
- * This function returns the SDL compatible GUID, as a UTF-8 encoded
- * hexadecimal string, of the specified joystick. The returned string is
- * allocated and freed by GLFW. You should not free it yourself.
- *
- * The GUID is what connects a joystick to a gamepad mapping. A connected
- * joystick will always have a GUID even if there is no gamepad mapping
- * assigned to it.
- *
- * If the specified joystick is not present this function will return `NULL`
- * but will not generate an error. This can be used instead of first calling
- * @ref glfwJoystickPresent.
- *
- * The GUID uses the format introduced in SDL 2.0.5. This GUID tries to
- * uniquely identify the make and model of a joystick but does not identify
- * a specific unit, e.g. all wired Xbox 360 controllers will have the same
- * GUID on that platform. The GUID for a unit may vary between platforms
- * depending on what hardware information the platform specific APIs provide.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick
- * is not present or an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref gamepad
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetJoystickGUID(int jid);
-
-/*! @brief Sets the user pointer of the specified joystick.
- *
- * This function sets the user-defined pointer of the specified joystick. The
- * current value is retained until the joystick is disconnected. The initial
- * value is `NULL`.
- *
- * This function may be called from the joystick callback, even for a joystick
- * that is being disconnected.
- *
- * @param[in] jid The joystick whose pointer to set.
- * @param[in] pointer The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref joystick_userptr
- * @sa @ref glfwGetJoystickUserPointer
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer);
-
-/*! @brief Returns the user pointer of the specified joystick.
- *
- * This function returns the current value of the user-defined pointer of the
- * specified joystick. The initial value is `NULL`.
- *
- * This function may be called from the joystick callback, even for a joystick
- * that is being disconnected.
- *
- * @param[in] jid The joystick whose pointer to return.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref joystick_userptr
- * @sa @ref glfwSetJoystickUserPointer
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI void* glfwGetJoystickUserPointer(int jid);
-
-/*! @brief Returns whether the specified joystick has a gamepad mapping.
- *
- * This function returns whether the specified joystick is both present and has
- * a gamepad mapping.
- *
- * If the specified joystick is present but does not have a gamepad mapping
- * this function will return `GLFW_FALSE` but will not generate an error. Call
- * @ref glfwJoystickPresent to check if a joystick is present regardless of
- * whether it has a mapping.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping,
- * or `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref gamepad
- * @sa @ref glfwGetGamepadState
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI int glfwJoystickIsGamepad(int jid);
-
-/*! @brief Sets the joystick configuration callback.
- *
- * This function sets the joystick configuration callback, or removes the
- * currently set callback. This is called when a joystick is connected to or
- * disconnected from the system.
- *
- * For joystick connection and disconnection events to be delivered on all
- * platforms, you need to call one of the [event processing](@ref events)
- * functions. Joystick disconnection may also be detected and the callback
- * called by joystick functions. The function will then return whatever it
- * returns if the joystick is not present.
- *
- * @param[in] callback The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @callback_signature
- * @code
- * void function_name(int jid, int event)
- * @endcode
- * For more information about the callback parameters, see the
- * [function pointer type](@ref GLFWjoystickfun).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_event
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
-
-/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings.
- *
- * This function parses the specified ASCII encoded string and updates the
- * internal list with any gamepad mappings it finds. This string may
- * contain either a single gamepad mapping or many mappings separated by
- * newlines. The parser supports the full format of the `gamecontrollerdb.txt`
- * source file including empty lines and comments.
- *
- * See @ref gamepad_mapping for a description of the format.
- *
- * If there is already a gamepad mapping for a given GUID in the internal list,
- * it will be replaced by the one passed to this function. If the library is
- * terminated and re-initialized the internal list will revert to the built-in
- * default.
- *
- * @param[in] string The string containing the gamepad mappings.
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_VALUE.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref gamepad
- * @sa @ref glfwJoystickIsGamepad
- * @sa @ref glfwGetGamepadName
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI int glfwUpdateGamepadMappings(const char* string);
-
-/*! @brief Returns the human-readable gamepad name for the specified joystick.
- *
- * This function returns the human-readable name of the gamepad from the
- * gamepad mapping assigned to the specified joystick.
- *
- * If the specified joystick is not present or does not have a gamepad mapping
- * this function will return `NULL` but will not generate an error. Call
- * @ref glfwJoystickPresent to check whether it is present regardless of
- * whether it has a mapping.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @return The UTF-8 encoded name of the gamepad, or `NULL` if the
- * joystick is not present, does not have a mapping or an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected, the gamepad mappings are updated or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref gamepad
- * @sa @ref glfwJoystickIsGamepad
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetGamepadName(int jid);
-
-/*! @brief Retrieves the state of the specified joystick remapped as a gamepad.
- *
- * This function retrieves the state of the specified joystick remapped to
- * an Xbox-like gamepad.
- *
- * If the specified joystick is not present or does not have a gamepad mapping
- * this function will return `GLFW_FALSE` but will not generate an error. Call
- * @ref glfwJoystickPresent to check whether it is present regardless of
- * whether it has a mapping.
- *
- * The Guide button may not be available for input as it is often hooked by the
- * system or the Steam client.
- *
- * Not all devices have all the buttons or axes provided by @ref
- * GLFWgamepadstate. Unavailable buttons and axes will always report
- * `GLFW_RELEASE` and 0.0 respectively.
- *
- * @param[in] jid The [joystick](@ref joysticks) to query.
- * @param[out] state The gamepad input state of the joystick.
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is
- * connected, it has no gamepad mapping or an [error](@ref error_handling)
- * occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref gamepad
- * @sa @ref glfwUpdateGamepadMappings
- * @sa @ref glfwJoystickIsGamepad
- *
- * @since Added in version 3.3.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
-
-/*! @brief Sets the clipboard to the specified string.
- *
- * This function sets the system clipboard to the specified, UTF-8 encoded
- * string.
- *
- * @param[in] window Deprecated. Any valid window or `NULL`.
- * @param[in] string A UTF-8 encoded string.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified string is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa @ref glfwGetClipboardString
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
-
-/*! @brief Returns the contents of the clipboard as a string.
- *
- * This function returns the contents of the system clipboard, if it contains
- * or is convertible to a UTF-8 encoded string. If the clipboard is empty or
- * if its contents cannot be converted, `NULL` is returned and a @ref
- * GLFW_FORMAT_UNAVAILABLE error is generated.
- *
- * @param[in] window Deprecated. Any valid window or `NULL`.
- * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`
- * if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_FORMAT_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the next call to @ref
- * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa @ref glfwSetClipboardString
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
-
-/*! @brief Returns the GLFW time.
- *
- * This function returns the current GLFW time, in seconds. Unless the time
- * has been set using @ref glfwSetTime it measures time elapsed since GLFW was
- * initialized.
- *
- * This function and @ref glfwSetTime are helper functions on top of @ref
- * glfwGetTimerFrequency and @ref glfwGetTimerValue.
- *
- * The resolution of the timer is system dependent, but is usually on the order
- * of a few micro- or nanoseconds. It uses the highest-resolution monotonic
- * time source on each supported platform.
- *
- * @return The current time, in seconds, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Reading and
- * writing of the internal base time is not atomic, so it needs to be
- * externally synchronized with calls to @ref glfwSetTime.
- *
- * @sa @ref time
- *
- * @since Added in version 1.0.
- *
- * @ingroup input
- */
-GLFWAPI double glfwGetTime(void);
-
-/*! @brief Sets the GLFW time.
- *
- * This function sets the current GLFW time, in seconds. The value must be
- * a positive finite number less than or equal to 18446744073.0, which is
- * approximately 584.5 years.
- *
- * This function and @ref glfwGetTime are helper functions on top of @ref
- * glfwGetTimerFrequency and @ref glfwGetTimerValue.
- *
- * @param[in] time The new value, in seconds.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_VALUE.
- *
- * @remark The upper limit of GLFW time is calculated as
- * floor((264 - 1) / 109) and is due to implementations
- * storing nanoseconds in 64 bits. The limit may be increased in the future.
- *
- * @thread_safety This function may be called from any thread. Reading and
- * writing of the internal base time is not atomic, so it needs to be
- * externally synchronized with calls to @ref glfwGetTime.
- *
- * @sa @ref time
- *
- * @since Added in version 2.2.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetTime(double time);
-
-/*! @brief Returns the current value of the raw timer.
- *
- * This function returns the current value of the raw timer, measured in
- * 1 / frequency seconds. To get the frequency, call @ref
- * glfwGetTimerFrequency.
- *
- * @return The value of the timer, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref time
- * @sa @ref glfwGetTimerFrequency
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI uint64_t glfwGetTimerValue(void);
-
-/*! @brief Returns the frequency, in Hz, of the raw timer.
- *
- * This function returns the frequency, in Hz, of the raw timer.
- *
- * @return The frequency of the timer, in Hz, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref time
- * @sa @ref glfwGetTimerValue
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI uint64_t glfwGetTimerFrequency(void);
-
-/*! @brief Makes the context of the specified window current for the calling
- * thread.
- *
- * This function makes the OpenGL or OpenGL ES context of the specified window
- * current on the calling thread. A context must only be made current on
- * a single thread at a time and each thread can have only a single current
- * context at a time.
- *
- * When moving a context between threads, you must make it non-current on the
- * old thread before making it current on the new one.
- *
- * By default, making a context non-current implicitly forces a pipeline flush.
- * On machines that support `GL_KHR_context_flush_control`, you can control
- * whether a context performs this flush by setting the
- * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint)
- * hint.
- *
- * The specified window must have an OpenGL or OpenGL ES context. Specifying
- * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
- * error.
- *
- * @param[in] window The window whose context to make current, or `NULL` to
- * detach the current context.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_current
- * @sa @ref glfwGetCurrentContext
- *
- * @since Added in version 3.0.
- *
- * @ingroup context
- */
-GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
-
-/*! @brief Returns the window whose context is current on the calling thread.
- *
- * This function returns the window whose OpenGL or OpenGL ES context is
- * current on the calling thread.
- *
- * @return The window whose context is current, or `NULL` if no window's
- * context is current.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_current
- * @sa @ref glfwMakeContextCurrent
- *
- * @since Added in version 3.0.
- *
- * @ingroup context
- */
-GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
-
-/*! @brief Swaps the front and back buffers of the specified window.
- *
- * This function swaps the front and back buffers of the specified window when
- * rendering with OpenGL or OpenGL ES. If the swap interval is greater than
- * zero, the GPU driver waits the specified number of screen updates before
- * swapping the buffers.
- *
- * The specified window must have an OpenGL or OpenGL ES context. Specifying
- * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
- * error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see `vkQueuePresentKHR` instead.
- *
- * @param[in] window The window whose buffers to swap.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark __EGL:__ The context of the specified window must be current on the
- * calling thread.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref buffer_swap
- * @sa @ref glfwSwapInterval
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
-
-/*! @brief Sets the swap interval for the current context.
- *
- * This function sets the swap interval for the current OpenGL or OpenGL ES
- * context, i.e. the number of screen updates to wait from the time @ref
- * glfwSwapBuffers was called before swapping the buffers and returning. This
- * is sometimes called _vertical synchronization_, _vertical retrace
- * synchronization_ or just _vsync_.
- *
- * A context that supports either of the `WGL_EXT_swap_control_tear` and
- * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap
- * intervals, which allows the driver to swap immediately even if a frame
- * arrives a little bit late. You can check for these extensions with @ref
- * glfwExtensionSupported.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see the present mode of your swapchain instead.
- *
- * @param[in] interval The minimum number of screen updates to wait for
- * until the buffers are swapped by @ref glfwSwapBuffers.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark This function is not called during context creation, leaving the
- * swap interval set to whatever is the default on that platform. This is done
- * because some swap interval extensions used by GLFW do not allow the swap
- * interval to be reset to zero once it has been set to a non-zero value.
- *
- * @remark Some GPU drivers do not honor the requested swap interval, either
- * because of a user setting that overrides the application's request or due to
- * bugs in the driver.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref buffer_swap
- * @sa @ref glfwSwapBuffers
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI void glfwSwapInterval(int interval);
-
-/*! @brief Returns whether the specified extension is available.
- *
- * This function returns whether the specified
- * [API extension](@ref context_glext) is supported by the current OpenGL or
- * OpenGL ES context. It searches both for client API extension and context
- * creation API extensions.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * As this functions retrieves and searches one or more extension strings each
- * call, it is recommended that you cache its results if it is going to be used
- * frequently. The extension strings will not change during the lifetime of
- * a context, so there is no danger in doing this.
- *
- * This function does not apply to Vulkan. If you are using Vulkan, see @ref
- * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`
- * and `vkEnumerateDeviceExtensionProperties` instead.
- *
- * @param[in] extension The ASCII encoded name of the extension.
- * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`
- * otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_glext
- * @sa @ref glfwGetProcAddress
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI int glfwExtensionSupported(const char* extension);
-
-/*! @brief Returns the address of the specified function for the current
- * context.
- *
- * This function returns the address of the specified OpenGL or OpenGL ES
- * [core or extension function](@ref context_glext), if it is supported
- * by the current context.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and
- * `vkGetDeviceProcAddr` instead.
- *
- * @param[in] procname The ASCII encoded name of the function.
- * @return The address of the function, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark The address of a given function is not guaranteed to be the same
- * between contexts.
- *
- * @remark This function may return a non-`NULL` address despite the
- * associated version or extension not being available. Always check the
- * context version or extension string first.
- *
- * @pointer_lifetime The returned function pointer is valid until the context
- * is destroyed or the library is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_glext
- * @sa @ref glfwExtensionSupported
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
-
-/*! @brief Returns whether the Vulkan loader and an ICD have been found.
- *
- * This function returns whether the Vulkan loader and any minimally functional
- * ICD have been found.
- *
- * The availability of a Vulkan loader and even an ICD does not by itself guarantee that
- * surface creation or even instance creation is possible. Call @ref
- * glfwGetRequiredInstanceExtensions to check whether the extensions necessary for Vulkan
- * surface creation are available and @ref glfwGetPhysicalDevicePresentationSupport to
- * check whether a queue family of a physical device supports image presentation.
- *
- * @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE`
- * otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_support
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI int glfwVulkanSupported(void);
-
-/*! @brief Returns the Vulkan instance extensions required by GLFW.
- *
- * This function returns an array of names of Vulkan instance extensions required
- * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the
- * list will always contain `VK_KHR_surface`, so if you don't require any
- * additional extensions you can pass this list directly to the
- * `VkInstanceCreateInfo` struct.
- *
- * If Vulkan is not available on the machine, this function returns `NULL` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is at least minimally available.
- *
- * If Vulkan is available but no set of extensions allowing window surface
- * creation was found, this function returns `NULL`. You may still use Vulkan
- * for off-screen rendering and compute work.
- *
- * @param[out] count Where to store the number of extensions in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of ASCII encoded extension names, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_API_UNAVAILABLE.
- *
- * @remark Additional extensions may be required by future versions of GLFW.
- * You should check if any extensions you wish to enable are already in the
- * returned array, as it is an error to specify an extension more than once in
- * the `VkInstanceCreateInfo` struct.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is guaranteed to be valid only until the
- * library is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_ext
- * @sa @ref glfwCreateWindowSurface
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);
-
-#if defined(VK_VERSION_1_0)
-
-/*! @brief Returns the address of the specified Vulkan instance function.
- *
- * This function returns the address of the specified Vulkan core or extension
- * function for the specified instance. If instance is set to `NULL` it can
- * return any function exported from the Vulkan loader, including at least the
- * following functions:
- *
- * - `vkEnumerateInstanceExtensionProperties`
- * - `vkEnumerateInstanceLayerProperties`
- * - `vkCreateInstance`
- * - `vkGetInstanceProcAddr`
- *
- * If Vulkan is not available on the machine, this function returns `NULL` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is at least minimally available.
- *
- * This function is equivalent to calling `vkGetInstanceProcAddr` with
- * a platform-specific query of the Vulkan loader as a fallback.
- *
- * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve
- * functions related to instance creation.
- * @param[in] procname The ASCII encoded name of the function.
- * @return The address of the function, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_API_UNAVAILABLE.
- *
- * @pointer_lifetime The returned function pointer is valid until the library
- * is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_proc
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);
-
-/*! @brief Returns whether the specified queue family can present images.
- *
- * This function returns whether the specified queue family of the specified
- * physical device supports presentation to the platform GLFW was built for.
- *
- * If Vulkan or the required window surface creation instance extensions are
- * not available on the machine, or if the specified instance was not created
- * with the required extensions, this function returns `GLFW_FALSE` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is at least minimally available and @ref
- * glfwGetRequiredInstanceExtensions to check what instance extensions are
- * required.
- *
- * @param[in] instance The instance that the physical device belongs to.
- * @param[in] device The physical device that the queue family belongs to.
- * @param[in] queuefamily The index of the queue family to query.
- * @return `GLFW_TRUE` if the queue family supports presentation, or
- * `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark @macos This function currently always returns `GLFW_TRUE`, as the
- * `VK_MVK_macos_surface` and `VK_EXT_metal_surface` extensions do not provide
- * a `vkGetPhysicalDevice*PresentationSupport` type function.
- *
- * @thread_safety This function may be called from any thread. For
- * synchronization details of Vulkan objects, see the Vulkan specification.
- *
- * @sa @ref vulkan_present
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
-
-/*! @brief Creates a Vulkan surface for the specified window.
- *
- * This function creates a Vulkan surface for the specified window.
- *
- * If the Vulkan loader or at least one minimally functional ICD were not found,
- * this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref
- * GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether
- * Vulkan is at least minimally available.
- *
- * If the required window surface creation instance extensions are not
- * available or if the specified instance was not created with these extensions
- * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref
- * glfwGetRequiredInstanceExtensions to check what instance extensions are
- * required.
- *
- * The window surface cannot be shared with another API so the window must
- * have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib)
- * set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error
- * and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`.
- *
- * The window surface must be destroyed before the specified Vulkan instance.
- * It is the responsibility of the caller to destroy the window surface. GLFW
- * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the
- * surface.
- *
- * @param[in] instance The Vulkan instance to create the surface in.
- * @param[in] window The window to create the surface for.
- * @param[in] allocator The allocator to use, or `NULL` to use the default
- * allocator.
- * @param[out] surface Where to store the handle of the surface. This is set
- * to `VK_NULL_HANDLE` if an error occurred.
- * @return `VK_SUCCESS` if successful, or a Vulkan error code if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE
- *
- * @remark If an error occurs before the creation call is made, GLFW returns
- * the Vulkan error code most appropriate for the error. Appropriate use of
- * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should
- * eliminate almost all occurrences of these errors.
- *
- * @remark @macos GLFW prefers the `VK_EXT_metal_surface` extension, with the
- * `VK_MVK_macos_surface` extension as a fallback. The name of the selected
- * extension, if any, is included in the array returned by @ref
- * glfwGetRequiredInstanceExtensions.
- *
- * @remark @macos This function creates and sets a `CAMetalLayer` instance for
- * the window content view, which is required for MoltenVK to function.
- *
- * @thread_safety This function may be called from any thread. For
- * synchronization details of Vulkan objects, see the Vulkan specification.
- *
- * @sa @ref vulkan_surface
- * @sa @ref glfwGetRequiredInstanceExtensions
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
-
-#endif /*VK_VERSION_1_0*/
-
-
-/*************************************************************************
- * Global definition cleanup
- *************************************************************************/
-
-/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
-
-#ifdef GLFW_WINGDIAPI_DEFINED
- #undef WINGDIAPI
- #undef GLFW_WINGDIAPI_DEFINED
-#endif
-
-#ifdef GLFW_CALLBACK_DEFINED
- #undef CALLBACK
- #undef GLFW_CALLBACK_DEFINED
-#endif
-
-/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally
- * defined by some gl.h variants (OpenBSD) so define it after if needed.
- */
-#ifndef GLAPIENTRY
- #define GLAPIENTRY APIENTRY
- #define GLFW_GLAPIENTRY_DEFINED
-#endif
-
-/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _glfw3_h_ */
-
diff --git a/CopiumEngine/ext/include/GLFW/glfw3native.h b/CopiumEngine/ext/include/GLFW/glfw3native.h
deleted file mode 100644
index 7be0227..0000000
--- a/CopiumEngine/ext/include/GLFW/glfw3native.h
+++ /dev/null
@@ -1,628 +0,0 @@
-/*************************************************************************
- * GLFW 3.3 - www.glfw.org
- * A library for OpenGL, window and input
- *------------------------------------------------------------------------
- * Copyright (c) 2002-2006 Marcus Geelnard
- * Copyright (c) 2006-2018 Camilla Löwy
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would
- * be appreciated but is not required.
- *
- * 2. Altered source versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * 3. This notice may not be removed or altered from any source
- * distribution.
- *
- *************************************************************************/
-
-#ifndef _glfw3_native_h_
-#define _glfw3_native_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*************************************************************************
- * Doxygen documentation
- *************************************************************************/
-
-/*! @file glfw3native.h
- * @brief The header of the native access functions.
- *
- * This is the header file of the native access functions. See @ref native for
- * more information.
- */
-/*! @defgroup native Native access
- * @brief Functions related to accessing native handles.
- *
- * **By using the native access functions you assert that you know what you're
- * doing and how to fix problems caused by using them. If you don't, you
- * shouldn't be using them.**
- *
- * Before the inclusion of @ref glfw3native.h, you may define zero or more
- * window system API macro and zero or more context creation API macros.
- *
- * The chosen backends must match those the library was compiled for. Failure
- * to do this will cause a link-time error.
- *
- * The available window API macros are:
- * * `GLFW_EXPOSE_NATIVE_WIN32`
- * * `GLFW_EXPOSE_NATIVE_COCOA`
- * * `GLFW_EXPOSE_NATIVE_X11`
- * * `GLFW_EXPOSE_NATIVE_WAYLAND`
- *
- * The available context API macros are:
- * * `GLFW_EXPOSE_NATIVE_WGL`
- * * `GLFW_EXPOSE_NATIVE_NSGL`
- * * `GLFW_EXPOSE_NATIVE_GLX`
- * * `GLFW_EXPOSE_NATIVE_EGL`
- * * `GLFW_EXPOSE_NATIVE_OSMESA`
- *
- * These macros select which of the native access functions that are declared
- * and which platform-specific headers to include. It is then up your (by
- * definition platform-specific) code to handle which of these should be
- * defined.
- *
- * If you do not want the platform-specific headers to be included, define
- * `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native.h header.
- *
- * @code
- * #define GLFW_EXPOSE_NATIVE_WIN32
- * #define GLFW_EXPOSE_NATIVE_WGL
- * #define GLFW_NATIVE_INCLUDE_NONE
- * #include
- * @endcode
- */
-
-
-/*************************************************************************
- * System headers and types
- *************************************************************************/
-
-#if !defined(GLFW_NATIVE_INCLUDE_NONE)
-
- #if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
- /* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
- * example to allow applications to correctly declare a GL_KHR_debug callback)
- * but windows.h assumes no one will define APIENTRY before it does
- */
- #if defined(GLFW_APIENTRY_DEFINED)
- #undef APIENTRY
- #undef GLFW_APIENTRY_DEFINED
- #endif
- #include
- #elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
- #if defined(__OBJC__)
- #import
- #else
- #include
- #include
- #endif
- #elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
- #include
- #include
- #elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
- #include
- #endif
-
- #if defined(GLFW_EXPOSE_NATIVE_WGL)
- /* WGL is declared by windows.h */
- #endif
- #if defined(GLFW_EXPOSE_NATIVE_NSGL)
- /* NSGL is declared by Cocoa.h */
- #endif
- #if defined(GLFW_EXPOSE_NATIVE_GLX)
- /* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
- * default it also acts as an OpenGL header
- * However, glx.h will include gl.h, which will define it unconditionally
- */
- #if defined(GLFW_GLAPIENTRY_DEFINED)
- #undef GLAPIENTRY
- #undef GLFW_GLAPIENTRY_DEFINED
- #endif
- #include
- #endif
- #if defined(GLFW_EXPOSE_NATIVE_EGL)
- #include
- #endif
- #if defined(GLFW_EXPOSE_NATIVE_OSMESA)
- /* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
- * default it also acts as an OpenGL header
- * However, osmesa.h will include gl.h, which will define it unconditionally
- */
- #if defined(GLFW_GLAPIENTRY_DEFINED)
- #undef GLAPIENTRY
- #undef GLFW_GLAPIENTRY_DEFINED
- #endif
- #include
- #endif
-
-#endif /*GLFW_NATIVE_INCLUDE_NONE*/
-
-
-/*************************************************************************
- * Functions
- *************************************************************************/
-
-#if defined(GLFW_EXPOSE_NATIVE_WIN32)
-/*! @brief Returns the adapter device name of the specified monitor.
- *
- * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
- * of the specified monitor, or `NULL` if an [error](@ref error_handling)
- * occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the display device name of the specified monitor.
- *
- * @return The UTF-8 encoded display device name (for example
- * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `HWND` of the specified window.
- *
- * @return The `HWND` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark The `HDC` associated with the window can be queried with the
- * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
- * function.
- * @code
- * HDC dc = GetDC(glfwGetWin32Window(window));
- * @endcode
- * This DC is private and does not need to be released.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WGL)
-/*! @brief Returns the `HGLRC` of the specified window.
- *
- * @return The `HGLRC` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @remark The `HDC` associated with the window can be queried with the
- * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
- * function.
- * @code
- * HDC dc = GetDC(glfwGetWin32Window(window));
- * @endcode
- * This DC is private and does not need to be released.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_COCOA)
-/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
- *
- * @return The `CGDirectDisplayID` of the specified monitor, or
- * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `NSWindow` of the specified window.
- *
- * @return The `NSWindow` of the specified window, or `nil` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_NSGL)
-/*! @brief Returns the `NSOpenGLContext` of the specified window.
- *
- * @return The `NSOpenGLContext` of the specified window, or `nil` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_X11)
-/*! @brief Returns the `Display` used by GLFW.
- *
- * @return The `Display` used by GLFW, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI Display* glfwGetX11Display(void);
-
-/*! @brief Returns the `RRCrtc` of the specified monitor.
- *
- * @return The `RRCrtc` of the specified monitor, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the `RROutput` of the specified monitor.
- *
- * @return The `RROutput` of the specified monitor, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `Window` of the specified window.
- *
- * @return The `Window` of the specified window, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
-
-/*! @brief Sets the current primary selection to the specified string.
- *
- * @param[in] string A UTF-8 encoded string.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified string is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa glfwGetX11SelectionString
- * @sa glfwSetClipboardString
- *
- * @since Added in version 3.3.
- *
- * @ingroup native
- */
-GLFWAPI void glfwSetX11SelectionString(const char* string);
-
-/*! @brief Returns the contents of the current primary selection as a string.
- *
- * If the selection is empty or if its contents cannot be converted, `NULL`
- * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
- *
- * @return The contents of the selection as a UTF-8 encoded string, or `NULL`
- * if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the next call to @ref
- * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
- * library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa glfwSetX11SelectionString
- * @sa glfwGetClipboardString
- *
- * @since Added in version 3.3.
- *
- * @ingroup native
- */
-GLFWAPI const char* glfwGetX11SelectionString(void);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_GLX)
-/*! @brief Returns the `GLXContext` of the specified window.
- *
- * @return The `GLXContext` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
-
-/*! @brief Returns the `GLXWindow` of the specified window.
- *
- * @return The `GLXWindow` of the specified window, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
-/*! @brief Returns the `struct wl_display*` used by GLFW.
- *
- * @return The `struct wl_display*` used by GLFW, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
-
-/*! @brief Returns the `struct wl_output*` of the specified monitor.
- *
- * @return The `struct wl_output*` of the specified monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the main `struct wl_surface*` of the specified window.
- *
- * @return The main `struct wl_surface*` of the specified window, or `NULL` if
- * an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_EGL)
-/*! @brief Returns the `EGLDisplay` used by GLFW.
- *
- * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark Because EGL is initialized on demand, this function will return
- * `EGL_NO_DISPLAY` until the first context has been created via EGL.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
-
-/*! @brief Returns the `EGLContext` of the specified window.
- *
- * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
-
-/*! @brief Returns the `EGLSurface` of the specified window.
- *
- * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
-/*! @brief Retrieves the color buffer associated with the specified window.
- *
- * @param[in] window The window whose color buffer to retrieve.
- * @param[out] width Where to store the width of the color buffer, or `NULL`.
- * @param[out] height Where to store the height of the color buffer, or `NULL`.
- * @param[out] format Where to store the OSMesa pixel format of the color
- * buffer, or `NULL`.
- * @param[out] buffer Where to store the address of the color buffer, or
- * `NULL`.
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.3.
- *
- * @ingroup native
- */
-GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
-
-/*! @brief Retrieves the depth buffer associated with the specified window.
- *
- * @param[in] window The window whose depth buffer to retrieve.
- * @param[out] width Where to store the width of the depth buffer, or `NULL`.
- * @param[out] height Where to store the height of the depth buffer, or `NULL`.
- * @param[out] bytesPerValue Where to store the number of bytes per depth
- * buffer element, or `NULL`.
- * @param[out] buffer Where to store the address of the depth buffer, or
- * `NULL`.
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.3.
- *
- * @ingroup native
- */
-GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
-
-/*! @brief Returns the `OSMesaContext` of the specified window.
- *
- * @return The `OSMesaContext` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
- * GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.3.
- *
- * @ingroup native
- */
-GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _glfw3_native_h_ */
-
diff --git a/CopiumEngine/ext/include/freetype/config/ftconfig.h b/CopiumEngine/ext/include/freetype/config/ftconfig.h
deleted file mode 100644
index a851516..0000000
--- a/CopiumEngine/ext/include/freetype/config/ftconfig.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
- *
- * ftconfig.h
- *
- * ANSI-specific configuration file (specification only).
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
- /**************************************************************************
- *
- * This header file contains a number of macro definitions that are used by
- * the rest of the engine. Most of the macros here are automatically
- * determined at compile time, and you should not need to change it to port
- * FreeType, except to compile the library with a non-ANSI compiler.
- *
- * Note however that if some specific modifications are needed, we advise
- * you to place a modified copy in your build directory.
- *
- * The build directory is usually `builds/`, and contains
- * system-specific files that are always included first when building the
- * library.
- *
- * This ANSI version should stay in `include/config/`.
- *
- */
-
-#ifndef FTCONFIG_H_
-#define FTCONFIG_H_
-
-#include
-#include FT_CONFIG_OPTIONS_H
-#include FT_CONFIG_STANDARD_LIBRARY_H
-
-#include
-#include
-#include
-
-#endif /* FTCONFIG_H_ */
-
-
-/* END */
diff --git a/CopiumEngine/ext/include/freetype/config/ftheader.h b/CopiumEngine/ext/include/freetype/config/ftheader.h
deleted file mode 100644
index e607bce..0000000
--- a/CopiumEngine/ext/include/freetype/config/ftheader.h
+++ /dev/null
@@ -1,836 +0,0 @@
-/****************************************************************************
- *
- * ftheader.h
- *
- * Build macros of the FreeType 2 library.
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-#ifndef FTHEADER_H_
-#define FTHEADER_H_
-
-
- /*@***********************************************************************/
- /* */
- /* */
- /* FT_BEGIN_HEADER */
- /* */
- /* */
- /* This macro is used in association with @FT_END_HEADER in header */
- /* files to ensure that the declarations within are properly */
- /* encapsulated in an `extern "C" { .. }` block when included from a */
- /* C++ compiler. */
- /* */
-#ifndef FT_BEGIN_HEADER
-# ifdef __cplusplus
-# define FT_BEGIN_HEADER extern "C" {
-# else
-# define FT_BEGIN_HEADER /* nothing */
-# endif
-#endif
-
-
- /*@***********************************************************************/
- /* */
- /* */
- /* FT_END_HEADER */
- /* */
- /* */
- /* This macro is used in association with @FT_BEGIN_HEADER in header */
- /* files to ensure that the declarations within are properly */
- /* encapsulated in an `extern "C" { .. }` block when included from a */
- /* C++ compiler. */
- /* */
-#ifndef FT_END_HEADER
-# ifdef __cplusplus
-# define FT_END_HEADER }
-# else
-# define FT_END_HEADER /* nothing */
-# endif
-#endif
-
-
- /**************************************************************************
- *
- * Aliases for the FreeType 2 public and configuration files.
- *
- */
-
- /**************************************************************************
- *
- * @section:
- * header_file_macros
- *
- * @title:
- * Header File Macros
- *
- * @abstract:
- * Macro definitions used to `#include` specific header files.
- *
- * @description:
- * In addition to the normal scheme of including header files like
- *
- * ```
- * #include
- * #include
- * #include
- * ```
- *
- * it is possible to used named macros instead. They can be used
- * directly in `#include` statements as in
- *
- * ```
- * #include FT_FREETYPE_H
- * #include FT_MULTIPLE_MASTERS_H
- * #include FT_GLYPH_H
- * ```
- *
- * These macros were introduced to overcome the infamous 8.3~naming rule
- * required by DOS (and `FT_MULTIPLE_MASTERS_H` is a lot more meaningful
- * than `ftmm.h`).
- *
- */
-
-
- /* configuration files */
-
- /**************************************************************************
- *
- * @macro:
- * FT_CONFIG_CONFIG_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * FreeType~2 configuration data.
- *
- */
-#ifndef FT_CONFIG_CONFIG_H
-#define FT_CONFIG_CONFIG_H
-#endif
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CONFIG_STANDARD_LIBRARY_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * FreeType~2 interface to the standard C library functions.
- *
- */
-#ifndef FT_CONFIG_STANDARD_LIBRARY_H
-#define FT_CONFIG_STANDARD_LIBRARY_H
-#endif
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CONFIG_OPTIONS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * FreeType~2 project-specific configuration options.
- *
- */
-#ifndef FT_CONFIG_OPTIONS_H
-#define FT_CONFIG_OPTIONS_H
-#endif
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CONFIG_MODULES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * list of FreeType~2 modules that are statically linked to new library
- * instances in @FT_Init_FreeType.
- *
- */
-#ifndef FT_CONFIG_MODULES_H
-#define FT_CONFIG_MODULES_H
-#endif
-
- /* */
-
- /* public headers */
-
- /**************************************************************************
- *
- * @macro:
- * FT_FREETYPE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * base FreeType~2 API.
- *
- */
-#define FT_FREETYPE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_ERRORS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * list of FreeType~2 error codes (and messages).
- *
- * It is included by @FT_FREETYPE_H.
- *
- */
-#define FT_ERRORS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_MODULE_ERRORS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * list of FreeType~2 module error offsets (and messages).
- *
- */
-#define FT_MODULE_ERRORS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_SYSTEM_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 interface to low-level operations (i.e., memory management
- * and stream i/o).
- *
- * It is included by @FT_FREETYPE_H.
- *
- */
-#define FT_SYSTEM_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IMAGE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing type
- * definitions related to glyph images (i.e., bitmaps, outlines,
- * scan-converter parameters).
- *
- * It is included by @FT_FREETYPE_H.
- *
- */
-#define FT_IMAGE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TYPES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * basic data types defined by FreeType~2.
- *
- * It is included by @FT_FREETYPE_H.
- *
- */
-#define FT_TYPES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_LIST_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * list management API of FreeType~2.
- *
- * (Most applications will never need to include this file.)
- *
- */
-#define FT_LIST_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_OUTLINE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * scalable outline management API of FreeType~2.
- *
- */
-#define FT_OUTLINE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_SIZES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * API which manages multiple @FT_Size objects per face.
- *
- */
-#define FT_SIZES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_MODULE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * module management API of FreeType~2.
- *
- */
-#define FT_MODULE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_RENDER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * renderer module management API of FreeType~2.
- *
- */
-#define FT_RENDER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DRIVER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * structures and macros related to the driver modules.
- *
- */
-#define FT_DRIVER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_AUTOHINTER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * structures and macros related to the auto-hinting module.
- *
- * Deprecated since version~2.9; use @FT_DRIVER_H instead.
- *
- */
-#define FT_AUTOHINTER_H FT_DRIVER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CFF_DRIVER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * structures and macros related to the CFF driver module.
- *
- * Deprecated since version~2.9; use @FT_DRIVER_H instead.
- *
- */
-#define FT_CFF_DRIVER_H FT_DRIVER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TRUETYPE_DRIVER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * structures and macros related to the TrueType driver module.
- *
- * Deprecated since version~2.9; use @FT_DRIVER_H instead.
- *
- */
-#define FT_TRUETYPE_DRIVER_H FT_DRIVER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_PCF_DRIVER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing
- * structures and macros related to the PCF driver module.
- *
- * Deprecated since version~2.9; use @FT_DRIVER_H instead.
- *
- */
-#define FT_PCF_DRIVER_H FT_DRIVER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TYPE1_TABLES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * types and API specific to the Type~1 format.
- *
- */
-#define FT_TYPE1_TABLES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TRUETYPE_IDS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * enumeration values which identify name strings, languages, encodings,
- * etc. This file really contains a _large_ set of constant macro
- * definitions, taken from the TrueType and OpenType specifications.
- *
- */
-#define FT_TRUETYPE_IDS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TRUETYPE_TABLES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * types and API specific to the TrueType (as well as OpenType) format.
- *
- */
-#define FT_TRUETYPE_TABLES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TRUETYPE_TAGS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of TrueType four-byte 'tags' which identify blocks in
- * SFNT-based font formats (i.e., TrueType and OpenType).
- *
- */
-#define FT_TRUETYPE_TAGS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_BDF_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which accesses BDF-specific strings from a face.
- *
- */
-#define FT_BDF_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CID_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which access CID font information from a face.
- *
- */
-#define FT_CID_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_GZIP_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which supports gzip-compressed files.
- *
- */
-#define FT_GZIP_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_LZW_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which supports LZW-compressed files.
- *
- */
-#define FT_LZW_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_BZIP2_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which supports bzip2-compressed files.
- *
- */
-#define FT_BZIP2_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_WINFONTS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * definitions of an API which supports Windows FNT files.
- *
- */
-#define FT_WINFONTS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_GLYPH_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * API of the optional glyph management component.
- *
- */
-#define FT_GLYPH_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_BITMAP_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * API of the optional bitmap conversion component.
- *
- */
-#define FT_BITMAP_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_BBOX_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * API of the optional exact bounding box computation routines.
- *
- */
-#define FT_BBOX_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_CACHE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * API of the optional FreeType~2 cache sub-system.
- *
- */
-#define FT_CACHE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_MAC_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * Macintosh-specific FreeType~2 API. The latter is used to access fonts
- * embedded in resource forks.
- *
- * This header file must be explicitly included by client applications
- * compiled on the Mac (note that the base API still works though).
- *
- */
-#define FT_MAC_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_MULTIPLE_MASTERS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * optional multiple-masters management API of FreeType~2.
- *
- */
-#define FT_MULTIPLE_MASTERS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_SFNT_NAMES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * optional FreeType~2 API which accesses embedded 'name' strings in
- * SFNT-based font formats (i.e., TrueType and OpenType).
- *
- */
-#define FT_SFNT_NAMES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_OPENTYPE_VALIDATE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * optional FreeType~2 API which validates OpenType tables ('BASE',
- * 'GDEF', 'GPOS', 'GSUB', 'JSTF').
- *
- */
-#define FT_OPENTYPE_VALIDATE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_GX_VALIDATE_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * optional FreeType~2 API which validates TrueTypeGX/AAT tables ('feat',
- * 'mort', 'morx', 'bsln', 'just', 'kern', 'opbd', 'trak', 'prop').
- *
- */
-#define FT_GX_VALIDATE_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_PFR_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which accesses PFR-specific data.
- *
- */
-#define FT_PFR_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_STROKER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which provides functions to stroke outline paths.
- */
-#define FT_STROKER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_SYNTHESIS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which performs artificial obliquing and emboldening.
- */
-#define FT_SYNTHESIS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_FONT_FORMATS_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which provides functions specific to font formats.
- */
-#define FT_FONT_FORMATS_H
-
- /* deprecated */
-#define FT_XFREE86_H FT_FONT_FORMATS_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_TRIGONOMETRY_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which performs trigonometric computations (e.g.,
- * cosines and arc tangents).
- */
-#define FT_TRIGONOMETRY_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_LCD_FILTER_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which performs color filtering for subpixel rendering.
- */
-#define FT_LCD_FILTER_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_INCREMENTAL_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which performs incremental glyph loading.
- */
-#define FT_INCREMENTAL_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_GASP_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which returns entries from the TrueType GASP table.
- */
-#define FT_GASP_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_ADVANCES_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which returns individual and ranged glyph advances.
- */
-#define FT_ADVANCES_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_COLOR_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which handles the OpenType 'CPAL' table.
- */
-#define FT_COLOR_H
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_OTSVG_H
- *
- * @description:
- * A macro used in `#include` statements to name the file containing the
- * FreeType~2 API which handles the OpenType 'SVG~' glyphs.
- */
-#define FT_OTSVG_H
-
-
- /* */
-
- /* These header files don't need to be included by the user. */
-#define FT_ERROR_DEFINITIONS_H
-#define FT_PARAMETER_TAGS_H
-
- /* Deprecated macros. */
-#define FT_UNPATENTED_HINTING_H
-#define FT_TRUETYPE_UNPATENTED_H
-
- /* `FT_CACHE_H` is the only header file needed for the cache subsystem. */
-#define FT_CACHE_IMAGE_H FT_CACHE_H
-#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
-#define FT_CACHE_CHARMAP_H FT_CACHE_H
-
- /* The internals of the cache sub-system are no longer exposed. We */
- /* default to `FT_CACHE_H` at the moment just in case, but we know */
- /* of no rogue client that uses them. */
- /* */
-#define FT_CACHE_MANAGER_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
-#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
-
-/* TODO(david): Move this section below to a different header */
-#ifdef FT2_BUILD_LIBRARY
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
-
- /* We disable the warning `conditional expression is constant' here */
- /* in order to compile cleanly with the maximum level of warnings. */
- /* In particular, the warning complains about stuff like `while(0)' */
- /* which is very useful in macro definitions. There is no benefit */
- /* in having it enabled. */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-#endif /* FT2_BUILD_LIBRARY */
-
-#endif /* FTHEADER_H_ */
-
-
-/* END */
diff --git a/CopiumEngine/ext/include/freetype/config/ftmodule.h b/CopiumEngine/ext/include/freetype/config/ftmodule.h
deleted file mode 100644
index b315bab..0000000
--- a/CopiumEngine/ext/include/freetype/config/ftmodule.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This file registers the FreeType modules compiled into the library.
- *
- * If you use GNU make, this file IS NOT USED! Instead, it is created in
- * the objects directory (normally `/objs/`) based on information
- * from `/modules.cfg`.
- *
- * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile
- * FreeType without GNU make.
- *
- */
-
-FT_USE_MODULE( FT_Module_Class, autofit_module_class )
-FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
-FT_USE_MODULE( FT_Module_Class, psaux_module_class )
-FT_USE_MODULE( FT_Module_Class, psnames_module_class )
-FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
-FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class )
-
-/* EOF */
diff --git a/CopiumEngine/ext/include/freetype/config/ftoption.h b/CopiumEngine/ext/include/freetype/config/ftoption.h
deleted file mode 100644
index 9e03e17..0000000
--- a/CopiumEngine/ext/include/freetype/config/ftoption.h
+++ /dev/null
@@ -1,1047 +0,0 @@
-/****************************************************************************
- *
- * ftoption.h
- *
- * User-selectable configuration macros (specification only).
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
-#ifndef FTOPTION_H_
-#define FTOPTION_H_
-
-
-#include
-
-
-FT_BEGIN_HEADER
-
- /**************************************************************************
- *
- * USER-SELECTABLE CONFIGURATION MACROS
- *
- * This file contains the default configuration macro definitions for a
- * standard build of the FreeType library. There are three ways to use
- * this file to build project-specific versions of the library:
- *
- * - You can modify this file by hand, but this is not recommended in
- * cases where you would like to build several versions of the library
- * from a single source directory.
- *
- * - You can put a copy of this file in your build directory, more
- * precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is
- * the name of a directory that is included _before_ the FreeType include
- * path during compilation.
- *
- * The default FreeType Makefiles use the build directory
- * `builds/` by default, but you can easily change that for your
- * own projects.
- *
- * - Copy the file to `$BUILD/ft2build.h` and modify it
- * slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate
- * this file during the build. For example,
- *
- * ```
- * #define FT_CONFIG_OPTIONS_H
- * #include
- * ```
- *
- * will use `$BUILD/myftoptions.h` instead of this file for macro
- * definitions.
- *
- * Note also that you can similarly pre-define the macro
- * `FT_CONFIG_MODULES_H` used to locate the file listing of the modules
- * that are statically linked to the library at compile time. By
- * default, this file is ``.
- *
- * We highly recommend using the third method whenever possible.
- *
- */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /*#************************************************************************
- *
- * If you enable this configuration option, FreeType recognizes an
- * environment variable called `FREETYPE_PROPERTIES`, which can be used to
- * control the various font drivers and modules. The controllable
- * properties are listed in the section @properties.
- *
- * You have to undefine this configuration option on platforms that lack
- * the concept of environment variables (and thus don't have the `getenv`
- * function), for example Windows CE.
- *
- * `FREETYPE_PROPERTIES` has the following syntax form (broken here into
- * multiple lines for better readability).
- *
- * ```
- *
- * ':'
- * '='
- *
- * ':'
- * '='
- * ...
- * ```
- *
- * Example:
- *
- * ```
- * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
- * cff:no-stem-darkening=1
- * ```
- *
- */
-#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
-
-
- /**************************************************************************
- *
- * Uncomment the line below if you want to activate LCD rendering
- * technology similar to ClearType in this build of the library. This
- * technology triples the resolution in the direction color subpixels. To
- * mitigate color fringes inherent to this technology, you also need to
- * explicitly set up LCD filtering.
- *
- * When this macro is not defined, FreeType offers alternative LCD
- * rendering technology that produces excellent output.
- */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
-
-
- /**************************************************************************
- *
- * Many compilers provide a non-ANSI 64-bit data type that can be used by
- * FreeType to speed up some computations. However, this will create some
- * problems when compiling the library in strict ANSI mode.
- *
- * For this reason, the use of 64-bit integers is normally disabled when
- * the `__STDC__` macro is defined. You can however disable this by
- * defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here.
- *
- * For most compilers, this will only create compilation warnings when
- * building the library.
- *
- * ObNote: The compiler-specific 64-bit integers are detected in the
- * file `ftconfig.h` either statically or through the `configure`
- * script on supported platforms.
- */
-#undef FT_CONFIG_OPTION_FORCE_INT64
-
-
- /**************************************************************************
- *
- * If this macro is defined, do not try to use an assembler version of
- * performance-critical functions (e.g., @FT_MulFix). You should only do
- * that to verify that the assembler function works properly, or to execute
- * benchmark tests of the various implementations.
- */
-/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
-
-
- /**************************************************************************
- *
- * If this macro is defined, try to use an inlined assembler version of the
- * @FT_MulFix function, which is a 'hotspot' when loading and hinting
- * glyphs, and which should be executed as fast as possible.
- *
- * Note that if your compiler or CPU is not supported, this will default to
- * the standard and portable implementation found in `ftcalc.c`.
- */
-#define FT_CONFIG_OPTION_INLINE_MULFIX
-
-
- /**************************************************************************
- *
- * LZW-compressed file support.
- *
- * FreeType now handles font files that have been compressed with the
- * `compress` program. This is mostly used to parse many of the PCF
- * files that come with various X11 distributions. The implementation
- * uses NetBSD's `zopen` to partially uncompress the file on the fly (see
- * `src/lzw/ftgzip.c`).
- *
- * Define this macro if you want to enable this 'feature'.
- */
-#define FT_CONFIG_OPTION_USE_LZW
-
-
- /**************************************************************************
- *
- * Gzip-compressed file support.
- *
- * FreeType now handles font files that have been compressed with the
- * `gzip` program. This is mostly used to parse many of the PCF files
- * that come with XFree86. The implementation uses 'zlib' to partially
- * uncompress the file on the fly (see `src/gzip/ftgzip.c`).
- *
- * Define this macro if you want to enable this 'feature'. See also the
- * macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below.
- */
-#define FT_CONFIG_OPTION_USE_ZLIB
-
-
- /**************************************************************************
- *
- * ZLib library selection
- *
- * This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined.
- * It allows FreeType's 'ftgzip' component to link to the system's
- * installation of the ZLib library. This is useful on systems like
- * Unix or VMS where it generally is already available.
- *
- * If you let it undefined, the component will use its own copy of the
- * zlib sources instead. These have been modified to be included
- * directly within the component and **not** export external function
- * names. This allows you to link any program with FreeType _and_ ZLib
- * without linking conflicts.
- *
- * Do not `#undef` this macro here since the build system might define
- * it for certain configurations only.
- *
- * If you use a build system like cmake or the `configure` script,
- * options set by those programs have precedence, overwriting the value
- * here with the configured one.
- *
- * If you use the GNU make build system directly (that is, without the
- * `configure` script) and you define this macro, you also have to pass
- * `SYSTEM_ZLIB=yes` as an argument to make.
- */
-/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
-
-
- /**************************************************************************
- *
- * Bzip2-compressed file support.
- *
- * FreeType now handles font files that have been compressed with the
- * `bzip2` program. This is mostly used to parse many of the PCF files
- * that come with XFree86. The implementation uses `libbz2` to partially
- * uncompress the file on the fly (see `src/bzip2/ftbzip2.c`). Contrary
- * to gzip, bzip2 currently is not included and need to use the system
- * available bzip2 implementation.
- *
- * Define this macro if you want to enable this 'feature'.
- *
- * If you use a build system like cmake or the `configure` script,
- * options set by those programs have precedence, overwriting the value
- * here with the configured one.
- */
-/* #define FT_CONFIG_OPTION_USE_BZIP2 */
-
-
- /**************************************************************************
- *
- * Define to disable the use of file stream functions and types, `FILE`,
- * `fopen`, etc. Enables the use of smaller system libraries on embedded
- * systems that have multiple system libraries, some with or without file
- * stream support, in the cases where file stream support is not necessary
- * such as memory loading of font files.
- */
-/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
-
-
- /**************************************************************************
- *
- * PNG bitmap support.
- *
- * FreeType now handles loading color bitmap glyphs in the PNG format.
- * This requires help from the external libpng library. Uncompressed
- * color bitmaps do not need any external libraries and will be supported
- * regardless of this configuration.
- *
- * Define this macro if you want to enable this 'feature'.
- *
- * If you use a build system like cmake or the `configure` script,
- * options set by those programs have precedence, overwriting the value
- * here with the configured one.
- */
-/* #define FT_CONFIG_OPTION_USE_PNG */
-
-
- /**************************************************************************
- *
- * HarfBuzz support.
- *
- * FreeType uses the HarfBuzz library to improve auto-hinting of OpenType
- * fonts. If available, many glyphs not directly addressable by a font's
- * character map will be hinted also.
- *
- * Define this macro if you want to enable this 'feature'.
- *
- * If you use a build system like cmake or the `configure` script,
- * options set by those programs have precedence, overwriting the value
- * here with the configured one.
- */
-/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
-
-
- /**************************************************************************
- *
- * Brotli support.
- *
- * FreeType uses the Brotli library to provide support for decompressing
- * WOFF2 streams.
- *
- * Define this macro if you want to enable this 'feature'.
- *
- * If you use a build system like cmake or the `configure` script,
- * options set by those programs have precedence, overwriting the value
- * here with the configured one.
- */
-/* #define FT_CONFIG_OPTION_USE_BROTLI */
-
-
- /**************************************************************************
- *
- * Glyph Postscript Names handling
- *
- * By default, FreeType 2 is compiled with the 'psnames' module. This
- * module is in charge of converting a glyph name string into a Unicode
- * value, or return a Macintosh standard glyph name for the use with the
- * TrueType 'post' table.
- *
- * Undefine this macro if you do not want 'psnames' compiled in your
- * build of FreeType. This has the following effects:
- *
- * - The TrueType driver will provide its own set of glyph names, if you
- * build it to support postscript names in the TrueType 'post' table,
- * but will not synthesize a missing Unicode charmap.
- *
- * - The Type~1 driver will not be able to synthesize a Unicode charmap
- * out of the glyphs found in the fonts.
- *
- * You would normally undefine this configuration macro when building a
- * version of FreeType that doesn't contain a Type~1 or CFF driver.
- */
-#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
-
-
- /**************************************************************************
- *
- * Postscript Names to Unicode Values support
- *
- * By default, FreeType~2 is built with the 'psnames' module compiled in.
- * Among other things, the module is used to convert a glyph name into a
- * Unicode value. This is especially useful in order to synthesize on
- * the fly a Unicode charmap from the CFF/Type~1 driver through a big
- * table named the 'Adobe Glyph List' (AGL).
- *
- * Undefine this macro if you do not want the Adobe Glyph List compiled
- * in your 'psnames' module. The Type~1 driver will not be able to
- * synthesize a Unicode charmap out of the glyphs found in the fonts.
- */
-#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
-
-
- /**************************************************************************
- *
- * Support for Mac fonts
- *
- * Define this macro if you want support for outline fonts in Mac format
- * (mac dfont, mac resource, macbinary containing a mac resource) on
- * non-Mac platforms.
- *
- * Note that the 'FOND' resource isn't checked.
- */
-#define FT_CONFIG_OPTION_MAC_FONTS
-
-
- /**************************************************************************
- *
- * Guessing methods to access embedded resource forks
- *
- * Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux).
- *
- * Resource forks which include fonts data are stored sometimes in
- * locations which users or developers don't expected. In some cases,
- * resource forks start with some offset from the head of a file. In
- * other cases, the actual resource fork is stored in file different from
- * what the user specifies. If this option is activated, FreeType tries
- * to guess whether such offsets or different file names must be used.
- *
- * Note that normal, direct access of resource forks is controlled via
- * the `FT_CONFIG_OPTION_MAC_FONTS` option.
- */
-#ifdef FT_CONFIG_OPTION_MAC_FONTS
-#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-#endif
-
-
- /**************************************************************************
- *
- * Allow the use of `FT_Incremental_Interface` to load typefaces that
- * contain no glyph data, but supply it via a callback function. This is
- * required by clients supporting document formats which supply font data
- * incrementally as the document is parsed, such as the Ghostscript
- * interpreter for the PostScript language.
- */
-#define FT_CONFIG_OPTION_INCREMENTAL
-
-
- /**************************************************************************
- *
- * The size in bytes of the render pool used by the scan-line converter to
- * do all of its work.
- */
-#define FT_RENDER_POOL_SIZE 16384L
-
-
- /**************************************************************************
- *
- * FT_MAX_MODULES
- *
- * The maximum number of modules that can be registered in a single
- * FreeType library object. 32~is the default.
- */
-#define FT_MAX_MODULES 32
-
-
- /**************************************************************************
- *
- * Debug level
- *
- * FreeType can be compiled in debug or trace mode. In debug mode,
- * errors are reported through the 'ftdebug' component. In trace mode,
- * additional messages are sent to the standard output during execution.
- *
- * Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode.
- * Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode.
- *
- * Don't define any of these macros to compile in 'release' mode!
- *
- * Do not `#undef` these macros here since the build system might define
- * them for certain configurations only.
- */
-/* #define FT_DEBUG_LEVEL_ERROR */
-/* #define FT_DEBUG_LEVEL_TRACE */
-
-
- /**************************************************************************
- *
- * Logging
- *
- * Compiling FreeType in debug or trace mode makes FreeType write error
- * and trace log messages to `stderr`. Enabling this macro
- * automatically forces the `FT_DEBUG_LEVEL_ERROR` and
- * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
- * trace log messages to a file instead of `stderr`. For writing logs
- * to a file, FreeType uses an the external `dlg` library (the source
- * code is in `src/dlg`).
- *
- * This option needs a C99 compiler.
- */
-/* #define FT_DEBUG_LOGGING */
-
-
- /**************************************************************************
- *
- * Autofitter debugging
- *
- * If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to
- * control the autofitter behaviour for debugging purposes with global
- * boolean variables (consequently, you should **never** enable this
- * while compiling in 'release' mode):
- *
- * ```
- * af_debug_disable_horz_hints_
- * af_debug_disable_vert_hints_
- * af_debug_disable_blue_hints_
- * ```
- *
- * Additionally, the following functions provide dumps of various
- * internal autofit structures to stdout (using `printf`):
- *
- * ```
- * af_glyph_hints_dump_points
- * af_glyph_hints_dump_segments
- * af_glyph_hints_dump_edges
- * af_glyph_hints_get_num_segments
- * af_glyph_hints_get_segment_offset
- * ```
- *
- * As an argument, they use another global variable:
- *
- * ```
- * af_debug_hints_
- * ```
- *
- * Please have a look at the `ftgrid` demo program to see how those
- * variables and macros should be used.
- *
- * Do not `#undef` these macros here since the build system might define
- * them for certain configurations only.
- */
-/* #define FT_DEBUG_AUTOFIT */
-
-
- /**************************************************************************
- *
- * Memory Debugging
- *
- * FreeType now comes with an integrated memory debugger that is capable
- * of detecting simple errors like memory leaks or double deletes. To
- * compile it within your build of the library, you should define
- * `FT_DEBUG_MEMORY` here.
- *
- * Note that the memory debugger is only activated at runtime when when
- * the _environment_ variable `FT2_DEBUG_MEMORY` is defined also!
- *
- * Do not `#undef` this macro here since the build system might define it
- * for certain configurations only.
- */
-/* #define FT_DEBUG_MEMORY */
-
-
- /**************************************************************************
- *
- * Module errors
- *
- * If this macro is set (which is _not_ the default), the higher byte of
- * an error code gives the module in which the error has occurred, while
- * the lower byte is the real error code.
- *
- * Setting this macro makes sense for debugging purposes only, since it
- * would break source compatibility of certain programs that use
- * FreeType~2.
- *
- * More details can be found in the files `ftmoderr.h` and `fterrors.h`.
- */
-#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-
-
- /**************************************************************************
- *
- * OpenType SVG Glyph Support
- *
- * Setting this macro enables support for OpenType SVG glyphs. By
- * default, FreeType can only fetch SVG documents. However, it can also
- * render them if external rendering hook functions are plugged in at
- * runtime.
- *
- * More details on the hooks can be found in file `otsvg.h`.
- */
-#define FT_CONFIG_OPTION_SVG
-
-
- /**************************************************************************
- *
- * Error Strings
- *
- * If this macro is set, `FT_Error_String` will return meaningful
- * descriptions. This is not enabled by default to reduce the overall
- * size of FreeType.
- *
- * More details can be found in the file `fterrors.h`.
- */
-/* #define FT_CONFIG_OPTION_ERROR_STRINGS */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** S F N T D R I V E R C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support
- * embedded bitmaps in all formats using the 'sfnt' module (namely
- * TrueType~& OpenType).
- */
-#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored
- * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt'
- * module (namely TrueType~& OpenType).
- */
-#define TT_CONFIG_OPTION_COLOR_LAYERS
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to
- * load and enumerate Postscript names of glyphs in a TrueType or OpenType
- * file.
- *
- * Note that if you do not compile the 'psnames' module by undefining the
- * above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` macro, the 'sfnt' module will
- * contain additional code to read the PostScript name table from a font.
- *
- * (By default, the module uses 'psnames' to extract glyph names.)
- */
-#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access
- * the internal name table in a SFNT-based format like TrueType or
- * OpenType. The name table contains various strings used to describe the
- * font, like family name, copyright, version, etc. It does not contain
- * any glyph name though.
- *
- * Accessing SFNT names is done through the functions declared in
- * `ftsnames.h`.
- */
-#define TT_CONFIG_OPTION_SFNT_NAMES
-
-
- /**************************************************************************
- *
- * TrueType CMap support
- *
- * Here you can fine-tune which TrueType CMap table format shall be
- * supported.
- */
-#define TT_CONFIG_CMAP_FORMAT_0
-#define TT_CONFIG_CMAP_FORMAT_2
-#define TT_CONFIG_CMAP_FORMAT_4
-#define TT_CONFIG_CMAP_FORMAT_6
-#define TT_CONFIG_CMAP_FORMAT_8
-#define TT_CONFIG_CMAP_FORMAT_10
-#define TT_CONFIG_CMAP_FORMAT_12
-#define TT_CONFIG_CMAP_FORMAT_13
-#define TT_CONFIG_CMAP_FORMAT_14
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a
- * bytecode interpreter in the TrueType driver.
- *
- * By undefining this, you will only compile the code necessary to load
- * TrueType glyphs without hinting.
- *
- * Do not `#undef` this macro here, since the build system might define it
- * for certain configurations only.
- */
-#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile
- * subpixel hinting support into the TrueType driver. This modifies the
- * TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is
- * requested.
- *
- * In particular, it modifies the bytecode interpreter to interpret (or
- * not) instructions in a certain way so that all TrueType fonts look like
- * they do in a Windows ClearType (DirectWrite) environment. See [1] for a
- * technical overview on what this means. See `ttinterp.h` for more
- * details on the LEAN option.
- *
- * There are three possible values.
- *
- * Value 1:
- * This value is associated with the 'Infinality' moniker, contributed by
- * an individual nicknamed Infinality with the goal of making TrueType
- * fonts render better than on Windows. A high amount of configurability
- * and flexibility, down to rules for single glyphs in fonts, but also
- * very slow. Its experimental and slow nature and the original
- * developer losing interest meant that this option was never enabled in
- * default builds.
- *
- * The corresponding interpreter version is v38.
- *
- * Value 2:
- * The new default mode for the TrueType driver. The Infinality code
- * base was stripped to the bare minimum and all configurability removed
- * in the name of speed and simplicity. The configurability was mainly
- * aimed at legacy fonts like 'Arial', 'Times New Roman', or 'Courier'.
- * Legacy fonts are fonts that modify vertical stems to achieve clean
- * black-and-white bitmaps. The new mode focuses on applying a minimal
- * set of rules to all fonts indiscriminately so that modern and web
- * fonts render well while legacy fonts render okay.
- *
- * The corresponding interpreter version is v40.
- *
- * Value 3:
- * Compile both, making both v38 and v40 available (the latter is the
- * default).
- *
- * By undefining these, you get rendering behavior like on Windows without
- * ClearType, i.e., Windows XP without ClearType enabled and Win9x
- * (interpreter version v35). Or not, depending on how much hinting blood
- * and testing tears the font designer put into a given font. If you
- * define one or both subpixel hinting options, you can switch between
- * between v35 and the ones you define (using `FT_Property_Set`).
- *
- * This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be
- * defined.
- *
- * [1]
- * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
- */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the
- * TrueType glyph loader to use Apple's definition of how to handle
- * component offsets in composite glyphs.
- *
- * Apple and MS disagree on the default behavior of component offsets in
- * composites. Apple says that they should be scaled by the scaling
- * factors in the transformation matrix (roughly, it's more complex) while
- * MS says they should not. OpenType defines two bits in the composite
- * flags array which can be used to disambiguate, but old fonts will not
- * have them.
- *
- * https://www.microsoft.com/typography/otspec/glyf.htm
- * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html
- */
-#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support
- * for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and
- * 'avar' tables). Tagged 'Font Variations', this is now part of OpenType
- * also. This has many similarities to Type~1 Multiple Masters support.
- */
-#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude
- * support for 'boring' OpenType specification expansions.
- *
- * https://github.com/harfbuzz/boring-expansion-spec
- *
- * Right now, the following features are covered:
- *
- * - 'avar' version 2.0
- *
- * Most likely, this is a temporary configuration option to be removed in
- * the near future, since it is assumed that eventually those features are
- * added to the OpenType standard.
- */
-/* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
-
-
- /**************************************************************************
- *
- * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
- * embedded 'BDF~' table within SFNT-based bitmap formats.
- */
-#define TT_CONFIG_OPTION_BDF
-
-
- /**************************************************************************
- *
- * Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum
- * number of bytecode instructions executed for a single run of the
- * bytecode interpreter, needed to prevent infinite loops. You don't want
- * to change this except for very special situations (e.g., making a
- * library fuzzer spend less time to handle broken fonts).
- *
- * It is not expected that this value is ever modified by a configuring
- * script; instead, it gets surrounded with `#ifndef ... #endif` so that
- * the value can be set as a preprocessor option on the compiler's command
- * line.
- */
-#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
-#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
-#endif
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays
- * in the Type~1 stream (see `t1load.c`). A minimum of~4 is required.
- */
-#define T1_MAX_DICT_DEPTH 5
-
-
- /**************************************************************************
- *
- * `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine
- * calls during glyph loading.
- */
-#define T1_MAX_SUBRS_CALLS 16
-
-
- /**************************************************************************
- *
- * `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity. A
- * minimum of~16 is required.
- *
- * The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character
- * set) needs 256.
- */
-#define T1_MAX_CHARSTRINGS_OPERANDS 256
-
-
- /**************************************************************************
- *
- * Define this configuration macro if you want to prevent the compilation
- * of the 't1afm' module, which is in charge of reading Type~1 AFM files
- * into an existing face. Note that if set, the Type~1 driver will be
- * unable to produce kerning distances.
- */
-#undef T1_CONFIG_OPTION_NO_AFM
-
-
- /**************************************************************************
- *
- * Define this configuration macro if you want to prevent the compilation
- * of the Multiple Masters font support in the Type~1 driver.
- */
-#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
-
-
- /**************************************************************************
- *
- * `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1
- * engine gets compiled into FreeType. If defined, it is possible to
- * switch between the two engines using the `hinting-engine` property of
- * the 'type1' driver module.
- */
-/* #define T1_CONFIG_OPTION_OLD_ENGINE */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** C F F D R I V E R C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is
- * possible to set up the default values of the four control points that
- * define the stem darkening behaviour of the (new) CFF engine. For more
- * details please read the documentation of the `darkening-parameters`
- * property (file `ftdriver.h`), which allows the control at run-time.
- *
- * Do **not** undefine these macros!
- */
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
-
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
-
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
-
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
-#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
-
-
- /**************************************************************************
- *
- * `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine
- * gets compiled into FreeType. If defined, it is possible to switch
- * between the two engines using the `hinting-engine` property of the 'cff'
- * driver module.
- */
-/* #define CFF_CONFIG_OPTION_OLD_ENGINE */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** P C F D R I V E R C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * There are many PCF fonts just called 'Fixed' which look completely
- * different, and which have nothing to do with each other. When selecting
- * 'Fixed' in KDE or Gnome one gets results that appear rather random, the
- * style changes often if one changes the size and one cannot select some
- * fonts at all. This option makes the 'pcf' module prepend the foundry
- * name (plus a space) to the family name.
- *
- * We also check whether we have 'wide' characters; all put together, we
- * get family names like 'Sony Fixed' or 'Misc Fixed Wide'.
- *
- * If this option is activated, it can be controlled with the
- * `no-long-family-names` property of the 'pcf' driver module.
- */
-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script
- * support.
- */
-#define AF_CONFIG_OPTION_CJK
-
-
- /**************************************************************************
- *
- * Compile 'autofit' module with fallback Indic script support, covering
- * some scripts that the 'latin' submodule of the 'autofit' module doesn't
- * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`.
- */
-#ifdef AF_CONFIG_OPTION_CJK
-#define AF_CONFIG_OPTION_INDIC
-#endif
-
-
- /**************************************************************************
- *
- * Use TrueType-like size metrics for 'light' auto-hinting.
- *
- * It is strongly recommended to avoid this option, which exists only to
- * help some legacy applications retain its appearance and behaviour with
- * respect to auto-hinted TrueType fonts.
- *
- * The very reason this option exists at all are GNU/Linux distributions
- * like Fedora that did not un-patch the following change (which was
- * present in FreeType between versions 2.4.6 and 2.7.1, inclusive).
- *
- * ```
- * 2011-07-16 Steven Chu
- *
- * [truetype] Fix metrics on size request for scalable fonts.
- * ```
- *
- * This problematic commit is now reverted (more or less).
- */
-/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
-
- /* */
-
-
- /*
- * This macro is obsolete. Support has been removed in FreeType version
- * 2.5.
- */
-/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
- /*
- * The next three macros are defined if native TrueType hinting is
- * requested by the definitions above. Don't change this.
- */
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
-#define TT_USE_BYTECODE_INTERPRETER
-
-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
-#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
-#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
-#endif
-
-#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
-#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-#endif
-#endif
-#endif
-
-
- /*
- * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
- * version of FreeType has support for 'COLR' v1 API. This definition is
- * useful to FreeType clients that want to build in support for 'COLR' v1
- * depending on a tip-of-tree checkout before it is officially released in
- * FreeType, and while the feature cannot yet be tested against using
- * version macros. Don't change this macro. This may be removed once the
- * feature is in a FreeType release version and version macros can be used
- * to test for availability.
- */
-#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
-#define TT_SUPPORT_COLRV1
-#endif
-
-
- /*
- * Check CFF darkening parameters. The checks are the same as in function
- * `cff_property_set` in file `cffdrivr.c`.
- */
-#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
- \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
- \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
- \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
- CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
-#error "Invalid CFF darkening parameters!"
-#endif
-
-
-FT_END_HEADER
-
-#endif /* FTOPTION_H_ */
-
-
-/* END */
diff --git a/CopiumEngine/ext/include/freetype/config/ftstdlib.h b/CopiumEngine/ext/include/freetype/config/ftstdlib.h
deleted file mode 100644
index 3c9d2ae..0000000
--- a/CopiumEngine/ext/include/freetype/config/ftstdlib.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************************
- *
- * ftstdlib.h
- *
- * ANSI-specific library and header configuration file (specification
- * only).
- *
- * Copyright (C) 2002-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
- /**************************************************************************
- *
- * This file is used to group all `#includes` to the ANSI~C library that
- * FreeType normally requires. It also defines macros to rename the
- * standard functions within the FreeType source code.
- *
- * Load a file which defines `FTSTDLIB_H_` before this one to override it.
- *
- */
-
-
-#ifndef FTSTDLIB_H_
-#define FTSTDLIB_H_
-
-
-#include
-
-#define ft_ptrdiff_t ptrdiff_t
-
-
- /**************************************************************************
- *
- * integer limits
- *
- * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
- * `int` and `long` in bytes at compile-time. So far, this works for all
- * platforms the library has been tested on. We also check `ULLONG_MAX`
- * to see whether we can use 64-bit `long long` later on.
- *
- * Note that on the extremely rare platforms that do not provide integer
- * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
- * `int` is 36~bits), we do not make any guarantee about the correct
- * behaviour of FreeType~2 with all fonts.
- *
- * In these cases, `ftconfig.h` will refuse to compile anyway with a
- * message like 'couldn't find 32-bit type' or something similar.
- *
- */
-
-
-#include
-
-#define FT_CHAR_BIT CHAR_BIT
-#define FT_USHORT_MAX USHRT_MAX
-#define FT_INT_MAX INT_MAX
-#define FT_INT_MIN INT_MIN
-#define FT_UINT_MAX UINT_MAX
-#define FT_LONG_MIN LONG_MIN
-#define FT_LONG_MAX LONG_MAX
-#define FT_ULONG_MAX ULONG_MAX
-#ifdef LLONG_MAX
-#define FT_LLONG_MAX LLONG_MAX
-#endif
-#ifdef LLONG_MIN
-#define FT_LLONG_MIN LLONG_MIN
-#endif
-#ifdef ULLONG_MAX
-#define FT_ULLONG_MAX ULLONG_MAX
-#endif
-
-
- /**************************************************************************
- *
- * character and string processing
- *
- */
-
-
-#include
-
-#define ft_memchr memchr
-#define ft_memcmp memcmp
-#define ft_memcpy memcpy
-#define ft_memmove memmove
-#define ft_memset memset
-#define ft_strcat strcat
-#define ft_strcmp strcmp
-#define ft_strcpy strcpy
-#define ft_strlen strlen
-#define ft_strncmp strncmp
-#define ft_strncpy strncpy
-#define ft_strrchr strrchr
-#define ft_strstr strstr
-
-
- /**************************************************************************
- *
- * file handling
- *
- */
-
-
-#include
-
-#define FT_FILE FILE
-#define ft_fclose fclose
-#define ft_fopen fopen
-#define ft_fread fread
-#define ft_fseek fseek
-#define ft_ftell ftell
-#define ft_sprintf sprintf
-
-
- /**************************************************************************
- *
- * sorting
- *
- */
-
-
-#include
-
-#define ft_qsort qsort
-
-
- /**************************************************************************
- *
- * memory allocation
- *
- */
-
-
-#define ft_scalloc calloc
-#define ft_sfree free
-#define ft_smalloc malloc
-#define ft_srealloc realloc
-
-
- /**************************************************************************
- *
- * miscellaneous
- *
- */
-
-
-#define ft_strtol strtol
-#define ft_getenv getenv
-
-
- /**************************************************************************
- *
- * execution control
- *
- */
-
-
-#include
-
-#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
- /* `jmp_buf` is defined as a macro */
- /* on certain platforms */
-
-#define ft_longjmp longjmp
-#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
-
-
- /* The following is only used for debugging purposes, i.e., if */
- /* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */
-
-#include
-
-
-#endif /* FTSTDLIB_H_ */
-
-
-/* END */
diff --git a/CopiumEngine/ext/include/freetype/config/integer-types.h b/CopiumEngine/ext/include/freetype/config/integer-types.h
deleted file mode 100644
index 7258b50..0000000
--- a/CopiumEngine/ext/include/freetype/config/integer-types.h
+++ /dev/null
@@ -1,250 +0,0 @@
-/****************************************************************************
- *
- * config/integer-types.h
- *
- * FreeType integer types definitions.
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-#ifndef FREETYPE_CONFIG_INTEGER_TYPES_H_
-#define FREETYPE_CONFIG_INTEGER_TYPES_H_
-
- /* There are systems (like the Texas Instruments 'C54x) where a `char` */
- /* has 16~bits. ANSI~C says that `sizeof(char)` is always~1. Since an */
- /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which */
- /* is probably unexpected. */
- /* */
- /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a */
- /* `char` type. */
-
-#ifndef FT_CHAR_BIT
-#define FT_CHAR_BIT CHAR_BIT
-#endif
-
-#ifndef FT_SIZEOF_INT
-
- /* The size of an `int` type. */
-#if FT_UINT_MAX == 0xFFFFUL
-#define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT )
-#elif FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT )
-#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `int' type!"
-#endif
-
-#endif /* !defined(FT_SIZEOF_INT) */
-
-#ifndef FT_SIZEOF_LONG
-
- /* The size of a `long` type. A five-byte `long` (as used e.g. on the */
- /* DM642) is recognized but avoided. */
-#if FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `long' type!"
-#endif
-
-#endif /* !defined(FT_SIZEOF_LONG) */
-
-#ifndef FT_SIZEOF_LONG_LONG
-
- /* The size of a `long long` type if available */
-#if defined( FT_ULLONG_MAX ) && FT_ULLONG_MAX >= 0xFFFFFFFFFFFFFFFFULL
-#define FT_SIZEOF_LONG_LONG ( 64 / FT_CHAR_BIT )
-#else
-#define FT_SIZEOF_LONG_LONG 0
-#endif
-
-#endif /* !defined(FT_SIZEOF_LONG_LONG) */
-
-
- /**************************************************************************
- *
- * @section:
- * basic_types
- *
- */
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Int16
- *
- * @description:
- * A typedef for a 16bit signed integer type.
- */
- typedef signed short FT_Int16;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt16
- *
- * @description:
- * A typedef for a 16bit unsigned integer type.
- */
- typedef unsigned short FT_UInt16;
-
- /* */
-
-
- /* this #if 0 ... #endif clause is for documentation purposes */
-#if 0
-
- /**************************************************************************
- *
- * @type:
- * FT_Int32
- *
- * @description:
- * A typedef for a 32bit signed integer type. The size depends on the
- * configuration.
- */
- typedef signed XXX FT_Int32;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt32
- *
- * A typedef for a 32bit unsigned integer type. The size depends on the
- * configuration.
- */
- typedef unsigned XXX FT_UInt32;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Int64
- *
- * A typedef for a 64bit signed integer type. The size depends on the
- * configuration. Only defined if there is real 64bit support;
- * otherwise, it gets emulated with a structure (if necessary).
- */
- typedef signed XXX FT_Int64;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt64
- *
- * A typedef for a 64bit unsigned integer type. The size depends on the
- * configuration. Only defined if there is real 64bit support;
- * otherwise, it gets emulated with a structure (if necessary).
- */
- typedef unsigned XXX FT_UInt64;
-
- /* */
-
-#endif
-
-#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
-
- typedef signed int FT_Int32;
- typedef unsigned int FT_UInt32;
-
-#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
-
- typedef signed long FT_Int32;
- typedef unsigned long FT_UInt32;
-
-#else
-#error "no 32bit type found -- please check your configuration files"
-#endif
-
-
- /* look up an integer type that is at least 32~bits */
-#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
-
- typedef int FT_Fast;
- typedef unsigned int FT_UFast;
-
-#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
-
- typedef long FT_Fast;
- typedef unsigned long FT_UFast;
-
-#endif
-
-
- /* determine whether we have a 64-bit integer type */
-#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
-
-#define FT_INT64 long
-#define FT_UINT64 unsigned long
-
-#elif FT_SIZEOF_LONG_LONG >= ( 64 / FT_CHAR_BIT )
-
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
- /**************************************************************************
- *
- * A 64-bit data type may create compilation problems if you compile in
- * strict ANSI mode. To avoid them, we disable other 64-bit data types if
- * `__STDC__` is defined. You can however ignore this rule by defining the
- * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
- */
-#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-
- /* this compiler provides the `__int64` type */
-#define FT_INT64 __int64
-#define FT_UINT64 unsigned __int64
-
-#elif defined( __BORLANDC__ ) /* Borland C++ */
-
- /* XXXX: We should probably check the value of `__BORLANDC__` in order */
- /* to test the compiler version. */
-
- /* this compiler provides the `__int64` type */
-#define FT_INT64 __int64
-#define FT_UINT64 unsigned __int64
-
-#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */
-
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
-
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#elif defined( __GNUC__ )
-
- /* GCC provides the `long long` type */
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#endif /* !__STDC__ */
-
-#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-
-#ifdef FT_INT64
- typedef FT_INT64 FT_Int64;
- typedef FT_UINT64 FT_UInt64;
-#endif
-
-
-#endif /* FREETYPE_CONFIG_INTEGER_TYPES_H_ */
diff --git a/CopiumEngine/ext/include/freetype/config/mac-support.h b/CopiumEngine/ext/include/freetype/config/mac-support.h
deleted file mode 100644
index b77b96d..0000000
--- a/CopiumEngine/ext/include/freetype/config/mac-support.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
- *
- * config/mac-support.h
- *
- * Mac/OS X support configuration header.
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-#ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_
-#define FREETYPE_CONFIG_MAC_SUPPORT_H_
-
- /**************************************************************************
- *
- * Mac support
- *
- * This is the only necessary change, so it is defined here instead
- * providing a new configuration file.
- */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
- /* No Carbon frameworks for 64bit 10.4.x. */
- /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
- /* so guess the system version by maximum errno before inclusion. */
-#include
-#ifdef ECANCELED /* defined since 10.2 */
-#include "AvailabilityMacros.h"
-#endif
-#if defined( __LP64__ ) && \
- ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
-#undef FT_MACINTOSH
-#endif
-
-#elif defined( __SC__ ) || defined( __MRC__ )
- /* Classic MacOS compilers */
-#include "ConditionalMacros.h"
-#if TARGET_OS_MAC
-#define FT_MACINTOSH 1
-#endif
-
-#endif /* Mac support */
-
-#endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */
diff --git a/CopiumEngine/ext/include/freetype/config/public-macros.h b/CopiumEngine/ext/include/freetype/config/public-macros.h
deleted file mode 100644
index 23d0fa6..0000000
--- a/CopiumEngine/ext/include/freetype/config/public-macros.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
- *
- * config/public-macros.h
- *
- * Define a set of compiler macros used in public FreeType headers.
- *
- * Copyright (C) 2020-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
- /*
- * The definitions in this file are used by the public FreeType headers
- * and thus should be considered part of the public API.
- *
- * Other compiler-specific macro definitions that are not exposed by the
- * FreeType API should go into
- * `include/freetype/internal/compiler-macros.h` instead.
- */
-#ifndef FREETYPE_CONFIG_PUBLIC_MACROS_H_
-#define FREETYPE_CONFIG_PUBLIC_MACROS_H_
-
- /*
- * `FT_BEGIN_HEADER` and `FT_END_HEADER` might have already been defined
- * by `freetype/config/ftheader.h`, but we don't want to include this
- * header here, so redefine the macros here only when needed. Their
- * definition is very stable, so keeping them in sync with the ones in the
- * header should not be a maintenance issue.
- */
-#ifndef FT_BEGIN_HEADER
-#ifdef __cplusplus
-#define FT_BEGIN_HEADER extern "C" {
-#else
-#define FT_BEGIN_HEADER /* empty */
-#endif
-#endif /* FT_BEGIN_HEADER */
-
-#ifndef FT_END_HEADER
-#ifdef __cplusplus
-#define FT_END_HEADER }
-#else
-#define FT_END_HEADER /* empty */
-#endif
-#endif /* FT_END_HEADER */
-
-
-FT_BEGIN_HEADER
-
- /*
- * Mark a function declaration as public. This ensures it will be
- * properly exported to client code. Place this before a function
- * declaration.
- *
- * NOTE: This macro should be considered an internal implementation
- * detail, and not part of the FreeType API. It is only defined here
- * because it is needed by `FT_EXPORT`.
- */
-
- /* Visual C, mingw */
-#if defined( _WIN32 )
-
-#if defined( FT2_BUILD_LIBRARY ) && defined( DLL_EXPORT )
-#define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllexport )
-#elif defined( DLL_IMPORT )
-#define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllimport )
-#endif
-
- /* gcc, clang */
-#elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )
-#define FT_PUBLIC_FUNCTION_ATTRIBUTE \
- __attribute__(( visibility( "default" ) ))
-
- /* Sun */
-#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
-#define FT_PUBLIC_FUNCTION_ATTRIBUTE __global
-#endif
-
-
-#ifndef FT_PUBLIC_FUNCTION_ATTRIBUTE
-#define FT_PUBLIC_FUNCTION_ATTRIBUTE /* empty */
-#endif
-
-
- /*
- * Define a public FreeType API function. This ensures it is properly
- * exported or imported at build time. The macro parameter is the
- * function's return type as in:
- *
- * FT_EXPORT( FT_Bool )
- * FT_Object_Method( FT_Object obj,
- * ... );
- *
- * NOTE: This requires that all `FT_EXPORT` uses are inside
- * `FT_BEGIN_HEADER ... FT_END_HEADER` blocks. This guarantees that the
- * functions are exported with C linkage, even when the header is included
- * by a C++ source file.
- */
-#define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x
-
-
- /*
- * `FT_UNUSED` indicates that a given parameter is not used -- this is
- * only used to get rid of unpleasant compiler warnings.
- *
- * Technically, this was not meant to be part of the public API, but some
- * third-party code depends on it.
- */
-#ifndef FT_UNUSED
-#define FT_UNUSED( arg ) ( (arg) = (arg) )
-#endif
-
-
- /*
- * Support for casts in both C and C++.
- */
-#ifdef __cplusplus
-#define FT_STATIC_CAST( type, var ) static_cast(var)
-#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast(var)
-
-#define FT_STATIC_BYTE_CAST( type, var ) \
- static_cast( static_cast( var ) )
-#else
-#define FT_STATIC_CAST( type, var ) (type)(var)
-#define FT_REINTERPRET_CAST( type, var ) (type)(var)
-
-#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var)
-#endif
-
-
-FT_END_HEADER
-
-#endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
diff --git a/CopiumEngine/ext/include/freetype/freetype.h b/CopiumEngine/ext/include/freetype/freetype.h
deleted file mode 100644
index efff74f..0000000
--- a/CopiumEngine/ext/include/freetype/freetype.h
+++ /dev/null
@@ -1,5058 +0,0 @@
-/****************************************************************************
- *
- * freetype.h
- *
- * FreeType high-level API and common types (specification only).
- *
- * Copyright (C) 1996-2023 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
-#ifndef FREETYPE_H_
-#define FREETYPE_H_
-
-
-#include
-#include FT_CONFIG_CONFIG_H
-#include
-#include
-
-
-FT_BEGIN_HEADER
-
-
-
- /**************************************************************************
- *
- * @section:
- * preamble
- *
- * @title:
- * Preamble
- *
- * @abstract:
- * What FreeType is and isn't
- *
- * @description:
- * FreeType is a library that provides access to glyphs in font files. It
- * scales the glyph images and their metrics to a requested size, and it
- * rasterizes the glyph images to produce pixel or subpixel alpha coverage
- * bitmaps.
- *
- * Note that FreeType is _not_ a text layout engine. You have to use
- * higher-level libraries like HarfBuzz, Pango, or ICU for that.
- *
- * Note also that FreeType does _not_ perform alpha blending or
- * compositing the resulting bitmaps or pixmaps by itself. Use your
- * favourite graphics library (for example, Cairo or Skia) to further
- * process FreeType's output.
- *
- */
-
-
- /**************************************************************************
- *
- * @section:
- * header_inclusion
- *
- * @title:
- * FreeType's header inclusion scheme
- *
- * @abstract:
- * How client applications should include FreeType header files.
- *
- * @description:
- * To be as flexible as possible (and for historical reasons), you must
- * load file `ft2build.h` first before other header files, for example
- *
- * ```
- * #include
- *
- * #include
- * #include
- * ```
- */
-
-
- /**************************************************************************
- *
- * @section:
- * user_allocation
- *
- * @title:
- * User allocation
- *
- * @abstract:
- * How client applications should allocate FreeType data structures.
- *
- * @description:
- * FreeType assumes that structures allocated by the user and passed as
- * arguments are zeroed out except for the actual data. In other words,
- * it is recommended to use `calloc` (or variants of it) instead of
- * `malloc` for allocation.
- *
- */
-
-
-
- /*************************************************************************/
- /*************************************************************************/
- /* */
- /* B A S I C T Y P E S */
- /* */
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @section:
- * base_interface
- *
- * @title:
- * Base Interface
- *
- * @abstract:
- * The FreeType~2 base font interface.
- *
- * @description:
- * This section describes the most important public high-level API
- * functions of FreeType~2.
- *
- * @order:
- * FT_Library
- * FT_Face
- * FT_Size
- * FT_GlyphSlot
- * FT_CharMap
- * FT_Encoding
- * FT_ENC_TAG
- *
- * FT_FaceRec
- *
- * FT_FACE_FLAG_SCALABLE
- * FT_FACE_FLAG_FIXED_SIZES
- * FT_FACE_FLAG_FIXED_WIDTH
- * FT_FACE_FLAG_HORIZONTAL
- * FT_FACE_FLAG_VERTICAL
- * FT_FACE_FLAG_COLOR
- * FT_FACE_FLAG_SFNT
- * FT_FACE_FLAG_CID_KEYED
- * FT_FACE_FLAG_TRICKY
- * FT_FACE_FLAG_KERNING
- * FT_FACE_FLAG_MULTIPLE_MASTERS
- * FT_FACE_FLAG_VARIATION
- * FT_FACE_FLAG_GLYPH_NAMES
- * FT_FACE_FLAG_EXTERNAL_STREAM
- * FT_FACE_FLAG_HINTER
- * FT_FACE_FLAG_SVG
- * FT_FACE_FLAG_SBIX
- * FT_FACE_FLAG_SBIX_OVERLAY
- *
- * FT_HAS_HORIZONTAL
- * FT_HAS_VERTICAL
- * FT_HAS_KERNING
- * FT_HAS_FIXED_SIZES
- * FT_HAS_GLYPH_NAMES
- * FT_HAS_COLOR
- * FT_HAS_MULTIPLE_MASTERS
- * FT_HAS_SVG
- * FT_HAS_SBIX
- * FT_HAS_SBIX_OVERLAY
- *
- * FT_IS_SFNT
- * FT_IS_SCALABLE
- * FT_IS_FIXED_WIDTH
- * FT_IS_CID_KEYED
- * FT_IS_TRICKY
- * FT_IS_NAMED_INSTANCE
- * FT_IS_VARIATION
- *
- * FT_STYLE_FLAG_BOLD
- * FT_STYLE_FLAG_ITALIC
- *
- * FT_SizeRec
- * FT_Size_Metrics
- *
- * FT_GlyphSlotRec
- * FT_Glyph_Metrics
- * FT_SubGlyph
- *
- * FT_Bitmap_Size
- *
- * FT_Init_FreeType
- * FT_Done_FreeType
- *
- * FT_New_Face
- * FT_Done_Face
- * FT_Reference_Face
- * FT_New_Memory_Face
- * FT_Face_Properties
- * FT_Open_Face
- * FT_Open_Args
- * FT_Parameter
- * FT_Attach_File
- * FT_Attach_Stream
- *
- * FT_Set_Char_Size
- * FT_Set_Pixel_Sizes
- * FT_Request_Size
- * FT_Select_Size
- * FT_Size_Request_Type
- * FT_Size_RequestRec
- * FT_Size_Request
- * FT_Set_Transform
- * FT_Get_Transform
- * FT_Load_Glyph
- * FT_Get_Char_Index
- * FT_Get_First_Char
- * FT_Get_Next_Char
- * FT_Load_Char
- *
- * FT_OPEN_MEMORY
- * FT_OPEN_STREAM
- * FT_OPEN_PATHNAME
- * FT_OPEN_DRIVER
- * FT_OPEN_PARAMS
- *
- * FT_LOAD_DEFAULT
- * FT_LOAD_RENDER
- * FT_LOAD_MONOCHROME
- * FT_LOAD_LINEAR_DESIGN
- * FT_LOAD_NO_SCALE
- * FT_LOAD_NO_HINTING
- * FT_LOAD_NO_BITMAP
- * FT_LOAD_SBITS_ONLY
- * FT_LOAD_NO_AUTOHINT
- * FT_LOAD_COLOR
- *
- * FT_LOAD_VERTICAL_LAYOUT
- * FT_LOAD_IGNORE_TRANSFORM
- * FT_LOAD_FORCE_AUTOHINT
- * FT_LOAD_NO_RECURSE
- * FT_LOAD_PEDANTIC
- *
- * FT_LOAD_TARGET_NORMAL
- * FT_LOAD_TARGET_LIGHT
- * FT_LOAD_TARGET_MONO
- * FT_LOAD_TARGET_LCD
- * FT_LOAD_TARGET_LCD_V
- *
- * FT_LOAD_TARGET_MODE
- *
- * FT_Render_Glyph
- * FT_Render_Mode
- * FT_Get_Kerning
- * FT_Kerning_Mode
- * FT_Get_Track_Kerning
- *
- * FT_CharMapRec
- * FT_Select_Charmap
- * FT_Set_Charmap
- * FT_Get_Charmap_Index
- *
- * FT_Get_Name_Index
- * FT_Get_Glyph_Name
- * FT_Get_Postscript_Name
- * FT_Get_FSType_Flags
- * FT_Get_SubGlyph_Info
- *
- * FT_Face_Internal
- * FT_Size_Internal
- * FT_Slot_Internal
- *
- * FT_FACE_FLAG_XXX
- * FT_STYLE_FLAG_XXX
- * FT_OPEN_XXX
- * FT_LOAD_XXX
- * FT_LOAD_TARGET_XXX
- * FT_SUBGLYPH_FLAG_XXX
- * FT_FSTYPE_XXX
- *
- * FT_HAS_FAST_GLYPHS
- *
- */
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Glyph_Metrics
- *
- * @description:
- * A structure to model the metrics of a single glyph. The values are
- * expressed in 26.6 fractional pixel format; if the flag
- * @FT_LOAD_NO_SCALE has been used while loading the glyph, values are
- * expressed in font units instead.
- *
- * @fields:
- * width ::
- * The glyph's width.
- *
- * height ::
- * The glyph's height.
- *
- * horiBearingX ::
- * Left side bearing for horizontal layout.
- *
- * horiBearingY ::
- * Top side bearing for horizontal layout.
- *
- * horiAdvance ::
- * Advance width for horizontal layout.
- *
- * vertBearingX ::
- * Left side bearing for vertical layout.
- *
- * vertBearingY ::
- * Top side bearing for vertical layout. Larger positive values mean
- * further below the vertical glyph origin.
- *
- * vertAdvance ::
- * Advance height for vertical layout. Positive values mean the glyph
- * has a positive advance downward.
- *
- * @note:
- * If not disabled with @FT_LOAD_NO_HINTING, the values represent
- * dimensions of the hinted glyph (in case hinting is applicable).
- *
- * Stroking a glyph with an outside border does not increase
- * `horiAdvance` or `vertAdvance`; you have to manually adjust these
- * values to account for the added width and height.
- *
- * FreeType doesn't use the 'VORG' table data for CFF fonts because it
- * doesn't have an interface to quickly retrieve the glyph height. The
- * y~coordinate of the vertical origin can be simply computed as
- * `vertBearingY + height` after loading a glyph.
- */
- typedef struct FT_Glyph_Metrics_
- {
- FT_Pos width;
- FT_Pos height;
-
- FT_Pos horiBearingX;
- FT_Pos horiBearingY;
- FT_Pos horiAdvance;
-
- FT_Pos vertBearingX;
- FT_Pos vertBearingY;
- FT_Pos vertAdvance;
-
- } FT_Glyph_Metrics;
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Bitmap_Size
- *
- * @description:
- * This structure models the metrics of a bitmap strike (i.e., a set of
- * glyphs for a given point size and resolution) in a bitmap font. It is
- * used for the `available_sizes` field of @FT_Face.
- *
- * @fields:
- * height ::
- * The vertical distance, in pixels, between two consecutive baselines.
- * It is always positive.
- *
- * width ::
- * The average width, in pixels, of all glyphs in the strike.
- *
- * size ::
- * The nominal size of the strike in 26.6 fractional points. This
- * field is not very useful.
- *
- * x_ppem ::
- * The horizontal ppem (nominal width) in 26.6 fractional pixels.
- *
- * y_ppem ::
- * The vertical ppem (nominal height) in 26.6 fractional pixels.
- *
- * @note:
- * Windows FNT:
- * The nominal size given in a FNT font is not reliable. If the driver
- * finds it incorrect, it sets `size` to some calculated values, and
- * `x_ppem` and `y_ppem` to the pixel width and height given in the
- * font, respectively.
- *
- * TrueType embedded bitmaps:
- * `size`, `width`, and `height` values are not contained in the bitmap
- * strike itself. They are computed from the global font parameters.
- */
- typedef struct FT_Bitmap_Size_
- {
- FT_Short height;
- FT_Short width;
-
- FT_Pos size;
-
- FT_Pos x_ppem;
- FT_Pos y_ppem;
-
- } FT_Bitmap_Size;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /* */
- /* O B J E C T C L A S S E S */
- /* */
- /*************************************************************************/
- /*************************************************************************/
-
- /**************************************************************************
- *
- * @type:
- * FT_Library
- *
- * @description:
- * A handle to a FreeType library instance. Each 'library' is completely
- * independent from the others; it is the 'root' of a set of objects like
- * fonts, faces, sizes, etc.
- *
- * It also embeds a memory manager (see @FT_Memory), as well as a
- * scan-line converter object (see @FT_Raster).
- *
- * [Since 2.5.6] In multi-threaded applications it is easiest to use one
- * `FT_Library` object per thread. In case this is too cumbersome, a
- * single `FT_Library` object across threads is possible also, as long as
- * a mutex lock is used around @FT_New_Face and @FT_Done_Face.
- *
- * @note:
- * Library objects are normally created by @FT_Init_FreeType, and
- * destroyed with @FT_Done_FreeType. If you need reference-counting
- * (cf. @FT_Reference_Library), use @FT_New_Library and @FT_Done_Library.
- */
- typedef struct FT_LibraryRec_ *FT_Library;
-
-
- /**************************************************************************
- *
- * @section:
- * module_management
- *
- */
-
- /**************************************************************************
- *
- * @type:
- * FT_Module
- *
- * @description:
- * A handle to a given FreeType module object. A module can be a font
- * driver, a renderer, or anything else that provides services to the
- * former.
- */
- typedef struct FT_ModuleRec_* FT_Module;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Driver
- *
- * @description:
- * A handle to a given FreeType font driver object. A font driver is a
- * module capable of creating faces from font files.
- */
- typedef struct FT_DriverRec_* FT_Driver;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Renderer
- *
- * @description:
- * A handle to a given FreeType renderer. A renderer is a module in
- * charge of converting a glyph's outline image to a bitmap. It supports
- * a single glyph image format, and one or more target surface depths.
- */
- typedef struct FT_RendererRec_* FT_Renderer;
-
-
- /**************************************************************************
- *
- * @section:
- * base_interface
- *
- */
-
- /**************************************************************************
- *
- * @type:
- * FT_Face
- *
- * @description:
- * A handle to a typographic face object. A face object models a given
- * typeface, in a given style.
- *
- * @note:
- * A face object also owns a single @FT_GlyphSlot object, as well as one
- * or more @FT_Size objects.
- *
- * Use @FT_New_Face or @FT_Open_Face to create a new face object from a
- * given filepath or a custom input stream.
- *
- * Use @FT_Done_Face to destroy it (along with its slot and sizes).
- *
- * An `FT_Face` object can only be safely used from one thread at a time.
- * Similarly, creation and destruction of `FT_Face` with the same
- * @FT_Library object can only be done from one thread at a time. On the
- * other hand, functions like @FT_Load_Glyph and its siblings are
- * thread-safe and do not need the lock to be held as long as the same
- * `FT_Face` object is not used from multiple threads at the same time.
- *
- * @also:
- * See @FT_FaceRec for the publicly accessible fields of a given face
- * object.
- */
- typedef struct FT_FaceRec_* FT_Face;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Size
- *
- * @description:
- * A handle to an object that models a face scaled to a given character
- * size.
- *
- * @note:
- * An @FT_Face has one _active_ `FT_Size` object that is used by
- * functions like @FT_Load_Glyph to determine the scaling transformation
- * that in turn is used to load and hint glyphs and metrics.
- *
- * A newly created `FT_Size` object contains only meaningless zero values.
- * You must use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size
- * or even @FT_Select_Size to change the content (i.e., the scaling
- * values) of the active `FT_Size`. Otherwise, the scaling and hinting
- * will not be performed.
- *
- * You can use @FT_New_Size to create additional size objects for a given
- * @FT_Face, but they won't be used by other functions until you activate
- * it through @FT_Activate_Size. Only one size can be activated at any
- * given time per face.
- *
- * @also:
- * See @FT_SizeRec for the publicly accessible fields of a given size
- * object.
- */
- typedef struct FT_SizeRec_* FT_Size;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_GlyphSlot
- *
- * @description:
- * A handle to a given 'glyph slot'. A slot is a container that can hold
- * any of the glyphs contained in its parent face.
- *
- * In other words, each time you call @FT_Load_Glyph or @FT_Load_Char,
- * the slot's content is erased by the new glyph data, i.e., the glyph's
- * metrics, its image (bitmap or outline), and other control information.
- *
- * @also:
- * See @FT_GlyphSlotRec for the publicly accessible glyph fields.
- */
- typedef struct FT_GlyphSlotRec_* FT_GlyphSlot;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_CharMap
- *
- * @description:
- * A handle to a character map (usually abbreviated to 'charmap'). A
- * charmap is used to translate character codes in a given encoding into
- * glyph indexes for its parent's face. Some font formats may provide
- * several charmaps per font.
- *
- * Each face object owns zero or more charmaps, but only one of them can
- * be 'active', providing the data used by @FT_Get_Char_Index or
- * @FT_Load_Char.
- *
- * The list of available charmaps in a face is available through the
- * `face->num_charmaps` and `face->charmaps` fields of @FT_FaceRec.
- *
- * The currently active charmap is available as `face->charmap`. You
- * should call @FT_Set_Charmap to change it.
- *
- * @note:
- * When a new face is created (either through @FT_New_Face or
- * @FT_Open_Face), the library looks for a Unicode charmap within the
- * list and automatically activates it. If there is no Unicode charmap,
- * FreeType doesn't set an 'active' charmap.
- *
- * @also:
- * See @FT_CharMapRec for the publicly accessible fields of a given
- * character map.
- */
- typedef struct FT_CharMapRec_* FT_CharMap;
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_ENC_TAG
- *
- * @description:
- * This macro converts four-letter tags into an unsigned long. It is
- * used to define 'encoding' identifiers (see @FT_Encoding).
- *
- * @note:
- * Since many 16-bit compilers don't like 32-bit enumerations, you should
- * redefine this macro in case of problems to something like this:
- *
- * ```
- * #define FT_ENC_TAG( value, a, b, c, d ) value
- * ```
- *
- * to get a simple enumeration without assigning special numbers.
- */
-
-#ifndef FT_ENC_TAG
-
-#define FT_ENC_TAG( value, a, b, c, d ) \
- value = ( ( FT_STATIC_BYTE_CAST( FT_UInt32, a ) << 24 ) | \
- ( FT_STATIC_BYTE_CAST( FT_UInt32, b ) << 16 ) | \
- ( FT_STATIC_BYTE_CAST( FT_UInt32, c ) << 8 ) | \
- FT_STATIC_BYTE_CAST( FT_UInt32, d ) )
-
-#endif /* FT_ENC_TAG */
-
-
- /**************************************************************************
- *
- * @enum:
- * FT_Encoding
- *
- * @description:
- * An enumeration to specify character sets supported by charmaps. Used
- * in the @FT_Select_Charmap API function.
- *
- * @note:
- * Despite the name, this enumeration lists specific character
- * repertoires (i.e., charsets), and not text encoding methods (e.g.,
- * UTF-8, UTF-16, etc.).
- *
- * Other encodings might be defined in the future.
- *
- * @values:
- * FT_ENCODING_NONE ::
- * The encoding value~0 is reserved for all formats except BDF, PCF,
- * and Windows FNT; see below for more information.
- *
- * FT_ENCODING_UNICODE ::
- * The Unicode character set. This value covers all versions of the
- * Unicode repertoire, including ASCII and Latin-1. Most fonts include
- * a Unicode charmap, but not all of them.
- *
- * For example, if you want to access Unicode value U+1F028 (and the
- * font contains it), use value 0x1F028 as the input value for
- * @FT_Get_Char_Index.
- *
- * FT_ENCODING_MS_SYMBOL ::
- * Microsoft Symbol encoding, used to encode mathematical symbols and
- * wingdings. For more information, see
- * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',
- * 'http://www.kostis.net/charsets/symbol.htm', and
- * 'http://www.kostis.net/charsets/wingding.htm'.
- *
- * This encoding uses character codes from the PUA (Private Unicode
- * Area) in the range U+F020-U+F0FF.
- *
- * FT_ENCODING_SJIS ::
- * Shift JIS encoding for Japanese. More info at
- * 'https://en.wikipedia.org/wiki/Shift_JIS'. See note on multi-byte
- * encodings below.
- *
- * FT_ENCODING_PRC ::
- * Corresponds to encoding systems mainly for Simplified Chinese as
- * used in People's Republic of China (PRC). The encoding layout is
- * based on GB~2312 and its supersets GBK and GB~18030.
- *
- * FT_ENCODING_BIG5 ::
- * Corresponds to an encoding system for Traditional Chinese as used in
- * Taiwan and Hong Kong.
- *
- * FT_ENCODING_WANSUNG ::
- * Corresponds to the Korean encoding system known as Extended Wansung
- * (MS Windows code page 949). For more information see
- * 'https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'.
- *
- * FT_ENCODING_JOHAB ::
- * The Korean standard character set (KS~C 5601-1992), which
- * corresponds to MS Windows code page 1361. This character set
- * includes all possible Hangul character combinations.
- *
- * FT_ENCODING_ADOBE_LATIN_1 ::
- * Corresponds to a Latin-1 encoding as defined in a Type~1 PostScript
- * font. It is limited to 256 character codes.
- *
- * FT_ENCODING_ADOBE_STANDARD ::
- * Adobe Standard encoding, as found in Type~1, CFF, and OpenType/CFF
- * fonts. It is limited to 256 character codes.
- *
- * FT_ENCODING_ADOBE_EXPERT ::
- * Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF
- * fonts. It is limited to 256 character codes.
- *
- * FT_ENCODING_ADOBE_CUSTOM ::
- * Corresponds to a custom encoding, as found in Type~1, CFF, and
- * OpenType/CFF fonts. It is limited to 256 character codes.
- *
- * FT_ENCODING_APPLE_ROMAN ::
- * Apple roman encoding. Many TrueType and OpenType fonts contain a
- * charmap for this 8-bit encoding, since older versions of Mac OS are
- * able to use it.
- *
- * FT_ENCODING_OLD_LATIN_2 ::
- * This value is deprecated and was neither used nor reported by
- * FreeType. Don't use or test for it.
- *
- * FT_ENCODING_MS_SJIS ::
- * Same as FT_ENCODING_SJIS. Deprecated.
- *
- * FT_ENCODING_MS_GB2312 ::
- * Same as FT_ENCODING_PRC. Deprecated.
- *
- * FT_ENCODING_MS_BIG5 ::
- * Same as FT_ENCODING_BIG5. Deprecated.
- *
- * FT_ENCODING_MS_WANSUNG ::
- * Same as FT_ENCODING_WANSUNG. Deprecated.
- *
- * FT_ENCODING_MS_JOHAB ::
- * Same as FT_ENCODING_JOHAB. Deprecated.
- *
- * @note:
- * When loading a font, FreeType makes a Unicode charmap active if
- * possible (either if the font provides such a charmap, or if FreeType
- * can synthesize one from PostScript glyph name dictionaries; in either
- * case, the charmap is tagged with `FT_ENCODING_UNICODE`). If such a
- * charmap is synthesized, it is placed at the first position of the
- * charmap array.
- *
- * All other encodings are considered legacy and tagged only if
- * explicitly defined in the font file. Otherwise, `FT_ENCODING_NONE` is
- * used.
- *
- * `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is
- * neither Unicode nor ISO-8859-1 (otherwise it is set to
- * `FT_ENCODING_UNICODE`). Use @FT_Get_BDF_Charset_ID to find out which
- * encoding is really present. If, for example, the `cs_registry` field
- * is 'KOI8' and the `cs_encoding` field is 'R', the font is encoded in
- * KOI8-R.
- *
- * `FT_ENCODING_NONE` is always set (with a single exception) by the
- * winfonts driver. Use @FT_Get_WinFNT_Header and examine the `charset`
- * field of the @FT_WinFNT_HeaderRec structure to find out which encoding
- * is really present. For example, @FT_WinFNT_ID_CP1251 (204) means
- * Windows code page 1251 (for Russian).
- *
- * `FT_ENCODING_NONE` is set if `platform_id` is @TT_PLATFORM_MACINTOSH
- * and `encoding_id` is not `TT_MAC_ID_ROMAN` (otherwise it is set to
- * `FT_ENCODING_APPLE_ROMAN`).
- *
- * If `platform_id` is @TT_PLATFORM_MACINTOSH, use the function
- * @FT_Get_CMap_Language_ID to query the Mac language ID that may be
- * needed to be able to distinguish Apple encoding variants. See
- *
- * https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt
- *
- * to get an idea how to do that. Basically, if the language ID is~0,
- * don't use it, otherwise subtract 1 from the language ID. Then examine
- * `encoding_id`. If, for example, `encoding_id` is `TT_MAC_ID_ROMAN`
- * and the language ID (minus~1) is `TT_MAC_LANGID_GREEK`, it is the
- * Greek encoding, not Roman. `TT_MAC_ID_ARABIC` with
- * `TT_MAC_LANGID_FARSI` means the Farsi variant of the Arabic encoding.
- */
- typedef enum FT_Encoding_
- {
- FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
-
- FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
- FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
-
- FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
- FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ),
- FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
- FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
- FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
-
- /* for backward compatibility */
- FT_ENCODING_GB2312 = FT_ENCODING_PRC,
- FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
- FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
- FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
- FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
- FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
-
- FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
- FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
- FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
- FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
-
- FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
-
- FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
-
- } FT_Encoding;
-
-
- /* these constants are deprecated; use the corresponding `FT_Encoding` */
- /* values instead */
-#define ft_encoding_none FT_ENCODING_NONE
-#define ft_encoding_unicode FT_ENCODING_UNICODE
-#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
-#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
-#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
-#define ft_encoding_sjis FT_ENCODING_SJIS
-#define ft_encoding_gb2312 FT_ENCODING_PRC
-#define ft_encoding_big5 FT_ENCODING_BIG5
-#define ft_encoding_wansung FT_ENCODING_WANSUNG
-#define ft_encoding_johab FT_ENCODING_JOHAB
-
-#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
-#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
-#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
-#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_CharMapRec
- *
- * @description:
- * The base charmap structure.
- *
- * @fields:
- * face ::
- * A handle to the parent face object.
- *
- * encoding ::
- * An @FT_Encoding tag identifying the charmap. Use this with
- * @FT_Select_Charmap.
- *
- * platform_id ::
- * An ID number describing the platform for the following encoding ID.
- * This comes directly from the TrueType specification and gets
- * emulated for other formats.
- *
- * encoding_id ::
- * A platform-specific encoding number. This also comes from the
- * TrueType specification and gets emulated similarly.
- */
- typedef struct FT_CharMapRec_
- {
- FT_Face face;
- FT_Encoding encoding;
- FT_UShort platform_id;
- FT_UShort encoding_id;
-
- } FT_CharMapRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /* */
- /* B A S E O B J E C T C L A S S E S */
- /* */
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Face_Internal
- *
- * @description:
- * An opaque handle to an `FT_Face_InternalRec` structure that models the
- * private data of a given @FT_Face object.
- *
- * This structure might change between releases of FreeType~2 and is not
- * generally available to client applications.
- */
- typedef struct FT_Face_InternalRec_* FT_Face_Internal;
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_FaceRec
- *
- * @description:
- * FreeType root face class structure. A face object models a typeface
- * in a font file.
- *
- * @fields:
- * num_faces ::
- * The number of faces in the font file. Some font formats can have
- * multiple faces in a single font file.
- *
- * face_index ::
- * This field holds two different values. Bits 0-15 are the index of
- * the face in the font file (starting with value~0). They are set
- * to~0 if there is only one face in the font file.
- *
- * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation
- * fonts only, holding the named instance index for the current face
- * index (starting with value~1; value~0 indicates font access without
- * a named instance). For non-variation fonts, bits 16-30 are ignored.
- * If we have the third named instance of face~4, say, `face_index` is
- * set to 0x00030004.
- *
- * Bit 31 is always zero (this is, `face_index` is always a positive
- * value).
- *
- * [Since 2.9] Changing the design coordinates with
- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
- * not influence the named instance index value (only
- * @FT_Set_Named_Instance does that).
- *
- * face_flags ::
- * A set of bit flags that give important information about the face;
- * see @FT_FACE_FLAG_XXX for the details.
- *
- * style_flags ::
- * The lower 16~bits contain a set of bit flags indicating the style of
- * the face; see @FT_STYLE_FLAG_XXX for the details.
- *
- * [Since 2.6.1] Bits 16-30 hold the number of named instances
- * available for the current face if we have a GX or OpenType variation
- * (sub)font. Bit 31 is always zero (this is, `style_flags` is always
- * a positive value). Note that a variation font has always at least
- * one named instance, namely the default instance.
- *
- * num_glyphs ::
- * The number of glyphs in the face. If the face is scalable and has
- * sbits (see `num_fixed_sizes`), it is set to the number of outline
- * glyphs.
- *
- * For CID-keyed fonts (not in an SFNT wrapper) this value gives the
- * highest CID used in the font.
- *
- * family_name ::
- * The face's family name. This is an ASCII string, usually in
- * English, that describes the typeface's family (like 'Times New
- * Roman', 'Bodoni', 'Garamond', etc). This is a least common
- * denominator used to list fonts. Some formats (TrueType & OpenType)
- * provide localized and Unicode versions of this string. Applications
- * should use the format-specific interface to access them. Can be
- * `NULL` (e.g., in fonts embedded in a PDF file).
- *
- * In case the font doesn't provide a specific family name entry,
- * FreeType tries to synthesize one, deriving it from other name
- * entries.
- *
- * style_name ::
- * The face's style name. This is an ASCII string, usually in English,
- * that describes the typeface's style (like 'Italic', 'Bold',
- * 'Condensed', etc). Not all font formats provide a style name, so
- * this field is optional, and can be set to `NULL`. As for
- * `family_name`, some formats provide localized and Unicode versions
- * of this string. Applications should use the format-specific
- * interface to access them.
- *
- * num_fixed_sizes ::
- * The number of bitmap strikes in the face. Even if the face is
- * scalable, there might still be bitmap strikes, which are called
- * 'sbits' in that case.
- *
- * available_sizes ::
- * An array of @FT_Bitmap_Size for all bitmap strikes in the face. It
- * is set to `NULL` if there is no bitmap strike.
- *
- * Note that FreeType tries to sanitize the strike data since they are
- * sometimes sloppy or incorrect, but this can easily fail.
- *
- * num_charmaps ::
- * The number of charmaps in the face.
- *
- * charmaps ::
- * An array of the charmaps of the face.
- *
- * generic ::
- * A field reserved for client uses. See the @FT_Generic type
- * description.
- *
- * bbox ::
- * The font bounding box. Coordinates are expressed in font units (see
- * `units_per_EM`). The box is large enough to contain any glyph from
- * the font. Thus, `bbox.yMax` can be seen as the 'maximum ascender',
- * and `bbox.yMin` as the 'minimum descender'. Only relevant for
- * scalable formats.
- *
- * Note that the bounding box might be off by (at least) one pixel for
- * hinted fonts. See @FT_Size_Metrics for further discussion.
- *
- * Note that the bounding box does not vary in OpenType variable fonts
- * and should only be used in relation to the default instance.
- *
- * units_per_EM ::
- * The number of font units per EM square for this face. This is
- * typically 2048 for TrueType fonts, and 1000 for Type~1 fonts. Only
- * relevant for scalable formats.
- *
- * ascender ::
- * The typographic ascender of the face, expressed in font units. For
- * font formats not having this information, it is set to `bbox.yMax`.
- * Only relevant for scalable formats.
- *
- * descender ::
- * The typographic descender of the face, expressed in font units. For
- * font formats not having this information, it is set to `bbox.yMin`.
- * Note that this field is negative for values below the baseline.
- * Only relevant for scalable formats.
- *
- * height ::
- * This value is the vertical distance between two consecutive
- * baselines, expressed in font units. It is always positive. Only
- * relevant for scalable formats.
- *
- * If you want the global glyph height, use `ascender - descender`.
- *
- * max_advance_width ::
- * The maximum advance width, in font units, for all glyphs in this
- * face. This can be used to make word wrapping computations faster.
- * Only relevant for scalable formats.
- *
- * max_advance_height ::
- * The maximum advance height, in font units, for all glyphs in this
- * face. This is only relevant for vertical layouts, and is set to
- * `height` for fonts that do not provide vertical metrics. Only
- * relevant for scalable formats.
- *
- * underline_position ::
- * The position, in font units, of the underline line for this face.
- * It is the center of the underlining stem. Only relevant for
- * scalable formats.
- *
- * underline_thickness ::
- * The thickness, in font units, of the underline for this face. Only
- * relevant for scalable formats.
- *
- * glyph ::
- * The face's associated glyph slot(s).
- *
- * size ::
- * The current active size for this face.
- *
- * charmap ::
- * The current active charmap for this face.
- *
- * @note:
- * Fields may be changed after a call to @FT_Attach_File or
- * @FT_Attach_Stream.
- *
- * For an OpenType variation font, the values of the following fields can
- * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
- * the font contains an 'MVAR' table: `ascender`, `descender`, `height`,
- * `underline_position`, and `underline_thickness`.
- *
- * Especially for TrueType fonts see also the documentation for
- * @FT_Size_Metrics.
- */
- typedef struct FT_FaceRec_
- {
- FT_Long num_faces;
- FT_Long face_index;
-
- FT_Long face_flags;
- FT_Long style_flags;
-
- FT_Long num_glyphs;
-
- FT_String* family_name;
- FT_String* style_name;
-
- FT_Int num_fixed_sizes;
- FT_Bitmap_Size* available_sizes;
-
- FT_Int num_charmaps;
- FT_CharMap* charmaps;
-
- FT_Generic generic;
-
- /*# The following member variables (down to `underline_thickness`) */
- /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */
- /*# for bitmap fonts. */
- FT_BBox bbox;
-
- FT_UShort units_per_EM;
- FT_Short ascender;
- FT_Short descender;
- FT_Short height;
-
- FT_Short max_advance_width;
- FT_Short max_advance_height;
-
- FT_Short underline_position;
- FT_Short underline_thickness;
-
- FT_GlyphSlot glyph;
- FT_Size size;
- FT_CharMap charmap;
-
- /*@private begin */
-
- FT_Driver driver;
- FT_Memory memory;
- FT_Stream stream;
-
- FT_ListRec sizes_list;
-
- FT_Generic autohint; /* face-specific auto-hinter data */
- void* extensions; /* unused */
-
- FT_Face_Internal internal;
-
- /*@private end */
-
- } FT_FaceRec;
-
-
- /**************************************************************************
- *
- * @enum:
- * FT_FACE_FLAG_XXX
- *
- * @description:
- * A list of bit flags used in the `face_flags` field of the @FT_FaceRec
- * structure. They inform client applications of properties of the
- * corresponding face.
- *
- * @values:
- * FT_FACE_FLAG_SCALABLE ::
- * The face contains outline glyphs. Note that a face can contain
- * bitmap strikes also, i.e., a face can have both this flag and
- * @FT_FACE_FLAG_FIXED_SIZES set.
- *
- * FT_FACE_FLAG_FIXED_SIZES ::
- * The face contains bitmap strikes. See also the `num_fixed_sizes`
- * and `available_sizes` fields of @FT_FaceRec.
- *
- * FT_FACE_FLAG_FIXED_WIDTH ::
- * The face contains fixed-width characters (like Courier, Lucida,
- * MonoType, etc.).
- *
- * FT_FACE_FLAG_SFNT ::
- * The face uses the SFNT storage scheme. For now, this means TrueType
- * and OpenType.
- *
- * FT_FACE_FLAG_HORIZONTAL ::
- * The face contains horizontal glyph metrics. This should be set for
- * all common formats.
- *
- * FT_FACE_FLAG_VERTICAL ::
- * The face contains vertical glyph metrics. This is only available in
- * some formats, not all of them.
- *
- * FT_FACE_FLAG_KERNING ::
- * The face contains kerning information. If set, the kerning distance
- * can be retrieved using the function @FT_Get_Kerning. Otherwise the
- * function always returns the vector (0,0). Note that FreeType
- * doesn't handle kerning data from the SFNT 'GPOS' table (as present
- * in many OpenType fonts).
- *
- * FT_FACE_FLAG_FAST_GLYPHS ::
- * THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.
- *
- * FT_FACE_FLAG_MULTIPLE_MASTERS ::
- * The face contains multiple masters and is capable of interpolating
- * between them. Supported formats are Adobe MM, TrueType GX, and
- * OpenType variation fonts.
- *
- * See section @multiple_masters for API details.
- *
- * FT_FACE_FLAG_GLYPH_NAMES ::
- * The face contains glyph names, which can be retrieved using
- * @FT_Get_Glyph_Name. Note that some TrueType fonts contain broken
- * glyph name tables. Use the function @FT_Has_PS_Glyph_Names when
- * needed.
- *
- * FT_FACE_FLAG_EXTERNAL_STREAM ::
- * Used internally by FreeType to indicate that a face's stream was
- * provided by the client application and should not be destroyed when
- * @FT_Done_Face is called. Don't read or test this flag.
- *
- * FT_FACE_FLAG_HINTER ::
- * The font driver has a hinting machine of its own. For example, with
- * TrueType fonts, it makes sense to use data from the SFNT 'gasp'
- * table only if the native TrueType hinting engine (with the bytecode
- * interpreter) is available and active.
- *
- * FT_FACE_FLAG_CID_KEYED ::
- * The face is CID-keyed. In that case, the face is not accessed by
- * glyph indices but by CID values. For subsetted CID-keyed fonts this
- * has the consequence that not all index values are a valid argument
- * to @FT_Load_Glyph. Only the CID values for which corresponding
- * glyphs in the subsetted font exist make `FT_Load_Glyph` return
- * successfully; in all other cases you get an
- * `FT_Err_Invalid_Argument` error.
- *
- * Note that CID-keyed fonts that are in an SFNT wrapper (this is, all
- * OpenType/CFF fonts) don't have this flag set since the glyphs are
- * accessed in the normal way (using contiguous indices); the
- * 'CID-ness' isn't visible to the application.
- *
- * FT_FACE_FLAG_TRICKY ::
- * The face is 'tricky', this is, it always needs the font format's
- * native hinting engine to get a reasonable result. A typical example
- * is the old Chinese font `mingli.ttf` (but not `mingliu.ttc`) that
- * uses TrueType bytecode instructions to move and scale all of its
- * subglyphs.
- *
- * It is not possible to auto-hint such fonts using
- * @FT_LOAD_FORCE_AUTOHINT; it will also ignore @FT_LOAD_NO_HINTING.
- * You have to set both @FT_LOAD_NO_HINTING and @FT_LOAD_NO_AUTOHINT to
- * really disable hinting; however, you probably never want this except
- * for demonstration purposes.
- *
- * Currently, there are about a dozen TrueType fonts in the list of
- * tricky fonts; they are hard-coded in file `ttobjs.c`.
- *
- * FT_FACE_FLAG_COLOR ::
- * [Since 2.5.1] The face has color glyph tables. See @FT_LOAD_COLOR
- * for more information.
- *
- * FT_FACE_FLAG_VARIATION ::
- * [Since 2.9] Set if the current face (or named instance) has been
- * altered with @FT_Set_MM_Design_Coordinates,
- * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates.
- * This flag is unset by a call to @FT_Set_Named_Instance.
- *
- * FT_FACE_FLAG_SVG ::
- * [Since 2.12] The face has an 'SVG~' OpenType table.
- *
- * FT_FACE_FLAG_SBIX ::
- * [Since 2.12] The face has an 'sbix' OpenType table *and* outlines.
- * For such fonts, @FT_FACE_FLAG_SCALABLE is not set by default to
- * retain backward compatibility.
- *
- * FT_FACE_FLAG_SBIX_OVERLAY ::
- * [Since 2.12] The face has an 'sbix' OpenType table where outlines
- * should be drawn on top of bitmap strikes.
- *
- */
-#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
-#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
-#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
-#define FT_FACE_FLAG_SFNT ( 1L << 3 )
-#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 )
-#define FT_FACE_FLAG_VERTICAL ( 1L << 5 )
-#define FT_FACE_FLAG_KERNING ( 1L << 6 )
-#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 )
-#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 )
-#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 )
-#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 )
-#define FT_FACE_FLAG_HINTER ( 1L << 11 )
-#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
-#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
-#define FT_FACE_FLAG_COLOR ( 1L << 14 )
-#define FT_FACE_FLAG_VARIATION ( 1L << 15 )
-#define FT_FACE_FLAG_SVG ( 1L << 16 )
-#define FT_FACE_FLAG_SBIX ( 1L << 17 )
-#define FT_FACE_FLAG_SBIX_OVERLAY ( 1L << 18 )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_HORIZONTAL
- *
- * @description:
- * A macro that returns true whenever a face object contains horizontal
- * metrics (this is true for all font formats though).
- *
- * @also:
- * @FT_HAS_VERTICAL can be used to check for vertical metrics.
- *
- */
-#define FT_HAS_HORIZONTAL( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_VERTICAL
- *
- * @description:
- * A macro that returns true whenever a face object contains real
- * vertical metrics (and not only synthesized ones).
- *
- */
-#define FT_HAS_VERTICAL( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_KERNING
- *
- * @description:
- * A macro that returns true whenever a face object contains kerning data
- * that can be accessed with @FT_Get_Kerning.
- *
- */
-#define FT_HAS_KERNING( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_SCALABLE
- *
- * @description:
- * A macro that returns true whenever a face object contains a scalable
- * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, and
- * PFR font formats).
- *
- */
-#define FT_IS_SCALABLE( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_SFNT
- *
- * @description:
- * A macro that returns true whenever a face object contains a font whose
- * format is based on the SFNT storage scheme. This usually means:
- * TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap
- * fonts.
- *
- * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
- * @FT_TRUETYPE_TABLES_H are available.
- *
- */
-#define FT_IS_SFNT( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_FIXED_WIDTH
- *
- * @description:
- * A macro that returns true whenever a face object contains a font face
- * that contains fixed-width (or 'monospace', 'fixed-pitch', etc.)
- * glyphs.
- *
- */
-#define FT_IS_FIXED_WIDTH( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_FIXED_SIZES
- *
- * @description:
- * A macro that returns true whenever a face object contains some
- * embedded bitmaps. See the `available_sizes` field of the @FT_FaceRec
- * structure.
- *
- */
-#define FT_HAS_FIXED_SIZES( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_FAST_GLYPHS
- *
- * @description:
- * Deprecated.
- *
- */
-#define FT_HAS_FAST_GLYPHS( face ) 0
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_GLYPH_NAMES
- *
- * @description:
- * A macro that returns true whenever a face object contains some glyph
- * names that can be accessed through @FT_Get_Glyph_Name.
- *
- */
-#define FT_HAS_GLYPH_NAMES( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_MULTIPLE_MASTERS
- *
- * @description:
- * A macro that returns true whenever a face object contains some
- * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H
- * are then available to choose the exact design you want.
- *
- */
-#define FT_HAS_MULTIPLE_MASTERS( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_NAMED_INSTANCE
- *
- * @description:
- * A macro that returns true whenever a face object is a named instance
- * of a GX or OpenType variation font.
- *
- * [Since 2.9] Changing the design coordinates with
- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
- * not influence the return value of this macro (only
- * @FT_Set_Named_Instance does that).
- *
- * @since:
- * 2.7
- *
- */
-#define FT_IS_NAMED_INSTANCE( face ) \
- ( !!( (face)->face_index & 0x7FFF0000L ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_VARIATION
- *
- * @description:
- * A macro that returns true whenever a face object has been altered by
- * @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
- * @FT_Set_Var_Blend_Coordinates.
- *
- * @since:
- * 2.9
- *
- */
-#define FT_IS_VARIATION( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_CID_KEYED
- *
- * @description:
- * A macro that returns true whenever a face object contains a CID-keyed
- * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more details.
- *
- * If this macro is true, all functions defined in @FT_CID_H are
- * available.
- *
- */
-#define FT_IS_CID_KEYED( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_IS_TRICKY
- *
- * @description:
- * A macro that returns true whenever a face represents a 'tricky' font.
- * See the discussion of @FT_FACE_FLAG_TRICKY for more details.
- *
- */
-#define FT_IS_TRICKY( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_COLOR
- *
- * @description:
- * A macro that returns true whenever a face object contains tables for
- * color glyphs.
- *
- * @since:
- * 2.5.1
- *
- */
-#define FT_HAS_COLOR( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_SVG
- *
- * @description:
- * A macro that returns true whenever a face object contains an 'SVG~'
- * OpenType table.
- *
- * @since:
- * 2.12
- */
-#define FT_HAS_SVG( face ) \
- ( !!( (face)->face_flags & FT_FACE_FLAG_SVG ) )
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_HAS_SBIX
- *
- * @description:
- * A macro that returns true whenever a face object contains an 'sbix'
- * OpenType table *and* outline glyphs.
- *
- * Currently, FreeType only supports bitmap glyphs in PNG format for this
- * table (i.e., JPEG and TIFF formats are unsupported, as are
- * Apple-specific formats not part of the OpenType specification).
- *
- * @note:
- * For backward compatibility, a font with an 'sbix' table is treated as
- * a bitmap-only face. Using @FT_Open_Face with
- * @FT_PARAM_TAG_IGNORE_SBIX, an application can switch off 'sbix'
- * handling so that the face is treated as an ordinary outline font with
- * scalable outlines.
- *
- * Here is some pseudo code that roughly illustrates how to implement
- * 'sbix' handling according to the OpenType specification.
- *
- * ```
- * if ( FT_HAS_SBIX( face ) )
- * {
- * // open font as a scalable one without sbix handling
- * FT_Face face2;
- * FT_Parameter param = { FT_PARAM_TAG_IGNORE_SBIX, NULL };
- * FT_Open_Args args = { FT_OPEN_PARAMS | ...,
- * ...,
- * 1, ¶m };
- *
- *
- * FT_Open_Face( library, &args, 0, &face2 );
- *
- * available_size` as necessary into
- * `preferred_sizes`[*]>
- *
- * for ( i = 0; i < face->num_fixed_sizes; i++ )
- * {
- * size = preferred_sizes[i].size;
- *
- * error = FT_Set_Pixel_Sizes( face, size, size );
- *
- *
- * // check whether we have a glyph in a bitmap strike
- * error = FT_Load_Glyph( face,
- * glyph_index,
- * FT_LOAD_SBITS_ONLY |
- * FT_LOAD_BITMAP_METRICS_ONLY );
- * if ( error == FT_Err_Invalid_Argument )
- * continue;
- * else if ( error )
- *
- * else
- * break;
- * }
- *
- * if ( i != face->num_fixed_sizes )
- *
- *
- * if ( i == face->num_fixed_sizes ||
- * FT_HAS_SBIX_OVERLAY( face ) )
- *