XSelectionRequestEvent(3)

πŸ’– NAME πŸ’–

okay bestie, this is XSelectionRequestEvent(3) from the <rainbow>XLIB FUNCTIONS</rainbow> corner of the manual, and it's the page for the <pink>SelectionRequest event structure</pink>. It's giving one very specific Xlib event struct, and we're gonna read it together like a group chat. πŸ’…βœ¨

πŸŽ€ STRUCTURES πŸŽ€

The structure for SelectionRequest events contains this, and yes, I'm keeping it character-for-character because we do not mess with typedefs in this house:

       typedef struct {
               int type;       /* SelectionRequest */
               unsigned long serial;   /* # of last request processed by server */
               Bool send_event;        /* true if this came from a SendEvent request */
               Display *display;       /* Display the event was read from */
               Window owner;
               Window requestor;
               Atom selection;
               Atom target;
               Atom property;
               Time time;
       } XSelectionRequestEvent;

When you receive this event, the structure members are set as follows, no cap:

  • type β€” set to the event type constant name that uniquely identifies it. Example time: when the X server reports a GraphicsExpose event to a client application, it sends an XGraphicsExposeEvent structure with the type member set to GraphicsExpose. iconic.
  • display β€” set to a pointer to the display the event was read on.
  • send_event β€” set to True if the event came from a SendEvent protocol request.
  • serial β€” set from the serial number reported in the protocol, but expanded from the 16-bit least-significant bits to a full 32-bit value.
  • window β€” the prose says this member is set to the window that is most useful to toolkit dispatchers. (Yeah, the page says window in the generic event bit even though the typedef above doesn't list a window field β€” I'm just preserving the facts, bestie.)
  • owner β€” set to the window that was specified by the current owner in its XSetSelectionOwner call.
  • requestor β€” set to the window requesting the selection.
  • selection β€” set to the atom that names the selection. For example, PRIMARY is used to indicate the primary selection.
  • target β€” set to the atom that indicates the type the selection is desired in.
  • property β€” can be a property name or None.
  • time β€” set to the timestamp or CurrentTime value from the ConvertSelection request.

πŸ¦‹ SEE ALSO πŸ¦‹

like, go read these too, they're the event-struct cinematic universe, fr fr:

Also on the list: Xlib - C Language X Interface. That's the big-picture Xlib text, bestie. πŸ’œ


okay that's the page, mwah πŸ’‹ β€” the footer situation is <pink>X Version 11</pink>, <pink>libX11 1.8.14</pink>, and the page title XSelectionRequestEvent(3). There's no date in that footer, so I'm not inventing one; no cap, just facts and sparkle. ✨🫢

πŸ“¦ where this page comes from