pub unsafe extern "C" fn glfwCreateStandardCursor(
shape: i32,
) -> *mut GLFWcursorExpand description
@brief Creates a cursor with a standard shape.
Returns a cursor with a standard shape, that can be set for a window with @ref glfwSetCursor. The images for these cursors come from the system cursor theme and their exact appearance will vary between platforms.
Most of these shapes are guaranteed to exist on every supported platform but a few may not be present. See the table below for details.
| Cursor shape | Windows | macOS | X11 | Wayland |
|---|---|---|---|---|
| @ref GLFW_ARROW_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_IBEAM_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_CROSSHAIR_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_POINTING_HAND_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_RESIZE_EW_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_RESIZE_NS_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_RESIZE_NWSE_CURSOR | Yes | Yes1 | Maybe2 | Maybe2 |
| @ref GLFW_RESIZE_NESW_CURSOR | Yes | Yes1 | Maybe2 | Maybe2 |
| @ref GLFW_RESIZE_ALL_CURSOR | Yes | Yes | Yes | Yes |
| @ref GLFW_NOT_ALLOWED_CURSOR | Yes | Yes | Maybe2 | Maybe2 |
-
This uses a private system API and may fail in the future.
-
This uses a newer standard that not all cursor themes support.
If the requested shape is not available, this function emits a @ref
GLFW_CURSOR_UNAVAILABLE error and returns NULL.
@param[in] shape One of the [standard shapes](@ref shapes).
@return A new cursor ready to use or NULL if an
[error](@ref error_handling) occurred.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_ENUM, @ref GLFW_CURSOR_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
@thread_safety This function must only be called from the main thread.
@sa @ref cursor_standard @sa @ref glfwCreateCursor
@since Added in version 3.1.
@ingroup input