1c27c18e8SmrgXSELECTEXTENSIONEVENT(libmansuffix) 2c27c18e8Smrg=================================== 3c27c18e8Smrg 4c27c18e8SmrgNAME 5c27c18e8Smrg---- 6c27c18e8Smrg 7c27c18e8Smrg XSelectExtensionEvent, XGetSelectedExtensionEvents - select 8c27c18e8Smrg extension events, get the list of currently selected extension 9c27c18e8Smrg events 10c27c18e8Smrg 11c27c18e8SmrgSYNOPSIS 12c27c18e8Smrg-------- 13c27c18e8Smrg 14c27c18e8Smrg #include <X11/extensions/XInput.h> 15c27c18e8Smrg 16c27c18e8Smrg XSelectExtensionEvent( Display *display, 17c27c18e8Smrg Window w, 18c27c18e8Smrg XEventClass *event_list, 19c27c18e8Smrg int event_count); 20c27c18e8Smrg 21c27c18e8Smrg XGetSelectedExtensionEvents( Display *display, 22c27c18e8Smrg Window w, 233e256790Smrg int *this_client_event_count_return, 243e256790Smrg XEventClass **this_client_event_list_return, 253e256790Smrg int *all_clients_event_count_return, 263e256790Smrg XEventClass **all_clients_event_list_return); 27c27c18e8Smrg 28c27c18e8Smrg display 29c27c18e8Smrg Specifies the connection to the X server. 30c27c18e8Smrg 31c27c18e8Smrg w 32c27c18e8Smrg Specifies the window whose events you are interested in. 33c27c18e8Smrg 34c27c18e8Smrg event_list 35c27c18e8Smrg Specifies the list of event classes that describe the 36c27c18e8Smrg events you are interested in. 37c27c18e8Smrg 38c27c18e8Smrg event_count 39c27c18e8Smrg Specifies the count of event classes in the event list. 40c27c18e8Smrg 41c27c18e8Smrg this_client_event_count_return 42c27c18e8Smrg Returns the count of event classes selected by this 43c27c18e8Smrg client. 44c27c18e8Smrg 45c27c18e8Smrg this_client_event_list_return 46c27c18e8Smrg Returns a pointer to the list of event classes selected 47c27c18e8Smrg by this client. 48c27c18e8Smrg 49c27c18e8Smrg all_clients_event_count_return 50c27c18e8Smrg Returns the count of event classes selected by all 51c27c18e8Smrg clients. 52c27c18e8Smrg 53c27c18e8Smrg all_clients_event_list_return 54c27c18e8Smrg Returns a pointer to the list of event classes selected 55c27c18e8Smrg by all clients. 56c27c18e8Smrg 57c27c18e8SmrgDESCRIPTION 58c27c18e8Smrg----------- 59c27c18e8Smrg 60c27c18e8Smrg The XSelectExtensionEvent request causes the X server to report 61c27c18e8Smrg the events associated with the specified list of event classes. 62c27c18e8Smrg Initially, X will not report any of these events. Events are 63c27c18e8Smrg reported relative to a window. If a window is not interested in 64c27c18e8Smrg a device event, it usually propagates to the closest ancestor 65c27c18e8Smrg that is interested, unless the do_not_propagate mask prohibits 66c27c18e8Smrg it. 67c27c18e8Smrg 68c27c18e8Smrg Multiple clients can select for the same events on the same 69c27c18e8Smrg window with the following restrictions: 70c27c18e8Smrg * Multiple clients can select events on the same window 71c27c18e8Smrg because their event masks are disjoint. When the X server 72c27c18e8Smrg generates an event, it reports it to all interested 73c27c18e8Smrg clients. 74c27c18e8Smrg * Only one client at a time can select a DeviceButtonPress 75c27c18e8Smrg event with automatic passive grabbing enabled, which is 76c27c18e8Smrg associated with the event class DeviceButtonPressGrab. To 77c27c18e8Smrg receive DeviceButtonPress events without automatic passive 78c27c18e8Smrg grabbing, use event class DeviceButtonPress but do not 79c27c18e8Smrg specify event class DeviceButtonPressGrab. 80c27c18e8Smrg 81c27c18e8Smrg The server reports the event to all interested clients. 82c27c18e8Smrg 83c27c18e8Smrg Information contained in the XDevice structure returned by 84c27c18e8Smrg XOpenDevice is used by macros to obtain the event classes that 85c27c18e8Smrg clients use in making XSelectExtensionEvent requests. Currently 86c27c18e8Smrg defined macros include DeviceKeyPress, DeviceKeyRelease, 8787404ef7Smrg DeviceButtonPress, DeviceButtonRelease, DeviceMotionNotify, 88c27c18e8Smrg DeviceFocusIn, DeviceFocusOut, ProximityIn, ProximityOut, 89f1ee322dSmrg DeviceStateNotify, DeviceMappingNotify, ChangeDeviceNotify, 90c27c18e8Smrg DevicePointerMotionHint, DeviceButton1Motion, 91c27c18e8Smrg DeviceButton2Motion, DeviceButton3Motion, DeviceButton4Motion, 92c27c18e8Smrg DeviceButton5Motion, DeviceButtonMotion, DeviceOwnerGrabButton, 93c27c18e8Smrg DeviceButtonPressGrab, and NoExtensionEvent. 94c27c18e8Smrg 95c27c18e8Smrg To obtain the proper event class for a particular device, one 96c27c18e8Smrg of the above macros is invoked using the XDevice structure for 97c27c18e8Smrg that device. For example, 98c27c18e8Smrg DeviceKeyPress (*device, type, eventclass); 99c27c18e8Smrg 100c27c18e8Smrg returns the DeviceKeyPress event type and the eventclass for 101c27c18e8Smrg selecting DeviceKeyPress events from this device. 102c27c18e8Smrg 103c27c18e8Smrg XSelectExtensionEvent can generate a BadWindow or BadClass 104c27c18e8Smrg error. The XGetSelectedExtensionEvents request reports the 105c27c18e8Smrg extension events selected by this client and all clients for 106c27c18e8Smrg the specified window. This request returns pointers to two 107c27c18e8Smrg XEventClass arrays. One lists the input extension events 108c27c18e8Smrg selected by this client from the specified window. The other 109c27c18e8Smrg lists the event classes selected by all clients from the 110c27c18e8Smrg specified window. You should use XFree to free these two 111c27c18e8Smrg arrays. 112c27c18e8Smrg 113c27c18e8Smrg XGetSelectedExtensionEvents can generate a BadWindow error. 114c27c18e8Smrg 115c27c18e8SmrgDIAGNOSTICS 116c27c18e8Smrg----------- 117c27c18e8Smrg 118c27c18e8Smrg BadWindow 119c27c18e8Smrg A value for a Window argument does not name a defined 120c27c18e8Smrg window. 121c27c18e8Smrg 122c27c18e8Smrg BadClass 123c27c18e8Smrg A value for an XEventClass is invalid. 124