diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 8759ea79..e9cea004 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -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 diff --git a/readme.html b/readme.html index 81100df6..1e629456 100644 --- a/readme.html +++ b/readme.html @@ -274,7 +274,7 @@ version of GLFW.
glfwSetErrorCallback function and GLFWerrorfun type for receiving more specific and/or nested errorsglfwSetWindowUserPointer and glfwGetWindowUserPointer functions for per-window user pointersglfwGetVersionString function for determining which code paths were enabled at compile timeglfwGetWindowPos function for querying the position of the specified windowglfwSetWindowPosCallback function and GLFWwindowposfun type for reciving window position eventsglfwSetWindowFocusCallback function and GLFWwindowfocusfun type for receiving window focus eventsglfwSetWindowIconifyCallback function and GLFWwindowiconifyfun type for receiving window iconification eventsglfwGetClipboardString and glfwSetClipboardString functions for interacting with the system clipboardGLFW_OPENGL_REVISION window parameter to make up for removal of glfwGetGLVersionGLFW_INCLUDE_GLCOREARB macro for including glcorearb.h instead of gl.hGLFW_VISIBLE window hint and parameter for controlling and polling window visibilityGLFW_POSITION_X and GLFW_POSITION_Y window hints and parameter for controlling and polling window positionwindows simple multi-window test programsharing simple OpenGL object sharing test programmodes video mode enumeration and setting test program