XrmQGetResource()XrmQGetResource()NameXrmQGetResource – get a resource value using name and class as quarks.
Synopsis
Bool XrmQGetResource(database, quark_name, quark_class, quark_type_
return, value_return)
XrmDatabase database;
XrmNameList quark_name;
XrmClassList quark_class;
XrmRepresentation *quark_type_return;
XrmValue *value_return;
Arguments
database Specifies the database that is to be used.
quark_name
Specifies the fully qualified name of the value being
retrieved (as a list of quarks).
quark_class
Specifies the fully qualified class of the value being
retrieved (as a list of quarks).
quark_type_return
Returns a pointer to the representation type of the value.
In this function, the representation type is represented as a
quark.
value_return
Returns a pointer to the value in the database. Do not mod‐
ify or free this data.
Returns
True if the resource was found, else False.
DescriptionXrmQGetResource() retrieves a resource from the specified database. It
takes fully qualified name and class strings, and returns the represen‐
tation and value of the matching resource. The value returned points
into database memory; you must not modify that data. If a resource was
found, XrmQGetResource() returns True. Otherwise, it returns False.
Currently, the database only frees or overwrites entries when new data
is stored with XrmMergeDatabases(), or XrmPutResource() and related
routines. A client that avoids these functions should be safe using
the address passed back at any time until it exits.
XrmQGetResource() is very similar to XrmGetResource(), except that in
XrmGetResource(), the equivalent arguments to quark_name, quark_class,
and quark_type_return arguments are strings instead of quarks.
See XrmGetResource() for a full description of how data is looked up in
the database.
For more information, see Volume One, Chapter 13, Managing User Prefer‐
ences.
Structures
XrmDatabase is a pointer to an opaque data type.
typedef XrmQuarkList XrmNameList;
typedef XrmQuarkList XrmClassList;
typedef XrmQuark XrmRepresentation;
typedef struct {
unsigned int size;
XPointer addr;
} XrmValue, *XrmValuePtr;
See AlsoXrmDestroyDatabase(), XrmGetFileDatabase(), XrmGetResource(), XrmGet‐
StringDatabase(), XrmInitialize(), XrmMergeDatabases(), XrmParseCom‐
mand(), XrmPutFileDatabase(), XrmPutLineResource(), XrmPutResource(),
XrmPutStringResource(), XrmQGetSearchList(), XrmQGetSearchResource(),
XrmQPutResource(), XrmQPutStringResource(), XrmQuarkToString(), Xrm‐
StringToBindingQuarkList(), XrmStringToQuarkList(), XrmStringToQuark(),
XrmUniqueQuark().
Xlib - Resource Manager XrmQGetResource()