1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XSelExtEv.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming with Xlib
.TH XSelectExtensionEvent 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XSelectExtensionEvent, XGetSelectedExtensionEvents \- select extension events, get the list of currently selected extension events
.SH SYNTAX
XSelectExtensionEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_list\fP\^, \fIevent_count\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
Window \fIw\fP\^;
.br
XEventClass *\fIevent_list\fP\^;
.br
int \fIevent_count\fP\^;
.sp
XGetSelectedExtensionEvents\^(\^\fIdisplay\fP, \fIw\fP\^, \fIthis_client_event_count_return\fP\^,
.br
\fIthis_client_event_list_return\fP\^, \fIall_clients_event_count_return\fP\^,
\fIall_clients_event_list_return\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
Window \fIw\fP\^;
.br
int \fIthis_client_event_count_return\fP\^;
.br
XEventClass *\fIthis_client_event_list_return\fP\^;
.br
int \fIall_clients_event_count_return\fP\^;
.br
XEventClass *\fIall_clients_event_list_return\fP\^;
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.ds Wi whose events you are interested in
.TP 12
.I w
Specifies the window \*(Wi.
.TP 12
.I event_list
Specifies the list of event classes that describe the events you are interested in.
.TP 12
.I event_count
Specifies the count of event classes in the event list.
.TP 12
.I this_client_event_count_return
Returns the count of event classes selected by this client.
.TP 12
.I this_client_event_list_return
Returns a pointer to the list of event classes selected by this client.
.TP 12
.I all_clients_event_count_return
Returns the count of event classes selected by all clients.
.TP 12
.I all_clients_event_list_return
Returns a pointer to the list of event classes selected by all clients.
.SH DESCRIPTION
The
\fIXSelectExtensionEvent\fP request causes the X server to report the
events associated with the
specified list of event classes.
Initially, X will not report any of these events.
Events are reported relative to a window.
If a window is not interested in a device event, it usually propagates to
the closest ancestor that is interested,
unless the do_not_propagate mask prohibits it.
.LP
Multiple clients can select for the same events on the same window
with the following restrictions:
.IP \(bu 5
Multiple clients can select events on the same window because their event masks
are disjoint.
When the X server generates an event, it reports it
to all interested clients.
.IP \(bu 5
Only one client at a time can select a
\fIDeviceButtonPress\fP
event with automatic passive grabbing enabled, which is associated with
the event class \fIDeviceButtonPressGrab\fP.
To receive \fIDeviceButtonPress\fP events without automatic passive
grabbing, use event class \fIDeviceButtonPress\fP but do not specify
event class \fIDeviceButtonPressGrab\fP.
.LP
The server reports the event to all interested clients.
.LP
Information contained in the \fIXDevice\fP structure returned by
\fIXOpenDevice\fP is used
by macros to obtain the event classes that clients use in making
\fIXSelectExtensionEvent\fP requests. Currently defined macros include
\fIDeviceKeyPress\fP, \fIDeviceKeyRelease\fP, \fIDeviceButtonPress\fP,
\fIDeviceButtonRelese\fP, \fIDeviceMotionNotify\fP, \fIDeviceFocusIn\fP,
\fIDeviceFocusOut\fP, \fIProximityIn\fP, \fIProximityOut\fP,
\fIDeviceStateNotify\fP, \fIDeviceMappiingNotify\fP,
\fIChangeDeviceNotify\fP, \fIDevicePointerMotionHint\fP,
\fIDeviceButton1Motion\fP, \fIDeviceButton2Motion\fP, \fIDeviceButton3Motion\fP,
\fIDeviceButton4Motion\fP, \fIDeviceButton5Motion\fP, \fIDeviceButtonMotion\fP,
\fIDeviceOwnerGrabButton\fP, \fIDeviceButtonPressGrab\fP, and
\fINoExtensionEvent\fP.
.LP
To obtain the proper event class for a particular device, one of the above
macros is invoked using the \fIXDevice\fP structure for that device. For
example,
.LP
.DS 0
.TA .5i
.ta .5i
DeviceKeyPress (*device, type, eventclass);
.DE
.LP
returns the \fIDeviceKeyPress\fP event type and the eventclass for selecting
\fIDeviceKeyPress\fP events from this device.
.LP
\fIXSelectExtensionEvent\fP
can generate a \fIBadWindow\fP or \fIBadClass\fP error.
The
\fIXGetSelectedExtensionEvents\fP
request reports the extension events selected by this client and all clients
for the specified window. This request returns pointers to two
\fIXEventClass\fP
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 \fIXFree\fP to free these
two arrays.
.LP
\fIXGetSelectedExtensionEvents\fP
can generate a \fIBadWindow\fP error.
.SH DIAGNOSTICS
.TP 12
\fIBadWindow\fP
A value for a Window argument does not name a defined Window.
.TP 12
\fIBadClass\fP
A value for an XEventClass argument is invalid.
.SH "SEE ALSO"
.br
\fI\*(xL\fP
|