AuGrabNotifyEvent(3)

✨ AuGrabNotifyEvent β€” the grab notify event structure, bestie ✨

okay so this is a page from the audiolib manual, section 3 (library functions), and we're talking about AuGrabNotifyEvent πŸ’– it's the struct that holds a grab notify event, and yes it's giving "we documented this before we built it" energy, but we'll get to that πŸ™ˆ


🌸 STRUCTURES 🌸

first up, the include. you gotta have it, no cap:

#include <audio/audiolib.h>

then here's the big union it lives inside β€” note the ... bits, those are the other event types chilling in there too, we're just zooming in on our girl augrabnotify:

typedef union _AuEvent
{
    . . .
    AuGrabNotifyEvent augrabnotify;
    . . .
}AuEvent;

and here's the actual struct, character for character, don't touch a thing:

typedef struct _AuGrabNotifyEvent
{
    int type;
    AuUint32 serial;
    AuBool send_event;
    AuServer *server;
    AuTime time;
    AuID id;
    unsigned char kind;
    unsigned char pad1;
    unsigned short pad2;
    AuID client;
}AuGrabNotifyEvent;

πŸŽ€ MEMBERS πŸŽ€

every single field, explained with love:

  • type β€” the event type, bestie. GrabNotify events are type AuEventTypeGrabNotify. that's the whole vibe check right there ✨
  • serial β€” the serial ID of the event, expanded from the 16 bit value the server sent. so it started smol and got glow-up'd to a full ID πŸ’…
  • send_event β€” AuTrue if the event came from a SendEvent protocol request. otherwise, it didn't, periodt.
  • server β€” the connection to the audio server that the event was read from. your server bae 🫢
  • time β€” the server time in milliseconds when the event was generated. timestamped, iconic ⭐
  • id β€” the ID of the component that got grabbed. main character component, honestly πŸ‘‘
  • kind β€” either AuGrabNotifyKindRequested or AuGrabNotifyKindReleased. pick your fighter 🌈
  • pad1 β€” literally just padding, it's filler, it's the background dancer πŸ’€
  • pad2 β€” same deal, more padding, still not the moment πŸ™ˆ
  • client β€” the client making the grab. it's them, they did it πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: GrabNotify events get sent to client applications to let them know that a component has been grabbed or released. that's it, that's the plot 🌸


πŸ¦‹ NOTES πŸ¦‹

not implemented. so this is all just speculation. 😭

fr fr, none of this is real yet. it's giving concept art. it's giving pinterest board for a room that doesn't exist. we're documenting the dream πŸ’«


🧚 SEE ALSO 🧚

go read these next, they're all in the family:

  • AuAnyEvent
  • AuElementNotifyEvent
  • AuErrorEvent
  • AuMonitorNotifyEvent

and also:

  • audiolib β€” Network Audio System C Language Interface

that's the whole page, bestie!! mwah πŸ’– this little icon came from the audiolib β€” events corner of the world, version 1.9.4, and it's the AuGrabNotifyEvent(3) page specifically β€” go forth and grab (or release) responsibly βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from