int XGetWindowProperty(display, w, property, long_offset, long_length, delete, req_type,
actual_type_return, actual_format_return, nitems_return, bytes_after_return,
prop_return)
Display *display;
Window w;
Atom property;
long long_offset, long_length;
Bool delete;
Atom req_type;
Atom *actual_type_return;
int *actual_format_return;
unsigned long *nitems_return;
unsigned long *bytes_after_return;
unsigned char **prop_return;
display | Specifies the connection to the X server. Xサーバへの接続を指定。 |
w | Specifies the window whose property you want to obtain. 獲得したいプロパティを持つウィンドウを指定。 |
property | Specifies the property name. プロパティ名を指定。 |
long_offset | Specifies the offset in the specified property (in 32-bit quantities)
where the data is to be retrieved. 指定したプロパティ内の検索されるデータの位置を示すオフセットを指定。 (32ビット単位) |
long_length | Specifies the length in 32-bit multiples of the data to be retrieved. 検索するデータを 32ビット 単位の長さを指定。 |
delete | Specifies a Boolean value that determines whether the property is deleted. プロパティを削除するかどうか決定する真偽値を指定。 |
req_type | Specifies the atom identifier associated with the property type or
AnyPropertyType. プロパティのタイプに対応するアトム識別子か AnyPropertyType を指定。 |
actual_type_return | Returns the atom identifier that defines the actual type of the property. プロパティの実際のタイプを定義するアトム識別子が返される。 |
actual_format_return | Returns the actual format of the property. プロパティの実際のフォーマットが返される。 |
nitems_return | Returns the actual number of 8-bit, 16-bit, or 32-bit items
stored in the prop_return data. prop_return に格納された 8ビット、16ビット、32ビットのアイテムの実際の数が返される。 |
bytes_after_return | Returns the number of bytes remaining to be read in the property if
a partial read was performed. プロパティの一部だけ読み込んだ場合、 残りのバイト数が返される。 |
prop_return | Returns the data in the specified format. 指定したフォーマットのデータが返される。 |
N = actual length of the stored property in bytes (even if the format is 16 or 32)The returned value starts at byte index I in the property (indexing from zero), and its length in bytes is L. If the value for long_offset causes L to be negative, a BadValue error results. The value of bytes_after_return is A, giving the number of trailing unread bytes in the stored property.
I = 4 * long_offset
T = N - I
L = MINIMUM(T, 4 * long_length)
A = N - (I + L)
XGetWindowProperty()
always allocates one extra byte in prop_return
(even if the property is zero length)
and sets it to zero so that simple properties consisting of characters
do not have to be copied into yet another string before use.
XGetWindowProperty()
は常に prop_return に追加の 1 バイトをアロケートし
(たとえプロパティの長さがゼロでも)、
そこにゼロをセットする。
文字からなる簡単なプロパティを、
使用前に別の文字列にコピーする必要がないようにするためである。
If delete is
True
and bytes_after_return is zero,
XGetWindowProperty()
deletes the property
from the window and generates a
PropertyNotify
event on the window.
delete が
True
で bytes_after_return がゼロならば、
XGetWindowProperty()
はプロパティをウィンドウから削除し、
そのウィンドウ上に
PropertyNotify
イベントを生成する。
The function returns
Success
if it executes successfully.
To free the resulting data,
use
XFree().
この関数は正常に実行された場合、
Success
を返す。
得られたデータを解放するには
XFree()
を使用すること。
XGetWindowProperty()
can generate
BadAtom,
BadValue ,
and
BadWindow
errors.
XGetWindowProperty()
はエラー
BadAtom,
BadValue ,
BadWindow
を起こすことがある。
BadAtom | A value for an Atom argument does not name a
defined Atom. |
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. |
BadWindow | A value for a Window argument does not name a defined Window. |