glfwSetCursor

Function glfwSetCursor 

Source
pub unsafe extern "C" fn glfwSetCursor(
    window: *mut GLFWwindow,
    cursor: *mut GLFWcursor,
)
Expand description

@brief Sets the cursor for the window.

This function sets the cursor image to be used when the cursor is over the content area of the specified window. The set cursor will only be visible when the [cursor mode](@ref cursor_mode) of the window is GLFW_CURSOR_NORMAL.

On some platforms, the set cursor may not be visible unless the window also has input focus.

@param[in] window The window to set the cursor for. @param[in] cursor The cursor to set, or NULL to switch back to the default arrow cursor.

@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 cursor_object

@since Added in version 3.1.

@ingroup input