Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocClassHint(3X11)

XAllocIconSize(3X11)

XAllocSizeHints(3X11)

XAllocWMHints(3X11)

XFree(3X11)

XSetCommand(3X11)

XSetTransientForHint(3X11)

XSetTextProperty(3X11)

XSetWMClientMachine(3X11)

XSetWMColormapWindows(3X11)

XSetWMIconName(3X11)

XSetWMName(3X11)

XSetWMProperties(3X11)

XSetWMProtocols(3X11)

XStringListToTextProperty(3X11)  —  NEWS-OS Programmer’s Manual

関数

XStringListToTextProperty、XTextPropertyToStringList、XFreeStringList、XTextProperty − 文字列リストおよびテキスト属性構造体を変換します。

シンタックス

Status XStringListToTextProperty(list, count, text_prop_return)
      char ∗∗list;
      int count;
      XTextProperty ∗text_prop_return; Status XTextPropertyToStringList(text_prop, list_return, count_return)
       XTextProperty ∗text_prop;
       char ∗∗∗list_return;
       int ∗count_return; void XFreeStringList(list)
      char ∗∗list;

引数

count文字列の数を指定します。

count_return文字列の数を返します。

list解放する文字列のリストを指定します。

listナルで終わる文字列リストを指定します。

list_returnナルで終わる文字列リストを返します。

text_prop使用する XTextProperty 構造体を指定します。

text_prop_return
XTextProperty 構造体を返します。

解説

XStringListToTextProperty 関数は指定した XTextProperty をナルで分けられる文字列の指定リストのつながりを表す値の タイプSTRING (フォーマット 8)に設定します。 ナル(nitemsメンバに含まれない)を含むエキストラバイトがtext_prop_returnのフィールドの最後に格納されます。 新しい文字列値に対してメモリの領域が不足する場合、 XStringListToTextProperty は XTextProperty 構造体にいかなるフィールドも設定せず、 ゼロのステータスを返します。 そうでなければ、 ゼロ以外のステータスを返します。 そのフィールドの内容を解放する為に、 XFree を使って下さい。 XTextPropertyToStringList 関数は指定した XTextProperty 構造体のナルで終わるエレメントを表す文字列のリストを返します。 text_propのデータはタイプがSTRING、 フォーマットは8でなければならない。 その属性の複合エレメント(例えば、分離テキスト・セレクションの文字列)はナル(0符号)で分離されます。 その属性の内容はナルで終了されません。 リストおよびエレメントの為のメモリの領域が不足する場合、 XTextPropertyToStringList は何も値を返さず、 ゼロのステータスを返します。 そうでなければ、 ゼロ以外のステータスを返します。 リストおよびその内容を解放する為には XFreeStringList を使って下さい。 XFreeStringList 関数は XTextPropertyToStringList で割り当てられたメモリを解放します。

構造体

XTextProperty 構造体は、以下の様になります。

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;

関連事項

XAllocClassHint(3X11), XAllocIconSize(3X11), XAllocSizeHints(3X11), XAllocWMHints(3X11), XFree(3X11), XSetCommand(3X11), XSetTransientForHint(3X11), XSetTextProperty(3X11), XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11), XSetWMIconName(3X11), XSetWMName(3X11), XSetWMProperties(3X11), XSetWMProtocols(3X11)
Xlib − C Language X Interface

NEWS-OSRelease 4.1C

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026