glfwSetCursor function
! @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.
@paramin
window The window to set the cursor for.
@paramin
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
GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor)
Implementation
void glfwSetCursor(Pointer<GLFWwindow> window, Pointer<GLFWcursor> cursor) {
final glfwSetCursorLookupFunction = libglfw.lookupFunction<
Void Function(Pointer<GLFWwindow> window, Pointer<GLFWcursor> cursor),
void Function(Pointer<GLFWwindow> window,
Pointer<GLFWcursor> cursor)>('glfwSetCursor');
return glfwSetCursorLookupFunction(window, cursor);
}