glfwGetWindowPos

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.

extern (C) @nogc nothrow __gshared
void
glfwGetWindowPos
(,
int* xpos
,
int* ypos
)

Parameters

window GLFWwindow*

The window to query.

xpos int*

Where to store the x-coordinate of the upper-left corner of the content area, or null.

ypos int*

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

Meta

Since

Added in version 3.0.

Ingroup: window