1XrmUniqueQuark(3)               XLIB FUNCTIONS               XrmUniqueQuark(3)
2
3
4

NAME

6       XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark, XrmQuark‐
7       ToString, XrmStringToQuarkList, XrmStringToBindingQuarkList - manipu‐
8       late resource quarks
9

SYNOPSIS

11       #include <X11/Xresource.h>
12
13       XrmQuark XrmUniqueQuark(void);
14
15       #define XrmStringToName(string) XrmStringToQuark(string)
16       #define XrmStringToClass(string) XrmStringToQuark(string)
17       #define XrmStringToRepresentation(string) XrmStringToQuark(string)
18
19       int XrmQuark XrmStringToQuark(char *string);
20
21       XrmQuark XrmPermStringToQuark(char *string);
22
23       #define XrmStringToName(string) XrmStringToQuark(string)
24       #define XrmStringToClass(string) XrmStringToQuark(string)
25       #define XrmStringToRepresentation(string) XrmStringToQuark(string)
26
27       XrmQuark XrmStringToQuark(char *string);
28
29       XrmQuark XrmPermStringToQuark(char *string);
30
31       #define XrmNameToString(name) XrmQuarkToString(name)
32       #define XrmClassToString(class) XrmQuarkToString(class)
33       #define XrmRepresentationToString(type) XrmQuarkToString(type)
34
35       char *XrmQuarkToString(XrmQuark quark);
36
37       #define XrmStringToNameList(str, name)  XrmStringToQuarkList((str),
38       (name))
39       #define XrmStringToClassList(str,class) XrmStringToQuarkList((str),
40       (class))
41
42
43       void XrmStringToQuarkList(char *string, XrmQuarkList quarks_return);
44
45       XrmStringToBindingQuarkList(char *string, XrmBindingList bind‐
46              ings_return, XrmQuarkList quarks_return);
47

ARGUMENTS

49       bindings_return
50                 Returns the binding list.
51
52       quark     Specifies the quark for which the equivalent string is
53                 desired.
54
55       quarks_return
56                 Returns the list of quarks.
57
58       string    Specifies the string for which a quark or quark list is to be
59                 allocated.
60

DESCRIPTION

62       The XrmUniqueQuark function allocates a quark that is guaranteed not to
63       represent any string that is known to the resource manager.
64
65       These functions can be used to convert from string to quark representa‐
66       tion.  If the string is not in the Host Portable Character Encoding,
67       the conversion is implementation-dependent.  The string argument to
68       XrmStringToQuark need not be permanently allocated storage.  Xrm‐
69       PermStringToQuark is just like XrmStringToQuark, except that Xlib is
70       permitted to assume the string argument is permanently allocated, and,
71       hence, that it can be used as the value to be returned by XrmQuark‐
72       ToString.
73
74       For any given quark, if XrmStringToQuark returns a non-NULL value, all
75       future calls will return the same value (identical address).
76
77       These functions can be used to convert from quark representation to
78       string.  The string pointed to by the return value must not be modified
79       or freed.  The returned string is byte-for-byte equal to the original
80       string passed to one of the string-to-quark routines.  If no string
81       exists for that quark, XrmQuarkToString returns NULL.  For any given
82       quark, if XrmQuarkToString returns a non-NULL value, all future calls
83       will return the same value (identical address).
84
85       These functions can be used to convert from string to quark representa‐
86       tion.  If the string is not in the Host Portable Character Encoding,
87       the conversion is implementation-dependent.  The string argument to
88       XrmStringToQuark need not be permanently allocated storage.  Xrm‐
89       PermStringToQuark is just like XrmStringToQuark, except that Xlib is
90       permitted to assume the string argument is permanently allocated, and,
91       hence, that it can be used as the value to be returned by XrmQuark‐
92       ToString.
93
94       For any given quark, if XrmStringToQuark returns a non-NULL value, all
95       future calls will return the same value (identical address).
96
97       The XrmStringToQuarkList function converts the null-terminated string
98       (generally a fully qualified name) to a list of quarks.  The caller
99       must allocate sufficient space for the quarks list before calling Xrm‐
100       StringToQuarkList.  Note that the string must be in the valid Resource‐
101       Name format (see section 15.1).  If the string is not in the Host Por‐
102       table Character Encoding, the conversion is implementation-dependent.
103
104       A binding list is a list of type XrmBindingList and indicates if compo‐
105       nents of name or class lists are bound tightly or loosely (that is, if
106       wildcarding of intermediate components is specified).
107
108       typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
109
110       XrmBindTightly indicates that a period separates the components, and
111       XrmBindLoosely indicates that an asterisk separates the components.
112
113       The XrmStringToBindingQuarkList function converts the specified string
114       to a binding list and a quark list.  The caller must allocate suffi‐
115       cient space for the quarks list and the binding list before calling
116       XrmStringToBindingQuarkList.  If the string is not in the Host Portable
117       Character Encoding the conversion is implementation-dependent.  Compo‐
118       nent names in the list are separated by a period or an asterisk charac‐
119       ter.  If the string does not start with period or asterisk, a period is
120       assumed.  For example, ``*a.b*c'' becomes:
121
122       quarks     a       b
123       bindings   loose   tight
124

SEE ALSO

126       XrmGetResource(3), XrmInitialize(3), XrmMergeDatabases(3), XrmPutRe‐
127       source(3)
128
129       Xlib - C Language X Interface
130
131
132
133X Version 11                     libX11 1.6.5                XrmUniqueQuark(3)
Impressum