Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmcvtxmstringtabletotextproperty(3) [hpux man page]

XmCvtXmStringTableToTextProperty(library call)							    XmCvtXmStringTableToTextProperty(library call)

NAME
XmCvtXmStringTableToTextProperty -- A function that converts from XmStringTable to an XTextProperty Structure SYNOPSIS
#include <Xm/Xm.h> int XmCvtXmStringTableToTextProperty (display, string_table, count, style, text_prop_return) Display *display; XmStringTable string_table; int count; XmICCEncodingStyle style; XTextProperty *text_prop_return; (void) DESCRIPTION
XmCvtXmStringTableToTextProperty converts the XmStrings in the specified XmStringTable into an XTextProperty structure. The function sets the encoding member of text_prop_return to an Atom for the specified display naming the encoding determined by the speci- fied style, and it converts the first count compound strings in the specified XmStringTable to this encoding for storage in the text_prop_return value member. Following are the possible encoding styles: XmSTYLE_COMPOUND_STRING The encoding is _MOTIF_COMPOUND_STRING. The function converts each specified XmString to a compound string in Byte Stream format. XmSTYLE_COMPOUND_TEXT The encoding is COMPOUND_TEXT. The function converts each specified XmString to compound text. XmSTYLE_LOCALE The encoding is the encoding of the current locale. The function converts each specified XmString to the encoding of the current locale. XmSTYLE_STRING The encoding is STRING (plain C strings encoded in ISO8859-1), and the function converts each specified XmString to STRING. XmSTYLE_TEXT If all specified XmStrings are fully convertible to the encoding of the current locale, the encoding is the encoding of the cur- rent locale, and the function converts each specified XmString to the encoding of the current locale. Otherwise, the encoding is COMPOUND_TEXT, and the function converts each specified compound string to compound text. XmSTYLE_STANDARD_ICC_TEXT If all specified XmStrings are fully convertible to STRING, the encoding is STRING, and the function converts each specified XmString to STRING. Otherwise, the encoding is COMPOUND_TEXT, and the function converts each specified XmString to compound text. display Specifies the connection to the X server. string_table Specifies a set of XmStrings. count Specifies the number of XmStrings to be converted in string_table. style Specifies the manner in which the property is encoded. text_prop_return Returns the XTextProperty structure. To free the storage for the value member of the XTextProperty, use XtFree. RETURN VALUES
If conversion depends on the locale and the current locale is not supported, the function returns XLocaleNotSupported. In both of these cases, the function does not set text_prop_return. To determine whether the function is guaranteed not to return XLocaleNotSupported, use XSupportsLocale. RELATED INFORMATION
XmCvtXmStringToByteStream(3), XmCvtTextPropertyToXmStringTable(3), and XmStringTable(3). XmCvtXmStringTableToTextProperty(library call)

Check Out this Related Man Page

XwcTextListToTextProperty()											       XwcTextListToTextProperty()

Name
  XwcTextListToTextProperty - convert an internationalized wide-character text list to a text property structure.

Synopsis
  int XwcTextListToTextProperty(display, list, count, style, text_prop_return)
	Display *display;
	wchar_t **list;
	int count;
	XICCEncodingStyle style;
	XTextProperty *text_prop_return;

Arguments
  display   Specifies the connection to the X server.

  list	    Specifies an array of NULL-terminated wide-character strings.

  count     Specifies the number of strings specified.

  style     Specifies the manner in which the property is encoded.

  text_prop_return
	    Returns the XTextProperty structure.

Returns
  Success on success; The number of unconvertible characters, XLocaleNotSupported, or XNoMemory on failure.

Availability
  Release 5 and later.

Description
  XwcTextListToTextProperty()  sets  the  specified XTextProperty value to a set of null-separated elements representing the concatenation of
  the specified list of NULL-terminated text strings.  A final terminating null is stored at the end of the value field  of  text_prop_return
  but is not included in the nitems field.

  XwcTextListToTextProperty()  sets  the  encoding field of text_prop_return to an Atom (for the specified display), which names the encoding
  specified by style, and converts the specified text list to this encoding for storage in the value field of text_prop_return.  If the style
  XStringStyle or XCompoundTextStyle is specified, this encoding is STRING or COMPOUND_TEXT, respectively.  If the style XTextStyle is speci-
  fied, this encoding is the encoding of the current locale.  If the style XStdICCTextStyle is specified, this encoding is STRING if the text
  is fully convertible to STRING, otherwise it is COMPOUND_TEXT.

  If  insufficient memory is available for the new value string, XwcTextListToTextProperty() returns XNoMemory.  If the current locale is not
  supported, it returns XLocaleNotSupported.  In both of these error cases, it does not  set  text_prop_return.   XmbTextListToTextProperty()
  will not return XLocaleNotSupported if XSupportsLocale() has returned True for the current locale.

  To determine if the functions are guaranteed not to return XLocaleNotSupported, use XSupportsLocale().

  If  the  supplied  text is not fully convertible to the specified encoding, XwcTextListToTextProperty() returns the number of unconvertible
  characters.  Each unconvertible character is converted to an implementation-defined and encoding-specific default string.  If the  text  is
  fully convertible, XwcTextListToTextProperty() returns Success.  Note that full convertibility to all styles except XStringStyle is guaran-
  teed.  If the supplied text contains bytes that are not valid characters in the encoding of the locale ("invalid codepoints"),  the  result
  is undefined.

  XwcTextListToTextProperty()  allocates  memory for the value field of the XTextProperty.  The client is responsible for freeing this memory
  by calling XFree().

Structures
  The XTextProperty structure contains:

     typedef struct  {
	unsigned char *value;	     /* property data */
	Atom encoding;		     /* type of property */
	int format;		     /* 8, 16, or 32 */
	unsigned long nitems;	     /* number of items in value */
     } XTextProperty;

  The XICCEncodingStyle type has the following values:

     typedef enum   {
	XStringStyle,		     /* STRING */
	XCompoundTextStyle,	     /* COMPOUND_TEXT */
	XTextStyle,		     /* text in owner's encoding (current locale) */
	XStdICCTextStyle	     /* STRING, else COMPOUND_TEXT */
     } XICCEncodingStyle;

  The possible return values of this function are as follows:

#define   XNoMemory		  - 1
#define   XLocaleNotSupported	  - 2
#define   XConverterNotFound	  - 3
#define   XConverterNotFound	  - 3

See Also
  XSetTextProperty(), XStringListToTextProperty(), XDefaultString(), XmbTextListToTextProperty(), XmbTextPropertyToTextList(), XwcTextProper-
  tyToTextList(), XwcFreeStringList().

Xlib - Text Encoding Conversions										       XwcTextListToTextProperty()
Man Page