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.strings
14 alien.syntax classes.struct math math.bitwise words sequences
15 namespaces continuations io io.encodings.ascii x11.syntax ;
32 TYPEDEF: char* XPointer
33 TYPEDEF: void* Screen*
35 TYPEDEF: void* Visual*
36 TYPEDEF: void* XExtData*
37 TYPEDEF: void* XFontProp*
38 TYPEDEF: void* XComposeStatus*
46 TYPEDEF: ulong VisualID
49 TYPEDEF: void* Window**
54 ALIAS: <Drawable> <XID>
64 ! 2 - Display Functions
67 ! This struct is incomplete
73 X-FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
75 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
77 X-FUNCTION: ulong XBlackPixel ( Display* display, int screen_number ) ;
78 X-FUNCTION: ulong XWhitePixel ( Display* display, int screen_number ) ;
79 X-FUNCTION: Colormap XDefaultColormap ( Display* display, int screen_number ) ;
80 X-FUNCTION: int XDefaultDepth ( Display* display, int screen_number ) ;
81 X-FUNCTION: GC XDefaultGC ( Display* display, int screen_number ) ;
82 X-FUNCTION: int XDefaultScreen ( Display* display ) ;
83 X-FUNCTION: Window XRootWindow ( Display* display, int screen_number ) ;
84 X-FUNCTION: Window XDefaultRootWindow ( Display* display ) ;
85 X-FUNCTION: int XProtocolVersion ( Display* display ) ;
86 X-FUNCTION: int XProtocolRevision ( Display* display ) ;
87 X-FUNCTION: int XQLength ( Display* display ) ;
88 X-FUNCTION: int XScreenCount ( Display* display ) ;
89 X-FUNCTION: int XConnectionNumber ( Display* display ) ;
91 ! 2.5 Closing the Display
92 X-FUNCTION: int XCloseDisplay ( Display* display ) ;
95 ! 3 - Window Functions
98 ! 3.2 - Window Attributes
100 : CWBackPixmap ( -- n ) 0 2^ ; inline
101 : CWBackPixel ( -- n ) 1 2^ ; inline
102 : CWBorderPixmap ( -- n ) 2 2^ ; inline
103 : CWBorderPixel ( -- n ) 3 2^ ; inline
104 : CWBitGravity ( -- n ) 4 2^ ; inline
105 : CWWinGravity ( -- n ) 5 2^ ; inline
106 : CWBackingStore ( -- n ) 6 2^ ; inline
107 : CWBackingPlanes ( -- n ) 7 2^ ; inline
108 : CWBackingPixel ( -- n ) 8 2^ ; inline
109 : CWOverrideRedirect ( -- n ) 9 2^ ; inline
110 : CWSaveUnder ( -- n ) 10 2^ ; inline
111 : CWEventMask ( -- n ) 11 2^ ; inline
112 : CWDontPropagate ( -- n ) 12 2^ ; inline
113 : CWColormap ( -- n ) 13 2^ ; inline
114 : CWCursor ( -- n ) 14 2^ ; inline
116 STRUCT: XSetWindowAttributes
117 { background_pixmap Pixmap }
118 { background_pixel ulong }
119 { border_pixmap Pixmap }
120 { border_pixel ulong }
123 { backing_store int }
124 { backing_planes ulong }
125 { backing_pixel ulong }
128 { do_not_propagate_mask long }
129 { override_redirect Bool }
130 { colormap Colormap }
133 CONSTANT: UnmapGravity 0
135 CONSTANT: ForgetGravity 0
136 CONSTANT: NorthWestGravity 1
137 CONSTANT: NorthGravity 2
138 CONSTANT: NorthEastGravity 3
139 CONSTANT: WestGravity 4
140 CONSTANT: CenterGravity 5
141 CONSTANT: EastGravity 6
142 CONSTANT: SouthWestGravity 7
143 CONSTANT: SouthGravity 8
144 CONSTANT: SouthEastGravity 9
145 CONSTANT: StaticGravity 10
147 ! 3.3 - Creating Windows
149 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 ) ;
150 X-FUNCTION: Window XCreateSimpleWindow ( Display* display, Window parent, int x, int y, uint width, uint height, uint border_width, ulong border, ulong background ) ;
151 X-FUNCTION: Status XDestroyWindow ( Display* display, Window w ) ;
152 X-FUNCTION: Status XMapWindow ( Display* display, Window window ) ;
153 X-FUNCTION: Status XMapSubwindows ( Display* display, Window window ) ;
154 X-FUNCTION: Status XUnmapWindow ( Display* display, Window w ) ;
155 X-FUNCTION: Status XUnmapSubwindows ( Display* display, Window w ) ;
157 ! 3.5 Mapping Windows
159 X-FUNCTION: int XMapRaised ( Display* display, Window w ) ;
161 ! 3.7 - Configuring Windows
163 : CWX ( -- n ) 0 2^ ; inline
164 : CWY ( -- n ) 1 2^ ; inline
165 : CWWidth ( -- n ) 2 2^ ; inline
166 : CWHeight ( -- n ) 3 2^ ; inline
167 : CWBorderWidth ( -- n ) 4 2^ ; inline
168 : CWSibling ( -- n ) 5 2^ ; inline
169 : CWStackMode ( -- n ) 6 2^ ; inline
171 STRUCT: XWindowChanges
180 X-FUNCTION: Status XConfigureWindow ( Display* display, Window w, uint value_mask, XWindowChanges* values ) ;
181 X-FUNCTION: Status XMoveWindow ( Display* display, Window w, int x, int y ) ;
182 X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height ) ;
183 X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width ) ;
186 ! 3.8 Changing Window Stacking Order
188 X-FUNCTION: Status XRaiseWindow ( Display* display, Window w ) ;
189 X-FUNCTION: Status XLowerWindow ( Display* display, Window w ) ;
191 ! 3.9 - Changing Window Attributes
193 X-FUNCTION: Status XChangeWindowAttributes (
194 Display* display, Window w, ulong valuemask, XSetWindowAttributes* attr ) ;
195 X-FUNCTION: Status XSetWindowBackground (
196 Display* display, Window w, ulong background_pixel ) ;
197 X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor ) ;
198 X-FUNCTION: Status XUndefineCursor ( Display* display, Window w ) ;
200 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
201 ! 4 - Window Information Functions
202 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
204 ! 4.1 - Obtaining Window Information
206 X-FUNCTION: Status XQueryTree (
210 Window* parent_return,
211 Window** children_return, uint* nchildren_return ) ;
213 STRUCT: XWindowAttributes
225 { backing_store int }
226 { backing_planes ulong }
227 { backing_pixel ulong }
229 { colormap Colormap }
230 { map_installed Bool }
232 { all_event_masks long }
233 { your_event_mask long }
234 { do_not_propagate_mask long }
235 { override_redirect Bool }
238 X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr ) ;
240 CONSTANT: IsUnmapped 0
241 CONSTANT: IsUnviewable 1
242 CONSTANT: IsViewable 2
244 X-FUNCTION: Status XGetGeometry (
252 uint* border_width_return,
253 uint* depth_return ) ;
255 ! 4.2 - Translating Screen Coordinates
257 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 ) ;
259 ! 4.3 - Properties and Atoms
261 X-FUNCTION: Atom XInternAtom ( Display* display, char* atom_name, Bool only_if_exists ) ;
263 X-FUNCTION: char* XGetAtomName ( Display* display, Atom atom ) ;
265 ! 4.4 - Obtaining and Changing Window Properties
267 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 ) ;
269 X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ;
273 X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time ) ;
275 X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection ) ;
277 X-FUNCTION: int XConvertSelection ( Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time ) ;
280 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
281 ! 5 - Pixmap and Cursor Functions
282 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
284 ! 5.1 - Creating and Freeing Pixmaps
286 X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth ) ;
287 X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap ) ;
290 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
291 ! 6 - Color Management Functions
292 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
302 X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ;
303 X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ;
304 X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ;
306 ! 6.4 Creating, Copying, and Destroying Colormaps
308 X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, int alloc ) ;
310 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
311 ! 7 - Graphics Context Functions
312 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
314 : GCFunction ( -- n ) 0 2^ ; inline
315 : GCPlaneMask ( -- n ) 1 2^ ; inline
316 : GCForeground ( -- n ) 2 2^ ; inline
317 : GCBackground ( -- n ) 3 2^ ; inline
318 : GCLineWidth ( -- n ) 4 2^ ; inline
319 : GCLineStyle ( -- n ) 5 2^ ; inline
320 : GCCapStyle ( -- n ) 6 2^ ; inline
321 : GCJoinStyle ( -- n ) 7 2^ ; inline
322 : GCFillStyle ( -- n ) 8 2^ ; inline
323 : GCFillRule ( -- n ) 9 2^ ; inline
324 : GCTile ( -- n ) 10 2^ ; inline
325 : GCStipple ( -- n ) 11 2^ ; inline
326 : GCTileStipXOrigin ( -- n ) 12 2^ ; inline
327 : GCTileStipYOrigin ( -- n ) 13 2^ ; inline
328 : GCFont ( -- n ) 14 2^ ; inline
329 : GCSubwindowMode ( -- n ) 15 2^ ; inline
330 : GCGraphicsExposures ( -- n ) 16 2^ ; inline
331 : GCClipXOrigin ( -- n ) 17 2^ ; inline
332 : GCClipYOrigin ( -- n ) 18 2^ ; inline
333 : GCClipMask ( -- n ) 19 2^ ; inline
334 : GCDashOffset ( -- n ) 20 2^ ; inline
335 : GCDashList ( -- n ) 21 2^ ; inline
336 : GCArcMode ( -- n ) 22 2^ ; inline
338 CONSTANT: GXclear HEX: 0
339 CONSTANT: GXand HEX: 1
340 CONSTANT: GXandReverse HEX: 2
341 CONSTANT: GXcopy HEX: 3
342 CONSTANT: GXandInverted HEX: 4
343 CONSTANT: GXnoop HEX: 5
344 CONSTANT: GXxor HEX: 6
345 CONSTANT: GXor HEX: 7
346 CONSTANT: GXnor HEX: 8
347 CONSTANT: GXequiv HEX: 9
348 CONSTANT: GXinvert HEX: a
349 CONSTANT: GXorReverse HEX: b
350 CONSTANT: GXcopyInverted HEX: c
351 CONSTANT: GXorInverted HEX: d
352 CONSTANT: GXnand HEX: e
353 CONSTANT: GXset HEX: f
372 { subwindow_mode int }
373 { graphics_exposures Bool }
374 { clip_x_origin int }
375 { clip_y_origin int }
380 X-FUNCTION: GC XCreateGC ( Display* display, Window d, ulong valuemask, XGCValues* values ) ;
381 X-FUNCTION: int XChangeGC ( Display* display, GC gc, ulong valuemask, XGCValues* values ) ;
382 X-FUNCTION: Status XGetGCValues ( Display* display, GC gc, ulong valuemask, XGCValues* values_return ) ;
383 X-FUNCTION: Status XSetForeground ( Display* display, GC gc, ulong foreground ) ;
384 X-FUNCTION: Status XSetBackground ( Display* display, GC gc, ulong background ) ;
385 X-FUNCTION: Status XSetFunction ( Display* display, GC gc, int function ) ;
386 X-FUNCTION: Status XSetSubwindowMode ( Display* display, GC gc, int subwindow_mode ) ;
388 X-FUNCTION: GContext XGContextFromGC ( GC gc ) ;
390 X-FUNCTION: Status XSetFont ( Display* display, GC gc, Font font ) ;
392 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
393 ! 8 - Graphics Functions
394 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
396 X-FUNCTION: Status XClearWindow ( Display* display, Window w ) ;
397 X-FUNCTION: Status XDrawPoint ( Display* display, Drawable d, GC gc, int x, int y ) ;
398 X-FUNCTION: Status XDrawLine ( Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2 ) ;
399 X-FUNCTION: Status XDrawArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
400 X-FUNCTION: Status XFillArc ( Display* display, Drawable d, GC gc, int x, int y, uint width, uint height, int angle1, int angle2 ) ;
410 { attributes ushort } ;
412 X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ;
413 X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ;
414 X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ;
417 { ext_data XExtData* }
420 { min_char_or_byte2 uint }
421 { max_char_or_byte2 uint }
424 { all_chars_exist Bool }
425 { default_char uint }
427 { properties XFontProp* }
428 { min_bounds XCharStruct }
429 { max_bounds XCharStruct }
430 { per_char XCharStruct* }
434 X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ;
438 X-FUNCTION: Status XDrawString (
447 ! 8.7 - Transferring Images between Client and Server
449 CONSTANT: AllPlanes -1
452 { create_image void* }
453 { destroy_image void* }
457 { add_pixel void* } ;
467 { bitmap_bit_order int }
470 { bytes_per_line int }
471 { bits_per_pixel int }
478 X-FUNCTION: XImage* XGetImage ( Display* display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format ) ;
479 X-FUNCTION: int XDestroyImage ( XImage* ximage ) ;
481 : XImage-size ( ximage -- size )
482 [ height>> ] [ bytes_per_line>> ] bi * ;
484 : XImage-pixels ( ximage -- byte-array )
485 [ data>> ] [ XImage-size ] bi memory>byte-array ;
488 ! 9 - Window and Session Manager Functions
491 X-FUNCTION: Status XReparentWindow ( Display* display, Window w, Window parent, int x, int y ) ;
492 X-FUNCTION: Status XAddToSaveSet ( Display* display, Window w ) ;
493 X-FUNCTION: Status XRemoveFromSaveSet ( Display* display, Window w ) ;
494 X-FUNCTION: Status XGrabServer ( Display* display ) ;
495 X-FUNCTION: Status XUngrabServer ( Display* display ) ;
496 X-FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
498 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
500 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
504 : NoEventMask ( -- n ) 0 ; inline
505 : KeyPressMask ( -- n ) 0 2^ ; inline
506 : KeyReleaseMask ( -- n ) 1 2^ ; inline
507 : ButtonPressMask ( -- n ) 2 2^ ; inline
508 : ButtonReleaseMask ( -- n ) 3 2^ ; inline
509 : EnterWindowMask ( -- n ) 4 2^ ; inline
510 : LeaveWindowMask ( -- n ) 5 2^ ; inline
511 : PointerMotionMask ( -- n ) 6 2^ ; inline
512 : PointerMotionHintMask ( -- n ) 7 2^ ; inline
513 : Button1MotionMask ( -- n ) 8 2^ ; inline
514 : Button2MotionMask ( -- n ) 9 2^ ; inline
515 : Button3MotionMask ( -- n ) 10 2^ ; inline
516 : Button4MotionMask ( -- n ) 11 2^ ; inline
517 : Button5MotionMask ( -- n ) 12 2^ ; inline
518 : ButtonMotionMask ( -- n ) 13 2^ ; inline
519 : KeymapStateMask ( -- n ) 14 2^ ; inline
520 : ExposureMask ( -- n ) 15 2^ ; inline
521 : VisibilityChangeMask ( -- n ) 16 2^ ; inline
522 : StructureNotifyMask ( -- n ) 17 2^ ; inline
523 : ResizeRedirectMask ( -- n ) 18 2^ ; inline
524 : SubstructureNotifyMask ( -- n ) 19 2^ ; inline
525 : SubstructureRedirectMask ( -- n ) 20 2^ ; inline
526 : FocusChangeMask ( -- n ) 21 2^ ; inline
527 : PropertyChangeMask ( -- n ) 22 2^ ; inline
528 : ColormapChangeMask ( -- n ) 23 2^ ; inline
529 : OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
532 CONSTANT: KeyRelease 3
533 CONSTANT: ButtonPress 4
534 CONSTANT: ButtonRelease 5
535 CONSTANT: MotionNotify 6
536 CONSTANT: EnterNotify 7
537 CONSTANT: LeaveNotify 8
539 CONSTANT: FocusOut 10
540 CONSTANT: KeymapNotify 11
542 CONSTANT: GraphicsExpose 13
543 CONSTANT: NoExpose 14
544 CONSTANT: VisibilityNotify 15
545 CONSTANT: CreateNotify 16
546 CONSTANT: DestroyNotify 17
547 CONSTANT: UnmapNotify 18
548 CONSTANT: MapNotify 19
549 CONSTANT: MapRequest 20
550 CONSTANT: ReparentNotify 21
551 CONSTANT: ConfigureNotify 22
552 CONSTANT: ConfigureRequest 23
553 CONSTANT: GravityNotify 24
554 CONSTANT: ResizeRequest 25
555 CONSTANT: CirculateNotify 26
556 CONSTANT: CirculateRequest 27
557 CONSTANT: PropertyNotify 28
558 CONSTANT: SelectionClear 29
559 CONSTANT: SelectionRequest 30
560 CONSTANT: SelectionNotify 31
561 CONSTANT: ColormapNotify 32
562 CONSTANT: ClientMessage 33
563 CONSTANT: MappingNotify 34
564 CONSTANT: LASTEvent 35
573 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
575 ! 10.5 Keyboard and Pointer Events
583 : Button1Mask ( -- n ) 1 8 shift ; inline
584 : Button2Mask ( -- n ) 1 9 shift ; inline
585 : Button3Mask ( -- n ) 1 10 shift ; inline
586 : Button4Mask ( -- n ) 1 11 shift ; inline
587 : Button5Mask ( -- n ) 1 12 shift ; inline
589 : ShiftMask ( -- n ) 1 0 shift ; inline
590 : LockMask ( -- n ) 1 1 shift ; inline
591 : ControlMask ( -- n ) 1 2 shift ; inline
592 : Mod1Mask ( -- n ) 1 3 shift ; inline
593 : Mod2Mask ( -- n ) 1 4 shift ; inline
594 : Mod3Mask ( -- n ) 1 5 shift ; inline
595 : Mod4Mask ( -- n ) 1 6 shift ; inline
596 : Mod5Mask ( -- n ) 1 7 shift ; inline
613 { same_screen Bool } ;
615 TYPEDEF: XButtonEvent XButtonPressedEvent
616 TYPEDEF: XButtonEvent XButtonReleasedEvent
619 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
636 { same_screen Bool } ;
638 TYPEDEF: XKeyEvent XKeyPressedEvent
639 TYPEDEF: XKeyEvent XKeyReleasedEvent
641 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
658 { same_screen Bool } ;
660 TYPEDEF: XMotionEvent XPointerMovedEvent
662 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
664 STRUCT: XCrossingEvent
683 TYPEDEF: XCrossingEvent XEnterWindowEvent
684 TYPEDEF: XCrossingEvent XLeaveWindowEvent
686 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
688 STRUCT: XFocusChangeEvent
697 TYPEDEF: XFocusChangeEvent XFocusInEvent
698 TYPEDEF: XFocusChangeEvent XFocusOutEvent
700 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
714 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
716 STRUCT: XGraphicsExposeEvent
721 { drawable Drawable }
730 STRUCT: XNoExposeEvent
735 { drawable Drawable }
739 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
741 STRUCT: XVisibilityEvent
749 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
751 STRUCT: XCreateWindowEvent
763 { override_redirect Bool } ;
765 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
767 STRUCT: XDestroyWindowEvent
775 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
784 { from_configure Bool } ;
786 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
795 { override_redirect Bool } ;
797 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
799 STRUCT: XMapRequestEvent
807 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
809 STRUCT: XReparentEvent
819 { override_redirect Bool } ;
821 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
823 STRUCT: XConfigureEvent
836 { override_redirect Bool } ;
838 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
840 STRUCT: XGravityEvent
850 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
852 STRUCT: XResizeRequestEvent
861 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
863 STRUCT: XConfigureRequestEvent
877 { value_mask ulong } ;
879 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
881 STRUCT: XCirculateEvent
890 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
892 STRUCT: XCirculateRequestEvent
901 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
903 STRUCT: XPropertyEvent
913 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
915 STRUCT: XSelectionClearEvent
924 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
926 STRUCT: XSelectionRequestEvent
938 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
940 STRUCT: XSelectionEvent
951 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
953 STRUCT: XColormapEvent
959 { colormap Colormap }
963 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
965 STRUCT: XClientMessageEvent
971 { message_type Atom }
979 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
981 STRUCT: XMappingEvent
988 { first_keycode int }
991 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
999 { request_code uchar }
1000 { minor_code uchar } ;
1002 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1004 STRUCT: XKeymapEvent
1008 { display Display* }
1019 UNION-STRUCT: XEvent
1021 { XAnyEvent XAnyEvent }
1022 { XKeyEvent XKeyEvent }
1023 { XButtonEvent XButtonEvent }
1024 { XMotionEvent XMotionEvent }
1025 { XCrossingEvent XCrossingEvent }
1026 { XFocusChangeEvent XFocusChangeEvent }
1027 { XExposeEvent XExposeEvent }
1028 { XGraphicsExposeEvent XGraphicsExposeEvent }
1029 { XNoExposeEvent XNoExposeEvent }
1030 { XVisibilityEvent XVisibilityEvent }
1031 { XCreateWindowEvent XCreateWindowEvent }
1032 { XDestroyWindowEvent XDestroyWindowEvent }
1033 { XUnmapEvent XUnmapEvent }
1034 { XMapEvent XMapEvent }
1035 { XMapRequestEvent XMapRequestEvent }
1036 { XReparentEvent XReparentEvent }
1037 { XConfigureEvent XConfigureEvent }
1038 { XGravityEvent XGravityEvent }
1039 { XResizeRequestEvent XResizeRequestEvent }
1040 { XConfigureRequestEvent XConfigureRequestEvent }
1041 { XCirculateEvent XCirculateEvent }
1042 { XCirculateRequestEvent XCirculateRequestEvent }
1043 { XPropertyEvent XPropertyEvent }
1044 { XSelectionClearEvent XSelectionClearEvent }
1045 { XSelectionRequestEvent XSelectionRequestEvent }
1046 { XSelectionEvent XSelectionEvent }
1047 { XColormapEvent XColormapEvent }
1048 { XClientMessageEvent XClientMessageEvent }
1049 { XMappingEvent XMappingEvent }
1050 { XErrorEvent XErrorEvent }
1051 { XKeymapEvent XKeymapEvent }
1052 { padding long[24] } ;
1054 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1055 ! 11 - Event Handling Functions
1056 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1058 X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask ) ;
1059 X-FUNCTION: Status XFlush ( Display* display ) ;
1060 X-FUNCTION: Status XSync ( Display* display, int discard ) ;
1061 X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event ) ;
1062 X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return ) ;
1064 ! 11.3 - Event Queue Management
1066 CONSTANT: QueuedAlready 0
1067 CONSTANT: QueuedAfterReading 1
1068 CONSTANT: QueuedAfterFlush 2
1070 X-FUNCTION: int XEventsQueued ( Display* display, int mode ) ;
1071 X-FUNCTION: int XPending ( Display* display ) ;
1073 ! 11.6 - Sending Events to Other Applications
1075 X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ;
1077 ! 11.8 - Handling Protocol Errors
1079 X-FUNCTION: int XSetErrorHandler ( void* handler ) ;
1081 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1082 ! 12 - Input Device Functions
1083 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1087 X-FUNCTION: int XGrabPointer (
1098 X-FUNCTION: Status XUngrabPointer ( Display* display, Time time ) ;
1099 X-FUNCTION: Status XChangeActivePointerGrab ( Display* display, uint event_mask, Cursor cursor, Time time ) ;
1100 X-FUNCTION: Status XGrabKey ( Display* display, int keycode, uint modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode ) ;
1101 X-FUNCTION: Status XSetInputFocus ( Display* display, Window focus, int revert_to, Time time ) ;
1103 X-FUNCTION: Status XGetInputFocus ( Display* display,
1104 Window* focus_return,
1105 int* revert_to_return ) ;
1107 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 ) ;
1109 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1110 ! 14 - Inter-Client Communication Functions
1111 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1113 ! 14.1 Client to Window Manager Communication
1115 X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ;
1116 X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ;
1118 ! 14.1.1. Manipulating Top-Level Windows
1120 X-FUNCTION: Status XIconifyWindow (
1121 Display* display, Window w, int screen_number ) ;
1123 X-FUNCTION: Status XWithdrawWindow (
1124 Display* display, Window w, int screen_number ) ;
1126 ! 14.1.6 - Setting and Reading the WM_HINTS Property
1128 ! 17.1.7 - Setting and Reading the WM_NORMAL_HINTS Property
1130 : USPosition ( -- n ) 0 2^ ; inline
1131 : USSize ( -- n ) 1 2^ ; inline
1132 : PPosition ( -- n ) 2 2^ ; inline
1133 : PSize ( -- n ) 3 2^ ; inline
1134 : PMinSize ( -- n ) 4 2^ ; inline
1135 : PMaxSize ( -- n ) 5 2^ ; inline
1136 : PResizeInc ( -- n ) 6 2^ ; inline
1137 : PAspect ( -- n ) 7 2^ ; inline
1138 : PBaseSize ( -- n ) 8 2^ ; inline
1139 : PWinGravity ( -- n ) 9 2^ ; inline
1140 : PAllHints ( -- n )
1141 { PPosition PSize PMinSize PMaxSize PResizeInc PAspect } flags ; foldable
1155 { min_aspect_x int }
1156 { min_aspect_y int }
1157 { max_aspect_x int }
1158 { max_aspect_y int }
1161 { win_gravity int } ;
1163 ! 14.1.10. Setting and Reading the WM_PROTOCOLS Property
1165 X-FUNCTION: Status XSetWMProtocols (
1166 Display* display, Window w, Atom* protocols, int count ) ;
1168 X-FUNCTION: Status XGetWMProtocols (
1171 Atom** protocols_return,
1172 int* count_return ) ;
1174 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1175 ! 16 - Application Utility Functions
1176 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1178 ! 16.1 Keyboard Utility Functions
1180 X-FUNCTION: KeySym XLookupKeysym ( XKeyEvent* key_event, int index ) ;
1182 X-FUNCTION: int XLookupString (
1183 XKeyEvent* event_struct,
1184 void* buffer_return,
1186 KeySym* keysym_return,
1187 XComposeStatus* status_in_out ) ;
1189 ! 16.7 Determining the Appropriate Visual Type
1191 CONSTANT: VisualNoMask HEX: 0
1192 CONSTANT: VisualIDMask HEX: 1
1193 CONSTANT: VisualScreenMask HEX: 2
1194 CONSTANT: VisualDepthMask HEX: 4
1195 CONSTANT: VisualClassMask HEX: 8
1196 CONSTANT: VisualRedMaskMask HEX: 10
1197 CONSTANT: VisualGreenMaskMask HEX: 20
1198 CONSTANT: VisualBlueMaskMask HEX: 40
1199 CONSTANT: VisualColormapSizeMask HEX: 80
1200 CONSTANT: VisualBitsPerRGBMask HEX: 100
1201 CONSTANT: VisualAllMask HEX: 1FF
1205 { visualid VisualID }
1210 { green_mask ulong }
1212 { colormap_size int }
1213 { bits_per_rgb int } ;
1215 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1216 ! Appendix D - Compatibility Functions
1217 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1219 X-FUNCTION: Status XSetStandardProperties (
1227 XSizeHints* hints ) ;
1229 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1231 CONSTANT: XA_PRIMARY 1
1232 CONSTANT: XA_SECONDARY 2
1235 CONSTANT: XA_BITMAP 5
1236 CONSTANT: XA_CARDINAL 6
1237 CONSTANT: XA_COLORMAP 7
1238 CONSTANT: XA_CURSOR 8
1239 CONSTANT: XA_CUT_BUFFER0 9
1240 CONSTANT: XA_CUT_BUFFER1 10
1241 CONSTANT: XA_CUT_BUFFER2 11
1242 CONSTANT: XA_CUT_BUFFER3 12
1243 CONSTANT: XA_CUT_BUFFER4 13
1244 CONSTANT: XA_CUT_BUFFER5 14
1245 CONSTANT: XA_CUT_BUFFER6 15
1246 CONSTANT: XA_CUT_BUFFER7 16
1247 CONSTANT: XA_DRAWABLE 17
1248 CONSTANT: XA_FONT 18
1249 CONSTANT: XA_INTEGER 19
1250 CONSTANT: XA_PIXMAP 20
1251 CONSTANT: XA_POINT 21
1252 CONSTANT: XA_RECTANGLE 22
1253 CONSTANT: XA_RESOURCE_MANAGER 23
1254 CONSTANT: XA_RGB_COLOR_MAP 24
1255 CONSTANT: XA_RGB_BEST_MAP 25
1256 CONSTANT: XA_RGB_BLUE_MAP 26
1257 CONSTANT: XA_RGB_DEFAULT_MAP 27
1258 CONSTANT: XA_RGB_GRAY_MAP 28
1259 CONSTANT: XA_RGB_GREEN_MAP 29
1260 CONSTANT: XA_RGB_RED_MAP 30
1261 CONSTANT: XA_STRING 31
1262 CONSTANT: XA_VISUALID 32
1263 CONSTANT: XA_WINDOW 33
1264 CONSTANT: XA_WM_COMMAND 34
1265 CONSTANT: XA_WM_HINTS 35
1266 CONSTANT: XA_WM_CLIENT_MACHINE 36
1267 CONSTANT: XA_WM_ICON_NAME 37
1268 CONSTANT: XA_WM_ICON_SIZE 38
1269 CONSTANT: XA_WM_NAME 39
1270 CONSTANT: XA_WM_NORMAL_HINTS 40
1271 CONSTANT: XA_WM_SIZE_HINTS 41
1272 CONSTANT: XA_WM_ZOOM_HINTS 42
1273 CONSTANT: XA_MIN_SPACE 43
1274 CONSTANT: XA_NORM_SPACE 44
1275 CONSTANT: XA_MAX_SPACE 45
1276 CONSTANT: XA_END_SPACE 46
1277 CONSTANT: XA_SUPERSCRIPT_X 47
1278 CONSTANT: XA_SUPERSCRIPT_Y 48
1279 CONSTANT: XA_SUBSCRIPT_X 49
1280 CONSTANT: XA_SUBSCRIPT_Y 50
1281 CONSTANT: XA_UNDERLINE_POSITION 51
1282 CONSTANT: XA_UNDERLINE_THICKNESS 52
1283 CONSTANT: XA_STRIKEOUT_ASCENT 53
1284 CONSTANT: XA_STRIKEOUT_DESCENT 54
1285 CONSTANT: XA_ITALIC_ANGLE 55
1286 CONSTANT: XA_X_HEIGHT 56
1287 CONSTANT: XA_QUAD_WIDTH 57
1288 CONSTANT: XA_WEIGHT 58
1289 CONSTANT: XA_POINT_SIZE 59
1290 CONSTANT: XA_RESOLUTION 60
1291 CONSTANT: XA_COPYRIGHT 61
1292 CONSTANT: XA_NOTICE 62
1293 CONSTANT: XA_FONT_NAME 63
1294 CONSTANT: XA_FAMILY_NAME 64
1295 CONSTANT: XA_FULL_NAME 65
1296 CONSTANT: XA_CAP_HEIGHT 66
1297 CONSTANT: XA_WM_CLASS 67
1298 CONSTANT: XA_WM_TRANSIENT_FOR 68
1300 CONSTANT: XA_LAST_PREDEFINED 68
1302 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1303 ! The rest of the stuff is not from the book.
1304 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1306 X-FUNCTION: void XFree ( void* data ) ;
1307 X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
1308 X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
1309 X-FUNCTION: int XBell ( Display* display, int percent ) ;
1313 CONSTANT: XIMPreeditArea HEX: 0001
1314 CONSTANT: XIMPreeditCallbacks HEX: 0002
1315 CONSTANT: XIMPreeditPosition HEX: 0004
1316 CONSTANT: XIMPreeditNothing HEX: 0008
1317 CONSTANT: XIMPreeditNone HEX: 0010
1318 CONSTANT: XIMStatusArea HEX: 0100
1319 CONSTANT: XIMStatusCallbacks HEX: 0200
1320 CONSTANT: XIMStatusNothing HEX: 0400
1321 CONSTANT: XIMStatusNone HEX: 0800
1323 CONSTANT: XNVaNestedList "XNVaNestedList"
1324 CONSTANT: XNQueryInputStyle "queryInputStyle"
1325 CONSTANT: XNClientWindow "clientWindow"
1326 CONSTANT: XNInputStyle "inputStyle"
1327 CONSTANT: XNFocusWindow "focusWindow"
1328 CONSTANT: XNResourceName "resourceName"
1329 CONSTANT: XNResourceClass "resourceClass"
1330 CONSTANT: XNGeometryCallback "geometryCallback"
1331 CONSTANT: XNDestroyCallback "destroyCallback"
1332 CONSTANT: XNFilterEvents "filterEvents"
1333 CONSTANT: XNPreeditStartCallback "preeditStartCallback"
1334 CONSTANT: XNPreeditDoneCallback "preeditDoneCallback"
1335 CONSTANT: XNPreeditDrawCallback "preeditDrawCallback"
1336 CONSTANT: XNPreeditCaretCallback "preeditCaretCallback"
1337 CONSTANT: XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1338 CONSTANT: XNPreeditAttributes "preeditAttributes"
1339 CONSTANT: XNStatusStartCallback "statusStartCallback"
1340 CONSTANT: XNStatusDoneCallback "statusDoneCallback"
1341 CONSTANT: XNStatusDrawCallback "statusDrawCallback"
1342 CONSTANT: XNStatusAttributes "statusAttributes"
1343 CONSTANT: XNArea "area"
1344 CONSTANT: XNAreaNeeded "areaNeeded"
1345 CONSTANT: XNSpotLocation "spotLocation"
1346 CONSTANT: XNColormap "colorMap"
1347 CONSTANT: XNStdColormap "stdColorMap"
1348 CONSTANT: XNForeground "foreground"
1349 CONSTANT: XNBackground "background"
1350 CONSTANT: XNBackgroundPixmap "backgroundPixmap"
1351 CONSTANT: XNFontSet "fontSet"
1352 CONSTANT: XNLineSpace "lineSpace"
1353 CONSTANT: XNCursor "cursor"
1355 CONSTANT: XNQueryIMValuesList "queryIMValuesList"
1356 CONSTANT: XNQueryICValuesList "queryICValuesList"
1357 CONSTANT: XNVisiblePosition "visiblePosition"
1358 CONSTANT: XNR6PreeditCallback "r6PreeditCallback"
1359 CONSTANT: XNStringConversionCallback "stringConversionCallback"
1360 CONSTANT: XNStringConversion "stringConversion"
1361 CONSTANT: XNResetState "resetState"
1362 CONSTANT: XNHotKey "hotKey"
1363 CONSTANT: XNHotKeyState "hotKeyState"
1364 CONSTANT: XNPreeditState "preeditState"
1365 CONSTANT: XNSeparatorofNestedList "separatorofNestedList"
1367 CONSTANT: XBufferOverflow -1
1368 CONSTANT: XLookupNone 1
1369 CONSTANT: XLookupChars 2
1370 CONSTANT: XLookupKeySym 3
1371 CONSTANT: XLookupBoth 4
1373 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ;
1375 X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ;
1377 X-FUNCTION: Status XCloseIM ( XIM im ) ;
1379 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 ) ;
1381 X-FUNCTION: void XDestroyIC ( XIC ic ) ;
1383 X-FUNCTION: void XSetICFocus ( XIC ic ) ;
1385 X-FUNCTION: void XUnsetICFocus ( XIC ic ) ;
1387 X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1389 X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ;
1391 ! !!! category of setlocale
1393 CONSTANT: LC_COLLATE 1
1394 CONSTANT: LC_CTYPE 2
1395 CONSTANT: LC_MONETARY 3
1396 CONSTANT: LC_NUMERIC 4
1399 X-FUNCTION: char* setlocale ( int category, char* name ) ;
1401 X-FUNCTION: Bool XSupportsLocale ( ) ;
1403 X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ;