glfwSetMonitorCallback

Sets the monitor configuration callback.

This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.

extern (C) @nogc nothrow __gshared
glfwSetMonitorCallback

Parameters

callback GLFWmonitorfun

The new callback, or null to remove the currently set callback.

Return Value

The previously set callback, or null if no callback was set or the library had not been initialized.

@callback_signature

void function_name(GLFWmonitor* monitor, int event)

For more information about the callback parameters, see the function pointer type.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED.

Thread Safety

This function must only be called from the main thread.

@sa @ref monitor_event

Meta

Since

Added in version 3.0.

Ingroup: monitor