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

  1.  
  2.  
  3.  
  4. XmbTextListToTextProperty(3XXL1I1B)FUNCXTmIbOTNeSxtListToTextProperty(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XmbTextListToTextProperty, XwcTextListToTextProperty, Xmb-
  9.        TextPropertyToTextList, XwcTextPropertyToTextList,
  10.        XwcFreeStringList, XDefaultString - convert text lists and
  11.        text property structures
  12.  
  13. SSYYNNTTAAXX
  14.        int XmbTextListToTextProperty(_d_i_s_p_l_a_y, _l_i_s_t, _c_o_u_n_t, _s_t_y_l_e,
  15.        _t_e_x_t___p_r_o_p___r_e_t_u_r_n)
  16.          Display *_d_i_s_p_l_a_y;
  17.          char **_l_i_s_t;
  18.          int _c_o_u_n_t;
  19.          XICCEncodingStyle _s_t_y_l_e;
  20.          XTextProperty *_t_e_x_t___p_r_o_p___r_e_t_u_r_n;
  21.  
  22.        int XwcTextListToTextProperty(_d_i_s_p_l_a_y, _l_i_s_t, _c_o_u_n_t, _s_t_y_l_e,
  23.        _t_e_x_t___p_r_o_p___r_e_t_u_r_n)
  24.          Display *_d_i_s_p_l_a_y;
  25.          wchar_t **_l_i_s_t;
  26.          int _c_o_u_n_t;
  27.          XICCEncodingStyle _s_t_y_l_e;
  28.          XTextProperty *_t_e_x_t___p_r_o_p___r_e_t_u_r_n;
  29.  
  30.        int XmbTextPropertyToTextList(_d_i_s_p_l_a_y, _t_e_x_t___p_r_o_p,
  31.        _l_i_s_t___r_e_t_u_r_n, _c_o_u_n_t___r_e_t_u_r_n)
  32.          Display *_d_i_s_p_l_a_y;
  33.          XTextProperty *_t_e_x_t___p_r_o_p;
  34.          char ***_l_i_s_t___r_e_t_u_r_n;
  35.          int *_c_o_u_n_t___r_e_t_u_r_n;
  36.  
  37.        int XwcTextPropertyToTextList(_d_i_s_p_l_a_y, _t_e_x_t___p_r_o_p,
  38.        _l_i_s_t___r_e_t_u_r_n, _c_o_u_n_t___r_e_t_u_r_n)
  39.          Display *_d_i_s_p_l_a_y;
  40.          XTextProperty *_t_e_x_t___p_r_o_p;
  41.          wchar_t ***_l_i_s_t___r_e_t_u_r_n;
  42.          int *_c_o_u_n_t___r_e_t_u_r_n;
  43.  
  44.        void XwcFreeStringList(_l_i_s_t)
  45.          wchar_t **_l_i_s_t;
  46.  
  47.        char *XDefaultString()
  48.  
  49. AARRGGUUMMEENNTTSS
  50.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  51.  
  52.        _l_i_s_t     Specifies a list of null-terminated character
  53.          strings.
  54.  
  55.        _c_o_u_n_t     Specifies the number of strings specified.
  56.  
  57.        _s_t_y_l_e     Specifies the manner in which the property is
  58.          encoded.
  59.  
  60.  
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XmbTextListToTextProperty(3XXL1I1B)FUNCXTmIbOTNeSxtListToTextProperty(3X11)
  71.  
  72.  
  73.        _t_e_x_t___p_r_o_p___r_e_t_u_r_n
  74.          Returns the _X_T_e_x_t_P_r_o_p_e_r_t_y structure.
  75.  
  76.        _t_e_x_t___p_r_o_p Specifies the _X_T_e_x_t_P_r_o_p_e_r_t_y structure to be
  77.          used.
  78.  
  79.        _l_i_s_t___r_e_t_u_r_n
  80.          Returns a list of null-terminated character
  81.          strings.
  82.  
  83.        _c_o_u_n_t___r_e_t_u_r_n
  84.          Returns the number of strings.
  85.  
  86.        _l_i_s_t     Specifies the list of strings to be freed.
  87.  
  88. DDEESSCCRRIIPPTTIIOONN
  89.        The _X_m_b_T_e_x_t_L_i_s_t_T_o_T_e_x_t_P_r_o_p_e_r_t_y and _X_w_c_T_e_x_t_L_i_s_t_T_o_T_e_x_t_P_r_o_p_-
  90.        _e_r_t_y functions set the specified _X_T_e_x_t_P_r_o_p_e_r_t_y value to a
  91.        set of null-separated elements representing the concatena-
  92.        tion of the specified list of null-terminated text
  93.        strings.     A final terminating null is stored at the end of
  94.        the value field of text_prop_return but is not included in
  95.        the nitems member.
  96.  
  97.        The functions set the encoding field of text_prop_return
  98.        to an _A_t_o_m for the specified display naming the encoding
  99.        determined by the specified style and convert the speci-
  100.        fied text list to this encoding for storage in the
  101.        text_prop_return value field.  If the style _X_S_t_r_i_n_g_S_t_y_l_e
  102.        or _X_C_o_m_p_o_u_n_d_T_e_x_t_S_t_y_l_e is specified, this encoding is
  103.        ``STRING'' or ``COMPOUND_TEXT'', respectively.  If the
  104.        style _X_T_e_x_t_S_t_y_l_e is specified, this encoding is the encod-
  105.        ing of the current locale.  If the style _X_S_t_d_I_C_C_T_e_x_t_S_t_y_l_e
  106.        is specified, this encoding is ``STRING'' if the text is
  107.        fully convertible to STRING, else ``COMPOUND_TEXT''.
  108.  
  109.        If insufficient memory is available for the new value
  110.        string, the functions return _X_N_o_M_e_m_o_r_y.    If the current
  111.        locale is not supported, the functions return
  112.        _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d.  In both of these error cases, the
  113.        functions do not set text_prop_return.
  114.  
  115.        To determine if the functions are guaranteed not to return
  116.        _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d, use _X_S_u_p_p_o_r_t_s_L_o_c_a_l_e.
  117.  
  118.        If the supplied text is not fully convertible to the spec-
  119.        ified encoding, the functions return the number of uncon-
  120.        vertible characters.  Each unconvertible character is con-
  121.        verted to an implementation-defined and encoding-specific
  122.        default string.    Otherwise, the functions return _S_u_c_c_e_s_s.
  123.        Note that full convertibility to all styles except
  124.        _X_S_t_r_i_n_g_S_t_y_l_e is guaranteed.
  125.  
  126.        To free the storage for the value field, use _X_F_r_e_e.
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XmbTextListToTextProperty(3XXL1I1B)FUNCXTmIbOTNeSxtListToTextProperty(3X11)
  137.  
  138.  
  139.        The _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_-
  140.        _T_e_x_t_L_i_s_t functions return a list of text strings in the
  141.        current locale representing the null-separated elements of
  142.        the specified _X_T_e_x_t_P_r_o_p_e_r_t_y structure.  The data in
  143.        text_prop must be format 8.
  144.  
  145.        Multiple elements of the property (for example, the
  146.        strings in a disjoint text selection) are separated by a
  147.        null byte.  The contents of the property are not required
  148.        to be null-terminated; any terminating null should not be
  149.        included in text_prop.nitems.
  150.  
  151.        If insufficient memory is available for the list and its
  152.        elements, _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_-
  153.        _T_e_x_t_L_i_s_t return _X_N_o_M_e_m_o_r_y.  If the current locale is not
  154.        supported, the functions return _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d.  Oth-
  155.        erwise, if the encoding field of text_prop is not convert-
  156.        ible to the encoding of the current locale, the functions
  157.        return _X_C_o_n_v_e_r_t_e_r_N_o_t_F_o_u_n_d.  For supported locales, exis-
  158.        tence of a converter from COMPOUND_TEXT, STRING or the
  159.        encoding of the current locale is guaranteed if _X_S_u_p_p_o_r_t_-
  160.        _s_L_o_c_a_l_e returns _T_r_u_e for the current locale (but the
  161.        actual text may contain unconvertible characters).  Con-
  162.        version of other encodings is implementation-dependent.
  163.        In all of these error cases, the functions do not set any
  164.        return values.
  165.  
  166.        Otherwise, _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_-
  167.        _T_o_T_e_x_t_L_i_s_t return the list of null-terminated text strings
  168.        to list_return and the number of text strings to
  169.        count_return.
  170.  
  171.        If the value field of text_prop is not fully convertible
  172.        to the encoding of the current locale, the functions
  173.        return the number of unconvertible characters.  Each
  174.        unconvertible character is converted to a string in the
  175.        current locale that is specific to the current locale.  To
  176.        obtain the value of this string, use _X_D_e_f_a_u_l_t_S_t_r_i_n_g.  Oth-
  177.        erwise, _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_-
  178.        _T_e_x_t_L_i_s_t return _S_u_c_c_e_s_s.
  179.  
  180.        To free the storage for the list and its contents returned
  181.        by _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t, use _X_F_r_e_e_S_t_r_i_n_g_L_i_s_t.  To
  182.        free the storage for the list and its contents returned by
  183.        _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t, use _X_w_c_F_r_e_e_S_t_r_i_n_g_L_i_s_t.
  184.  
  185.        The _X_w_c_F_r_e_e_S_t_r_i_n_g_L_i_s_t function frees memory allocated by
  186.        _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t.
  187.  
  188.        The _X_D_e_f_a_u_l_t_S_t_r_i_n_g function returns the default string
  189.        used by Xlib for text conversion (for example, in
  190.        _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t).  The default string is the
  191.        string in the current locale that is output when an uncon-
  192.        vertible character is found during text conversion.  If
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XmbTextListToTextProperty(3XXL1I1B)FUNCXTmIbOTNeSxtListToTextProperty(3X11)
  203.  
  204.  
  205.        the string returned by _X_D_e_f_a_u_l_t_S_t_r_i_n_g is the empty string
  206.        (""), no character is output in the converted text.  _X_D_e_-
  207.        _f_a_u_l_t_S_t_r_i_n_g does not return NULL.
  208.  
  209.        The string returned by _X_D_e_f_a_u_l_t_S_t_r_i_n_g is independent of
  210.        the default string for text drawing; see _X_C_r_e_a_t_e_F_o_n_t_S_e_t to
  211.        obtain the default string for an _X_F_o_n_t_S_e_t.
  212.  
  213.        The behavior when an invalid codepoint is supplied to any
  214.        Xlib function is undefined.
  215.  
  216.        The returned string is null-terminated.    It is owned by
  217.        Xlib and should not be modified or freed by the client.
  218.        It may be freed after the current locale is changed.
  219.        Until freed, it will not be modified by Xlib.
  220.  
  221. SSTTRRUUCCTTUURREESS
  222.        The _X_T_e_x_t_P_r_o_p_e_r_t_y structure contains:
  223.  
  224.        typedef struct {
  225.         unsigned char *value;/* property data */
  226.         Atom encoding;    /* type of property */
  227.         int format;        /* 8, 16, or 32 */
  228.         unsigned long nitems;/* number of items in value */
  229.        } XTextProperty;
  230.  
  231.        The _X_I_C_C_E_n_c_o_d_i_n_g_S_t_y_l_e structure contains:
  232.  
  233.        #define     _X_N_o_M_e_m_o_r_y        -1
  234.        #define     _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d    -2
  235.        #define     _X_C_o_n_v_e_r_t_e_r_N_o_t_F_o_u_n_d    -3
  236.        typedef enum {
  237.         XStringStyle,    /* STRING */
  238.         XCompoundTextStyle, /* COMPOUND_TEXT */
  239.         XTextStyle,        /* text in owner's encoding (current locale) */
  240.         XStdICCTextStyle    /* STRING, else COMPOUND_TEXT */
  241.        } XICCEncodingStyle;
  242.  
  243. SSEEEE AALLSSOO
  244.        XSetTextProperty(3X11), XStringListToTextProperty(3X11)
  245.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.