Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSelectExtensionEvent(3XI) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XSelectExtensionEvent(3XI)  —  NEWS-OS Programmer’s Manual

名称

XSelectExtensionEvent, XGetSelectedExtensionEvents − 拡張イベントを選択し、 現在選択されている拡張イベントを獲得する

形式

XSelectExtensionEvent(display, w, event_list, event_count)
      Display ∗display;
      Window w;
      XEventClass ∗event_list;
      int event_count; XGetSelectedExtensionEvents(display, w, this_client_event_count_return,
this_client_event_list_return, all_clients_event_count_return, all_clients_event_list_return)
      Display ∗display;
      Window w;
      int this_client_event_count_return;
      XEventClass ∗this_client_event_list_return;
      int all_clients_event_count_return;
      XEventClass ∗all_clients_event_list_return;

引数

display X サーバとの接続を指定する。

w 関連するイベントのウィンドウを指定する。

event_list 関連するイベントを記述するイベントクラスのリストを指定する。

event_count イベントリスト内のイベントクラスのカウントを指定する。

this_client_event_count_return
このクライアントによって選択されたイベントクラスの カウントを指定する。

this_client_event_list_return
このクライアントによって選択されたイベントクラスの リストへのポインタを指定する。

all_clients_event_count_return
全てのクライアントによって選択されたイベントクラスの カウントを返す。

all_clients_event_list_return
全てのクライアントによって選択されたイベントクラスの リストへのポインタを返す。

解説

XSelectExtensionEvent リクエストは X サーバがイベントクラスの指定リストに関連するイベント を報告するようにします。 最初、 X はどのイベントも報告しません。 イベントは、あるウィンドウに関連して報告されます。 あるウィンドウがデバイスイベントに関係していない場合、 do_not_propagate マスクが禁止していることを除いて、 通常は関連する最も近い先祖に波及します。

以下に示す制限はありますが、 複数のクライアントにて同一のウィンドウ上の同一の イベントを選択できます。

•イベントマクスがばらばらなので、 複数のクライアントが同一のウィンドウ上で イベントを選択できます。 X サーバがイベントを生成すると、 全ての関連するクライアントを報告します。

•イベントクラス DeviceButtonPressGrab に関連し、 自動的な受け身のグラブが可能な場合に DeviceButtonPress イベントを選択できるのは 一度には一つのクライアントだけです。 自動的な受け身のグラブ無しで DeviceButtonPress イベント を受け取るためには、 イベントクラス DeviceButtonPress を使用して イベントクラス DeviceButtonPressGrab を指定しません。

サーバはイベントを全ての関連するクライアントに 報告します。

XOpenDevice に返される XDevice 構造体 に保持される情報は、 XSelectExtensionEvent リクエストを作成する際に クライアントが使用するイベントクラスを獲得するための マクロによって使用されます。 現在定義されているマクロは以下を含みます。 DeviceKeyPress、DeviceKeyRelease、DeviceButtonPress、 DeviceButtonRelese、DeviceMotionNotify、DeviceFocusIn、 DeviceFocusOut、ProximityIn、ProximityOut、 DeviceStateNotify、DeviceMappiingNotify、 ChangeDeviceNotify、DevicePointerMotionHint、 DeviceButton1Motion、DeviceButton2Motion、DeviceButton3Motion、 DeviceButton4Motion、DeviceButton5Motion、DeviceButtonMotion、 DeviceOwnerGrabButton、DeviceButtonPressGrab、 および NoExtensionEvent。

特殊デバイスに対する適切なイベントクラスを獲得するためには、 そのデバイスに対する XDevice 構造体を使用して上記マクロの一つが呼び出されます。 例えば、

DeviceKeyPress (∗device, type, eventclass);

このデバイスから DeviceKeyPress イベントを選択するための DeviceKeyPress イベントタイプおよび eventclass を返します。

XSelectExtensionEvent は BadWindow または BadClass エラーを生成します。 XGetSelectedExtensionEvents リクエストはこのクライアント および指定ウィンドウに対する全てのクライアントにより 選択された拡張イベントを報告します。 このリクエストは 二つの XEventClass 列へのポインタを返します。 一つは、このクライアントによって指定ウィンドウから 選択された入力拡張イベントを出力します。 もう一つは指定ウィンドウから全てのクライアントより選択された イベントクラスを出力します。 これら二つの文字列を開放するためには、 XFree を使用すること。

XGetSelectedExtensionEvents は BadWindow エラーを生成します。

自己診断

BadWindow Window 引数の値が定義ウィンドウに一致しない。

BadClass XEventClass 引数の値が無効。

関連事項

Programming with Xlib

NEWS-OS Release 4.2.1R

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