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 ! https://www.x.org/releases/X11R7.6/doc/libX11/specs/libX11/libX11.html
15 USING: accessors kernel arrays alien alien.c-types alien.data
16 alien.strings alien.syntax classes.struct math math.bitwise words
17 sequences namespaces continuations io io.encodings.ascii x11.syntax
19 FROM: alien.c-types => short ;
36 TYPEDEF: c-string XPointer
42 C-TYPE: XComposeStatus
50 TYPEDEF: ulong VisualID
53 : *XID ( bytes -- n ) ulong deref ;
57 : *Atom ( bytes -- n ) ulong deref ;
59 ! 2 - Display Functions
62 ! This struct is incomplete
68 X-FUNCTION: Display* XOpenDisplay ( void* display_name )
70 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
72 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number )
73 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number )
74 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number )
75 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number )
76 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number )
77 X-FUNCTION: int XDefaultScreen ( Display* display )
78 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number )
79 X-FUNCTION: Window XDefaultRootWindow ( Display* display )
80 X-FUNCTION: int XProtocolVersion ( Display* display )
81 X-FUNCTION: int XProtocolRevision ( Display* display )
82 X-FUNCTION: int XQLength ( Display* display )
83 X-FUNCTION: int XScreenCount ( Display* display )
84 X-FUNCTION: int XConnectionNumber ( Display* display )
86 ! 2.5 Closing the Display
87 X-FUNCTION: int XCloseDisplay ( Display* display )
90 ! 3 - Window Functions
93 ! 3.2 - Window Attributes
95 : CWBackPixmap ( -- n ) 0 2^ ; inline
96 : CWBackPixel ( -- n ) 1 2^ ; inline
97 : CWBorderPixmap ( -- n ) 2 2^ ; inline
98 : CWBorderPixel ( -- n ) 3 2^ ; inline
99 : CWBitGravity ( -- n ) 4 2^ ; inline
100 : CWWinGravity ( -- n ) 5 2^ ; inline
101 : CWBackingStore ( -- n ) 6 2^ ; inline
102 : CWBackingPlanes ( -- n ) 7 2^ ; inline
103 : CWBackingPixel ( -- n ) 8 2^ ; inline
104 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
105 : CWSaveUnder ( -- n ) 10 2^ ; inline
106 : CWEventMask ( -- n ) 11 2^ ; inline
107 : CWDontPropagate ( -- n ) 12 2^ ; inline
108 : CWColormap ( -- n ) 13 2^ ; inline
109 : CWCursor ( -- n ) 14 2^ ; inline
111 STRUCT: XSetWindowAttributes
112 { background_pixmap Pixmap }
113 { background_pixel ulong }
114 { border_pixmap Pixmap }
115 { border_pixel ulong }
118 { backing_store int }
119 { backing_planes ulong }
120 { backing_pixel ulong }
123 { do_not_propagate_mask long }
124 { override_redirect Bool }
125 { colormap Colormap }
128 CONSTANT: UnmapGravity 0
130 CONSTANT: ForgetGravity 0
131 CONSTANT: NorthWestGravity 1
132 CONSTANT: NorthGravity 2
133 CONSTANT: NorthEastGravity 3
134 CONSTANT: WestGravity 4
135 CONSTANT: CenterGravity 5
136 CONSTANT: EastGravity 6
137 CONSTANT: SouthWestGravity 7
138 CONSTANT: SouthGravity 8
139 CONSTANT: SouthEastGravity 9
140 CONSTANT: StaticGravity 10
142 ! 3.3 - Creating Windows
144 X-FUNCTION: Window XCreateWindow ( Display* display,
146 int x, int y, uint width, uint height,
147 uint border_width, int depth, uint class,
148 Visual* visual, ulong valuemask,
149 XSetWindowAttributes* attributes )
150 X-FUNCTION: Window XCreateSimpleWindow ( Display* display,
152 int x, int y, uint width, uint height,
153 uint border_width, ulong border,
155 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w )
156 X-FUNCTION: Status XMapWindow ( Display* display, Window window )
157 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window )
158 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w )
159 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w )
161 ! 3.5 Mapping Windows
163 X-FUNCTION: int XMapRaised ( Display* display, Window w )
165 ! 3.7 - Configuring Windows
167 : CWX ( -- n ) 0 2^ ; inline
168 : CWY ( -- n ) 1 2^ ; inline
169 : CWWidth ( -- n ) 2 2^ ; inline
170 : CWHeight ( -- n ) 3 2^ ; inline
171 : CWBorderWidth ( -- n ) 4 2^ ; inline
172 : CWSibling ( -- n ) 5 2^ ; inline
173 : CWStackMode ( -- n ) 6 2^ ; inline
175 STRUCT: XWindowChanges
184 X-FUNCTION: Status XConfigureWindow ( Display* display,
186 uint value_mask, XWindowChanges* values )
187 X-FUNCTION: Status XMoveWindow ( Display* display, Window w,
189 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height )
190 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width )
193 ! 3.8 Changing Window Stacking Order
195 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w )
196 X-FUNCTION: Status XLowerWindow ( Display* display, Window w )
198 ! 3.9 - Changing Window Attributes
200 X-FUNCTION: Status XChangeWindowAttributes ( Display* display,
202 ulong valuemask, XSetWindowAttributes* attr )
203 X-FUNCTION: Status XSetWindowBackground ( Display* display,
204 Window w, ulong background_pixel )
205 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor )
206 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w )
208 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
209 ! 4 - Window Information Functions
210 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
212 ! 4.1 - Obtaining Window Information
214 X-FUNCTION: Status XQueryTree (
218 Window* parent_return,
219 Window** children_return, uint* nchildren_return
222 STRUCT: XWindowAttributes
234 { backing_store int }
235 { backing_planes ulong }
236 { backing_pixel ulong }
238 { colormap Colormap }
239 { map_installed Bool }
241 { all_event_masks long }
242 { your_event_mask long }
243 { do_not_propagate_mask long }
244 { override_redirect Bool }
247 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr )
249 CONSTANT: IsUnmapped 0
250 CONSTANT: IsUnviewable 1
251 CONSTANT: IsViewable 2
253 X-FUNCTION: Status XGetGeometry (
261 uint* border_width_return,
265 ! 4.2 - Translating Screen Coordinates
267 X-FUNCTION: Bool XQueryPointer (
270 Window* root_return, Window* child_return,
271 int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return,
275 ! 4.3 - Properties and Atoms
277 X-FUNCTION: Atom XInternAtom ( Display* display, c-string atom_name, Bool only_if_exists )
279 X-FUNCTION: c-string XGetAtomName ( Display* display, Atom atom )
281 ! 4.4 - Obtaining and Changing Window Properties
283 X-FUNCTION: int XGetWindowProperty (
284 Display* display, Window w, Atom property,
285 long long_offset, long long_length,
286 Bool delete, Atom req_type,
287 Atom* actual_type_return, int* actual_format_return,
288 ulong* nitems_return, ulong* bytes_after_return, c-string* prop_return
291 X-FUNCTION: int XChangeProperty (
292 Display* display, Window w, Atom property,
293 Atom type, int format,
294 int mode, void* data, int nelements
299 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time )
301 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection )
303 X-FUNCTION: int XConvertSelection (
304 Display* display, Atom selection, Atom target,
305 Atom property, Window requestor, Time time
309 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
310 ! 5 - Pixmap and Cursor Functions
311 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
313 ! 5.1 - Creating and Freeing Pixmaps
315 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth )
316 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap )
318 ! 5.2 - Creating, Recoloring, and Freeing Cursors
321 X-FUNCTION: Cursor XCreatePixmapCursor ( Display* display, Pixmap source, Pixmap mask, XColor* foreground_color, XColor* background_color, uint x, uint y )
322 X-FUNCTION: int XFreeCursor ( Display* display, Cursor cursor )
324 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
325 ! 6 - Color Management Functions
326 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
336 X-FUNCTION: Status XLookupColor ( Display* display,
339 XColor* exact_def_return,
340 XColor* screen_def_return )
341 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out )
342 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out )
344 ! 6.4 Creating, Copying, and Destroying Colormaps
346 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc )
348 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
349 ! 7 - Graphics Context Functions
350 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
352 : GCFunction ( -- n ) 0 2^ ; inline
353 : GCPlaneMask ( -- n ) 1 2^ ; inline
354 : GCForeground ( -- n ) 2 2^ ; inline
355 : GCBackground ( -- n ) 3 2^ ; inline
356 : GCLineWidth ( -- n ) 4 2^ ; inline
357 : GCLineStyle ( -- n ) 5 2^ ; inline
358 : GCCapStyle ( -- n ) 6 2^ ; inline
359 : GCJoinStyle ( -- n ) 7 2^ ; inline
360 : GCFillStyle ( -- n ) 8 2^ ; inline
361 : GCFillRule ( -- n ) 9 2^ ; inline
362 : GCTile ( -- n ) 10 2^ ; inline
363 : GCStipple ( -- n ) 11 2^ ; inline
364 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
365 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
366 : GCFont ( -- n ) 14 2^ ; inline
367 : GCSubwindowMode ( -- n ) 15 2^ ; inline
368 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
369 : GCClipXOrigin ( -- n ) 17 2^ ; inline
370 : GCClipYOrigin ( -- n ) 18 2^ ; inline
371 : GCClipMask ( -- n ) 19 2^ ; inline
372 : GCDashOffset ( -- n ) 20 2^ ; inline
373 : GCDashList ( -- n ) 21 2^ ; inline
374 : GCArcMode ( -- n ) 22 2^ ; inline
376 CONSTANT: GXclear 0x0
378 CONSTANT: GXandReverse 0x2
380 CONSTANT: GXandInverted 0x4
385 CONSTANT: GXequiv 0x9
386 CONSTANT: GXinvert 0xa
387 CONSTANT: GXorReverse 0xb
388 CONSTANT: GXcopyInverted 0xc
389 CONSTANT: GXorInverted 0xd
410 { subwindow_mode int }
411 { graphics_exposures Bool }
412 { clip_x_origin int }
413 { clip_y_origin int }
418 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values )
419 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values )
420 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return )
421 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground )
422 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background )
423 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function )
424 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode )
426 X-FUNCTION: GContext XGContextFromGC ( GC gc )
428 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font )
430 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
431 ! 8 - Graphics Functions
432 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
434 X-FUNCTION: Status XClearWindow ( Display* display, Window w )
435 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y )
436 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 )
437 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 )
438 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 )
448 { attributes ushort } ;
451 { ext_data XExtData* }
454 { min_char_or_byte2 uint }
455 { max_char_or_byte2 uint }
458 { all_chars_exist Bool }
459 { default_char uint }
461 { properties XFontProp* }
462 { min_bounds XCharStruct }
463 { max_bounds XCharStruct }
464 { per_char XCharStruct* }
468 X-FUNCTION: Font XLoadFont ( Display* display, c-string name )
469 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID )
470 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, c-string name )
472 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, c-string string, int count )
476 X-FUNCTION: Status XDrawString (
485 ! 8.7 - Transferring Images between Client and Server
487 CONSTANT: AllPlanes -1
490 { create_image void* }
491 { destroy_image void* }
495 { add_pixel void* } ;
505 { bitmap_bit_order int }
508 { bytes_per_line int }
509 { bits_per_pixel int }
516 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format )
517 X-FUNCTION: int XDestroyImage ( XImage* ximage )
519 : XImage-size ( ximage -- size )
520 [ height>> ] [ bytes_per_line>> ] bi * ;
522 : XImage-pixels ( ximage -- byte-array )
523 [ data>> ] [ XImage-size ] bi memory>byte-array ;
526 ! 9 - Window and Session Manager Functions
529 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y )
530 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w )
531 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w )
532 X-FUNCTION: Status XGrabServer ( Display* display )
533 X-FUNCTION: Status XUngrabServer ( Display* display )
534 X-FUNCTION: Status XKillClient ( Display* display, XID resource )
536 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
538 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
542 : NoEventMask ( -- n ) 0 ; inline
543 : KeyPressMask ( -- n ) 0 2^ ; inline
544 : KeyReleaseMask ( -- n ) 1 2^ ; inline
545 : ButtonPressMask ( -- n ) 2 2^ ; inline
546 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
547 : EnterWindowMask ( -- n ) 4 2^ ; inline
548 : LeaveWindowMask ( -- n ) 5 2^ ; inline
549 : PointerMotionMask ( -- n ) 6 2^ ; inline
550 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
551 : Button1MotionMask ( -- n ) 8 2^ ; inline
552 : Button2MotionMask ( -- n ) 9 2^ ; inline
553 : Button3MotionMask ( -- n ) 10 2^ ; inline
554 : Button4MotionMask ( -- n ) 11 2^ ; inline
555 : Button5MotionMask ( -- n ) 12 2^ ; inline
556 : ButtonMotionMask ( -- n ) 13 2^ ; inline
557 : KeymapStateMask ( -- n ) 14 2^ ; inline
558 : ExposureMask ( -- n ) 15 2^ ; inline
559 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
560 : StructureNotifyMask ( -- n ) 17 2^ ; inline
561 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
562 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
563 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
564 : FocusChangeMask ( -- n ) 21 2^ ; inline
565 : PropertyChangeMask ( -- n ) 22 2^ ; inline
566 : ColormapChangeMask ( -- n ) 23 2^ ; inline
567 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
570 CONSTANT: KeyRelease 3
571 CONSTANT: ButtonPress 4
572 CONSTANT: ButtonRelease 5
573 CONSTANT: MotionNotify 6
574 CONSTANT: EnterNotify 7
575 CONSTANT: LeaveNotify 8
577 CONSTANT: FocusOut 10
578 CONSTANT: KeymapNotify 11
580 CONSTANT: GraphicsExpose 13
581 CONSTANT: NoExpose 14
582 CONSTANT: VisibilityNotify 15
583 CONSTANT: CreateNotify 16
584 CONSTANT: DestroyNotify 17
585 CONSTANT: UnmapNotify 18
586 CONSTANT: MapNotify 19
587 CONSTANT: MapRequest 20
588 CONSTANT: ReparentNotify 21
589 CONSTANT: ConfigureNotify 22
590 CONSTANT: ConfigureRequest 23
591 CONSTANT: GravityNotify 24
592 CONSTANT: ResizeRequest 25
593 CONSTANT: CirculateNotify 26
594 CONSTANT: CirculateRequest 27
595 CONSTANT: PropertyNotify 28
596 CONSTANT: SelectionClear 29
597 CONSTANT: SelectionRequest 30
598 CONSTANT: SelectionNotify 31
599 CONSTANT: ColormapNotify 32
600 CONSTANT: ClientMessage 33
601 CONSTANT: MappingNotify 34
602 CONSTANT: GenericEvent 35
603 CONSTANT: LASTEvent 36
612 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
614 ! 10.5 Keyboard and Pointer Events
622 : Button1Mask ( -- n ) 1 8 shift ; inline
623 : Button2Mask ( -- n ) 1 9 shift ; inline
624 : Button3Mask ( -- n ) 1 10 shift ; inline
625 : Button4Mask ( -- n ) 1 11 shift ; inline
626 : Button5Mask ( -- n ) 1 12 shift ; inline
628 : ShiftMask ( -- n ) 1 0 shift ; inline
629 : LockMask ( -- n ) 1 1 shift ; inline
630 : ControlMask ( -- n ) 1 2 shift ; inline
631 : Mod1Mask ( -- n ) 1 3 shift ; inline
632 : Mod2Mask ( -- n ) 1 4 shift ; inline
633 : Mod3Mask ( -- n ) 1 5 shift ; inline
634 : Mod4Mask ( -- n ) 1 6 shift ; inline
635 : Mod5Mask ( -- n ) 1 7 shift ; inline
652 { same_screen Bool } ;
654 TYPEDEF: XButtonEvent XButtonPressedEvent
655 TYPEDEF: XButtonEvent XButtonReleasedEvent
658 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
675 { same_screen Bool } ;
677 TYPEDEF: XKeyEvent XKeyPressedEvent
678 TYPEDEF: XKeyEvent XKeyReleasedEvent
680 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
697 { same_screen Bool } ;
699 TYPEDEF: XMotionEvent XPointerMovedEvent
701 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
703 STRUCT: XCrossingEvent
722 TYPEDEF: XCrossingEvent XEnterWindowEvent
723 TYPEDEF: XCrossingEvent XLeaveWindowEvent
725 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
727 STRUCT: XFocusChangeEvent
736 TYPEDEF: XFocusChangeEvent XFocusInEvent
737 TYPEDEF: XFocusChangeEvent XFocusOutEvent
739 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
753 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
755 STRUCT: XGraphicsExposeEvent
760 { drawable Drawable }
769 STRUCT: XNoExposeEvent
774 { drawable Drawable }
778 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
780 STRUCT: XVisibilityEvent
788 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
790 STRUCT: XCreateWindowEvent
802 { override_redirect Bool } ;
804 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
806 STRUCT: XDestroyWindowEvent
814 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
823 { from_configure Bool } ;
825 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
834 { override_redirect Bool } ;
836 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
838 STRUCT: XMapRequestEvent
846 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
848 STRUCT: XReparentEvent
858 { override_redirect Bool } ;
860 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
862 STRUCT: XConfigureEvent
875 { override_redirect Bool } ;
877 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
879 STRUCT: XGravityEvent
889 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
891 STRUCT: XResizeRequestEvent
900 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
902 STRUCT: XConfigureRequestEvent
916 { value_mask ulong } ;
918 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
920 STRUCT: XCirculateEvent
929 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
931 STRUCT: XCirculateRequestEvent
940 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
942 STRUCT: XPropertyEvent
952 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
954 STRUCT: XSelectionClearEvent
963 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
965 STRUCT: XSelectionRequestEvent
977 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
979 STRUCT: XSelectionEvent
990 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
992 STRUCT: XColormapEvent
998 { colormap Colormap }
1002 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1004 STRUCT: XClientMessageEvent
1008 { display Display* }
1010 { message_type Atom }
1018 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1020 STRUCT: XMappingEvent
1024 { display Display* }
1027 { first_keycode int }
1030 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1034 { display Display* }
1037 { error_code uchar }
1038 { request_code uchar }
1039 { minor_code uchar } ;
1041 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1043 STRUCT: XKeymapEvent
1047 { display Display* }
1051 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1053 ! Newer things, needed for XInput2 support. Not in the book.
1055 ! GenericEvent is the standard event for all newer extensions.
1056 STRUCT: XGenericEvent
1060 { display Display* }
1064 STRUCT: XGenericEventCookie
1068 { display Display* }
1074 X-FUNCTION: Bool XGetEventData ( Display* dpy, XGenericEventCookie* cookie )
1075 X-FUNCTION: void XFreeEventData ( Display* dpy, XGenericEventCookie* cookie )
1077 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1079 UNION-STRUCT: XEvent
1081 { XAnyEvent XAnyEvent }
1082 { XKeyEvent XKeyEvent }
1083 { XButtonEvent XButtonEvent }
1084 { XMotionEvent XMotionEvent }
1085 { XCrossingEvent XCrossingEvent }
1086 { XFocusChangeEvent XFocusChangeEvent }
1087 { XExposeEvent XExposeEvent }
1088 { XGraphicsExposeEvent XGraphicsExposeEvent }
1089 { XNoExposeEvent XNoExposeEvent }
1090 { XVisibilityEvent XVisibilityEvent }
1091 { XCreateWindowEvent XCreateWindowEvent }
1092 { XDestroyWindowEvent XDestroyWindowEvent }
1093 { XUnmapEvent XUnmapEvent }
1094 { XMapEvent XMapEvent }
1095 { XMapRequestEvent XMapRequestEvent }
1096 { XReparentEvent XReparentEvent }
1097 { XConfigureEvent XConfigureEvent }
1098 { XGravityEvent XGravityEvent }
1099 { XResizeRequestEvent XResizeRequestEvent }
1100 { XConfigureRequestEvent XConfigureRequestEvent }
1101 { XCirculateEvent XCirculateEvent }
1102 { XCirculateRequestEvent XCirculateRequestEvent }
1103 { XPropertyEvent XPropertyEvent }
1104 { XSelectionClearEvent XSelectionClearEvent }
1105 { XSelectionRequestEvent XSelectionRequestEvent }
1106 { XSelectionEvent XSelectionEvent }
1107 { XColormapEvent XColormapEvent }
1108 { XClientMessageEvent XClientMessageEvent }
1109 { XMappingEvent XMappingEvent }
1110 { XErrorEvent XErrorEvent }
1111 { XKeymapEvent XKeymapEvent }
1112 { XGenericEvent XGenericEvent }
1113 { XGenericEventCookie XGenericEventCookie }
1114 { padding long[24] } ;
1116 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1117 ! 11 - Event Handling Functions
1118 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1120 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask )
1121 X-FUNCTION: Status XFlush ( Display* display )
1122 X-FUNCTION: Status XSync ( Display* display, int discard )
1123 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event )
1124 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return )
1126 ! 11.3 - Event Queue Management
1128 CONSTANT: QueuedAlready 0
1129 CONSTANT: QueuedAfterReading 1
1130 CONSTANT: QueuedAfterFlush 2
1132 X-FUNCTION: int XEventsQueued ( Display* display, int mode )
1133 X-FUNCTION: int XPending ( Display* display )
1135 ! 11.6 - Sending Events to Other Applications
1137 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send )
1139 ! 11.8 - Handling Protocol Errors
1141 X-FUNCTION: int XSetErrorHandler ( void* handler )
1143 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1144 ! 12 - Input Device Functions
1145 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1149 X-FUNCTION: int XGrabPointer (
1161 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time )
1162 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time )
1163 X-FUNCTION: Status XGrabKey (
1164 Display* display, int keycode, uint modifiers,
1165 Window grab_window, Bool owner_events,
1166 int pointer_mode, int keyboard_mode
1168 X-FUNCTION: int XGrabKeyboard (
1169 Display* display, Window grab_window,
1171 int pointer_mode, int keyboard_mode, Time time
1173 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time )
1175 X-FUNCTION: Status XGetInputFocus (
1177 Window* focus_return,
1178 int* revert_to_return
1181 X-FUNCTION: Status XWarpPointer (
1183 Window src_w, Window dest_w,
1184 int src_x, int src_y, uint src_width, uint src_height,
1185 int dest_x, int dest_y
1188 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1189 ! 14 - Inter-Client Communication Functions
1190 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1192 ! 14.1 Client to Window Manager Communication
1194 X-FUNCTION: Status XFetchName ( Display* display, Window w, c-string* window_name_return )
1195 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return )
1197 ! 14.1.1. Manipulating Top-Level Windows
1199 X-FUNCTION: Status XIconifyWindow (
1205 X-FUNCTION: Status XWithdrawWindow (
1211 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1213 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1215 : USPosition ( -- n ) 0 2^ ; inline
1216 : USSize ( -- n ) 1 2^ ; inline
1217 : PPosition ( -- n ) 2 2^ ; inline
1218 : PSize ( -- n ) 3 2^ ; inline
1219 : PMinSize ( -- n ) 4 2^ ; inline
1220 : PMaxSize ( -- n ) 5 2^ ; inline
1221 : PResizeInc ( -- n ) 6 2^ ; inline
1222 : PAspect ( -- n ) 7 2^ ; inline
1223 : PBaseSize ( -- n ) 8 2^ ; inline
1224 : PWinGravity ( -- n ) 9 2^ ; inline
1226 flags{ PPosition PSize PMinSize PMaxSize PResizeInc PAspect }
1240 { min_aspect_x int }
1241 { min_aspect_y int }
1242 { max_aspect_x int }
1243 { max_aspect_y int }
1246 { win_gravity int } ;
1248 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1250 X-FUNCTION: Status XSetWMProtocols (
1251 Display* display, Window w, Atom* protocols, int count )
1253 X-FUNCTION: Status XGetWMProtocols (
1256 Atom** protocols_return,
1259 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1260 ! 16 - Application Utility Functions
1261 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1263 ! 16.1 Keyboard Utility Functions
1265 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index )
1267 X-FUNCTION: int XLookupString (
1268 XKeyEvent* event_struct,
1269 void* buffer_return,
1271 KeySym* keysym_return,
1272 XComposeStatus* status_in_out
1275 ! 16.7 Determining the Appropriate Visual Type
1277 CONSTANT: VisualNoMask 0x0
1278 CONSTANT: VisualIDMask 0x1
1279 CONSTANT: VisualScreenMask 0x2
1280 CONSTANT: VisualDepthMask 0x4
1281 CONSTANT: VisualClassMask 0x8
1282 CONSTANT: VisualRedMaskMask 0x10
1283 CONSTANT: VisualGreenMaskMask 0x20
1284 CONSTANT: VisualBlueMaskMask 0x40
1285 CONSTANT: VisualColormapSizeMask 0x80
1286 CONSTANT: VisualBitsPerRGBMask 0x100
1287 CONSTANT: VisualAllMask 0x1FF
1291 { visualid VisualID }
1296 { green_mask ulong }
1298 { colormap_size int }
1299 { bits_per_rgb int } ;
1301 ! 16.9 Manipulating Bitmaps
1302 X-FUNCTION: Pixmap XCreateBitmapFromData (
1309 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1310 ! Appendix C - Extensions
1311 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1312 X-FUNCTION: Bool XQueryExtension (
1315 int* major_opcode_return,
1316 int* first_event_return,
1317 int* first_error_return
1320 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1321 ! Appendix D - Compatibility Functions
1322 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1324 X-FUNCTION: Status XSetStandardProperties (
1327 c-string window_name,
1335 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1337 CONSTANT: XA_PRIMARY 1
1338 CONSTANT: XA_SECONDARY 2
1341 CONSTANT: XA_BITMAP 5
1342 CONSTANT: XA_CARDINAL 6
1343 CONSTANT: XA_COLORMAP 7
1344 CONSTANT: XA_CURSOR 8
1345 CONSTANT: XA_CUT_BUFFER0 9
1346 CONSTANT: XA_CUT_BUFFER1 10
1347 CONSTANT: XA_CUT_BUFFER2 11
1348 CONSTANT: XA_CUT_BUFFER3 12
1349 CONSTANT: XA_CUT_BUFFER4 13
1350 CONSTANT: XA_CUT_BUFFER5 14
1351 CONSTANT: XA_CUT_BUFFER6 15
1352 CONSTANT: XA_CUT_BUFFER7 16
1353 CONSTANT: XA_DRAWABLE 17
1354 CONSTANT: XA_FONT 18
1355 CONSTANT: XA_INTEGER 19
1356 CONSTANT: XA_PIXMAP 20
1357 CONSTANT: XA_POINT 21
1358 CONSTANT: XA_RECTANGLE 22
1359 CONSTANT: XA_RESOURCE_MANAGER 23
1360 CONSTANT: XA_RGB_COLOR_MAP 24
1361 CONSTANT: XA_RGB_BEST_MAP 25
1362 CONSTANT: XA_RGB_BLUE_MAP 26
1363 CONSTANT: XA_RGB_DEFAULT_MAP 27
1364 CONSTANT: XA_RGB_GRAY_MAP 28
1365 CONSTANT: XA_RGB_GREEN_MAP 29
1366 CONSTANT: XA_RGB_RED_MAP 30
1367 CONSTANT: XA_STRING 31
1368 CONSTANT: XA_VISUALID 32
1369 CONSTANT: XA_WINDOW 33
1370 CONSTANT: XA_WM_COMMAND 34
1371 CONSTANT: XA_WM_HINTS 35
1372 CONSTANT: XA_WM_CLIENT_MACHINE 36
1373 CONSTANT: XA_WM_ICON_NAME 37
1374 CONSTANT: XA_WM_ICON_SIZE 38
1375 CONSTANT: XA_WM_NAME 39
1376 CONSTANT: XA_WM_NORMAL_HINTS 40
1377 CONSTANT: XA_WM_SIZE_HINTS 41
1378 CONSTANT: XA_WM_ZOOM_HINTS 42
1379 CONSTANT: XA_MIN_SPACE 43
1380 CONSTANT: XA_NORM_SPACE 44
1381 CONSTANT: XA_MAX_SPACE 45
1382 CONSTANT: XA_END_SPACE 46
1383 CONSTANT: XA_SUPERSCRIPT_X 47
1384 CONSTANT: XA_SUPERSCRIPT_Y 48
1385 CONSTANT: XA_SUBSCRIPT_X 49
1386 CONSTANT: XA_SUBSCRIPT_Y 50
1387 CONSTANT: XA_UNDERLINE_POSITION 51
1388 CONSTANT: XA_UNDERLINE_THICKNESS 52
1389 CONSTANT: XA_STRIKEOUT_ASCENT 53
1390 CONSTANT: XA_STRIKEOUT_DESCENT 54
1391 CONSTANT: XA_ITALIC_ANGLE 55
1392 CONSTANT: XA_X_HEIGHT 56
1393 CONSTANT: XA_QUAD_WIDTH 57
1394 CONSTANT: XA_WEIGHT 58
1395 CONSTANT: XA_POINT_SIZE 59
1396 CONSTANT: XA_RESOLUTION 60
1397 CONSTANT: XA_COPYRIGHT 61
1398 CONSTANT: XA_NOTICE 62
1399 CONSTANT: XA_FONT_NAME 63
1400 CONSTANT: XA_FAMILY_NAME 64
1401 CONSTANT: XA_FULL_NAME 65
1402 CONSTANT: XA_CAP_HEIGHT 66
1403 CONSTANT: XA_WM_CLASS 67
1404 CONSTANT: XA_WM_TRANSIENT_FOR 68
1406 CONSTANT: XA_LAST_PREDEFINED 68
1408 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1409 ! The rest of the stuff is not from the book.
1410 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1412 X-FUNCTION: void XFree ( void* data )
1413 X-FUNCTION: int XStoreName ( Display* display, Window w, c-string window_name )
1414 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints )
1415 X-FUNCTION: int XBell ( Display* display, int percent )
1419 CONSTANT: XIMPreeditArea 0x0001
1420 CONSTANT: XIMPreeditCallbacks 0x0002
1421 CONSTANT: XIMPreeditPosition 0x0004
1422 CONSTANT: XIMPreeditNothing 0x0008
1423 CONSTANT: XIMPreeditNone 0x0010
1424 CONSTANT: XIMStatusArea 0x0100
1425 CONSTANT: XIMStatusCallbacks 0x0200
1426 CONSTANT: XIMStatusNothing 0x0400
1427 CONSTANT: XIMStatusNone 0x0800
1429 CONSTANT: XNVaNestedList "XNVaNestedList"
1430 CONSTANT: XNQueryInputStyle "queryInputStyle"
1431 CONSTANT: XNClientWindow "clientWindow"
1432 CONSTANT: XNInputStyle "inputStyle"
1433 CONSTANT: XNFocusWindow "focusWindow"
1434 CONSTANT: XNResourceName "resourceName"
1435 CONSTANT: XNResourceClass "resourceClass"
1436 CONSTANT: XNGeometryCallback "geometryCallback"
1437 CONSTANT: XNDestroyCallback "destroyCallback"
1438 CONSTANT: XNFilterEvents "filterEvents"
1439 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1440 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1441 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1442 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1443 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1444 CONSTANT: XNPreeditAttributes "preeditAttributes"
1445 CONSTANT: XNStatusStartCallback "statusStartCallback"
1446 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1447 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1448 CONSTANT: XNStatusAttributes "statusAttributes"
1449 CONSTANT: XNArea "area"
1450 CONSTANT: XNAreaNeeded "areaNeeded"
1451 CONSTANT: XNSpotLocation "spotLocation"
1452 CONSTANT: XNColormap "colorMap"
1453 CONSTANT: XNStdColormap "stdColorMap"
1454 CONSTANT: XNForeground "foreground"
1455 CONSTANT: XNBackground "background"
1456 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1457 CONSTANT: XNFontSet "fontSet"
1458 CONSTANT: XNLineSpace "lineSpace"
1459 CONSTANT: XNCursor "cursor"
1461 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1462 CONSTANT: XNQueryICValuesList "queryICValuesList"
1463 CONSTANT: XNVisiblePosition "visiblePosition"
1464 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1465 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1466 CONSTANT: XNStringConversion "stringConversion"
1467 CONSTANT: XNResetState "resetState"
1468 CONSTANT: XNHotKey "hotKey"
1469 CONSTANT: XNHotKeyState "hotKeyState"
1470 CONSTANT: XNPreeditState "preeditState"
1471 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1473 CONSTANT: XBufferOverflow -1
1474 CONSTANT: XLookupNone 1
1475 CONSTANT: XLookupChars 2
1476 CONSTANT: XLookupKeySym 3
1477 CONSTANT: XLookupBoth 4
1479 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w )
1481 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, c-string res_name, c-string res_class )
1483 X-FUNCTION: Status XCloseIM ( XIM im )
1485 X-FUNCTION: XIC XCreateIC (
1487 c-string key1, Window value1,
1488 c-string key2, Window value2,
1489 c-string key3, int value3,
1490 c-string key4, c-string value4,
1491 c-string key5, c-string value5,
1495 X-FUNCTION: void XDestroyIC ( XIC ic )
1497 X-FUNCTION: void XSetICFocus ( XIC ic )
1499 X-FUNCTION: void XUnsetICFocus ( XIC ic )
1501 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return )
1503 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, c-string buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return )
1505 ! !!! category of setlocale
1507 CONSTANT: LC_COLLATE 1
1508 CONSTANT: LC_CTYPE 2
1509 CONSTANT: LC_MONETARY 3
1510 CONSTANT: LC_NUMERIC 4
1513 X-FUNCTION: c-string setlocale ( int category, c-string name )
1515 X-FUNCTION: Bool XSupportsLocale ( )
1517 X-FUNCTION: c-string XSetLocaleModifiers ( c-string modifier_list )
1519 ! uncategorized xlib bindings
1521 X-FUNCTION: int XQueryKeymap ( Display* display, char[32] keys_return )