Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XrmQGetSeaB(3x) — HP-UX ANSI C A.09.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XrmQGetSearchResource − search prepared list for a given resource. 

Synopsis

Bool XrmQGetSearchResource(list, name, class,

type_return, value_return)
     XrmSearchList list;
     XrmClass class;
     XrmRepresentation *type_return;
     XrmValue *value_return;

Arguments

listSpecifies the search list returned by XrmQGetSearchList(). 

nameSpecifies the resource name. 

classSpecifies the resource class. 

type_return
Returns the data representation type.

value_return
Returns the value from the database.

Description

XrmQGetSearchResource() is a tool for searching the database more efficiently.  It is used in combination with XrmQGetSearchList().  Often, one searches the database for many similar resources which differ only in their final component (e.g., xmh.toc.foreground, xmh.toc.background, etc).  Rather than looking for each resource in its entirety, XrmQGetSearchList() searches the database for the common part of the resource name, returning a whole list of items in the database that match it.  This list is called the search list.  XrmQGetSearchResource() searches the search list for the resource that is fully identified by name and class.  The search stops with the first match.  XrmQGetSearchResource() returns True if the resource was found; otherwise, it returns False.  A call to XrmQGetSearchList() with a name and class list containing all but the last component of a resource name followed by a call to XrmQGetSearchResource() with the last component name and class returns the same database entry as XrmQGetResource() or XrmQGetResource() would with the fully qualified name and class.  For more information, see Volume One, Chapter 11, Managing User Preferences. 

Structures

XrmDatabase is a pointer to an opaque data type.
 
typedef XrmQuark XrmClass;
typedef XrmQuark XrmRepresentation;
 
typedef struct {
    unsigned int    size;
    XPointer        addr;
} XrmValue, *XrmValuePtr;
 
XrmSearchList is a pointer to an opaque data type.

See Also

XrmDestroyDatabase(), XrmGetFileDatabase(), XrmGetResource(), XrmGetStringDatabase(), XrmInitialize(), XrmMergeDatabases(), XrmParseCommand(), XrmPutFileDatabase(), XrmPutLineResource(), XrmPutResource(), XrmPutStringResource(), XrmQGetResource(), XrmQGetSearchList(), XrmQPutResource(), XrmQPutStringResource(), XrmQuarkToString(), XrmStringToBindingQuarkList(), XrmStringToQuarkList(), XrmStringToQuark(), XrmUniqueQuark(). 

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026