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

✨ XmClipboardInquireCount πŸ’–

okay so bestie, welcome to the XmClipboardInquireCount page from the library call manual, and no cap this one is a lil cutie. she's a clipboard function, she counts things, she tells you how long the format names are. that's it. that's the whole vibe. πŸŽ€


🌸 NAME 🌸

XmClipboardInquireCount β€” a clipboard function that returns the number of data item formats. literally that's her whole job bestie, she counts. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Xm/CutPaste.h>
int XmClipboardInquireCount (display, window, count,
        max_format_name_length)
        Display * display;
        Window  window;
        int     * count;
        unsigned long   * max_format_name_length;
(void)

like look at her. four args. so clean. so demure. πŸ’œ


🌈 DESCRIPTION 🌈

okay so XmClipboardInquireCount returns the number of data item formats available for the data item in the clipboard. and she's not done β€” she also returns the maximum name-length for all formats in which the data item is stored. multitasking queen. πŸ‘‘

  • display β€” Specifies a pointer to the Display structure that was returned in a previous call to XOpenDisplay or XtDisplay. yes bestie you already have this, you got it earlier, just pass it in. 🫢
  • 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 vibe check here, fr fr. πŸ¦‹
  • count β€” Returns the number of data item formats available for the data item in the clipboard. if no formats are available, this argument equals 0 (zero). and yes, the count includes the formats that were passed by name. inclusive queen. πŸ’–
  • max_format_name_length β€” Specifies the maximum length of all format names for the data item in the clipboard. so you know how much room to give those names. iconic of her honestly. ✨

πŸ’… RETURN πŸ’…

  • XmClipboardSuccess β€” The function was successful. slay!! we love a happy ending. πŸŽ‰
  • XmClipboardLocked β€” The function failed because the clipboard was locked by another application. 😭 not the other app hogging it. but it's fine bestie, 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, your app gets to be the one to check in with the user. main character energy honestly. πŸ™ˆ
  • 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. three whole reasons, all of them valid, all of them tragic. πŸ’€
lowkey a warning for the girlies: XmClipboardLocked and XmClipboardNoData are real possibilities, so handle them, don't just pretend they won't happen. no cap.

iykyk, go read that one next bestie. πŸ“š


and that's the whole page!! πŸŽ€ this was XmClipboardInquireCount(library call) β€” the source is the library call manual, and yeah, the footer is literally just the title again so I'm folding it into this lil sign-off instead. byeeee, go count some formats, you absolute queen. πŸ‘‘πŸ’–βœ¨