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;
以下の制限つきで、複数のクライアントが同じウィンドウの同じイベントを 選択することができる。
サーバはイベントを注目している全てのクライアントに通知する。
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 構造体を使って上記のマクロの1つが呼び出される。 例えば、
DeviceKeyPress (*device, type, eventclass);
は イベント型 DeviceKeyPress と、このデバイスから選択している DeviceKeyPress イベントに対するイベントクラスを返す。
XSelectExtensionEvent はエラー BadWindow および BadClass を起こすことがある。 XEventClass arrays. One lists the input extension events selected by this client from the specified window. The other lists the event classes selected by all clients from the specified window. You should use XFree to free these two arrays. XGetSelectedExtensionEvents リクエストは、指定したウィンドウに対してこのクライアントおよび全ての クライアントが選択している拡張イベントを通知する。 このリクエストは2つの XEventClass の配列を返す。一方は、指定した ウィンドウからこのクライアントが選択した入力拡張イベント(input extention events)を列挙したものである。他方は指定したウィンドウから全 てのクライアントが選択したイベントクラスを列挙したものである。 これら2つの配列を解放するには、XFree を使用すること。
XGetSelectedExtensionEvents はエラー BadWindow を起こすことがある。