XPRESENT(3)

πŸ“¦
version 1.0.1 Β· 3 versions
, in debian trixie, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Xpresent β€” it's the X Present Extension, bestie. The whole library. Periodt.


✨ SYNTAX ✨

okay so here's the actual incantation, and yes you have to #include it first, no skipping:

#include <X11/extensions/Xpresent.h>

Bool XPresentQueryExtension (Display *dpy, int *major_opcode_return,
     int *event_base_return, int *error_base_return);

Status XPresentQueryVersion (Display *dpy,
     int *major_version_return,
     int *minor_version_return);

int XPresentVersion (void);

πŸŽ€ ARGUMENTS πŸŽ€

  • dpy β€” the connection to the X server. your lil phone line to the server, basically.

πŸ¦‹ DESCRIPTION πŸ¦‹

Xpresent is a library built to interface with the X Present Extension. and what does that extension do, you ask? it gives applications a way to update their window contents from a pixmap in a well defined fashion β€” synchronizing with the display refresh and potentially using a more efficient mechanism than copying the contents of the source pixmap. no cap, that's the whole point. slay.

so like, XPresentQueryExtension checks whether the X server specified by dpy supports the X Present extension.

  • if the server does not support it β†’ returns False. πŸ’€
  • if the server does support it β†’ returns True, and sets the values of major_opcode_return, event_base_return, and error_base_return β€” but only if those pointers are not NULL. so don't be passing garbage, okay?
⚠️ Clients MUST call the XPresentQueryExtension function to verify the server supports the extension before calling any other function for this extension. like, that's not optional, that's the vibe check you do first. every time.

XPresentQueryVersion sets the values pointed to by major_version_return and minor_version_return to the version of the extension supported by the X server specified by dpy.

and then β€” per the page itself β€” XPresentQueryVersion returns the version of the libXpresent library in use, as defined by the PRESENT_VERSION macro in <X11/extensions/Xpresent.h>. iconic macro behavior, iykyk.


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, go read them too:


🌸 RESTRICTIONS 🌸

Xpresent will remain upward compatible after the 1.0 release. so future you is safe, bestie, breathe. 🫢


πŸ’œ AUTHORS πŸ’œ

Keith Packard, Intel β€” literal main character energy, we thank him for his service. πŸ™‡β™€οΈ


okay and one last thing, the receipts: this page comes from X Version 11, it's documenting libXpresent 1.0.1, and it lives in the XPRESENT(3) section of the manual. mwah, that's the whole page, go call XPresentQueryExtension first, bye!! πŸ’…βœ¨πŸŽ€