XMINSTALLIMAGE(3)
π XmInstallImage β the pixmap cache glow-up π
ok bestie, sit down, because we're talking about XmInstallImage, a library call from the Xm crew. It's the function that slides an image into the image cache so you can turn it into a pixmap later. Very backstage-pass energy. π
β¨ NAME β¨
XmInstallImage β a pixmap caching function that adds an image to the image cache. it's giving "put your fave in the group chat so everyone can use it" π«Ά
β¨ SYNOPSIS β¨
#include <Xm/Xm.h>
Boolean XmInstallImage(
XImage * image,
char * image_name);
β¨ DESCRIPTION β¨
okay so XmInstallImage stores an image in an image cache, and that cache can later be used to generate a pixmap. main character behavior fr fr. π
part of the installation process is to extend the resource converter used to reference these images. the resource converter gets handed the image name so the image can be referenced in a .Xdefaults file. and since an image can be referenced by a widget through its pixmap resources, it is up to the application to make sure the image is installed before the widget is created. no cap, order matters here. β°
imageβ points to the image structure to be installed. the installation process does not make a local copy of the image, so the application should not destroy the image until it's uninstalled from the caching functions. lowkey important: don't yeet it early. πimage_nameβ specifies a string that the application uses to name the image. after installation, this name can be used in.Xdefaultsfor referencing the image. a local copy of the name is created by the image caching functions. so the name gets a little clone, the image does not. iconic asymmetry. β¨
the image caching functions provide a set of eight preinstalled images. these names can be used within a .Xdefaults file for generating pixmaps for the resource for which they're provided. π
backgroundβ a tile of solid background25_foregroundβ a tile of 25% foreground, 75% background50_foregroundβ a tile of 50% foreground, 50% background75_foregroundβ a tile of 75% foreground, 25% backgroundhorizontalβ a tile of horizontal lines of the two colorsverticalβ a tile of vertical lines of the two colorsslant_rightβ a tile of slanting lines of the two colorsslant_leftβ a tile of slanting lines of the two colorsmenu_cascadeβ a tile of an arrow of the foreground colormenu_checkmarkβ a tile of a checkmark of the foreground colormenu_dashβ a tile of one horizontal line of the foreground color
β¨ RETURN β¨
returns True when successful. returns False if NULL image, NULL image_name, or a duplicate image_name is used as a parameter value. so basically: no image, no name, or name already taken = sad girl hours. π
β¨ RELATED β¨
XmUninstallImage(3), XmGetPixmap(3), and XmDestroyPixmap(3). the whole friend group, honestly. π
π and that's the whole page bestie β it'sXmInstallImage(library call)from theXmlibrary docs, page footer and all, version vibes included. now go install an image before you create that widget, i'm begging. π¦β¨
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- 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