SDL_SetCursor(3)

SDL_SetCursor3

Set the active cursor.

Usage

#include "SDL3/SDL.h"

bool SDL_SetCursor(SDL_Cursor *cursor);

Header file

Defined in SDL3/SDL_mouse.h

Overview

This function sets the currently active cursor to the specified one. If the cursor is currently visible, the change will be immediately represented on the display. SDL_SetCursor (NULL) can be used to force cursor redraw, if this is desired for any reason.

Function parameters

cursor

a cursor to make active.

Return value

Returns true on success or false on failure; call

SDL_GetError () for more information.

Thread safety

This function should only be called on the main thread.

Releases

12 releases since Debian 3.0 (Woody); the text changed 3 times.

  1. 3.0–4.0
  2. 5.0
  3. 6.0–12
  4. 13

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.