xlib 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/x.rb +11 -0
- data/lib/x/constants.rb +614 -0
- data/lib/x/extensions.rb +10 -0
- data/lib/x/extensions/randr.rb +10 -0
- data/lib/x/extensions/randr/constants.rb +160 -0
- data/lib/x/extensions/randr/types.rb +18 -0
- data/lib/x/extensions/render.rb +10 -0
- data/lib/x/extensions/render/constants.rb +155 -0
- data/lib/x/extensions/render/types.rb +15 -0
- data/lib/x/types.rb +24 -0
- data/lib/xlib.rb +29 -0
- data/lib/xlib/constants.rb +119 -0
- data/lib/xlib/extensions.rb +10 -0
- data/lib/xlib/extensions/xrandr.rb +25 -0
- data/lib/xlib/extensions/xrandr/functions.rb +101 -0
- data/lib/xlib/extensions/xrandr/struct/crtc_change_notify_event.rb +24 -0
- data/lib/xlib/extensions/xrandr/struct/crtc_gamma.rb +16 -0
- data/lib/xlib/extensions/xrandr/struct/crtc_info.rb +24 -0
- data/lib/xlib/extensions/xrandr/struct/crtc_transform_attributes.rb +20 -0
- data/lib/xlib/extensions/xrandr/struct/mode_info.rb +26 -0
- data/lib/xlib/extensions/xrandr/struct/notify_event.rb +17 -0
- data/lib/xlib/extensions/xrandr/struct/output_change_notify_event.rb +24 -0
- data/lib/xlib/extensions/xrandr/struct/output_info.rb +27 -0
- data/lib/xlib/extensions/xrandr/struct/output_property_notify_event.rb +21 -0
- data/lib/xlib/extensions/xrandr/struct/panning.rb +25 -0
- data/lib/xlib/extensions/xrandr/struct/property_info.rb +17 -0
- data/lib/xlib/extensions/xrandr/struct/provider_change_notify_event.rb +20 -0
- data/lib/xlib/extensions/xrandr/struct/provider_info.rb +21 -0
- data/lib/xlib/extensions/xrandr/struct/provider_property_notify_event.rb +21 -0
- data/lib/xlib/extensions/xrandr/struct/provider_resources.rb +14 -0
- data/lib/xlib/extensions/xrandr/struct/resource_change_notify_event.rb +18 -0
- data/lib/xlib/extensions/xrandr/struct/screen_change_notify_event.rb +26 -0
- data/lib/xlib/extensions/xrandr/struct/screen_resources.rb +20 -0
- data/lib/xlib/extensions/xrandr/struct/screen_size.rb +16 -0
- data/lib/xlib/extensions/xrandr/types.rb +36 -0
- data/lib/xlib/extensions/xrender.rb +24 -0
- data/lib/xlib/extensions/xrender/constants.rb +28 -0
- data/lib/xlib/extensions/xrender/functions.rb +29 -0
- data/lib/xlib/extensions/xrender/struct/anim_cursor.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/circle.rb +15 -0
- data/lib/xlib/extensions/xrender/struct/conical_gradient.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/filters.rb +16 -0
- data/lib/xlib/extensions/xrender/struct/glyph_elt16.rb +17 -0
- data/lib/xlib/extensions/xrender/struct/glyph_elt32.rb +17 -0
- data/lib/xlib/extensions/xrender/struct/glyph_elt8.rb +17 -0
- data/lib/xlib/extensions/xrender/struct/glyph_info.rb +18 -0
- data/lib/xlib/extensions/xrender/struct/index_value.rb +17 -0
- data/lib/xlib/extensions/xrender/struct/line_fixed.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/linear_gradient.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/point_double.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/point_fixed.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/radial_gradient.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/render_color.rb +16 -0
- data/lib/xlib/extensions/xrender/struct/render_direct_format.rb +20 -0
- data/lib/xlib/extensions/xrender/struct/render_pict_format.rb +17 -0
- data/lib/xlib/extensions/xrender/struct/render_picture_attributes.rb +25 -0
- data/lib/xlib/extensions/xrender/struct/span_fix.rb +15 -0
- data/lib/xlib/extensions/xrender/struct/transform.rb +13 -0
- data/lib/xlib/extensions/xrender/struct/trap.rb +14 -0
- data/lib/xlib/extensions/xrender/struct/trapezoid.rb +16 -0
- data/lib/xlib/extensions/xrender/struct/triangle.rb +15 -0
- data/lib/xlib/extensions/xrender/types.rb +37 -0
- data/lib/xlib/functions.rb +396 -0
- data/lib/xlib/struct/any_event.rb +17 -0
- data/lib/xlib/struct/button_event.rb +27 -0
- data/lib/xlib/struct/circulate_event.rb +19 -0
- data/lib/xlib/struct/circulate_request_event.rb +19 -0
- data/lib/xlib/struct/client_message_event.rb +27 -0
- data/lib/xlib/struct/colormap_event.rb +20 -0
- data/lib/xlib/struct/configure_event.rb +25 -0
- data/lib/xlib/struct/configure_request_event.rb +26 -0
- data/lib/xlib/struct/create_window_event.rb +24 -0
- data/lib/xlib/struct/crossing_event.rb +29 -0
- data/lib/xlib/struct/destroy_window_event.rb +18 -0
- data/lib/xlib/struct/display.rb +56 -0
- data/lib/xlib/struct/error_event.rb +19 -0
- data/lib/xlib/struct/event.rb +48 -0
- data/lib/xlib/struct/expose_event.rb +22 -0
- data/lib/xlib/struct/focus_change_event.rb +19 -0
- data/lib/xlib/struct/gc.rb +14 -0
- data/lib/xlib/struct/gc_values.rb +35 -0
- data/lib/xlib/struct/generic_event.rb +18 -0
- data/lib/xlib/struct/generic_event_cookie.rb +20 -0
- data/lib/xlib/struct/graphics_expose_event.rb +25 -0
- data/lib/xlib/struct/gravity_event.rb +20 -0
- data/lib/xlib/struct/image.rb +37 -0
- data/lib/xlib/struct/key_event.rb +27 -0
- data/lib/xlib/struct/key_sym.rb +28 -0
- data/lib/xlib/struct/keymap_event.rb +18 -0
- data/lib/xlib/struct/map_event.rb +19 -0
- data/lib/xlib/struct/map_request_event.rb +22 -0
- data/lib/xlib/struct/mapping_event.rb +20 -0
- data/lib/xlib/struct/motion_event.rb +27 -0
- data/lib/xlib/struct/no_expose_event.rb +19 -0
- data/lib/xlib/struct/point.rb +14 -0
- data/lib/xlib/struct/property_event.rb +20 -0
- data/lib/xlib/struct/reparent_event.rb +22 -0
- data/lib/xlib/struct/resize_request_event.rb +19 -0
- data/lib/xlib/struct/screen.rb +31 -0
- data/lib/xlib/struct/selection_clear_event.rb +19 -0
- data/lib/xlib/struct/selection_event.rb +21 -0
- data/lib/xlib/struct/selection_request_event.rb +22 -0
- data/lib/xlib/struct/unmap_event.rb +19 -0
- data/lib/xlib/struct/visibility_event.rb +18 -0
- data/lib/xlib/struct/visual.rb +20 -0
- data/lib/xlib/struct/window_attributes.rb +35 -0
- data/lib/xlib/types.rb +73 -0
- metadata +164 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 2fd5b4e4316670f77569d981aa5a52f09110598e
|
|
4
|
+
data.tar.gz: cffb08d2b38925dc4766afab6e8da1ab6cdd904f
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2217888ccb8852bc5e57c2b9d71d75c7454a1473a4d33e229e6e4cb3d0cc94b77ccf5c87980fcc0f187ad450dc6d0c8615afccc059253f02bb4846aa1fc73523
|
|
7
|
+
data.tar.gz: 6dacd5c6dc735c90fe684d43907ff385fe770eba9c802e14cf13a3f2d40f28e5f3decba01aa765f025ad59cfd1937eb7819185289463c8f321d70a264b8dfc6c
|
data/lib/x.rb
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2014, Christopher Aue <mail@christopheraue.net>
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the ruby xlib gem. It is subject to the license terms in
|
|
5
|
+
# the LICENSE file found in the top-level directory of this distribution and at
|
|
6
|
+
# http://github.com/christopheraue/ruby-xlib.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
require_relative 'x/constants'
|
|
10
|
+
require_relative 'x/types'
|
|
11
|
+
require_relative 'x/extensions'
|
data/lib/x/constants.rb
ADDED
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2014, Christopher Aue <mail@christopheraue.net>
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the ruby xlib gem. It is subject to the license terms in
|
|
5
|
+
# the LICENSE file found in the top-level directory of this distribution and at
|
|
6
|
+
# http://github.com/christopheraue/ruby-xlib.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
module Xlib
|
|
10
|
+
#****************************************************************
|
|
11
|
+
# RESERVED RESOURCE AND CONSTANT DEFINITIONS
|
|
12
|
+
#***************************************************************
|
|
13
|
+
|
|
14
|
+
None = 0 # universal null resource or null atom
|
|
15
|
+
|
|
16
|
+
ParentRelative = 1 # background pixmap in CreateWindow
|
|
17
|
+
# and ChangeWindowAttributes
|
|
18
|
+
|
|
19
|
+
CopyFromParent = 0 # border pixmap in CreateWindow
|
|
20
|
+
# and ChangeWindowAttributes
|
|
21
|
+
# special VisualID and special window
|
|
22
|
+
# class passed to CreateWindow
|
|
23
|
+
|
|
24
|
+
PointerWindow = 0 # destination window in SendEvent
|
|
25
|
+
InputFocus = 1 # destination window in SendEvent
|
|
26
|
+
|
|
27
|
+
PointerRoot = 1 # focus window in SetInputFocus
|
|
28
|
+
|
|
29
|
+
AnyPropertyType = 0 # special Atom, passed to GetProperty
|
|
30
|
+
|
|
31
|
+
AnyKey = 0 # special Key Code, passed to GrabKey
|
|
32
|
+
|
|
33
|
+
AnyButton = 0 # special Button Code, passed to GrabButton
|
|
34
|
+
|
|
35
|
+
AllTemporary = 0 # special Resource ID passed to KillClient
|
|
36
|
+
|
|
37
|
+
CurrentTime = 0 # special Time
|
|
38
|
+
|
|
39
|
+
NoSymbol = 0 # special KeySym
|
|
40
|
+
|
|
41
|
+
#****************************************************************
|
|
42
|
+
# EVENT DEFINITIONS
|
|
43
|
+
#***************************************************************
|
|
44
|
+
|
|
45
|
+
# Input Event Masks. Used as event-mask window attribute and as arguments
|
|
46
|
+
# to Grab requests. Not to be confused with event names.
|
|
47
|
+
|
|
48
|
+
NoEventMask = 0
|
|
49
|
+
KeyPressMask = (1<<0)
|
|
50
|
+
KeyReleaseMask = (1<<1)
|
|
51
|
+
ButtonPressMask = (1<<2)
|
|
52
|
+
ButtonReleaseMask = (1<<3)
|
|
53
|
+
EnterWindowMask = (1<<4)
|
|
54
|
+
LeaveWindowMask = (1<<5)
|
|
55
|
+
PointerMotionMask = (1<<6)
|
|
56
|
+
PointerMotionHintMask = (1<<7)
|
|
57
|
+
Button1MotionMask = (1<<8)
|
|
58
|
+
Button2MotionMask = (1<<9)
|
|
59
|
+
Button3MotionMask = (1<<10)
|
|
60
|
+
Button4MotionMask = (1<<11)
|
|
61
|
+
Button5MotionMask = (1<<12)
|
|
62
|
+
ButtonMotionMask = (1<<13)
|
|
63
|
+
KeymapStateMask = (1<<14)
|
|
64
|
+
ExposureMask = (1<<15)
|
|
65
|
+
VisibilityChangeMask = (1<<16)
|
|
66
|
+
StructureNotifyMask = (1<<17)
|
|
67
|
+
ResizeRedirectMask = (1<<18)
|
|
68
|
+
SubstructureNotifyMask = (1<<19)
|
|
69
|
+
SubstructureRedirectMask = (1<<20)
|
|
70
|
+
FocusChangeMask = (1<<21)
|
|
71
|
+
PropertyChangeMask = (1<<22)
|
|
72
|
+
ColormapChangeMask = (1<<23)
|
|
73
|
+
OwnerGrabButtonMask = (1<<24)
|
|
74
|
+
|
|
75
|
+
# Event names. Used in "type" field in XEvent structures. Not to be
|
|
76
|
+
# confused with event masks above. They start from 2 because 0 and 1
|
|
77
|
+
# are reserved in the protocol for errors and replies.
|
|
78
|
+
|
|
79
|
+
KeyPress = 2
|
|
80
|
+
KeyRelease = 3
|
|
81
|
+
ButtonPress = 4
|
|
82
|
+
ButtonRelease = 5
|
|
83
|
+
MotionNotify = 6
|
|
84
|
+
EnterNotify = 7
|
|
85
|
+
LeaveNotify = 8
|
|
86
|
+
FocusIn = 9
|
|
87
|
+
FocusOut = 10
|
|
88
|
+
KeymapNotify = 11
|
|
89
|
+
Expose = 12
|
|
90
|
+
GraphicsExpose = 13
|
|
91
|
+
NoExpose = 14
|
|
92
|
+
VisibilityNotify = 15
|
|
93
|
+
CreateNotify = 16
|
|
94
|
+
DestroyNotify = 17
|
|
95
|
+
UnmapNotify = 18
|
|
96
|
+
MapNotify = 19
|
|
97
|
+
MapRequest = 20
|
|
98
|
+
ReparentNotify = 21
|
|
99
|
+
ConfigureNotify = 22
|
|
100
|
+
ConfigureRequest = 23
|
|
101
|
+
GravityNotify = 24
|
|
102
|
+
ResizeRequest = 25
|
|
103
|
+
CirculateNotify = 26
|
|
104
|
+
CirculateRequest = 27
|
|
105
|
+
PropertyNotify = 28
|
|
106
|
+
SelectionClear = 29
|
|
107
|
+
SelectionRequest = 30
|
|
108
|
+
SelectionNotify = 31
|
|
109
|
+
ColormapNotify = 32
|
|
110
|
+
ClientMessage = 33
|
|
111
|
+
MappingNotify = 34
|
|
112
|
+
GenericEvent = 35
|
|
113
|
+
LASTEvent = 36 # must be bigger than any event #
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
|
117
|
+
# state in various key-, mouse-, and button-related events.
|
|
118
|
+
|
|
119
|
+
ShiftMask = (1<<0)
|
|
120
|
+
LockMask = (1<<1)
|
|
121
|
+
ControlMask = (1<<2)
|
|
122
|
+
Mod1Mask = (1<<3)
|
|
123
|
+
Mod2Mask = (1<<4)
|
|
124
|
+
Mod3Mask = (1<<5)
|
|
125
|
+
Mod4Mask = (1<<6)
|
|
126
|
+
Mod5Mask = (1<<7)
|
|
127
|
+
|
|
128
|
+
# modifier names. Used to build a SetModifierMapping request or
|
|
129
|
+
# to read a GetModifierMapping request. These correspond to the
|
|
130
|
+
# masks defined above.
|
|
131
|
+
ShiftMapIndex = 0
|
|
132
|
+
LockMapIndex = 1
|
|
133
|
+
ControlMapIndex = 2
|
|
134
|
+
Mod1MapIndex = 3
|
|
135
|
+
Mod2MapIndex = 4
|
|
136
|
+
Mod3MapIndex = 5
|
|
137
|
+
Mod4MapIndex = 6
|
|
138
|
+
Mod5MapIndex = 7
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
# button masks. Used in same manner as Key masks above. Not to be confused
|
|
142
|
+
# with button names below.
|
|
143
|
+
|
|
144
|
+
Button1Mask = (1<<8)
|
|
145
|
+
Button2Mask = (1<<9)
|
|
146
|
+
Button3Mask = (1<<10)
|
|
147
|
+
Button4Mask = (1<<11)
|
|
148
|
+
Button5Mask = (1<<12)
|
|
149
|
+
|
|
150
|
+
AnyModifier = (1<<15) # used in GrabButton, GrabKey
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
# button names. Used as arguments to GrabButton and as detail in ButtonPress
|
|
154
|
+
# and ButtonRelease events. Not to be confused with button masks above.
|
|
155
|
+
# Note that 0 is already defined above as "AnyButton".
|
|
156
|
+
|
|
157
|
+
Button1 = 1
|
|
158
|
+
Button2 = 2
|
|
159
|
+
Button3 = 3
|
|
160
|
+
Button4 = 4
|
|
161
|
+
Button5 = 5
|
|
162
|
+
|
|
163
|
+
# Notify modes
|
|
164
|
+
|
|
165
|
+
NotifyNormal = 0
|
|
166
|
+
NotifyGrab = 1
|
|
167
|
+
NotifyUngrab = 2
|
|
168
|
+
NotifyWhileGrabbed = 3
|
|
169
|
+
|
|
170
|
+
NotifyHint = 1 # for MotionNotify events
|
|
171
|
+
|
|
172
|
+
# Notify detail
|
|
173
|
+
|
|
174
|
+
NotifyAncestor = 0
|
|
175
|
+
NotifyVirtual = 1
|
|
176
|
+
NotifyInferior = 2
|
|
177
|
+
NotifyNonlinear = 3
|
|
178
|
+
#define NotifyNonlinearVirtual 4
|
|
179
|
+
NotifyPointer = 5
|
|
180
|
+
NotifyPointerRoot = 6
|
|
181
|
+
NotifyDetailNone = 7
|
|
182
|
+
|
|
183
|
+
# Visibility notify
|
|
184
|
+
|
|
185
|
+
VisibilityUnobscured = 0
|
|
186
|
+
VisibilityPartiallyObscured = 1
|
|
187
|
+
VisibilityFullyObscured = 2
|
|
188
|
+
|
|
189
|
+
# Circulation request
|
|
190
|
+
|
|
191
|
+
PlaceOnTop = 0
|
|
192
|
+
PlaceOnBottom = 1
|
|
193
|
+
|
|
194
|
+
# protocol families
|
|
195
|
+
|
|
196
|
+
FamilyInternet = 0 # IPv4
|
|
197
|
+
FamilyDECnet = 1
|
|
198
|
+
FamilyChaos = 2
|
|
199
|
+
FamilyInternet6 = 6 # IPv6
|
|
200
|
+
|
|
201
|
+
# authentication families not tied to a specific protocol
|
|
202
|
+
#define FamilyServerInterpreted 5
|
|
203
|
+
|
|
204
|
+
# Property notification
|
|
205
|
+
|
|
206
|
+
PropertyNewValue = 0
|
|
207
|
+
PropertyDelete = 1
|
|
208
|
+
|
|
209
|
+
# Color Map notification
|
|
210
|
+
|
|
211
|
+
ColormapUninstalled = 0
|
|
212
|
+
ColormapInstalled = 1
|
|
213
|
+
|
|
214
|
+
# GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes
|
|
215
|
+
|
|
216
|
+
GrabModeSync = 0
|
|
217
|
+
GrabModeAsync = 1
|
|
218
|
+
|
|
219
|
+
# GrabPointer, GrabKeyboard reply status
|
|
220
|
+
|
|
221
|
+
GrabSuccess = 0
|
|
222
|
+
AlreadyGrabbed = 1
|
|
223
|
+
GrabInvalidTime = 2
|
|
224
|
+
GrabNotViewable = 3
|
|
225
|
+
GrabFrozen = 4
|
|
226
|
+
|
|
227
|
+
# AllowEvents modes
|
|
228
|
+
|
|
229
|
+
AsyncPointer = 0
|
|
230
|
+
SyncPointer = 1
|
|
231
|
+
ReplayPointer = 2
|
|
232
|
+
AsyncKeyboard = 3
|
|
233
|
+
SyncKeyboard = 4
|
|
234
|
+
ReplayKeyboard = 5
|
|
235
|
+
AsyncBoth = 6
|
|
236
|
+
SyncBoth = 7
|
|
237
|
+
|
|
238
|
+
# Used in SetInputFocus, GetInputFocus
|
|
239
|
+
|
|
240
|
+
RevertToNone = None
|
|
241
|
+
RevertToPointerRoot = PointerRoot
|
|
242
|
+
RevertToParent = 2
|
|
243
|
+
|
|
244
|
+
#****************************************************************
|
|
245
|
+
# ERROR CODES
|
|
246
|
+
#***************************************************************
|
|
247
|
+
|
|
248
|
+
Success = 0 # everything's okay
|
|
249
|
+
BadRequest = 1 # bad request code
|
|
250
|
+
BadValue = 2 # int parameter out of range
|
|
251
|
+
BadWindow = 3 # parameter not a Window
|
|
252
|
+
BadPixmap = 4 # parameter not a Pixmap
|
|
253
|
+
BadAtom = 5 # parameter not an Atom
|
|
254
|
+
BadCursor = 6 # parameter not a Cursor
|
|
255
|
+
BadFont = 7 # parameter not a Font
|
|
256
|
+
BadMatch = 8 # parameter mismatch
|
|
257
|
+
BadDrawable = 9 # parameter not a Pixmap or Window
|
|
258
|
+
BadAccess = 10 # depending on context:
|
|
259
|
+
# - key/button already grabbed
|
|
260
|
+
# - attempt to free an illegal
|
|
261
|
+
# cmap entry
|
|
262
|
+
# - attempt to store into a read-only
|
|
263
|
+
# color map entry.
|
|
264
|
+
# - attempt to modify the access control
|
|
265
|
+
# list from other than the local host.
|
|
266
|
+
#/
|
|
267
|
+
BadAlloc = 11 # insufficient resources
|
|
268
|
+
BadColor = 12 # no such colormap
|
|
269
|
+
BadGC = 13 # parameter not a GC
|
|
270
|
+
BadIDChoice = 14 # choice not in range or already used
|
|
271
|
+
BadName = 15 # font or color name doesn't exist
|
|
272
|
+
BadLength = 16 # Request length incorrect
|
|
273
|
+
#define BadImplementation 17 # server is defective
|
|
274
|
+
|
|
275
|
+
FirstExtensionError = 128
|
|
276
|
+
LastExtensionError = 255
|
|
277
|
+
|
|
278
|
+
#****************************************************************
|
|
279
|
+
# WINDOW DEFINITIONS
|
|
280
|
+
#***************************************************************
|
|
281
|
+
|
|
282
|
+
# Window classes used by CreateWindow
|
|
283
|
+
# Note that CopyFromParent is already defined as 0 above
|
|
284
|
+
|
|
285
|
+
InputOutput = 1
|
|
286
|
+
InputOnly = 2
|
|
287
|
+
|
|
288
|
+
# Window attributes for CreateWindow and ChangeWindowAttributes
|
|
289
|
+
|
|
290
|
+
CWBackPixmap = (1<<0)
|
|
291
|
+
CWBackPixel = (1<<1)
|
|
292
|
+
CWBorderPixmap = (1<<2)
|
|
293
|
+
CWBorderPixel = (1<<3)
|
|
294
|
+
CWBitGravity = (1<<4)
|
|
295
|
+
CWWinGravity = (1<<5)
|
|
296
|
+
CWBackingStore = (1<<6)
|
|
297
|
+
CWBackingPlanes = (1<<7)
|
|
298
|
+
CWBackingPixel = (1<<8)
|
|
299
|
+
CWOverrideRedirect = (1<<9)
|
|
300
|
+
CWSaveUnder = (1<<10)
|
|
301
|
+
CWEventMask = (1<<11)
|
|
302
|
+
CWDontPropagate = (1<<12)
|
|
303
|
+
CWColormap = (1<<13)
|
|
304
|
+
CWCursor = (1<<14)
|
|
305
|
+
|
|
306
|
+
# ConfigureWindow structure
|
|
307
|
+
|
|
308
|
+
CWX = (1<<0)
|
|
309
|
+
CWY = (1<<1)
|
|
310
|
+
CWWidth = (1<<2)
|
|
311
|
+
CWHeight = (1<<3)
|
|
312
|
+
CWBorderWidth = (1<<4)
|
|
313
|
+
CWSibling = (1<<5)
|
|
314
|
+
CWStackMode = (1<<6)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# Bit Gravity
|
|
318
|
+
|
|
319
|
+
ForgetGravity = 0
|
|
320
|
+
NorthWestGravity = 1
|
|
321
|
+
NorthGravity = 2
|
|
322
|
+
NorthEastGravity = 3
|
|
323
|
+
WestGravity = 4
|
|
324
|
+
CenterGravity = 5
|
|
325
|
+
EastGravity = 6
|
|
326
|
+
SouthWestGravity = 7
|
|
327
|
+
SouthGravity = 8
|
|
328
|
+
SouthEastGravity = 9
|
|
329
|
+
StaticGravity = 10
|
|
330
|
+
|
|
331
|
+
# Window gravity + bit gravity above
|
|
332
|
+
|
|
333
|
+
UnmapGravity = 0
|
|
334
|
+
|
|
335
|
+
# Used in CreateWindow for backing-store hint
|
|
336
|
+
|
|
337
|
+
NotUseful = 0
|
|
338
|
+
WhenMapped = 1
|
|
339
|
+
Always = 2
|
|
340
|
+
|
|
341
|
+
# Used in GetWindowAttributes reply
|
|
342
|
+
|
|
343
|
+
IsUnmapped = 0
|
|
344
|
+
IsUnviewable = 1
|
|
345
|
+
IsViewable = 2
|
|
346
|
+
|
|
347
|
+
# Used in ChangeSaveSet
|
|
348
|
+
|
|
349
|
+
SetModeInsert = 0
|
|
350
|
+
SetModeDelete = 1
|
|
351
|
+
|
|
352
|
+
# Used in ChangeCloseDownMode
|
|
353
|
+
|
|
354
|
+
DestroyAll = 0
|
|
355
|
+
RetainPermanent = 1
|
|
356
|
+
RetainTemporary = 2
|
|
357
|
+
|
|
358
|
+
# Window stacking method (in configureWindow)
|
|
359
|
+
|
|
360
|
+
Above = 0
|
|
361
|
+
Below = 1
|
|
362
|
+
TopIf = 2
|
|
363
|
+
BottomIf = 3
|
|
364
|
+
Opposite = 4
|
|
365
|
+
|
|
366
|
+
# Circulation direction
|
|
367
|
+
|
|
368
|
+
RaiseLowest = 0
|
|
369
|
+
LowerHighest = 1
|
|
370
|
+
|
|
371
|
+
# Property modes
|
|
372
|
+
|
|
373
|
+
PropModeReplace = 0
|
|
374
|
+
PropModePrepend = 1
|
|
375
|
+
PropModeAppend = 2
|
|
376
|
+
|
|
377
|
+
#****************************************************************
|
|
378
|
+
# GRAPHICS DEFINITIONS
|
|
379
|
+
#***************************************************************
|
|
380
|
+
|
|
381
|
+
# graphics functions, as in GC.alu
|
|
382
|
+
|
|
383
|
+
GXclear = 0x0 # 0
|
|
384
|
+
GXand = 0x1 # src AND dst
|
|
385
|
+
GXandReverse = 0x2 # src AND NOT dst
|
|
386
|
+
GXcopy = 0x3 # src
|
|
387
|
+
GXandInverted = 0x4 # NOT src AND dst
|
|
388
|
+
GXnoop = 0x5 # dst
|
|
389
|
+
GXxor = 0x6 # src XOR dst
|
|
390
|
+
GXor = 0x7 # src OR dst
|
|
391
|
+
GXnor = 0x8 # NOT src AND NOT dst
|
|
392
|
+
GXequiv = 0x9 # NOT src XOR dst
|
|
393
|
+
GXinvert = 0xa # NOT dst
|
|
394
|
+
GXorReverse = 0xb # src OR NOT dst
|
|
395
|
+
GXcopyInverted = 0xc # NOT src
|
|
396
|
+
GXorInverted = 0xd # NOT src OR dst
|
|
397
|
+
GXnand = 0xe # NOT src OR NOT dst
|
|
398
|
+
GXset = 0xf # 1
|
|
399
|
+
|
|
400
|
+
# LineStyle
|
|
401
|
+
|
|
402
|
+
LineSolid = 0
|
|
403
|
+
LineOnOffDash = 1
|
|
404
|
+
LineDoubleDash = 2
|
|
405
|
+
|
|
406
|
+
# capStyle
|
|
407
|
+
|
|
408
|
+
CapNotLast = 0
|
|
409
|
+
CapButt = 1
|
|
410
|
+
CapRound = 2
|
|
411
|
+
CapProjecting = 3
|
|
412
|
+
|
|
413
|
+
# joinStyle
|
|
414
|
+
|
|
415
|
+
JoinMiter = 0
|
|
416
|
+
JoinRound = 1
|
|
417
|
+
JoinBevel = 2
|
|
418
|
+
|
|
419
|
+
# fillStyle
|
|
420
|
+
|
|
421
|
+
FillSolid = 0
|
|
422
|
+
FillTiled = 1
|
|
423
|
+
FillStippled = 2
|
|
424
|
+
FillOpaqueStippled = 3
|
|
425
|
+
|
|
426
|
+
# fillRule
|
|
427
|
+
|
|
428
|
+
EvenOddRule = 0
|
|
429
|
+
WindingRule = 1
|
|
430
|
+
|
|
431
|
+
# subwindow mode
|
|
432
|
+
|
|
433
|
+
ClipByChildren = 0
|
|
434
|
+
IncludeInferiors = 1
|
|
435
|
+
|
|
436
|
+
# SetClipRectangles ordering
|
|
437
|
+
|
|
438
|
+
Unsorted = 0
|
|
439
|
+
YSorted = 1
|
|
440
|
+
YXSorted = 2
|
|
441
|
+
YXBanded = 3
|
|
442
|
+
|
|
443
|
+
# CoordinateMode for drawing routines
|
|
444
|
+
|
|
445
|
+
CoordModeOrigin = 0 # relative to the origin
|
|
446
|
+
CoordModePrevious = 1 # relative to previous point
|
|
447
|
+
|
|
448
|
+
# Polygon shapes
|
|
449
|
+
|
|
450
|
+
Complex = 0 # paths may intersect
|
|
451
|
+
Nonconvex = 1 # no paths intersect, but not convex
|
|
452
|
+
Convex = 2 # wholly convex
|
|
453
|
+
|
|
454
|
+
# Arc modes for PolyFillArc
|
|
455
|
+
|
|
456
|
+
ArcChord = 0 # join endpoints of arc
|
|
457
|
+
ArcPieSlice = 1 # join endpoints to center of arc
|
|
458
|
+
|
|
459
|
+
# GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
|
460
|
+
# GC.stateChanges
|
|
461
|
+
|
|
462
|
+
GCFunction = (1<<0)
|
|
463
|
+
GCPlaneMask = (1<<1)
|
|
464
|
+
GCForeground = (1<<2)
|
|
465
|
+
GCBackground = (1<<3)
|
|
466
|
+
GCLineWidth = (1<<4)
|
|
467
|
+
GCLineStyle = (1<<5)
|
|
468
|
+
GCCapStyle = (1<<6)
|
|
469
|
+
GCJoinStyle = (1<<7)
|
|
470
|
+
GCFillStyle = (1<<8)
|
|
471
|
+
GCFillRule = (1<<9)
|
|
472
|
+
GCTile = (1<<10)
|
|
473
|
+
GCStipple = (1<<11)
|
|
474
|
+
GCTileStipXOrigin = (1<<12)
|
|
475
|
+
GCTileStipYOrigin = (1<<13)
|
|
476
|
+
GCFont = (1<<14)
|
|
477
|
+
GCSubwindowMode = (1<<15)
|
|
478
|
+
GCGraphicsExposures = (1<<16)
|
|
479
|
+
GCClipXOrigin = (1<<17)
|
|
480
|
+
GCClipYOrigin = (1<<18)
|
|
481
|
+
GCClipMask = (1<<19)
|
|
482
|
+
GCDashOffset = (1<<20)
|
|
483
|
+
GCDashList = (1<<21)
|
|
484
|
+
GCArcMode = (1<<22)
|
|
485
|
+
|
|
486
|
+
GCLastBit = 22
|
|
487
|
+
#****************************************************************
|
|
488
|
+
# FONTS
|
|
489
|
+
#***************************************************************
|
|
490
|
+
|
|
491
|
+
# used in QueryFont -- draw direction
|
|
492
|
+
|
|
493
|
+
FontLeftToRight = 0
|
|
494
|
+
FontRightToLeft = 1
|
|
495
|
+
|
|
496
|
+
FontChange = 255
|
|
497
|
+
|
|
498
|
+
#****************************************************************
|
|
499
|
+
# IMAGING
|
|
500
|
+
#***************************************************************
|
|
501
|
+
|
|
502
|
+
# ImageFormat -- PutImage, GetImage
|
|
503
|
+
|
|
504
|
+
XYBitmap = 0 # depth 1, XYFormat
|
|
505
|
+
XYPixmap = 1 # depth == drawable depth
|
|
506
|
+
ZPixmap = 2 # depth == drawable depth
|
|
507
|
+
|
|
508
|
+
#****************************************************************
|
|
509
|
+
# COLOR MAP STUFF
|
|
510
|
+
#***************************************************************
|
|
511
|
+
|
|
512
|
+
# For CreateColormap
|
|
513
|
+
|
|
514
|
+
AllocNone = 0 # create map with no entries
|
|
515
|
+
AllocAll = 1 # allocate entire map writeable
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
# Flags used in StoreNamedColor, StoreColors
|
|
519
|
+
|
|
520
|
+
DoRed = (1<<0)
|
|
521
|
+
DoGreen = (1<<1)
|
|
522
|
+
DoBlue = (1<<2)
|
|
523
|
+
|
|
524
|
+
#****************************************************************
|
|
525
|
+
# CURSOR STUFF
|
|
526
|
+
#***************************************************************
|
|
527
|
+
|
|
528
|
+
# QueryBestSize Class
|
|
529
|
+
|
|
530
|
+
CursorShape = 0 # largest size that can be displayed
|
|
531
|
+
TileShape = 1 # size tiled fastest
|
|
532
|
+
StippleShape = 2 # size stippled fastest
|
|
533
|
+
|
|
534
|
+
#****************************************************************
|
|
535
|
+
# KEYBOARD/POINTER STUFF
|
|
536
|
+
#***************************************************************
|
|
537
|
+
|
|
538
|
+
AutoRepeatModeOff = 0
|
|
539
|
+
AutoRepeatModeOn = 1
|
|
540
|
+
AutoRepeatModeDefault = 2
|
|
541
|
+
|
|
542
|
+
LedModeOff = 0
|
|
543
|
+
LedModeOn = 1
|
|
544
|
+
|
|
545
|
+
# masks for ChangeKeyboardControl
|
|
546
|
+
|
|
547
|
+
KBKeyClickPercent = (1<<0)
|
|
548
|
+
KBBellPercent = (1<<1)
|
|
549
|
+
KBBellPitch = (1<<2)
|
|
550
|
+
KBBellDuration = (1<<3)
|
|
551
|
+
KBLed = (1<<4)
|
|
552
|
+
KBLedMode = (1<<5)
|
|
553
|
+
KBKey = (1<<6)
|
|
554
|
+
KBAutoRepeatMode = (1<<7)
|
|
555
|
+
|
|
556
|
+
MappingSuccess = 0
|
|
557
|
+
MappingBusy = 1
|
|
558
|
+
MappingFailed = 2
|
|
559
|
+
|
|
560
|
+
MappingModifier = 0
|
|
561
|
+
MappingKeyboard = 1
|
|
562
|
+
MappingPointer = 2
|
|
563
|
+
|
|
564
|
+
#****************************************************************
|
|
565
|
+
# SCREEN SAVER STUFF
|
|
566
|
+
#***************************************************************
|
|
567
|
+
|
|
568
|
+
DontPreferBlanking = 0
|
|
569
|
+
PreferBlanking = 1
|
|
570
|
+
DefaultBlanking = 2
|
|
571
|
+
|
|
572
|
+
DisableScreenSaver = 0
|
|
573
|
+
DisableScreenInterval = 0
|
|
574
|
+
|
|
575
|
+
DontAllowExposures = 0
|
|
576
|
+
AllowExposures = 1
|
|
577
|
+
DefaultExposures = 2
|
|
578
|
+
|
|
579
|
+
# for ForceScreenSaver
|
|
580
|
+
|
|
581
|
+
#define ScreenSaverReset 0
|
|
582
|
+
#define ScreenSaverActive 1
|
|
583
|
+
|
|
584
|
+
#****************************************************************
|
|
585
|
+
# HOSTS AND CONNECTIONS
|
|
586
|
+
#***************************************************************
|
|
587
|
+
|
|
588
|
+
# for ChangeHosts
|
|
589
|
+
|
|
590
|
+
HostInsert = 0
|
|
591
|
+
HostDelete = 1
|
|
592
|
+
|
|
593
|
+
# for ChangeAccessControl
|
|
594
|
+
|
|
595
|
+
EnableAccess = 1
|
|
596
|
+
DisableAccess = 0
|
|
597
|
+
|
|
598
|
+
# Display classes used in opening the connection
|
|
599
|
+
# Note that the statically allocated ones are even numbered and the
|
|
600
|
+
# dynamically changeable ones are odd numbered
|
|
601
|
+
|
|
602
|
+
StaticGray = 0
|
|
603
|
+
GrayScale = 1
|
|
604
|
+
StaticColor = 2
|
|
605
|
+
PseudoColor = 3
|
|
606
|
+
TrueColor = 4
|
|
607
|
+
DirectColor = 5
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
# Byte order used in imageByteOrder and bitmapBitOrder
|
|
611
|
+
|
|
612
|
+
LSBFirst = 0
|
|
613
|
+
MSBFirst = 1
|
|
614
|
+
end
|