glfwGetWindowPos function
! @brief Retrieves the position of the content area of the specified window.
This function retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window.
Any or all of the position arguments may be NULL
. If an error occurs, all
non-NULL
position arguments will be set to zero.
@paramin
window The window to query.
@paramout
xpos Where to store the x-coordinate of the upper-left corner of
the content area, or NULL
.
@paramout
ypos Where to store the y-coordinate of the upper-left corner of
the content area, or NULL
.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.
@remark @wayland There is no way for an application to retrieve the global position of its windows, this function will always emit @ref GLFW_PLATFORM_ERROR.
@thread_safety This function must only be called from the main thread.
@sa @ref window_pos @sa @ref glfwSetWindowPos
@since Added in version 3.0.
@ingroup window
GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos)
Implementation
void glfwGetWindowPos(
Pointer<GLFWwindow> window, Pointer<Int32> xpos, Pointer<Int32> ypos) {
final glfwGetWindowPosLookupFunction = libglfw.lookupFunction<
Void Function(
Pointer<GLFWwindow> window, Pointer<Int32> xpos, Pointer<Int32> ypos),
void Function(Pointer<GLFWwindow> window, Pointer<Int32> xpos,
Pointer<Int32> ypos)>('glfwGetWindowPos');
return glfwGetWindowPosLookupFunction(window, xpos, ypos);
}