XtParseAcceleratorTable(3)
π XtParseAcceleratorTable(3) β managing accelerator tables π
okay bestie, gather round, because today we're talking about the XT FUNCTIONS girlies from libXt β specifically XtParseAcceleratorTable, XtInstallAccelerators, and XtInstallAllAccelerators. yes, all three. they're a trio, they ride together, they're a friend group. π
β¨ NAME β¨
XtParseAcceleratorTable, XtInstallAccelerators, XtInstallAllAccelerators β managing accelerator tables π
πΈ SYNTAX πΈ
first things first, you gotta invite the header to the party:
#include <X11/Intrinsic.h>
then, the three besties in question:
XtAccelerators XtParseAcceleratorTable(const char * source);
void XtInstallAccelerators(Widget destination, Widget source);
void XtInstallAllAccelerators(Widget destination, Widget source);
π¦ ARGUMENTS π¦
sourceβ specifies the accelerator table to compile. that's the one you're feeding intoXtParseAcceleratorTable, just so we're clear, because there are twosources in this function family and they are NOT the same girl. πdestinationβ specifies the widget on which the accelerators are to be installed. the glow-up location. the target. πsourceβ specifies the widget or the root widget of the widget tree from which the accelerators are to come. yes, same name as the first one. different vibe. keep up bestie. π
π DESCRIPTION π
XtParseAcceleratorTable π«
XtParseAcceleratorTable compiles the accelerator table into the opaque internal representation. it takes your cute little text and turns it into the mysterious internal glow-up version. no cap.
XtInstallAccelerators β¨
XtInstallAccelerators installs the accelerators from source onto destination by augmenting the destination translations with the source accelerators. like, it's literally adding to the destination's translation list, not replacing it. obsessed with that for them.
and here's the extra credit part: if the source display_accelerator method is non-NULL, XtInstallAccelerators calls it β with the source widget and a string representation of the accelerator table. what does that string say? basically "hey, my accelerators have been installed, you should display them appropriately." π
the string representation of the accelerator table is its canonical translation table representation. iconic.
XtInstallAllAccelerators π
XtInstallAllAccelerators recursively descends the widget tree rooted at source and installs the accelerators of each widget encountered onto destination. yes, every single one. it's thorough, it's committed, it's giving main character energy.
a common use is to call XtInstallAllAccelerators and pass the application main window as the source. like, that's the move. that's the whole plot. π«Ά
β SEE ALSO β
XtParseTranslationTable(1)X Toolkit Intrinsics - C Language InterfaceXlib - C Language X Interface
π friendly reminder: this is the libXt crew, X Version 11 territory. the opaque internal representation is opaque β don't go poking at it, bestie, it's not for you. π
and that's the whole page, fr fr. πΈ this was libXt 1.3.1 under X Version 11, served fresh from the XT FUNCTIONS section β mwah, sending you and your accelerator tables all the love, now go install some accelerators and slay. ππβ¨π¦π
π¦ 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 1993 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms