al_peek_next_event(3alleg5)
β¨ al_peek_next_event β Allegro 5 API β¨
okay bestie, welcome to al_peek_next_event(3alleg5), a certified iconic entry in the Allegro 5 manual π this one is short, sweet, and honestly kind of a queen β let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
bool al_peek_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
π DESCRIPTION π
so here's the vibe: this function peeks π at the next event chillin' in the event queue you passed in β the one you named with queue β and it copies that event's contents straight into ret_event, then hands you back true. slay.
but here's the part that makes it peek and not take, bestie β the original event packet stays right where it is, at the head of the queue. it does not get removed. it does not get consumed. it just sits there looking pretty, main character energy, waiting for you to come back for it later π₯
and if the event queue is actually empty? false, babe. that's it. and the contents of ret_event are unspecified β like, genuinely unspecified, no cap, don't go reading it and expecting anything cute in there. π
not me peeking at events and then pretending I didn't touch anything π the queue literally does not know
π¦ SEE ALSO π¦
go read those too, iykyk β¨
mwah π that's the whole page β brought to you by the Allegro reference manual, filed under al_peek_next_event(3alleg5), periodt. ππ¦π
π¦ 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