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 ) ;
288 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
289 ! 6 - Color Management Functions
290 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
300 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
301 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
302 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
304 ! 6.4 Creating, Copying, and Destroying Colormaps
306 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
308 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
309 ! 7 - Graphics Context Functions
310 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
312 : GCFunction ( -- n ) 0 2^ ; inline
313 : GCPlaneMask ( -- n ) 1 2^ ; inline
314 : GCForeground ( -- n ) 2 2^ ; inline
315 : GCBackground ( -- n ) 3 2^ ; inline
316 : GCLineWidth ( -- n ) 4 2^ ; inline
317 : GCLineStyle ( -- n ) 5 2^ ; inline
318 : GCCapStyle ( -- n ) 6 2^ ; inline
319 : GCJoinStyle ( -- n ) 7 2^ ; inline
320 : GCFillStyle ( -- n ) 8 2^ ; inline
321 : GCFillRule ( -- n ) 9 2^ ; inline
322 : GCTile ( -- n ) 10 2^ ; inline
323 : GCStipple ( -- n ) 11 2^ ; inline
324 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
325 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
326 : GCFont ( -- n ) 14 2^ ; inline
327 : GCSubwindowMode ( -- n ) 15 2^ ; inline
328 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
329 : GCClipXOrigin ( -- n ) 17 2^ ; inline
330 : GCClipYOrigin ( -- n ) 18 2^ ; inline
331 : GCClipMask ( -- n ) 19 2^ ; inline
332 : GCDashOffset ( -- n ) 20 2^ ; inline
333 : GCDashList ( -- n ) 21 2^ ; inline
334 : GCArcMode ( -- n ) 22 2^ ; inline
336 CONSTANT: GXclear HEX: 0
337 CONSTANT: GXand HEX: 1
338 CONSTANT: GXandReverse HEX: 2
339 CONSTANT: GXcopy HEX: 3
340 CONSTANT: GXandInverted HEX: 4
341 CONSTANT: GXnoop HEX: 5
342 CONSTANT: GXxor HEX: 6
343 CONSTANT: GXor HEX: 7
344 CONSTANT: GXnor HEX: 8
345 CONSTANT: GXequiv HEX: 9
346 CONSTANT: GXinvert HEX: a
347 CONSTANT: GXorReverse HEX: b
348 CONSTANT: GXcopyInverted HEX: c
349 CONSTANT: GXorInverted HEX: d
350 CONSTANT: GXnand HEX: e
351 CONSTANT: GXset HEX: f
370 { subwindow_mode int }
371 { graphics_exposures Bool }
372 { clip_x_origin int }
373 { clip_y_origin int }
378 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
379 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
380 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
381 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
382 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
383 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
384 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
386 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
388 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
390 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
391 ! 8 - Graphics Functions
392 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
394 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
395 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
396 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
397 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
398 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
408 { attributes ushort } ;
411 { ext_data XExtData* }
414 { min_char_or_byte2 uint }
415 { max_char_or_byte2 uint }
418 { all_chars_exist Bool }
419 { default_char uint }
421 { properties XFontProp* }
422 { min_bounds XCharStruct }
423 { max_bounds XCharStruct }
424 { per_char XCharStruct* }
428 X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ;
429 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
430 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ;
432 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ;
436 X-FUNCTION: Status XDrawString (
445 ! 8.7 - Transferring Images between Client and Server
447 CONSTANT: AllPlanes -1
450 { create_image void* }
451 { destroy_image void* }
455 { add_pixel void* } ;
465 { bitmap_bit_order int }
468 { bytes_per_line int }
469 { bits_per_pixel int }
476 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
477 X-FUNCTION: int XDestroyImage ( XImage* ximage ) ;
479 : XImage-size ( ximage -- size )
480 [ height>> ] [ bytes_per_line>> ] bi * ;
482 : XImage-pixels ( ximage -- byte-array )
483 [ data>> ] [ XImage-size ] bi memory>byte-array ;
486 ! 9 - Window and Session Manager Functions
489 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
490 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
491 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
492 X-FUNCTION: Status XGrabServer ( Display* display ) ;
493 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
494 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
496 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
498 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
502 : NoEventMask ( -- n ) 0 ; inline
503 : KeyPressMask ( -- n ) 0 2^ ; inline
504 : KeyReleaseMask ( -- n ) 1 2^ ; inline
505 : ButtonPressMask ( -- n ) 2 2^ ; inline
506 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
507 : EnterWindowMask ( -- n ) 4 2^ ; inline
508 : LeaveWindowMask ( -- n ) 5 2^ ; inline
509 : PointerMotionMask ( -- n ) 6 2^ ; inline
510 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
511 : Button1MotionMask ( -- n ) 8 2^ ; inline
512 : Button2MotionMask ( -- n ) 9 2^ ; inline
513 : Button3MotionMask ( -- n ) 10 2^ ; inline
514 : Button4MotionMask ( -- n ) 11 2^ ; inline
515 : Button5MotionMask ( -- n ) 12 2^ ; inline
516 : ButtonMotionMask ( -- n ) 13 2^ ; inline
517 : KeymapStateMask ( -- n ) 14 2^ ; inline
518 : ExposureMask ( -- n ) 15 2^ ; inline
519 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
520 : StructureNotifyMask ( -- n ) 17 2^ ; inline
521 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
522 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
523 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
524 : FocusChangeMask ( -- n ) 21 2^ ; inline
525 : PropertyChangeMask ( -- n ) 22 2^ ; inline
526 : ColormapChangeMask ( -- n ) 23 2^ ; inline
527 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
530 CONSTANT: KeyRelease 3
531 CONSTANT: ButtonPress 4
532 CONSTANT: ButtonRelease 5
533 CONSTANT: MotionNotify 6
534 CONSTANT: EnterNotify 7
535 CONSTANT: LeaveNotify 8
537 CONSTANT: FocusOut 10
538 CONSTANT: KeymapNotify 11
540 CONSTANT: GraphicsExpose 13
541 CONSTANT: NoExpose 14
542 CONSTANT: VisibilityNotify 15
543 CONSTANT: CreateNotify 16
544 CONSTANT: DestroyNotify 17
545 CONSTANT: UnmapNotify 18
546 CONSTANT: MapNotify 19
547 CONSTANT: MapRequest 20
548 CONSTANT: ReparentNotify 21
549 CONSTANT: ConfigureNotify 22
550 CONSTANT: ConfigureRequest 23
551 CONSTANT: GravityNotify 24
552 CONSTANT: ResizeRequest 25
553 CONSTANT: CirculateNotify 26
554 CONSTANT: CirculateRequest 27
555 CONSTANT: PropertyNotify 28
556 CONSTANT: SelectionClear 29
557 CONSTANT: SelectionRequest 30
558 CONSTANT: SelectionNotify 31
559 CONSTANT: ColormapNotify 32
560 CONSTANT: ClientMessage 33
561 CONSTANT: MappingNotify 34
562 CONSTANT: LASTEvent 35
571 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
573 ! 10.5 Keyboard and Pointer Events
581 : Button1Mask ( -- n ) 1 8 shift ; inline
582 : Button2Mask ( -- n ) 1 9 shift ; inline
583 : Button3Mask ( -- n ) 1 10 shift ; inline
584 : Button4Mask ( -- n ) 1 11 shift ; inline
585 : Button5Mask ( -- n ) 1 12 shift ; inline
587 : ShiftMask ( -- n ) 1 0 shift ; inline
588 : LockMask ( -- n ) 1 1 shift ; inline
589 : ControlMask ( -- n ) 1 2 shift ; inline
590 : Mod1Mask ( -- n ) 1 3 shift ; inline
591 : Mod2Mask ( -- n ) 1 4 shift ; inline
592 : Mod3Mask ( -- n ) 1 5 shift ; inline
593 : Mod4Mask ( -- n ) 1 6 shift ; inline
594 : Mod5Mask ( -- n ) 1 7 shift ; inline
611 { same_screen Bool } ;
613 TYPEDEF: XButtonEvent XButtonPressedEvent
614 TYPEDEF: XButtonEvent XButtonReleasedEvent
617 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
634 { same_screen Bool } ;
636 TYPEDEF: XKeyEvent XKeyPressedEvent
637 TYPEDEF: XKeyEvent XKeyReleasedEvent
639 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
656 { same_screen Bool } ;
658 TYPEDEF: XMotionEvent XPointerMovedEvent
660 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
662 STRUCT: XCrossingEvent
681 TYPEDEF: XCrossingEvent XEnterWindowEvent
682 TYPEDEF: XCrossingEvent XLeaveWindowEvent
684 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
686 STRUCT: XFocusChangeEvent
695 TYPEDEF: XFocusChangeEvent XFocusInEvent
696 TYPEDEF: XFocusChangeEvent XFocusOutEvent
698 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
712 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
714 STRUCT: XGraphicsExposeEvent
719 { drawable Drawable }
728 STRUCT: XNoExposeEvent
733 { drawable Drawable }
737 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
739 STRUCT: XVisibilityEvent
747 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
749 STRUCT: XCreateWindowEvent
761 { override_redirect Bool } ;
763 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
765 STRUCT: XDestroyWindowEvent
773 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
782 { from_configure Bool } ;
784 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
793 { override_redirect Bool } ;
795 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
797 STRUCT: XMapRequestEvent
805 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
807 STRUCT: XReparentEvent
817 { override_redirect Bool } ;
819 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
821 STRUCT: XConfigureEvent
834 { override_redirect Bool } ;
836 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
838 STRUCT: XGravityEvent
848 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
850 STRUCT: XResizeRequestEvent
859 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
861 STRUCT: XConfigureRequestEvent
875 { value_mask ulong } ;
877 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
879 STRUCT: XCirculateEvent
888 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
890 STRUCT: XCirculateRequestEvent
899 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
901 STRUCT: XPropertyEvent
911 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
913 STRUCT: XSelectionClearEvent
922 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
924 STRUCT: XSelectionRequestEvent
936 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
938 STRUCT: XSelectionEvent
949 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
951 STRUCT: XColormapEvent
957 { colormap Colormap }
961 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
963 STRUCT: XClientMessageEvent
969 { message_type Atom }
977 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
979 STRUCT: XMappingEvent
986 { first_keycode int }
989 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
997 { request_code uchar }
998 { minor_code uchar } ;
1000 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1002 STRUCT: XKeymapEvent
1006 { display Display* }
1017 UNION-STRUCT: XEvent
1019 { XAnyEvent XAnyEvent }
1020 { XKeyEvent XKeyEvent }
1021 { XButtonEvent XButtonEvent }
1022 { XMotionEvent XMotionEvent }
1023 { XCrossingEvent XCrossingEvent }
1024 { XFocusChangeEvent XFocusChangeEvent }
1025 { XExposeEvent XExposeEvent }
1026 { XGraphicsExposeEvent XGraphicsExposeEvent }
1027 { XNoExposeEvent XNoExposeEvent }
1028 { XVisibilityEvent XVisibilityEvent }
1029 { XCreateWindowEvent XCreateWindowEvent }
1030 { XDestroyWindowEvent XDestroyWindowEvent }
1031 { XUnmapEvent XUnmapEvent }
1032 { XMapEvent XMapEvent }
1033 { XMapRequestEvent XMapRequestEvent }
1034 { XReparentEvent XReparentEvent }
1035 { XConfigureEvent XConfigureEvent }
1036 { XGravityEvent XGravityEvent }
1037 { XResizeRequestEvent XResizeRequestEvent }
1038 { XConfigureRequestEvent XConfigureRequestEvent }
1039 { XCirculateEvent XCirculateEvent }
1040 { XCirculateRequestEvent XCirculateRequestEvent }
1041 { XPropertyEvent XPropertyEvent }
1042 { XSelectionClearEvent XSelectionClearEvent }
1043 { XSelectionRequestEvent XSelectionRequestEvent }
1044 { XSelectionEvent XSelectionEvent }
1045 { XColormapEvent XColormapEvent }
1046 { XClientMessageEvent XClientMessageEvent }
1047 { XMappingEvent XMappingEvent }
1048 { XErrorEvent XErrorEvent }
1049 { XKeymapEvent XKeymapEvent }
1050 { padding long[24] } ;
1052 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1053 ! 11 - Event Handling Functions
1054 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1056 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1057 X-FUNCTION: Status XFlush ( Display* display ) ;
1058 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1059 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1060 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1062 ! 11.3 - Event Queue Management
1064 CONSTANT: QueuedAlready 0
1065 CONSTANT: QueuedAfterReading 1
1066 CONSTANT: QueuedAfterFlush 2
1068 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1069 X-FUNCTION: int XPending ( Display* display ) ;
1071 ! 11.6 - Sending Events to Other Applications
1073 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1075 ! 11.8 - Handling Protocol Errors
1077 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1079 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1080 ! 12 - Input Device Functions
1081 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1085 X-FUNCTION: int XGrabPointer (
1096 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1097 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1098 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1099 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1101 X-FUNCTION: Status XGetInputFocus ( Display* display,
1102 Window* focus_return,
1103 int* revert_to_return ) ;
1105 X-FUNCTION: Status XWarpPointer ( Display* display, Window src_w, Window dest_w, int src_x, int src_y, uint src_width, uint src_height, int dest_x, int dest_y ) ;
1107 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1108 ! 14 - Inter-Client Communication Functions
1109 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1111 ! 14.1 Client to Window Manager Communication
1113 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1114 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1116 ! 14.1.1. Manipulating Top-Level Windows
1118 X-FUNCTION: Status XIconifyWindow (
1119 Display* display, Window w, int screen_number ) ;
1121 X-FUNCTION: Status XWithdrawWindow (
1122 Display* display, Window w, int screen_number ) ;
1124 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1126 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1128 : USPosition ( -- n ) 0 2^ ; inline
1129 : USSize ( -- n ) 1 2^ ; inline
1130 : PPosition ( -- n ) 2 2^ ; inline
1131 : PSize ( -- n ) 3 2^ ; inline
1132 : PMinSize ( -- n ) 4 2^ ; inline
1133 : PMaxSize ( -- n ) 5 2^ ; inline
1134 : PResizeInc ( -- n ) 6 2^ ; inline
1135 : PAspect ( -- n ) 7 2^ ; inline
1136 : PBaseSize ( -- n ) 8 2^ ; inline
1137 : PWinGravity ( -- n ) 9 2^ ; inline
1138 : PAllHints ( -- n )
1139 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1153 { min_aspect_x int }
1154 { min_aspect_y int }
1155 { max_aspect_x int }
1156 { max_aspect_y int }
1159 { win_gravity int } ;
1161 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1163 X-FUNCTION: Status XSetWMProtocols (
1164 Display* display, Window w, Atom* protocols, int count ) ;
1166 X-FUNCTION: Status XGetWMProtocols (
1169 Atom** protocols_return,
1170 int* count_return ) ;
1172 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1173 ! 16 - Application Utility Functions
1174 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1176 ! 16.1 Keyboard Utility Functions
1178 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1180 X-FUNCTION: int XLookupString (
1181 XKeyEvent* event_struct,
1182 void* buffer_return,
1184 KeySym* keysym_return,
1185 XComposeStatus* status_in_out ) ;
1187 ! 16.7 Determining the Appropriate Visual Type
1189 CONSTANT: VisualNoMask HEX: 0
1190 CONSTANT: VisualIDMask HEX: 1
1191 CONSTANT: VisualScreenMask HEX: 2
1192 CONSTANT: VisualDepthMask HEX: 4
1193 CONSTANT: VisualClassMask HEX: 8
1194 CONSTANT: VisualRedMaskMask HEX: 10
1195 CONSTANT: VisualGreenMaskMask HEX: 20
1196 CONSTANT: VisualBlueMaskMask HEX: 40
1197 CONSTANT: VisualColormapSizeMask HEX: 80
1198 CONSTANT: VisualBitsPerRGBMask HEX: 100
1199 CONSTANT: VisualAllMask HEX: 1FF
1203 { visualid VisualID }
1208 { green_mask ulong }
1210 { colormap_size int }
1211 { bits_per_rgb int } ;
1213 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1214 ! Appendix D - Compatibility Functions
1215 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1217 X-FUNCTION: Status XSetStandardProperties (
1225 XSizeHints* hints ) ;
1227 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1229 CONSTANT: XA_PRIMARY 1
1230 CONSTANT: XA_SECONDARY 2
1233 CONSTANT: XA_BITMAP 5
1234 CONSTANT: XA_CARDINAL 6
1235 CONSTANT: XA_COLORMAP 7
1236 CONSTANT: XA_CURSOR 8
1237 CONSTANT: XA_CUT_BUFFER0 9
1238 CONSTANT: XA_CUT_BUFFER1 10
1239 CONSTANT: XA_CUT_BUFFER2 11
1240 CONSTANT: XA_CUT_BUFFER3 12
1241 CONSTANT: XA_CUT_BUFFER4 13
1242 CONSTANT: XA_CUT_BUFFER5 14
1243 CONSTANT: XA_CUT_BUFFER6 15
1244 CONSTANT: XA_CUT_BUFFER7 16
1245 CONSTANT: XA_DRAWABLE 17
1246 CONSTANT: XA_FONT 18
1247 CONSTANT: XA_INTEGER 19
1248 CONSTANT: XA_PIXMAP 20
1249 CONSTANT: XA_POINT 21
1250 CONSTANT: XA_RECTANGLE 22
1251 CONSTANT: XA_RESOURCE_MANAGER 23
1252 CONSTANT: XA_RGB_COLOR_MAP 24
1253 CONSTANT: XA_RGB_BEST_MAP 25
1254 CONSTANT: XA_RGB_BLUE_MAP 26
1255 CONSTANT: XA_RGB_DEFAULT_MAP 27
1256 CONSTANT: XA_RGB_GRAY_MAP 28
1257 CONSTANT: XA_RGB_GREEN_MAP 29
1258 CONSTANT: XA_RGB_RED_MAP 30
1259 CONSTANT: XA_STRING 31
1260 CONSTANT: XA_VISUALID 32
1261 CONSTANT: XA_WINDOW 33
1262 CONSTANT: XA_WM_COMMAND 34
1263 CONSTANT: XA_WM_HINTS 35
1264 CONSTANT: XA_WM_CLIENT_MACHINE 36
1265 CONSTANT: XA_WM_ICON_NAME 37
1266 CONSTANT: XA_WM_ICON_SIZE 38
1267 CONSTANT: XA_WM_NAME 39
1268 CONSTANT: XA_WM_NORMAL_HINTS 40
1269 CONSTANT: XA_WM_SIZE_HINTS 41
1270 CONSTANT: XA_WM_ZOOM_HINTS 42
1271 CONSTANT: XA_MIN_SPACE 43
1272 CONSTANT: XA_NORM_SPACE 44
1273 CONSTANT: XA_MAX_SPACE 45
1274 CONSTANT: XA_END_SPACE 46
1275 CONSTANT: XA_SUPERSCRIPT_X 47
1276 CONSTANT: XA_SUPERSCRIPT_Y 48
1277 CONSTANT: XA_SUBSCRIPT_X 49
1278 CONSTANT: XA_SUBSCRIPT_Y 50
1279 CONSTANT: XA_UNDERLINE_POSITION 51
1280 CONSTANT: XA_UNDERLINE_THICKNESS 52
1281 CONSTANT: XA_STRIKEOUT_ASCENT 53
1282 CONSTANT: XA_STRIKEOUT_DESCENT 54
1283 CONSTANT: XA_ITALIC_ANGLE 55
1284 CONSTANT: XA_X_HEIGHT 56
1285 CONSTANT: XA_QUAD_WIDTH 57
1286 CONSTANT: XA_WEIGHT 58
1287 CONSTANT: XA_POINT_SIZE 59
1288 CONSTANT: XA_RESOLUTION 60
1289 CONSTANT: XA_COPYRIGHT 61
1290 CONSTANT: XA_NOTICE 62
1291 CONSTANT: XA_FONT_NAME 63
1292 CONSTANT: XA_FAMILY_NAME 64
1293 CONSTANT: XA_FULL_NAME 65
1294 CONSTANT: XA_CAP_HEIGHT 66
1295 CONSTANT: XA_WM_CLASS 67
1296 CONSTANT: XA_WM_TRANSIENT_FOR 68
1298 CONSTANT: XA_LAST_PREDEFINED 68
1300 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1301 ! The rest of the stuff is not from the book.
1302 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1304 X-FUNCTION: void XFree ( void* data ) ;
1305 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1306 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1307 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1311 CONSTANT: XIMPreeditArea HEX: 0001
1312 CONSTANT: XIMPreeditCallbacks HEX: 0002
1313 CONSTANT: XIMPreeditPosition HEX: 0004
1314 CONSTANT: XIMPreeditNothing HEX: 0008
1315 CONSTANT: XIMPreeditNone HEX: 0010
1316 CONSTANT: XIMStatusArea HEX: 0100
1317 CONSTANT: XIMStatusCallbacks HEX: 0200
1318 CONSTANT: XIMStatusNothing HEX: 0400
1319 CONSTANT: XIMStatusNone HEX: 0800
1321 CONSTANT: XNVaNestedList "XNVaNestedList"
1322 CONSTANT: XNQueryInputStyle "queryInputStyle"
1323 CONSTANT: XNClientWindow "clientWindow"
1324 CONSTANT: XNInputStyle "inputStyle"
1325 CONSTANT: XNFocusWindow "focusWindow"
1326 CONSTANT: XNResourceName "resourceName"
1327 CONSTANT: XNResourceClass "resourceClass"
1328 CONSTANT: XNGeometryCallback "geometryCallback"
1329 CONSTANT: XNDestroyCallback "destroyCallback"
1330 CONSTANT: XNFilterEvents "filterEvents"
1331 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1332 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1333 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1334 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1335 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1336 CONSTANT: XNPreeditAttributes "preeditAttributes"
1337 CONSTANT: XNStatusStartCallback "statusStartCallback"
1338 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1339 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1340 CONSTANT: XNStatusAttributes "statusAttributes"
1341 CONSTANT: XNArea "area"
1342 CONSTANT: XNAreaNeeded "areaNeeded"
1343 CONSTANT: XNSpotLocation "spotLocation"
1344 CONSTANT: XNColormap "colorMap"
1345 CONSTANT: XNStdColormap "stdColorMap"
1346 CONSTANT: XNForeground "foreground"
1347 CONSTANT: XNBackground "background"
1348 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1349 CONSTANT: XNFontSet "fontSet"
1350 CONSTANT: XNLineSpace "lineSpace"
1351 CONSTANT: XNCursor "cursor"
1353 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1354 CONSTANT: XNQueryICValuesList "queryICValuesList"
1355 CONSTANT: XNVisiblePosition "visiblePosition"
1356 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1357 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1358 CONSTANT: XNStringConversion "stringConversion"
1359 CONSTANT: XNResetState "resetState"
1360 CONSTANT: XNHotKey "hotKey"
1361 CONSTANT: XNHotKeyState "hotKeyState"
1362 CONSTANT: XNPreeditState "preeditState"
1363 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1365 CONSTANT: XBufferOverflow -1
1366 CONSTANT: XLookupNone 1
1367 CONSTANT: XLookupChars 2
1368 CONSTANT: XLookupKeySym 3
1369 CONSTANT: XLookupBoth 4
1371 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1373 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1375 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1377 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 ) ;
1379 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1381 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1383 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1385 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1387 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1389 ! !!! category of setlocale
1391 CONSTANT: LC_COLLATE 1
1392 CONSTANT: LC_CTYPE 2
1393 CONSTANT: LC_MONETARY 3
1394 CONSTANT: LC_NUMERIC 4
1397 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1399 X-FUNCTION: Bool XSupportsLocale ( ) ;
1401 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;