4.3 Properties and Atoms

A property is a collection of named, typed data. The window system has a set of predefined properties (for example, the name of a window, size hints, and so on), and users can define any other arbitrary information and associate it with windows. Each property has a name, which is an ISO Latin-1 string. For each named property, a unique identifier (atom) is associated with it. A property also has a type, for example, string or integer. These types are also indicated using atoms, so arbitrary new types can be defined. Data of only one type may be associated with a single property name. Clients can store and retrieve properties associated with windows. For efficiency reasons, an atom is used rather than a character string. XInternAtom() can be used to obtain the atom for property names.
プロパティは名前付き型付されたデータの集合である。 ウィンドウシステムは事前に定義されたプロパティのセットを持つ。 (例えば、ウィンドウの名前、サイズのヒント等)、 そしてユーザは他の任意の情報を定義したり、 ウィンドウにこれらを関連づけたりすることができる。 それぞれのプロパティは名前を持ち、 その名前は ISO Latin-1 文字列である。 それぞれに名付けられたプロパティに対して、 ユニークな識別子(アトム)がこれに関連づけられる。 プロパティはまた型(例えば、文字列や整数値)を持つ。 これらの型は使っているアトムに示され、任意の新しい型を定義できる。 一つの型しか持たないデータは単一のプロパティー名に関連づけられる。 クライアントはウィンドウに関連づけられたプロパティを保存したり、 検索したりできる。効率の理由から、文字列よりアトムがよく使われる。 XInternAtom() はプロパティ名に対するアトムを得るために使われる。

A property is also stored in one of several possible formats. The X server can store the information as 8-bit quantities, 16-bit quantities, or 32-bit quantities. This permits the X server to present the data in the byte order that the client expects.
プロパティはまたいくつかの可能な形式のうちいずれかで蓄えられる。 Xサーバは8 bit,16 bit,32 bitとして情報を蓄える。 これはXサーバにクライアントが望むバイトオーダーでデータを蓄える事を許す。

Note

If you define further properties of complex type, you must encode and decode them yourself. These functions must be carefully written if they are to be portable. For further information about how to write a library extension, see "Extensions".
もっと複雑な型のプロパティを定義するなら、 その型を自分でエンコード、デコードしなければならない。 このプロパティがポータブルなら、 これらの関数は注意深く書かれるべきである。 ライブラリの拡張をどのように書くかについてのもっと多くの情報は "Extensions" を参照すること。
The type of a property is defined by an atom, which allows for arbitrary extension in this type scheme.
プロパティの型はアトムにより定義され、 そのアトムはこの型の枠組みにおいて自由に拡張可能である。

Certain property names are predefined in the server for commonly used functions. The atoms for these properties are defined in X11/Xatom.h. To avoid name clashes with user symbols, the #define name for each atom has the XA_ prefix. For definitions of these properties, see below. For an explanation of the functions that let you get and set much of the information stored in these predefined properties, see "Inter-Client Communication Functions".
いくつかのプロパティ名は一般に使われる関数においてサーバで事前に定義される。 これらのプロパティに対するアトムは X11/Xatom.h. 定義されている。 ユーザシンボルと名前が衝突するのを避けるために、 それぞれのアトムに対する #define 名はプリフィクス XA_ を持つ。 このようなプロパティの定義については下記を参照すること。 これらの事前に定義されたプロパティで蓄えられた多くの情報を得たり、 セットしたりする関数の説明については、 "Inter-Client Communication Functions" を参照すること。

The core protocol imposes no semantics on these property names, but semantics are specified in other X Consortium standards, such as the Inter-Client Communication Conventions Manual and the X Logical Font Description Conventions.
コアのプロトコルはこれらのプロパティ名における解釈を押しつけない。 しかし解釈は他のXコンソーシアム標準で指定される。 例えば Inter-Client Communication Conventions ManualX Logical Font Description Conventions などである。

You can use properties to communicate other information between applications. The functions described in this section let you define new properties and get the unique atom IDs in your applications.
アプリケーション間で他の情報をやりとりするためにプロパティを使うことができる。 この節で示されている関数はアプリケーションで新しいプロパティを定義したり、 ユニークなアトムIDを得ることを許す。

Although any particular atom can have some client interpretation within each of the name spaces, atoms occur in five distinct name spaces within the protocol:
全ての特定のアトムはそれぞれの名前空間内においてクライアントにより解釈されるが、 プロトコル内ではアトムは5つの識別可能な名前空間に現れる。

The built-in selection property names are:
組み込まれているセレクションプロパティ名には次のものがある。

PRIMARY
SECONDARY

The built-in property names are:
組み込まれているプロパティ名は次のものがある。
CUT_BUFFER0 RESOURCE_MANAGER
CUT_BUFFER1 WM_CLASS
CUT_BUFFER2 WM_CLIENT_MACHINE
CUT_BUFFER3 WM_COLORMAP_WINDOWS
CUT_BUFFER4 WM_COMMAND
CUT_BUFFER5 WM_HINTS
CUT_BUFFER6 WM_ICON_NAME
CUT_BUFFER7 WM_ICON_SIZE
RGB_BEST_MAP WM_NAME
RGB_BLUE_MAP WM_NORMAL_HINTS
RGB_DEFAULT_MAP WM_PROTOCOLS
RGB_GRAY_MAP WM_STATE
RGB_GREEN_MAP WM_TRANSIENT_FOR
RGB_RED_MAP WM_ZOOM_HINTS

The built-in property types are:
組み込まれているプロパティ型は次のものがある。

ARC POINT
ATOM RGB_COLOR_MAP
BITMAP RECTANGLE
CARDINAL STRING
COLORMAP VISUALID
CURSOR WINDOW
DRAWABLE WM_HINTS
FONT WM_SIZE_HINTS
INTEGER
PIXMAP

The built-in font property names are:
組み込まれているフォントプロパティ名は次のものがある。
MIN_SPACE STRIKEOUT_DESCENT
NORM_SPACE STRIKEOUT_ASCENT
MAX_SPACE ITALIC_ANGLE
END_SPACE X_HEIGHT
SUPERSCRIPT_X QUAD_WIDTH
SUPERSCRIPT_Y WEIGHT
SUBSCRIPT_X POINT_SIZE
SUBSCRIPT_Y RESOLUTION
UNDERLINE_POSITION COPYRIGHT
UNDERLINE_THICKNESS NOTICE
FONT_NAME FAMILY_NAME
FULL_NAME CAP_HEIGHT

For further information about font properties, see "Font Metrics".
フォントプロパティについてのより多くの情報に関しては8.5節を参照すること。

To return an atom for a given name, use XInternAtom().
与えられた名前に対するアトムを得るには XInternAtom を使う。

To return atoms for an array of names, use XInternAtoms().
名前の配列に対するアトムを得るには XInternAtoms を使う。

To return a name for a given atom identifier, use XGetAtomName().
与えられたアトム識別子に対する名前を得るには XGetAtomName を使う。

To return the names for an array of atom identifiers, use XGetAtomNames().
与えられたアトム識別子の配列に対する名前を得るには XGetAtomNames を使う。

Next: Obtaining and Changing Window Properties

Christophe Tronche, ch.tronche@computer.org