SHELL(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

πŸ’– SHELL πŸ’– (library call)

okay so bestie, sit DOWN, hydrate, and get comfy, because we're about to talk about Shell β€” and not the bash kind, the ✨widget✨ kind. This is the man page for the Shell widget class, coming at you from the Shell(library call) corner of the manual. Part 1 of 2, so don't go anywhere. πŸŽ€


✨ NAME ✨

Shell β€” The Shell widget class πŸšπŸ‘‘


✨ SYNOPSIS ✨

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

✨ DESCRIPTION ✨

So what is a Shell, you ask? It's a top-level widget β€” meaning it has exactly one managed child, no more, no less β€” and its whole job is to encapsulate the interaction with the window manager. It's giving main character energy but for window manager negotiations. πŸ’…

Here's the tea on sizing: at the time the shell's child gets managed, the child's width is used for both widgets if the shell is unrealized and no width has been specified for the shell. Otherwise? The shell's width is used for both widgets. And the exact same relations hold for the height of the shell and its child. Symmetry, we love to see it. πŸ¦‹


🌸 Classes 🌸

Shell inherits behavior and resources from Composite and Core. Family tree, iconic.

  • The class pointer is shellWidgetClass.
  • The class name is Shell.

πŸŽ€ New Resources πŸŽ€

The following table defines a set of widget resources used by the programmer to specify data. (Yes bestie, it's a table in the original β€” we're doing bullets, but nothing is getting lost, promise.) The programmer can also set the resource values for the inherited classes to set attributes for this widget.

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).

The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).

The Shell Resource Set 🐚

  • XmNallowShellResize β€” Class XmCAllowShellResize, type Boolean, default False, access CG. Specifies that if this resource is False, the Shell widget instance returns XtGeometryNo to all geometry requests from its children. All Motif convenience create dialog functions override this default value and set XmNallowShellResize to True.
  • XmNcreatePopupChildProc β€” Class XmCCreatePopupChildProc, type XtCreatePopupChildProc, default NULL, access CSG. Specifies the pointer to a function that is called when the Shell widget instance is popped up by XtPopup. The function creates the child widget when the shell is popped up instead of when the application starts up. This can be used if the child needs to be reconfigured each time the shell is popped up. The function takes one argument, the popup shell, and returns no result. It is called after the popup callbacks specified by XmNpopupCallback.
  • XmNgeometry β€” Class XmCGeometry, type String, default NULL, access CSG. Specifies the desired geometry for the widget instance. This resource is examined only when the widget instance is unrealized and the number of its managed children is changed. It is used to change the values of the XmNx, XmNy, XmNwidth, and XmNheight resources. When XtGetValues is called on this resource, the returned value is a pointer to the actual resource value and should not be freed. In addition, this resource is not copied on creation or by XtSetValues. The application must ensure that the string remains valid until the shell is realized.
  • XmNoverrideRedirect β€” Class XmCOverrideRedirect, type Boolean, default False, access CSG. If True, specifies that the widget instance is a temporary window that should be ignored by the window manager. Applications and users should not normally alter this resource.
  • XmNpopdownCallback β€” Class XmCCallback, type XtCallbackList, default NULL, access C. Specifies a list of callbacks that is called when the widget instance is popped down by XtPopdown.
  • XmNpopupCallback β€” Class XmCCallback, type XtCallbackList, default NULL, access C. Specifies a list of callbacks that is called when the widget instance is popped up by XtPopup. The second argument to XtPopup must be XtGrabNone.
  • XmNsaveUnder β€” Class XmCSaveUnder, type Boolean, default False, access CSG. If True, specifies that it is desirable to save the contents of the screen beneath this widget instance, avoiding expose events when the instance is unmapped. This is a hint, and an implementation may save contents whenever it desires, including always or never.
  • XmNvisual β€” Class XmCVisual, type Visual *, default CopyFromParent, access CSG. Specifies the visual used in creating the widget.

🌈 Inherited Resources 🌈

Shell inherits behavior and resources from the superclass described in the following table. For a complete description of each resource, refer to the reference page for that superclass. (Go read it, bestie β€” we're just passing the baton here. 🫢)

The Composite Resource Set 🧩

  • 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.

…and that's literally only half the story, so don't close the tab. Part 2 is right there waiting for you πŸ’œ

✨ Core Resource Set ✨

okay bestie, here's the whole roster πŸ’… every single resource, its class, its type, its default, and who's allowed to touch it (that's the Access column β€” C = create, S = set, G = get, so CSG means you can do all three, G means read-only vibes, etc.). no skips, no cuts, we're doing all of them 🫢

  • 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

ngl the "dynamic" defaults are the main character energy of this table β€” they get figured out at runtime, not from a static value. and <hotpink>XmUNSPECIFIED_PIXMAP</hotpink> is just the classic "bestie I literally did not specify a pixmap" placeholder πŸŽ€


🌸 Translations 🌸

k so here's the tea: there are no translations for Shell. that's it. that's the whole section. nothing to remap, no keybindings waiting for you, she's empty πŸ’€


Composite(3) and Core(3). go read those if you wanna know what she inherits from β€” the family tree matters, iykyk πŸ’œ


and that's a wrap on Shell(library call) β€” source is the library call page itself, and honestly she ate with zero crumbs left. bye bestie, go build something iconic βœ¨πŸ‘‘πŸ¦‹