XtGetSelectionRequest(3)

✨ NAME ✨

Okay so bestie, this page is all about XtGetSelectionRequest β€” the function that retrieves the event that triggered the XtConvertSelectionProc. It lives in the XT FUNCTIONS manual, section 3, and honestly? It's giving "I was called from inside a selection callback and I need answers."

πŸ“œ SYNTAX πŸ“œ

#include <X11/Intrinsic.h>

XSelectionRequestEvent* XtGetSelectionRequest(Widget w, Atom selection,
       XtRequestId request_id);

πŸŽ€ ARGUMENTS πŸŽ€

  • w β€” Specifies the widget. Like, the widget in question, bestie.
  • selection β€” Specifies the selection being processed. Which selection we're processing rn.
  • request_id β€” Specifies the requestor id in the case of incremental selections, or NULL in the case of atomic transfers. So: requestor id when it's incremental, NULL when it's atomic.

πŸ’… DESCRIPTION πŸ’…

Okay so here's the tea: XtGetSelectionRequest may only be called from within an XtConvertSelectionProc procedure. Like, that's the whole vibe check β€” you cannot just call it from anywhere, bestie. When you do call it from in there, it returns a pointer to the SelectionRequest event that caused the conversion procedure to be invoked.

request_id specifies a unique id for the individual request in the case that multiple incremental transfers are outstanding. For atomic transfers, request_id must be specified as NULL. And if no SelectionRequest event is being processed for the specified widget, selection, and request_id, XtGetSelectionRequest returns NULL. Periodt.

🌈 SEE ALSO 🌈

  • X Toolkit Intrinsics - C Language Interface
  • Xlib - C Language X Interface

This page is from X Version 11, libXt 1.3.1, XtGetSelectionRequest(3) β€” and the footer didn't give us a date, so we're just gonna say it's timeless, no cap πŸ’–

πŸ“¦ where this page comes from