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

  1.  
  2.  
  3.  
  4. XrmUniqueQuark(3X11)      XLIB FUNCTIONS     XrmUniqueQuark(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark,
  9.        XrmQuarkToString, XrmStringToQuarkList, XrmStringToBind-
  10.        ingQuarkList - manipulate resource quarks
  11.  
  12. SSYYNNTTAAXX
  13.        XrmQuark XrmUniqueQuark()
  14.  
  15.        #define XrmStringToName(string) XrmStringToQuark(string)
  16.        #define XrmStringToClass(string) XrmStringToQuark(string)
  17.        #define XrmStringToRepresentation(string) XrmStringTo-
  18.        Quark(string)
  19.  
  20.        XrmQuark XrmStringToQuark(_s_t_r_i_n_g)
  21.         char *_s_t_r_i_n_g;
  22.  
  23.        XrmQuark XrmPermStringToQuark(_s_t_r_i_n_g)
  24.         char *_s_t_r_i_n_g;
  25.  
  26.        #define XrmStringToName(string) XrmStringToQuark(string)
  27.        #define XrmStringToClass(string) XrmStringToQuark(string)
  28.        #define XrmStringToRepresentation(string) XrmStringTo-
  29.        Quark(string)
  30.  
  31.        XrmQuark XrmStringToQuark(_s_t_r_i_n_g)
  32.         char *_s_t_r_i_n_g;
  33.  
  34.        XrmQuark XrmPermStringToQuark(_s_t_r_i_n_g)
  35.         char *_s_t_r_i_n_g;
  36.  
  37.        #define XrmNameToString(name) XrmQuarkToString(name)
  38.        #define XrmClassToString(class) XrmQuarkToString(class)
  39.        #define XrmRepresentationToString(type) XrmQuark-
  40.        ToString(type)
  41.  
  42.        char *XrmQuarkToString(_q_u_a_r_k)
  43.         XrmQuark _q_u_a_r_k;
  44.  
  45.        #define XrmStringToNameList(str, name)  XrmStringToQuark-
  46.        List((str), (name)) #define XrmStringTo-
  47.        ClassList(str,class) XrmStringToQuarkList((str), (class))
  48.  
  49.        void XrmStringToQuarkList(_s_t_r_i_n_g, _q_u_a_r_k_s___r_e_t_u_r_n)
  50.         char *_s_t_r_i_n_g;
  51.         XrmQuarkList _q_u_a_r_k_s___r_e_t_u_r_n;
  52.  
  53.        XrmStringToBindingQuarkList(_s_t_r_i_n_g, _b_i_n_d_i_n_g_s___r_e_t_u_r_n,
  54.        _q_u_a_r_k_s___r_e_t_u_r_n)
  55.         char *_s_t_r_i_n_g;
  56.         XrmBindingList _b_i_n_d_i_n_g_s___r_e_t_u_r_n;
  57.         XrmQuarkList _q_u_a_r_k_s___r_e_t_u_r_n;
  58.  
  59. AARRGGUUMMEENNTTSS
  60.  
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XrmUniqueQuark(3X11)      XLIB FUNCTIONS     XrmUniqueQuark(3X11)
  71.  
  72.  
  73.        _b_i_n_d_i_n_g_s___r_e_t_u_r_n
  74.          Returns the binding list.
  75.  
  76.        _q_u_a_r_k     Specifies the quark for which the equivalent
  77.          string is desired.
  78.  
  79.        _q_u_a_r_k_s___r_e_t_u_r_n
  80.          Returns the list of quarks.
  81.  
  82.        _s_t_r_i_n_g     Specifies the string for which a quark or quark
  83.          list is to be allocated.
  84.  
  85. DDEESSCCRRIIPPTTIIOONN
  86.        The _X_r_m_U_n_i_q_u_e_Q_u_a_r_k function allocates a quark that is
  87.        guaranteed not to represent any string that is known to
  88.        the resource manager.
  89.  
  90.        These functions can be used to convert from string to
  91.        quark representation.  If the string is not in the Host
  92.        Portable Character Encoding, the conversion is implementa-
  93.        tion-dependent.    The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k
  94.        need not be permanently allocated storage.  _X_r_m_P_e_r_m_S_t_r_i_n_g_-
  95.        _T_o_Q_u_a_r_k is just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is
  96.        permitted to assume the string argument is permanently
  97.        allocated, and, hence, that it can be used as the value to
  98.        be returned by _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.
  99.  
  100.        For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-
  101.        NULL value, all future calls will return the same value
  102.        (identical address).
  103.  
  104.        These functions can be used to convert from quark repre-
  105.        sentation to string.  The string pointed to by the return
  106.        value must not be modified or freed.  The returned string
  107.        is byte-for-byte equal to the original string passed to
  108.        one of the string-to-quark routines.  If no string exists
  109.        for that quark, _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns NULL.  For any
  110.        given quark, if _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns a non-NULL value,
  111.        all future calls will return the same value (identical
  112.        address).
  113.  
  114.        These functions can be used to convert from string to
  115.        quark representation.  If the string is not in the Host
  116.        Portable Character Encoding, the conversion is implementa-
  117.        tion-dependent.    The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k
  118.        need not be permanently allocated storage.  _X_r_m_P_e_r_m_S_t_r_i_n_g_-
  119.        _T_o_Q_u_a_r_k is just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is
  120.        permitted to assume the string argument is permanently
  121.        allocated, and, hence, that it can be used as the value to
  122.        be returned by _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.
  123.  
  124.        For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-
  125.        NULL value, all future calls will return the same value
  126.        (identical address).
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XrmUniqueQuark(3X11)      XLIB FUNCTIONS     XrmUniqueQuark(3X11)
  137.  
  138.  
  139.        The _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k_L_i_s_t function converts the null-
  140.        terminated string (generally a fully qualified name) to a
  141.        list of quarks.    Note that the string must be in the valid
  142.        ResourceName format (see section 15.1).    If the string is
  143.        not in the Host Portable Character Encoding, the conver-
  144.        sion is implementation-dependent.
  145.  
  146.        A binding list is a list of type _X_r_m_B_i_n_d_i_n_g_L_i_s_t and indi-
  147.        cates if components of name or class lists are bound
  148.        tightly or loosely (that is, if wildcarding of intermedi-
  149.        ate components is specified).
  150.  
  151.        typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
  152.  
  153.        _X_r_m_B_i_n_d_T_i_g_h_t_l_y indicates that a period separates the com-
  154.        ponents, and _X_r_m_B_i_n_d_L_o_o_s_e_l_y indicates that an asterisk
  155.        separates the components.
  156.  
  157.        The _X_r_m_S_t_r_i_n_g_T_o_B_i_n_d_i_n_g_Q_u_a_r_k_L_i_s_t function converts the
  158.        specified string to a binding list and a quark list.  If
  159.        the string is not in the Host Portable Character Encoding
  160.        the conversion is implementation-dependent.  Component
  161.        names in the list are separated by a period or an asterisk
  162.        character.  If the string does not start with period or
  163.        asterisk, a period is assumed.  For example, ``*a.b*c''
  164.        becomes:
  165.  
  166.        quarks a          b         c
  167.        bindings          loose  tightloose
  168.  
  169. SSEEEE AALLSSOO
  170.        XrmGetResource(3X11), XrmInitialize(3X11), XrmMerge-
  171.        Databases(3X11), XrmPutResource(3X11)
  172.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  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.