1
# Xlib.protocol.event -- definitions of core events
3
# Copyright (C) 2000-2002 Peter Liljenberg <petli@ctrl-c.liu.se>
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
# Xlib.protocol modules
27
class AnyEvent(rq.Event):
29
_fields = rq.Struct( rq.Card8('type'),
31
rq.Card16('sequence_number'),
32
rq.FixedString('data', 28),
35
class KeyButtonPointer(rq.Event):
37
_fields = rq.Struct( rq.Card8('type'),
39
rq.Card16('sequence_number'),
43
rq.Window('child', (X.NONE, )),
49
rq.Card8('same_screen'),
53
class KeyPress(KeyButtonPointer):
56
class KeyRelease(KeyButtonPointer):
59
class ButtonPress(KeyButtonPointer):
62
class ButtonRelease(KeyButtonPointer):
63
_code = X.ButtonRelease
65
class MotionNotify(KeyButtonPointer):
66
_code = X.MotionNotify
68
class EnterLeave(rq.Event):
70
_fields = rq.Struct( rq.Card8('type'),
72
rq.Card16('sequence_number'),
76
rq.Window('child', (X.NONE, )),
86
class EnterNotify(EnterLeave):
89
class LeaveNotify(EnterLeave):
93
class Focus(rq.Event):
95
_fields = rq.Struct( rq.Card8('type'),
97
rq.Card16('sequence_number'),
103
class FocusIn(Focus):
106
class FocusOut(Focus):
109
class Expose(rq.Event):
111
_fields = rq.Struct( rq.Card8('type'),
113
rq.Card16('sequence_number'),
123
class GraphicsExpose(rq.Event):
124
_code = X.GraphicsExpose
125
_fields = rq.Struct( rq.Card8('type'),
127
rq.Card16('sequence_number'),
128
rq.Drawable('drawable'),
133
rq.Card16('minor_event'),
135
rq.Card8('major_event'),
139
class NoExpose(rq.Event):
141
_fields = rq.Struct( rq.Card8('type'),
143
rq.Card16('sequence_number'),
144
rq.Drawable('window'),
145
rq.Card16('minor_event'),
146
rq.Card8('major_event'),
150
class VisibilityNotify(rq.Event):
151
_code = X.VisibilityNotify
152
_fields = rq.Struct( rq.Card8('type'),
154
rq.Card16('sequence_number'),
160
class CreateNotify(rq.Event):
161
_code = X.CreateNotify
162
_fields = rq.Struct( rq.Card8('type'),
164
rq.Card16('sequence_number'),
171
rq.Card16('border_width'),
172
rq.Card8('override'),
176
class DestroyNotify(rq.Event):
177
_code = X.DestroyNotify
178
_fields = rq.Struct( rq.Card8('type'),
180
rq.Card16('sequence_number'),
186
class UnmapNotify(rq.Event):
187
_code = X.UnmapNotify
188
_fields = rq.Struct( rq.Card8('type'),
190
rq.Card16('sequence_number'),
193
rq.Card8('from_configure'),
197
class MapNotify(rq.Event):
199
_fields = rq.Struct( rq.Card8('type'),
201
rq.Card16('sequence_number'),
204
rq.Card8('override'),
208
class MapRequest(rq.Event):
210
_fields = rq.Struct( rq.Card8('type'),
212
rq.Card16('sequence_number'),
218
class ReparentNotify(rq.Event):
219
_code = X.ReparentNotify
220
_fields = rq.Struct( rq.Card8('type'),
222
rq.Card16('sequence_number'),
228
rq.Card8('override'),
232
class ConfigureNotify(rq.Event):
233
_code = X.ConfigureNotify
234
_fields = rq.Struct( rq.Card8('type'),
236
rq.Card16('sequence_number'),
239
rq.Window('above_sibling', (X.NONE, )),
244
rq.Card16('border_width'),
245
rq.Card8('override'),
249
class ConfigureRequest(rq.Event):
250
_code = X.ConfigureRequest
251
_fields = rq.Struct( rq.Card8('type'),
252
rq.Card8('stack_mode'),
253
rq.Card16('sequence_number'),
256
rq.Window('sibling', (X.NONE, )),
261
rq.Card16('border_width'),
262
rq.Card16('value_mask'),
266
class GravityNotify(rq.Event):
267
_code = X.GravityNotify
268
_fields = rq.Struct( rq.Card8('type'),
270
rq.Card16('sequence_number'),
278
class ResizeRequest(rq.Event):
279
_code = X.ResizeRequest
280
_fields = rq.Struct( rq.Card8('type'),
282
rq.Card16('sequence_number'),
289
class Circulate(rq.Event):
291
_fields = rq.Struct( rq.Card8('type'),
293
rq.Card16('sequence_number'),
301
class CirculateNotify(Circulate):
302
_code = X.CirculateNotify
304
class CirculateRequest(Circulate):
305
_code = X.CirculateRequest
307
class PropertyNotify(rq.Event):
308
_code = X.PropertyNotify
309
_fields = rq.Struct( rq.Card8('type'),
311
rq.Card16('sequence_number'),
319
class SelectionClear(rq.Event):
320
_code = X.SelectionClear
321
_fields = rq.Struct( rq.Card8('type'),
323
rq.Card16('sequence_number'),
330
class SelectionRequest(rq.Event):
331
_code = X.SelectionRequest
332
_fields = rq.Struct( rq.Card8('type'),
334
rq.Card16('sequence_number'),
337
rq.Window('requestor'),
338
rq.Card32('selection'),
340
rq.Card32('property'),
344
class SelectionNotify(rq.Event):
345
_code = X.SelectionNotify
346
_fields = rq.Struct( rq.Card8('type'),
348
rq.Card16('sequence_number'),
350
rq.Window('requestor'),
351
rq.Card32('selection'),
353
rq.Card32('property'),
357
class ColormapNotify(rq.Event):
358
_code = X.ColormapNotify
359
_fields = rq.Struct( rq.Card8('type'),
361
rq.Card16('sequence_number'),
363
rq.Colormap('colormap', (X.NONE, )),
369
class MappingNotify(rq.Event):
370
_code = X.MappingNotify
371
_fields = rq.Struct( rq.Card8('type'),
373
rq.Card16('sequence_number'),
375
rq.Card8('first_keycode'),
380
class ClientMessage(rq.Event):
381
_code = X.ClientMessage
382
_fields = rq.Struct( rq.Card8('type'),
383
rq.Format('data', 1),
384
rq.Card16('sequence_number'),
386
rq.Card32('client_type'),
387
rq.FixedPropertyData('data', 20),
390
class KeymapNotify(rq.Event):
391
_code = X.KeymapNotify
392
_fields = rq.Struct( rq.Card8('type'),
393
rq.FixedList('data', 31, rq.Card8Obj, pad = 0)
398
X.KeyPress: KeyPress,
399
X.KeyRelease: KeyRelease,
400
X.ButtonPress: ButtonPress,
401
X.ButtonRelease: ButtonRelease,
402
X.MotionNotify: MotionNotify,
403
X.EnterNotify: EnterNotify,
404
X.LeaveNotify: LeaveNotify,
406
X.FocusOut: FocusOut,
407
X.KeymapNotify: KeymapNotify,
409
X.GraphicsExpose: GraphicsExpose,
410
X.NoExpose: NoExpose,
411
X.VisibilityNotify: VisibilityNotify,
412
X.CreateNotify: CreateNotify,
413
X.DestroyNotify: DestroyNotify,
414
X.UnmapNotify: UnmapNotify,
415
X.MapNotify: MapNotify,
416
X.MapRequest: MapRequest,
417
X.ReparentNotify: ReparentNotify,
418
X.ConfigureNotify: ConfigureNotify,
419
X.ConfigureRequest: ConfigureRequest,
420
X.GravityNotify: GravityNotify,
421
X.ResizeRequest: ResizeRequest,
422
X.CirculateNotify: CirculateNotify,
423
X.CirculateRequest: CirculateRequest,
424
X.PropertyNotify: PropertyNotify,
425
X.SelectionClear: SelectionClear,
426
X.SelectionRequest: SelectionRequest,
427
X.SelectionNotify: SelectionNotify,
428
X.ColormapNotify: ColormapNotify,
429
X.ClientMessage: ClientMessage,
430
X.MappingNotify: MappingNotify,