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