al_get_native...g_event_source(3alleg5)

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

al_get_native_text_log_event_source πŸ’…

okay bestie, welcome to the Allegro 5 API reference manual, Gen Z edition β€” this page is all about al_get_native_text_log_event_source(3alleg5) and it's literally so useful, no cap. 🫢


✨ NAME ✨

al_get_native_text_log_event_source β€” the Allegro 5 API function that hands you the event source for a text log window. that's it, that's the name, periodt. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro_native_dialog.h>

ALLEGRO_EVENT_SOURCE *al_get_native_text_log_event_source(
   ALLEGRO_TEXTLOG *textlog)

okay so you include that header, you call the function with your ALLEGRO_TEXTLOG *textlog, and boom β€” you get back an ALLEGRO_EVENT_SOURCE *. iconic. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so what this does is give you an event source for a text log window. you know, the source you'd register so events from that window actually show up in your event queue. main character energy fr fr. 🌸

the possible events you can get are, like, exactly this one:

  • ALLEGRO_EVENT_NATIVE_DIALOG_CLOSE β€” bestie, the window was requested to be closed. either someone pressed the close button, or someone pressed Escape on the keyboard. that's it. that's the whole vibe. πŸ’€
    • the user.data1 field will hold a pointer to the ALLEGRO_TEXTLOG(3alleg5) which generated the event. like, it points right back at the culprit. πŸ’…
    • the user.data2 field will be 1 if the event was generated as a result of a key press; otherwise it will be zero. so 1 = key press energy, 0 = not that. πŸ™ˆ
ngl, that's the entire event surface β€” one event, two fields, zero drama. keep those user.data1 and user.data2 values straight and you're golden. πŸ‘‘

🌈 SEE ALSO 🌈

nothing else listed here, so go forth and close those text log windows with grace, bestie. 🧚


Allegro reference manual πŸŽ€ al_get_native...g_event_source(3alleg5) β€” mwah, that's the whole page, ty for reading, slay, bye bestie! πŸ’–βœ¨πŸ¦‹πŸ’…πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from