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.
13 USING: accessors kernel arrays alien alien.c-types alien.data
14 alien.strings alien.syntax classes.struct math math.bitwise words
15 sequences namespaces continuations io io.encodings.ascii x11.syntax
17 FROM: alien.c-types => short ;
34 TYPEDEF: c-string XPointer
40 C-TYPE: XComposeStatus
48 TYPEDEF: ulong VisualID
53 ALIAS: <Drawable> <XID>
63 ! 2 - Display Functions
66 ! This struct is incomplete
72 X-FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
74 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
76 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number ) ;
77 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number ) ;
78 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number ) ;
79 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number ) ;
80 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number ) ;
81 X-FUNCTION: int XDefaultScreen ( Display* display ) ;
82 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number ) ;
83 X-FUNCTION: Window XDefaultRootWindow ( Display* display ) ;
84 X-FUNCTION: int XProtocolVersion ( Display* display ) ;
85 X-FUNCTION: int XProtocolRevision ( Display* display ) ;
86 X-FUNCTION: int XQLength ( Display* display ) ;
87 X-FUNCTION: int XScreenCount ( Display* display ) ;
88 X-FUNCTION: int XConnectionNumber ( Display* display ) ;
90 ! 2.5 Closing the Display
91 X-FUNCTION: int XCloseDisplay ( Display* display ) ;
94 ! 3 - Window Functions
97 ! 3.2 - Window Attributes
99 : CWBackPixmap ( -- n ) 0 2^ ; inline
100 : CWBackPixel ( -- n ) 1 2^ ; inline
101 : CWBorderPixmap ( -- n ) 2 2^ ; inline
102 : CWBorderPixel ( -- n ) 3 2^ ; inline
103 : CWBitGravity ( -- n ) 4 2^ ; inline
104 : CWWinGravity ( -- n ) 5 2^ ; inline
105 : CWBackingStore ( -- n ) 6 2^ ; inline
106 : CWBackingPlanes ( -- n ) 7 2^ ; inline
107 : CWBackingPixel ( -- n ) 8 2^ ; inline
108 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
109 : CWSaveUnder ( -- n ) 10 2^ ; inline
110 : CWEventMask ( -- n ) 11 2^ ; inline
111 : CWDontPropagate ( -- n ) 12 2^ ; inline
112 : CWColormap ( -- n ) 13 2^ ; inline
113 : CWCursor ( -- n ) 14 2^ ; inline
115 STRUCT: XSetWindowAttributes
116 { background_pixmap Pixmap }
117 { background_pixel ulong }
118 { border_pixmap Pixmap }
119 { border_pixel ulong }
122 { backing_store int }
123 { backing_planes ulong }
124 { backing_pixel ulong }
127 { do_not_propagate_mask long }
128 { override_redirect Bool }
129 { colormap Colormap }
132 CONSTANT: UnmapGravity 0
134 CONSTANT: ForgetGravity 0
135 CONSTANT: NorthWestGravity 1
136 CONSTANT: NorthGravity 2
137 CONSTANT: NorthEastGravity 3
138 CONSTANT: WestGravity 4
139 CONSTANT: CenterGravity 5
140 CONSTANT: EastGravity 6
141 CONSTANT: SouthWestGravity 7
142 CONSTANT: SouthGravity 8
143 CONSTANT: SouthEastGravity 9
144 CONSTANT: StaticGravity 10
146 ! 3.3 - Creating Windows
148 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 ) ;
149 X-FUNCTION: Window XCreateSimpleWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, ulong border, ulong background ) ;
150 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w ) ;
151 X-FUNCTION: Status XMapWindow ( Display* display, Window window ) ;
152 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window ) ;
153 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w ) ;
154 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w ) ;
156 ! 3.5 Mapping Windows
158 X-FUNCTION: int XMapRaised ( Display* display, Window w ) ;
160 ! 3.7 - Configuring Windows
162 : CWX ( -- n ) 0 2^ ; inline
163 : CWY ( -- n ) 1 2^ ; inline
164 : CWWidth ( -- n ) 2 2^ ; inline
165 : CWHeight ( -- n ) 3 2^ ; inline
166 : CWBorderWidth ( -- n ) 4 2^ ; inline
167 : CWSibling ( -- n ) 5 2^ ; inline
168 : CWStackMode ( -- n ) 6 2^ ; inline
170 STRUCT: XWindowChanges
179 X-FUNCTION: Status XConfigureWindow ( Display* display, Window w, uint value_mask, XWindowChanges* values ) ;
180 X-FUNCTION: Status XMoveWindow ( Display* display, Window w, int x, int y ) ;
181 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height ) ;
182 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width ) ;
185 ! 3.8 Changing Window Stacking Order
187 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w ) ;
188 X-FUNCTION: Status XLowerWindow ( Display* display, Window w ) ;
190 ! 3.9 - Changing Window Attributes
192 X-FUNCTION: Status XChangeWindowAttributes (
193 Display* display, Window w, ulong valuemask, XSetWindowAttributes* attr ) ;
194 X-FUNCTION: Status XSetWindowBackground (
195 Display* display, Window w, ulong background_pixel ) ;
196 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor ) ;
197 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w ) ;
199 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
200 ! 4 - Window Information Functions
201 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
203 ! 4.1 - Obtaining Window Information
205 X-FUNCTION: Status XQueryTree (
209 Window* parent_return,
210 Window** children_return, uint* nchildren_return ) ;
212 STRUCT: XWindowAttributes
224 { backing_store int }
225 { backing_planes ulong }
226 { backing_pixel ulong }
228 { colormap Colormap }
229 { map_installed Bool }
231 { all_event_masks long }
232 { your_event_mask long }
233 { do_not_propagate_mask long }
234 { override_redirect Bool }
237 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr ) ;
239 CONSTANT: IsUnmapped 0
240 CONSTANT: IsUnviewable 1
241 CONSTANT: IsViewable 2
243 X-FUNCTION: Status XGetGeometry (
251 uint* border_width_return,
252 uint* depth_return ) ;
254 ! 4.2 - Translating Screen Coordinates
256 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 ) ;
258 ! 4.3 - Properties and Atoms
260 X-FUNCTION: Atom XInternAtom ( Display* display, c-string atom_name, Bool only_if_exists ) ;
262 X-FUNCTION: c-string XGetAtomName ( Display* display, Atom atom ) ;
264 ! 4.4 - Obtaining and Changing Window Properties
266 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, c-string* prop_return ) ;
268 X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ;
272 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time ) ;
274 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection ) ;
276 X-FUNCTION: int XConvertSelection ( Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time ) ;
279 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
280 ! 5 - Pixmap and Cursor Functions
281 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
283 ! 5.1 - Creating and Freeing Pixmaps
285 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth ) ;
286 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap ) ;
288 ! 5.2 - Creating, Recoloring, and Freeing Cursors
291 X-FUNCTION: Cursor XCreatePixmapCursor ( Display* display, Pixmap source, Pixmap mask, XColor* foreground_color, XColor* background_color, uint x, uint y ) ;
292 X-FUNCTION: int XFreeCursor ( Display* display, Cursor cursor ) ;
294 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
295 ! 6 - Color Management Functions
296 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
306 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, c-string color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
307 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
308 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
310 ! 6.4 Creating, Copying, and Destroying Colormaps
312 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
314 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
315 ! 7 - Graphics Context Functions
316 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
318 : GCFunction ( -- n ) 0 2^ ; inline
319 : GCPlaneMask ( -- n ) 1 2^ ; inline
320 : GCForeground ( -- n ) 2 2^ ; inline
321 : GCBackground ( -- n ) 3 2^ ; inline
322 : GCLineWidth ( -- n ) 4 2^ ; inline
323 : GCLineStyle ( -- n ) 5 2^ ; inline
324 : GCCapStyle ( -- n ) 6 2^ ; inline
325 : GCJoinStyle ( -- n ) 7 2^ ; inline
326 : GCFillStyle ( -- n ) 8 2^ ; inline
327 : GCFillRule ( -- n ) 9 2^ ; inline
328 : GCTile ( -- n ) 10 2^ ; inline
329 : GCStipple ( -- n ) 11 2^ ; inline
330 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
331 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
332 : GCFont ( -- n ) 14 2^ ; inline
333 : GCSubwindowMode ( -- n ) 15 2^ ; inline
334 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
335 : GCClipXOrigin ( -- n ) 17 2^ ; inline
336 : GCClipYOrigin ( -- n ) 18 2^ ; inline
337 : GCClipMask ( -- n ) 19 2^ ; inline
338 : GCDashOffset ( -- n ) 20 2^ ; inline
339 : GCDashList ( -- n ) 21 2^ ; inline
340 : GCArcMode ( -- n ) 22 2^ ; inline
342 CONSTANT: GXclear HEX: 0
343 CONSTANT: GXand HEX: 1
344 CONSTANT: GXandReverse HEX: 2
345 CONSTANT: GXcopy HEX: 3
346 CONSTANT: GXandInverted HEX: 4
347 CONSTANT: GXnoop HEX: 5
348 CONSTANT: GXxor HEX: 6
349 CONSTANT: GXor HEX: 7
350 CONSTANT: GXnor HEX: 8
351 CONSTANT: GXequiv HEX: 9
352 CONSTANT: GXinvert HEX: a
353 CONSTANT: GXorReverse HEX: b
354 CONSTANT: GXcopyInverted HEX: c
355 CONSTANT: GXorInverted HEX: d
356 CONSTANT: GXnand HEX: e
357 CONSTANT: GXset HEX: f
376 { subwindow_mode int }
377 { graphics_exposures Bool }
378 { clip_x_origin int }
379 { clip_y_origin int }
384 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
385 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
386 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
387 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
388 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
389 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
390 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
392 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
394 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
396 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
397 ! 8 - Graphics Functions
398 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
400 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
401 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
402 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
403 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
404 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
414 { attributes ushort } ;
417 { ext_data XExtData* }
420 { min_char_or_byte2 uint }
421 { max_char_or_byte2 uint }
424 { all_chars_exist Bool }
425 { default_char uint }
427 { properties XFontProp* }
428 { min_bounds XCharStruct }
429 { max_bounds XCharStruct }
430 { per_char XCharStruct* }
434 X-FUNCTION: Font XLoadFont ( Display* display, c-string name ) ;
435 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
436 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, c-string name ) ;
438 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, c-string string, int count ) ;
442 X-FUNCTION: Status XDrawString (
451 ! 8.7 - Transferring Images between Client and Server
453 CONSTANT: AllPlanes -1
456 { create_image void* }
457 { destroy_image void* }
461 { add_pixel void* } ;
471 { bitmap_bit_order int }
474 { bytes_per_line int }
475 { bits_per_pixel int }
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 [ height>> ] [ bytes_per_line>> ] bi * ;
488 : XImage-pixels ( ximage -- byte-array )
489 [ 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
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
617 { same_screen Bool } ;
619 TYPEDEF: XButtonEvent XButtonPressedEvent
620 TYPEDEF: XButtonEvent XButtonReleasedEvent
623 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
640 { same_screen Bool } ;
642 TYPEDEF: XKeyEvent XKeyPressedEvent
643 TYPEDEF: XKeyEvent XKeyReleasedEvent
645 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
662 { same_screen Bool } ;
664 TYPEDEF: XMotionEvent XPointerMovedEvent
666 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
668 STRUCT: XCrossingEvent
687 TYPEDEF: XCrossingEvent XEnterWindowEvent
688 TYPEDEF: XCrossingEvent XLeaveWindowEvent
690 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
692 STRUCT: XFocusChangeEvent
701 TYPEDEF: XFocusChangeEvent XFocusInEvent
702 TYPEDEF: XFocusChangeEvent XFocusOutEvent
704 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
718 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
720 STRUCT: XGraphicsExposeEvent
725 { drawable Drawable }
734 STRUCT: XNoExposeEvent
739 { drawable Drawable }
743 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
745 STRUCT: XVisibilityEvent
753 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
755 STRUCT: XCreateWindowEvent
767 { override_redirect Bool } ;
769 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
771 STRUCT: XDestroyWindowEvent
779 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
788 { from_configure Bool } ;
790 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
799 { override_redirect Bool } ;
801 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
803 STRUCT: XMapRequestEvent
811 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
813 STRUCT: XReparentEvent
823 { override_redirect Bool } ;
825 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
827 STRUCT: XConfigureEvent
840 { override_redirect Bool } ;
842 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
844 STRUCT: XGravityEvent
854 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
856 STRUCT: XResizeRequestEvent
865 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
867 STRUCT: XConfigureRequestEvent
881 { value_mask ulong } ;
883 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
885 STRUCT: XCirculateEvent
894 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
896 STRUCT: XCirculateRequestEvent
905 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
907 STRUCT: XPropertyEvent
917 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
919 STRUCT: XSelectionClearEvent
928 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
930 STRUCT: XSelectionRequestEvent
942 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
944 STRUCT: XSelectionEvent
955 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
957 STRUCT: XColormapEvent
963 { colormap Colormap }
967 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
969 STRUCT: XClientMessageEvent
975 { message_type Atom }
983 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
985 STRUCT: XMappingEvent
992 { first_keycode int }
995 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1002 { error_code uchar }
1003 { request_code uchar }
1004 { minor_code uchar } ;
1006 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1008 STRUCT: XKeymapEvent
1012 { display Display* }
1016 UNION-STRUCT: XEvent
1018 { XAnyEvent XAnyEvent }
1019 { XKeyEvent XKeyEvent }
1020 { XButtonEvent XButtonEvent }
1021 { XMotionEvent XMotionEvent }
1022 { XCrossingEvent XCrossingEvent }
1023 { XFocusChangeEvent XFocusChangeEvent }
1024 { XExposeEvent XExposeEvent }
1025 { XGraphicsExposeEvent XGraphicsExposeEvent }
1026 { XNoExposeEvent XNoExposeEvent }
1027 { XVisibilityEvent XVisibilityEvent }
1028 { XCreateWindowEvent XCreateWindowEvent }
1029 { XDestroyWindowEvent XDestroyWindowEvent }
1030 { XUnmapEvent XUnmapEvent }
1031 { XMapEvent XMapEvent }
1032 { XMapRequestEvent XMapRequestEvent }
1033 { XReparentEvent XReparentEvent }
1034 { XConfigureEvent XConfigureEvent }
1035 { XGravityEvent XGravityEvent }
1036 { XResizeRequestEvent XResizeRequestEvent }
1037 { XConfigureRequestEvent XConfigureRequestEvent }
1038 { XCirculateEvent XCirculateEvent }
1039 { XCirculateRequestEvent XCirculateRequestEvent }
1040 { XPropertyEvent XPropertyEvent }
1041 { XSelectionClearEvent XSelectionClearEvent }
1042 { XSelectionRequestEvent XSelectionRequestEvent }
1043 { XSelectionEvent XSelectionEvent }
1044 { XColormapEvent XColormapEvent }
1045 { XClientMessageEvent XClientMessageEvent }
1046 { XMappingEvent XMappingEvent }
1047 { XErrorEvent XErrorEvent }
1048 { XKeymapEvent XKeymapEvent }
1049 { padding long[24] } ;
1051 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1052 ! 11 - Event Handling Functions
1053 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1055 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1056 X-FUNCTION: Status XFlush ( Display* display ) ;
1057 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1058 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1059 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1061 ! 11.3 - Event Queue Management
1063 CONSTANT: QueuedAlready 0
1064 CONSTANT: QueuedAfterReading 1
1065 CONSTANT: QueuedAfterFlush 2
1067 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1068 X-FUNCTION: int XPending ( Display* display ) ;
1070 ! 11.6 - Sending Events to Other Applications
1072 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1074 ! 11.8 - Handling Protocol Errors
1076 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1078 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1079 ! 12 - Input Device Functions
1080 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1084 X-FUNCTION: int XGrabPointer (
1095 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1096 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1097 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1098 X-FUNCTION: int XGrabKeyboard ( Display* display, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode, Time time ) ;
1099 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1101 X-FUNCTION: Status XGetInputFocus ( Display* display,
1102 Window* focus_return,
1103 int* revert_to_return ) ;
1105 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 ) ;
1107 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1108 ! 14 - Inter-Client Communication Functions
1109 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1111 ! 14.1 Client to Window Manager Communication
1113 X-FUNCTION: Status XFetchName ( Display* display, Window w, c-string* window_name_return ) ;
1114 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1116 ! 14.1.1. Manipulating Top-Level Windows
1118 X-FUNCTION: Status XIconifyWindow (
1119 Display* display, Window w, int screen_number ) ;
1121 X-FUNCTION: Status XWithdrawWindow (
1122 Display* display, Window w, int screen_number ) ;
1124 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1126 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1128 : USPosition ( -- n ) 0 2^ ; inline
1129 : USSize ( -- n ) 1 2^ ; inline
1130 : PPosition ( -- n ) 2 2^ ; inline
1131 : PSize ( -- n ) 3 2^ ; inline
1132 : PMinSize ( -- n ) 4 2^ ; inline
1133 : PMaxSize ( -- n ) 5 2^ ; inline
1134 : PResizeInc ( -- n ) 6 2^ ; inline
1135 : PAspect ( -- n ) 7 2^ ; inline
1136 : PBaseSize ( -- n ) 8 2^ ; inline
1137 : PWinGravity ( -- n ) 9 2^ ; inline
1139 flags{ PPosition PSize PMinSize PMaxSize PResizeInc PAspect }
1153 { min_aspect_x int }
1154 { min_aspect_y int }
1155 { max_aspect_x int }
1156 { max_aspect_y int }
1159 { win_gravity int } ;
1161 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1163 X-FUNCTION: Status XSetWMProtocols (
1164 Display* display, Window w, Atom* protocols, int count ) ;
1166 X-FUNCTION: Status XGetWMProtocols (
1169 Atom** protocols_return,
1170 int* count_return ) ;
1172 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1173 ! 16 - Application Utility Functions
1174 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1176 ! 16.1 Keyboard Utility Functions
1178 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1180 X-FUNCTION: int XLookupString (
1181 XKeyEvent* event_struct,
1182 void* buffer_return,
1184 KeySym* keysym_return,
1185 XComposeStatus* status_in_out ) ;
1187 ! 16.7 Determining the Appropriate Visual Type
1189 CONSTANT: VisualNoMask HEX: 0
1190 CONSTANT: VisualIDMask HEX: 1
1191 CONSTANT: VisualScreenMask HEX: 2
1192 CONSTANT: VisualDepthMask HEX: 4
1193 CONSTANT: VisualClassMask HEX: 8
1194 CONSTANT: VisualRedMaskMask HEX: 10
1195 CONSTANT: VisualGreenMaskMask HEX: 20
1196 CONSTANT: VisualBlueMaskMask HEX: 40
1197 CONSTANT: VisualColormapSizeMask HEX: 80
1198 CONSTANT: VisualBitsPerRGBMask HEX: 100
1199 CONSTANT: VisualAllMask HEX: 1FF
1203 { visualid VisualID }
1208 { green_mask ulong }
1210 { colormap_size int }
1211 { bits_per_rgb int } ;
1213 ! 16.9 Manipulating Bitmaps
1214 X-FUNCTION: Pixmap XCreateBitmapFromData (
1221 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1222 ! Appendix D - Compatibility Functions
1223 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1225 X-FUNCTION: Status XSetStandardProperties (
1228 c-string window_name,
1233 XSizeHints* hints ) ;
1235 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1237 CONSTANT: XA_PRIMARY 1
1238 CONSTANT: XA_SECONDARY 2
1241 CONSTANT: XA_BITMAP 5
1242 CONSTANT: XA_CARDINAL 6
1243 CONSTANT: XA_COLORMAP 7
1244 CONSTANT: XA_CURSOR 8
1245 CONSTANT: XA_CUT_BUFFER0 9
1246 CONSTANT: XA_CUT_BUFFER1 10
1247 CONSTANT: XA_CUT_BUFFER2 11
1248 CONSTANT: XA_CUT_BUFFER3 12
1249 CONSTANT: XA_CUT_BUFFER4 13
1250 CONSTANT: XA_CUT_BUFFER5 14
1251 CONSTANT: XA_CUT_BUFFER6 15
1252 CONSTANT: XA_CUT_BUFFER7 16
1253 CONSTANT: XA_DRAWABLE 17
1254 CONSTANT: XA_FONT 18
1255 CONSTANT: XA_INTEGER 19
1256 CONSTANT: XA_PIXMAP 20
1257 CONSTANT: XA_POINT 21
1258 CONSTANT: XA_RECTANGLE 22
1259 CONSTANT: XA_RESOURCE_MANAGER 23
1260 CONSTANT: XA_RGB_COLOR_MAP 24
1261 CONSTANT: XA_RGB_BEST_MAP 25
1262 CONSTANT: XA_RGB_BLUE_MAP 26
1263 CONSTANT: XA_RGB_DEFAULT_MAP 27
1264 CONSTANT: XA_RGB_GRAY_MAP 28
1265 CONSTANT: XA_RGB_GREEN_MAP 29
1266 CONSTANT: XA_RGB_RED_MAP 30
1267 CONSTANT: XA_STRING 31
1268 CONSTANT: XA_VISUALID 32
1269 CONSTANT: XA_WINDOW 33
1270 CONSTANT: XA_WM_COMMAND 34
1271 CONSTANT: XA_WM_HINTS 35
1272 CONSTANT: XA_WM_CLIENT_MACHINE 36
1273 CONSTANT: XA_WM_ICON_NAME 37
1274 CONSTANT: XA_WM_ICON_SIZE 38
1275 CONSTANT: XA_WM_NAME 39
1276 CONSTANT: XA_WM_NORMAL_HINTS 40
1277 CONSTANT: XA_WM_SIZE_HINTS 41
1278 CONSTANT: XA_WM_ZOOM_HINTS 42
1279 CONSTANT: XA_MIN_SPACE 43
1280 CONSTANT: XA_NORM_SPACE 44
1281 CONSTANT: XA_MAX_SPACE 45
1282 CONSTANT: XA_END_SPACE 46
1283 CONSTANT: XA_SUPERSCRIPT_X 47
1284 CONSTANT: XA_SUPERSCRIPT_Y 48
1285 CONSTANT: XA_SUBSCRIPT_X 49
1286 CONSTANT: XA_SUBSCRIPT_Y 50
1287 CONSTANT: XA_UNDERLINE_POSITION 51
1288 CONSTANT: XA_UNDERLINE_THICKNESS 52
1289 CONSTANT: XA_STRIKEOUT_ASCENT 53
1290 CONSTANT: XA_STRIKEOUT_DESCENT 54
1291 CONSTANT: XA_ITALIC_ANGLE 55
1292 CONSTANT: XA_X_HEIGHT 56
1293 CONSTANT: XA_QUAD_WIDTH 57
1294 CONSTANT: XA_WEIGHT 58
1295 CONSTANT: XA_POINT_SIZE 59
1296 CONSTANT: XA_RESOLUTION 60
1297 CONSTANT: XA_COPYRIGHT 61
1298 CONSTANT: XA_NOTICE 62
1299 CONSTANT: XA_FONT_NAME 63
1300 CONSTANT: XA_FAMILY_NAME 64
1301 CONSTANT: XA_FULL_NAME 65
1302 CONSTANT: XA_CAP_HEIGHT 66
1303 CONSTANT: XA_WM_CLASS 67
1304 CONSTANT: XA_WM_TRANSIENT_FOR 68
1306 CONSTANT: XA_LAST_PREDEFINED 68
1308 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1309 ! The rest of the stuff is not from the book.
1310 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1312 X-FUNCTION: void XFree ( void* data ) ;
1313 X-FUNCTION: int XStoreName ( Display* display, Window w, c-string window_name ) ;
1314 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1315 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1319 CONSTANT: XIMPreeditArea HEX: 0001
1320 CONSTANT: XIMPreeditCallbacks HEX: 0002
1321 CONSTANT: XIMPreeditPosition HEX: 0004
1322 CONSTANT: XIMPreeditNothing HEX: 0008
1323 CONSTANT: XIMPreeditNone HEX: 0010
1324 CONSTANT: XIMStatusArea HEX: 0100
1325 CONSTANT: XIMStatusCallbacks HEX: 0200
1326 CONSTANT: XIMStatusNothing HEX: 0400
1327 CONSTANT: XIMStatusNone HEX: 0800
1329 CONSTANT: XNVaNestedList "XNVaNestedList"
1330 CONSTANT: XNQueryInputStyle "queryInputStyle"
1331 CONSTANT: XNClientWindow "clientWindow"
1332 CONSTANT: XNInputStyle "inputStyle"
1333 CONSTANT: XNFocusWindow "focusWindow"
1334 CONSTANT: XNResourceName "resourceName"
1335 CONSTANT: XNResourceClass "resourceClass"
1336 CONSTANT: XNGeometryCallback "geometryCallback"
1337 CONSTANT: XNDestroyCallback "destroyCallback"
1338 CONSTANT: XNFilterEvents "filterEvents"
1339 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1340 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1341 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1342 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1343 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1344 CONSTANT: XNPreeditAttributes "preeditAttributes"
1345 CONSTANT: XNStatusStartCallback "statusStartCallback"
1346 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1347 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1348 CONSTANT: XNStatusAttributes "statusAttributes"
1349 CONSTANT: XNArea "area"
1350 CONSTANT: XNAreaNeeded "areaNeeded"
1351 CONSTANT: XNSpotLocation "spotLocation"
1352 CONSTANT: XNColormap "colorMap"
1353 CONSTANT: XNStdColormap "stdColorMap"
1354 CONSTANT: XNForeground "foreground"
1355 CONSTANT: XNBackground "background"
1356 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1357 CONSTANT: XNFontSet "fontSet"
1358 CONSTANT: XNLineSpace "lineSpace"
1359 CONSTANT: XNCursor "cursor"
1361 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1362 CONSTANT: XNQueryICValuesList "queryICValuesList"
1363 CONSTANT: XNVisiblePosition "visiblePosition"
1364 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1365 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1366 CONSTANT: XNStringConversion "stringConversion"
1367 CONSTANT: XNResetState "resetState"
1368 CONSTANT: XNHotKey "hotKey"
1369 CONSTANT: XNHotKeyState "hotKeyState"
1370 CONSTANT: XNPreeditState "preeditState"
1371 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1373 CONSTANT: XBufferOverflow -1
1374 CONSTANT: XLookupNone 1
1375 CONSTANT: XLookupChars 2
1376 CONSTANT: XLookupKeySym 3
1377 CONSTANT: XLookupBoth 4
1379 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1381 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, c-string res_name, c-string res_class ) ;
1383 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1385 X-FUNCTION: XIC XCreateIC ( XIM im, c-string key1, Window value1, c-string key2, Window value2, c-string key3, int value3, c-string key4, c-string value4, c-string key5, c-string value5, int key6 ) ;
1387 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1389 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1391 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1393 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1395 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, c-string buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1397 ! !!! category of setlocale
1399 CONSTANT: LC_COLLATE 1
1400 CONSTANT: LC_CTYPE 2
1401 CONSTANT: LC_MONETARY 3
1402 CONSTANT: LC_NUMERIC 4
1405 X-FUNCTION: c-string setlocale ( int category, c-string name ) ;
1407 X-FUNCTION: Bool XSupportsLocale ( ) ;
1409 X-FUNCTION: c-string XSetLocaleModifiers ( c-string modifier_list ) ;
1411 ! uncategorized xlib bindings
1413 X-FUNCTION: int XQueryKeymap ( Display* display, char[32] keys_return ) ;