aa_init(3)

🌸 NAME 🌸

okay so bestie, this is aa_init(3) β€” straight out of the Library Functions Manual β€” and it's the function that opens the output display for AA-lib. that's it, that's the whole job description πŸ’–


✨ SYNOPSIS ✨

#include <aalib.h>

aa_context *aa_init
(
     const struct aa_driver *driver,
     const struct aa_hardware_params *defparams,
     const void *driverdata
);

πŸŽ€ PARAMETERS πŸŽ€

  • const struct aa_driver *driver β€” the driver you wanna use, like, the one that actually does the drawing. all the ones you can pick from are chillin' in the NULL terminated aa_drivers array πŸ‘‘
  • const struct aa_hardware_params *defparams β€” the hardware parameters you're asking for. wanna keep it default? just pass aa_defparams and move on, no thoughts head empty ✨
  • const void *driverdata β€” this pointer gets handed directly over to the driver, and it's how you sneak in extra driver dependent parameters. very "pass the aux cord" energy 🎧

πŸ’… DESCRIPTION πŸ’…

so this is the most primitive AA-lib initialization function, and I mean that with love. it gives you way more control over the whole process than the easier to use aa_autoinit does. lowkey the "I'll do it myself" option 🫢

and listen, every single AA-lib program ought to have a call to aa_parseoptions before the first call to aa_init. not a suggestion bestie, it's just how it's done πŸ’€


🌈 RETURNS 🌈

you get back a pointer to a shiny new AA-lib context πŸŽ‰ β€” or NULL if it failed 😭 (in which case, rip, no display for you).


πŸ¦‹ SEE ALSO πŸ¦‹

the whole extended friend group, no cap:


and that's the whole page, periodt πŸ’œ this lil' writeup was brought to you by c2man on aalib.h, dated 8 September 1999 β€” yeah, it's vintage, it's iconic, it's giving retro main character energy πŸ‘‘βœ¨