1MrmRegisterNamesInHierarchy(library caMlrlm)RegisterNamesInHierarchy(library call)
2
3
4
6 MrmRegisterNamesInHierarchy — Registers the values associated with the
7 names referenced in UIL within a single hierarchy (for example, UIL
8 callback function names or UIL identifier names)
9
11 #include <Mrm/MrmPublic.h>
12 Cardinal MrmRegisterNamesInHierarchy(
13 MrmHierarchy hierarchy_id,
14 MrmRegisterArglist register_list,
15 MrmCount register_count);
16
18 The MrmRegisterNamesInHierarchy function registers a vector of names
19 and associated values for access in MRM. The values can be callback
20 functions, pointers to user-defined data, or any other values. The
21 information provided is used to resolve symbolic references occurring
22 in UID files to their run-time values. For callbacks, this information
23 provides the procedure address required by the Motif Toolkit. For
24 names used as identifiers in UIL, this information provides any run-
25 time mapping the application needs.
26
27 This function is similar to MrmRegisterNames, except that the scope of
28 the names registered by MrmRegisterNamesInHierarchy is limited to the
29 hierarchy specified by hierarchy_id, whereas the names registered by
30 MrmRegisterNames have global scope. When MRM looks up a name, it first
31 tries to find the name among those registered for the given hierarchy.
32 If that lookup fails, it tries to find the name among those registered
33 globally.
34
35 hierarchy_id
36 Specifies the hierarchy with which the names are to be asso‐
37 ciated.
38
39 register_list
40 Specifies a list of name/value pairs for the names to be reg‐
41 istered. Each name is a case-sensitive, NULL-terminated
42 ASCII string. Each value is a 32-bit quantity, interpreted
43 as a procedure address if the name is a callback function,
44 and uninterpreted otherwise.
45
46 register_count
47 Specifies the number of entries in register_list.
48
49 The names in the list are case-sensitive. The list can be either
50 ordered or unordered.
51
52 Callback functions registered through MrmRegisterNamesInHierarchy can
53 be either regular or creation callbacks. Regular callbacks have decla‐
54 rations determined by Motif Toolkit and user requirements. Creation
55 callbacks have the same format as any other callback:
56
57 void CallBackProc(
58 Widget *widget_id,
59 Opaque tag,
60 XmAnyCallbackStruct *callback_data);
61
62 widget_id Specifies the widget ID associated with the widget performing
63 the callback (as in any callback function).
64
65 tag Specifies the tag value (as in any callback function).
66
67 callback_data
68 Specifies a widget-specific data structure. This data struc‐
69 ture has a minimum of two members: event and reason. The
70 reason member is always set to MrmCR_CREATE.
71
72 Note that the widget name and parent are available from the widget
73 record accessible through widget_id.
74
76 This function returns one of the following status return constants:
77
78 MrmSUCCESS
79 The function executed successfully.
80
81 MrmFAILURE
82 The function failed.
83
84
85
86 MrmRegisterNamesInHierarchy(library call)