1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Documentation work

Fixes #1104.
This commit is contained in:
Camilla Löwy 2017-10-29 16:27:15 +01:00
parent a1154247fa
commit 2867ca1e5b
2 changed files with 10 additions and 9 deletions

View File

@ -582,15 +582,15 @@ window's desired video mode. The video mode most closely matching the new
desired video mode is set immediately. The window is resized to fit the desired video mode is set immediately. The window is resized to fit the
resolution of the set video mode. resolution of the set video mode.
If you wish to be notified when a window is resized, whether by the user or If you wish to be notified when a window is resized, whether by the user, the
the system, set a size callback. system or your own code, set a size callback.
@code @code
glfwSetWindowSizeCallback(window, window_size_callback); glfwSetWindowSizeCallback(window, window_size_callback);
@endcode @endcode
The callback function receives the new size, in screen coordinates, of the The callback function receives the new size, in screen coordinates, of the
client area of the window when it is resized. client area of the window when the window is resized.
@code @code
void window_size_callback(GLFWwindow* window, int width, int height) void window_size_callback(GLFWwindow* window, int width, int height)
@ -740,15 +740,15 @@ The window system may put limitations on window placement.
glfwSetWindowPos(window, 100, 100); glfwSetWindowPos(window, 100, 100);
@endcode @endcode
If you wish to be notified when a window is moved, whether by the user, system If you wish to be notified when a window is moved, whether by the user, the
or your own code, set a position callback. system or your own code, set a position callback.
@code @code
glfwSetWindowPosCallback(window, window_pos_callback); glfwSetWindowPosCallback(window, window_pos_callback);
@endcode @endcode
The callback function receives the new position of the upper-left corner of the The callback function receives the new position, in screen coordinates, of the
client area when the window is moved. upper-left corner of the client area when the window is moved.
@code @code
void window_pos_callback(GLFWwindow* window, int xpos, int ypos) void window_pos_callback(GLFWwindow* window, int xpos, int ypos)

View File

@ -3220,8 +3220,9 @@ GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
/*! @brief Sets the position callback for the specified window. /*! @brief Sets the position callback for the specified window.
* *
* This function sets the position callback of the specified window, which is * This function sets the position callback of the specified window, which is
* called when the window is moved. The callback is provided with the screen * called when the window is moved. The callback is provided with the
* position of the upper-left corner of the client area of the window. * position, in screen coordinates, of the upper-left corner of the client area
* of the window.
* *
* @param[in] window The window whose callback to set. * @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or `NULL` to remove the currently set * @param[in] cbfun The new callback, or `NULL` to remove the currently set