XSetWMProperties

Syntax

void XSetWMProperties(display, w, window_name, icon_name, argv, argc, normal_hints, wm_hints, class_hints)
      Display *display; 
      Window w;
      XTextProperty *window_name;
      XTextProperty *icon_name;
      char **argv;
      int argc;
      XSizeHints *normal_hints;
      XWMHints *wm_hints;
      XClassHint *class_hints;

Arguments

display Specifies the connection to the X server.
X サーバへの接続を指定する。
w Specifies the window.
ウィンドウを指定する。
window_name Specifies the window name, which should be a null-terminated string.
ウィンドウ名を指定する。 これは NULL で終わる文字列でなければならない。
icon_name Specifies the icon name, which should be a null-terminated string.
アイコン名を指定する。 これは NULL で終わる文字列でなければならない。
argv Specifies the application's argument list.
アプリケーションの引き数リストを指定する。
argc Specifies the number of arguments.
引き数の数を指定する。
normal_hints Specifies the size hints for the window in its normal state.
ウィンドウの通常の状態でのサイズヒントを指定する。
wm_hints Specifies the XWMHints structure to be used.
使用する XWMHints 構造体を指定する。
class_hints Specifies the XClassHint structure to be used.
使用する XClassHint 構造体を指定する。

Description

The XSetWMProperties() convenience function provides a single programming interface for setting those essential window properties that are used for communicating with other clients (particularly window and session managers).
簡易関数 XSetWMProperties() は他のクライアント (特にウィンドウマネージャやセッションマネージャ) との通信に使われる重要なウィンドウプロパティを設定するための 単一のプログラミングインタフェースを提供する。

If the window_name argument is non-NULL, XSetWMProperties() calls XSetWMName(), which in turn, sets the WM_NAME property (see "Setting and Reading the WM_NAME Property"). If the icon_name argument is non-NULL, XSetWMProperties() calls XSetWMIconName(), which sets the WM_ICON_NAME property (see "Setting and Reading the WM_ICON_NAME Property"). If the argv argument is non-NULL, XSetWMProperties() calls XSetCommand(), which sets the WM_COMMAND property (see "Setting and Reading the WM_COMMAND Property"). Note that an argc of zero is allowed to indicate a zero-length command. Note also that the hostname of this machine is stored using XSetWMClientMachine() (see "Setting and Reading the WM_CLIENT_MACHINE Property").
引き数 window_name が NULL でなければ、 XSetWMProperties()XSetWMName() を呼び出して WM_NAME プロパティを設定する。 ("Setting and Reading the WM_NAME Property"参照) 引き数 icon_name が NULL でなければ、 XSetWMProperties()XSetWMIconName() を呼び出して WM_ICON_NAME プロパティを設定する。 ("Setting and Reading the WM_ICON_NAME Property"参照) 引き数 argv が NULL でなければ、 XSetWMProperties()XSetCommand() を呼び出して WM_COMMAND プロパティを設定する。 ("Setting and Reading the WM_COMMAND Property"参照) argc を 0 にして長さが 0 のコマンドを指示してもよい点に注意すること。 また、このマシンのホスト名は XSetWMClientMachine() を使って保存されている点にも注意すること。 ("Setting and Reading the WM_CLIENT_MACHINE Property"参照)

If the normal_hints argument is non-NULL, XSetWMProperties() calls XSetWMNormalHints(), which sets the WM_NORMAL_HINTS property (see "Setting and Reading the WM_NORMAL_HINTS Property"). If the wm_hints argument is non-NULL, XSetWMProperties() calls XSetWMHints(), which sets the WM_HINTS property (see "Setting and Reading the WM_HINTS Property").
引き数 normal_hints が NULL でなければ、 XSetWMProperties()XSetWMNormalHints() を呼び出し、 この関数が WM_NORMAL_HINTS を設定する。 ("Setting and Reading the WM_NORMAL_HINTS Property"参照) 引き数 wm_hints が NULL でなければ、 XSetWMProperties()XSetWMHints() を呼び出して WM_HINTS プロパティを設定する。 ("Setting and Reading the WM_HINTS Property"参照)

If the class_hints argument is non-NULL, XSetWMProperties() calls XSetClassHint(), which sets the WM_CLASS property (see "Setting and Reading the WM_CLASS Property"). If the res_name member in the XClassHint structure is set to the NULL pointer and the RESOURCE_NAME environment variable is set, then the value of the environment variable is substituted for res_name. If the res_name member is NULL, the environment variable is not set, and argv and argv[0] are set, then the value of argv[0], stripped of any directory prefixes, is substituted for res_name.
引き数 class_hints が NULL でなければ、 XSetWMProperties()XSetClassHint() を呼び出して WM_CLASS プロパティを設定する。 ("Setting and Reading the WM_CLASS Property"参照) XClassHint 構造体の res_name メンバに NULL ポインタが設定されており、 かつ RESOURCE_NAME 環境変数が設定されていれば、 環境変数の値が res_name に代入される。 もし res_name メンバが NULL であり、 環境変数が設定されておらず、 argv と argv[0] が設定されている場合には argv[0] の値からディレクトリのプレフィックスを取り除いたものが res_name に代入される。

XSetWMProperties() can generate BadAlloc and BadWindow errors.
XSetWMProperties() はエラー BadAlloc, BadWindow を起こすことがある。

Diagnostics

BadAlloc The server failed to allocate the requested source or server memory.
BadWindow A value for a Window argument does not name a defined Window.

See also

XAllocClassHint(), XAllocIconSize(), XAllocSizeHints(), XAllocWMHints(), XmbSetWMProperties(), XParseGeometry(), XSetCommand(), XSetTransientForHint(), XSetTextProperty(), XSetWMClientMachine(), XSetWMColormapWindows(), XSetWMIconName(), XSetWMName(), XSetWMProtocols(), XStringListToTextProperty(), XTextPropertyToStringList(), "Using Window Manager Convenience Functions".
Christophe Tronche, ch.tronche@computer.org