[go: up one dir, main page]

glfwGetMonitors

Function glfwGetMonitors 

Source
pub unsafe extern "C" fn glfwGetMonitors(
    count: *mut i32,
) -> *mut *mut GLFWmonitor
Expand description

@brief Returns the currently connected monitors.

This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns NULL.

@param[out] count Where to store the number of monitors in the returned array. This is set to zero if an error occurred. @return An array of monitor handles, or NULL if no monitors were found or if an [error](@ref error_handling) occurred.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED.

@pointer_lifetime The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.

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

@sa @ref monitor_monitors @sa @ref monitor_event @sa @ref glfwGetPrimaryMonitor

@since Added in version 3.0.

@ingroup monitor