WMSHELL(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

🌸 WMShell β€” bestie, it's a whole widget class 🌸

okay so this is the manual page for WMShell, the WMShell widget class, and we are gonna get through it together. it's long. it's giving ✨reference material✨. but it's so worth it, i promise. πŸ’–


✨ NAME ✨

WMShell β€” The WMShell widget class

periodt. that's her. that's the name. πŸŽ€


πŸ’… SYNOPSIS πŸ’…

#include <Xm/Xm.h>
#include <X11/Shell.h>

like yes, you include both. no you cannot skip one. bestie the second one is literally where the shell stuff lives. πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so WMShell is a top-level widget β€” main character energy, obviously β€” and what she does is encapsulate the interaction with the window manager. that's the whole vibe. she's the one talking to the WM so you don't have to. πŸ’…

🧚 Classes 🧚

WMShell inherits behavior and resources from the Core, Composite, and Shell classes. so she's got layers. she's complex. she's a whole family tree. 🌸

the class pointer is wmShellWidgetClass.

the class name is WMShell.

ngl, remembering which one is the pointer and which one is the name is the whole game. pointer = lowercase-first wmShellWidgetClass. class name = WMShell. don't mix them up, bestie. 😭

πŸ‘‘ New Resources πŸ‘‘

okay here's the big one. the following table defines a set of widget resources used by the programmer to specify data. the programmer can also set the resource values for the inherited classes to set attributes for this widget. so you're not locked out of the family resources β€” you get those too. πŸ’œ

here's the lil cheat code for your .Xdefaults file, and it's genuinely iconic:

  • to reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters.
  • to specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters β€” in either lowercase or uppercase, but include any underscores between words. don't forget the underscores. fr fr.

and the codes in the access column? they tell you what you're allowed to do with the resource:

  • C β€” can be set at creation time
  • S β€” can be set by using XtSetValues
  • G β€” can be retrieved by using XtGetValues
  • N/A β€” not applicable

so CSG means all three, slay. πŸ”₯

🌈 WMShell Resource Set 🌈

  • XmNbaseHeight / XmCBaseHeight β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNbaseWidth / XmCBaseWidth β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNheightInc / XmCHeightInc β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNiconMask / XmCIconMask β€” type Pixmap, default NULL, access CSG
  • XmNiconPixmap / XmCIconPixmap β€” type Pixmap, default NULL, access CSG
  • XmNiconWindow / XmCIconWindow β€” type Window, default NULL, access CSG
  • XmNiconX / XmCIconX β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNiconY / XmCIconY β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNinitialState / XmCInitialState β€” type int, default NormalState, access CSG
  • XmNinput / XmCInput β€” type Boolean, default False, access CSG
  • XmNmaxAspectX / XmCMaxAspectX β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNmaxAspectY / XmCMaxAspectY β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNmaxHeight / XmCMaxHeight β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNmaxWidth / XmCMaxWidth β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNminAspectX / XmCMinAspectX β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNminAspectY / XmCMinAspectY β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNminHeight / XmCMinHeight β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNminWidth / XmCMinWidth β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNtitle / XmCTitle β€” type String, default dynamic, access CSG
  • XmNtitleEncoding / XmCTitleEncoding β€” type Atom, default dynamic, access CSG
  • XmNtransient / XmCTransient β€” type Boolean, default False, access CSG
  • XmNwaitForWm / XmCWaitForWm β€” type Boolean, default True, access CSG
  • XmNwidthInc / XmCWidthInc β€” type int, default XtUnspecifiedShellInt, access CSG
  • XmNwindowGroup / XmCWindowGroup β€” type Window, default dynamic, access CSG
  • XmNwinGravity / XmCWinGravity β€” type int, default dynamic, access CSG
  • XmNwmTimeout / XmCWmTimeout β€” type int, default 5000 ms, access CSG
lowkey notice how every single one of them is CSG? yeah. you can create it, XtSetValues it, and XtGetValues it. every last one. iconic behavior honestly. πŸ‘‘

and that's it for the resource set β€” no more rows hiding anywhere, i counted twice. 🌟

  • XmNbaseHeight β€” the ✨base✨ of a whole lil' progression of preferred heights that the window manager can use when it sizes this widget. So the preferred heights are XmNbaseHeight plus integral multiples of XmNheightInc, minimum XmNminHeight, maximum XmNmaxHeight. And if you don't give it an initial value but you do give one for XmNbaseWidth, then XmNbaseHeight gets set to 0 (zero) at the moment the widget is realized. iykyk πŸ’…
  • XmNbaseWidth β€” same energy, but for widths, bestie 🫢 It's the base for a progression of preferred widths the window manager uses to size the widget. Preferred widths = XmNbaseWidth plus integral multiples of XmNwidthInc, min XmNminWidth, max XmNmaxWidth. If no initial value is supplied for XmNbaseWidth but one is supplied for XmNbaseHeight, then XmNbaseWidth is set to 0 (zero) when the widget is realized. Mirror moment, iconic.
  • XmNheightInc β€” the increment πŸŽ€ for that progression of preferred heights the window manager uses in sizing. Preferred heights are XmNbaseHeight plus integral multiples of XmNheightInc, with a minimum of XmNminHeight and a maximum of XmNmaxHeight. If no initial value is supplied for XmNheightInc but one is supplied for XmNwidthInc, then XmNheightInc is set to 1 when the widget is realized. not the default being 1 instead of 0, the way it's giving consistency 😭
  • XmNiconMask β€” specifies a bitmap that could be used by the window manager to clip the XmNiconPixmap bitmap, so the icon can be nonrectangular. slay πŸ’…
  • XmNiconPixmap β€” specifies a bitmap that could be used by the window manager as the application's icon. cute.
  • XmNiconWindow β€” specifies the ID of a window that could be used by the window manager as the application's icon. window-as-icon, main character energy ✨
  • XmNiconX β€” a suitable place to put the application's icon; it's a hint to the window manager, in root window coordinates. ⚠️ And because the window manager controls icon placement policy, this resource may be ignored. lowkey just a suggestion fr fr.
  • XmNiconY β€” same thing, the Y half of the vibe: a suitable place to put the application's icon, a hint to the window manager in root window coordinates. And again, the window manager owns icon placement policy, so this resource may be ignored. πŸ™ˆ
  • XmNinitialState β€” the state the application wants the widget instance to start in. It must be one of the constants NormalState or IconicState. no third option, that's the whole menu πŸ’€
  • XmNinput β€” the application's input model for this widget and its descendants. πŸ‘‘ The meaning of a True or False value here depends on whether a WM_TAKE_FOCUS atom is present or absent in the WM_PROTOCOLS property. Here's the whole tea:
    • No input β€” XmNinput is False, WM_TAKE_FOCUS is Absent
    • Passive β€” XmNinput is True, WM_TAKE_FOCUS is Absent
    • Locally active β€” XmNinput is True, WM_TAKE_FOCUS is Present
    • Globally active β€” XmNinput is False, WM_TAKE_FOCUS is Present

For more info on input models, go read the X Consortium Standard Inter-Client Communication Conventions Manual (ICCCM). required reading bestie πŸ“š

  • XmNmaxAspectX β€” the numerator of the maximum aspect ratio (X/Y) the application wants the widget instance to have. πŸ¦‹
  • XmNmaxAspectY β€” the denominator of the maximum aspect ratio (X/Y) the application wants the widget instance to have. the way X and Y are a whole couple 🌸
  • XmNmaxHeight β€” the maximum height the application wants the widget instance to have.
  • XmNmaxWidth β€” the maximum width the application wants the widget instance to have.
  • XmNminAspectX β€” the numerator of the minimum aspect ratio (X/Y) the application wants the widget instance to have.
  • XmNminAspectY β€” the denominator of the minimum aspect ratio (X/Y) the application wants the widget instance to have.
  • XmNminHeight β€” the minimum height the application wants the widget instance to have.
  • XmNminWidth β€” the minimum width the application wants the widget instance to have.
  • XmNtitle β€” the application name the window manager displays. The default is the icon name, if specified; otherwise it's the name of the application. 🚨 And when XtGetValues is called on this resource, the returned value is a pointer to the actual resource value and should not be freed. do not free it bestie, I am begging you 😭
  • XmNtitleEncoding β€” specifies a property type representing the encoding of the XmNtitle string. If a language procedure has been set, the default is None; otherwise the default is XA_STRING. When the widget is realized, if the value is None, the corresponding name is assumed to be in the current locale. The name is passed to XmbTextListToTextProperty with an encoding style of XStdICCTextStyle. The resulting encoding is STRING if the name is fully convertible to STRING; otherwise it's COMPOUND_TEXT. And the values of the encoding resources are not changed β€” they remain None. the way it stays None regardless πŸ’… iconic.
  • XmNtransient β€” a Boolean that's True if the widget instance is transient, typically a popup on behalf of another widget. The window manager may treat a transient widget's window differently from other windows β€” for example, it may not iconify a transient window separately from its associated application. ⚠️ Applications and users should not normally alter this resource. hands off, bestie πŸ™…
  • XmNwaitForWm β€” when True, it specifies that the Intrinsics waits the length of time given by the XmNwmTimeout resource for the window manager to respond to certain actions, before assuming there's no window manager present at all. This resource gets altered by the Intrinsics as it receives β€” or fails to receive β€” responses from the window manager. it updates itself, we love a self-aware queen ✨
  • XmNwidthInc β€” the base for a progression of preferred widths the window manager uses in sizing the widget. The preferred widths are XmNbaseWidth plus integral multiples of XmNwidthInc, with a minimum of XmNminWidth and a maximum of XmNmaxWidth. If no initial value is supplied for XmNwidthInc but one is supplied for XmNheightInc, the value of XmNwidthInc is set to 1 when the widget is realized. yep, 1 again πŸŽ€
  • XmNwindowGroup β€” the ID of a window this widget instance is associated with. By convention, this window is the "leader" of a group of windows. πŸ‘‘ A window manager may treat all the windows in a group some way β€” for example, it may always move or iconify them together. no cap.

If no initial value is specified, the value is set to the window of the first realized ancestor widget in the parent hierarchy when the widget is realized. And if a value of XtUnspecifiedWindowGroup is specified, no window group is set. 🌈

  • XmNwinGravity β€” the window gravity for the window manager to use when positioning the widget. If no initial value is specified, the value is set when the widget is realized. If XmNgeometry is not NULL, XmNwinGravity is set to the window gravity returned by XWMGeometry. Otherwise, XmNwinGravity is set to NorthWestGravity. default corner behavior, so real of it πŸ’…
  • XmNwmTimeout β€” how long the Intrinsics waits for the window manager to respond to certain actions before assuming there is no window manager present. 🚨 The value is in milliseconds and must not be negative. fr fr, don't do it.

🧬 Inherited Resources (the family tree moment)

WMShell inherits behavior and resources from the superclasses described in the following tables. For a complete description of each resource, go read the reference page for that superclass. passing the vibe check up the hierarchy 🫢

πŸ’… Shell Resource Set πŸ’…

Okay bestie, here's the whole squad of resources the shell core brings to the party. Name, class, type, default, access β€” every single one of them, no skips, no cap. 🫢

  • XmNallowShellResize β€” class XmCAllowShellResize, type Boolean, default False, access CG.
  • XmNcreatePopupChildProc β€” class XmCCreatePopupChildProc, type XtCreatePopupChildProc, default NULL, access CSG.
  • XmNgeometry β€” class XmCGeometry, type String, default NULL, access CSG.
  • XmNoverrideRedirect β€” class XmCOverrideRedirect, type Boolean, default False, access CSG.
  • XmNpopdownCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C.
  • XmNpopupCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C.
  • XmNsaveUnder β€” class XmCSaveUnder, type Boolean, default False, access CSG.
  • XmNvisual β€” class XmCVisual, type Visual *, default CopyFromParent, access CSG.

🌈 Composite Resource Set 🌈

And these are the ones the composite layer hands you β€” the little trio that manages the children situation. Very main character energy, very brief. ✨

  • XmNchildren β€” class XmCReadOnly, type WidgetList, default NULL, access G.
  • XmNinsertPosition β€” class XmCInsertPosition, type XtOrderProc, default NULL, access CSG.
  • XmNnumChildren β€” class XmCReadOnly, type Cardinal, default 0, access G.

okay bestie, welcome to the resource era ✨ this is the whole Core Resource Set β€” every single one, no skips, no skimming, we are reading the whole menu πŸ’…

🌸 Core Resource Set 🌸

Every resource gets its class, its type, its default, and its access β€” all of it, verbatim, because we do not leave details behind 🫢

  • XmNaccelerators β€” class XmCAccelerators, type XtAccelerators, default dynamic, access CSG
  • XmNancestorSensitive β€” class XmCSensitive, type Boolean, default dynamic, access G
  • XmNbackground β€” class XmCBackground, type Pixel, default dynamic, access CSG
  • XmNbackgroundPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderColor β€” class XmCBorderColor, type Pixel, default XtDefaultForeground, access CSG
  • XmNborderPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderWidth β€” class XmCBorderWidth, type Dimension, default 0, access CSG
  • XmNcolormap β€” class XmCColormap, type Colormap, default dynamic, access CG
  • XmNdepth β€” class XmCDepth, type int, default dynamic, access CG
  • XmNdestroyCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C
  • XmNheight β€” class XmCHeight, type Dimension, default dynamic, access CSG
  • XmNinitialResourcesPersistent β€” class XmCInitialResourcesPersistent, type Boolean, default True, access C
  • XmNmappedWhenManaged β€” class XmCMappedWhenManaged, type Boolean, default True, access CSG
  • XmNscreen β€” class XmCScreen, type Screen *, default dynamic, access CG
  • XmNsensitive β€” class XmCSensitive, type Boolean, default True, access CSG
  • XmNtranslations β€” class XmCTranslations, type XtTranslations, default dynamic, access CSG
  • XmNwidth β€” class XmCWidth, type Dimension, default dynamic, access CSG
  • XmNx β€” class XmCPosition, type Position, default 0, access CSG
  • XmNy β€” class XmCPosition, type Position, default 0, access CSG

πŸŽ€ Translations πŸŽ€

And here's the plot twist bestie: there are no translations for WMShell. That's it. That's the whole tea. Not a single one. The vibe check came back empty 😭


go read those too, bestie, they're literally the friend group πŸ‘‘


and that's the whole page, you ate it fr fr πŸ’…βœ¨ this one's a library call from WMShell β€” the source/version and date live on that little footer line down at the bottom of the page, so go give it a lil kiss for me πŸ’– slay, periodt, bye bestie πŸ¦‹