1 ! Copyright (C) 2005, 2006 Eduardo Cavazos
2 ! See http://factorcode.org/license.txt for BSD license.
4 ! The most popular guides to programming the X Window System are
5 ! the series from Oreilly. For programming with Xlib, there is
6 ! the reference manual and the programmers guide. However, a
7 ! lesser known manual is the free Xlib manual that comes with
8 ! the MIT X distribution. The arrangement and order of these
9 ! bindings follows the structure of the free Xlib manual. If you
10 ! add to this library and are wondering what part of the file to
11 ! modify, just find the function or data structure in the manual
12 ! and note the section.
14 USING: kernel arrays alien alien.c-types alien.strings
15 alien.syntax math math.bitwise words sequences namespaces
16 continuations io io.encodings.ascii x11.syntax ;
33 TYPEDEF: char* XPointer
34 TYPEDEF: void* Screen*
36 TYPEDEF: void* Visual*
37 TYPEDEF: void* XExtData*
38 TYPEDEF: void* XFontProp*
39 TYPEDEF: void* XComposeStatus*
47 TYPEDEF: ulong VisualID
50 TYPEDEF: void* Window**
55 ALIAS: <Drawable> <XID>
65 ! 2 - Display Functions
68 ! This struct is incomplete
70 { "void*" "ext_data" }
71 { "void*" "free_funcs" }
74 X-FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
76 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
78 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number ) ;
79 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number ) ;
80 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number ) ;
81 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number ) ;
82 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number ) ;
83 X-FUNCTION: int XDefaultScreen ( Display* display ) ;
84 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number ) ;
85 X-FUNCTION: Window XDefaultRootWindow ( Display* display ) ;
86 X-FUNCTION: int XProtocolVersion ( Display* display ) ;
87 X-FUNCTION: int XProtocolRevision ( Display* display ) ;
88 X-FUNCTION: int XQLength ( Display* display ) ;
89 X-FUNCTION: int XScreenCount ( Display* display ) ;
90 X-FUNCTION: int XConnectionNumber ( Display* display ) ;
92 ! 2.5 Closing the Display
93 X-FUNCTION: int XCloseDisplay ( Display* display ) ;
96 ! 3 - Window Functions
99 ! 3.2 - Window Attributes
101 : CWBackPixmap ( -- n ) 0 2^ ; inline
102 : CWBackPixel ( -- n ) 1 2^ ; inline
103 : CWBorderPixmap ( -- n ) 2 2^ ; inline
104 : CWBorderPixel ( -- n ) 3 2^ ; inline
105 : CWBitGravity ( -- n ) 4 2^ ; inline
106 : CWWinGravity ( -- n ) 5 2^ ; inline
107 : CWBackingStore ( -- n ) 6 2^ ; inline
108 : CWBackingPlanes ( -- n ) 7 2^ ; inline
109 : CWBackingPixel ( -- n ) 8 2^ ; inline
110 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
111 : CWSaveUnder ( -- n ) 10 2^ ; inline
112 : CWEventMask ( -- n ) 11 2^ ; inline
113 : CWDontPropagate ( -- n ) 12 2^ ; inline
114 : CWColormap ( -- n ) 13 2^ ; inline
115 : CWCursor ( -- n ) 14 2^ ; inline
117 C-STRUCT: XSetWindowAttributes
118 { "Pixmap" "background_pixmap" }
119 { "ulong" "background_pixel" }
120 { "Pixmap" "border_pixmap" }
121 { "ulong" "border_pixel" }
122 { "int" "bit_gravity" }
123 { "int" "win_gravity" }
124 { "int" "backing_store" }
125 { "ulong" "backing_planes" }
126 { "ulong" "backing_pixel" }
127 { "Bool" "save_under" }
128 { "long" "event_mask" }
129 { "long" "do_not_propagate_mask" }
130 { "Bool" "override_redirect" }
131 { "Colormap" "colormap" }
132 { "Cursor" "cursor" } ;
134 CONSTANT: UnmapGravity 0
136 CONSTANT: ForgetGravity 0
137 CONSTANT: NorthWestGravity 1
138 CONSTANT: NorthGravity 2
139 CONSTANT: NorthEastGravity 3
140 CONSTANT: WestGravity 4
141 CONSTANT: CenterGravity 5
142 CONSTANT: EastGravity 6
143 CONSTANT: SouthWestGravity 7
144 CONSTANT: SouthGravity 8
145 CONSTANT: SouthEastGravity 9
146 CONSTANT: StaticGravity 10
148 ! 3.3 - Creating Windows
150 X-FUNCTION: Window XCreateWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, int depth, uint class, Visual* visual, ulong valuemask, XSetWindowAttributes* attributes ) ;
151 X-FUNCTION: Window XCreateSimpleWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, ulong border, ulong background ) ;
152 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w ) ;
153 X-FUNCTION: Status XMapWindow ( Display* display, Window window ) ;
154 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window ) ;
155 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w ) ;
156 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w ) ;
158 ! 3.5 Mapping Windows
160 X-FUNCTION: int XMapRaised ( Display* display, Window w ) ;
162 ! 3.7 - Configuring Windows
164 : CWX ( -- n ) 0 2^ ; inline
165 : CWY ( -- n ) 1 2^ ; inline
166 : CWWidth ( -- n ) 2 2^ ; inline
167 : CWHeight ( -- n ) 3 2^ ; inline
168 : CWBorderWidth ( -- n ) 4 2^ ; inline
169 : CWSibling ( -- n ) 5 2^ ; inline
170 : CWStackMode ( -- n ) 6 2^ ; inline
172 C-STRUCT: XWindowChanges
177 { "int" "border_width" }
178 { "Window" "sibling" }
179 { "int" "stack_mode" } ;
181 X-FUNCTION: Status XConfigureWindow ( Display* display, Window w, uint value_mask, XWindowChanges* values ) ;
182 X-FUNCTION: Status XMoveWindow ( Display* display, Window w, int x, int y ) ;
183 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height ) ;
184 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width ) ;
187 ! 3.8 Changing Window Stacking Order
189 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w ) ;
190 X-FUNCTION: Status XLowerWindow ( Display* display, Window w ) ;
192 ! 3.9 - Changing Window Attributes
194 X-FUNCTION: Status XChangeWindowAttributes (
195 Display* display, Window w, ulong valuemask, XSetWindowAttributes* attr ) ;
196 X-FUNCTION: Status XSetWindowBackground (
197 Display* display, Window w, ulong background_pixel ) ;
198 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor ) ;
199 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w ) ;
201 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
202 ! 4 - Window Information Functions
203 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
205 ! 4.1 - Obtaining Window Information
207 X-FUNCTION: Status XQueryTree (
211 Window* parent_return,
212 Window** children_return, uint* nchildren_return ) ;
214 C-STRUCT: XWindowAttributes
219 { "int" "border_width" }
221 { "Visual*" "visual" }
224 { "int" "bit_gravity" }
225 { "int" "win_gravity" }
226 { "int" "backing_store" }
227 { "ulong" "backing_planes" }
228 { "ulong" "backing_pixel" }
229 { "Bool" "save_under" }
230 { "Colormap" "colormap" }
231 { "Bool" "map_installed" }
232 { "int" "map_state" }
233 { "long" "all_event_masks" }
234 { "long" "your_event_mask" }
235 { "long" "do_not_propagate_mask" }
236 { "Bool" "override_redirect" }
237 { "Screen*" "screen" } ;
239 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr ) ;
241 CONSTANT: IsUnmapped 0
242 CONSTANT: IsUnviewable 1
243 CONSTANT: IsViewable 2
245 X-FUNCTION: Status XGetGeometry (
253 uint* border_width_return,
254 uint* depth_return ) ;
256 ! 4.2 - Translating Screen Coordinates
258 X-FUNCTION: Bool XQueryPointer ( Display* display, Window w, Window* root_return, Window* child_return, int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return, uint* mask_return ) ;
260 ! 4.3 - Properties and Atoms
262 X-FUNCTION: Atom XInternAtom ( Display* display, char* atom_name, Bool only_if_exists ) ;
264 X-FUNCTION: char* XGetAtomName ( Display* display, Atom atom ) ;
266 ! 4.4 - Obtaining and Changing Window Properties
268 X-FUNCTION: int XGetWindowProperty ( Display* display, Window w, Atom property, long long_offset, long long_length, Bool delete, Atom req_type, Atom* actual_type_return, int* actual_format_return, ulong* nitems_return, ulong* bytes_after_return, char** prop_return ) ;
270 X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ;
274 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time ) ;
276 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection ) ;
278 X-FUNCTION: int XConvertSelection ( Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time ) ;
281 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
282 ! 5 - Pixmap and Cursor Functions
283 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
285 ! 5.1 - Creating and Freeing Pixmaps
287 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth ) ;
288 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap ) ;
291 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
292 ! 6 - Color Management Functions
293 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
303 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
304 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
305 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
307 ! 6.4 Creating, Copying, and Destroying Colormaps
309 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
311 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
312 ! 7 - Graphics Context Functions
313 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
315 : GCFunction ( -- n ) 0 2^ ; inline
316 : GCPlaneMask ( -- n ) 1 2^ ; inline
317 : GCForeground ( -- n ) 2 2^ ; inline
318 : GCBackground ( -- n ) 3 2^ ; inline
319 : GCLineWidth ( -- n ) 4 2^ ; inline
320 : GCLineStyle ( -- n ) 5 2^ ; inline
321 : GCCapStyle ( -- n ) 6 2^ ; inline
322 : GCJoinStyle ( -- n ) 7 2^ ; inline
323 : GCFillStyle ( -- n ) 8 2^ ; inline
324 : GCFillRule ( -- n ) 9 2^ ; inline
325 : GCTile ( -- n ) 10 2^ ; inline
326 : GCStipple ( -- n ) 11 2^ ; inline
327 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
328 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
329 : GCFont ( -- n ) 14 2^ ; inline
330 : GCSubwindowMode ( -- n ) 15 2^ ; inline
331 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
332 : GCClipXOrigin ( -- n ) 17 2^ ; inline
333 : GCClipYOrigin ( -- n ) 18 2^ ; inline
334 : GCClipMask ( -- n ) 19 2^ ; inline
335 : GCDashOffset ( -- n ) 20 2^ ; inline
336 : GCDashList ( -- n ) 21 2^ ; inline
337 : GCArcMode ( -- n ) 22 2^ ; inline
339 CONSTANT: GXclear HEX: 0
340 CONSTANT: GXand HEX: 1
341 CONSTANT: GXandReverse HEX: 2
342 CONSTANT: GXcopy HEX: 3
343 CONSTANT: GXandInverted HEX: 4
344 CONSTANT: GXnoop HEX: 5
345 CONSTANT: GXxor HEX: 6
346 CONSTANT: GXor HEX: 7
347 CONSTANT: GXnor HEX: 8
348 CONSTANT: GXequiv HEX: 9
349 CONSTANT: GXinvert HEX: a
350 CONSTANT: GXorReverse HEX: b
351 CONSTANT: GXcopyInverted HEX: c
352 CONSTANT: GXorInverted HEX: d
353 CONSTANT: GXnand HEX: e
354 CONSTANT: GXset HEX: f
358 { "ulong" "plane_mask" }
359 { "ulong" "foreground" }
360 { "ulong" "background" }
361 { "int" "line_width" }
362 { "int" "line_style" }
363 { "int" "cap_style" }
364 { "int" "join_style" }
365 { "int" "fill_style" }
366 { "int" "fill_rule" }
369 { "Pixmap" "stipple" }
370 { "int" "ts_x_origin" }
371 { "int" "ts_y_origin" }
373 { "int" "subwindow_mode" }
374 { "Bool" "graphics_exposures" }
375 { "int" "clip_x_origin" }
376 { "int" "clip_y_origin" }
377 { "Pixmap" "clip_mask" }
378 { "int" "dash_offset" }
379 { "char" "dashes" } ;
381 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
382 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
383 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
384 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
385 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
386 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
387 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
389 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
391 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
393 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
394 ! 8 - Graphics Functions
395 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
397 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
398 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
399 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
400 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
401 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
405 C-STRUCT: XCharStruct
406 { "short" "lbearing" }
407 { "short" "rbearing" }
410 { "short" "descent" }
411 { "ushort" "attributes" } ;
413 X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ;
414 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
415 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ;
417 C-STRUCT: XFontStruct
418 { "XExtData*" "ext_data" }
420 { "uint" "direction" }
421 { "uint" "min_char_or_byte2" }
422 { "uint" "max_char_or_byte2" }
423 { "uint" "min_byte1" }
424 { "uint" "max_byte1" }
425 { "Bool" "all_chars_exist" }
426 { "uint" "default_char" }
427 { "int" "n_properties" }
428 { "XFontProp*" "properties" }
429 { "XCharStruct" "min_bounds" }
430 { "XCharStruct" "max_bounds" }
431 { "XCharStruct*" "per_char" }
433 { "int" "descent" } ;
435 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ;
439 X-FUNCTION: Status XDrawString (
448 ! 8.7 - Transferring Images between Client and Server
453 CONSTANT: AllPlanes -1
455 C-STRUCT: XImage-funcs
456 { "void*" "create_image" }
457 { "void*" "destroy_image" }
458 { "void*" "get_pixel" }
459 { "void*" "put_pixel" }
460 { "void*" "sub_image" }
461 { "void*" "add_pixel" } ;
469 { "int" "byte_order" }
470 { "int" "bitmap_unit" }
471 { "int" "bitmap_bit_order" }
472 { "int" "bitmap_pad" }
474 { "int" "bytes_per_line" }
475 { "int" "bits_per_pixel" }
476 { "ulong" "red_mask" }
477 { "ulong" "green_mask" }
478 { "ulong" "blue_mask" }
479 { "XPointer" "obdata" }
480 { "XImage-funcs" "f" } ;
482 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
483 X-FUNCTION: int XDestroyImage ( XImage *ximage ) ;
485 : XImage-size ( ximage -- size )
486 [ XImage-height ] [ XImage-bytes_per_line ] bi * ;
488 : XImage-pixels ( ximage -- byte-array )
489 [ XImage-data ] [ XImage-size ] bi memory>byte-array ;
492 ! 9 - Window and Session Manager Functions
495 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
496 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
497 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
498 X-FUNCTION: Status XGrabServer ( Display* display ) ;
499 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
500 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
502 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
504 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
508 : NoEventMask ( -- n ) 0 ; inline
509 : KeyPressMask ( -- n ) 0 2^ ; inline
510 : KeyReleaseMask ( -- n ) 1 2^ ; inline
511 : ButtonPressMask ( -- n ) 2 2^ ; inline
512 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
513 : EnterWindowMask ( -- n ) 4 2^ ; inline
514 : LeaveWindowMask ( -- n ) 5 2^ ; inline
515 : PointerMotionMask ( -- n ) 6 2^ ; inline
516 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
517 : Button1MotionMask ( -- n ) 8 2^ ; inline
518 : Button2MotionMask ( -- n ) 9 2^ ; inline
519 : Button3MotionMask ( -- n ) 10 2^ ; inline
520 : Button4MotionMask ( -- n ) 11 2^ ; inline
521 : Button5MotionMask ( -- n ) 12 2^ ; inline
522 : ButtonMotionMask ( -- n ) 13 2^ ; inline
523 : KeymapStateMask ( -- n ) 14 2^ ; inline
524 : ExposureMask ( -- n ) 15 2^ ; inline
525 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
526 : StructureNotifyMask ( -- n ) 17 2^ ; inline
527 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
528 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
529 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
530 : FocusChangeMask ( -- n ) 21 2^ ; inline
531 : PropertyChangeMask ( -- n ) 22 2^ ; inline
532 : ColormapChangeMask ( -- n ) 23 2^ ; inline
533 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
536 CONSTANT: KeyRelease 3
537 CONSTANT: ButtonPress 4
538 CONSTANT: ButtonRelease 5
539 CONSTANT: MotionNotify 6
540 CONSTANT: EnterNotify 7
541 CONSTANT: LeaveNotify 8
543 CONSTANT: FocusOut 10
544 CONSTANT: KeymapNotify 11
546 CONSTANT: GraphicsExpose 13
547 CONSTANT: NoExpose 14
548 CONSTANT: VisibilityNotify 15
549 CONSTANT: CreateNotify 16
550 CONSTANT: DestroyNotify 17
551 CONSTANT: UnmapNotify 18
552 CONSTANT: MapNotify 19
553 CONSTANT: MapRequest 20
554 CONSTANT: ReparentNotify 21
555 CONSTANT: ConfigureNotify 22
556 CONSTANT: ConfigureRequest 23
557 CONSTANT: GravityNotify 24
558 CONSTANT: ResizeRequest 25
559 CONSTANT: CirculateNotify 26
560 CONSTANT: CirculateRequest 27
561 CONSTANT: PropertyNotify 28
562 CONSTANT: SelectionClear 29
563 CONSTANT: SelectionRequest 30
564 CONSTANT: SelectionNotify 31
565 CONSTANT: ColormapNotify 32
566 CONSTANT: ClientMessage 33
567 CONSTANT: MappingNotify 34
568 CONSTANT: LASTEvent 35
573 { "Bool" "send_event" }
574 { "Display*" "display" }
575 { "Window" "window" } ;
577 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
579 ! 10.5 Keyboard and Pointer Events
587 : Button1Mask ( -- n ) 1 8 shift ; inline
588 : Button2Mask ( -- n ) 1 9 shift ; inline
589 : Button3Mask ( -- n ) 1 10 shift ; inline
590 : Button4Mask ( -- n ) 1 11 shift ; inline
591 : Button5Mask ( -- n ) 1 12 shift ; inline
593 : ShiftMask ( -- n ) 1 0 shift ; inline
594 : LockMask ( -- n ) 1 1 shift ; inline
595 : ControlMask ( -- n ) 1 2 shift ; inline
596 : Mod1Mask ( -- n ) 1 3 shift ; inline
597 : Mod2Mask ( -- n ) 1 4 shift ; inline
598 : Mod3Mask ( -- n ) 1 5 shift ; inline
599 : Mod4Mask ( -- n ) 1 6 shift ; inline
600 : Mod5Mask ( -- n ) 1 7 shift ; inline
602 C-STRUCT: XButtonEvent
605 { "Bool" "send_event" }
606 { "Display*" "display" }
607 { "Window" "window" }
609 { "Window" "subwindow" }
617 { "Bool" "same_screen" } ;
619 TYPEDEF: XButtonEvent XButtonPressedEvent
620 TYPEDEF: XButtonEvent XButtonReleasedEvent
623 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
628 { "Bool" "send_event" }
629 { "Display*" "display" }
630 { "Window" "window" }
632 { "Window" "subwindow" }
640 { "Bool" "same_screen" } ;
642 TYPEDEF: XKeyEvent XKeyPressedEvent
643 TYPEDEF: XKeyEvent XKeyReleasedEvent
645 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
647 C-STRUCT: XMotionEvent
650 { "Bool" "send_event" }
651 { "Display*" "display" }
652 { "Window" "window" }
654 { "Window" "subwindow" }
662 { "Bool" "same_screen" } ;
664 TYPEDEF: XMotionEvent XPointerMovedEvent
666 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
668 C-STRUCT: XCrossingEvent
671 { "Bool" "send_event" }
672 { "Display*" "display" }
673 { "Window" "window" }
675 { "Window" "subwindow" }
683 { "Bool" "same_screen" }
687 TYPEDEF: XCrossingEvent XEnterWindowEvent
688 TYPEDEF: XCrossingEvent XLeaveWindowEvent
690 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
692 C-STRUCT: XFocusChangeEvent
695 { "Bool" "send_event" }
696 { "Display*" "display" }
697 { "Window" "window" }
701 TYPEDEF: XFocusChangeEvent XFocusInEvent
702 TYPEDEF: XFocusChangeEvent XFocusOutEvent
704 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
706 C-STRUCT: XExposeEvent
709 { "Bool" "send_event" }
710 { "Display*" "display" }
711 { "Window" "window" }
718 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
720 C-STRUCT: XGraphicsExposeEvent
723 { "Bool" "send_event" }
724 { "Display*" "display" }
725 { "Drawable" "drawable" }
731 { "int" "major_code" }
732 { "int" "minor_code" } ;
734 C-STRUCT: XNoExposeEvent
737 { "Bool" "send_event" }
738 { "Display*" "display" }
739 { "Drawable" "drawable" }
740 { "int" "major_code" }
741 { "int" "minor_code" } ;
743 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
745 C-STRUCT: XVisibilityEvent
748 { "Bool" "send_event" }
749 { "Display*" "display" }
750 { "Window" "window" }
753 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
755 C-STRUCT: XCreateWindowEvent
758 { "Bool" "send_event" }
759 { "Display*" "display" }
760 { "Window" "parent" }
761 { "Window" "window" }
766 { "int" "border_width" }
767 { "Bool" "override_redirect" } ;
769 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
771 C-STRUCT: XDestroyWindowEvent
774 { "Bool" "send_event" }
775 { "Display*" "display" }
777 { "Window" "window" } ;
779 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
781 C-STRUCT: XUnmapEvent
784 { "Bool" "send_event" }
785 { "Display*" "display" }
787 { "Window" "window" }
788 { "Bool" "from_configure" } ;
790 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
795 { "Bool" "send_event" }
796 { "Display*" "display" }
798 { "Window" "window" }
799 { "Bool" "override_redirect" } ;
801 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
803 C-STRUCT: XMapRequestEvent
806 { "Bool" "send_event" }
807 { "Display*" "display" }
808 { "Window" "parent" }
809 { "Window" "window" } ;
811 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
813 C-STRUCT: XReparentEvent
816 { "Bool" "send_event" }
817 { "Display*" "display" }
819 { "Window" "window" }
820 { "Window" "parent" }
823 { "Bool" "override_redirect" } ;
825 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
827 C-STRUCT: XConfigureEvent
830 { "Bool" "send_event" }
831 { "Display*" "display" }
833 { "Window" "window" }
838 { "int" "border_width" }
840 { "Bool" "override_redirect" } ;
842 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
844 C-STRUCT: XGravityEvent
847 { "Bool" "send_event" }
848 { "Display*" "display" }
850 { "Window" "window" }
854 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
856 C-STRUCT: XResizeRequestEvent
859 { "Bool" "send_event" }
860 { "Display*" "display" }
861 { "Window" "window" }
865 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
867 C-STRUCT: XConfigureRequestEvent
870 { "Bool" "send_event" }
871 { "Display*" "display" }
872 { "Window" "parent" }
873 { "Window" "window" }
878 { "int" "border_width" }
881 { "ulong" "value_mask" } ;
883 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
885 C-STRUCT: XCirculateEvent
888 { "Bool" "send_event" }
889 { "Display*" "display" }
891 { "Window" "window" }
894 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
896 C-STRUCT: XCirculateRequestEvent
899 { "Bool" "send_event" }
900 { "Display*" "display" }
901 { "Window" "parent" }
902 { "Window" "window" }
905 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
907 C-STRUCT: XPropertyEvent
910 { "Bool" "send_event" }
911 { "Display*" "display" }
912 { "Window" "window" }
917 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
919 C-STRUCT: XSelectionClearEvent
922 { "Bool" "send_event" }
923 { "Display*" "display" }
924 { "Window" "window" }
925 { "Atom" "selection" }
928 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
930 C-STRUCT: XSelectionRequestEvent
933 { "Bool" "send_event" }
934 { "Display*" "display" }
936 { "Window" "requestor" }
937 { "Atom" "selection" }
939 { "Atom" "property" }
942 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
944 C-STRUCT: XSelectionEvent
947 { "Bool" "send_event" }
948 { "Display*" "display" }
949 { "Window" "requestor" }
950 { "Atom" "selection" }
952 { "Atom" "property" }
955 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
957 C-STRUCT: XColormapEvent
960 { "Bool" "send_event" }
961 { "Display*" "display" }
962 { "Window" "window" }
963 { "Colormap" "colormap" }
967 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
969 C-STRUCT: XClientMessageEvent
972 { "Bool" "send_event" }
973 { "Display*" "display" }
974 { "Window" "window" }
975 { "Atom" "message_type" }
989 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
991 C-STRUCT: XMappingEvent
994 { "Bool" "send_event" }
995 { "Display*" "display" }
996 { "Window" "window" }
998 { "int" "first_keycode" }
1001 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1003 C-STRUCT: XErrorEvent
1005 { "Display*" "display" }
1006 { "XID" "resourceid" }
1007 { "ulong" "serial" }
1008 { "uchar" "error_code" }
1009 { "uchar" "request_code" }
1010 { "uchar" "minor_code" } ;
1012 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1014 C-STRUCT: XKeymapEvent
1016 { "ulong" "serial" }
1017 { "Bool" "send_event" }
1018 { "Display*" "display" }
1019 { "Window" "window" }
1020 ! char key_vector[32];
1039 "XGraphicsExposeEvent"
1042 "XCreateWindowEvent"
1043 "XDestroyWindowEvent"
1050 "XResizeRequestEvent"
1051 "XConfigureRequestEvent"
1053 "XCirculateRequestEvent"
1055 "XSelectionClearEvent"
1056 "XSelectionRequestEvent"
1059 "XClientMessageEvent"
1065 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1066 ! 11 - Event Handling Functions
1067 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1069 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1070 X-FUNCTION: Status XFlush ( Display* display ) ;
1071 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1072 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1073 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1075 ! 11.3 - Event Queue Management
1077 CONSTANT: QueuedAlready 0
1078 CONSTANT: QueuedAfterReading 1
1079 CONSTANT: QueuedAfterFlush 2
1081 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1082 X-FUNCTION: int XPending ( Display* display ) ;
1084 ! 11.6 - Sending Events to Other Applications
1086 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1088 ! 11.8 - Handling Protocol Errors
1090 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1092 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1093 ! 12 - Input Device Functions
1094 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1098 X-FUNCTION: int XGrabPointer (
1109 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1110 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1111 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1112 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1114 X-FUNCTION: Status XGetInputFocus ( Display* display,
1115 Window* focus_return,
1116 int* revert_to_return ) ;
1118 X-FUNCTION: Status XWarpPointer ( Display* display, Window src_w, Window dest_w, int src_x, int src_y, uint src_width, uint src_height, int dest_x, int dest_y ) ;
1120 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1121 ! 14 - Inter-Client Communication Functions
1122 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1124 ! 14.1 Client to Window Manager Communication
1126 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1127 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1129 ! 14.1.1. Manipulating Top-Level Windows
1131 X-FUNCTION: Status XIconifyWindow (
1132 Display* display, Window w, int screen_number ) ;
1134 X-FUNCTION: Status XWithdrawWindow (
1135 Display* display, Window w, int screen_number ) ;
1137 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1139 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1141 : USPosition ( -- n ) 0 2^ ; inline
1142 : USSize ( -- n ) 1 2^ ; inline
1143 : PPosition ( -- n ) 2 2^ ; inline
1144 : PSize ( -- n ) 3 2^ ; inline
1145 : PMinSize ( -- n ) 4 2^ ; inline
1146 : PMaxSize ( -- n ) 5 2^ ; inline
1147 : PResizeInc ( -- n ) 6 2^ ; inline
1148 : PAspect ( -- n ) 7 2^ ; inline
1149 : PBaseSize ( -- n ) 8 2^ ; inline
1150 : PWinGravity ( -- n ) 9 2^ ; inline
1151 : PAllHints ( -- n )
1152 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1154 C-STRUCT: XSizeHints
1160 { "int" "min_width" }
1161 { "int" "min_height" }
1162 { "int" "max_width" }
1163 { "int" "max_height" }
1164 { "int" "width_inc" }
1165 { "int" "height_inc" }
1166 { "int" "min_aspect_x" }
1167 { "int" "min_aspect_y" }
1168 { "int" "max_aspect_x" }
1169 { "int" "max_aspect_y" }
1170 { "int" "base_width" }
1171 { "int" "base_height" }
1172 { "int" "win_gravity" } ;
1174 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1176 X-FUNCTION: Status XSetWMProtocols (
1177 Display* display, Window w, Atom* protocols, int count ) ;
1179 X-FUNCTION: Status XGetWMProtocols (
1182 Atom** protocols_return,
1183 int* count_return ) ;
1185 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1186 ! 16 - Application Utility Functions
1187 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1189 ! 16.1 Keyboard Utility Functions
1191 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1193 X-FUNCTION: int XLookupString (
1194 XKeyEvent* event_struct,
1195 void* buffer_return,
1197 KeySym* keysym_return,
1198 XComposeStatus* status_in_out ) ;
1200 ! 16.7 Determining the Appropriate Visual Type
1202 CONSTANT: VisualNoMask HEX: 0
1203 CONSTANT: VisualIDMask HEX: 1
1204 CONSTANT: VisualScreenMask HEX: 2
1205 CONSTANT: VisualDepthMask HEX: 4
1206 CONSTANT: VisualClassMask HEX: 8
1207 CONSTANT: VisualRedMaskMask HEX: 10
1208 CONSTANT: VisualGreenMaskMask HEX: 20
1209 CONSTANT: VisualBlueMaskMask HEX: 40
1210 CONSTANT: VisualColormapSizeMask HEX: 80
1211 CONSTANT: VisualBitsPerRGBMask HEX: 100
1212 CONSTANT: VisualAllMask HEX: 1FF
1214 C-STRUCT: XVisualInfo
1215 { "Visual*" "visual" }
1216 { "VisualID" "visualid" }
1220 { "ulong" "red_mask" }
1221 { "ulong" "green_mask" }
1222 { "ulong" "blue_mask" }
1223 { "int" "colormap_size" }
1224 { "int" "bits_per_rgb" } ;
1226 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1227 ! Appendix D - Compatibility Functions
1228 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1230 X-FUNCTION: Status XSetStandardProperties (
1238 XSizeHints* hints ) ;
1240 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1242 CONSTANT: XA_PRIMARY 1
1243 CONSTANT: XA_SECONDARY 2
1246 CONSTANT: XA_BITMAP 5
1247 CONSTANT: XA_CARDINAL 6
1248 CONSTANT: XA_COLORMAP 7
1249 CONSTANT: XA_CURSOR 8
1250 CONSTANT: XA_CUT_BUFFER0 9
1251 CONSTANT: XA_CUT_BUFFER1 10
1252 CONSTANT: XA_CUT_BUFFER2 11
1253 CONSTANT: XA_CUT_BUFFER3 12
1254 CONSTANT: XA_CUT_BUFFER4 13
1255 CONSTANT: XA_CUT_BUFFER5 14
1256 CONSTANT: XA_CUT_BUFFER6 15
1257 CONSTANT: XA_CUT_BUFFER7 16
1258 CONSTANT: XA_DRAWABLE 17
1259 CONSTANT: XA_FONT 18
1260 CONSTANT: XA_INTEGER 19
1261 CONSTANT: XA_PIXMAP 20
1262 CONSTANT: XA_POINT 21
1263 CONSTANT: XA_RECTANGLE 22
1264 CONSTANT: XA_RESOURCE_MANAGER 23
1265 CONSTANT: XA_RGB_COLOR_MAP 24
1266 CONSTANT: XA_RGB_BEST_MAP 25
1267 CONSTANT: XA_RGB_BLUE_MAP 26
1268 CONSTANT: XA_RGB_DEFAULT_MAP 27
1269 CONSTANT: XA_RGB_GRAY_MAP 28
1270 CONSTANT: XA_RGB_GREEN_MAP 29
1271 CONSTANT: XA_RGB_RED_MAP 30
1272 CONSTANT: XA_STRING 31
1273 CONSTANT: XA_VISUALID 32
1274 CONSTANT: XA_WINDOW 33
1275 CONSTANT: XA_WM_COMMAND 34
1276 CONSTANT: XA_WM_HINTS 35
1277 CONSTANT: XA_WM_CLIENT_MACHINE 36
1278 CONSTANT: XA_WM_ICON_NAME 37
1279 CONSTANT: XA_WM_ICON_SIZE 38
1280 CONSTANT: XA_WM_NAME 39
1281 CONSTANT: XA_WM_NORMAL_HINTS 40
1282 CONSTANT: XA_WM_SIZE_HINTS 41
1283 CONSTANT: XA_WM_ZOOM_HINTS 42
1284 CONSTANT: XA_MIN_SPACE 43
1285 CONSTANT: XA_NORM_SPACE 44
1286 CONSTANT: XA_MAX_SPACE 45
1287 CONSTANT: XA_END_SPACE 46
1288 CONSTANT: XA_SUPERSCRIPT_X 47
1289 CONSTANT: XA_SUPERSCRIPT_Y 48
1290 CONSTANT: XA_SUBSCRIPT_X 49
1291 CONSTANT: XA_SUBSCRIPT_Y 50
1292 CONSTANT: XA_UNDERLINE_POSITION 51
1293 CONSTANT: XA_UNDERLINE_THICKNESS 52
1294 CONSTANT: XA_STRIKEOUT_ASCENT 53
1295 CONSTANT: XA_STRIKEOUT_DESCENT 54
1296 CONSTANT: XA_ITALIC_ANGLE 55
1297 CONSTANT: XA_X_HEIGHT 56
1298 CONSTANT: XA_QUAD_WIDTH 57
1299 CONSTANT: XA_WEIGHT 58
1300 CONSTANT: XA_POINT_SIZE 59
1301 CONSTANT: XA_RESOLUTION 60
1302 CONSTANT: XA_COPYRIGHT 61
1303 CONSTANT: XA_NOTICE 62
1304 CONSTANT: XA_FONT_NAME 63
1305 CONSTANT: XA_FAMILY_NAME 64
1306 CONSTANT: XA_FULL_NAME 65
1307 CONSTANT: XA_CAP_HEIGHT 66
1308 CONSTANT: XA_WM_CLASS 67
1309 CONSTANT: XA_WM_TRANSIENT_FOR 68
1311 CONSTANT: XA_LAST_PREDEFINED 68
1313 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1314 ! The rest of the stuff is not from the book.
1315 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1317 X-FUNCTION: void XFree ( void* data ) ;
1318 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1319 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1320 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1324 CONSTANT: XIMPreeditArea HEX: 0001
1325 CONSTANT: XIMPreeditCallbacks HEX: 0002
1326 CONSTANT: XIMPreeditPosition HEX: 0004
1327 CONSTANT: XIMPreeditNothing HEX: 0008
1328 CONSTANT: XIMPreeditNone HEX: 0010
1329 CONSTANT: XIMStatusArea HEX: 0100
1330 CONSTANT: XIMStatusCallbacks HEX: 0200
1331 CONSTANT: XIMStatusNothing HEX: 0400
1332 CONSTANT: XIMStatusNone HEX: 0800
1334 CONSTANT: XNVaNestedList "XNVaNestedList"
1335 CONSTANT: XNQueryInputStyle "queryInputStyle"
1336 CONSTANT: XNClientWindow "clientWindow"
1337 CONSTANT: XNInputStyle "inputStyle"
1338 CONSTANT: XNFocusWindow "focusWindow"
1339 CONSTANT: XNResourceName "resourceName"
1340 CONSTANT: XNResourceClass "resourceClass"
1341 CONSTANT: XNGeometryCallback "geometryCallback"
1342 CONSTANT: XNDestroyCallback "destroyCallback"
1343 CONSTANT: XNFilterEvents "filterEvents"
1344 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1345 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1346 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1347 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1348 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1349 CONSTANT: XNPreeditAttributes "preeditAttributes"
1350 CONSTANT: XNStatusStartCallback "statusStartCallback"
1351 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1352 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1353 CONSTANT: XNStatusAttributes "statusAttributes"
1354 CONSTANT: XNArea "area"
1355 CONSTANT: XNAreaNeeded "areaNeeded"
1356 CONSTANT: XNSpotLocation "spotLocation"
1357 CONSTANT: XNColormap "colorMap"
1358 CONSTANT: XNStdColormap "stdColorMap"
1359 CONSTANT: XNForeground "foreground"
1360 CONSTANT: XNBackground "background"
1361 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1362 CONSTANT: XNFontSet "fontSet"
1363 CONSTANT: XNLineSpace "lineSpace"
1364 CONSTANT: XNCursor "cursor"
1366 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1367 CONSTANT: XNQueryICValuesList "queryICValuesList"
1368 CONSTANT: XNVisiblePosition "visiblePosition"
1369 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1370 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1371 CONSTANT: XNStringConversion "stringConversion"
1372 CONSTANT: XNResetState "resetState"
1373 CONSTANT: XNHotKey "hotKey"
1374 CONSTANT: XNHotKeyState "hotKeyState"
1375 CONSTANT: XNPreeditState "preeditState"
1376 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1378 CONSTANT: XBufferOverflow -1
1379 CONSTANT: XLookupNone 1
1380 CONSTANT: XLookupChars 2
1381 CONSTANT: XLookupKeySym 3
1382 CONSTANT: XLookupBoth 4
1384 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1386 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1388 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1390 X-FUNCTION: XIC XCreateIC ( XIM im, char* key1, Window value1, char* key2, Window value2, char* key3, int value3, char* key4, char* value4, char* key5, char* value5, int key6 ) ;
1392 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1394 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1396 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1398 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1400 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1402 ! !!! category of setlocale
1404 CONSTANT: LC_COLLATE 1
1405 CONSTANT: LC_CTYPE 2
1406 CONSTANT: LC_MONETARY 3
1407 CONSTANT: LC_NUMERIC 4
1410 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1412 X-FUNCTION: Bool XSupportsLocale ( ) ;
1414 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;