XCUP(3)

πŸ’… XCUP β€” XcupGetReservedColormapEntries (manual, section 3, the X FUNCTIONS girlies) ✨

okay bestie, sit DOWN, because this one is literally about finding out which colormap entries the system already called dibs on πŸŽ€


🌸 NAME 🌸

XcupGetReservedColormapEntries β€” list colormap entries reserved by the system πŸ’–


✨ SYNOPSIS ✨

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

Status XcupGetReservedColormapEntries(Display *display,
       int screen, XColor **colors_out, int *ncolors);

no cap, that's the whole vibe. compile with -lXext and include that header, periodt 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • display β€” the connection to the X server. your lil hotline to the server, basically πŸ’…
  • screen β€” screen number on the host server. which screen we're talking about, bestie πŸ‘‘
  • colors_out β€” returns the values reserved by the server. this is where the tea gets poured out 🌸
  • ncolors β€” returns the number of items in colors_out. how many lil entries showed up to the party πŸ’œ

πŸ’– DESCRIPTION πŸ’–

so the way that XcupGetReservedColormapEntries works is: it returns a list of colormap entries (pixels) that are reserved by the system. that's it, that's the function, and it ate πŸ”₯

this list will, at a minimum, contain entries for the BlackPixel and WhitePixel of the specified screen. so even on the most minimal day, black and white are always in the group chat ✨

bestie listen. use XFree to free colors_out. do NOT forget. we do not leak memory in this house, that's not the vibe 😭

and here's the iconic part β€” to minimize colormap flash, an application which installs its own private colormap should query the special colors by calling XCupGetReservedColormapEntries, and can then store those entries (in the proper location) in its private colormap using XCupStoreColors. like, look before you leap, queen πŸ‘‘


🌈 SEE ALSO 🌈

  • XcupQueryVersion(3Xext)
  • XcupStoreColors(3Xext)
  • XFree(3X11)
  • Colormap Utilization Policy and Extension

that's the whole page, bestie, you're officially an Xcup girlie now πŸ§šπŸ’œ

this was X Version 11, libXext 1.3.6, and yeah it's page XCUP(3) β€” mwah, slay, bye πŸ’…πŸŽ€

πŸ“¦ where this page comes from