1 ! Copyright (C) 2005, 2006 Eduardo Cavazos and Alex Chapman
2 ! See http://factorcode.org/license.txt for BSD license.
6 USING: alien math ; IN: x11
10 TYPEDEF: uchar KeyCode
12 ! Reserved Resource and Constant Definitions
26 ! Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
27 ! state in various key-, mouse-, and button-related events.
30 ! modifier names. Used to build a SetModifierMapping request or
31 ! to read a GetModifierMapping request. These correspond to the
32 ! masks defined above.
43 ! button masks. Used in same manner as Key masks above. Not to be confused
44 ! with button names below.
47 : AnyModifier 1 15 shift ; ! used in GrabButton, GrabKey
49 ! button names. Used as arguments to GrabButton and as detail in ButtonPress
50 ! and ButtonRelease events. Not to be confused with button masks above.
51 ! Note that 0 is already defined above as "AnyButton".
58 : NotifyWhileGrabbed 3 ;
60 : NotifyHint 1 ; ! for MotionNotify events
68 : NotifyNonlinearVirtual 4 ;
70 : NotifyPointerRoot 6 ;
71 : NotifyDetailNone 7 ;
75 : VisibilityUnobscured 0 ;
76 : VisibilityPartiallyObscured 1 ;
77 : VisibilityFullyObscured 2 ;
86 : FamilyInternet 0 ; ! IPv4
89 : FamilyInternet6 6 ; ! IPv6
91 ! authentication families not tied to a specific protocol
92 : FamilyServerInterpreted 5 ;
94 ! Property notification
96 : PropertyNewValue 0 ;
99 ! Color Map notification
101 : ColormapUninstalled 0 ;
102 : ColormapInstalled 1 ;
104 ! GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes
109 ! GrabPointer, GrabKeyboard reply status
113 : GrabInvalidTime 2 ;
114 : GrabNotViewable 3 ;
128 ! Used in SetInputFocus, GetInputFocus
130 : RevertToNone None ;
131 : RevertToPointerRoot PointerRoot ;
134 ! *****************************************************************
136 ! *****************************************************************
138 : Success 0 ; ! everything's okay
139 : BadRequest 1 ; ! bad request code
140 : BadValue 2 ; ! int parameter out of range
141 : BadWindow 3 ; ! parameter not a Window
142 : BadPixmap 4 ; ! parameter not a Pixmap
143 : BadAtom 5 ; ! parameter not an Atom
144 : BadCursor 6 ; ! parameter not a Cursor
145 : BadFont 7 ; ! parameter not a Font
146 : BadMatch 8 ; ! parameter mismatch
147 : BadDrawable 9 ; ! parameter not a Pixmap or Window
148 : BadAccess 10 ; ! depending on context:
149 ! - key/button already grabbed
150 ! - attempt to free an illegal
152 ! - attempt to store into a read-only
154 ! - attempt to modify the access control
155 ! list from other than the local host.
156 : BadAlloc 11 ; ! insufficient resources
157 : BadColor 12 ; ! no such colormap
158 : BadGC 13 ; ! parameter not a GC
159 : BadIDChoice 14 ; ! choice not in range or already used
160 : BadName 15 ; ! font or color name doesn't exist
161 : BadLength 16 ; ! Request length incorrect
162 : BadImplementation 17 ; ! server is defective
164 : FirstExtensionError 128 ;
165 : LastExtensionError 255 ;
167 ! *****************************************************************
168 ! * WINDOW DEFINITIONS
169 ! *****************************************************************
171 ! Window classes used by CreateWindow
172 ! Note that CopyFromParent is already defined as 0 above
177 ! Used in CreateWindow for backing-store hint
183 ! Used in ChangeSaveSet
188 ! Used in ChangeCloseDownMode
191 : RetainPermanent 1 ;
192 : RetainTemporary 2 ;
194 ! Window stacking method (in configureWindow)
202 ! Circulation direction
209 : PropModeReplace 0 ;
210 : PropModePrepend 1 ;
213 ! *****************************************************************
214 ! * GRAPHICS DEFINITIONS
215 ! *****************************************************************
241 : FillOpaqueStippled 3 ;
251 : IncludeInferiors 1 ;
253 ! SetClipRectangles ordering
260 ! CoordinateMode for drawing routines
262 : CoordModeOrigin 0 ; ! relative to the origin
263 : CoordModePrevious 1 ; ! relative to previous point
267 : Complex 0 ; ! paths may intersect
268 : Nonconvex 1 ; ! no paths intersect, but not convex
269 : Convex 2 ; ! wholly convex
271 ! Arc modes for PolyFillArc
273 : ArcChord 0 ; ! join endpoints of arc
274 : ArcPieSlice 1 ; ! join endpoints to center of arc
276 ! *****************************************************************
278 ! *****************************************************************
280 ! used in QueryFont -- draw direction
282 : FontLeftToRight 0 ;
283 : FontRightToLeft 1 ;
287 ! *****************************************************************
289 ! *****************************************************************
291 ! ImageFormat -- PutImage, GetImage
293 : XYBitmap 0 ; ! depth 1, XYFormat
294 : XYPixmap 1 ; ! depth == drawable depth
295 : ZPixmap 2 ; ! depth == drawable depth
297 ! *****************************************************************
299 ! *****************************************************************
303 : AllocNone 0 ; ! create map with no entries
304 : AllocAll 1 ; ! allocate entire map writeable
307 ! Flags used in StoreNamedColor, StoreColors
310 : DoGreen 1 1 shift ;
313 ! *****************************************************************
315 ! *****************************************************************
317 ! QueryBestSize Class
319 : CursorShape 0 ; ! largest size that can be displayed
320 : TileShape 1 ; ! size tiled fastest
321 : StippleShape 2 ; ! size stippled fastest
323 ! *****************************************************************
324 ! * KEYBOARD/POINTER STUFF
325 ! *****************************************************************
327 : AutoRepeatModeOff 0 ;
328 : AutoRepeatModeOn 1 ;
329 : AutoRepeatModeDefault 2 ;
334 ! masks for ChangeKeyboardControl
336 : KBKeyClickPercent 1 0 shift ;
337 : KBBellPercent 1 1 shift ;
338 : KBBellPitch 1 2 shift ;
339 : KBBellDuration 1 3 shift ;
341 : KBLedMode 1 5 shift ;
343 : KBAutoRepeatMode 1 7 shift ;
349 : MappingModifier 0 ;
350 : MappingKeyboard 1 ;
353 ! *****************************************************************
354 ! * SCREEN SAVER STUFF
355 ! *****************************************************************
357 : DontPreferBlanking 0 ;
359 : DefaultBlanking 2 ;
361 : DisableScreenSaver 0 ;
362 : DisableScreenInterval 0 ;
364 : DontAllowExposures 0 ;
366 : DefaultExposures 2 ;
368 ! for ForceScreenSaver
370 : ScreenSaverReset 0 ;
371 : ScreenSaverActive 1 ;
373 ! *****************************************************************
374 ! * HOSTS AND CONNECTIONS
375 ! *****************************************************************
382 ! for ChangeAccessControl
387 ! Display classes used in opening the connection
388 ! Note that the statically allocated ones are even numbered and the
389 ! dynamically changeable ones are odd numbered
399 ! Byte order used in imageByteOrder and bitmapBitOrder