| 1 |
'\" t |
| 2 |
.\" Title: xselectextensionevent |
| 3 |
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] |
| 4 |
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| 5 |
.\" Date: 09/05/2024 |
| 6 |
.\" Manual: \ \& |
| 7 |
.\" Source: \ \& |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "XSELECTEXTENSIONEVEN" "libmansuffix" "09/05/2024" "\ \&" "\ \&" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
XSelectExtensionEvent, XGetSelectedExtensionEvents \- select extension events, get the list of currently selected extension events |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.nf |
| 35 |
#include <X11/extensions/XInput\&.h> |
| 36 |
.fi |
| 37 |
.sp |
| 38 |
.nf |
| 39 |
XSelectExtensionEvent( Display *display, |
| 40 |
Window w, |
| 41 |
XEventClass *event_list, |
| 42 |
int event_count); |
| 43 |
.fi |
| 44 |
.sp |
| 45 |
.nf |
| 46 |
XGetSelectedExtensionEvents( Display *display, |
| 47 |
Window w, |
| 48 |
int *this_client_event_count_return, |
| 49 |
XEventClass **this_client_event_list_return, |
| 50 |
int *all_clients_event_count_return, |
| 51 |
XEventClass **all_clients_event_list_return); |
| 52 |
.fi |
| 53 |
.sp |
| 54 |
.nf |
| 55 |
display |
| 56 |
Specifies the connection to the X server\&. |
| 57 |
.fi |
| 58 |
.sp |
| 59 |
.nf |
| 60 |
w |
| 61 |
Specifies the window whose events you are interested in\&. |
| 62 |
.fi |
| 63 |
.sp |
| 64 |
.nf |
| 65 |
event_list |
| 66 |
Specifies the list of event classes that describe the |
| 67 |
events you are interested in\&. |
| 68 |
.fi |
| 69 |
.sp |
| 70 |
.nf |
| 71 |
event_count |
| 72 |
Specifies the count of event classes in the event list\&. |
| 73 |
.fi |
| 74 |
.sp |
| 75 |
.nf |
| 76 |
this_client_event_count_return |
| 77 |
Returns the count of event classes selected by this |
| 78 |
client\&. |
| 79 |
.fi |
| 80 |
.sp |
| 81 |
.nf |
| 82 |
this_client_event_list_return |
| 83 |
Returns a pointer to the list of event classes selected |
| 84 |
by this client\&. |
| 85 |
.fi |
| 86 |
.sp |
| 87 |
.nf |
| 88 |
all_clients_event_count_return |
| 89 |
Returns the count of event classes selected by all |
| 90 |
clients\&. |
| 91 |
.fi |
| 92 |
.sp |
| 93 |
.nf |
| 94 |
all_clients_event_list_return |
| 95 |
Returns a pointer to the list of event classes selected |
| 96 |
by all clients\&. |
| 97 |
.fi |
| 98 |
.SH "DESCRIPTION" |
| 99 |
.sp |
| 100 |
.if n \{\ |
| 101 |
.RS 4 |
| 102 |
.\} |
| 103 |
.nf |
| 104 |
The XSelectExtensionEvent request causes the X server to report |
| 105 |
the events associated with the specified list of event classes\&. |
| 106 |
Initially, X will not report any of these events\&. Events are |
| 107 |
reported relative to a window\&. If a window is not interested in |
| 108 |
a device event, it usually propagates to the closest ancestor |
| 109 |
that is interested, unless the do_not_propagate mask prohibits |
| 110 |
it\&. |
| 111 |
.fi |
| 112 |
.if n \{\ |
| 113 |
.RE |
| 114 |
.\} |
| 115 |
.sp |
| 116 |
.if n \{\ |
| 117 |
.RS 4 |
| 118 |
.\} |
| 119 |
.nf |
| 120 |
Multiple clients can select for the same events on the same |
| 121 |
window with the following restrictions: |
| 122 |
* Multiple clients can select events on the same window |
| 123 |
because their event masks are disjoint\&. When the X server |
| 124 |
generates an event, it reports it to all interested |
| 125 |
clients\&. |
| 126 |
* Only one client at a time can select a DeviceButtonPress |
| 127 |
event with automatic passive grabbing enabled, which is |
| 128 |
associated with the event class DeviceButtonPressGrab\&. To |
| 129 |
receive DeviceButtonPress events without automatic passive |
| 130 |
grabbing, use event class DeviceButtonPress but do not |
| 131 |
specify event class DeviceButtonPressGrab\&. |
| 132 |
.fi |
| 133 |
.if n \{\ |
| 134 |
.RE |
| 135 |
.\} |
| 136 |
.sp |
| 137 |
.if n \{\ |
| 138 |
.RS 4 |
| 139 |
.\} |
| 140 |
.nf |
| 141 |
The server reports the event to all interested clients\&. |
| 142 |
.fi |
| 143 |
.if n \{\ |
| 144 |
.RE |
| 145 |
.\} |
| 146 |
.sp |
| 147 |
.if n \{\ |
| 148 |
.RS 4 |
| 149 |
.\} |
| 150 |
.nf |
| 151 |
Information contained in the XDevice structure returned by |
| 152 |
XOpenDevice is used by macros to obtain the event classes that |
| 153 |
clients use in making XSelectExtensionEvent requests\&. Currently |
| 154 |
defined macros include DeviceKeyPress, DeviceKeyRelease, |
| 155 |
DeviceButtonPress, DeviceButtonRelease, DeviceMotionNotify, |
| 156 |
DeviceFocusIn, DeviceFocusOut, ProximityIn, ProximityOut, |
| 157 |
DeviceStateNotify, DeviceMappingNotify, ChangeDeviceNotify, |
| 158 |
DevicePointerMotionHint, DeviceButton1Motion, |
| 159 |
DeviceButton2Motion, DeviceButton3Motion, DeviceButton4Motion, |
| 160 |
DeviceButton5Motion, DeviceButtonMotion, DeviceOwnerGrabButton, |
| 161 |
DeviceButtonPressGrab, and NoExtensionEvent\&. |
| 162 |
.fi |
| 163 |
.if n \{\ |
| 164 |
.RE |
| 165 |
.\} |
| 166 |
.sp |
| 167 |
.if n \{\ |
| 168 |
.RS 4 |
| 169 |
.\} |
| 170 |
.nf |
| 171 |
To obtain the proper event class for a particular device, one |
| 172 |
of the above macros is invoked using the XDevice structure for |
| 173 |
that device\&. For example, |
| 174 |
DeviceKeyPress (*device, type, eventclass); |
| 175 |
.fi |
| 176 |
.if n \{\ |
| 177 |
.RE |
| 178 |
.\} |
| 179 |
.sp |
| 180 |
.if n \{\ |
| 181 |
.RS 4 |
| 182 |
.\} |
| 183 |
.nf |
| 184 |
returns the DeviceKeyPress event type and the eventclass for |
| 185 |
selecting DeviceKeyPress events from this device\&. |
| 186 |
.fi |
| 187 |
.if n \{\ |
| 188 |
.RE |
| 189 |
.\} |
| 190 |
.sp |
| 191 |
.if n \{\ |
| 192 |
.RS 4 |
| 193 |
.\} |
| 194 |
.nf |
| 195 |
XSelectExtensionEvent can generate a BadWindow or BadClass |
| 196 |
error\&. The XGetSelectedExtensionEvents request reports the |
| 197 |
extension events selected by this client and all clients for |
| 198 |
the specified window\&. This request returns pointers to two |
| 199 |
XEventClass arrays\&. One lists the input extension events |
| 200 |
selected by this client from the specified window\&. The other |
| 201 |
lists the event classes selected by all clients from the |
| 202 |
specified window\&. You should use XFree to free these two |
| 203 |
arrays\&. |
| 204 |
.fi |
| 205 |
.if n \{\ |
| 206 |
.RE |
| 207 |
.\} |
| 208 |
.sp |
| 209 |
.if n \{\ |
| 210 |
.RS 4 |
| 211 |
.\} |
| 212 |
.nf |
| 213 |
XGetSelectedExtensionEvents can generate a BadWindow error\&. |
| 214 |
.fi |
| 215 |
.if n \{\ |
| 216 |
.RE |
| 217 |
.\} |
| 218 |
.SH "DIAGNOSTICS" |
| 219 |
.sp |
| 220 |
.if n \{\ |
| 221 |
.RS 4 |
| 222 |
.\} |
| 223 |
.nf |
| 224 |
BadWindow |
| 225 |
A value for a Window argument does not name a defined |
| 226 |
window\&. |
| 227 |
.fi |
| 228 |
.if n \{\ |
| 229 |
.RE |
| 230 |
.\} |
| 231 |
.sp |
| 232 |
.if n \{\ |
| 233 |
.RS 4 |
| 234 |
.\} |
| 235 |
.nf |
| 236 |
BadClass |
| 237 |
A value for an XEventClass is invalid\&. |
| 238 |
.fi |
| 239 |
.if n \{\ |
| 240 |
.RE |
| 241 |
.\} |