XcupQueryVersion(3)

✨ XcupQueryVersion ✨

okay bestie, welcome to the manual page for XcupQueryVersion β€” it lives in section 3 of the X FUNCTIONS manual, and it's the girl who tells you what TOG-CUP protocol version your X server is running πŸ’…


🌸 NAME 🌸

XcupQueryVersion β€” Returns TOG-CUP protocol version supported by the X server

like, that's literally her whole job. she asks the server "what version u on bestie" and reports back 🫢


πŸŽ€ SYNOPSIS πŸŽ€

cc [ flag ... ] file ... -lXext [ library ... ]
#include <X11/extensions/Xcup.h>

Status XcupQueryVersion(Display *display,
       int *major_version_return, int *minor_version_return);

compile it with -lXext (plus whatever other libraries you need, and any flags, and your files, obviously πŸ’–) and pull in <X11/extensions/Xcup.h> or she won't know what you're talking about πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • display β€” the connection to the X server. your link to the mothership, your little chat channel πŸ’Œ
  • major_version_return β€” Returns the major version supported by the server
  • minor_version_return β€” Returns the minor version supported by the server

both of those _return ones are pointers, so she can write into them β€” she's not just reading, she's delivering the tea back to you ⭐


πŸ‘‘ DESCRIPTION πŸ‘‘

XcupQueryVersion sets major_version_return and minor_version_return to the major and minor TOG-CUP protocol version supported by the server. so yeah, she fills in both numbers for you, no cap πŸ”₯

If the TOG-CUP library is compatible with the version returned by the server, it returns nonzero. slay, you're good to go ✨

If the server does not support the TOG-CUP extension, or if there was an error during communications with the server, or if the server and library protocol versions are incompatible, it returns zero. 😭 that's the "we're not compatible bestie, it's not you it's the protocol version" outcome.

🚨 no other Xcup functions may be called before this function. literally none. zero. zip. If a client violates this rule, the effects of all subsequent Xcup calls that it makes are undefined. and undefined is not a vibe, bestie, undefined is a threat πŸ’€ call this one FIRST. it's giving main character energy for a reason.

To get the list of reserved colormap entries, use XcupGetReservedColormapEntries.

To allocate one or more read-only color cells with RGB values, use XcupStoreColors.


🌈 SEE ALSO 🌈

  • XcupGetReservedColormapEntries(3Xext)
  • XcupStoreColors(3Xext)
  • Colormap Utilization Policy and Extension

iykyk πŸ’œ


and that's the whole page, gorgeous πŸŽ€ this came to you from X Version 11, libXext 1.3.6, under the XcupQueryVersion(3) name β€” so go forth, query that version, and remember: call her first, always πŸ«ΆπŸ’–πŸŒΈ

πŸ“¦ where this page comes from