AuAnyEvent(3)

πŸ’– AuAnyEvent β€” the manual page, but make it make sense πŸ’–

okay so bestie, welcome to AuAnyEvent(3), straight out of the Library Functions Manual ✨ this is the little generic-event baddie of the Network Audio System, and honestly? she's the blueprint. every other event structure is out here copying her homework. let's get into it 🫢


🌸 NAME 🌸

AuAnyEvent β€” any event structure πŸ’…

like... any event. the it-girl of event structs. the one who shows up to every party because she contains the stuff literally every event type has in common πŸ‘‘


πŸŽ€ STRUCTURES πŸŽ€

first things first, you gotta pull in the header:

#include <audio/audiolib.h>

then there's this union situation, AuEvent, where auany is just one of the many flavors chilling inside it (there's more, but they're not this page's business):

typedef union _AuEvent
{
    . . .
    AuAnyEvent auany;
    . . .
}AuEvent;

and here's the actual star of the show, the struct herself:

typedef struct _AuAnyEvent
{
    int type;
    AuUint32 serial;
    AuBool send_event;
    AuServer *server;
    AuTime time;
    AuID id;
}AuAnyEvent;

look at her. six little fields. iconic. no notes πŸ’–


✨ MEMBERS ✨

okay now the gossip on every single member, no skipping, we go through all of them:

  • type β€” the event type, aka what kind of event this even is. the event types that are currently defined are AuEventTypeElementNotify, AuEventTypeGrabNotify, and AuEventTypeMonitorNotify. that's the whole roster rn πŸŽ€
  • serial β€” the serial ID of the event. plot twist: it's expanded from the 16 bit value the server actually sent, so she's been through a glow-up on the way over ✨
  • send_event β€” it's AuTrue if the event came from a SendEvent protocol request. so basically, "did someone hand-deliver this? yes ma'am" πŸ’Œ
  • server β€” the connection to the audio server that the event was read from. this is the phone line the tea came in on ☎️
  • time β€” the server time in milliseconds for when the event was generated. timestamps, bestie. everything has receipts ⏰
  • id β€” the ID of the source of the event. who sent it? now you know πŸ‘€

πŸ’œ DESCRIPTION πŸ’œ

AuAnyEvent is a generic event structure containing members that are common to all event types.

that's it. that's the whole vibe. she's the base, the shared DNA, the group chat everyone's in. if you know her, you know a little bit about every event that could ever slide into your program 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

go read these too, they're all in the same friend group:

  • AuElementNotifyEvent
  • AuMonitorNotifyEvent
  • AuGrabNotifyEvent
  • AuErrorEvent
  • audiolib β€” Network Audio System C Language Interface

🌟 friendly reminder bestie: this page is audiolib - events, version 1.9.4, and it answers to the name AuAnyEvent(3). now go forth and handle your events, you absolute main character πŸ’…πŸ’–βœ¨
πŸ“¦ where this page comes from