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 ;
16 FROM: alien.c-types => short ;
33 TYPEDEF: char* XPointer
39 C-TYPE: XComposeStatus
47 TYPEDEF: ulong VisualID
52 ALIAS: <Drawable> <XID>
62 ! 2 - Display Functions
65 ! This struct is incomplete
71 X-FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
73 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
75 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number ) ;
76 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number ) ;
77 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number ) ;
78 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number ) ;
79 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number ) ;
80 X-FUNCTION: int XDefaultScreen ( Display* display ) ;
81 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number ) ;
82 X-FUNCTION: Window XDefaultRootWindow ( Display* display ) ;
83 X-FUNCTION: int XProtocolVersion ( Display* display ) ;
84 X-FUNCTION: int XProtocolRevision ( Display* display ) ;
85 X-FUNCTION: int XQLength ( Display* display ) ;
86 X-FUNCTION: int XScreenCount ( Display* display ) ;
87 X-FUNCTION: int XConnectionNumber ( Display* display ) ;
89 ! 2.5 Closing the Display
90 X-FUNCTION: int XCloseDisplay ( Display* display ) ;
93 ! 3 - Window Functions
96 ! 3.2 - Window Attributes
98 : CWBackPixmap ( -- n ) 0 2^ ; inline
99 : CWBackPixel ( -- n ) 1 2^ ; inline
100 : CWBorderPixmap ( -- n ) 2 2^ ; inline
101 : CWBorderPixel ( -- n ) 3 2^ ; inline
102 : CWBitGravity ( -- n ) 4 2^ ; inline
103 : CWWinGravity ( -- n ) 5 2^ ; inline
104 : CWBackingStore ( -- n ) 6 2^ ; inline
105 : CWBackingPlanes ( -- n ) 7 2^ ; inline
106 : CWBackingPixel ( -- n ) 8 2^ ; inline
107 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
108 : CWSaveUnder ( -- n ) 10 2^ ; inline
109 : CWEventMask ( -- n ) 11 2^ ; inline
110 : CWDontPropagate ( -- n ) 12 2^ ; inline
111 : CWColormap ( -- n ) 13 2^ ; inline
112 : CWCursor ( -- n ) 14 2^ ; inline
114 STRUCT: XSetWindowAttributes
115 { background_pixmap Pixmap }
116 { background_pixel ulong }
117 { border_pixmap Pixmap }
118 { border_pixel ulong }
121 { backing_store int }
122 { backing_planes ulong }
123 { backing_pixel ulong }
126 { do_not_propagate_mask long }
127 { override_redirect Bool }
128 { colormap Colormap }
131 CONSTANT: UnmapGravity 0
133 CONSTANT: ForgetGravity 0
134 CONSTANT: NorthWestGravity 1
135 CONSTANT: NorthGravity 2
136 CONSTANT: NorthEastGravity 3
137 CONSTANT: WestGravity 4
138 CONSTANT: CenterGravity 5
139 CONSTANT: EastGravity 6
140 CONSTANT: SouthWestGravity 7
141 CONSTANT: SouthGravity 8
142 CONSTANT: SouthEastGravity 9
143 CONSTANT: StaticGravity 10
145 ! 3.3 - Creating Windows
147 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 ) ;
148 X-FUNCTION: Window XCreateSimpleWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, ulong border, ulong background ) ;
149 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w ) ;
150 X-FUNCTION: Status XMapWindow ( Display* display, Window window ) ;
151 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window ) ;
152 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w ) ;
153 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w ) ;
155 ! 3.5 Mapping Windows
157 X-FUNCTION: int XMapRaised ( Display* display, Window w ) ;
159 ! 3.7 - Configuring Windows
161 : CWX ( -- n ) 0 2^ ; inline
162 : CWY ( -- n ) 1 2^ ; inline
163 : CWWidth ( -- n ) 2 2^ ; inline
164 : CWHeight ( -- n ) 3 2^ ; inline
165 : CWBorderWidth ( -- n ) 4 2^ ; inline
166 : CWSibling ( -- n ) 5 2^ ; inline
167 : CWStackMode ( -- n ) 6 2^ ; inline
169 STRUCT: XWindowChanges
178 X-FUNCTION: Status XConfigureWindow ( Display* display, Window w, uint value_mask, XWindowChanges* values ) ;
179 X-FUNCTION: Status XMoveWindow ( Display* display, Window w, int x, int y ) ;
180 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height ) ;
181 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width ) ;
184 ! 3.8 Changing Window Stacking Order
186 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w ) ;
187 X-FUNCTION: Status XLowerWindow ( Display* display, Window w ) ;
189 ! 3.9 - Changing Window Attributes
191 X-FUNCTION: Status XChangeWindowAttributes (
192 Display* display, Window w, ulong valuemask, XSetWindowAttributes* attr ) ;
193 X-FUNCTION: Status XSetWindowBackground (
194 Display* display, Window w, ulong background_pixel ) ;
195 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor ) ;
196 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w ) ;
198 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
199 ! 4 - Window Information Functions
200 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
202 ! 4.1 - Obtaining Window Information
204 X-FUNCTION: Status XQueryTree (
208 Window* parent_return,
209 Window** children_return, uint* nchildren_return ) ;
211 STRUCT: XWindowAttributes
223 { backing_store int }
224 { backing_planes ulong }
225 { backing_pixel ulong }
227 { colormap Colormap }
228 { map_installed Bool }
230 { all_event_masks long }
231 { your_event_mask long }
232 { do_not_propagate_mask long }
233 { override_redirect Bool }
236 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr ) ;
238 CONSTANT: IsUnmapped 0
239 CONSTANT: IsUnviewable 1
240 CONSTANT: IsViewable 2
242 X-FUNCTION: Status XGetGeometry (
250 uint* border_width_return,
251 uint* depth_return ) ;
253 ! 4.2 - Translating Screen Coordinates
255 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 ) ;
257 ! 4.3 - Properties and Atoms
259 X-FUNCTION: Atom XInternAtom ( Display* display, char* atom_name, Bool only_if_exists ) ;
261 X-FUNCTION: char* XGetAtomName ( Display* display, Atom atom ) ;
263 ! 4.4 - Obtaining and Changing Window Properties
265 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 ) ;
267 X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ;
271 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time ) ;
273 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection ) ;
275 X-FUNCTION: int XConvertSelection ( Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time ) ;
278 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
279 ! 5 - Pixmap and Cursor Functions
280 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
282 ! 5.1 - Creating and Freeing Pixmaps
284 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth ) ;
285 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap ) ;
287 ! 5.2 - Creating, Recoloring, and Freeing Cursors
290 X-FUNCTION: Cursor XCreatePixmapCursor ( Display* display, Pixmap source, Pixmap mask, XColor* foreground_color, XColor* background_color, uint x, uint y ) ;
291 X-FUNCTION: int XFreeCursor ( Display* display, Cursor cursor ) ;
293 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
294 ! 6 - Color Management Functions
295 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
305 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
306 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
307 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
309 ! 6.4 Creating, Copying, and Destroying Colormaps
311 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
313 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
314 ! 7 - Graphics Context Functions
315 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
317 : GCFunction ( -- n ) 0 2^ ; inline
318 : GCPlaneMask ( -- n ) 1 2^ ; inline
319 : GCForeground ( -- n ) 2 2^ ; inline
320 : GCBackground ( -- n ) 3 2^ ; inline
321 : GCLineWidth ( -- n ) 4 2^ ; inline
322 : GCLineStyle ( -- n ) 5 2^ ; inline
323 : GCCapStyle ( -- n ) 6 2^ ; inline
324 : GCJoinStyle ( -- n ) 7 2^ ; inline
325 : GCFillStyle ( -- n ) 8 2^ ; inline
326 : GCFillRule ( -- n ) 9 2^ ; inline
327 : GCTile ( -- n ) 10 2^ ; inline
328 : GCStipple ( -- n ) 11 2^ ; inline
329 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
330 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
331 : GCFont ( -- n ) 14 2^ ; inline
332 : GCSubwindowMode ( -- n ) 15 2^ ; inline
333 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
334 : GCClipXOrigin ( -- n ) 17 2^ ; inline
335 : GCClipYOrigin ( -- n ) 18 2^ ; inline
336 : GCClipMask ( -- n ) 19 2^ ; inline
337 : GCDashOffset ( -- n ) 20 2^ ; inline
338 : GCDashList ( -- n ) 21 2^ ; inline
339 : GCArcMode ( -- n ) 22 2^ ; inline
341 CONSTANT: GXclear HEX: 0
342 CONSTANT: GXand HEX: 1
343 CONSTANT: GXandReverse HEX: 2
344 CONSTANT: GXcopy HEX: 3
345 CONSTANT: GXandInverted HEX: 4
346 CONSTANT: GXnoop HEX: 5
347 CONSTANT: GXxor HEX: 6
348 CONSTANT: GXor HEX: 7
349 CONSTANT: GXnor HEX: 8
350 CONSTANT: GXequiv HEX: 9
351 CONSTANT: GXinvert HEX: a
352 CONSTANT: GXorReverse HEX: b
353 CONSTANT: GXcopyInverted HEX: c
354 CONSTANT: GXorInverted HEX: d
355 CONSTANT: GXnand HEX: e
356 CONSTANT: GXset HEX: f
375 { subwindow_mode int }
376 { graphics_exposures Bool }
377 { clip_x_origin int }
378 { clip_y_origin int }
383 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
384 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
385 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
386 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
387 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
388 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
389 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
391 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
393 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
395 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
396 ! 8 - Graphics Functions
397 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
399 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
400 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
401 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
402 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
403 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
413 { attributes ushort } ;
416 { ext_data XExtData* }
419 { min_char_or_byte2 uint }
420 { max_char_or_byte2 uint }
423 { all_chars_exist Bool }
424 { default_char uint }
426 { properties XFontProp* }
427 { min_bounds XCharStruct }
428 { max_bounds XCharStruct }
429 { per_char XCharStruct* }
433 X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ;
434 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
435 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ;
437 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ;
441 X-FUNCTION: Status XDrawString (
450 ! 8.7 - Transferring Images between Client and Server
452 CONSTANT: AllPlanes -1
455 { create_image void* }
456 { destroy_image void* }
460 { add_pixel void* } ;
470 { bitmap_bit_order int }
473 { bytes_per_line int }
474 { bits_per_pixel int }
481 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
482 X-FUNCTION: int XDestroyImage ( XImage* ximage ) ;
484 : XImage-size ( ximage -- size )
485 [ height>> ] [ bytes_per_line>> ] bi * ;
487 : XImage-pixels ( ximage -- byte-array )
488 [ data>> ] [ XImage-size ] bi memory>byte-array ;
491 ! 9 - Window and Session Manager Functions
494 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
495 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
496 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
497 X-FUNCTION: Status XGrabServer ( Display* display ) ;
498 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
499 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
501 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
503 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
507 : NoEventMask ( -- n ) 0 ; inline
508 : KeyPressMask ( -- n ) 0 2^ ; inline
509 : KeyReleaseMask ( -- n ) 1 2^ ; inline
510 : ButtonPressMask ( -- n ) 2 2^ ; inline
511 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
512 : EnterWindowMask ( -- n ) 4 2^ ; inline
513 : LeaveWindowMask ( -- n ) 5 2^ ; inline
514 : PointerMotionMask ( -- n ) 6 2^ ; inline
515 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
516 : Button1MotionMask ( -- n ) 8 2^ ; inline
517 : Button2MotionMask ( -- n ) 9 2^ ; inline
518 : Button3MotionMask ( -- n ) 10 2^ ; inline
519 : Button4MotionMask ( -- n ) 11 2^ ; inline
520 : Button5MotionMask ( -- n ) 12 2^ ; inline
521 : ButtonMotionMask ( -- n ) 13 2^ ; inline
522 : KeymapStateMask ( -- n ) 14 2^ ; inline
523 : ExposureMask ( -- n ) 15 2^ ; inline
524 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
525 : StructureNotifyMask ( -- n ) 17 2^ ; inline
526 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
527 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
528 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
529 : FocusChangeMask ( -- n ) 21 2^ ; inline
530 : PropertyChangeMask ( -- n ) 22 2^ ; inline
531 : ColormapChangeMask ( -- n ) 23 2^ ; inline
532 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
535 CONSTANT: KeyRelease 3
536 CONSTANT: ButtonPress 4
537 CONSTANT: ButtonRelease 5
538 CONSTANT: MotionNotify 6
539 CONSTANT: EnterNotify 7
540 CONSTANT: LeaveNotify 8
542 CONSTANT: FocusOut 10
543 CONSTANT: KeymapNotify 11
545 CONSTANT: GraphicsExpose 13
546 CONSTANT: NoExpose 14
547 CONSTANT: VisibilityNotify 15
548 CONSTANT: CreateNotify 16
549 CONSTANT: DestroyNotify 17
550 CONSTANT: UnmapNotify 18
551 CONSTANT: MapNotify 19
552 CONSTANT: MapRequest 20
553 CONSTANT: ReparentNotify 21
554 CONSTANT: ConfigureNotify 22
555 CONSTANT: ConfigureRequest 23
556 CONSTANT: GravityNotify 24
557 CONSTANT: ResizeRequest 25
558 CONSTANT: CirculateNotify 26
559 CONSTANT: CirculateRequest 27
560 CONSTANT: PropertyNotify 28
561 CONSTANT: SelectionClear 29
562 CONSTANT: SelectionRequest 30
563 CONSTANT: SelectionNotify 31
564 CONSTANT: ColormapNotify 32
565 CONSTANT: ClientMessage 33
566 CONSTANT: MappingNotify 34
567 CONSTANT: LASTEvent 35
576 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
578 ! 10.5 Keyboard and Pointer Events
586 : Button1Mask ( -- n ) 1 8 shift ; inline
587 : Button2Mask ( -- n ) 1 9 shift ; inline
588 : Button3Mask ( -- n ) 1 10 shift ; inline
589 : Button4Mask ( -- n ) 1 11 shift ; inline
590 : Button5Mask ( -- n ) 1 12 shift ; inline
592 : ShiftMask ( -- n ) 1 0 shift ; inline
593 : LockMask ( -- n ) 1 1 shift ; inline
594 : ControlMask ( -- n ) 1 2 shift ; inline
595 : Mod1Mask ( -- n ) 1 3 shift ; inline
596 : Mod2Mask ( -- n ) 1 4 shift ; inline
597 : Mod3Mask ( -- n ) 1 5 shift ; inline
598 : Mod4Mask ( -- n ) 1 6 shift ; inline
599 : Mod5Mask ( -- n ) 1 7 shift ; inline
616 { same_screen Bool } ;
618 TYPEDEF: XButtonEvent XButtonPressedEvent
619 TYPEDEF: XButtonEvent XButtonReleasedEvent
622 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
639 { same_screen Bool } ;
641 TYPEDEF: XKeyEvent XKeyPressedEvent
642 TYPEDEF: XKeyEvent XKeyReleasedEvent
644 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
661 { same_screen Bool } ;
663 TYPEDEF: XMotionEvent XPointerMovedEvent
665 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
667 STRUCT: XCrossingEvent
686 TYPEDEF: XCrossingEvent XEnterWindowEvent
687 TYPEDEF: XCrossingEvent XLeaveWindowEvent
689 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
691 STRUCT: XFocusChangeEvent
700 TYPEDEF: XFocusChangeEvent XFocusInEvent
701 TYPEDEF: XFocusChangeEvent XFocusOutEvent
703 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
717 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
719 STRUCT: XGraphicsExposeEvent
724 { drawable Drawable }
733 STRUCT: XNoExposeEvent
738 { drawable Drawable }
742 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
744 STRUCT: XVisibilityEvent
752 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
754 STRUCT: XCreateWindowEvent
766 { override_redirect Bool } ;
768 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
770 STRUCT: XDestroyWindowEvent
778 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
787 { from_configure Bool } ;
789 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
798 { override_redirect Bool } ;
800 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
802 STRUCT: XMapRequestEvent
810 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
812 STRUCT: XReparentEvent
822 { override_redirect Bool } ;
824 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
826 STRUCT: XConfigureEvent
839 { override_redirect Bool } ;
841 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
843 STRUCT: XGravityEvent
853 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
855 STRUCT: XResizeRequestEvent
864 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
866 STRUCT: XConfigureRequestEvent
880 { value_mask ulong } ;
882 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
884 STRUCT: XCirculateEvent
893 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
895 STRUCT: XCirculateRequestEvent
904 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
906 STRUCT: XPropertyEvent
916 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
918 STRUCT: XSelectionClearEvent
927 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
929 STRUCT: XSelectionRequestEvent
941 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
943 STRUCT: XSelectionEvent
954 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
956 STRUCT: XColormapEvent
962 { colormap Colormap }
966 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
968 STRUCT: XClientMessageEvent
974 { message_type Atom }
982 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
984 STRUCT: XMappingEvent
991 { first_keycode int }
994 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1001 { error_code uchar }
1002 { request_code uchar }
1003 { minor_code uchar } ;
1005 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1007 STRUCT: XKeymapEvent
1011 { display Display* }
1022 UNION-STRUCT: XEvent
1024 { XAnyEvent XAnyEvent }
1025 { XKeyEvent XKeyEvent }
1026 { XButtonEvent XButtonEvent }
1027 { XMotionEvent XMotionEvent }
1028 { XCrossingEvent XCrossingEvent }
1029 { XFocusChangeEvent XFocusChangeEvent }
1030 { XExposeEvent XExposeEvent }
1031 { XGraphicsExposeEvent XGraphicsExposeEvent }
1032 { XNoExposeEvent XNoExposeEvent }
1033 { XVisibilityEvent XVisibilityEvent }
1034 { XCreateWindowEvent XCreateWindowEvent }
1035 { XDestroyWindowEvent XDestroyWindowEvent }
1036 { XUnmapEvent XUnmapEvent }
1037 { XMapEvent XMapEvent }
1038 { XMapRequestEvent XMapRequestEvent }
1039 { XReparentEvent XReparentEvent }
1040 { XConfigureEvent XConfigureEvent }
1041 { XGravityEvent XGravityEvent }
1042 { XResizeRequestEvent XResizeRequestEvent }
1043 { XConfigureRequestEvent XConfigureRequestEvent }
1044 { XCirculateEvent XCirculateEvent }
1045 { XCirculateRequestEvent XCirculateRequestEvent }
1046 { XPropertyEvent XPropertyEvent }
1047 { XSelectionClearEvent XSelectionClearEvent }
1048 { XSelectionRequestEvent XSelectionRequestEvent }
1049 { XSelectionEvent XSelectionEvent }
1050 { XColormapEvent XColormapEvent }
1051 { XClientMessageEvent XClientMessageEvent }
1052 { XMappingEvent XMappingEvent }
1053 { XErrorEvent XErrorEvent }
1054 { XKeymapEvent XKeymapEvent }
1055 { padding long[24] } ;
1057 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1058 ! 11 - Event Handling Functions
1059 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1061 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1062 X-FUNCTION: Status XFlush ( Display* display ) ;
1063 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1064 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1065 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1067 ! 11.3 - Event Queue Management
1069 CONSTANT: QueuedAlready 0
1070 CONSTANT: QueuedAfterReading 1
1071 CONSTANT: QueuedAfterFlush 2
1073 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1074 X-FUNCTION: int XPending ( Display* display ) ;
1076 ! 11.6 - Sending Events to Other Applications
1078 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1080 ! 11.8 - Handling Protocol Errors
1082 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1084 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1085 ! 12 - Input Device Functions
1086 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1090 X-FUNCTION: int XGrabPointer (
1101 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1102 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1103 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1104 X-FUNCTION: int XGrabKeyboard ( Display* display, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode, Time time ) ;
1105 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1107 X-FUNCTION: Status XGetInputFocus ( Display* display,
1108 Window* focus_return,
1109 int* revert_to_return ) ;
1111 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 ) ;
1113 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1114 ! 14 - Inter-Client Communication Functions
1115 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1117 ! 14.1 Client to Window Manager Communication
1119 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1120 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1122 ! 14.1.1. Manipulating Top-Level Windows
1124 X-FUNCTION: Status XIconifyWindow (
1125 Display* display, Window w, int screen_number ) ;
1127 X-FUNCTION: Status XWithdrawWindow (
1128 Display* display, Window w, int screen_number ) ;
1130 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1132 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1134 : USPosition ( -- n ) 0 2^ ; inline
1135 : USSize ( -- n ) 1 2^ ; inline
1136 : PPosition ( -- n ) 2 2^ ; inline
1137 : PSize ( -- n ) 3 2^ ; inline
1138 : PMinSize ( -- n ) 4 2^ ; inline
1139 : PMaxSize ( -- n ) 5 2^ ; inline
1140 : PResizeInc ( -- n ) 6 2^ ; inline
1141 : PAspect ( -- n ) 7 2^ ; inline
1142 : PBaseSize ( -- n ) 8 2^ ; inline
1143 : PWinGravity ( -- n ) 9 2^ ; inline
1144 : PAllHints ( -- n )
1145 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1159 { min_aspect_x int }
1160 { min_aspect_y int }
1161 { max_aspect_x int }
1162 { max_aspect_y int }
1165 { win_gravity int } ;
1167 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1169 X-FUNCTION: Status XSetWMProtocols (
1170 Display* display, Window w, Atom* protocols, int count ) ;
1172 X-FUNCTION: Status XGetWMProtocols (
1175 Atom** protocols_return,
1176 int* count_return ) ;
1178 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1179 ! 16 - Application Utility Functions
1180 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1182 ! 16.1 Keyboard Utility Functions
1184 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1186 X-FUNCTION: int XLookupString (
1187 XKeyEvent* event_struct,
1188 void* buffer_return,
1190 KeySym* keysym_return,
1191 XComposeStatus* status_in_out ) ;
1193 ! 16.7 Determining the Appropriate Visual Type
1195 CONSTANT: VisualNoMask HEX: 0
1196 CONSTANT: VisualIDMask HEX: 1
1197 CONSTANT: VisualScreenMask HEX: 2
1198 CONSTANT: VisualDepthMask HEX: 4
1199 CONSTANT: VisualClassMask HEX: 8
1200 CONSTANT: VisualRedMaskMask HEX: 10
1201 CONSTANT: VisualGreenMaskMask HEX: 20
1202 CONSTANT: VisualBlueMaskMask HEX: 40
1203 CONSTANT: VisualColormapSizeMask HEX: 80
1204 CONSTANT: VisualBitsPerRGBMask HEX: 100
1205 CONSTANT: VisualAllMask HEX: 1FF
1209 { visualid VisualID }
1214 { green_mask ulong }
1216 { colormap_size int }
1217 { bits_per_rgb int } ;
1219 ! 16.9 Manipulating Bitmaps
1220 X-FUNCTION: Pixmap XCreateBitmapFromData (
1227 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1228 ! Appendix D - Compatibility Functions
1229 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1231 X-FUNCTION: Status XSetStandardProperties (
1239 XSizeHints* hints ) ;
1241 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1243 CONSTANT: XA_PRIMARY 1
1244 CONSTANT: XA_SECONDARY 2
1247 CONSTANT: XA_BITMAP 5
1248 CONSTANT: XA_CARDINAL 6
1249 CONSTANT: XA_COLORMAP 7
1250 CONSTANT: XA_CURSOR 8
1251 CONSTANT: XA_CUT_BUFFER0 9
1252 CONSTANT: XA_CUT_BUFFER1 10
1253 CONSTANT: XA_CUT_BUFFER2 11
1254 CONSTANT: XA_CUT_BUFFER3 12
1255 CONSTANT: XA_CUT_BUFFER4 13
1256 CONSTANT: XA_CUT_BUFFER5 14
1257 CONSTANT: XA_CUT_BUFFER6 15
1258 CONSTANT: XA_CUT_BUFFER7 16
1259 CONSTANT: XA_DRAWABLE 17
1260 CONSTANT: XA_FONT 18
1261 CONSTANT: XA_INTEGER 19
1262 CONSTANT: XA_PIXMAP 20
1263 CONSTANT: XA_POINT 21
1264 CONSTANT: XA_RECTANGLE 22
1265 CONSTANT: XA_RESOURCE_MANAGER 23
1266 CONSTANT: XA_RGB_COLOR_MAP 24
1267 CONSTANT: XA_RGB_BEST_MAP 25
1268 CONSTANT: XA_RGB_BLUE_MAP 26
1269 CONSTANT: XA_RGB_DEFAULT_MAP 27
1270 CONSTANT: XA_RGB_GRAY_MAP 28
1271 CONSTANT: XA_RGB_GREEN_MAP 29
1272 CONSTANT: XA_RGB_RED_MAP 30
1273 CONSTANT: XA_STRING 31
1274 CONSTANT: XA_VISUALID 32
1275 CONSTANT: XA_WINDOW 33
1276 CONSTANT: XA_WM_COMMAND 34
1277 CONSTANT: XA_WM_HINTS 35
1278 CONSTANT: XA_WM_CLIENT_MACHINE 36
1279 CONSTANT: XA_WM_ICON_NAME 37
1280 CONSTANT: XA_WM_ICON_SIZE 38
1281 CONSTANT: XA_WM_NAME 39
1282 CONSTANT: XA_WM_NORMAL_HINTS 40
1283 CONSTANT: XA_WM_SIZE_HINTS 41
1284 CONSTANT: XA_WM_ZOOM_HINTS 42
1285 CONSTANT: XA_MIN_SPACE 43
1286 CONSTANT: XA_NORM_SPACE 44
1287 CONSTANT: XA_MAX_SPACE 45
1288 CONSTANT: XA_END_SPACE 46
1289 CONSTANT: XA_SUPERSCRIPT_X 47
1290 CONSTANT: XA_SUPERSCRIPT_Y 48
1291 CONSTANT: XA_SUBSCRIPT_X 49
1292 CONSTANT: XA_SUBSCRIPT_Y 50
1293 CONSTANT: XA_UNDERLINE_POSITION 51
1294 CONSTANT: XA_UNDERLINE_THICKNESS 52
1295 CONSTANT: XA_STRIKEOUT_ASCENT 53
1296 CONSTANT: XA_STRIKEOUT_DESCENT 54
1297 CONSTANT: XA_ITALIC_ANGLE 55
1298 CONSTANT: XA_X_HEIGHT 56
1299 CONSTANT: XA_QUAD_WIDTH 57
1300 CONSTANT: XA_WEIGHT 58
1301 CONSTANT: XA_POINT_SIZE 59
1302 CONSTANT: XA_RESOLUTION 60
1303 CONSTANT: XA_COPYRIGHT 61
1304 CONSTANT: XA_NOTICE 62
1305 CONSTANT: XA_FONT_NAME 63
1306 CONSTANT: XA_FAMILY_NAME 64
1307 CONSTANT: XA_FULL_NAME 65
1308 CONSTANT: XA_CAP_HEIGHT 66
1309 CONSTANT: XA_WM_CLASS 67
1310 CONSTANT: XA_WM_TRANSIENT_FOR 68
1312 CONSTANT: XA_LAST_PREDEFINED 68
1314 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1315 ! The rest of the stuff is not from the book.
1316 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1318 X-FUNCTION: void XFree ( void* data ) ;
1319 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1320 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1321 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1325 CONSTANT: XIMPreeditArea HEX: 0001
1326 CONSTANT: XIMPreeditCallbacks HEX: 0002
1327 CONSTANT: XIMPreeditPosition HEX: 0004
1328 CONSTANT: XIMPreeditNothing HEX: 0008
1329 CONSTANT: XIMPreeditNone HEX: 0010
1330 CONSTANT: XIMStatusArea HEX: 0100
1331 CONSTANT: XIMStatusCallbacks HEX: 0200
1332 CONSTANT: XIMStatusNothing HEX: 0400
1333 CONSTANT: XIMStatusNone HEX: 0800
1335 CONSTANT: XNVaNestedList "XNVaNestedList"
1336 CONSTANT: XNQueryInputStyle "queryInputStyle"
1337 CONSTANT: XNClientWindow "clientWindow"
1338 CONSTANT: XNInputStyle "inputStyle"
1339 CONSTANT: XNFocusWindow "focusWindow"
1340 CONSTANT: XNResourceName "resourceName"
1341 CONSTANT: XNResourceClass "resourceClass"
1342 CONSTANT: XNGeometryCallback "geometryCallback"
1343 CONSTANT: XNDestroyCallback "destroyCallback"
1344 CONSTANT: XNFilterEvents "filterEvents"
1345 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1346 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1347 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1348 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1349 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1350 CONSTANT: XNPreeditAttributes "preeditAttributes"
1351 CONSTANT: XNStatusStartCallback "statusStartCallback"
1352 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1353 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1354 CONSTANT: XNStatusAttributes "statusAttributes"
1355 CONSTANT: XNArea "area"
1356 CONSTANT: XNAreaNeeded "areaNeeded"
1357 CONSTANT: XNSpotLocation "spotLocation"
1358 CONSTANT: XNColormap "colorMap"
1359 CONSTANT: XNStdColormap "stdColorMap"
1360 CONSTANT: XNForeground "foreground"
1361 CONSTANT: XNBackground "background"
1362 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1363 CONSTANT: XNFontSet "fontSet"
1364 CONSTANT: XNLineSpace "lineSpace"
1365 CONSTANT: XNCursor "cursor"
1367 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1368 CONSTANT: XNQueryICValuesList "queryICValuesList"
1369 CONSTANT: XNVisiblePosition "visiblePosition"
1370 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1371 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1372 CONSTANT: XNStringConversion "stringConversion"
1373 CONSTANT: XNResetState "resetState"
1374 CONSTANT: XNHotKey "hotKey"
1375 CONSTANT: XNHotKeyState "hotKeyState"
1376 CONSTANT: XNPreeditState "preeditState"
1377 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1379 CONSTANT: XBufferOverflow -1
1380 CONSTANT: XLookupNone 1
1381 CONSTANT: XLookupChars 2
1382 CONSTANT: XLookupKeySym 3
1383 CONSTANT: XLookupBoth 4
1385 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1387 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1389 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1391 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 ) ;
1393 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1395 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1397 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1399 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1401 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1403 ! !!! category of setlocale
1405 CONSTANT: LC_COLLATE 1
1406 CONSTANT: LC_CTYPE 2
1407 CONSTANT: LC_MONETARY 3
1408 CONSTANT: LC_NUMERIC 4
1411 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1413 X-FUNCTION: Bool XSupportsLocale ( ) ;
1415 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;