Added window position callback.

This commit is contained in:
Camilla Berglund
2012-11-30 13:56:42 +01:00
parent fc69721807
commit 1a3d47d06d
5 changed files with 55 additions and 1 deletions

View File

@@ -706,6 +706,16 @@ typedef void* GLFWwindow;
*/
typedef void (* GLFWerrorfun)(int,const char*);
/*! @brief The function signature for window position callbacks.
* @param[in] window The window that the user moved.
* @param[in] x The new x-coordinate, in pixels, of the upper-left corner of
* the client area of the window.
* @param[in] y The new y-coordinate, in pixels, of the upper-left corner of
* the client area of the window.
* @ingroup window
*/
typedef void (* GLFWwindowposfun)(GLFWwindow,int,int);
/*! @brief The function signature for window resize callbacks.
* @param[in] window The window that the user resized.
* @param[in] width The new width, in pixels, of the window.
@@ -1274,6 +1284,14 @@ GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer);
*/
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window);
/*! @brief Sets the position callback for the specified window.
* @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or @c NULL to remove the currently set
* callback.
* @ingroup window
*/
GLFWAPI void glfwSetWindowPosCallback(GLFWwindow window, GLFWwindowposfun cbfun);
/*! @brief Sets the size callback for the specified window.
* @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or @c NULL to remove the currently set