mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 07:34:35 +00:00
Documentation work
[ci skip]
This commit is contained in:
parent
980f955f6c
commit
463930761b
@ -155,6 +155,7 @@ The returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
|||||||
This function only returns cached key event state. It does not poll the
|
This function only returns cached key event state. It does not poll the
|
||||||
system for the current physical state of the key.
|
system for the current physical state of the key.
|
||||||
|
|
||||||
|
@anchor GLFW_STICKY_KEYS
|
||||||
Whenever you poll state, you risk missing the state change you are looking for.
|
Whenever you poll state, you risk missing the state change you are looking for.
|
||||||
If a pressed key is released again before you poll its state, you will have
|
If a pressed key is released again before you poll its state, you will have
|
||||||
missed the key press. The recommended solution for this is to use a
|
missed the key press. The recommended solution for this is to use a
|
||||||
@ -273,8 +274,9 @@ glfwGetCursorPos(window, &xpos, &ypos);
|
|||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
|
||||||
@subsection cursor_mode Cursor modes
|
@subsection cursor_mode Cursor mode
|
||||||
|
|
||||||
|
@anchor GLFW_CURSOR
|
||||||
The `GLFW_CURSOR` input mode provides several cursor modes for special forms of
|
The `GLFW_CURSOR` input mode provides several cursor modes for special forms of
|
||||||
mouse motion input. By default, the cursor mode is `GLFW_CURSOR_NORMAL`,
|
mouse motion input. By default, the cursor mode is `GLFW_CURSOR_NORMAL`,
|
||||||
meaning the regular arrow cursor (or another cursor set with @ref glfwSetCursor)
|
meaning the regular arrow cursor (or another cursor set with @ref glfwSetCursor)
|
||||||
@ -369,8 +371,10 @@ When a cursor is no longer needed, destroy it with @ref glfwDestroyCursor.
|
|||||||
glfwDestroyCursor(cursor);
|
glfwDestroyCursor(cursor);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
Cursor destruction always succeeds. All cursors remaining when @ref
|
Cursor destruction always succeeds. If the cursor is current for any window,
|
||||||
glfwTerminate is called are destroyed as well.
|
that window will revert to the default cursor. This does not affect the cursor
|
||||||
|
mode. All remaining cursors remaining are destroyed when @ref glfwTerminate is
|
||||||
|
called.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection cursor_set Cursor setting
|
@subsubsection cursor_set Cursor setting
|
||||||
@ -387,14 +391,14 @@ to `GLFW_CURSOR_NORMAL`.
|
|||||||
|
|
||||||
A single cursor may be set for any number of windows.
|
A single cursor may be set for any number of windows.
|
||||||
|
|
||||||
To remove a cursor from a window, set the cursor of that window to `NULL`.
|
To revert to the default cursor, set the cursor of that window to `NULL`.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
glfwSetCursor(window, NULL);
|
glfwSetCursor(window, NULL);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
When a cursor is destroyed, it is removed from any window where it is set. This
|
When a cursor is destroyed, any window that has it set will revert to the
|
||||||
does not affect the cursor modes of those windows.
|
default cursor. This does not affect the cursor mode.
|
||||||
|
|
||||||
|
|
||||||
@subsection cursor_enter Cursor enter/leave events
|
@subsection cursor_enter Cursor enter/leave events
|
||||||
@ -461,6 +465,7 @@ The returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
|||||||
This function only returns cached mouse button event state. It does not poll
|
This function only returns cached mouse button event state. It does not poll
|
||||||
the system for the current state of the mouse button.
|
the system for the current state of the mouse button.
|
||||||
|
|
||||||
|
@anchor GLFW_STICKY_MOUSE_BUTTONS
|
||||||
Whenever you poll state, you risk missing the state change you are looking for.
|
Whenever you poll state, you risk missing the state change you are looking for.
|
||||||
If a pressed mouse button is released again before you poll its state, you will have
|
If a pressed mouse button is released again before you poll its state, you will have
|
||||||
missed the button press. The recommended solution for this is to use a
|
missed the button press. The recommended solution for this is to use a
|
||||||
|
@ -89,6 +89,9 @@ the desktop. This behavior can be disabled with the
|
|||||||
[GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_hint) window hint, for example if you
|
[GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_hint) window hint, for example if you
|
||||||
wish to simultaneously cover multiple windows with full screen windows.
|
wish to simultaneously cover multiple windows with full screen windows.
|
||||||
|
|
||||||
|
If a monitor is disconnected, any window that is full screen on that monitor
|
||||||
|
will be forced into windowed mode. See @ref monitor_event for more information.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection window_windowed_full_screen "Windowed full screen" windows
|
@subsubsection window_windowed_full_screen "Windowed full screen" windows
|
||||||
|
|
||||||
|
@ -3264,8 +3264,8 @@ GLFWAPI void glfwPostEmptyEvent(void);
|
|||||||
/*! @brief Returns the value of an input option for the specified window.
|
/*! @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.
|
* This function returns the value of an input option for the specified window.
|
||||||
* The mode must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
|
* The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS or
|
||||||
* `GLFW_STICKY_MOUSE_BUTTONS`.
|
* @ref GLFW_STICKY_MOUSE_BUTTONS.
|
||||||
*
|
*
|
||||||
* @param[in] window The window to query.
|
* @param[in] window The window to query.
|
||||||
* @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
|
* @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
|
||||||
@ -3287,8 +3287,8 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
|
|||||||
/*! @brief Sets an input option for the specified window.
|
/*! @brief Sets an input option for the specified window.
|
||||||
*
|
*
|
||||||
* This function sets an input mode option for the specified window. The mode
|
* This function sets an input mode option for the specified window. The mode
|
||||||
* must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
|
* must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS or
|
||||||
* `GLFW_STICKY_MOUSE_BUTTONS`.
|
* @ref GLFW_STICKY_MOUSE_BUTTONS.
|
||||||
*
|
*
|
||||||
* If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
|
* If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
|
||||||
* modes:
|
* modes:
|
||||||
@ -3421,7 +3421,7 @@ GLFWAPI int glfwGetKeyScancode(int key);
|
|||||||
* `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to
|
* `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to
|
||||||
* the key callback.
|
* the key callback.
|
||||||
*
|
*
|
||||||
* If the `GLFW_STICKY_KEYS` input mode is enabled, this function returns
|
* 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
|
* `GLFW_PRESS` the first time you call it for a key that was pressed, even if
|
||||||
* that key has already been released.
|
* that key has already been released.
|
||||||
*
|
*
|
||||||
@ -3460,7 +3460,7 @@ GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
|
|||||||
* to the specified window. The returned state is one of `GLFW_PRESS` or
|
* to the specified window. The returned state is one of `GLFW_PRESS` or
|
||||||
* `GLFW_RELEASE`.
|
* `GLFW_RELEASE`.
|
||||||
*
|
*
|
||||||
* If the `GLFW_STICKY_MOUSE_BUTTONS` input mode is enabled, this function
|
* If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
|
||||||
* `GLFW_PRESS` the first time you call it for a mouse button that was pressed,
|
* `GLFW_PRESS` the first time you call it for a mouse button that was pressed,
|
||||||
* even if that mouse button has already been released.
|
* even if that mouse button has already been released.
|
||||||
*
|
*
|
||||||
@ -3631,6 +3631,9 @@ GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);
|
|||||||
* glfwCreateCursor. Any remaining cursors will be destroyed by @ref
|
* glfwCreateCursor. Any remaining cursors will be destroyed by @ref
|
||||||
* glfwTerminate.
|
* 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.
|
* @param[in] cursor The cursor object to destroy.
|
||||||
*
|
*
|
||||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||||
|
Loading…
Reference in New Issue
Block a user