2
.\" $XFree86: xc/doc/man/Xi/XSelExtEv.man,v 1.2 2001/01/27 18:20:22 dawes Exp $
5
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
7
.\" Permission to use, copy, modify, distribute, and sell this documentation
8
.\" for any purpose and without fee is hereby granted, provided that the above
9
.\" copyright notice and this permission notice appear in all copies.
10
.\" Ardent, and Hewlett-Packard make no representations about the
11
.\" suitability for any purpose of the information in this document. It is
12
.\" provided \`\`as is'' without express or implied warranty.
14
.\" $Xorg: XSelExtEv.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $
15
.ds xL Programming with Xlib
16
.TH XSelectExtensionEvent 3X11 __xorgversion__ "X FUNCTIONS"
18
XSelectExtensionEvent, XGetSelectedExtensionEvents \- select extension events, get the list of currently selected extension events
20
XSelectExtensionEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_list\fP\^, \fIevent_count\fP\^)
22
Display *\fIdisplay\fP\^;
26
XEventClass *\fIevent_list\fP\^;
28
int \fIevent_count\fP\^;
30
XGetSelectedExtensionEvents\^(\^\fIdisplay\fP, \fIw\fP\^, \fIthis_client_event_count_return\fP\^,
32
\fIthis_client_event_list_return\fP\^, \fIall_clients_event_count_return\fP\^,
33
\fIall_clients_event_list_return\fP\^)
35
Display *\fIdisplay\fP\^;
39
int \fIthis_client_event_count_return\fP\^;
41
XEventClass *\fIthis_client_event_list_return\fP\^;
43
int \fIall_clients_event_count_return\fP\^;
45
XEventClass *\fIall_clients_event_list_return\fP\^;
49
Specifies the connection to the X server.
50
.ds Wi whose events you are interested in
53
Specifies the window \*(Wi.
56
Specifies the list of event classes that describe the events you are interested in.
59
Specifies the count of event classes in the event list.
61
.I this_client_event_count_return
62
Returns the count of event classes selected by this client.
64
.I this_client_event_list_return
65
Returns a pointer to the list of event classes selected by this client.
67
.I all_clients_event_count_return
68
Returns the count of event classes selected by all clients.
70
.I all_clients_event_list_return
71
Returns a pointer to the list of event classes selected by all clients.
74
\fIXSelectExtensionEvent\fP request causes the X server to report the
75
events associated with the
76
specified list of event classes.
77
Initially, X will not report any of these events.
78
Events are reported relative to a window.
79
If a window is not interested in a device event, it usually propagates to
80
the closest ancestor that is interested,
81
unless the do_not_propagate mask prohibits it.
83
Multiple clients can select for the same events on the same window
84
with the following restrictions:
86
Multiple clients can select events on the same window because their event masks
88
When the X server generates an event, it reports it
89
to all interested clients.
91
Only one client at a time can select a
92
\fIDeviceButtonPress\fP
93
event with automatic passive grabbing enabled, which is associated with
94
the event class \fIDeviceButtonPressGrab\fP.
95
To receive \fIDeviceButtonPress\fP events without automatic passive
96
grabbing, use event class \fIDeviceButtonPress\fP but do not specify
97
event class \fIDeviceButtonPressGrab\fP.
99
The server reports the event to all interested clients.
101
Information contained in the \fIXDevice\fP structure returned by
102
\fIXOpenDevice\fP is used
103
by macros to obtain the event classes that clients use in making
104
\fIXSelectExtensionEvent\fP requests. Currently defined macros include
105
\fIDeviceKeyPress\fP, \fIDeviceKeyRelease\fP, \fIDeviceButtonPress\fP,
106
\fIDeviceButtonRelese\fP, \fIDeviceMotionNotify\fP, \fIDeviceFocusIn\fP,
107
\fIDeviceFocusOut\fP, \fIProximityIn\fP, \fIProximityOut\fP,
108
\fIDeviceStateNotify\fP, \fIDeviceMappiingNotify\fP,
109
\fIChangeDeviceNotify\fP, \fIDevicePointerMotionHint\fP,
110
\fIDeviceButton1Motion\fP, \fIDeviceButton2Motion\fP, \fIDeviceButton3Motion\fP,
111
\fIDeviceButton4Motion\fP, \fIDeviceButton5Motion\fP, \fIDeviceButtonMotion\fP,
112
\fIDeviceOwnerGrabButton\fP, \fIDeviceButtonPressGrab\fP, and
113
\fINoExtensionEvent\fP.
115
To obtain the proper event class for a particular device, one of the above
116
macros is invoked using the \fIXDevice\fP structure for that device. For
122
DeviceKeyPress (*device, type, eventclass);
125
returns the \fIDeviceKeyPress\fP event type and the eventclass for selecting
126
\fIDeviceKeyPress\fP events from this device.
128
\fIXSelectExtensionEvent\fP
129
can generate a \fIBadWindow\fP or \fIBadClass\fP error.
131
\fIXGetSelectedExtensionEvents\fP
132
request reports the extension events selected by this client and all clients
133
for the specified window. This request returns pointers to two
135
arrays. One lists the input extension events selected by this client from
136
the specified window. The other lists the event classes selected by all
137
clients from the specified window. You should use \fIXFree\fP to free these
140
\fIXGetSelectedExtensionEvents\fP
141
can generate a \fIBadWindow\fP error.
145
A value for a Window argument does not name a defined Window.
148
A value for an XEventClass argument is invalid.