XMSCREEN(3)
okay so welcome to the XmScreen(3) library call page, bestie ๐ this is literally the Screen widget class and we are about to get into it.
โจ NAME โจ
XmScreen โ The Screen widget class ๐
โจ SYNOPSIS โจ
#include <Xm/Screen.h>
โจ DESCRIPTION โจ
so the XmScreen object is what Motif widgets use to stash info that is specific to a screen. it also lets the toolkit keep certain deets on widget hierarchies that would otherwise be unavailable. and here's the vibe: every client gets exactly one XmScreen object for each screen it accesses. no cap.
and bestie, you do not even have to make one yourself โ an XmScreen object gets auto-created the moment your application creates the first shell on a screen (usually that is a call to XtAppInitialize or XtAppCreateShell). so like, it is not necessary to create an XmScreen object by any other means, periodt. if you want the widget ID of the XmScreen object for a given screen, just call XmGetXmScreen and it is yours ๐ซถ
okay important: you cannot supply initial values for XmScreen resources as arguments to a call to any function that creates widgets. nope. instead, the application or the user can supply initial values in a resource file. then, after creating the first shell on the screen, the application can hit up XmGetXmScreen to obtain the widget ID of the XmScreen object and then call XtSetValues to set the XmScreen resources. slay โจ
๐ Classes ๐
Screeninherits behavior and resources fromCore. iykyk.- the class pointer is
xmScreenClass. - the class name is
XmScreen.
๐ธ New Resources ๐ธ
so the table below (well, the table that is about to show up, bestie, keep reading) defines a set of widget resources used by the programmer to specify data. you can also set the resource values for the inherited classes to set attributes for this widget. here is the tea on referencing resources in an .Xdefaults file: if you are referencing by name or by class, remove the XmN or XmC prefix and use the remaining letters. and if you are specifying one of the defined values for a resource in an .Xdefaults file, remove the Xm prefix and use the remaining letters โ either lowercase or uppercase, does not matter, 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). got it? ๐
๐ the resource roster (read it, memorise it, slay)
Okay so here's the full lineup of resources this widget is serving. Every one of them, no skips, bestie ๐ โ name, class, type, default and access, all of it:
XmNbitmapConversionModelโ classXmCBitmapConversionModel, typeXtEnum, defaultXmPIXMAP, accessCSG??XmNcolorAllocationProcโ classXmCColorAllocationProc, typeXtProc, defaultNULL, accessCSG??XmNcolorCalculationProcโ classXmCColorCalculationProc, typeXtProc, defaultNULL, accessCSG??XmNdarkThresholdโ classXmCDarkThreshold, typeint, defaultdynamic, accessCXmNdefaultCopyCursorIconโ classXmCDefaultCopyCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultInvalidCursorIconโ classXmCDefaultInvalidCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultLinkCursorIconโ classXmCDefaultLinkCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultMoveCursorIconโ classXmCDefaultMoveCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultNoneCursorIconโ classXmCDefaultNoneCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultSourceCursorIconโ classXmCDefaultSourceCursorIcon, typeWidget, defaultNULL, accessCSGXmNdefaultValidCursorIconโ classXmCDefaultValidCursorIcon, typeWidget, defaultNULL, accessCSGXmNfontโ classXmCFont, typeXFontStruct *, defaultNULL, accessCSGXmNforegroundThresholdโ classXmCForegroundThreshold, typeint, defaultdynamic, accessCXmNhorizontalFontUnitโ classXmCHorizontalFontUnit, typeint, defaultdynamic, accessCSGXmNinsensitiveStippleBitmapโ classXmCinsensitiveStippleBitmap, typeBitmap, default"50_foreground", accessCSGXmNlightThresholdโ classXmCLightThreshold, typeint, defaultdynamic, accessCXmNmenuCursorโ classXmCCursor, typeCursor, defaultarrow, accessCXmNmoveOpaqueโ classXmCMoveOpaque, typeBoolean, defaultFalse, accessCSGXmNunpostBehaviorโ classXmCUnpostBehavior, typeunsigned char, defaultXmUNPOST_AND_REPLAY, accessCSGXmNuseColorObjectโ classXmCUseColorObject, typeBoolean, defaultFalse, accessCXmNuserDataโ classXmCUserData, typeXtPointer, defaultNULL, accessCSGXmNverticalFontUnitโ classXmCVerticalFontUnit, typeint, defaultdynamic, accessCSG
๐ XmNbitmapConversionModel
So this one's literally the policy girl for turning xbm and xpm files into the Pixmap type. It decides how that glow-up happens. It takes these values, and yes you have to pick:
XmMATCH_DEPTH
From a supplied xbm or xpm file, generates a converted pixmap file having the same depth as the widget.
XmDYNAMIC_DEPTHโ takes an inputxbmfile and turns it into aPixmapof depth 1, or takes an inputxpmfile and turns it into aPixmapthat has the same depth as the widget. cute, right?
๐ the resources, continued ๐
XmNcolorAllocationProcโ this one names the procedure that gets used for color allocation. Normally it's a procedure you (the app) define. But bestie, if you never set one? The system just falls back on Motif's own predefined color allocation procedure. no drama ๐XmNcolorCalculationProcโ names the procedure used for per-widget color calculation. Again, normally it's an application-defined color calculation procedure. And again, if you didn't set one, the system uses Motif's predefined color calculation procedure. she's got backups for days โจXmNdarkThresholdโ an integer from 0 (zero) to 100, inclusive. It sets a level of perceived brightness for a color. If the perceived brightness of the background color is below this level, Motif treats that background as "dark" when it's computing the default shadow and select colors. If you set this resource for a particular screen, it applies to widgets created on that screen; otherwise it applies to widgets created on all screens. The default value is implementation specific ๐XmNdefaultCopyCursorIconโ theDragIconused during a drag operation when that operation is a copy and no other pixmap was specified by the application. If this resource isNULL, a system default icon gets used instead. And that system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultInvalidCursorIconโ theDragIconused to say "hey, the cursor is over an invalid drop site" during a drag operation, when no other pixmap symbol was specified by the application. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultLinkCursorIconโ theDragIconused during a drag operation when the operation is a link and no other pixmap was specified by the application. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultMoveCursorIconโ theDragIconused during a drag operation when the operation is a move and no other pixmap was specified by the application. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultNoneCursorIconโ theDragIconused to say "the cursor is not over a drop site" during a drag operation, when no other pixmap was specified by the application. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultSourceCursorIconโ the depth-1 pixmap used as a cursor when anXmNsourceCursorIconwas not provided by theDragContext, or when it was provided but is not usable. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNdefaultValidCursorIconโ theDragIconused to say "the cursor is over a valid drop site" during a drag operation, when no other pixmap was specified by the application. If this resource isNULL, a system default icon is used. The system default icon is determined by the Display resourceXmNenableDragIcon.XmNfontโ specifies a font to use when computing values forXmNhorizontalFontUnitandXmNverticalFontUnit. When an application is initialized, this resource can be supplied in a resource file, or through the standard command line options-fn,-font, and-xrm. Heads up though: this resource is used only for the calculation of the font unit values. If you want to specify a font that's actually used to display text, use a widget's render table resource (XmNrenderTable). different job, bestie ๐XmNforegroundThresholdโ an integer from 0 (zero) to 100, inclusive, that specifies a level of perceived brightness for a color. Here's the tea: if the perceived brightness of the background color is equal to or below this level, Motif treats the background as "dark" when computing the default foreground and highlight colors. If the perceived brightness of the background color is above this level, Motif treats the background as "light" when computing the default foreground and highlight colors. When the background is "dark," the default foreground and highlight is white; when the background is "light," the default foreground and highlight is black. If this resource is specified for a particular screen, it applies to widgets created on that screen; otherwise, it applies to widgets created on all screens. The default value is implementation specific.XmNhorizontalFontUnitโ specifies the horizontal component of the font units used byXmConvertUnits, and it's what's used to interpret the values of geometry resources when theXmNshellUnitTyperesource ofVendorShell, or theXmNunitTyperesource ofGadget,Manager, orPrimitive, has the valueXm100TH_FONT_UNITS.
If no initial value is supplied for this resource, the default is computed from the font specified in XmNfont. If no initial value is supplied for this resource or for XmNfont, the default is 10.
If a call to XtSetValues specifies a value for XmNhorizontalFontUnit, this resource is set to that value. If a call to XtSetValues specifies a value for XmNfont but not for XmNhorizontalFontUnit, this resource is set to a value computed from the new XmNfont.
A horizontal font unit is derived from a font like this:
- If the font has an
AVERAGE_WIDTHproperty, the horizontal font unit is theAVERAGE_WIDTHproperty divided by 10. - If the font has no
AVERAGE_WIDTHproperty but has aQUAD_WIDTHproperty, the horizontal font unit is theQUAD_WIDTHproperty. - If the font has no
AVERAGE_WIDTHorQUAD_WIDTHproperty, the horizontal font unit is the sum of the font structure'smin_bounds.widthandmax_bounds.widthdivided by 2.3.
she really said "we'll find a way" ๐
XmNinsensitiveStippleBitmapโ hands widgets the bitmap to use when generating the insensitive visual. This bitmap is meant to be used as the stipple for the rendering of insensitive visuals.XmNlightThresholdโ an integer from 0 (zero) to 100, inclusive, that specifies a level of perceived brightness for a color. If the perceived brightness of the background color is above this level, Motif treats the background as "light" when computing default shadow and select colors. If this resource is specified for a particular screen, it applies to widgets created on that screen; otherwise it applies to widgets created on all screens. The default value is implementation specific.XmNmenuCursorโ sets a variable that controls the cursor used whenever this application posts a menu. You can only specify this resource once, at application startup time, either by putting it in a defaults file or by using the-xrmcommand line argument. like, for example:
myProg -xrm "*menuCursor: arrow"
You can also pick the menu cursor inside the program itself, through the function XmSetMenuCursor. Here's the list of acceptable cursor names. If the application doesn't specify a cursor, or if an invalid name gets supplied, the default cursor (an arrow pointing up and to the right) is what you get. ๐ซถ
The acceptable cursor names are X_cursor, leftbutton, arrow, ll_angle, based_arrow_down, lr_angle, based_arrow_up, man, boat, middlebutton, bogosity, mouse, bottom_left_corner, pencil, bottom_right_corner, pirate, bottom_side, plus, bottom_tee, question_arrow, box_spiral, right_ptr, center_ptr, right_side, circle, right_tee, clock, rightbutton, coffee_mug, rtl_logo, cross, sailboat, cross_reverse, sb_down_arrow, crosshair, sb_h_double_arrow, diamond_cross, sb_left_arrow, dot, sb_right_arrow, dotbox, sb_up_arrow, double_arrow, sb_v_double_arrow, draft_large, shuttle, draft_small, sizing, draped_box, spider, exchange, spraycan, fleur, star, gobbler, target, gumby, tcross, hand1, top_left_arrow, hand2, top_left_corner, heart, top_right_corner, icon, top_side, iron_cross, left_ptr, left_side, top_tee, left_tee, trek, ul_angle, umbrella, ur_angle, watch, xterm. ๐
ngl that list is giving encyclopedia, but every single one of those names is real and load-bearing, so don't skip any ๐
XmNmoveOpaqueโ okay bestie, this one is lowkey about the drama of moving windows. It specifies whether an interactive operation that moves a window โ like tearing off and dragging a tear-off menu, or moving a window inMWMโ displays an outline of the window or a representation of the window itself during the move. If the value isTrue, the operation displays a representation of the window during the move. If the value isFalse, the operation displays an outline of the window. SoTrue= actual window realness,False= ghost outline era. ๐XmNunpostBehaviorโ this is the menu behavior lore. It specifies the behavior of an active menu posted in traversal mode when a subsequent menu button selection is made outside the posted menu. When the value isXmUNPOST_AND_REPLAY, the resource unposts the menu hierarchy and causes the server to replay the event to the window in which the pointer is located. When the value isXmUNPOST, the resource unposts the hierarchy without replaying the event. Two moods: replay the event or just dip. Periodt.XmNuseColorObjectโ color-sharing simulator, but make it widget. Enables and disables the sharing of colors between widgets, and the dynamic changing of colors. A value ofFalsedisables this, and a value ofTrueenables it. Simple as that, no cap.XmNuserDataโ a lil' pocket for your app's stuff. Allows the application to attach any necessary specific data to the widget. This is an internally unused resource. So it's giving "storage closet," not "active feature," iykyk.XmNverticalFontUnitโ font unit math time, bestie, stay with me. Specifies the vertical component of the font units used byXmConvertUnitsand used to interpret the values of geometry resources when theXmNshellUnitTyperesource ofVendorShellor theXmNunitTyperesource ofGadget,Manager, orPrimitivehas the valueXm100TH_FONT_UNITS. If no initial value is supplied for this resource, the default is computed from the font specified inXmNfont. If no initial value is supplied for this resource or forXmNfont, the default is10.
If a call to XtSetValues specifies a value for XmNverticalFontUnit, this resource is set to that value. If a call to XtSetValues specifies a value for XmNfont but not for XmNverticalFontUnit, this resource is set to a value computed from the new XmNfont.
A vertical font unit is derived from a font as follows:
- If the font has a
PIXEL_SIZEproperty, the vertical font unit is thePIXEL_SIZEproperty divided by1.8. - If the font has no
PIXEL_SIZEproperty but hasPOINT_SIZEandRESOLUTION_Yproperties, the vertical font unit is the product of thePOINT_SIZEandRESOLUTION_Yproperties divided by1400. - If the font has no
PIXEL_SIZE,POINT_SIZE, orRESOLUTION_Yproperties, the vertical font unit is the sum of the font structure'smax_bounds.ascentandmax_bounds.descentdivided by2.2.
Math ate, honestly. ๐งฎโจ
๐งฌ Inherited Resources ๐งฌ
All of the superclass resources inherited by XmScreen are designated N/A (not applicable). So yeah, they said "not applicable" and we respect the boundary. ๐
๐ RELATED ๐
Core(3), XmDisplay(3), XmGetXmScreen(3), and XmSetMenuCursor(3), โ yes, that trailing comma is staying, it's part of the iconique original energy. Don't @ me. ๐
Okay bestie, that's the whole page. The footer at the very bottom says XmScreen(library call) โ that's the source/version stamp, and there's no date in this bit, so that's the cute lil' sign-off moment. Go forth and configure your screens with main character energy. ๐๐ฆ
๐ฆ where this page comes from
- arch rolling: openmotif 2.3.8-4 ยท LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 ยท LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 ยท LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 ยท LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 ยท LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 ยท LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 ยท LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 ยท LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 ยท LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 ยท LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms