AuScanForTypedEvent(3)

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

πŸ’– AuScanForTypedEvent β€” bestie's guide to snagging the first event of a specific type πŸ’–

okay so this one lives in the audiolib manual (the Network Audio System C Language Interface crew 🎧) and it's genuinely such a useful little function. it's giving "I don't want any event, I want that event" energy. periodt.


✨ Name ✨

AuScanForTypedEvent β€” return the first event of a specific type 🎯


πŸ¦‹ Synopsis πŸ¦‹

#include <audio/audiolib.h>

AuBool AuScanForTypedEvent(server, mode, dequeue, type, event)
    AuServer *server;
    int mode;
    AuBool dequeue;
    int type;
    AuEvent *event; /* RETURN */

like yes she returns an AuBool and yes she takes five whole arguments, she's that girl πŸ’…


🌸 Arguments 🌸

  • server β€” the connection to the audio server. your link to the whole situation 🫢
  • mode β€” how far to look for a match, like how deep you're willing to dig through the group chat. this should be one of these constants: AuEventsQueuedAlready, AuEventsQueuedAfterReading, or AuEventsQueuedAfterFlush πŸ‘‘
  • dequeue β€” if a matching event is found, should it be removed from the queue? literally just "do you want to keep it or yeet it" ✨
  • type β€” the type of event to match. the type should be one of these constants: AuEventTypeElementNotify, AuEventTypeGrabNotify, or AuEventTypeMonitorNotify πŸ”₯
  • event β€” returns the matching event if found. the main character of the whole operation πŸ’–

πŸ’œ Description πŸ’œ

AuScanForTypedEvent scans the event queue looking for the first event that matches type. she's on a mission and she will not be distracted, no cap.

if mode is AuEventsQueuedAlready, AuScanForTypedEvent only checks for events already in the queue. like, it's not getting up off the couch for this one, it only looks at what's already in the room πŸ™ˆ

if mode is AuEventsQueuedAfterReading, and a matching event isn't found already in the queue, AuScanForTypedEvent attempts to read more events out of the application's connection. okay so now she's actually going to go check the mail πŸ“¬

if mode is AuEventsQueuedAfterFlush and a matching event isn't already in the queue or isn't waiting to be read, AuScanForTypedEvent flushes the output queue and attempts to read more events out of the application's connection. full send. she flushes, she reads, she does the absolute most and honestly? iconic 🌈

if dequeue is AuTrue, and a matching event is found, it is removed from the queue. so like, take it, it's yours, it's gone now ✨


πŸŽ€ See Also πŸŽ€

  • AuEventsQueued
  • AuScanEvents
  • AuNextEvent
  • audiolib β€” Network Audio System C Language Interface

ngl bestie, this is the "find the one specific event" function and the mode argument is basically your "how hard should I try" dial. choose wisely πŸ’€

mwah πŸ’‹ that's a wrap from the <b>audiolib β€” event handling</b> girlies, version <b>1.9.5</b>, and this page is literally <b>AuScanForTypedEvent(3)</b>. go forth and scan, queen πŸ‘‘

πŸ“¦ where this page comes from