AuAnyEvent(3)

πŸ“¦ version 1.9.5, in fedora 43, fedora 44

✨ AuAnyEvent β€” bestie edition ✨

okay so this is a page from the Library Functions Manual, and it's all about AuAnyEvent β€” the generic event struct from the Network Audio System's C language interface (audiolib). sit down, grab a boba, we're gonna understand this together πŸ’–


πŸŽ€ NAME πŸŽ€

AuAnyEvent β€” any event structure. literally the blueprint that every event type has in common. she's the blueprint, she's the moment. πŸ’…


🌸 STRUCTURES 🌸

first up, the big union. AuEvent is a union that holds all the event types, and AuAnyEvent is just one of the members chilling inside it (marked here as auany, with . . . standing in for all the other members):

#include <audio/audiolib.h>

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

and here's the actual struct, in all her glory:

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

πŸ¦‹ MEMBERS πŸ¦‹

  • type β€” the event type. the currently defined event types are AuEventTypeElementNotify, AuEventTypeGrabNotify, and AuEventTypeMonitorNotify. that's the whole roster rn, no cap.
  • serial β€” the serial ID of the event, expanded from the 16 bit value that the server sent. she got ✨enlarged✨.
  • send_event β€” AuTrue if the event came from a SendEvent protocol request. that's the whole vibe check right there.
  • server β€” the connection to the audio server that the event was read from. it's giving "where did you come from, where did you go".
  • time β€” the server time in milliseconds when the event was generated. timestamps, iconic.
  • id β€” the ID of the source of the event. who's the main character that caused this? it's in here.

πŸ’œ DESCRIPTION πŸ’œ

okay so the whole point: AuAnyEvent is a generic event structure containing the members that are common to all event types. like, every event struct has these same fields, so this is the one you can look at when you don't care which specific event type you've got. the way that she's universal?? obsessed. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

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

that's the page bestie, you ate it up πŸ’…βœ¨

this lil writeup came from the audiolib - events corner of the docs, version 1.9.5, and it's filed under AuAnyEvent(3). mwah, bye!! πŸŽ€πŸ’–πŸ¦‹πŸŒΈ
πŸ“¦ where this page comes from