glfwGetMonitors function
! @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
.
@paramout
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
GLFWAPI GLFWmonitor** glfwGetMonitors(int* count)
Implementation
Pointer<Pointer<GLFWmonitor>> glfwGetMonitors(Pointer<Int32> count) {
final glfwGetMonitorsLookupFunction = libglfw.lookupFunction<
Pointer<Pointer<GLFWmonitor>> Function(Pointer<Int32> count),
Pointer<Pointer<GLFWmonitor>> Function(
Pointer<Int32> count)>('glfwGetMonitors');
return glfwGetMonitorsLookupFunction(count);
}