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
450 CONSTANT: AllPlanes -1
452 C-STRUCT: XImage-funcs
453 { "void*" "create_image" }
454 { "void*" "destroy_image" }
455 { "void*" "get_pixel" }
456 { "void*" "put_pixel" }
457 { "void*" "sub_image" }
458 { "void*" "add_pixel" } ;
466 { "int" "byte_order" }
467 { "int" "bitmap_unit" }
468 { "int" "bitmap_bit_order" }
469 { "int" "bitmap_pad" }
471 { "int" "bytes_per_line" }
472 { "int" "bits_per_pixel" }
473 { "ulong" "red_mask" }
474 { "ulong" "green_mask" }
475 { "ulong" "blue_mask" }
476 { "XPointer" "obdata" }
477 { "XImage-funcs" "f" } ;
479 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
480 X-FUNCTION: int XDestroyImage ( XImage* ximage ) ;
482 : XImage-size ( ximage -- size )
483 [ XImage-height ] [ XImage-bytes_per_line ] bi * ;
485 : XImage-pixels ( ximage -- byte-array )
486 [ XImage-data ] [ XImage-size ] bi memory>byte-array ;
489 ! 9 - Window and Session Manager Functions
492 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
493 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
494 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
495 X-FUNCTION: Status XGrabServer ( Display* display ) ;
496 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
497 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
499 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
501 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
505 : NoEventMask ( -- n ) 0 ; inline
506 : KeyPressMask ( -- n ) 0 2^ ; inline
507 : KeyReleaseMask ( -- n ) 1 2^ ; inline
508 : ButtonPressMask ( -- n ) 2 2^ ; inline
509 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
510 : EnterWindowMask ( -- n ) 4 2^ ; inline
511 : LeaveWindowMask ( -- n ) 5 2^ ; inline
512 : PointerMotionMask ( -- n ) 6 2^ ; inline
513 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
514 : Button1MotionMask ( -- n ) 8 2^ ; inline
515 : Button2MotionMask ( -- n ) 9 2^ ; inline
516 : Button3MotionMask ( -- n ) 10 2^ ; inline
517 : Button4MotionMask ( -- n ) 11 2^ ; inline
518 : Button5MotionMask ( -- n ) 12 2^ ; inline
519 : ButtonMotionMask ( -- n ) 13 2^ ; inline
520 : KeymapStateMask ( -- n ) 14 2^ ; inline
521 : ExposureMask ( -- n ) 15 2^ ; inline
522 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
523 : StructureNotifyMask ( -- n ) 17 2^ ; inline
524 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
525 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
526 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
527 : FocusChangeMask ( -- n ) 21 2^ ; inline
528 : PropertyChangeMask ( -- n ) 22 2^ ; inline
529 : ColormapChangeMask ( -- n ) 23 2^ ; inline
530 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
533 CONSTANT: KeyRelease 3
534 CONSTANT: ButtonPress 4
535 CONSTANT: ButtonRelease 5
536 CONSTANT: MotionNotify 6
537 CONSTANT: EnterNotify 7
538 CONSTANT: LeaveNotify 8
540 CONSTANT: FocusOut 10
541 CONSTANT: KeymapNotify 11
543 CONSTANT: GraphicsExpose 13
544 CONSTANT: NoExpose 14
545 CONSTANT: VisibilityNotify 15
546 CONSTANT: CreateNotify 16
547 CONSTANT: DestroyNotify 17
548 CONSTANT: UnmapNotify 18
549 CONSTANT: MapNotify 19
550 CONSTANT: MapRequest 20
551 CONSTANT: ReparentNotify 21
552 CONSTANT: ConfigureNotify 22
553 CONSTANT: ConfigureRequest 23
554 CONSTANT: GravityNotify 24
555 CONSTANT: ResizeRequest 25
556 CONSTANT: CirculateNotify 26
557 CONSTANT: CirculateRequest 27
558 CONSTANT: PropertyNotify 28
559 CONSTANT: SelectionClear 29
560 CONSTANT: SelectionRequest 30
561 CONSTANT: SelectionNotify 31
562 CONSTANT: ColormapNotify 32
563 CONSTANT: ClientMessage 33
564 CONSTANT: MappingNotify 34
565 CONSTANT: LASTEvent 35
570 { "Bool" "send_event" }
571 { "Display*" "display" }
572 { "Window" "window" } ;
574 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
576 ! 10.5 Keyboard and Pointer Events
584 : Button1Mask ( -- n ) 1 8 shift ; inline
585 : Button2Mask ( -- n ) 1 9 shift ; inline
586 : Button3Mask ( -- n ) 1 10 shift ; inline
587 : Button4Mask ( -- n ) 1 11 shift ; inline
588 : Button5Mask ( -- n ) 1 12 shift ; inline
590 : ShiftMask ( -- n ) 1 0 shift ; inline
591 : LockMask ( -- n ) 1 1 shift ; inline
592 : ControlMask ( -- n ) 1 2 shift ; inline
593 : Mod1Mask ( -- n ) 1 3 shift ; inline
594 : Mod2Mask ( -- n ) 1 4 shift ; inline
595 : Mod3Mask ( -- n ) 1 5 shift ; inline
596 : Mod4Mask ( -- n ) 1 6 shift ; inline
597 : Mod5Mask ( -- n ) 1 7 shift ; inline
599 C-STRUCT: XButtonEvent
602 { "Bool" "send_event" }
603 { "Display*" "display" }
604 { "Window" "window" }
606 { "Window" "subwindow" }
614 { "Bool" "same_screen" } ;
616 TYPEDEF: XButtonEvent XButtonPressedEvent
617 TYPEDEF: XButtonEvent XButtonReleasedEvent
620 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
625 { "Bool" "send_event" }
626 { "Display*" "display" }
627 { "Window" "window" }
629 { "Window" "subwindow" }
637 { "Bool" "same_screen" } ;
639 TYPEDEF: XKeyEvent XKeyPressedEvent
640 TYPEDEF: XKeyEvent XKeyReleasedEvent
642 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
644 C-STRUCT: XMotionEvent
647 { "Bool" "send_event" }
648 { "Display*" "display" }
649 { "Window" "window" }
651 { "Window" "subwindow" }
659 { "Bool" "same_screen" } ;
661 TYPEDEF: XMotionEvent XPointerMovedEvent
663 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
665 C-STRUCT: XCrossingEvent
668 { "Bool" "send_event" }
669 { "Display*" "display" }
670 { "Window" "window" }
672 { "Window" "subwindow" }
680 { "Bool" "same_screen" }
684 TYPEDEF: XCrossingEvent XEnterWindowEvent
685 TYPEDEF: XCrossingEvent XLeaveWindowEvent
687 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
689 C-STRUCT: XFocusChangeEvent
692 { "Bool" "send_event" }
693 { "Display*" "display" }
694 { "Window" "window" }
698 TYPEDEF: XFocusChangeEvent XFocusInEvent
699 TYPEDEF: XFocusChangeEvent XFocusOutEvent
701 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
703 C-STRUCT: XExposeEvent
706 { "Bool" "send_event" }
707 { "Display*" "display" }
708 { "Window" "window" }
715 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
717 C-STRUCT: XGraphicsExposeEvent
720 { "Bool" "send_event" }
721 { "Display*" "display" }
722 { "Drawable" "drawable" }
728 { "int" "major_code" }
729 { "int" "minor_code" } ;
731 C-STRUCT: XNoExposeEvent
734 { "Bool" "send_event" }
735 { "Display*" "display" }
736 { "Drawable" "drawable" }
737 { "int" "major_code" }
738 { "int" "minor_code" } ;
740 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
742 C-STRUCT: XVisibilityEvent
745 { "Bool" "send_event" }
746 { "Display*" "display" }
747 { "Window" "window" }
750 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
752 C-STRUCT: XCreateWindowEvent
755 { "Bool" "send_event" }
756 { "Display*" "display" }
757 { "Window" "parent" }
758 { "Window" "window" }
763 { "int" "border_width" }
764 { "Bool" "override_redirect" } ;
766 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
768 C-STRUCT: XDestroyWindowEvent
771 { "Bool" "send_event" }
772 { "Display*" "display" }
774 { "Window" "window" } ;
776 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
778 C-STRUCT: XUnmapEvent
781 { "Bool" "send_event" }
782 { "Display*" "display" }
784 { "Window" "window" }
785 { "Bool" "from_configure" } ;
787 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
792 { "Bool" "send_event" }
793 { "Display*" "display" }
795 { "Window" "window" }
796 { "Bool" "override_redirect" } ;
798 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
800 C-STRUCT: XMapRequestEvent
803 { "Bool" "send_event" }
804 { "Display*" "display" }
805 { "Window" "parent" }
806 { "Window" "window" } ;
808 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
810 C-STRUCT: XReparentEvent
813 { "Bool" "send_event" }
814 { "Display*" "display" }
816 { "Window" "window" }
817 { "Window" "parent" }
820 { "Bool" "override_redirect" } ;
822 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
824 C-STRUCT: XConfigureEvent
827 { "Bool" "send_event" }
828 { "Display*" "display" }
830 { "Window" "window" }
835 { "int" "border_width" }
837 { "Bool" "override_redirect" } ;
839 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
841 C-STRUCT: XGravityEvent
844 { "Bool" "send_event" }
845 { "Display*" "display" }
847 { "Window" "window" }
851 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
853 C-STRUCT: XResizeRequestEvent
856 { "Bool" "send_event" }
857 { "Display*" "display" }
858 { "Window" "window" }
862 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
864 C-STRUCT: XConfigureRequestEvent
867 { "Bool" "send_event" }
868 { "Display*" "display" }
869 { "Window" "parent" }
870 { "Window" "window" }
875 { "int" "border_width" }
878 { "ulong" "value_mask" } ;
880 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
882 C-STRUCT: XCirculateEvent
885 { "Bool" "send_event" }
886 { "Display*" "display" }
888 { "Window" "window" }
891 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
893 C-STRUCT: XCirculateRequestEvent
896 { "Bool" "send_event" }
897 { "Display*" "display" }
898 { "Window" "parent" }
899 { "Window" "window" }
902 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
904 C-STRUCT: XPropertyEvent
907 { "Bool" "send_event" }
908 { "Display*" "display" }
909 { "Window" "window" }
914 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
916 C-STRUCT: XSelectionClearEvent
919 { "Bool" "send_event" }
920 { "Display*" "display" }
921 { "Window" "window" }
922 { "Atom" "selection" }
925 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
927 C-STRUCT: XSelectionRequestEvent
930 { "Bool" "send_event" }
931 { "Display*" "display" }
933 { "Window" "requestor" }
934 { "Atom" "selection" }
936 { "Atom" "property" }
939 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
941 C-STRUCT: XSelectionEvent
944 { "Bool" "send_event" }
945 { "Display*" "display" }
946 { "Window" "requestor" }
947 { "Atom" "selection" }
949 { "Atom" "property" }
952 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
954 C-STRUCT: XColormapEvent
957 { "Bool" "send_event" }
958 { "Display*" "display" }
959 { "Window" "window" }
960 { "Colormap" "colormap" }
964 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
966 C-STRUCT: XClientMessageEvent
969 { "Bool" "send_event" }
970 { "Display*" "display" }
971 { "Window" "window" }
972 { "Atom" "message_type" }
986 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
988 C-STRUCT: XMappingEvent
991 { "Bool" "send_event" }
992 { "Display*" "display" }
993 { "Window" "window" }
995 { "int" "first_keycode" }
998 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1000 C-STRUCT: XErrorEvent
1002 { "Display*" "display" }
1003 { "XID" "resourceid" }
1004 { "ulong" "serial" }
1005 { "uchar" "error_code" }
1006 { "uchar" "request_code" }
1007 { "uchar" "minor_code" } ;
1009 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1011 C-STRUCT: XKeymapEvent
1013 { "ulong" "serial" }
1014 { "Bool" "send_event" }
1015 { "Display*" "display" }
1016 { "Window" "window" }
1017 ! char key_vector[32];
1036 "XGraphicsExposeEvent"
1039 "XCreateWindowEvent"
1040 "XDestroyWindowEvent"
1047 "XResizeRequestEvent"
1048 "XConfigureRequestEvent"
1050 "XCirculateRequestEvent"
1052 "XSelectionClearEvent"
1053 "XSelectionRequestEvent"
1056 "XClientMessageEvent"
1062 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1063 ! 11 - Event Handling Functions
1064 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1066 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1067 X-FUNCTION: Status XFlush ( Display* display ) ;
1068 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1069 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1070 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1072 ! 11.3 - Event Queue Management
1074 CONSTANT: QueuedAlready 0
1075 CONSTANT: QueuedAfterReading 1
1076 CONSTANT: QueuedAfterFlush 2
1078 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1079 X-FUNCTION: int XPending ( Display* display ) ;
1081 ! 11.6 - Sending Events to Other Applications
1083 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1085 ! 11.8 - Handling Protocol Errors
1087 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1089 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1090 ! 12 - Input Device Functions
1091 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1095 X-FUNCTION: int XGrabPointer (
1106 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1107 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1108 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1109 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1111 X-FUNCTION: Status XGetInputFocus ( Display* display,
1112 Window* focus_return,
1113 int* revert_to_return ) ;
1115 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 ) ;
1117 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1118 ! 14 - Inter-Client Communication Functions
1119 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1121 ! 14.1 Client to Window Manager Communication
1123 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1124 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1126 ! 14.1.1. Manipulating Top-Level Windows
1128 X-FUNCTION: Status XIconifyWindow (
1129 Display* display, Window w, int screen_number ) ;
1131 X-FUNCTION: Status XWithdrawWindow (
1132 Display* display, Window w, int screen_number ) ;
1134 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1136 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1138 : USPosition ( -- n ) 0 2^ ; inline
1139 : USSize ( -- n ) 1 2^ ; inline
1140 : PPosition ( -- n ) 2 2^ ; inline
1141 : PSize ( -- n ) 3 2^ ; inline
1142 : PMinSize ( -- n ) 4 2^ ; inline
1143 : PMaxSize ( -- n ) 5 2^ ; inline
1144 : PResizeInc ( -- n ) 6 2^ ; inline
1145 : PAspect ( -- n ) 7 2^ ; inline
1146 : PBaseSize ( -- n ) 8 2^ ; inline
1147 : PWinGravity ( -- n ) 9 2^ ; inline
1148 : PAllHints ( -- n )
1149 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1151 C-STRUCT: XSizeHints
1157 { "int" "min_width" }
1158 { "int" "min_height" }
1159 { "int" "max_width" }
1160 { "int" "max_height" }
1161 { "int" "width_inc" }
1162 { "int" "height_inc" }
1163 { "int" "min_aspect_x" }
1164 { "int" "min_aspect_y" }
1165 { "int" "max_aspect_x" }
1166 { "int" "max_aspect_y" }
1167 { "int" "base_width" }
1168 { "int" "base_height" }
1169 { "int" "win_gravity" } ;
1171 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1173 X-FUNCTION: Status XSetWMProtocols (
1174 Display* display, Window w, Atom* protocols, int count ) ;
1176 X-FUNCTION: Status XGetWMProtocols (
1179 Atom** protocols_return,
1180 int* count_return ) ;
1182 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1183 ! 16 - Application Utility Functions
1184 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1186 ! 16.1 Keyboard Utility Functions
1188 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1190 X-FUNCTION: int XLookupString (
1191 XKeyEvent* event_struct,
1192 void* buffer_return,
1194 KeySym* keysym_return,
1195 XComposeStatus* status_in_out ) ;
1197 ! 16.7 Determining the Appropriate Visual Type
1199 CONSTANT: VisualNoMask HEX: 0
1200 CONSTANT: VisualIDMask HEX: 1
1201 CONSTANT: VisualScreenMask HEX: 2
1202 CONSTANT: VisualDepthMask HEX: 4
1203 CONSTANT: VisualClassMask HEX: 8
1204 CONSTANT: VisualRedMaskMask HEX: 10
1205 CONSTANT: VisualGreenMaskMask HEX: 20
1206 CONSTANT: VisualBlueMaskMask HEX: 40
1207 CONSTANT: VisualColormapSizeMask HEX: 80
1208 CONSTANT: VisualBitsPerRGBMask HEX: 100
1209 CONSTANT: VisualAllMask HEX: 1FF
1211 C-STRUCT: XVisualInfo
1212 { "Visual*" "visual" }
1213 { "VisualID" "visualid" }
1217 { "ulong" "red_mask" }
1218 { "ulong" "green_mask" }
1219 { "ulong" "blue_mask" }
1220 { "int" "colormap_size" }
1221 { "int" "bits_per_rgb" } ;
1223 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1224 ! Appendix D - Compatibility Functions
1225 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1227 X-FUNCTION: Status XSetStandardProperties (
1235 XSizeHints* hints ) ;
1237 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1239 CONSTANT: XA_PRIMARY 1
1240 CONSTANT: XA_SECONDARY 2
1243 CONSTANT: XA_BITMAP 5
1244 CONSTANT: XA_CARDINAL 6
1245 CONSTANT: XA_COLORMAP 7
1246 CONSTANT: XA_CURSOR 8
1247 CONSTANT: XA_CUT_BUFFER0 9
1248 CONSTANT: XA_CUT_BUFFER1 10
1249 CONSTANT: XA_CUT_BUFFER2 11
1250 CONSTANT: XA_CUT_BUFFER3 12
1251 CONSTANT: XA_CUT_BUFFER4 13
1252 CONSTANT: XA_CUT_BUFFER5 14
1253 CONSTANT: XA_CUT_BUFFER6 15
1254 CONSTANT: XA_CUT_BUFFER7 16
1255 CONSTANT: XA_DRAWABLE 17
1256 CONSTANT: XA_FONT 18
1257 CONSTANT: XA_INTEGER 19
1258 CONSTANT: XA_PIXMAP 20
1259 CONSTANT: XA_POINT 21
1260 CONSTANT: XA_RECTANGLE 22
1261 CONSTANT: XA_RESOURCE_MANAGER 23
1262 CONSTANT: XA_RGB_COLOR_MAP 24
1263 CONSTANT: XA_RGB_BEST_MAP 25
1264 CONSTANT: XA_RGB_BLUE_MAP 26
1265 CONSTANT: XA_RGB_DEFAULT_MAP 27
1266 CONSTANT: XA_RGB_GRAY_MAP 28
1267 CONSTANT: XA_RGB_GREEN_MAP 29
1268 CONSTANT: XA_RGB_RED_MAP 30
1269 CONSTANT: XA_STRING 31
1270 CONSTANT: XA_VISUALID 32
1271 CONSTANT: XA_WINDOW 33
1272 CONSTANT: XA_WM_COMMAND 34
1273 CONSTANT: XA_WM_HINTS 35
1274 CONSTANT: XA_WM_CLIENT_MACHINE 36
1275 CONSTANT: XA_WM_ICON_NAME 37
1276 CONSTANT: XA_WM_ICON_SIZE 38
1277 CONSTANT: XA_WM_NAME 39
1278 CONSTANT: XA_WM_NORMAL_HINTS 40
1279 CONSTANT: XA_WM_SIZE_HINTS 41
1280 CONSTANT: XA_WM_ZOOM_HINTS 42
1281 CONSTANT: XA_MIN_SPACE 43
1282 CONSTANT: XA_NORM_SPACE 44
1283 CONSTANT: XA_MAX_SPACE 45
1284 CONSTANT: XA_END_SPACE 46
1285 CONSTANT: XA_SUPERSCRIPT_X 47
1286 CONSTANT: XA_SUPERSCRIPT_Y 48
1287 CONSTANT: XA_SUBSCRIPT_X 49
1288 CONSTANT: XA_SUBSCRIPT_Y 50
1289 CONSTANT: XA_UNDERLINE_POSITION 51
1290 CONSTANT: XA_UNDERLINE_THICKNESS 52
1291 CONSTANT: XA_STRIKEOUT_ASCENT 53
1292 CONSTANT: XA_STRIKEOUT_DESCENT 54
1293 CONSTANT: XA_ITALIC_ANGLE 55
1294 CONSTANT: XA_X_HEIGHT 56
1295 CONSTANT: XA_QUAD_WIDTH 57
1296 CONSTANT: XA_WEIGHT 58
1297 CONSTANT: XA_POINT_SIZE 59
1298 CONSTANT: XA_RESOLUTION 60
1299 CONSTANT: XA_COPYRIGHT 61
1300 CONSTANT: XA_NOTICE 62
1301 CONSTANT: XA_FONT_NAME 63
1302 CONSTANT: XA_FAMILY_NAME 64
1303 CONSTANT: XA_FULL_NAME 65
1304 CONSTANT: XA_CAP_HEIGHT 66
1305 CONSTANT: XA_WM_CLASS 67
1306 CONSTANT: XA_WM_TRANSIENT_FOR 68
1308 CONSTANT: XA_LAST_PREDEFINED 68
1310 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1311 ! The rest of the stuff is not from the book.
1312 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1314 X-FUNCTION: void XFree ( void* data ) ;
1315 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1316 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1317 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1321 CONSTANT: XIMPreeditArea HEX: 0001
1322 CONSTANT: XIMPreeditCallbacks HEX: 0002
1323 CONSTANT: XIMPreeditPosition HEX: 0004
1324 CONSTANT: XIMPreeditNothing HEX: 0008
1325 CONSTANT: XIMPreeditNone HEX: 0010
1326 CONSTANT: XIMStatusArea HEX: 0100
1327 CONSTANT: XIMStatusCallbacks HEX: 0200
1328 CONSTANT: XIMStatusNothing HEX: 0400
1329 CONSTANT: XIMStatusNone HEX: 0800
1331 CONSTANT: XNVaNestedList "XNVaNestedList"
1332 CONSTANT: XNQueryInputStyle "queryInputStyle"
1333 CONSTANT: XNClientWindow "clientWindow"
1334 CONSTANT: XNInputStyle "inputStyle"
1335 CONSTANT: XNFocusWindow "focusWindow"
1336 CONSTANT: XNResourceName "resourceName"
1337 CONSTANT: XNResourceClass "resourceClass"
1338 CONSTANT: XNGeometryCallback "geometryCallback"
1339 CONSTANT: XNDestroyCallback "destroyCallback"
1340 CONSTANT: XNFilterEvents "filterEvents"
1341 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1342 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1343 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1344 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1345 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1346 CONSTANT: XNPreeditAttributes "preeditAttributes"
1347 CONSTANT: XNStatusStartCallback "statusStartCallback"
1348 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1349 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1350 CONSTANT: XNStatusAttributes "statusAttributes"
1351 CONSTANT: XNArea "area"
1352 CONSTANT: XNAreaNeeded "areaNeeded"
1353 CONSTANT: XNSpotLocation "spotLocation"
1354 CONSTANT: XNColormap "colorMap"
1355 CONSTANT: XNStdColormap "stdColorMap"
1356 CONSTANT: XNForeground "foreground"
1357 CONSTANT: XNBackground "background"
1358 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1359 CONSTANT: XNFontSet "fontSet"
1360 CONSTANT: XNLineSpace "lineSpace"
1361 CONSTANT: XNCursor "cursor"
1363 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1364 CONSTANT: XNQueryICValuesList "queryICValuesList"
1365 CONSTANT: XNVisiblePosition "visiblePosition"
1366 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1367 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1368 CONSTANT: XNStringConversion "stringConversion"
1369 CONSTANT: XNResetState "resetState"
1370 CONSTANT: XNHotKey "hotKey"
1371 CONSTANT: XNHotKeyState "hotKeyState"
1372 CONSTANT: XNPreeditState "preeditState"
1373 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1375 CONSTANT: XBufferOverflow -1
1376 CONSTANT: XLookupNone 1
1377 CONSTANT: XLookupChars 2
1378 CONSTANT: XLookupKeySym 3
1379 CONSTANT: XLookupBoth 4
1381 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1383 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1385 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1387 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 ) ;
1389 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1391 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1393 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1395 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1397 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1399 ! !!! category of setlocale
1401 CONSTANT: LC_COLLATE 1
1402 CONSTANT: LC_CTYPE 2
1403 CONSTANT: LC_MONETARY 3
1404 CONSTANT: LC_NUMERIC 4
1407 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1409 X-FUNCTION: Bool XSupportsLocale ( ) ;
1411 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;