glfwSetWindowPos function

void glfwSetWindowPos(
  1. Pointer<GLFWwindow> window,
  2. int xpos,
  3. int ypos
)

! @brief Sets the position of the content area of the specified window.

This function sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window. If the window is a full screen window, this function does nothing.

Do not use this function to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.

The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.

@paramin window The window to query. @paramin xpos The x-coordinate of the upper-left corner of the content area. @paramin ypos The y-coordinate of the upper-left corner of the content area.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@remark @wayland There is no way for an application to set 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 glfwGetWindowPos

@since Added in version 1.0. @glfw3 Added window handle parameter.

@ingroup window

GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos)

Implementation

void glfwSetWindowPos(Pointer<GLFWwindow> window, int xpos, int ypos) {
  final glfwSetWindowPosLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWwindow> window, Int32 xpos, Int32 ypos),
      void Function(
          Pointer<GLFWwindow> window, int xpos, int ypos)>('glfwSetWindowPos');
  return glfwSetWindowPosLookupFunction(window, xpos, ypos);
}