home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xtresolvepathname.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  7.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. XtResolvePathname(3Xt)       XT FUNCTIONS       XtResolvePathname(3Xt)
  5.  
  6.  
  7. NNAAMMEE
  8.        XtResolvePathname - search for a file using standard sub-
  9.        stitution
  10.  
  11. SSYYNNTTAAXX
  12.        String XtResolvePathname(_d_i_s_p_l_a_y, _t_y_p_e, _f_i_l_e_n_a_m_e, _s_u_f_f_i_x,
  13.        _p_a_t_h, _s_u_b_s_t_i_t_u_t_i_o_n_s, _n_u_m___s_u_b_s_t_i_t_u_t_i_o_n_s, _p_r_e_d_i_c_a_t_e)
  14.          Display *_d_i_s_p_l_a_y;
  15.          String _t_y_p_e, _f_i_l_e_n_a_m_e, _s_u_f_f_i_x, _p_a_t_h;
  16.          Substitution _s_u_b_s_t_i_t_u_t_i_o_n_s;
  17.          Cardinal _n_u_m___s_u_b_s_t_i_t_u_t_i_o_n_s;
  18.          XtFilePredicate _p_r_e_d_i_c_a_t_e;
  19.  
  20. AARRGGUUMMEENNTTSS
  21.        _d_i_s_p_l_a_y       Specifies the display to use to find the lan-
  22.            guage for language substitutions.
  23.  
  24.        _t_y_p_e
  25.        _f_i_l_e_n_a_m_e
  26.        _s_u_f_f_i_x       Specify values to substitute into the path.
  27.  
  28.        _p_a_t_h       Specifies the list of file specifications, or
  29.            NULL.
  30.  
  31.        _s_u_b_s_t_i_t_u_t_i_o_n_s
  32.            Specifies a list of additional substitutions
  33.            to make into the path, or NULL.
  34.  
  35.        _n_u_m___s_u_b_s_t_i_t_u_t_i_o_n_s
  36.            Specifies the number of entries in _s_u_b_s_t_i_t_u_-
  37.            _t_i_o_n_s.
  38.  
  39.        _p_r_e_d_i_c_a_t_e   Specifies a procedure called to judge each
  40.            potential file name, or NULL.
  41.  
  42. DDEESSCCRRIIPPTTIIOONN
  43.        The substitutions specified by _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e are
  44.        determined from the value of the language string retrieved
  45.        by _X_t_D_i_s_p_l_a_y_I_n_i_t_i_a_l_i_z_e for the specified display.  To set
  46.        the language for all applications specify ``*xnlLanguage:
  47.        _l_a_n_g'' in the resource database.     The format and content
  48.        of the language string are implementation-defined.   One
  49.        suggested syntax is to compose the language string of
  50.        three parts;  a    ``language  part'',  a ``territory
  51.        part'' and a ``codeset part''.  The manner in which this
  52.        composition is accomplished is implementation-defined and
  53.        the Intrinsics make no interpretation of the parts other
  54.        than to use them in substitutions as described below.
  55.  
  56.        _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e calls _X_t_F_i_n_d_F_i_l_e with the following sub-
  57.        stitutions in addition to any passed by the caller and
  58.        returns the value returned by _X_t_F_i_n_d_F_i_l_e:
  59.  
  60.        %N   The value of the _f_i_l_e_n_a_m_e parameter, or the
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XtResolvePathname(3Xt)       XT FUNCTIONS       XtResolvePathname(3Xt)
  71.  
  72.  
  73.         application's class name if _f_i_l_e_n_a_m_e is NULL.
  74.  
  75.        %T   The value of the _t_y_p_e parameter.
  76.  
  77.        %S   The value of the _s_u_f_f_i_x parameter.
  78.  
  79.        %L   The language string associated with the specified
  80.         display.
  81.  
  82.        %l   The language part of the display's language string.
  83.  
  84.        %t   The territory part of the display's language string.
  85.  
  86.        %c   The codeset part of the display's language string.
  87.  
  88.        %C   The customization string retrieved from the resource
  89.         database associated with _d_i_s_p_l_a_y.
  90.  
  91.        %D   The value of the implementation-specific default
  92.         path.
  93.  
  94.        If a path is passed to _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e, it will be
  95.        passed along to _X_t_F_i_n_d_F_i_l_e.  If the _p_a_t_h argument is NULL,
  96.        the value of the _X_F_I_L_E_S_E_A_R_C_H_P_A_T_H environment variable will
  97.        be passed to _X_t_F_i_n_d_F_i_l_e.     If _X_F_I_L_E_S_E_A_R_C_H_P_A_T_H is not
  98.        defined, an implementation-specific default path will be
  99.        used which contains at least 6 entries.    These entries
  100.        must contain the following substitutions:
  101.  
  102.        1. %C, %N, %S, %T, %L    or%C, %N, %S, %T, %l, %t, %c
  103.        2. %C, %N, %S, %T, %l
  104.        3. %C, %N, %S, %T
  105.        4. %N, %S, %T, %L   or    %N, %S, %T, %l, %t, %c
  106.        5. %N, %S, %T, %l
  107.        6. %N, %S, %T
  108.  
  109.        The order of these six entries within the path must be as
  110.        given above.  The order and use of substitutions within a
  111.        given entry is implementation dependent.     If the path
  112.        begins with a colon, it will be preceded by %N%S.  If the
  113.        path includes two adjacent colons, %%NN%%SS will be inserted
  114.        between them.
  115.  
  116.        The _t_y_p_e parameter is intended to be a category of files,
  117.        usually being translated into a directory in the pathname.
  118.        Possible values might include ``app-defaults'', ``help'',
  119.        and ``bitmap''.
  120.  
  121.        The _s_u_f_f_i_x parameter is intended to be appended to the
  122.        file name.  Possible values might include ``.txt'',
  123.        ``.dat'', and ``.bm''.
  124.  
  125.        A suggested value for the default path on POSIX-based sys-
  126.        tems is
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XtResolvePathname(3Xt)       XT FUNCTIONS       XtResolvePathname(3Xt)
  137.  
  138.  
  139.           <XRoot>/lib/X11/%L/%T/%N%C%S:<XRoot>/lib/X11/%l/%T/%N%C%S:\
  140.           <XRoot>/lib/X11/%T/%N%C%S:<XRoot>/lib/X11/%L/%T/%N%S:\
  141.           <XRoot>/lib/X11/%l/%T/%N%S:<XRoot>/lib/X11/%T/%N%S
  142.  
  143.        where <XRoot> is replaced by the root of the X11 installa-
  144.        tion tree (/usr/X11R6, for example).
  145.  
  146.        Using this example, if the user has specified a language,
  147.        it will be used as a subdirectory of <XRoot>/lib/X11 that
  148.        will be searched for other files.  If the desired file is
  149.        not found there, the lookup will be tried again using just
  150.        the language part of the specification.    If the file is
  151.        not there, it will be looked for in <XRoot>/lib/X11.  The
  152.        _t_y_p_e parameter is used as a subdirectory of the language
  153.        directory or of <XRoot>/lib/X11, and _s_u_f_f_i_x is appended to
  154.        the file name.
  155.  
  156.        The %D substitution allows the addition of path elements
  157.        to the implementation-specific default path, typically to
  158.        allow additional directories to be searched without pre-
  159.        venting resources in the system directories from being
  160.        found.  For example, a user installing resource files
  161.        under a directory called ``ourdir'' might set _X_F_I_L_E_S_E_A_R_C_H_-
  162.        _P_A_T_H to
  163.  
  164.           %D:ourdir/%T/%N%C:ourdir/%T/%N
  165.  
  166.        The customization string is obtained by querying the
  167.        resource database currently associated with the display
  168.        (the database returned by _X_r_m_G_e_t_D_a_t_a_b_a_s_e) for the resource
  169.        _a_p_p_l_i_c_a_t_i_o_n___n_a_m_e.customization, class _a_p_p_l_i_c_a_-
  170.        _t_i_o_n___c_l_a_s_s.Customization where _a_p_p_l_i_c_a_t_i_o_n___n_a_m_e and _a_p_p_l_i_-
  171.        _c_a_t_i_o_n___c_l_a_s_s are the values returned by
  172.        _X_t_G_e_t_A_p_p_l_i_c_a_t_i_o_n_N_a_m_e_A_n_d_C_l_a_s_s.  If no value is specified in
  173.        the database, the empty string is used.
  174.  
  175.        It is the responsibility of the caller to free the
  176.        returned string using _X_t_F_r_e_e when it is no longer needed.
  177.  
  178. SSEEEE AALLSSOO
  179.        _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s _- _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  180.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.