XtResolvePathname(3) | Library Functions Manual | XtResolvePathname(3) |
String XtResolvePathname(Display *display, String type, String filename, String suffix, String path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate);
XtResolvePathname calls XtFindFile with the following substitutions in addition to any passed by the caller and returns the value returned by XtFindFile:
If a path is passed to XtResolvePathname, it will be passed along to XtFindFile. If the path argument is NULL, the value of the XFILESEARCHPATH environment variable will be passed to XtFindFile. If XFILESEARCHPATH is not defined, an implementation-specific default path will be used which contains at least 6 entries. These entries must contain the following substitutions:
The type parameter is intended to be a category of files, usually being translated into a directory in the pathname. Possible values might include ``app-defaults'', ``help'', and ``bitmap''.
The suffix parameter is intended to be appended to the file name. Possible values might include ``.txt'', ``.dat'', and ``.bm''.
A suggested value for the default path on POSIX-based systems is
Using this example, if the user has specified a language, it will be used as a subdirectory of /usr/X11R7/lib/X11 that will be searched for other files. If the desired file is not found there, the lookup will be tried again using just the language part of the specification. If the file is not there, it will be looked for in /usr/X11R7/lib/X11. The type parameter is used as a subdirectory of the language directory or of /usr/X11R7/lib/X11, and suffix is appended to the file name.
The %D substitution allows the addition of path elements to the implementation-specific default path, typically to allow additional directories to be searched without preventing resources in the system directories from being found. For example, a user installing resource files under a directory called ``ourdir'' might set XFILESEARCHPATH to
The customization string is obtained by querying the resource database currently associated with the display (the database returned by XrmGetDatabase) for the resource application_name.customization, class application_class.Customization where application_name and application_class are the values returned by XtGetApplicationNameAndClass. If no value is specified in the database, the empty string is used.
It is the responsibility of the caller to free the returned string using XtFree when it is no longer needed.
X Version 11 | XT FUNCTIONS |