1MrmFetchLiteral(library call) MrmFetchLiteral(library call)
2
3
4
6 MrmFetchLiteral — Fetches a literal from a UID file
7
9 #include <Mrm/MrmPublic.h>
10 Cardinal MrmFetchLiteral(
11 MrmHierarchy hierarchy_id,
12 String index,
13 Display *display,
14 XtPointer *value,
15 MrmCode *type);
16
18 The MrmFetchLiteral function reads and returns the value and type of a
19 literal (named value) that is stored as a public resource in a single
20 UID file. This function returns a pointer to the value of the literal.
21 For example, an integer is always returned as a pointer to an integer,
22 and a string is always returned as a pointer to a string.
23
24 Applications should not use MrmFetchLiteral for fetching icon or color
25 literals. If this is attempted, MrmFetchLiteral returns an error.
26
27 hierarchy_id
28 Specifies the ID of the UID hierarchy that contains the spec‐
29 ified literal. The value of hierarchy_id was returned in a
30 previous call to MrmOpenHierarchyPerDisplay.
31
32 index Specifies the UIL name of the literal (pixmap) to fetch. You
33 must define this name in UIL as an exported value.
34
35 display Specifies the display used for the pixmap. The display argu‐
36 ment specifies the connection to the X server. For more
37 information on the Display structure, see the Xlib function
38 XOpenDisplay.
39
40 value Returns the ID of the named literal's value. The function
41 allocates space for the returned value. The application is
42 responsible for managing the allocated space by calling the
43 appropriate deallocation function. For example, if the
44 returned ID symbolizes a pixmap, then the application can
45 recover the allocated space by calling XmDestroyPixmap.
46
47 type Returns the named literal's data type. Types are defined in
48 the include file Mrm/MrmPublic.h.
49
51 This function returns one of the following status return constants:
52
53 MrmSUCCESS
54 The function executed successfully.
55
56 MrmBAD_HIERARCHY
57 The hierarchy ID was invalid.
58
59 MrmNOT_FOUND
60 The literal was not found in the UIL file.
61
62 MrmWRONG_TYPE
63 The caller tried to fetch a literal of a type not supported
64 by this function.
65
66 MrmFAILURE
67 The function failed.
68
70 MrmFetchBitmapLiteral(3), MrmOpenHierarchyPerDisplay(3), MrmFetchIcon‐
71 Literal(3), MrmFetchColorLiteral(3), and XOpenDisplay(3).
72
73
74
75 MrmFetchLiteral(library call)