Add documentation

This commit is contained in:
Nathan Poirier 2018-12-14 19:08:37 +01:00
parent 1e71b9229c
commit 2b55b79d63
No known key found for this signature in database
GPG Key ID: 94C1CE923BD6A70C

View File

@ -3820,11 +3820,12 @@ GLFWAPI void glfwPostEmptyEvent(void);
*
* 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 or @ref GLFW_LOCK_KEY_MODS.
* @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
* @ref GLFW_RAW_INPUT.
*
* @param[in] window The window to query.
* @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
* `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`.
* `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or `GLFW_RAW_INPUT`.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_INVALID_ENUM.
@ -3843,7 +3844,8 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
*
* 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 or @ref GLFW_LOCK_KEY_MODS.
* @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
* @ref GLFW_RAW_INPUT.
*
* If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
* modes:
@ -3875,9 +3877,14 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
* 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_INPUT`, the value must be either `GLFW_TRUE` to
* enable the use of raw input, or `GLFW_FALSE` to disable it. If enabled and
* supported by the machine, the program will retrieve high-definition mouse
* movement when cursor is grabbed.
*
* @param[in] window The window whose input mode to set.
* @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
* `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`.
* `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or `GLFW_RAW_INPUT`.
* @param[in] value The new value of the specified input mode.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
@ -3893,8 +3900,35 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
*/
GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
/*!
* TODO
/*! @brief Returns whether the raw input is supported.
*
* This function returns whether the raw input is supported by the current
* machine.
*
* Raw input allow to retrieve high-definition movement from mouse.
* Input from a high-definition mouse is much more precise than that from a
* standard mouse. But often, they cannot be obtained through standard
* platforms API which transform mouse movement using their own improvements
* (like pointer acceleration). Platform's improvements are ideal for pointer
* control but it is not so good for moving a first-person camera. For this
* reason when the cursor of a window is grabbed by setting @ref GLFW_CURSOR
* to @ref GLFW_CURSOR_DISABLED, raw input is used.
*
* The use of raw input can be disabled using @ref glfwSetInputMode with
* @ref GLFW_RAW_INPUT mode.
*
* @return `GLFW_TRUE` if high-definition mouse movement is supported, or
* `GLFW_FALSE` otherwise.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread.
*
* @sa @ref glfwSetInputMode
*
* @since Added in version 3.3.
*
* @ingroup input
*/
GLFWAPI int glfwRawInputSupported(void);