@ -203,7 +203,7 @@ extern "C" {
/*************************************************************************
/*************************************************************************
* GLFW version
* GLFW API tokens
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*! @name GLFW version macros
/*! @name GLFW version macros
@ -230,11 +230,6 @@ extern "C" {
# define GLFW_VERSION_REVISION 0
# define GLFW_VERSION_REVISION 0
/*! @} */
/*! @} */
/*************************************************************************
* Input handling definitions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*! @name Key and button actions
/*! @name Key and button actions
* @ { */
* @ { */
/*! @brief The key or button was released.
/*! @brief The key or button was released.
@ -449,313 +444,112 @@ extern "C" {
# define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
# define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
/*! @} */
/*! @} */
/*! @defgroup errors Error codes
/*************************************************************************
* @ ingroup error
* Other definitions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*! @defgroup paramhints Window parameters and hints
* @ ingroup window
* @ { */
* @ { */
/*! @brief No error has occurred.
/*! @brief @c GL_TRUE if the window has focus, or @c GL_FALSE otherwise.
* @ see glfwGetWindowParam
*/
*/
# define GLFW_FOCUSED 0x00020001
# define GLFW_NO_ERROR 0
/*! @brief @c GL_TRUE if the window is iconified, or @c GL_FALSE otherwise.
/*! @brief GLFW has not been initialized.
* @ see glfwGetWindowParam
*/
*/
# define GLFW_ICONIFIED 0x00020002
# define GLFW_NOT_INITIALIZED 0x00070001
/*! @brief @c GL_TRUE if the window has been requested to close, or @c GL_FALSE
/*! @brief No context is current for this thread.
* otherwise .
* @ see glfwGetWindowParam
*/
*/
# define GLFW_SHOULD_CLOSE 0x00020003
# define GLFW_NO_CURRENT_CONTEXT 0x00070002
/*! @brief The revision number of the context's API version.
/*! @brief One of the enum parameters for the function was given an invalid
* @ see glfwWindowHint glfwGetWindowParam
* enum .
*/
*/
# define GLFW_CONTEXT_REVISION 0x00020004
# define GLFW_INVALID_ENUM 0x00070003
/*! @brief One of the parameters for the function was given an invalid value.
/*! @brief The bit depth of the red component of the color buffer.
* @ see glfwWindowHint
*/
*/
# define GLFW_RED_BITS 0x00021000
# define GLFW_INVALID_VALUE 0x00070004
/*! @brief The bit depth of the green component of the color buffer.
/*! @brief A memory allocation failed.
* @ see glfwWindowHint
*/
*/
# define GLFW_GREEN_BITS 0x00021001
# define GLFW_OUT_OF_MEMORY 0x00070005
/*! @brief The bit depth of the blue component of the color buffer.
/*! @brief GLFW could not find support for the requested client API on the
* @ see glfwWindowHint
* system .
*/
*/
# define GLFW_BLUE_BITS 0x00021002
# define GLFW_API_UNAVAILABLE 0x00070006
/*! @brief The bit depth of the alpha component of the color buffer.
/*! @brief The requested client API version is not available.
* @ see glfwWindowHint
*/
*/
# define GLFW_ALPHA_BITS 0x00021003
# define GLFW_VERSION_UNAVAILABLE 0x00070007
/*! @brief The bit depth of the depth buffer of the default framebuffer.
/*! @brief A platform-specific error occurred that does not match any of the
* @ see glfwWindowHint
* more specific categories .
*/
*/
# define GLFW_DEPTH_BITS 0x00021004
# define GLFW_PLATFORM_ERROR 0x00070008
/*! @brief The bit depth of the stencil buffer of the default framebuffer.
/*! @brief The clipboard did not contain data in the requested format.
* @ see glfwWindowHint
*/
*/
# define GLFW_FORMAT_UNAVAILABLE 0x00070009
/*! @} */
# define GLFW_FOCUSED 0x00020001
# define GLFW_ICONIFIED 0x00020002
# define GLFW_SHOULD_CLOSE 0x00020003
# define GLFW_RESIZABLE 0x00022007
# define GLFW_VISIBLE 0x00022008
# define GLFW_POSITION_X 0x00022009
# define GLFW_POSITION_Y 0x0002200A
# define GLFW_CONTEXT_REVISION 0x00020004
# define GLFW_RED_BITS 0x00021000
# define GLFW_GREEN_BITS 0x00021001
# define GLFW_BLUE_BITS 0x00021002
# define GLFW_ALPHA_BITS 0x00021003
# define GLFW_DEPTH_BITS 0x00021004
# define GLFW_STENCIL_BITS 0x00021005
# define GLFW_STENCIL_BITS 0x00021005
/*! @brief The bit depth of the red component of the accumulation buffer.
* @ see glfwWindowHint
*/
# define GLFW_ACCUM_RED_BITS 0x00021006
# define GLFW_ACCUM_RED_BITS 0x00021006
/*! @brief The bit depth of the red component of the accumulation buffer.
* @ see glfwWindowHint
*/
# define GLFW_ACCUM_GREEN_BITS 0x00021007
# define GLFW_ACCUM_GREEN_BITS 0x00021007
/*! @brief The bit depth of the red component of the accumulation buffer.
* @ see glfwWindowHint
*/
# define GLFW_ACCUM_BLUE_BITS 0x00021008
# define GLFW_ACCUM_BLUE_BITS 0x00021008
/*! @brief The bit depth of the red component of the accumulation buffer.
* @ see glfwWindowHint
*/
# define GLFW_ACCUM_ALPHA_BITS 0x00021009
# define GLFW_ACCUM_ALPHA_BITS 0x00021009
/*! @brief The number of auxiliary buffers.
* @ see glfwWindowHint
*/
# define GLFW_AUX_BUFFERS 0x0002100A
# define GLFW_AUX_BUFFERS 0x0002100A
/*! @brief @c GL_TRUE for stereo rendering, or @c GL_FALSE otherwise.
* @ see glfwWindowHint
*/
# define GLFW_STEREO 0x0002100B
# define GLFW_STEREO 0x0002100B
/*! @brief The number of samples used for default framebuffer multisampling, or
* zero to disable multisampling .
* @ see glfwWindowHint
*/
# define GLFW_SAMPLES 0x0002100C
# define GLFW_SAMPLES 0x0002100C
/*! @brief @c GL_TRUE if the framebuffer should be sRGB capable, or @c GL_FALSE
* otherwise .
* @ see glfwWindowHint
*/
# define GLFW_SRGB_CAPABLE 0x0002100D
# define GLFW_SRGB_CAPABLE 0x0002100D
/*! @brief The client API used for the window's context; one of
* @ ref One of GLFW_OPENGL_API or @ ref GLFW_OPENGL_ES_API .
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_CLIENT_API 0x00022000
# define GLFW_CLIENT_API 0x00022000
/*! @brief The major number of the context's API version.
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_CONTEXT_VERSION_MAJOR 0x00022001
# define GLFW_CONTEXT_VERSION_MAJOR 0x00022001
/*! @brief The minor number of the context's API version.
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_CONTEXT_VERSION_MINOR 0x00022002
# define GLFW_CONTEXT_VERSION_MINOR 0x00022002
/*! @see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_CONTEXT_ROBUSTNESS 0x00022003
# define GLFW_CONTEXT_ROBUSTNESS 0x00022003
/*! @see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_OPENGL_FORWARD_COMPAT 0x00022004
# define GLFW_OPENGL_FORWARD_COMPAT 0x00022004
/*! @see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_OPENGL_DEBUG_CONTEXT 0x00022005
# define GLFW_OPENGL_DEBUG_CONTEXT 0x00022005
/*! @see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_OPENGL_PROFILE 0x00022006
# define GLFW_OPENGL_PROFILE 0x00022006
/*! @brief @c GL_TRUE if the window is resizable, or @c GL_FALSE otherwise.
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_RESIZABLE 0x00022007
/*! @brief @c GL_TRUE if the window is visible, or @c GL_FALSE otherwise.
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_VISIBLE 0x00022008
/*! @brief The x-coordinate, in pixels, of the upper-left corner of the
* client area of the window .
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_POSITION_X 0x00022009
/*! @brief The y-coordinate, in pixels, of the upper-left corner of the
* client area of the window .
* @ see glfwWindowHint glfwGetWindowParam
*/
# define GLFW_POSITION_Y 0x0002200A
/*! @} */
/*! @name Client APIs
* @ { */
/*! @brief The OpenGL API.
* @ ingroup context
*/
# define GLFW_OPENGL_API 0x00000001
# define GLFW_OPENGL_API 0x00000001
/*! @brief The OpenGL ES API.
* @ ingroup context
*/
# define GLFW_OPENGL_ES_API 0x00000002
# define GLFW_OPENGL_ES_API 0x00000002
/*! @} */
/*! @name Context robustness strategies
* @ { */
/*! @brief No robustness strategy is used.
*
* This is the default .
* @ ingroup context
*/
# define GLFW_NO_ROBUSTNESS 0x00000000
# define GLFW_NO_ROBUSTNESS 0x00000000
/*! @brief
* @ ingroup context
*/
# define GLFW_NO_RESET_NOTIFICATION 0x00000001
# define GLFW_NO_RESET_NOTIFICATION 0x00000001
/*! @brief
* @ ingroup context
*/
# define GLFW_LOSE_CONTEXT_ON_RESET 0x00000002
# define GLFW_LOSE_CONTEXT_ON_RESET 0x00000002
/*! @} */
/*! @name OpenGL profiles
* @ { */
/*! @brief No OpenGL profile.
* @ ingroup context
*/
# define GLFW_OPENGL_NO_PROFILE 0x00000000
# define GLFW_OPENGL_NO_PROFILE 0x00000000
/*! @brief The OpenGL core profile.
* @ ingroup context
*/
# define GLFW_OPENGL_CORE_PROFILE 0x00000001
# define GLFW_OPENGL_CORE_PROFILE 0x00000001
/*! @brief The OpenGL compatibility profile.
* @ ingroup context
*/
# define GLFW_OPENGL_COMPAT_PROFILE 0x00000002
# define GLFW_OPENGL_COMPAT_PROFILE 0x00000002
/*! @} */
/*! @name Input modes
* @ { */
/*! @brief The behaviour of the cursor.
* @ ingroup input
*/
# define GLFW_CURSOR_MODE 0x00030001
# define GLFW_CURSOR_MODE 0x00030001
/*! @brief Whether the @ref glfwGetKey function uses sticky state.
* @ ingroup input
*/
# define GLFW_STICKY_KEYS 0x00030002
# define GLFW_STICKY_KEYS 0x00030002
/*! @brief Whether the @ref glfwGetMouseButton function uses sticky state.
* @ ingroup input
*/
# define GLFW_STICKY_MOUSE_BUTTONS 0x00030003
# define GLFW_STICKY_MOUSE_BUTTONS 0x00030003
/*! @} */
/*! @name Cursor modes
* @ { */
/*! @brief The cursor is visible and behaves normally.
* @ ingroup input
*/
# define GLFW_CURSOR_NORMAL 0x00040001
# define GLFW_CURSOR_NORMAL 0x00040001
/*! @brief The cursor is hidden when over the client area of the window.
* @ ingroup input
*/
# define GLFW_CURSOR_HIDDEN 0x00040002
# define GLFW_CURSOR_HIDDEN 0x00040002
/*! @brief The cursor is disabled and cursor movement is unbounded.
* @ ingroup input
*/
# define GLFW_CURSOR_CAPTURED 0x00040003
# define GLFW_CURSOR_CAPTURED 0x00040003
/*! @} */
/*! @name Joystick parameters
* @ { */
/*! @brief @c GL_TRUE if the joystick is present, or @c GL_FALSE otherwise.
* @ ingroup input
*/
# define GLFW_PRESENT 0x00050001
# define GLFW_PRESENT 0x00050001
/*! @brief The number of axes on the specified joystick, or zero if the joystick
* is not present .
* @ ingroup input
*/
# define GLFW_AXES 0x00050002
# define GLFW_AXES 0x00050002
/*! @brief The number of buttons on the specified joystick, or zero if the
* joystick is not present .
* @ ingroup input
*/
# define GLFW_BUTTONS 0x00050003
# define GLFW_BUTTONS 0x00050003
/*! @} */
/*! @defgroup errors Error codes
* @ ingroup error
* @ { */
/*! @brief No error has occurred.
*/
# define GLFW_NO_ERROR 0
/*! @brief GLFW has not been initialized.
*/
# define GLFW_NOT_INITIALIZED 0x00070001
/*! @brief No context is current for this thread.
*/
# define GLFW_NO_CURRENT_CONTEXT 0x00070002
/*! @brief One of the enum parameters for the function was given an invalid
* enum .
*/
# define GLFW_INVALID_ENUM 0x00070003
/*! @brief One of the parameters for the function was given an invalid value.
*/
# define GLFW_INVALID_VALUE 0x00070004
/*! @brief A memory allocation failed.
*/
# define GLFW_OUT_OF_MEMORY 0x00070005
/*! @brief GLFW could not find support for the requested client API on the
* system .
*/
# define GLFW_API_UNAVAILABLE 0x00070006
/*! @brief The requested client API version is not available.
*/
# define GLFW_VERSION_UNAVAILABLE 0x00070007
/*! @brief A platform-specific error occurred that does not match any of the
* more specific categories .
*/
# define GLFW_PLATFORM_ERROR 0x00070008
/*! @brief The clipboard did not contain data in the requested format.
*/
# define GLFW_FORMAT_UNAVAILABLE 0x00070009
/*! @} */
/*! @brief The number of entries in the gamma ramp.
* @ ingroup gamma
*/
# define GLFW_GAMMA_RAMP_SIZE 256
# define GLFW_GAMMA_RAMP_SIZE 256
/*! @name Monitor parameters
* @ { */
/*! @brief The physical width, in mm, of the monitor.
* @ ingroup monitor
*/
# define GLFW_MONITOR_WIDTH_MM 0x00060001
# define GLFW_MONITOR_WIDTH_MM 0x00060001
/*! @brief The physical height, in mm, of the monitor.
* @ ingroup monitor
*/
# define GLFW_MONITOR_HEIGHT_MM 0x00060002
# define GLFW_MONITOR_HEIGHT_MM 0x00060002
/*! @brief The x-coordinate of the upper-left corner of the monitor on the
* virtual desktop .
* @ ingroup monitor
*/
# define GLFW_MONITOR_POS_X 0x00060003
# define GLFW_MONITOR_POS_X 0x00060003
/*! @brief The y-coordinate of the upper-left corner of the monitor on the
* virtual desktop .
* @ ingroup monitor
*/
# define GLFW_MONITOR_POS_Y 0x00060004
# define GLFW_MONITOR_POS_Y 0x00060004
/* @} */
/*! @name Monitor events
* @ { */
/*! @brief The monitor was connected.
* @ ingroup monitor
*/
# define GLFW_CONNECTED 0x00061000
# define GLFW_CONNECTED 0x00061000
/*! @brief The monitor was disconnected.
* @ ingroup monitor
*/
# define GLFW_DISCONNECTED 0x00061001
# define GLFW_DISCONNECTED 0x00061001
/* @} */
/*************************************************************************
/*************************************************************************
* Typedef s
* GLFW API types
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*! @brief Client API function pointer type.
/*! @brief Client API function pointer type.
@ -907,7 +701,7 @@ typedef struct
/*************************************************************************
/*************************************************************************
* Prototype s
* GLFW API function s
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*! @brief Initializes the GLFW library.
/*! @brief Initializes the GLFW library.