XdbeQueryExtension(3)

πŸ’– XdbeQueryExtension(3) β€” the X FUNCTIONS girlies know πŸ’–

okay bestie, welcome to the XdbeQueryExtension page, from the X FUNCTIONS corner of the manual-verse ✨ this is your lil' vibe-check function β€” it tells you what DBE protocol version the server is running before you go doing literally anything else. πŸ¦‹


✨ NAME ✨

XdbeQueryExtension β€” returns the version of DBE supported by the server. periodt. πŸ’…


🌸 SYNOPSIS 🌸

#include <X11/extensions/Xdbe.h>

Status XdbeQueryExtension(
    Display *dpy,
    int     *major_version_return,
    int     *minor_version_return)

like. look at her. three args, one Status, so clean. πŸŽ€


πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do? she sets major_version_return and minor_version_return to the major and minor DBE protocol version supported by the server. that's the whole assignment and she ate. πŸ”₯

if the DBE library is compatible with the version returned by the server, this function returns non-zero. slay. πŸ’–

but bestie, listen β€” she returns zero if any of these happen:

  • dpy does not support the DBE extension
  • there was an error during communication with the server
  • the server and library protocol versions are incompatible
🚨 THE RULE, and I cannot stress this enough: no other Xdbe functions may be called before this function. like, none of them. if a client violates this rule, the effects of all subsequent Xdbe calls that it makes are undefined. undefined!! 😭 not "probably fine", not "eh it'll work out" β€” straight up undefined behaviour. so do the vibe check first, always. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, i'm obsessed with all of them:

  • DBE
  • XdbeAllocateBackBufferName()
  • XdbeBeginIdiom()
  • XdbeDeallocateBackBufferName()
  • XdbeEndIdiom()
  • XdbeFreeVisualInfo()
  • XdbeGetBackBufferAttributes()
  • XdbeGetVisualInfo()
  • XdbeSwapBuffers()

and that's the whole page, no cap πŸ’œ this one's from X Version 11, libXext 1.3.6, and yeah it's literally titled XdbeQueryExtension(3) β€” go query that extension, bestie, you got this πŸŒˆβœ¨πŸ’…

πŸ“¦ where this page comes from