MRMOPENHIERARCHYPERDISPLAY(3)
π¦ MrmOpenHierarchyPerDisplay β the library call that opens ALL ur UID files at once π
okay bestie, gather round, because this one is literally the girl who opens every door in the house at the same time and then hands u a little ID badge for the whole hallway. it's MrmOpenHierarchyPerDisplay, it lives in the library call section of the manual, and she is serving.
β¨ NAME β¨
MrmOpenHierarchyPerDisplay β Allocates a hierarchy ID and opens all the UID files in the hierarchy π
β¨ SYNOPSIS β¨
#include <Mrm/MrmPublic.h>
Cardinal MrmOpenHierarchyPerDisplay(
Display *display,
MrmCount num_files,
String file_names_list[],
MrmOsOpenParamPtr *ancillary_structures_list,
MrmHierarchy *hierarchy_id);
πΈ DESCRIPTION πΈ
So like, MrmOpenHierarchyPerDisplay lets u hand over the whole list of UID files that MRM is gonna search through in all the fetch operations that come after. and every single subsequent fetch operation returns the first occurrence of the named item it bumps into while it's walking the UID hierarchy from the first list element (that's the UID file specification) alllll the way to the last list element. no cap, first match wins. π
This function also allocates a hierarchy ID and opens every UID file in the hierarchy. it initializes the optimized search lists in the hierarchy too, because she's efficient like that. and β important β if MrmOpenHierarchyPerDisplay runs into any errors while it's doing its thing, any files that were already opened get closed. she cleans up after herself, periodt.
β οΈ Your app must callXtAppInitializebefore callingMrmOpenHierarchyPerDisplay. Do not skip this. This is not a vibe, this is a requirement. π
Here's the whole cast of arguments, one by one:
displayβ Specifies the connection to the X server and the value to pass toXtResolvePathname. If u wanna know more about theDisplaystructure, go read the Xlib functionXOpenDisplay, she explains it there. π₯οΈnum_filesβ Specifies the number of files in the name list. literally just how many.file_names_listβ Specifies an array of character strings that identify the UID files. πancillary_structures_listβ A list of operating-system-dependent ancillary structures corresponding to items such as filenames, clobber flags, and so forth. This argument should beNULLfor most operations. If u actually need to reference this structure, go look at the definition ofMrmOsOpenParamPtrin theMrmPublic.hheader file for more info. (ngl for most of us this is justNULLand we move on π )hierarchy_idβ Returns the search hierarchy ID. The search hierarchy ID identifies the list of UID files that MRM searches (in order) when performing subsequent fetch calls. this is ur little receipt π§Ύβ¨
π pathnames, because this is the part where it gets β¨interestingβ¨
Every UID file string in file_names_list can specify either a full pathname or a filename.
- If a UID file string has a leading
/(slash), it specifies a full pathname, and MRM opens the file exactly as specified. done. easy. π― - Otherwise, the UID file string specifies a filename. In this case MRM looks for the file along a search path specified by the
UIDPATHenvironment variable, or by a default search path β and which default search path depends on whether or not theXAPPLRESDIRenvironment variable is set.
The UIDPATH environment variable specifies a search path and naming conventions associated with UID files. It can contain the substitution field %U, where the UID file string from the file_names_list argument to MrmOpenHierarchyPerDisplay is substituted for %U. It can also contain the substitution fields accepted by XtResolvePathname. The substitution field %T is always mapped to uid. The entire path is searched first with %S mapped to .uid. If no file is found, it is searched again with %S mapped to NULL. π
For example, the following UIDPATH value and MrmOpenHierarchyPerDisplay call cause MRM to open two separate UID files:
UIDPATH=/uidlib/%L/%U.uid:/uidlib/%U/%L
static char *uid_files[] = {"/usr/users/me/test.uid", "test2"};
MrmHierarchy *Hierarchy_id;
MrmOpenHierarchyPerDisplay((MrmCount)2,uid_files, NULL, Hierarchy_id)
MRM opens the first file, /usr/users/me/test.uid, as specified in the file_names_list argument to MrmOpenHierarchyPerDisplay, because the UID file string in the file_names_list argument specifies a full pathname. MRM looks for the second file, test2, first as /uidlib/%L/test2.uid and second as /uidlib/test2/%L, where the display's language string is substituted for %L. ποΈ
π«Ά AfterMrmOpenHierarchyPerDisplayopens the UID hierarchy, u should not delete or modify the UID files until u close the UID hierarchy by callingMrmCloseHierarchy. hands off the files bestie, they're in use.
π if UIDPATH is not set but XAPPLRESDIR IS set
MRM searches the following pathnames:
%U%S$XAPPLRESDIR/%L/uid/%N/%U%S$XAPPLRESDIR/%l/uid/%N/%U%S$XAPPLRESDIR/uid/%N/%U%S$XAPPLRESDIR/%L/uid/%U%S$XAPPLRESDIR/%l/uid/%U%S$XAPPLRESDIR/uid/%U%S$HOME/uid/%U%S$HOME/%U%S/usr/lib/X11/%L/uid/%N/%U%S/usr/lib/X11/%l/uid/%N/%U%S/usr/lib/X11/uid/%N/%U%S/usr/lib/X11/%L/uid/%U%S/usr/lib/X11/%l/uid/%U%S/usr/lib/X11/uid/%U%S/usr/include/X11/uid/%U%S
π if NEITHER UIDPATH nor XAPPLRESDIR is set
MRM searches the following pathnames:
%U%S$HOME/%L/uid/%N/%U%S$HOME/%l/uid/%N/%U%S$HOME/uid/%N/%U%S$HOME/%L/uid/%U%S$HOME/%l/uid/%U%S$HOME/uid/%U%S$HOME/%U%S/usr/lib/X11/%L/uid/%N/%U%S/usr/lib/X11/%l/uid/%N/%U%S/usr/lib/X11/uid/%N/%U%S/usr/lib/X11/%L/uid/%U%S/usr/lib/X11/%l/uid/%U%S/usr/lib/X11/uid/%U%S/usr/include/X11/uid/%U%S
π These paths are defaults that vendors may change. For example, a vendor may use different directories for/usr/lib/X11and/usr/include/X11. so like, don't @ her if ur distro moved the furniture around.
π§ the substitutions, decoded
%Uβ The UID file string, from thefile_names_listargument.%Nβ The class name of the application.%Lβ The display's language string. This string is influenced byXtSetLanguageProc. The default string is determined by callingsetlocale(LC_ALL, NULL).%lβ The language component of the display's language string.%Sβ The suffix to the filename. The entire path is first searched with a suffix of.uid. If no file is found, it is searched again with aNULLsuffix.
π RETURN π
This function returns one of the following status return constants:
MrmSUCCESSβ The function executed successfully. slay. βMrmNOT_FOUNDβ File not found. π where is sheMrmFAILUREβ The function failed. π
π₯ RELATED π₯
MrmCloseHierarchy(3)β because every open needs her closing counterpart, iykyk.
and that's the whole page bestie!! this was pulled straight out of the MrmOpenHier...yPerDisplay(library call) manual page β yes the title is truncated with an ellipsis in the header and the footer, that's just how the man page prints it, it's iconic honestly πβ¨
π¦ 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