3 Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
7 The above copyright notice and this permission notice shall be included in
8 all copies or substantial portions of the Software.
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
14 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
15 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 Except as contained in this notice, the name of The Open Group shall not be
18 used in advertising or otherwise to promote the sale, use or other dealings
19 in this Software without prior written authorization from The Open Group.
26 /* typedef struct _XrmHashBucketRec; */
27 typedef unsigned long Atom;
28 typedef unsigned long Time;
29 typedef unsigned long XID;
46 typedef unsigned char KeyCode;
48 typedef char *XPointer;
49 typedef unsigned long VisualID;
51 #define PIXEL_ALREADY_TYPEDEFED
52 typedef unsigned long Pixel;
54 #define XDestroyImage(ximage) \
55 ((*((ximage)->f.destroy_image))((ximage)))
56 #define XPutPixel(ximage, x, y, pixel) \
57 ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
59 #define AllPlanes ((unsigned long)~0L)
60 #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
61 #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
62 #define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
63 #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
64 #define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
65 #define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
66 #define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
67 #define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
68 #define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
69 #define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
70 #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
73 #define None 0L /* universal null resource or null atom */
76 #define ParentRelative 1L
77 #define CopyFromParent 0L
78 #define PointerWindow 0L /* destination window in SendEvent */
79 #define InputFocus 1L /* destination window in SendEvent */
80 #define PointerRoot 1L /* focus window in SetInputFocus */
81 #define AnyPropertyType 0L /* special Atom, passed to GetProperty */
82 #define AnyKey 0L /* special Key Code, passed to GrabKey */
83 #define AnyButton 0L /* special Button Code, passed to GrabButton */
84 #define AllTemporary 0L /* special Resource ID passed to KillClient */
85 #define CurrentTime 0L /* special Time */
86 #define NoSymbol 0L /* special KeySym */
87 #define NoEventMask 0L
88 #define KeyPressMask (1L<<0)
89 #define KeyReleaseMask (1L<<1)
90 #define ButtonPressMask (1L<<2)
91 #define ButtonReleaseMask (1L<<3)
92 #define EnterWindowMask (1L<<4)
93 #define LeaveWindowMask (1L<<5)
94 #define PointerMotionMask (1L<<6)
95 #define PointerMotionHintMask (1L<<7)
96 #define Button1MotionMask (1L<<8)
97 #define Button2MotionMask (1L<<9)
98 #define Button3MotionMask (1L<<10)
99 #define Button4MotionMask (1L<<11)
100 #define Button5MotionMask (1L<<12)
101 #define ButtonMotionMask (1L<<13)
102 #define KeymapStateMask (1L<<14)
103 #define ExposureMask (1L<<15)
104 #define VisibilityChangeMask (1L<<16)
105 #define StructureNotifyMask (1L<<17)
106 #define ResizeRedirectMask (1L<<18)
107 #define SubstructureNotifyMask (1L<<19)
108 #define SubstructureRedirectMask (1L<<20)
109 #define FocusChangeMask (1L<<21)
110 #define PropertyChangeMask (1L<<22)
111 #define ColormapChangeMask (1L<<23)
112 #define OwnerGrabButtonMask (1L<<24)
115 #define ButtonPress 4
116 #define ButtonRelease 5
117 #define MotionNotify 6
118 #define EnterNotify 7
119 #define LeaveNotify 8
122 #define KeymapNotify 11
124 #define GraphicsExpose 13
126 #define VisibilityNotify 15
127 #define CreateNotify 16
128 #define DestroyNotify 17
129 #define UnmapNotify 18
131 #define MapRequest 20
132 #define ReparentNotify 21
133 #define ConfigureNotify 22
134 #define ConfigureRequest 23
135 #define GravityNotify 24
136 #define ResizeRequest 25
137 #define CirculateNotify 26
138 #define CirculateRequest 27
139 #define PropertyNotify 28
140 #define SelectionClear 29
141 #define SelectionRequest 30
142 #define SelectionNotify 31
143 #define ColormapNotify 32
144 #define ClientMessage 33
145 #define MappingNotify 34
146 #define LASTEvent 35 /* must be bigger than any event # */
147 #define ShiftMask (1<<0)
148 #define LockMask (1<<1)
149 #define ControlMask (1<<2)
150 #define Mod1Mask (1<<3)
151 #define Mod2Mask (1<<4)
152 #define Mod3Mask (1<<5)
153 #define Mod4Mask (1<<6)
154 #define Mod5Mask (1<<7)
155 #define ShiftMapIndex 0
156 #define LockMapIndex 1
157 #define ControlMapIndex 2
158 #define Mod1MapIndex 3
159 #define Mod2MapIndex 4
160 #define Mod3MapIndex 5
161 #define Mod4MapIndex 6
162 #define Mod5MapIndex 7
163 #define Button1Mask (1<<8)
164 #define Button2Mask (1<<9)
165 #define Button3Mask (1<<10)
166 #define Button4Mask (1<<11)
167 #define Button5Mask (1<<12)
168 #define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
174 #define NotifyNormal 0
176 #define NotifyUngrab 2
177 #define NotifyWhileGrabbed 3
178 #define NotifyHint 1 /* for MotionNotify events */
179 #define NotifyAncestor 0
180 #define NotifyVirtual 1
181 #define NotifyInferior 2
182 #define NotifyNonlinear 3
183 #define NotifyNonlinearVirtual 4
184 #define NotifyPointer 5
185 #define NotifyPointerRoot 6
186 #define NotifyDetailNone 7
187 #define VisibilityUnobscured 0
188 #define VisibilityPartiallyObscured 1
189 #define VisibilityFullyObscured 2
191 #define PlaceOnBottom 1
192 #define FamilyInternet 0
193 #define FamilyDECnet 1
194 #define FamilyChaos 2
195 #define PropertyNewValue 0
196 #define PropertyDelete 1
197 #define ColormapUninstalled 0
198 #define ColormapInstalled 1
199 #define GrabModeSync 0
200 #define GrabModeAsync 1
201 #define GrabSuccess 0
202 #define AlreadyGrabbed 1
203 #define GrabInvalidTime 2
204 #define GrabNotViewable 3
206 #define AsyncPointer 0
207 #define SyncPointer 1
208 #define ReplayPointer 2
209 #define AsyncKeyboard 3
210 #define SyncKeyboard 4
211 #define ReplayKeyboard 5
214 #define RevertToNone (int)None
215 #define RevertToPointerRoot (int)PointerRoot
216 #define RevertToParent 2
217 #define Success 0 /* everything's okay */
218 #define BadRequest 1 /* bad request code */
219 #define BadValue 2 /* int parameter out of range */
220 #define BadWindow 3 /* parameter not a Window */
221 #define BadPixmap 4 /* parameter not a Pixmap */
222 #define BadAtom 5 /* parameter not an Atom */
223 #define BadCursor 6 /* parameter not a Cursor */
224 #define BadFont 7 /* parameter not a Font */
225 #define BadMatch 8 /* parameter mismatch */
226 #define BadDrawable 9 /* parameter not a Pixmap or Window */
228 #define BadAlloc 11 /* insufficient resources */
229 #define BadColor 12 /* no such colormap */
230 #define BadGC 13 /* parameter not a GC */
231 #define BadIDChoice 14 /* choice not in range or already used */
232 #define BadName 15 /* font or color name doesn't exist */
233 #define BadLength 16 /* Request length incorrect */
234 #define BadImplementation 17 /* server is defective */
235 #define FirstExtensionError 128
236 #define LastExtensionError 255
237 #define InputOutput 1
239 #define CWBackPixmap (1L<<0)
240 #define CWBackPixel (1L<<1)
241 #define CWBorderPixmap (1L<<2)
242 #define CWBorderPixel (1L<<3)
243 #define CWBitGravity (1L<<4)
244 #define CWWinGravity (1L<<5)
245 #define CWBackingStore (1L<<6)
246 #define CWBackingPlanes (1L<<7)
247 #define CWBackingPixel (1L<<8)
248 #define CWOverrideRedirect (1L<<9)
249 #define CWSaveUnder (1L<<10)
250 #define CWEventMask (1L<<11)
251 #define CWDontPropagate (1L<<12)
252 #define CWColormap (1L<<13)
253 #define CWCursor (1L<<14)
256 #define CWWidth (1<<2)
257 #define CWHeight (1<<3)
258 #define CWBorderWidth (1<<4)
259 #define CWSibling (1<<5)
260 #define CWStackMode (1<<6)
261 #define ForgetGravity 0
262 #define NorthWestGravity 1
263 #define NorthGravity 2
264 #define NorthEastGravity 3
265 #define WestGravity 4
266 #define CenterGravity 5
267 #define EastGravity 6
268 #define SouthWestGravity 7
269 #define SouthGravity 8
270 #define SouthEastGravity 9
271 #define StaticGravity 10
272 #define UnmapGravity 0
277 #define IsUnviewable 1
279 #define SetModeInsert 0
280 #define SetModeDelete 1
282 #define RetainPermanent 1
283 #define RetainTemporary 2
289 #define RaiseLowest 0
290 #define LowerHighest 1
291 #define PropModeReplace 0
292 #define PropModePrepend 1
293 #define PropModeAppend 2
294 #define GXclear 0x0 /* 0 */
295 #define GXand 0x1 /* src AND dst */
296 #define GXandReverse 0x2 /* src AND NOT dst */
297 #define GXcopy 0x3 /* src */
298 #define GXandInverted 0x4 /* NOT src AND dst */
299 #define GXnoop 0x5 /* dst */
300 #define GXxor 0x6 /* src XOR dst */
301 #define GXor 0x7 /* src OR dst */
302 #define GXnor 0x8 /* NOT src AND NOT dst */
303 #define GXequiv 0x9 /* NOT src XOR dst */
304 #define GXinvert 0xa /* NOT dst */
305 #define GXorReverse 0xb /* src OR NOT dst */
306 #define GXcopyInverted 0xc /* NOT src */
307 #define GXorInverted 0xd /* NOT src OR dst */
308 #define GXnand 0xe /* NOT src OR NOT dst */
309 #define GXset 0xf /* 1 */
311 #define LineOnOffDash 1
312 #define LineDoubleDash 2
316 #define CapProjecting 3
322 #define FillStippled 2
323 #define FillOpaqueStippled 3
324 #define EvenOddRule 0
325 #define WindingRule 1
326 #define ClipByChildren 0
327 #define IncludeInferiors 1
332 #define CoordModeOrigin 0 /* relative to the origin */
333 #define CoordModePrevious 1 /* relative to previous point */
334 #define Complex 0 /* paths may intersect */
335 #define Nonconvex 1 /* no paths intersect, but not convex */
336 #define Convex 2 /* wholly convex */
337 #define ArcChord 0 /* join endpoints of arc */
338 #define ArcPieSlice 1 /* join endpoints to center of arc */
339 #define GCFunction (1L<<0)
340 #define GCPlaneMask (1L<<1)
341 #define GCForeground (1L<<2)
342 #define GCBackground (1L<<3)
343 #define GCLineWidth (1L<<4)
344 #define GCLineStyle (1L<<5)
345 #define GCCapStyle (1L<<6)
346 #define GCJoinStyle (1L<<7)
347 #define GCFillStyle (1L<<8)
348 #define GCFillRule (1L<<9)
349 #define GCTile (1L<<10)
350 #define GCStipple (1L<<11)
351 #define GCTileStipXOrigin (1L<<12)
352 #define GCTileStipYOrigin (1L<<13)
353 #define GCFont (1L<<14)
354 #define GCSubwindowMode (1L<<15)
355 #define GCGraphicsExposures (1L<<16)
356 #define GCClipXOrigin (1L<<17)
357 #define GCClipYOrigin (1L<<18)
358 #define GCClipMask (1L<<19)
359 #define GCDashOffset (1L<<20)
360 #define GCDashList (1L<<21)
361 #define GCArcMode (1L<<22)
363 #define FontLeftToRight 0
364 #define FontRightToLeft 1
365 #define FontChange 255
366 #define XYBitmap 0 /* depth 1, XYFormat */
367 #define XYPixmap 1 /* depth == drawable depth */
368 #define ZPixmap 2 /* depth == drawable depth */
369 #define AllocNone 0 /* create map with no entries */
370 #define AllocAll 1 /* allocate entire map writeable */
372 #define DoGreen (1<<1)
373 #define DoBlue (1<<2)
374 #define CursorShape 0 /* largest size that can be displayed */
375 #define TileShape 1 /* size tiled fastest */
376 #define StippleShape 2 /* size stippled fastest */
377 #define AutoRepeatModeOff 0
378 #define AutoRepeatModeOn 1
379 #define AutoRepeatModeDefault 2
382 #define KBKeyClickPercent (1L<<0)
383 #define KBBellPercent (1L<<1)
384 #define KBBellPitch (1L<<2)
385 #define KBBellDuration (1L<<3)
386 #define KBLed (1L<<4)
387 #define KBLedMode (1L<<5)
388 #define KBKey (1L<<6)
389 #define KBAutoRepeatMode (1L<<7)
390 #define MappingSuccess 0
391 #define MappingBusy 1
392 #define MappingFailed 2
393 #define MappingModifier 0
394 #define MappingKeyboard 1
395 #define MappingPointer 2
396 #define DontPreferBlanking 0
397 #define PreferBlanking 1
398 #define DefaultBlanking 2
399 #define DisableScreenSaver 0
400 #define DisableScreenInterval 0
401 #define DontAllowExposures 0
402 #define AllowExposures 1
403 #define DefaultExposures 2
404 #define ScreenSaverReset 0
405 #define ScreenSaverActive 1
408 #define EnableAccess 1
409 #define DisableAccess 0
412 #define StaticColor 2
413 #define PseudoColor 3
415 #define DirectColor 5
422 #define XK_Alt_L 0xFFE9 /* Left alt */
424 #define XK_BackSpace 0xFF08 /* back space, back char */
425 #define XK_Tab 0xFF09
426 #define XK_Linefeed 0xFF0A /* Linefeed, LF */
427 #define XK_Clear 0xFF0B
428 #define XK_Return 0xFF0D /* Return, enter */
429 #define XK_Pause 0xFF13 /* Pause, hold */
430 #define XK_Scroll_Lock 0xFF14
431 #define XK_Sys_Req 0xFF15
432 #define XK_Escape 0xFF1B
433 #define XK_Delete 0xFFFF /* Delete, rubout */
435 #define XK_Home 0xFF50
436 #define XK_Left 0xFF51 /* Move left, left arrow */
437 #define XK_Up 0xFF52 /* Move up, up arrow */
438 #define XK_Right 0xFF53 /* Move right, right arrow */
439 #define XK_Down 0xFF54 /* Move down, down arrow */
440 #define XK_Prior 0xFF55 /* Prior, previous */
441 #define XK_Page_Up 0xFF55
442 #define XK_Next 0xFF56 /* Next */
443 #define XK_Page_Down 0xFF56
444 #define XK_End 0xFF57 /* EOL */
445 #define XK_Begin 0xFF58 /* BOL */
447 #define XK_Select 0xFF60 /* Select, mark */
448 #define XK_Print 0xFF61
449 #define XK_Execute 0xFF62 /* Execute, run, do */
450 #define XK_Insert 0xFF63 /* Insert, insert here */
451 #define XK_Undo 0xFF65 /* Undo, oops */
452 #define XK_Redo 0xFF66 /* redo, again */
453 #define XK_Menu 0xFF67
454 #define XK_Find 0xFF68 /* Find, search */
455 #define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */
456 #define XK_Help 0xFF6A /* Help */
457 #define XK_Break 0xFF6B
458 #define XK_Mode_switch 0xFF7E /* Character set switch */
459 #define XK_script_switch 0xFF7E /* Alias for mode_switch */
460 #define XK_Num_Lock 0xFF7F
471 #define XK_F10 0xFFC7
472 #define XK_F11 0xFFC8
474 #define XK_F12 0xFFC9
476 #define VisualNoMask 0x0
477 #define VisualIDMask 0x1
478 #define VisualScreenMask 0x2
479 #define VisualDepthMask 0x4
480 #define VisualClassMask 0x8
481 #define VisualRedMaskMask 0x10
482 #define VisualGreenMaskMask 0x20
483 #define VisualBlueMaskMask 0x40
484 #define VisualColormapSizeMask 0x80
485 #define VisualBitsPerRGBMask 0x100
486 #define VisualAllMask 0x1FF
488 #define USPosition (1L << 0) /* user specified x, y */
489 #define USSize (1L << 1) /* user specified width, height */
491 #define PPosition (1L << 2) /* program specified position */
492 #define PSize (1L << 3) /* program specified size */
493 #define PMinSize (1L << 4) /* program specified minimum size */
494 #define PMaxSize (1L << 5) /* program specified maximum size */
495 #define PResizeInc (1L << 6) /* program specified resize increments */
496 #define PAspect (1L << 7) /* program specified min and max aspect ratios */
497 #define PBaseSize (1L << 8) /* program specified base for incrementing */
498 #define PWinGravity (1L << 9) /* program specified window gravity */
500 #define NoValue 0x0000
501 #define XValue 0x0001
502 #define YValue 0x0002
503 #define WidthValue 0x0004
504 #define HeightValue 0x0008
505 #define AllValues 0x000F
506 #define XNegative 0x0010
507 #define YNegative 0x0020
510 #define XLocaleNotSupported -2
511 #define XConverterNotFound -3
515 /* used by rxvt/src/main.c */
516 #define NormalState 1
517 #define IconicState 3
518 #define InputHint (1L << 0)
519 #define StateHint (1L << 1)
520 #define IconWindowHint (1L << 3)
521 #define WindowGroupHint (1L << 6)
522 #define XC_left_ptr 68
525 typedef struct _XRegion *Region;
526 typedef struct _XOC *XOC, *XFontSet;
528 typedef struct _XExtData {
529 int number; /* number returned by XRegisterExtension */
530 struct _XExtData *next; /* next item on list of data for structure */
531 int (*free_private)( /* called to free private storage */
532 struct _XExtData *extension
534 XPointer private_data; /* data private to this extension. */
537 typedef struct { /* public to extension, cannot be changed */
538 int extension; /* extension number */
539 int major_opcode; /* major op-code assigned by server */
540 int first_event; /* first event number for the extension */
541 int first_error; /* first error number for the extension */
545 XExtData *ext_data; /* hook for extension to hang data */
546 VisualID visualid; /* visual id of this visual */
547 #if defined(__cplusplus) || defined(c_plusplus)
548 int c_class; /* C++ class of screen (monochrome, etc.) */
550 int class; /* class of screen (monochrome, etc.) */
552 unsigned long red_mask, green_mask, blue_mask; /* mask values */
553 int bits_per_rgb; /* log base 2 of distinct color values */
554 int map_entries; /* color map entries */
558 int depth; /* this depth (Z) of the depth */
559 int nvisuals; /* number of Visual types at this depth */
560 Visual *visuals; /* list of visuals possible at this depth */
564 int function; /* logical operation */
565 unsigned long plane_mask;/* plane mask */
566 unsigned long foreground;/* foreground pixel */
567 unsigned long background;/* background pixel */
568 int line_width; /* line width */
569 int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
570 int cap_style; /* CapNotLast, CapButt,
571 CapRound, CapProjecting */
572 int join_style; /* JoinMiter, JoinRound, JoinBevel */
573 int fill_style; /* FillSolid, FillTiled,
574 FillStippled, FillOpaeueStippled */
575 int fill_rule; /* EvenOddRule, WindingRule */
576 int arc_mode; /* ArcChord, ArcPieSlice */
577 Pixmap tile; /* tile pixmap for tiling operations */
578 Pixmap stipple; /* stipple 1 plane pixmap for stipping */
579 int ts_x_origin; /* offset for tile or stipple operations */
581 Font font; /* default text font for text operations */
582 int subwindow_mode; /* ClipByChildren, IncludeInferiors */
583 BoolDef graphics_exposures;/* boolean, should exposures be generated */
584 int clip_x_origin; /* origin for clipping */
586 Pixmap clip_mask; /* bitmap clipping; other calls for rects */
587 int dash_offset; /* patterned/dashed line information */
593 XExtData *ext_data; /* hook for extension to hang data */
594 GContext gid; /* protocol ID for graphics context */
602 XExtData *ext_data; /* hook for extension to hang data */
603 struct _XDisplay *display;/* back pointer to display structure */
604 Window root; /* Root window id. */
605 int width, height; /* width and height of screen */
606 int mwidth, mheight; /* width and height of in millimeters */
607 int ndepths; /* number of depths possible */
608 Depth *depths; /* list of allowable depths on the screen */
609 int root_depth; /* bits per pixel */
610 Visual *root_visual; /* root visual */
611 GC default_gc; /* GC for the root root visual */
612 Colormap cmap; /* default color map */
613 unsigned long white_pixel;
614 unsigned long black_pixel; /* White and Black pixel values */
615 int max_maps, min_maps; /* max and min color maps */
616 int backing_store; /* Never, WhenMapped, Always */
618 long root_input_mask; /* initial root input mask */
622 XExtData *ext_data; /* hook for extension to hang data */
623 int depth; /* depth of this image format */
624 int bits_per_pixel; /* bits/pixel at this depth */
625 int scanline_pad; /* scanline must padded to this multiple */
628 typedef struct _XDisplay
630 XExtData *ext_data; /* hook for extension to hang data */
631 struct _XPrivate *private1;
632 int fd; /* Network socket. */
634 int proto_major_version;/* major version of server's X protocol */
635 int proto_minor_version;/* minor version of servers X protocol */
636 char *vendor; /* vendor of the server hardware */
641 XID (*resource_alloc)( /* allocator function */
644 int byte_order; /* screen byte order, LSBFirst, MSBFirst */
645 int bitmap_unit; /* padding and data requirements */
646 int bitmap_pad; /* padding requirements on bitmaps */
647 int bitmap_bit_order; /* LeastSignificant or MostSignificant */
648 int nformats; /* number of pixmap formats in list */
649 ScreenFormat *pixmap_format; /* pixmap format list */
651 int release; /* release of the server */
652 struct _XPrivate *private9, *private10;
653 int qlen; /* Length of input event queue */
654 unsigned long last_request_read; /* seq number of last event read */
655 unsigned long request; /* sequence number of last request. */
660 unsigned max_request_size; /* maximum number 32 bit words in request*/
661 struct _XrmHashBucketRec *db;
665 char *display_name; /* "host:display" string used on this connect*/
666 int default_screen; /* default screen for operations */
667 int nscreens; /* number of screens on this server*/
668 Screen *screens; /* pointer to list of screens */
669 unsigned long motion_buffer; /* size of motion buffer */
670 unsigned long private16;
671 int min_keycode; /* minimum defined keycode */
672 int max_keycode; /* maximum defined keycode */
676 char *xdefaults; /* contents of defaults from server */
677 /* there is more to this structure, but it is private to Xlib */
679 Display, *_XPrivDisplay;
681 typedef int StatusDef;
683 typedef struct { /* normal 16 bit characters are two bytes */
689 short lbearing; /* origin to left edge of raster */
690 short rbearing; /* origin to right edge of raster */
691 short width; /* advance to next char's origin */
692 short ascent; /* baseline to top edge of raster */
693 short descent; /* baseline to bottom edge of raster */
694 unsigned short attributes; /* per char flags (not predefined) */
704 unsigned short red, green, blue;
705 char flags; /* do_red, do_green, do_blue */
709 typedef struct _XComposeStatus {
710 XPointer compose_ptr; /* state table pointer */
711 int chars_matched; /* match state */
714 /* events --- goes on for a bit */
716 int type; /* of event */
717 unsigned long serial; /* # of last request processed by server */
718 BoolDef send_event; /* true if this came from a SendEvent request */
719 Display *display; /* Display the event was read from */
720 Window window; /* "event" window it is reported relative to */
721 Window root; /* root window that the event occurred on */
722 Window subwindow; /* child window */
723 Time time; /* milliseconds */
724 int x, y; /* pointer x, y coordinates in event window */
725 int x_root, y_root; /* coordinates relative to root */
726 unsigned int state; /* key or button mask */
727 unsigned int keycode; /* detail */
728 BoolDef same_screen; /* same screen flag */
731 typedef XKeyEvent XKeyPressedEvent;
732 typedef XKeyEvent XKeyReleasedEvent;
735 int type; /* of event */
736 unsigned long serial; /* # of last request processed by server */
737 BoolDef send_event; /* true if this came from a SendEvent request */
738 Display *display; /* Display the event was read from */
739 Window window; /* "event" window it is reported relative to */
740 Window root; /* root window that the event occurred on */
741 Window subwindow; /* child window */
742 Time time; /* milliseconds */
743 int x, y; /* pointer x, y coordinates in event window */
744 int x_root, y_root; /* coordinates relative to root */
745 unsigned int state; /* key or button mask */
746 unsigned int button; /* detail */
747 BoolDef same_screen; /* same screen flag */
749 typedef XButtonEvent XButtonPressedEvent;
750 typedef XButtonEvent XButtonReleasedEvent;
753 int type; /* of event */
754 unsigned long serial; /* # of last request processed by server */
755 BoolDef send_event; /* true if this came from a SendEvent request */
756 Display *display; /* Display the event was read from */
757 Window window; /* "event" window reported relative to */
758 Window root; /* root window that the event occurred on */
759 Window subwindow; /* child window */
760 Time time; /* milliseconds */
761 int x, y; /* pointer x, y coordinates in event window */
762 int x_root, y_root; /* coordinates relative to root */
763 unsigned int state; /* key or button mask */
764 char is_hint; /* detail */
765 BoolDef same_screen; /* same screen flag */
767 typedef XMotionEvent XPointerMovedEvent;
770 int type; /* of event */
771 unsigned long serial; /* # of last request processed by server */
772 BoolDef send_event; /* true if this came from a SendEvent request */
773 Display *display; /* Display the event was read from */
774 Window window; /* "event" window reported relative to */
775 Window root; /* root window that the event occurred on */
776 Window subwindow; /* child window */
777 Time time; /* milliseconds */
778 int x, y; /* pointer x, y coordinates in event window */
779 int x_root, y_root; /* coordinates relative to root */
780 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
783 * NotifyAncestor, NotifyVirtual, NotifyInferior,
784 * NotifyNonlinear,NotifyNonlinearVirtual
786 BoolDef same_screen; /* same screen flag */
787 BoolDef focus; /* boolean focus */
788 unsigned int state; /* key or button mask */
790 typedef XCrossingEvent XEnterWindowEvent;
791 typedef XCrossingEvent XLeaveWindowEvent;
794 int type; /* FocusIn or FocusOut */
795 unsigned long serial; /* # of last request processed by server */
796 BoolDef send_event; /* true if this came from a SendEvent request */
797 Display *display; /* Display the event was read from */
798 Window window; /* window of event */
799 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
802 * NotifyAncestor, NotifyVirtual, NotifyInferior,
803 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
804 * NotifyPointerRoot, NotifyDetailNone
807 typedef XFocusChangeEvent XFocusInEvent;
808 typedef XFocusChangeEvent XFocusOutEvent;
810 /* generated on EnterWindow and FocusIn when KeyMapState selected */
813 unsigned long serial; /* # of last request processed by server */
814 BoolDef send_event; /* true if this came from a SendEvent request */
815 Display *display; /* Display the event was read from */
822 unsigned long serial; /* # of last request processed by server */
823 BoolDef send_event; /* true if this came from a SendEvent request */
824 Display *display; /* Display the event was read from */
828 int count; /* if non-zero, at least this many more */
833 unsigned long serial; /* # of last request processed by server */
834 BoolDef send_event; /* true if this came from a SendEvent request */
835 Display *display; /* Display the event was read from */
839 int count; /* if non-zero, at least this many more */
840 int major_code; /* core is CopyArea or CopyPlane */
841 int minor_code; /* not defined in the core */
842 } XGraphicsExposeEvent;
846 unsigned long serial; /* # of last request processed by server */
847 BoolDef send_event; /* true if this came from a SendEvent request */
848 Display *display; /* Display the event was read from */
850 int major_code; /* core is CopyArea or CopyPlane */
851 int minor_code; /* not defined in the core */
856 unsigned long serial; /* # of last request processed by server */
857 BoolDef send_event; /* true if this came from a SendEvent request */
858 Display *display; /* Display the event was read from */
860 int state; /* Visibility state */
865 unsigned long serial; /* # of last request processed by server */
866 BoolDef send_event; /* true if this came from a SendEvent request */
867 Display *display; /* Display the event was read from */
868 Window parent; /* parent of the window */
869 Window window; /* window id of window created */
870 int x, y; /* window location */
871 int width, height; /* size of window */
872 int border_width; /* border width */
873 BoolDef override_redirect; /* creation should be overridden */
874 } XCreateWindowEvent;
878 unsigned long serial; /* # of last request processed by server */
879 BoolDef send_event; /* true if this came from a SendEvent request */
880 Display *display; /* Display the event was read from */
883 } XDestroyWindowEvent;
887 unsigned long serial; /* # of last request processed by server */
888 BoolDef send_event; /* true if this came from a SendEvent request */
889 Display *display; /* Display the event was read from */
892 BoolDef from_configure;
897 unsigned long serial; /* # of last request processed by server */
898 BoolDef send_event; /* true if this came from a SendEvent request */
899 Display *display; /* Display the event was read from */
902 BoolDef override_redirect; /* boolean, is override set... */
907 unsigned long serial; /* # of last request processed by server */
908 BoolDef send_event; /* true if this came from a SendEvent request */
909 Display *display; /* Display the event was read from */
916 unsigned long serial; /* # of last request processed by server */
917 BoolDef send_event; /* true if this came from a SendEvent request */
918 Display *display; /* Display the event was read from */
923 BoolDef override_redirect;
928 unsigned long serial; /* # of last request processed by server */
929 BoolDef send_event; /* true if this came from a SendEvent request */
930 Display *display; /* Display the event was read from */
937 BoolDef override_redirect;
942 unsigned long serial; /* # of last request processed by server */
943 BoolDef send_event; /* true if this came from a SendEvent request */
944 Display *display; /* Display the event was read from */
952 unsigned long serial; /* # of last request processed by server */
953 BoolDef send_event; /* true if this came from a SendEvent request */
954 Display *display; /* Display the event was read from */
957 } XResizeRequestEvent;
961 unsigned long serial; /* # of last request processed by server */
962 BoolDef send_event; /* true if this came from a SendEvent request */
963 Display *display; /* Display the event was read from */
970 int detail; /* Above, Below, TopIf, BottomIf, Opposite */
971 unsigned long value_mask;
972 } XConfigureRequestEvent;
976 unsigned long serial; /* # of last request processed by server */
977 BoolDef send_event; /* true if this came from a SendEvent request */
978 Display *display; /* Display the event was read from */
981 int place; /* PlaceOnTop, PlaceOnBottom */
986 unsigned long serial; /* # of last request processed by server */
987 BoolDef send_event; /* true if this came from a SendEvent request */
988 Display *display; /* Display the event was read from */
991 int place; /* PlaceOnTop, PlaceOnBottom */
992 } XCirculateRequestEvent;
996 unsigned long serial; /* # of last request processed by server */
997 BoolDef send_event; /* true if this came from a SendEvent request */
998 Display *display; /* Display the event was read from */
1002 int state; /* NewValue, Deleted */
1007 unsigned long serial; /* # of last request processed by server */
1008 BoolDef send_event; /* true if this came from a SendEvent request */
1009 Display *display; /* Display the event was read from */
1013 } XSelectionClearEvent;
1017 unsigned long serial; /* # of last request processed by server */
1018 BoolDef send_event; /* true if this came from a SendEvent request */
1019 Display *display; /* Display the event was read from */
1026 } XSelectionRequestEvent;
1030 unsigned long serial; /* # of last request processed by server */
1031 BoolDef send_event; /* true if this came from a SendEvent request */
1032 Display *display; /* Display the event was read from */
1036 Atom property; /* ATOM or None */
1042 unsigned long serial; /* # of last request processed by server */
1043 BoolDef send_event; /* true if this came from a SendEvent request */
1044 Display *display; /* Display the event was read from */
1046 Colormap colormap; /* COLORMAP or None */
1047 #if defined(__cplusplus) || defined(c_plusplus)
1048 BoolDef c_new; /* C++ */
1052 int state; /* ColormapInstalled, ColormapUninstalled */
1057 unsigned long serial; /* # of last request processed by server */
1058 BoolDef send_event; /* true if this came from a SendEvent request */
1059 Display *display; /* Display the event was read from */
1068 } XClientMessageEvent;
1072 unsigned long serial; /* # of last request processed by server */
1073 BoolDef send_event; /* true if this came from a SendEvent request */
1074 Display *display; /* Display the event was read from */
1075 Window window; /* unused */
1076 int request; /* one of MappingModifier, MappingKeyboard,
1078 int first_keycode; /* first keycode */
1079 int count; /* defines range of change w. first_keycode*/
1084 Display *display; /* Display the event was read from */
1085 XID resourceid; /* resource id */
1086 unsigned long serial; /* serial number of failed request */
1087 unsigned char error_code; /* error code of failed request */
1088 unsigned char request_code; /* Major op-code of failed request */
1089 unsigned char minor_code; /* Minor op-code of failed request */
1094 unsigned long serial; /* # of last request processed by server */
1095 BoolDef send_event; /* true if this came from a SendEvent request */
1096 Display *display;/* Display the event was read from */
1097 Window window; /* window on which event was requested in event mask */
1101 * this union is defined so Xlib can always use the same sized
1102 * event structure internally, to avoid memory fragmentation.
1104 typedef union _XEvent {
1105 int type; /* must not be changed; first element */
1108 XButtonEvent xbutton;
1109 XMotionEvent xmotion;
1110 XCrossingEvent xcrossing;
1111 XFocusChangeEvent xfocus;
1112 XExposeEvent xexpose;
1113 XGraphicsExposeEvent xgraphicsexpose;
1114 XNoExposeEvent xnoexpose;
1115 XVisibilityEvent xvisibility;
1116 XCreateWindowEvent xcreatewindow;
1117 XDestroyWindowEvent xdestroywindow;
1120 XMapRequestEvent xmaprequest;
1121 XReparentEvent xreparent;
1122 XConfigureEvent xconfigure;
1123 XGravityEvent xgravity;
1124 XResizeRequestEvent xresizerequest;
1125 XConfigureRequestEvent xconfigurerequest;
1126 XCirculateEvent xcirculate;
1127 XCirculateRequestEvent xcirculaterequest;
1128 XPropertyEvent xproperty;
1129 XSelectionClearEvent xselectionclear;
1130 XSelectionRequestEvent xselectionrequest;
1131 XSelectionEvent xselection;
1132 XColormapEvent xcolormap;
1133 XClientMessageEvent xclient;
1134 XMappingEvent xmapping;
1136 XKeymapEvent xkeymap;
1140 typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
1141 Display* /* display */,
1142 XErrorEvent* /* error_event */
1148 unsigned long card32;
1152 XExtData *ext_data; /* hook for extension to hang data */
1153 Font fid; /* Font id for this font */
1154 unsigned direction; /* hint about direction the font is painted */
1155 unsigned min_char_or_byte2;/* first character */
1156 unsigned max_char_or_byte2;/* last character */
1157 unsigned min_byte1; /* first row that exists */
1158 unsigned max_byte1; /* last row that exists */
1159 BoolDef all_chars_exist;/* flag if all characters have non-zero size*/
1160 unsigned default_char; /* char to print for undefined character */
1161 int n_properties; /* how many properties there are */
1162 XFontProp *properties; /* pointer to array of additional properties*/
1163 XCharStruct min_bounds; /* minimum bounds over all existing char*/
1164 XCharStruct max_bounds; /* maximum bounds over all existing char*/
1165 XCharStruct *per_char; /* first_char to last_char information */
1166 int ascent; /* log. extent above baseline for spacing */
1167 int descent; /* log. descent below baseline for spacing */
1171 XStringStyle, /* STRING */
1172 XCompoundTextStyle, /* COMPOUND_TEXT */
1173 XTextStyle, /* text in owner's encoding (current locale)*/
1174 XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
1175 XUTF8StringStyle /* UTF8_STRING */
1176 } XICCEncodingStyle;
1178 typedef struct _XIM *XIM;
1179 typedef struct _XIC *XIC;
1182 * Data structure for "image" data, used by image manipulation routines.
1184 typedef struct _XImage {
1185 int width, height; /* size of image */
1186 int xoffset; /* number of pixels offset in X direction */
1187 int format; /* XYBitmap, XYPixmap, ZPixmap */
1188 char *data; /* pointer to image data */
1189 int byte_order; /* data byte order, LSBFirst, MSBFirst */
1190 int bitmap_unit; /* quant. of scanline 8, 16, 32 */
1191 int bitmap_bit_order; /* LSBFirst, MSBFirst */
1192 int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
1193 int depth; /* depth of image */
1194 int bytes_per_line; /* accelarator to next line */
1195 int bits_per_pixel; /* bits per pixel (ZPixmap) */
1196 unsigned long red_mask; /* bits in z arrangment */
1197 unsigned long green_mask;
1198 unsigned long blue_mask;
1199 XPointer obdata; /* hook for the object routines to hang on */
1200 struct funcs { /* image manipulation routines */
1201 struct _XImage *(*create_image)(
1202 struct _XDisplay* /* display */,
1203 Visual* /* visual */,
1204 unsigned int /* depth */,
1208 unsigned int /* width */,
1209 unsigned int /* height */,
1210 int /* bitmap_pad */,
1211 int /* bytes_per_line */);
1212 int (*destroy_image) (struct _XImage *);
1213 unsigned long (*get_pixel) (struct _XImage *, int, int);
1214 int (*put_pixel) (struct _XImage *, int, int, unsigned long);
1215 struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
1216 int (*add_pixel) (struct _XImage *, long);
1221 int max_keypermod; /* The server's max # of keys per modifier */
1222 KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
1231 unsigned short width, height;
1235 short x1, y1, x2, y2;
1239 Pixmap background_pixmap; /* background or None or ParentRelative */
1240 unsigned long background_pixel; /* background pixel */
1241 Pixmap border_pixmap; /* border of the window */
1242 unsigned long border_pixel; /* border pixel value */
1243 int bit_gravity; /* one of bit gravity values */
1244 int win_gravity; /* one of the window gravity values */
1245 int backing_store; /* NotUseful, WhenMapped, Always */
1246 unsigned long backing_planes;/* planes to be preseved if possible */
1247 unsigned long backing_pixel;/* value to use in restoring planes */
1248 BoolDef save_under; /* should bits under be saved? (popups) */
1249 long event_mask; /* set of events that should be saved */
1250 long do_not_propagate_mask; /* set of events that should not propagate */
1251 BoolDef override_redirect; /* boolean value for override-redirect */
1252 Colormap colormap; /* color map to be associated with window */
1253 Cursor cursor; /* cursor to be displayed (or None) */
1254 } XSetWindowAttributes;
1257 long flags; /* marks which fields in this structure are defined */
1258 int x, y; /* obsolete for new window mgrs, but clients */
1259 int width, height; /* should set so old wm's don't mess up */
1260 int min_width, min_height;
1261 int max_width, max_height;
1262 int width_inc, height_inc;
1264 int x; /* numerator */
1265 int y; /* denominator */
1266 } min_aspect, max_aspect;
1267 int base_width, base_height; /* added by ICCCM version 1 */
1268 int win_gravity; /* added by ICCCM version 1 */
1273 unsigned long red_max;
1274 unsigned long red_mult;
1275 unsigned long green_max;
1276 unsigned long green_mult;
1277 unsigned long blue_max;
1278 unsigned long blue_mult;
1279 unsigned long base_pixel;
1280 VisualID visualid; /* added by ICCCM version 1 */
1281 XID killid; /* added by ICCCM version 1 */
1282 } XStandardColormap;
1285 unsigned char *value; /* same as Property routines */
1286 Atom encoding; /* prop type */
1287 int format; /* prop data format: 8, 16, or 32 */
1288 unsigned long nitems; /* number of data items in value */
1296 #if defined(__cplusplus) || defined(c_plusplus)
1297 int c_class; /* C++ */
1301 unsigned long red_mask;
1302 unsigned long green_mask;
1303 unsigned long blue_mask;
1309 long flags; /* marks which fields in this structure are defined */
1310 BoolDef input; /* does this application rely on the window manager to
1311 get keyboard input? */
1312 int initial_state; /* see below */
1313 Pixmap icon_pixmap; /* pixmap to be used as icon */
1314 Window icon_window; /* window to be used as icon */
1315 int icon_x, icon_y; /* initial position of icon */
1316 Pixmap icon_mask; /* icon mask bitmap */
1317 XID window_group; /* id of related window group */
1318 /* this structure may be extended in the future */
1322 int x, y; /* location of window */
1323 int width, height; /* width and height of window */
1324 int border_width; /* border width of window */
1325 int depth; /* depth of window */
1326 Visual *visual; /* the associated visual structure */
1327 Window root; /* root of screen containing window */
1328 #if defined(__cplusplus) || defined(c_plusplus)
1329 int c_class; /* C++ InputOutput, InputOnly*/
1331 int class; /* InputOutput, InputOnly*/
1333 int bit_gravity; /* one of bit gravity values */
1334 int win_gravity; /* one of the window gravity values */
1335 int backing_store; /* NotUseful, WhenMapped, Always */
1336 unsigned long backing_planes;/* planes to be preserved if possible */
1337 unsigned long backing_pixel;/* value to be used when restoring planes */
1338 BoolDef save_under; /* boolean, should bits under be saved? */
1339 Colormap colormap; /* color map to be associated with window */
1340 BoolDef map_installed; /* boolean, is color map currently installed*/
1341 int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
1342 long all_event_masks; /* set of events all people have interest in*/
1343 long your_event_mask; /* my event mask */
1344 long do_not_propagate_mask; /* set of events that should not propagate */
1345 BoolDef override_redirect; /* boolean value for override-redirect */
1346 Screen *screen; /* back pointer to correct screen */
1347 } XWindowAttributes;
1349 struct _XrmHashBucketRec;
1351 /* needed for xdefaults.c */
1352 typedef struct _XrmHashBucketRec *XrmDatabase;
1353 typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
1354 typedef int XrmQuark, *XrmQuarkList;
1355 #define NULLQUARK ((XrmQuark) 0)
1356 typedef XrmQuark XrmRepresentation;
1360 } XrmValue, *XrmValuePtr;
1362 /* extend for defining an event callback */
1363 #define USING_W11LIB
1364 typedef void (proto_W11EventHandler)(XEvent *ev);
1365 void W11AddEventHandler(Display *display, proto_W11EventHandler *ev);
1369 Display *XOpenDisplay(const char *name);
1371 int XCloseDisplay(Display *display);
1373 char *XDisplayString(Display *display);
1375 int XSync(Display *display,int discard);
1377 int XFlush(Display *display);
1379 XVisualInfo *XGetVisualInfo(
1385 StatusDef XMatchVisualInfo(
1390 XVisualInfo* vinfo_return);
1392 int XClearWindow(Display *display, Window w);
1394 Window XCreateSimpleWindow(
1403 unsigned long brd_col);
1405 Window XCreateWindow(
1411 unsigned int height,
1416 unsigned long valuemask,
1417 XSetWindowAttributes *attr);
1423 StatusDef XGetGeometry(
1429 unsigned int *width,
1430 unsigned int *height,
1432 unsigned int *depth);
1434 StatusDef XGetWindowAttributes(Display *display,
1436 XWindowAttributes *wattr);
1438 int XSelectInput(Display *display,
1442 int XMapWindow(Display *display,
1445 int XIconifyWindow(Display *display,
1452 XGCValues *gc_values);
1461 unsigned long color);
1462 int XDrawString(Display *display,
1469 int XDrawString16(Display *display,
1471 GC gc, int x, int y,
1475 int XDrawImageString(
1484 int XDrawImageString16(Display *display,
1486 GC gc, int x, int y,
1495 unsigned int w, unsigned int h);
1500 unsigned int width, unsigned int height,
1503 Region XCreateRegion();
1514 int XDestroyRegion(Region hrgn);
1516 int XUnionRectWithRegion(XRectangle *rect,
1524 unsigned int width,unsigned int height,
1532 unsigned int width,unsigned height,
1540 int nps, int shape, int mode);
1546 int x1,int y1, int x2,int y2);
1572 unsigned int width, unsigned int height);
1581 Pixmap XCreatePixmap(
1584 unsigned int width, unsigned int height,
1585 unsigned int depth);
1587 Pixmap XCreateBitmapFromData(Display *display,
1588 Drawable drawable, const char *data,
1589 unsigned int width, unsigned int height);
1599 int src_x, int src_y,
1600 unsigned int width, unsigned int height,
1601 int dest_x, int dest_y);
1607 unsigned int width, unsigned int height,
1608 unsigned long plane_mask,
1611 XImage *XCreateImage(
1618 unsigned int width, unsigned int height,
1619 int bitmap_pad, int bytes_per_line);
1625 int sx,int sy,int dx,int dy,
1626 unsigned int width,unsigned int height);
1628 int XSetWindowBackground(
1633 int XSetWindowBackgroundPixmap(
1636 Pixmap background_tile);
1643 int XSetDashes(Display *display,
1644 GC gc, int dash_offset,
1645 const char * dash_list,
1648 int XChangeWindowAttributes(
1651 unsigned long vmask,
1652 XSetWindowAttributes *attr);
1654 int XLowerWindow(Display *display,
1684 XRootWindowOfScreen(Screen *scr);
1686 BoolDef XTranslateCoordinates(
1688 Window sw, Window dw,
1689 int sx, int sy, int *dx, int *dy,
1693 XUnmapWindow(Display *display,
1699 unsigned long vmask,
1724 int ls, int cs, int js);
1729 unsigned long pmask);
1739 unsigned long *pmasks,
1741 unsigned long *pixels,
1748 unsigned long *pixels,
1750 int nr,int ng,int nb,
1751 unsigned long *rmask,
1752 unsigned long *gmask,
1753 unsigned long *bmask);
1755 XAllocNamedColor(Display *display,
1756 Colormap cmap, const char *cname,
1757 XColor *cell, XColor *rgb);
1765 XGetStandardColormap(
1768 XStandardColormap *cmapinf,
1801 BoolDef XGetFontProperty(
1802 XFontStruct *fstruct,
1804 unsigned long *val);
1807 XLoadQueryFont(Display *display, const char *name);
1817 unsigned int keycode,
1826 XStringToKeysym(const char *str);
1829 XGetModifierMapping(Display *display);
1832 XFreeModifiermap(XModifierKeymap *modmap);
1846 XFontStruct *fstruct,
1849 int *dir,int *ascent,int *descent,
1850 XCharStruct *overall);
1853 XFontStruct *fstruct,
1856 int *dir, int *ascent, int *descent,
1857 XCharStruct *overall);
1861 XFontStruct *fstruct,
1866 XFontStruct *fstruct,
1870 XGetErrorDatabaseText(
1872 const char *name, const char *msg,
1885 XSetErrorHandler(XErrorHandler handler);
1888 XDefaultScreen(Display *display);
1911 unsigned int shape);
1916 XColor *fg,XColor *bg);
1921 Window sw,Window dw,
1923 unsigned int swidth,unsigned int sheight,
1947 XComposeStatus *status);
1950 XRefreshKeyboardMapping(XMappingEvent *event);
1956 XClassHint *chints);
1975 XStoreName(Display *display,
1982 char **window_name_return);
1985 XDoesBackingStore(Screen *scr);
1988 XInitExtension(Display *display,
1994 XServerVendor(Display *display);
1997 XSetIconName(Display *display,
2019 Atom sel, Atom target, Atom prop,
2022 BoolDef XCheckTypedEvent(
2026 BoolDef XCheckWindowEvent(
2032 XPending(Display *display);
2035 XPutBackEvent(Display *display,
2046 BoolDef XCheckTypedWindowEvent(
2050 XEvent* event_return);
2066 const char *property_name,
2067 BoolDef only_if_exists);
2081 const unsigned char *data,
2093 Atom *actual_type_return,
2094 int *actual_format_return,
2095 unsigned long *nitems_return,
2096 unsigned long *bytes_after_return,
2097 unsigned char **prop_return);
2104 int XFreeExtensionList(char **list);
2111 XGCValues* gc_values);
2114 XConnectionNumber(Display* display);
2117 XFreeFont(Display* display,XFontStruct* font_struct);
2120 XSetLocaleModifiers(const char* modifier_list);
2125 struct _XrmHashBucketRec* rdb,
2130 XGetIMValues(XIM im , ...);
2132 XIC XCreateIC(XIM im , ...);
2137 BoolDef XFilterEvent(XEvent* event,Window window);
2140 XrmQuarkToString(void *quark);
2145 XKeyPressedEvent* event,
2146 char* buffer_return,
2148 KeySym* keysym_return,
2149 StatusDef* status_return);
2151 XmbTextPropertyToTextList(
2153 XTextProperty *text_prop,
2154 char ***list_return,
2158 XFreeStringList(char **list);
2160 int XmbTextListToTextProperty(
2164 XICCEncodingStyle style,
2165 XTextProperty *text_prop_return);
2168 XSetICFocus(XIC ic);
2171 XUnsetICFocus(XIC ic);
2173 BoolDef XQueryPointer(
2176 Window* root_return,
2177 Window* child_return,
2182 unsigned int* mask_return);
2188 unsigned int* width,
2189 unsigned int* height);
2195 unsigned int height);
2197 void XSetWMNormalHints(Display* display,Window w,XSizeHints* hints);
2199 void XSetWMProperties(
2202 XTextProperty* window_name,
2203 XTextProperty* icon_name,
2206 XSizeHints* normal_hints,
2208 XClassHint* class_hints);
2210 int XDefineCursor(Display* display,Window w,Cursor cursor);
2212 int XMoveResizeWindow(
2218 unsigned int height);
2234 XFreeColors(Display *display,
2236 unsigned long pixels[],
2238 unsigned long planes);
2240 XGrabServer(Display *display);
2243 XUngrabServer(Display *display);