mirror of
https://github.com/glfw/glfw.git
synced 2026-08-29 03:04:14 +02:00
Added window position callback.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user