XpInputSelected(3Xp)

πŸ’… XpInputSelected β€” like, the vibe check for your X Print events πŸ’…

Okay bestie, so this is XpInputSelected from the XPRINT FUNCTIONS section of the manual (it's XpInputSelected(3Xp) if you're keeping track ✨). It tells you which X Print events a client has signed up to receive from one specific print context. Very demure, very mindful, very query-energy. πŸŽ€


✨ SYNOPSIS ✨

cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>

unsigned long XpInputSelected ( display, context, event_mask )
      Display *display;
      XPContext context;
      unsigned long *all_event_mask_return;

(Yes, the synopsis line says event_mask in the parameter list β€” that's literally how it's written, don't come for me 😭 β€” the actual declared param is all_event_mask_return. Both are shown above exactly as the page gives them. πŸ’€)


🫢 ARGUMENTS 🫢

  • display β€” a pointer to the Display structure, which you got back from XOpenDisplay. The classic. The main character. πŸ‘‘
  • context β€” the print context you're querying. This is the specific one, not a vibe in general. πŸ–¨οΈ
  • all_event_mask_return β€” returns the set of events that any client has selected. So like, the group chat's collective choices, not just yours. πŸ’–

🌸 DESCRIPTION 🌸

So XpInputSelected returns a bit mask describing which event classes this client has selected to receive. Slay. ✨

The value handed back to all_event_mask_return is the union of every client's event mask β€” literally everyone's selections combined. No cap. 🫢

XpInputSelected queries which X Print events, from the specified print context, the client has selected to receive. Here's the important little twist: the X Print Events are generated from a print context, and not from a window like they are with XSelectInput. Different beast entirely, bestie. πŸ¦‹

As events arrive, the context field in the event is used to figure out which print context generated it. Detective work, but make it X11. πŸ”

See XpSelectInput for the event_mask and all_event_mask (??return??) values. (That ??return?? is in the original, I'm just the messenger πŸ˜­πŸ™ˆ)


πŸ’€ DIAGNOSTICS πŸ’€

  • XPBadContext β€” the specified print context is not valid. Not iconic of it, honestly. 🚩

πŸ”₯ SEE ALSO πŸ”₯

  • XpSelectInput(3Xp)

That's the whole page, bestie β€” go forth and query those event masks πŸ’œ

A lil sign-off: this came from X Version 11, libXp 1.0.4, and yes the whole thing is stamped XpInputSelected(3Xp) β€” periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from