XInternAtom

Syntax

Atom XInternAtom(display, atom_name, only_if_exists)
      Display *display;
      char *atom_name;
      Bool only_if_exists;

Arguments

display Specifies the connection to the X server.
Xサーバへの接続を指定。
atom_name Specifies the name associated with the atom you want returned.
取得しようとしているアトムに対応する名前を指定。
only_if_exists Specifies a Boolean value that indicates whether the atom must be created.
アトムを生成しなければならないかどうかを示す真偽値を指定。

Description

The XInternAtom() function returns the atom identifier associated with the specified atom_name string. If only_if_exists is False, the atom is created if it does not exist. Therefore, XInternAtom() can return None. If the atom name is not in the Host Portable Character Encoding, the result is implementation dependent. Uppercase and lowercase matter; the strings ``thing'', ``Thing'', and ``thinG'' all designate different atoms. The atom will remain defined even after the client's connection closes. It will become undefined only when the last connection to the X server closes.
XInternAtom() は指定した atom_name 文字列に対応するアトムの識別子を返す。 only_if_exists が False ならば、 アトムが存在しない場合には新しく生成される。 したがって XInternAtom() は常に None を返すことになる。 アトム名のエンコーディングがホストポータブル文字エンコーディングでない場合、 実行結果は実装依存である。 大文字と小文字は区別される。 したがって ``thing'', ``Thing'', ``thinG'' は全て異なるアトムとして区別される。 クライアントの接続が閉じた後であってもアトムは定義されたまま残る。 アトムが未定義にされるのは X サーバへの最後の接続が閉じられた時である。

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

Diagnostics

BadAlloc The server failed to allocate the requested source or server memory.
BadValue Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.

See also

XFree(), XGetAtomName(), XGetWindowProperty(), XInternAtoms(), "Properties and Atoms"
Christophe Tronche, ch.tronche@computer.org