summaryrefslogtreecommitdiff
path: root/libs/raylib/src/external/glfw/include/GLFW/glfw3.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/raylib/src/external/glfw/include/GLFW/glfw3.h')
-rw-r--r--libs/raylib/src/external/glfw/include/GLFW/glfw3.h171
1 files changed, 130 insertions, 41 deletions
diff --git a/libs/raylib/src/external/glfw/include/GLFW/glfw3.h b/libs/raylib/src/external/glfw/include/GLFW/glfw3.h
index 4f5f360..7d9dee0 100644
--- a/libs/raylib/src/external/glfw/include/GLFW/glfw3.h
+++ b/libs/raylib/src/external/glfw/include/GLFW/glfw3.h
@@ -52,7 +52,7 @@ extern "C" {
* 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 reference
+/*! @defgroup vulkan Vulkan support reference
* @brief Functions and types related to Vulkan.
*
* This is the reference documentation for Vulkan related functions and types.
@@ -193,7 +193,38 @@ extern "C" {
#endif /*__APPLE__*/
-#elif !defined(GLFW_INCLUDE_NONE)
+#elif defined(GLFW_INCLUDE_GLU)
+
+ #if defined(__APPLE__)
+
+ #if defined(GLFW_INCLUDE_GLU)
+ #include <OpenGL/glu.h>
+ #endif
+
+ #else /*__APPLE__*/
+
+ #if defined(GLFW_INCLUDE_GLU)
+ #include <GL/glu.h>
+ #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__)
@@ -201,9 +232,6 @@ extern "C" {
#define GL_GLEXT_LEGACY
#endif
#include <OpenGL/gl.h>
- #if defined(GLFW_INCLUDE_GLU)
- #include <OpenGL/glu.h>
- #endif
#else /*__APPLE__*/
@@ -211,9 +239,6 @@ extern "C" {
#if defined(GLFW_INCLUDE_GLEXT)
#include <GL/glext.h>
#endif
- #if defined(GLFW_INCLUDE_GLU)
- #include <GL/glu.h>
- #endif
#endif /*__APPLE__*/
@@ -768,6 +793,33 @@ extern "C" {
* [custom cursor](@ref cursor_custom).
*/
#define GLFW_CURSOR_UNAVAILABLE 0x0001000B
+/*! @brief The requested feature is not provided by the platform.
+ *
+ * The requested feature is not provided by the platform, so GLFW is unable to
+ * implement it. The documentation for each function notes if it could emit
+ * this error.
+ *
+ * @analysis Platform or platform version limitation. The error can be ignored
+ * unless the feature is critical to the application.
+ *
+ * @par
+ * A function call that emits this error has no effect other than the error and
+ * updating any existing out parameters.
+ */
+#define GLFW_FEATURE_UNAVAILABLE 0x0001000C
+/*! @brief The requested feature is not implemented for the platform.
+ *
+ * The requested feature has not yet been implemented in GLFW for this platform.
+ *
+ * @analysis An incomplete implementation of GLFW for this platform, hopefully
+ * fixed in a future release. The error can be ignored unless the feature is
+ * critical to the application.
+ *
+ * @par
+ * A function call that emits this error has no effect other than the error and
+ * updating any existing out parameters.
+ */
+#define GLFW_FEATURE_UNIMPLEMENTED 0x0001000D
/*! @} */
/*! @addtogroup window
@@ -843,6 +895,13 @@ extern "C" {
*/
#define GLFW_FOCUS_ON_SHOW 0x0002000C
+/*! @brief Mouse input transparency window hint and attribute
+ *
+ * Mouse input transparency [window hint](@ref GLFW_MOUSE_PASSTHROUGH_hint) or
+ * [window attribute](@ref GLFW_MOUSE_PASSTHROUGH_attrib).
+ */
+#define GLFW_MOUSE_PASSTHROUGH 0x0002000D
+
/*! @brief Framebuffer bit depth hint.
*
* Framebuffer bit depth [hint](@ref GLFW_RED_BITS).
@@ -960,12 +1019,17 @@ extern "C" {
* and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).
*/
#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
-/*! @brief OpenGL debug context hint and attribute.
+/*! @brief Debug mode context hint and attribute.
*
- * OpenGL debug context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and
- * [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib).
+ * Debug mode context [hint](@ref GLFW_CONTEXT_DEBUG_hint) and
+ * [attribute](@ref GLFW_CONTEXT_DEBUG_attrib).
+ */
+#define GLFW_CONTEXT_DEBUG 0x00022007
+/*! @brief Legacy name for compatibility.
+ *
+ * This is an alias for compatibility with earlier versions.
*/
-#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
+#define GLFW_OPENGL_DEBUG_CONTEXT GLFW_CONTEXT_DEBUG
/*! @brief OpenGL profile hint and attribute.
*
* OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and
@@ -1047,6 +1111,14 @@ extern "C" {
#define GLFW_EGL_CONTEXT_API 0x00036002
#define GLFW_OSMESA_CONTEXT_API 0x00036003
+#define GLFW_ANGLE_PLATFORM_TYPE_NONE 0x00037001
+#define GLFW_ANGLE_PLATFORM_TYPE_OPENGL 0x00037002
+#define GLFW_ANGLE_PLATFORM_TYPE_OPENGLES 0x00037003
+#define GLFW_ANGLE_PLATFORM_TYPE_D3D9 0x00037004
+#define GLFW_ANGLE_PLATFORM_TYPE_D3D11 0x00037005
+#define GLFW_ANGLE_PLATFORM_TYPE_VULKAN 0x00037007
+#define GLFW_ANGLE_PLATFORM_TYPE_METAL 0x00037008
+
/*! @defgroup shapes Standard cursor shapes
* @brief Standard system cursor shapes.
*
@@ -1163,6 +1235,11 @@ extern "C" {
* Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).
*/
#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001
+/*! @brief ANGLE rendering backend init hint.
+ *
+ * ANGLE rendering backend [init hint](@ref GLFW_ANGLE_PLATFORM_TYPE_hint).
+ */
+#define GLFW_ANGLE_PLATFORM_TYPE 0x00050002
/*! @brief macOS specific init hint.
*
* macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).
@@ -1406,7 +1483,7 @@ typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);
* @endcode
*
* @param[in] window The window that was maximized or restored.
- * @param[in] iconified `GLFW_TRUE` if the window was maximized, or
+ * @param[in] maximized `GLFW_TRUE` if the window was maximized, or
* `GLFW_FALSE` if it was restored.
*
* @sa @ref window_maximize
@@ -1831,6 +1908,18 @@ typedef struct GLFWgamepadstate
* bundle, if present. This can be disabled with the @ref
* GLFW_COCOA_CHDIR_RESOURCES init hint.
*
+ * @remark @macos This function will create the main menu and dock icon for the
+ * application. 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. The menu bar
+ * and dock icon can be disabled entirely with the @ref GLFW_COCOA_MENUBAR 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
@@ -1854,6 +1943,8 @@ GLFWAPI int glfwInit(void);
* 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.
@@ -2670,13 +2761,6 @@ GLFWAPI void glfwWindowHintString(int hint, const char* value);
* [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)
@@ -2849,21 +2933,21 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
* @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 and @ref
- * GLFW_PLATFORM_ERROR.
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
*
* @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
+ * @remark @macos Regular windows do not have icons on macOS. This function
+ * will emit @ref GLFW_FEATURE_UNAVAILABLE. 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.
+ * This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
*
* @thread_safety This function must only be called from the main thread.
*
@@ -2889,12 +2973,12 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* i
* @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.
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
*
* @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.
+ * position of its windows. This function will emit @ref
+ * GLFW_FEATURE_UNAVAILABLE.
*
* @thread_safety This function must only be called from the main thread.
*
@@ -2923,12 +3007,12 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
* @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.
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
*
* @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.
+ * position of its windows. This function will emit @ref
+ * GLFW_FEATURE_UNAVAILABLE.
*
* @thread_safety This function must only be called from the main thread.
*
@@ -3240,8 +3324,11 @@ GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window);
* @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.
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
+ *
+ * @remark @wayland There is no way to set an opacity factor for a window.
+ * This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
*
* @thread_safety This function must only be called from the main thread.
*
@@ -3408,11 +3495,11 @@ GLFWAPI void glfwHideWindow(GLFWwindow* window);
*
* @param[in] window The window to give input focus.
*
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
*
- * @remark @wayland It is not possible for an application to bring its windows
- * to front, this function will always emit @ref GLFW_PLATFORM_ERROR.
+ * @remark @wayland It is not possible for an application to set the input
+ * focus. This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
*
* @thread_safety This function must only be called from the main thread.
*
@@ -3576,6 +3663,7 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int 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).
+ * [GLFW_MOUSE_PASSTHROUGH](@ref GLFW_MOUSE_PASSTHROUGH_attrib)
*
* Some of these attributes are ignored for full screen windows. The new
* value will take effect if the window is later made windowed.
@@ -4164,7 +4252,7 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
* 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
+ * attempting to set this will emit @ref GLFW_FEATURE_UNAVAILABLE. Call @ref
* glfwRawMouseMotionSupported to check for support.
*
* @param[in] window The window whose input mode to set.
@@ -4174,7 +4262,8 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
* @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.
+ * GLFW_INVALID_ENUM, @ref GLFW_PLATFORM_ERROR and @ref
+ * GLFW_FEATURE_UNAVAILABLE (see above).
*
* @thread_safety This function must only be called from the main thread.
*