pub unsafe extern "C" fn glfwSetWindowMonitor(
window: *mut GLFWwindow,
monitor: *mut GLFWmonitor,
xpos: i32,
ypos: i32,
width: i32,
height: i32,
refreshRate: i32,
)Expand description
@brief Sets the mode, monitor, video mode and placement of a window.
This function sets the monitor that the window uses for full screen mode or,
if the monitor is NULL, makes it windowed mode.
When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.
When the monitor is NULL, the position, width and height are used to
place the window content area. The refresh rate is ignored when no monitor
is specified.
If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see @ref glfwSetWindowSize.
When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.
@param[in] window The window whose monitor, size or video mode to set.
@param[in] monitor The desired monitor, or NULL to set windowed mode.
@param[in] xpos The desired x-coordinate of the upper-left corner of the
content area.
@param[in] ypos The desired y-coordinate of the upper-left corner of the
content area.
@param[in] width The desired with, in screen coordinates, of the content
area or video mode.
@param[in] height The desired height, in screen coordinates, of the content
area or video mode.
@param[in] refreshRate The desired refresh rate, in Hz, of the video mode,
or GLFW_DONT_CARE.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.
@remark The OpenGL or OpenGL ES context will not be destroyed or otherwise affected by any resizing or mode switching, although you may need to update your viewport if the framebuffer size has changed.
@remark @wayland The desired window position is ignored, as there is no way for an application to set this property.
@thread_safety This function must only be called from the main thread.
@sa @ref window_monitor @sa @ref window_full_screen @sa @ref glfwGetWindowMonitor @sa @ref glfwSetWindowSize
@since Added in version 3.2.
@ingroup window