XMCLIPBOARDINQUIREPENDINGITEMS(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ NAME ✨

XmClipboardInquirePendingItems β€” a clipboard function that hands you back a whole list of data ID/private ID pairs πŸ’… this is from the XmClipboard...endingItems library call page, bestie, and it's lowkey iconic.


πŸŽ€ SYNOPSIS πŸŽ€

#include <Xm/CutPaste.h>
int XmClipboardInquirePendingItems (display, window, format_name, item_list, count)
        Display * display;
        Window  window;
        char    * format_name;
        XmClipboardPendingList  * item_list;
        unsigned long   * count;
(void)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so XmClipboardInquirePendingItems returns a list of data ID/private ID pairs for the format name you asked about. And what even counts as pending, you ask? An item is pending if the application originally passed it by name, the application hasn't copied the data yet, AND the item hasn't been deleted from the clipboard. All three, no cap. πŸ™ˆ

Heads up: the application is responsible for freeing the memory that this function provides to store the list. To free it, call XtFree. Not optional. Free your memory, bestie, it's self-care. πŸ’–

This function gets used by an application when it's exiting, to figure out whether the data that was passed by name should be sent to the clipboard.

  • display β€” Specifies a pointer to the Display structure that was returned in a previous call to XOpenDisplay or XtDisplay. 🌈
  • window β€” Specifies the window ID of a widget that relates the application window to the clipboard. You can get the widget's window ID through XtWindow. The same application instance should pass the same window ID to each of the clipboard functions that it calls. Consistency is the vibe, periodt. πŸ‘‘
  • format_name β€” Specifies a string that contains the name of the format for which the list of data ID/private ID pairs is to be obtained. ✨
  • item_list β€” Specifies the address of the array of data ID/private ID pairs for the specified format name. This argument is a type XmClipboardPendingList. The application is responsible for freeing the memory provided by this function for storing the list. (Yes, saying it twice. Because it MATTERS. 😭)
  • count β€” Specifies the number of items returned in the list. If there is no data for the specified format name, or if there is no item on the clipboard, this argument equals 0 (zero). Zero. Zilch. Nothing on the clipboard, nothing in your count. πŸ“

πŸ’€ RETURN πŸ’€

  • XmClipboardSuccess β€” The function was successful. Slay! πŸŽ‰
  • XmClipboardLocked β€” The function failed because the clipboard was locked by another application. 😀 The application can continue to call the function again with the same parameters until the lock goes away. This gives the application the opportunity to ask if the user wants to keep trying or to give up on the operation. So like... you could keep knocking, or you could let it go. Your call, main character. πŸ’…


And that's the whole thing, bestie β€” straight from the XmClipboard...endingItems library call page, XmClipboard...endingItems, library call, no date on it, so I'm not gonna make one up. 🫢 Stay pending, stay free-ing your memory with XtFree, and go be iconic. πŸ’–βœ¨