SDL_CreateSystemCursor(3)

πŸ’– SDL_CreateSystemCursor πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and lemme tell you, today's main character is SDL_CreateSystemCursor β€” she makes you a system cursor. that's it, that's the vibe. πŸ–±οΈβœ¨


✨ NAME ✨

SDL_CreateSystemCursor β€” Create a system cursor. πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_mouse.h>

SDL_Cursor * SDL_CreateSystemCursor(SDL_SystemCursor id);

like. look at her. one include, one function call, no drama. πŸ’…


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • id β€” an SDL_SystemCursor enum value. that's the whole personality of this argument, she just wants to know which system cursor you want, okay? πŸ‘‘

🫢 RETURN VALUE 🫢

Returns a cursor on success, or NULL on failure β€” and if you get the NULL, don't panic, just call SDL_GetError() for more information. she'll tell you what went wrong, fr fr. 😭


πŸ”₯ THREAD SAFETY πŸ”₯

bestie. main thread only. this function should only be called on the main thread. no side-quest threads for this one, she's loyal. 🚫🧡

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. vintage-ish but iconic. πŸ‘‘


⭐ SEE ALSO ⭐

  • SDL_DestroyCursor(3) β€” because everything you create, you eventually gotta let go of. πŸ’€

Simple Directmedia Layer πŸŽ€ SDL 3.4.18 πŸŽ€ SDL_CreateSystemCursor(3)

and that's the whole page bestie!! tysm for reading, go forth and make cursors, ily, bye πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from