ALLEGRO_EVENT_TYPE_IS_USER(3alleg5)
π ALLEGRO_EVENT_TYPE_IS_USER π
okay bestie, this one's from the Allegro 5 API (manual page 3alleg5), and it's short, it's sweet, it's giving tiny-but-mighty. let's go π«Ά
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
#define ALLEGRO_EVENT_TYPE_IS_USER(t) ((t) >= 512)
πΈ DESCRIPTION πΈ
so this is a macro, right? and it literally just does a vibe check on your event type. you hand it an event type, and it evaluates to true if that event type is not a builtin event type.
not builtin = it's one of the ones described over in ALLEGRO_EVENT_TYPE(3alleg5). that's the whole deal. (t) >= 512 and boom, you know if it's a custom lil guy you made yourself or a factory-standard Allegro event. π
ngl the threshold 512 is doing all the work here β user event types live at or above it, builtin ones live below. iconic. periodt. β¨
and that's the whole page, bestie, she's tiny but she ate π
sign-off szn π this was brought to you by the Allegro reference manual, sitting pretty at 3alleg5 β go forth and event-type-check responsibly, ily, bye ππ¦
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms