al_set_system_mouse_cursor(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_set_system_mouse_cursor β€” the Allegro 5 API glow-up that lets you swap out which system mouse cursor your display is serving πŸ’… (this page lives in the 3alleg5 manual, bestie, so you know it's the real one)


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

bool al_set_system_mouse_cursor(ALLEGRO_DISPLAY *display,
   ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. you take a display, you take a cursor_id, and you tell Allegro "this is the vibe now" β€” the given system mouse cursor becomes the current mouse cursor for the given display. πŸ–±οΈβœ¨

And the tea: if the cursor is currently shown right now (as opposed to hidden), the change is immediately visible. like, no waiting, instant slay. if it's hidden, then obviously you won't see anything yet, because it's hidden, bestie. πŸ™ˆ

lowkey important: if the cursor you asked for doesn't exist on the current platform, another cursor will be silently substituted. no error, no drama, no warning β€” it just quietly hands you a different one. so don't be shocked when your cute little cursor isn't the one that shows up. πŸ’€

Now, the cursors, the whole lineup, no skips, we're listing every single one because we don't gatekeep here:

  • ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_ARROW
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_QUESTION
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT
  • ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE

That's all nineteen, all accounted for, we left nobody behind. πŸ‘‘

And what does it give you back? Returns true on success, false on failure. that's it. that's the whole return value. no extra lore. πŸ’–


🌸 SEE ALSO 🌸


and that's the whole page, bestie!! 🫢 this was the Allegro reference manual, page al_set_system_mouse_cursor(3alleg5) β€” go forth and make your mouse pointer the moment it deserves to be. periodt. πŸ’œπŸ¦‹

πŸ“¦ where this page comes from