glfwGetMonitorPos function

void glfwGetMonitorPos(
  1. Pointer<GLFWmonitor> monitor,
  2. Pointer<Int32> xpos,
  3. Pointer<Int32> ypos
)

! @brief Returns the position of the monitor's viewport on the virtual screen.

This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.

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 monitor The monitor to query. @paramout xpos Where to store the monitor x-coordinate, or NULL. @paramout ypos Where to store the monitor y-coordinate, or NULL.

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

@thread_safety This function must only be called from the main thread.

@sa @ref monitor_properties

@since Added in version 3.0.

@ingroup monitor

GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos)

Implementation

void glfwGetMonitorPos(
    Pointer<GLFWmonitor> monitor, Pointer<Int32> xpos, Pointer<Int32> ypos) {
  final glfwGetMonitorPosLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWmonitor> monitor, Pointer<Int32> xpos,
          Pointer<Int32> ypos),
      void Function(Pointer<GLFWmonitor> monitor, Pointer<Int32> xpos,
          Pointer<Int32> ypos)>('glfwGetMonitorPos');
  return glfwGetMonitorPosLookupFunction(monitor, xpos, ypos);
}