glfwSetWindowPosCallback¶
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 position of the upper-left corner of the client area of the window.
Example:
glfwSetWindowPosCallback($window, function($x, $y) {
echo "Window moved to: " . $x . ", " . $y . PHP_EOL;
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void