1XtResolvePathname(3)             XT FUNCTIONS             XtResolvePathname(3)
2
3
4

NAME

6       XtResolvePathname - search for a file using standard substitution
7

SYNTAX

9       String XtResolvePathname(Display *display, String type, String file‐
10              name, String suffix, String path, Substitution substitutions,
11              Cardinal num_substitutions, XtFilePredicate predicate);
12

ARGUMENTS

14       display     Specifies the display to use to find the language for lan‐
15                   guage substitutions.
16
17       type
18       filename
19       suffix      Specify values to substitute into the path.
20
21       path        Specifies the list of file specifications, or NULL.
22
23       substitutions
24                   Specifies a list of additional substitutions to make into
25                   the path, or NULL.
26
27       num_substitutions
28                   Specifies the number of entries in substitutions.
29
30       predicate   Specifies a procedure called to judge each potential file
31                   name, or NULL.
32

DESCRIPTION

34       The substitutions specified by XtResolvePathname are determined from
35       the value of the language string retrieved by XtDisplayInitialize for
36       the specified display.  To set the language for all applications spec‐
37       ify ``*xnlLanguage: lang'' in the resource database.  The format and
38       content of the language string are implementation-defined.   One sug‐
39       gested syntax is to compose the language string of three parts;  a
40       ``language  part'',  a ``territory  part'' and a ``codeset part''.  The
41       manner in which this composition is accomplished is implementation-
42       defined and the Intrinsics make no interpretation of the parts other
43       than to use them in substitutions as described below.
44
45       XtResolvePathname calls XtFindFile with the following substitutions in
46       addition to any passed by the caller and returns the value returned by
47       XtFindFile:
48
49       %N   The value of the filename parameter, or the application's class
50            name if filename is NULL.
51
52       %T   The value of the type parameter.
53
54       %S   The value of the suffix parameter.
55
56       %L   The language string associated with the specified display.
57
58       %l   The language part of the display's language string.
59
60       %t   The territory part of the display's language string.
61
62       %c   The codeset part of the display's language string.
63
64       %C   The customization string retrieved from the resource database
65            associated with display.
66
67       %D   The value of the implementation-specific default path.
68
69       If a path is passed to XtResolvePathname, it will be passed along to
70       XtFindFile.  If the path argument is NULL, the value of the XFILE‐
71       SEARCHPATH environment variable will be passed to XtFindFile.  If
72       XFILESEARCHPATH is not defined, an implementation-specific default path
73       will be used which contains at least 6 entries.  These entries must
74       contain the following substitutions:
75
76       1. %C, %N, %S, %T, %L  or  %C, %N, %S, %T, %l, %t, %c
77       2. %C, %N, %S, %T, %l
78       3. %C, %N, %S, %T
79       4. %N, %S, %T, %L      or  %N, %S, %T, %l, %t, %c
80       5. %N, %S, %T, %l
81       6. %N, %S, %T
82
83       The order of these six entries within the path must be as given above.
84       The order and use of substitutions within a given entry is implementa‐
85       tion dependent.  If the path begins with a colon, it will be preceded
86       by %N%S.  If the path includes two adjacent colons, %N%S will be
87       inserted between them.
88
89       The type parameter is intended to be a category of files, usually being
90       translated into a directory in the pathname.  Possible values might
91       include ``app-defaults'', ``help'', and ``bitmap''.
92
93       The suffix parameter is intended to be appended to the file name.  Pos‐
94       sible values might include ``.txt'', ``.dat'', and ``.bm''.
95
96       A suggested value for the default path on POSIX-based systems is
97
98              /usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:\
99              /usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:\
100              /usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S
101
102       Using this example, if the user has specified a language, it will be
103       used as a subdirectory of /usr/lib/X11 that will be searched for other
104       files.  If the desired file is not found there, the lookup will be
105       tried again using just the language part of the specification.  If the
106       file is not there, it will be looked for in /usr/lib/X11.  The type
107       parameter is used as a subdirectory of the language directory or of
108       /usr/lib/X11, and suffix is appended to the file name.
109
110       The %D substitution allows the addition of path elements to the imple‐
111       mentation-specific default path, typically to allow additional directo‐
112       ries to be searched without preventing resources in the system directo‐
113       ries from being found.  For example, a user installing resource files
114       under a directory called ``ourdir'' might set XFILESEARCHPATH to
115
116              %D:ourdir/%T/%N%C:ourdir/%T/%N
117
118       The customization string is obtained by querying the resource database
119       currently associated with the display (the database returned by XrmGet‐
120       Database) for the resource application_name.customization, class appli‐
121       cation_class.Customization where application_name and application_class
122       are the values returned by XtGetApplicationNameAndClass.  If no value
123       is specified in the database, the empty string is used.
124
125       It is the responsibility of the caller to free the returned string
126       using XtFree when it is no longer needed.
127

SEE ALSO

129       X Toolkit Intrinsics - C Language Interface
130       Xlib - C Language X Interface
131
132
133
134X Version 11                      libXt 1.1.4             XtResolvePathname(3)
Impressum