XMCLIPBOARDINQUIREFORMAT(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

πŸ’– XmClipboardInquireFormat πŸ’–

okay bestie, welcome to XmClipboardInquireFormat, a lil library call from the Motif universe that returns a specified format name. yes she's a <library call> and yes she ate. no cap. πŸŽ€


✨ NAME ✨

XmClipboardInquireFormat β€” A clipboard function that returns a specified format name πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Xm/CutPaste.h>
int XmClipboardInquireFormat (display, window, index, format_name_buf,
        buffer_len, copied_len)
        Display * display;
        Window  window;
        int     index;
        XtPointer       format_name_buf;
        unsigned long   buffer_len;
        unsigned long   * copied_len;
(void)

like, that (void) at the bottom is just sitting there serving cunt, don't worry about it 🫢


🌸 DESCRIPTION 🌸

So XmClipboardInquireFormat hands you a specified format name for the data item chillin' in the clipboard. That's the whole vibe. ✨

And here's the tea: if the name has to be truncated, the function returns a warning status. Not an error, just a lil heads up that the name got chopped. πŸ‘‘

Here's the full cast of arguments, bestie:

  • display β€” Specifies a pointer to the Display structure that was returned in a previous call to XOpenDisplay or XtDisplay. it's the ✨ source of truth ✨ basically
  • 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. and listen β€” the same application instance should pass the same window ID to each of the clipboard functions that it calls. consistency is the moment, fr fr πŸŽ€
  • index β€” Specifies which of the ordered format names to obtain. now if this index is greater than the number of formats for the data item, this function returns a 0 (zero) in the copied_len argument. no format for you, babe πŸ™ˆ
  • format_name_buf β€” Specifies the buffer that receives the format name. it's the lil basket 🧺 where the name goes
  • buffer_len β€” Specifies the number of bytes in the format name buffer.
  • copied_len β€” Specifies the number of bytes in the data item copied to the buffer. and if this argument equals 0 (zero), there is no nth format for the data item. literally zero, so like, nothing there πŸ’€

πŸ”₯ RETURN πŸ”₯

these are the statuses she can come back with, and each one is a whole personality:

  • XmClipboardSuccess β€” The function was successful. slay!! she did it, periodt ✨
  • XmClipboardLocked β€” The function failed because the clipboard was locked by another application. okay so the good news is 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. it's giving "hold on bestie, someone else is in the bathroom" πŸšͺπŸ’€
  • XmClipboardTruncate β€” The data returned is truncated because the user did not provide a buffer large enough to hold the data. your basket was too small, the name is hanging out the side 😭
  • XmClipboardNoData β€” The function could not find data on the clipboard corresponding to the format requested. this could occur because:
    • the clipboard is empty;
    • there is data on the clipboard, but not in the requested format;
    • or the data in the requested format was passed by name and is no longer available.

like damn, three whole reasons to come up empty. the vibe check failed πŸ₯²



lowkey reminder bestie: truncation is a warning, not a fail, and a 0 in copied_len means there's no nth format. that's the whole plot. iykyk 🌈

and that's the page!! this was XmClipboardInquireFormat(library call) β€” that's the name up top and down at the bottom, she said it twice bc she's the main character. mwah, love u, go read your man pages πŸ’–πŸŽ€πŸ¦‹βœ¨πŸ’