XtGetClassExtension(3)
π XtGetClassExtension β a whole function, bestie, and it's iconic
okay so picture this: you're deep in X Toolkit Intrinsics (that's Xt, the section 3 library function vibe) and you need to find one specific class extension record. That's literally what XtGetClassExtension does. It's from the XT FUNCTIONS corner of the manual, and yes, it's giving "locate a class extension record." periodt. πΈ
β¨ SYNTAX β¨
#include <X11/Intrinsic.h>
XtPointer XtGetClassExtension(WidgetClass object_class, Cardinal
byte_offset, XrmQuark type, long version, Cardinal record_size);
like, that's the whole signature. memorize it or don't, she's not judging π«Ά
π ARGUMENTS π
object_classβ the widget class that's holding the extension list we're about to go rummaging through. bestie, this is the class being searched. πbyte_offsetβ the offset in bytes from the base of the widget class to the extension field we're searching. it's the lil address math moment. β¨typeβ the name of the class extension we're trying to locate. the one. the main character. πversionβ the minimum acceptable version of the class extension required for a match. so if it's older than this? not it. πrecord_sizeβ the minimum acceptable length of the class extension record required for a match, or0. yes, zero is allowed, she's flexible like that. π
π DESCRIPTION π
So the list of extension records sitting at that specified offset in the specified widget_class? It gets searched. And what counts as a match, you ask? three things, and she's picky in the best way:
- a match on the specified
type, - a
versiongreater than or equal to the specifiedversion, - a record size greater than or equal to the specified
record_sizeβ but only ifrecord_sizeis nonzero. (zero = no size requirement, she's chill)
And then? XtGetClassExtension returns a pointer to a matching extension record, or NULL if no match is found. simple. elegant. slay. β¨
π¨ okay this part is IMPORTANT, no cap: the returned extension record is owned by the widget class and must not be modified or freed by the caller. Not your record, bestie, hands off. π The only exception is that it may possibly be modified by the widget class owner. That's it. That's the rule. π
π¦ SEE ALSO π¦
- X Toolkit Intrinsics - C Language Interface
- Xlib - C Language X Interface
and that's the whole page, bestie!! π this one's from X Version 11, shipping with libXt 1.3.1 β go forth and locate those class extension records responsibly, mwah πβ¨πΈ
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright (c) 1993, 1994 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms