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
34 TYPEDEF: void* Screen*
36 TYPEDEF: void* Visual*
37 TYPEDEF: void* XExtData*
38 TYPEDEF: void* XFontProp*
39 TYPEDEF: void* XComposeStatus*
47 TYPEDEF: ulong VisualID
50 TYPEDEF: void* Window**
55 ALIAS: <Drawable> <XID>
65 ! 2 - Display Functions
68 ! This struct is incomplete
74 X-FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
76 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
78 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number ) ;
79 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number ) ;
80 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number ) ;
81 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number ) ;
82 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number ) ;
83 X-FUNCTION: int XDefaultScreen ( Display* display ) ;
84 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number ) ;
85 X-FUNCTION: Window XDefaultRootWindow ( Display* display ) ;
86 X-FUNCTION: int XProtocolVersion ( Display* display ) ;
87 X-FUNCTION: int XProtocolRevision ( Display* display ) ;
88 X-FUNCTION: int XQLength ( Display* display ) ;
89 X-FUNCTION: int XScreenCount ( Display* display ) ;
90 X-FUNCTION: int XConnectionNumber ( Display* display ) ;
92 ! 2.5 Closing the Display
93 X-FUNCTION: int XCloseDisplay ( Display* display ) ;
96 ! 3 - Window Functions
99 ! 3.2 - Window Attributes
101 : CWBackPixmap ( -- n ) 0 2^ ; inline
102 : CWBackPixel ( -- n ) 1 2^ ; inline
103 : CWBorderPixmap ( -- n ) 2 2^ ; inline
104 : CWBorderPixel ( -- n ) 3 2^ ; inline
105 : CWBitGravity ( -- n ) 4 2^ ; inline
106 : CWWinGravity ( -- n ) 5 2^ ; inline
107 : CWBackingStore ( -- n ) 6 2^ ; inline
108 : CWBackingPlanes ( -- n ) 7 2^ ; inline
109 : CWBackingPixel ( -- n ) 8 2^ ; inline
110 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
111 : CWSaveUnder ( -- n ) 10 2^ ; inline
112 : CWEventMask ( -- n ) 11 2^ ; inline
113 : CWDontPropagate ( -- n ) 12 2^ ; inline
114 : CWColormap ( -- n ) 13 2^ ; inline
115 : CWCursor ( -- n ) 14 2^ ; inline
117 STRUCT: XSetWindowAttributes
118 { background_pixmap Pixmap }
119 { background_pixel ulong }
120 { border_pixmap Pixmap }
121 { border_pixel ulong }
124 { backing_store int }
125 { backing_planes ulong }
126 { backing_pixel ulong }
129 { do_not_propagate_mask long }
130 { override_redirect Bool }
131 { colormap Colormap }
134 CONSTANT: UnmapGravity 0
136 CONSTANT: ForgetGravity 0
137 CONSTANT: NorthWestGravity 1
138 CONSTANT: NorthGravity 2
139 CONSTANT: NorthEastGravity 3
140 CONSTANT: WestGravity 4
141 CONSTANT: CenterGravity 5
142 CONSTANT: EastGravity 6
143 CONSTANT: SouthWestGravity 7
144 CONSTANT: SouthGravity 8
145 CONSTANT: SouthEastGravity 9
146 CONSTANT: StaticGravity 10
148 ! 3.3 - Creating Windows
150 X-FUNCTION: Window XCreateWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, int depth, uint class, Visual* visual, ulong valuemask, XSetWindowAttributes* attributes ) ;
151 X-FUNCTION: Window XCreateSimpleWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, ulong border, ulong background ) ;
152 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w ) ;
153 X-FUNCTION: Status XMapWindow ( Display* display, Window window ) ;
154 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window ) ;
155 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w ) ;
156 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w ) ;
158 ! 3.5 Mapping Windows
160 X-FUNCTION: int XMapRaised ( Display* display, Window w ) ;
162 ! 3.7 - Configuring Windows
164 : CWX ( -- n ) 0 2^ ; inline
165 : CWY ( -- n ) 1 2^ ; inline
166 : CWWidth ( -- n ) 2 2^ ; inline
167 : CWHeight ( -- n ) 3 2^ ; inline
168 : CWBorderWidth ( -- n ) 4 2^ ; inline
169 : CWSibling ( -- n ) 5 2^ ; inline
170 : CWStackMode ( -- n ) 6 2^ ; inline
172 STRUCT: XWindowChanges
181 X-FUNCTION: Status XConfigureWindow ( Display* display, Window w, uint value_mask, XWindowChanges* values ) ;
182 X-FUNCTION: Status XMoveWindow ( Display* display, Window w, int x, int y ) ;
183 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height ) ;
184 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width ) ;
187 ! 3.8 Changing Window Stacking Order
189 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w ) ;
190 X-FUNCTION: Status XLowerWindow ( Display* display, Window w ) ;
192 ! 3.9 - Changing Window Attributes
194 X-FUNCTION: Status XChangeWindowAttributes (
195 Display* display, Window w, ulong valuemask, XSetWindowAttributes* attr ) ;
196 X-FUNCTION: Status XSetWindowBackground (
197 Display* display, Window w, ulong background_pixel ) ;
198 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor ) ;
199 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w ) ;
201 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
202 ! 4 - Window Information Functions
203 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
205 ! 4.1 - Obtaining Window Information
207 X-FUNCTION: Status XQueryTree (
211 Window* parent_return,
212 Window** children_return, uint* nchildren_return ) ;
214 STRUCT: XWindowAttributes
226 { backing_store int }
227 { backing_planes ulong }
228 { backing_pixel ulong }
230 { colormap Colormap }
231 { map_installed Bool }
233 { all_event_masks long }
234 { your_event_mask long }
235 { do_not_propagate_mask long }
236 { override_redirect Bool }
239 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr ) ;
241 CONSTANT: IsUnmapped 0
242 CONSTANT: IsUnviewable 1
243 CONSTANT: IsViewable 2
245 X-FUNCTION: Status XGetGeometry (
253 uint* border_width_return,
254 uint* depth_return ) ;
256 ! 4.2 - Translating Screen Coordinates
258 X-FUNCTION: Bool XQueryPointer ( Display* display, Window w, Window* root_return, Window* child_return, int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return, uint* mask_return ) ;
260 ! 4.3 - Properties and Atoms
262 X-FUNCTION: Atom XInternAtom ( Display* display, char* atom_name, Bool only_if_exists ) ;
264 X-FUNCTION: char* XGetAtomName ( Display* display, Atom atom ) ;
266 ! 4.4 - Obtaining and Changing Window Properties
268 X-FUNCTION: int XGetWindowProperty ( Display* display, Window w, Atom property, long long_offset, long long_length, Bool delete, Atom req_type, Atom* actual_type_return, int* actual_format_return, ulong* nitems_return, ulong* bytes_after_return, char** prop_return ) ;
270 X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ;
274 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time ) ;
276 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection ) ;
278 X-FUNCTION: int XConvertSelection ( Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time ) ;
281 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
282 ! 5 - Pixmap and Cursor Functions
283 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
285 ! 5.1 - Creating and Freeing Pixmaps
287 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth ) ;
288 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap ) ;
291 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
292 ! 6 - Color Management Functions
293 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
303 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
304 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
305 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
307 ! 6.4 Creating, Copying, and Destroying Colormaps
309 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
311 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
312 ! 7 - Graphics Context Functions
313 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
315 : GCFunction ( -- n ) 0 2^ ; inline
316 : GCPlaneMask ( -- n ) 1 2^ ; inline
317 : GCForeground ( -- n ) 2 2^ ; inline
318 : GCBackground ( -- n ) 3 2^ ; inline
319 : GCLineWidth ( -- n ) 4 2^ ; inline
320 : GCLineStyle ( -- n ) 5 2^ ; inline
321 : GCCapStyle ( -- n ) 6 2^ ; inline
322 : GCJoinStyle ( -- n ) 7 2^ ; inline
323 : GCFillStyle ( -- n ) 8 2^ ; inline
324 : GCFillRule ( -- n ) 9 2^ ; inline
325 : GCTile ( -- n ) 10 2^ ; inline
326 : GCStipple ( -- n ) 11 2^ ; inline
327 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
328 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
329 : GCFont ( -- n ) 14 2^ ; inline
330 : GCSubwindowMode ( -- n ) 15 2^ ; inline
331 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
332 : GCClipXOrigin ( -- n ) 17 2^ ; inline
333 : GCClipYOrigin ( -- n ) 18 2^ ; inline
334 : GCClipMask ( -- n ) 19 2^ ; inline
335 : GCDashOffset ( -- n ) 20 2^ ; inline
336 : GCDashList ( -- n ) 21 2^ ; inline
337 : GCArcMode ( -- n ) 22 2^ ; inline
339 CONSTANT: GXclear HEX: 0
340 CONSTANT: GXand HEX: 1
341 CONSTANT: GXandReverse HEX: 2
342 CONSTANT: GXcopy HEX: 3
343 CONSTANT: GXandInverted HEX: 4
344 CONSTANT: GXnoop HEX: 5
345 CONSTANT: GXxor HEX: 6
346 CONSTANT: GXor HEX: 7
347 CONSTANT: GXnor HEX: 8
348 CONSTANT: GXequiv HEX: 9
349 CONSTANT: GXinvert HEX: a
350 CONSTANT: GXorReverse HEX: b
351 CONSTANT: GXcopyInverted HEX: c
352 CONSTANT: GXorInverted HEX: d
353 CONSTANT: GXnand HEX: e
354 CONSTANT: GXset HEX: f
373 { subwindow_mode int }
374 { graphics_exposures Bool }
375 { clip_x_origin int }
376 { clip_y_origin int }
381 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
382 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
383 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
384 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
385 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
386 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
387 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
389 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
391 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
393 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
394 ! 8 - Graphics Functions
395 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
397 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
398 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
399 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
400 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
401 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
411 { attributes ushort } ;
413 X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ;
414 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
415 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ;
418 { ext_data XExtData* }
421 { min_char_or_byte2 uint }
422 { max_char_or_byte2 uint }
425 { all_chars_exist Bool }
426 { default_char uint }
428 { properties XFontProp* }
429 { min_bounds XCharStruct }
430 { max_bounds XCharStruct }
431 { per_char XCharStruct* }
435 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ;
439 X-FUNCTION: Status XDrawString (
448 ! 8.7 - Transferring Images between Client and Server
450 CONSTANT: AllPlanes -1
453 { create_image void* }
454 { destroy_image void* }
458 { add_pixel void* } ;
468 { bitmap_bit_order int }
471 { bytes_per_line int }
472 { bits_per_pixel int }
479 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
480 X-FUNCTION: int XDestroyImage ( XImage* ximage ) ;
482 : XImage-size ( ximage -- size )
483 [ height>> ] [ bytes_per_line>> ] bi * ;
485 : XImage-pixels ( ximage -- byte-array )
486 [ data>> ] [ XImage-size ] bi memory>byte-array ;
489 ! 9 - Window and Session Manager Functions
492 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
493 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
494 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
495 X-FUNCTION: Status XGrabServer ( Display* display ) ;
496 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
497 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
499 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
501 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
505 : NoEventMask ( -- n ) 0 ; inline
506 : KeyPressMask ( -- n ) 0 2^ ; inline
507 : KeyReleaseMask ( -- n ) 1 2^ ; inline
508 : ButtonPressMask ( -- n ) 2 2^ ; inline
509 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
510 : EnterWindowMask ( -- n ) 4 2^ ; inline
511 : LeaveWindowMask ( -- n ) 5 2^ ; inline
512 : PointerMotionMask ( -- n ) 6 2^ ; inline
513 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
514 : Button1MotionMask ( -- n ) 8 2^ ; inline
515 : Button2MotionMask ( -- n ) 9 2^ ; inline
516 : Button3MotionMask ( -- n ) 10 2^ ; inline
517 : Button4MotionMask ( -- n ) 11 2^ ; inline
518 : Button5MotionMask ( -- n ) 12 2^ ; inline
519 : ButtonMotionMask ( -- n ) 13 2^ ; inline
520 : KeymapStateMask ( -- n ) 14 2^ ; inline
521 : ExposureMask ( -- n ) 15 2^ ; inline
522 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
523 : StructureNotifyMask ( -- n ) 17 2^ ; inline
524 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
525 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
526 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
527 : FocusChangeMask ( -- n ) 21 2^ ; inline
528 : PropertyChangeMask ( -- n ) 22 2^ ; inline
529 : ColormapChangeMask ( -- n ) 23 2^ ; inline
530 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
533 CONSTANT: KeyRelease 3
534 CONSTANT: ButtonPress 4
535 CONSTANT: ButtonRelease 5
536 CONSTANT: MotionNotify 6
537 CONSTANT: EnterNotify 7
538 CONSTANT: LeaveNotify 8
540 CONSTANT: FocusOut 10
541 CONSTANT: KeymapNotify 11
543 CONSTANT: GraphicsExpose 13
544 CONSTANT: NoExpose 14
545 CONSTANT: VisibilityNotify 15
546 CONSTANT: CreateNotify 16
547 CONSTANT: DestroyNotify 17
548 CONSTANT: UnmapNotify 18
549 CONSTANT: MapNotify 19
550 CONSTANT: MapRequest 20
551 CONSTANT: ReparentNotify 21
552 CONSTANT: ConfigureNotify 22
553 CONSTANT: ConfigureRequest 23
554 CONSTANT: GravityNotify 24
555 CONSTANT: ResizeRequest 25
556 CONSTANT: CirculateNotify 26
557 CONSTANT: CirculateRequest 27
558 CONSTANT: PropertyNotify 28
559 CONSTANT: SelectionClear 29
560 CONSTANT: SelectionRequest 30
561 CONSTANT: SelectionNotify 31
562 CONSTANT: ColormapNotify 32
563 CONSTANT: ClientMessage 33
564 CONSTANT: MappingNotify 34
565 CONSTANT: LASTEvent 35
574 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
576 ! 10.5 Keyboard and Pointer Events
584 : Button1Mask ( -- n ) 1 8 shift ; inline
585 : Button2Mask ( -- n ) 1 9 shift ; inline
586 : Button3Mask ( -- n ) 1 10 shift ; inline
587 : Button4Mask ( -- n ) 1 11 shift ; inline
588 : Button5Mask ( -- n ) 1 12 shift ; inline
590 : ShiftMask ( -- n ) 1 0 shift ; inline
591 : LockMask ( -- n ) 1 1 shift ; inline
592 : ControlMask ( -- n ) 1 2 shift ; inline
593 : Mod1Mask ( -- n ) 1 3 shift ; inline
594 : Mod2Mask ( -- n ) 1 4 shift ; inline
595 : Mod3Mask ( -- n ) 1 5 shift ; inline
596 : Mod4Mask ( -- n ) 1 6 shift ; inline
597 : Mod5Mask ( -- n ) 1 7 shift ; inline
614 { same_screen Bool } ;
616 TYPEDEF: XButtonEvent XButtonPressedEvent
617 TYPEDEF: XButtonEvent XButtonReleasedEvent
620 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
637 { same_screen Bool } ;
639 TYPEDEF: XKeyEvent XKeyPressedEvent
640 TYPEDEF: XKeyEvent XKeyReleasedEvent
642 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
659 { same_screen Bool } ;
661 TYPEDEF: XMotionEvent XPointerMovedEvent
663 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
665 STRUCT: XCrossingEvent
684 TYPEDEF: XCrossingEvent XEnterWindowEvent
685 TYPEDEF: XCrossingEvent XLeaveWindowEvent
687 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
689 STRUCT: XFocusChangeEvent
698 TYPEDEF: XFocusChangeEvent XFocusInEvent
699 TYPEDEF: XFocusChangeEvent XFocusOutEvent
701 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
715 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
717 STRUCT: XGraphicsExposeEvent
722 { drawable Drawable }
731 STRUCT: XNoExposeEvent
736 { drawable Drawable }
740 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
742 STRUCT: XVisibilityEvent
750 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
752 STRUCT: XCreateWindowEvent
764 { override_redirect Bool } ;
766 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
768 STRUCT: XDestroyWindowEvent
776 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
785 { from_configure Bool } ;
787 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
796 { override_redirect Bool } ;
798 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
800 STRUCT: XMapRequestEvent
808 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
810 STRUCT: XReparentEvent
820 { override_redirect Bool } ;
822 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
824 STRUCT: XConfigureEvent
837 { override_redirect Bool } ;
839 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
841 STRUCT: XGravityEvent
851 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
853 STRUCT: XResizeRequestEvent
862 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
864 STRUCT: XConfigureRequestEvent
878 { value_mask ulong } ;
880 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
882 STRUCT: XCirculateEvent
891 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
893 STRUCT: XCirculateRequestEvent
902 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
904 STRUCT: XPropertyEvent
914 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
916 STRUCT: XSelectionClearEvent
925 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
927 STRUCT: XSelectionRequestEvent
939 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
941 STRUCT: XSelectionEvent
952 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
954 STRUCT: XColormapEvent
960 { colormap Colormap }
964 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
966 STRUCT: XClientMessageEvent
972 { message_type Atom }
980 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
982 STRUCT: XMappingEvent
989 { first_keycode int }
992 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1000 { request_code uchar }
1001 { minor_code uchar } ;
1003 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1005 STRUCT: XKeymapEvent
1009 { display Display* }
1020 UNION-STRUCT: XEvent
1022 { XAnyEvent XAnyEvent }
1023 { XKeyEvent XKeyEvent }
1024 { XButtonEvent XButtonEvent }
1025 { XMotionEvent XMotionEvent }
1026 { XCrossingEvent XCrossingEvent }
1027 { XFocusChangeEvent XFocusChangeEvent }
1028 { XExposeEvent XExposeEvent }
1029 { XGraphicsExposeEvent XGraphicsExposeEvent }
1030 { XNoExposeEvent XNoExposeEvent }
1031 { XVisibilityEvent XVisibilityEvent }
1032 { XCreateWindowEvent XCreateWindowEvent }
1033 { XDestroyWindowEvent XDestroyWindowEvent }
1034 { XUnmapEvent XUnmapEvent }
1035 { XMapEvent XMapEvent }
1036 { XMapRequestEvent XMapRequestEvent }
1037 { XReparentEvent XReparentEvent }
1038 { XConfigureEvent XConfigureEvent }
1039 { XGravityEvent XGravityEvent }
1040 { XResizeRequestEvent XResizeRequestEvent }
1041 { XConfigureRequestEvent XConfigureRequestEvent }
1042 { XCirculateEvent XCirculateEvent }
1043 { XCirculateRequestEvent XCirculateRequestEvent }
1044 { XPropertyEvent XPropertyEvent }
1045 { XSelectionClearEvent XSelectionClearEvent }
1046 { XSelectionRequestEvent XSelectionRequestEvent }
1047 { XSelectionEvent XSelectionEvent }
1048 { XColormapEvent XColormapEvent }
1049 { XClientMessageEvent XClientMessageEvent }
1050 { XMappingEvent XMappingEvent }
1051 { XErrorEvent XErrorEvent }
1052 { XKeymapEvent XKeymapEvent }
1053 { padding long[24] } ;
1055 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1056 ! 11 - Event Handling Functions
1057 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1059 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1060 X-FUNCTION: Status XFlush ( Display* display ) ;
1061 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1062 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1063 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1065 ! 11.3 - Event Queue Management
1067 CONSTANT: QueuedAlready 0
1068 CONSTANT: QueuedAfterReading 1
1069 CONSTANT: QueuedAfterFlush 2
1071 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1072 X-FUNCTION: int XPending ( Display* display ) ;
1074 ! 11.6 - Sending Events to Other Applications
1076 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1078 ! 11.8 - Handling Protocol Errors
1080 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1082 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1083 ! 12 - Input Device Functions
1084 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1088 X-FUNCTION: int XGrabPointer (
1099 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1100 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1101 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1102 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1104 X-FUNCTION: Status XGetInputFocus ( Display* display,
1105 Window* focus_return,
1106 int* revert_to_return ) ;
1108 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 ) ;
1110 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1111 ! 14 - Inter-Client Communication Functions
1112 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1114 ! 14.1 Client to Window Manager Communication
1116 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1117 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1119 ! 14.1.1. Manipulating Top-Level Windows
1121 X-FUNCTION: Status XIconifyWindow (
1122 Display* display, Window w, int screen_number ) ;
1124 X-FUNCTION: Status XWithdrawWindow (
1125 Display* display, Window w, int screen_number ) ;
1127 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1129 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1131 : USPosition ( -- n ) 0 2^ ; inline
1132 : USSize ( -- n ) 1 2^ ; inline
1133 : PPosition ( -- n ) 2 2^ ; inline
1134 : PSize ( -- n ) 3 2^ ; inline
1135 : PMinSize ( -- n ) 4 2^ ; inline
1136 : PMaxSize ( -- n ) 5 2^ ; inline
1137 : PResizeInc ( -- n ) 6 2^ ; inline
1138 : PAspect ( -- n ) 7 2^ ; inline
1139 : PBaseSize ( -- n ) 8 2^ ; inline
1140 : PWinGravity ( -- n ) 9 2^ ; inline
1141 : PAllHints ( -- n )
1142 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1156 { min_aspect_x int }
1157 { min_aspect_y int }
1158 { max_aspect_x int }
1159 { max_aspect_y int }
1162 { win_gravity int } ;
1164 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1166 X-FUNCTION: Status XSetWMProtocols (
1167 Display* display, Window w, Atom* protocols, int count ) ;
1169 X-FUNCTION: Status XGetWMProtocols (
1172 Atom** protocols_return,
1173 int* count_return ) ;
1175 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1176 ! 16 - Application Utility Functions
1177 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1179 ! 16.1 Keyboard Utility Functions
1181 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1183 X-FUNCTION: int XLookupString (
1184 XKeyEvent* event_struct,
1185 void* buffer_return,
1187 KeySym* keysym_return,
1188 XComposeStatus* status_in_out ) ;
1190 ! 16.7 Determining the Appropriate Visual Type
1192 CONSTANT: VisualNoMask HEX: 0
1193 CONSTANT: VisualIDMask HEX: 1
1194 CONSTANT: VisualScreenMask HEX: 2
1195 CONSTANT: VisualDepthMask HEX: 4
1196 CONSTANT: VisualClassMask HEX: 8
1197 CONSTANT: VisualRedMaskMask HEX: 10
1198 CONSTANT: VisualGreenMaskMask HEX: 20
1199 CONSTANT: VisualBlueMaskMask HEX: 40
1200 CONSTANT: VisualColormapSizeMask HEX: 80
1201 CONSTANT: VisualBitsPerRGBMask HEX: 100
1202 CONSTANT: VisualAllMask HEX: 1FF
1206 { visualid VisualID }
1211 { green_mask ulong }
1213 { colormap_size int }
1214 { bits_per_rgb int } ;
1216 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1217 ! Appendix D - Compatibility Functions
1218 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1220 X-FUNCTION: Status XSetStandardProperties (
1228 XSizeHints* hints ) ;
1230 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1232 CONSTANT: XA_PRIMARY 1
1233 CONSTANT: XA_SECONDARY 2
1236 CONSTANT: XA_BITMAP 5
1237 CONSTANT: XA_CARDINAL 6
1238 CONSTANT: XA_COLORMAP 7
1239 CONSTANT: XA_CURSOR 8
1240 CONSTANT: XA_CUT_BUFFER0 9
1241 CONSTANT: XA_CUT_BUFFER1 10
1242 CONSTANT: XA_CUT_BUFFER2 11
1243 CONSTANT: XA_CUT_BUFFER3 12
1244 CONSTANT: XA_CUT_BUFFER4 13
1245 CONSTANT: XA_CUT_BUFFER5 14
1246 CONSTANT: XA_CUT_BUFFER6 15
1247 CONSTANT: XA_CUT_BUFFER7 16
1248 CONSTANT: XA_DRAWABLE 17
1249 CONSTANT: XA_FONT 18
1250 CONSTANT: XA_INTEGER 19
1251 CONSTANT: XA_PIXMAP 20
1252 CONSTANT: XA_POINT 21
1253 CONSTANT: XA_RECTANGLE 22
1254 CONSTANT: XA_RESOURCE_MANAGER 23
1255 CONSTANT: XA_RGB_COLOR_MAP 24
1256 CONSTANT: XA_RGB_BEST_MAP 25
1257 CONSTANT: XA_RGB_BLUE_MAP 26
1258 CONSTANT: XA_RGB_DEFAULT_MAP 27
1259 CONSTANT: XA_RGB_GRAY_MAP 28
1260 CONSTANT: XA_RGB_GREEN_MAP 29
1261 CONSTANT: XA_RGB_RED_MAP 30
1262 CONSTANT: XA_STRING 31
1263 CONSTANT: XA_VISUALID 32
1264 CONSTANT: XA_WINDOW 33
1265 CONSTANT: XA_WM_COMMAND 34
1266 CONSTANT: XA_WM_HINTS 35
1267 CONSTANT: XA_WM_CLIENT_MACHINE 36
1268 CONSTANT: XA_WM_ICON_NAME 37
1269 CONSTANT: XA_WM_ICON_SIZE 38
1270 CONSTANT: XA_WM_NAME 39
1271 CONSTANT: XA_WM_NORMAL_HINTS 40
1272 CONSTANT: XA_WM_SIZE_HINTS 41
1273 CONSTANT: XA_WM_ZOOM_HINTS 42
1274 CONSTANT: XA_MIN_SPACE 43
1275 CONSTANT: XA_NORM_SPACE 44
1276 CONSTANT: XA_MAX_SPACE 45
1277 CONSTANT: XA_END_SPACE 46
1278 CONSTANT: XA_SUPERSCRIPT_X 47
1279 CONSTANT: XA_SUPERSCRIPT_Y 48
1280 CONSTANT: XA_SUBSCRIPT_X 49
1281 CONSTANT: XA_SUBSCRIPT_Y 50
1282 CONSTANT: XA_UNDERLINE_POSITION 51
1283 CONSTANT: XA_UNDERLINE_THICKNESS 52
1284 CONSTANT: XA_STRIKEOUT_ASCENT 53
1285 CONSTANT: XA_STRIKEOUT_DESCENT 54
1286 CONSTANT: XA_ITALIC_ANGLE 55
1287 CONSTANT: XA_X_HEIGHT 56
1288 CONSTANT: XA_QUAD_WIDTH 57
1289 CONSTANT: XA_WEIGHT 58
1290 CONSTANT: XA_POINT_SIZE 59
1291 CONSTANT: XA_RESOLUTION 60
1292 CONSTANT: XA_COPYRIGHT 61
1293 CONSTANT: XA_NOTICE 62
1294 CONSTANT: XA_FONT_NAME 63
1295 CONSTANT: XA_FAMILY_NAME 64
1296 CONSTANT: XA_FULL_NAME 65
1297 CONSTANT: XA_CAP_HEIGHT 66
1298 CONSTANT: XA_WM_CLASS 67
1299 CONSTANT: XA_WM_TRANSIENT_FOR 68
1301 CONSTANT: XA_LAST_PREDEFINED 68
1303 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1304 ! The rest of the stuff is not from the book.
1305 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1307 X-FUNCTION: void XFree ( void* data ) ;
1308 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1309 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1310 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1314 CONSTANT: XIMPreeditArea HEX: 0001
1315 CONSTANT: XIMPreeditCallbacks HEX: 0002
1316 CONSTANT: XIMPreeditPosition HEX: 0004
1317 CONSTANT: XIMPreeditNothing HEX: 0008
1318 CONSTANT: XIMPreeditNone HEX: 0010
1319 CONSTANT: XIMStatusArea HEX: 0100
1320 CONSTANT: XIMStatusCallbacks HEX: 0200
1321 CONSTANT: XIMStatusNothing HEX: 0400
1322 CONSTANT: XIMStatusNone HEX: 0800
1324 CONSTANT: XNVaNestedList "XNVaNestedList"
1325 CONSTANT: XNQueryInputStyle "queryInputStyle"
1326 CONSTANT: XNClientWindow "clientWindow"
1327 CONSTANT: XNInputStyle "inputStyle"
1328 CONSTANT: XNFocusWindow "focusWindow"
1329 CONSTANT: XNResourceName "resourceName"
1330 CONSTANT: XNResourceClass "resourceClass"
1331 CONSTANT: XNGeometryCallback "geometryCallback"
1332 CONSTANT: XNDestroyCallback "destroyCallback"
1333 CONSTANT: XNFilterEvents "filterEvents"
1334 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1335 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1336 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1337 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1338 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1339 CONSTANT: XNPreeditAttributes "preeditAttributes"
1340 CONSTANT: XNStatusStartCallback "statusStartCallback"
1341 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1342 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1343 CONSTANT: XNStatusAttributes "statusAttributes"
1344 CONSTANT: XNArea "area"
1345 CONSTANT: XNAreaNeeded "areaNeeded"
1346 CONSTANT: XNSpotLocation "spotLocation"
1347 CONSTANT: XNColormap "colorMap"
1348 CONSTANT: XNStdColormap "stdColorMap"
1349 CONSTANT: XNForeground "foreground"
1350 CONSTANT: XNBackground "background"
1351 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1352 CONSTANT: XNFontSet "fontSet"
1353 CONSTANT: XNLineSpace "lineSpace"
1354 CONSTANT: XNCursor "cursor"
1356 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1357 CONSTANT: XNQueryICValuesList "queryICValuesList"
1358 CONSTANT: XNVisiblePosition "visiblePosition"
1359 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1360 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1361 CONSTANT: XNStringConversion "stringConversion"
1362 CONSTANT: XNResetState "resetState"
1363 CONSTANT: XNHotKey "hotKey"
1364 CONSTANT: XNHotKeyState "hotKeyState"
1365 CONSTANT: XNPreeditState "preeditState"
1366 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1368 CONSTANT: XBufferOverflow -1
1369 CONSTANT: XLookupNone 1
1370 CONSTANT: XLookupChars 2
1371 CONSTANT: XLookupKeySym 3
1372 CONSTANT: XLookupBoth 4
1374 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1376 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1378 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1380 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 ) ;
1382 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1384 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1386 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1388 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1390 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1392 ! !!! category of setlocale
1394 CONSTANT: LC_COLLATE 1
1395 CONSTANT: LC_CTYPE 2
1396 CONSTANT: LC_MONETARY 3
1397 CONSTANT: LC_NUMERIC 4
1400 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1402 X-FUNCTION: Bool XSupportsLocale ( ) ;
1404 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;