XGETEXTENSIONVERSION(3)

πŸ’– XGETEXTENSIONVERSION β€” okay bestie, let's talk ✨

So there's this lil manual page, XGETEXTENSIONVERSION(3), and it's giving input extension version query energy. Yes, section 3. Library functions. We're in the big leagues now, babe. πŸŽ€


🌸 NAME 🌸

XGetExtensionVersion β€” ask the input extension what version it's on, bestie. That's literally it. That's the whole job. πŸ’…


✨ SYNOPSIS ✨

okay so first you gotta bring in the header, no cap:

#include <X11/extensions/XInput.h>

and then the actual call, which looks like this:

XExtensionVersion *XGetExtensionVersion( Display *display,
                                         char *name);

the arguments 🫢

  • display β€” the connection to the X server. your whole lil link to the server, that's her. πŸ’œ
  • name β€” the extension you're asking about. and listen, the input extension name is defined in the header file XI.h. so go look there if you're lost, i gotchu. 🌸

🌈 DESCRIPTION 🌈

ok so real talk for a sec. the XGetExtensionVersion request is deprecated and should not be used in XI2 applications. like, at all. and if a client issues an XGetExtensionVersion request, they will not be able to use XI2 features. that's the trade, bestie. no takebacks. πŸ’€

The XGetExtensionVersion request queries the version of the input extension, and returns an XExtensionVersion structure. this structure contains a major_version and minor_version number, and you can compare those against constants defined in XI.h. iconic. πŸ”₯

here's the vibe: support for extra protocol requests that got added to the input extension after its initial release is indicated by a version number corresponding to the added requests. and every version contains all the protocol requests contained by previous versions. so like, nothing gets dropped, she just grows. main character energy fr fr. πŸ‘‘

and pookie, please β€” you should use XFree to free the XExtensionVersion structure. don't leave her hanging. 🧚


πŸ¦‹ STRUCTURES πŸ¦‹

This request returns an XExtensionVersion structure. say it with me:

typedef struct {
    int present;
    short major_version;
    short minor_version;
} XExtensionVersion;

present, major_version, minor_version. three lil fields, one big job. slay. πŸ’…βœ¨


and that's the whole page, bestie!! this was XGetExtensionVersion(3), from the XGETEXTENSIONVERSION(3) manual, dated 05/18/2026. go free your structs, hydrate, and don't use deprecated requests in your XI2 apps. mwah. πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from