MRMFETCHLITERAL(3)
π MrmFetchLiteral π
okay bestie, welcome to the MrmFetchLiteral glow-up page, straight out of the library call section of the manual. this is MrmFetchLiteral(3), and she is that girl: she reaches into a UID file and pulls out a literal (a named value) and its type. grab a snack, we're learning π
β¨ NAME β¨
MrmFetchLiteral β fetches a literal from a UID file π
πΈ SYNOPSIS πΈ
#include <Mrm/MrmPublic.h>
Cardinal MrmFetchLiteral(
MrmHierarchy hierarchy_id,
String index,
Display *display,
XtPointer *value,
MrmCode *type);
π¦ DESCRIPTION π¦
so the MrmFetchLiteral function reads and returns the value and type of a literal (named value) that is stored as a public resource in a single UID file. it hands you back a pointer to the value of the literal, periodt. like, an integer is always returned as a pointer to an integer, and a string is always returned as a pointer to a string. consistency queen π
bestie, listen: applications should not useMrmFetchLiteralfor fetching icon or color literals. if you try it anyway?MrmFetchLiteralreturns an error. it's giving "no β€οΈ". that is not her job, that's a whole other function's job.
here's the cast of characters, one by one π
hierarchy_idβ specifies the ID of the UID hierarchy that contains the specified literal. the value ofhierarchy_idwas returned in a previous call toMrmOpenHierarchyPerDisplay. so like, you already met her earlier, she's not new here.indexβ specifies the UIL name of the literal (pixmap) to fetch. you must define this name in UIL as an exported value, no cap. if it's not exported, she can't find it, simple as that.displayβ specifies the display used for the pixmap. thedisplayargument specifies the connection to the X server. for more info on theDisplaystructure, go look at the Xlib functionXOpenDisplay. she's the plug for the server connection fr fr πvalueβ returns the ID of the named literal's value. the function allocates space for the returned value, so the application is responsible for managing the allocated space by calling the appropriate deallocation function. for example, if the returned ID symbolizes a pixmap, then the application can recover the allocated space by callingXmDestroyPixmap. yeah bestie, you gotta clean up after yourself, that's the rules π§Ήβ¨typeβ returns the named literal's data type. types are defined in the include fileMrm/MrmPublic.h. go read the header, it's got the receipts π
π RETURN π
this function returns one of the following status return constants, and honestly each one is a different mood:
MrmSUCCESSβ the function executed successfully. ate and left no crumbs π₯MrmBAD_HIERARCHYβ the hierarchy ID was invalid. she doesn't know her πMrmNOT_FOUNDβ the literal was not found in the UIL file. it's not there, babe, she looked πMrmWRONG_TYPEβ the caller tried to fetch a literal of a type not supported by this function. wrong vibe, wrong function, respectfully πMrmFAILUREβ the function failed. sometimes things just don't work out, and that's the tea π
π RELATED π
go read these next, they're all in the friend group:
MrmFetchBitmapLiteral(3)MrmOpenHierarchyPerDisplay(3)MrmFetchIconLiteral(3)MrmFetchColorLiteral(3)XOpenDisplay(3)
and that's the whole page, bestie π«Ά this was MrmFetchLiteral from the library call manual, and yeah, the footer is literally just MrmFetchLiteral(library call) β no date, no version drama, she's timeless like that β go forth and fetch your literals responsibly π
π¦ 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