ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/W11/X11/Xlib.h
Revision: 1.1
Committed: Mon Nov 24 17:28:07 2003 UTC (20 years, 7 months ago) by pcg
Content type: text/plain
Branch: MAIN
CVS Tags: rel-7_0, post_menubar_removal, rel-6_2, rel-6_3, rel-6_0, rel-6_1, rel-2_1_0, rel-5_5, rel-5_4, rel-5_7, rel-5_1, rel-5_0, rel-5_3, rel-5_2, rel-4_4, rel-4_6, rel-4_7, rel-5_9, rel-5_8, rel-4_2, rel-4_3, rel-3_7, rel-3_8, rel-3_5, rel-3_4, rel-3_3, rel-3_2, rel-2_8, rel-3_0, rel-4_0, rel-2_4, rel-2_5, rel-2_2, rel-2_3, rel-2_0, rel-4_1, rel-1-9, rel-1-3, rel-1-2, rxvt-2-0, rel-1_9, rel-3_6, rel-2_7, rel-4_8, rel-4_9
Log Message:
*** empty log message ***

File Contents

# Content
1 /*
2
3 Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
4
5 All Rights Reserved.
6
7 The above copyright notice and this permission notice shall be included in
8 all copies or substantial portions of the Software.
9
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.
16
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.
20
21 */
22
23 #ifndef __XLIB_H
24 #define __XLIB_H
25
26 /* typedef struct _XrmHashBucketRec; */
27 typedef unsigned long Atom;
28 typedef unsigned long Time;
29 typedef unsigned long XID;
30
31 #ifndef Bool
32 #define Bool int
33 #endif
34
35 typedef int BoolDef;
36
37 typedef XID Window;
38 typedef XID Drawable;
39 typedef XID Font;
40 typedef XID Pixmap;
41 typedef XID Cursor;
42 typedef XID Colormap;
43 typedef XID KeySym;
44 typedef XID GContext;
45
46 typedef unsigned char KeyCode;
47
48 typedef char *XPointer;
49 typedef unsigned long VisualID;
50
51 #define PIXEL_ALREADY_TYPEDEFED
52 typedef unsigned long Pixel;
53
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)))
58
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)
71
72 #ifndef None
73 #define None 0L /* universal null resource or null atom */
74 #endif
75
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)
113 #define KeyPress 2
114 #define KeyRelease 3
115 #define ButtonPress 4
116 #define ButtonRelease 5
117 #define MotionNotify 6
118 #define EnterNotify 7
119 #define LeaveNotify 8
120 #define FocusIn 9
121 #define FocusOut 10
122 #define KeymapNotify 11
123 #define Expose 12
124 #define GraphicsExpose 13
125 #define NoExpose 14
126 #define VisibilityNotify 15
127 #define CreateNotify 16
128 #define DestroyNotify 17
129 #define UnmapNotify 18
130 #define MapNotify 19
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 */
169 #define Button1 1
170 #define Button2 2
171 #define Button3 3
172 #define Button4 4
173 #define Button5 5
174 #define NotifyNormal 0
175 #define NotifyGrab 1
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
190 #define PlaceOnTop 0
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
205 #define GrabFrozen 4
206 #define AsyncPointer 0
207 #define SyncPointer 1
208 #define ReplayPointer 2
209 #define AsyncKeyboard 3
210 #define SyncKeyboard 4
211 #define ReplayKeyboard 5
212 #define AsyncBoth 6
213 #define SyncBoth 7
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 */
227 #define BadAccess 10
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
238 #define InputOnly 2
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)
254 #define CWX (1<<0)
255 #define CWY (1<<1)
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
273 #define NotUseful 0
274 #define WhenMapped 1
275 #define Always 2
276 #define IsUnmapped 0
277 #define IsUnviewable 1
278 #define IsViewable 2
279 #define SetModeInsert 0
280 #define SetModeDelete 1
281 #define DestroyAll 0
282 #define RetainPermanent 1
283 #define RetainTemporary 2
284 #define Above 0
285 #define Below 1
286 #define TopIf 2
287 #define BottomIf 3
288 #define Opposite 4
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 */
310 #define LineSolid 0
311 #define LineOnOffDash 1
312 #define LineDoubleDash 2
313 #define CapNotLast 0
314 #define CapButt 1
315 #define CapRound 2
316 #define CapProjecting 3
317 #define JoinMiter 0
318 #define JoinRound 1
319 #define JoinBevel 2
320 #define FillSolid 0
321 #define FillTiled 1
322 #define FillStippled 2
323 #define FillOpaqueStippled 3
324 #define EvenOddRule 0
325 #define WindingRule 1
326 #define ClipByChildren 0
327 #define IncludeInferiors 1
328 #define Unsorted 0
329 #define YSorted 1
330 #define YXSorted 2
331 #define YXBanded 3
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)
362 #define GCLastBit 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 */
371 #define DoRed (1<<0)
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
380 #define LedModeOff 0
381 #define LedModeOn 1
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
406 #define HostInsert 0
407 #define HostDelete 1
408 #define EnableAccess 1
409 #define DisableAccess 0
410 #define StaticGray 0
411 #define GrayScale 1
412 #define StaticColor 2
413 #define PseudoColor 3
414 #define TrueColor 4
415 #define DirectColor 5
416 #define LSBFirst 0
417 #define MSBFirst 1
418
419 #define True 1
420 #define False 0
421
422 #define XK_Alt_L 0xFFE9 /* Left alt */
423
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 */
434
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 */
446
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
461
462 #define XK_F1 0xFFBE
463 #define XK_F2 0xFFBF
464 #define XK_F3 0xFFC0
465 #define XK_F4 0xFFC1
466 #define XK_F5 0xFFC2
467 #define XK_F6 0xFFC3
468 #define XK_F7 0xFFC4
469 #define XK_F8 0xFFC5
470 #define XK_F9 0xFFC6
471 #define XK_F10 0xFFC7
472 #define XK_F11 0xFFC8
473 #define XK_L1 0xFFC8
474 #define XK_F12 0xFFC9
475
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
487
488 #define USPosition (1L << 0) /* user specified x, y */
489 #define USSize (1L << 1) /* user specified width, height */
490
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 */
499
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
508
509 #define XNoMemory -1
510 #define XLocaleNotSupported -2
511 #define XConverterNotFound -3
512
513 #define LC_CTYPE 2
514
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
523 #define XC_xterm 152
524
525 typedef struct _XRegion *Region;
526 typedef struct _XOC *XOC, *XFontSet;
527
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
533 );
534 XPointer private_data; /* data private to this extension. */
535 } XExtData;
536
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 */
542 } XExtCodes;
543
544 typedef struct {
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.) */
549 #else
550 int class; /* class of screen (monochrome, etc.) */
551 #endif
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 */
555 } Visual;
556
557 typedef struct {
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 */
561 } Depth;
562
563 typedef struct {
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 */
580 int ts_y_origin;
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 */
585 int clip_y_origin;
586 Pixmap clip_mask; /* bitmap clipping; other calls for rects */
587 int dash_offset; /* patterned/dashed line information */
588 char dashes;
589 } XGCValues;
590
591 typedef struct _XGC
592 {
593 XExtData *ext_data; /* hook for extension to hang data */
594 GContext gid; /* protocol ID for graphics context */
595 int rects;
596 int dashes;
597 XGCValues values;
598 int dirty;
599 } *GC;
600
601 typedef struct {
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 */
617 BoolDef save_unders;
618 long root_input_mask; /* initial root input mask */
619 } Screen;
620
621 typedef struct {
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 */
626 } ScreenFormat;
627
628 typedef struct _XDisplay
629 {
630 XExtData *ext_data; /* hook for extension to hang data */
631 struct _XPrivate *private1;
632 int fd; /* Network socket. */
633 int private2;
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 */
637 XID private3;
638 XID private4;
639 XID private5;
640 int private6;
641 XID (*resource_alloc)( /* allocator function */
642 struct _XDisplay*
643 );
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 */
650 int private8;
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. */
656 XPointer private11;
657 XPointer private12;
658 XPointer private13;
659 XPointer private14;
660 unsigned max_request_size; /* maximum number 32 bit words in request*/
661 struct _XrmHashBucketRec *db;
662 int (*private15)(
663 struct _XDisplay*
664 );
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 */
673 XPointer private17;
674 XPointer private18;
675 int private19;
676 char *xdefaults; /* contents of defaults from server */
677 /* there is more to this structure, but it is private to Xlib */
678 }
679 Display, *_XPrivDisplay;
680
681 typedef int StatusDef;
682
683 typedef struct { /* normal 16 bit characters are two bytes */
684 unsigned char byte1;
685 unsigned char byte2;
686 } XChar2b;
687
688 typedef struct {
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) */
695 } XCharStruct;
696
697 typedef struct {
698 char *res_name;
699 char *res_class;
700 } XClassHint;
701
702 typedef struct {
703 unsigned long pixel;
704 unsigned short red, green, blue;
705 char flags; /* do_red, do_green, do_blue */
706 char pad;
707 } XColor;
708
709 typedef struct _XComposeStatus {
710 XPointer compose_ptr; /* state table pointer */
711 int chars_matched; /* match state */
712 } XComposeStatus;
713
714 /* events --- goes on for a bit */
715 typedef struct {
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 */
729 } XKeyEvent;
730
731 typedef XKeyEvent XKeyPressedEvent;
732 typedef XKeyEvent XKeyReleasedEvent;
733
734 typedef struct {
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 */
748 } XButtonEvent;
749 typedef XButtonEvent XButtonPressedEvent;
750 typedef XButtonEvent XButtonReleasedEvent;
751
752 typedef struct {
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 */
766 } XMotionEvent;
767 typedef XMotionEvent XPointerMovedEvent;
768
769 typedef struct {
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 */
781 int detail;
782 /*
783 * NotifyAncestor, NotifyVirtual, NotifyInferior,
784 * NotifyNonlinear,NotifyNonlinearVirtual
785 */
786 BoolDef same_screen; /* same screen flag */
787 BoolDef focus; /* boolean focus */
788 unsigned int state; /* key or button mask */
789 } XCrossingEvent;
790 typedef XCrossingEvent XEnterWindowEvent;
791 typedef XCrossingEvent XLeaveWindowEvent;
792
793 typedef struct {
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 */
800 int detail;
801 /*
802 * NotifyAncestor, NotifyVirtual, NotifyInferior,
803 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
804 * NotifyPointerRoot, NotifyDetailNone
805 */
806 } XFocusChangeEvent;
807 typedef XFocusChangeEvent XFocusInEvent;
808 typedef XFocusChangeEvent XFocusOutEvent;
809
810 /* generated on EnterWindow and FocusIn when KeyMapState selected */
811 typedef struct {
812 int type;
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 */
816 Window window;
817 char key_vector[32];
818 } XKeymapEvent;
819
820 typedef struct {
821 int type;
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 */
825 Window window;
826 int x, y;
827 int width, height;
828 int count; /* if non-zero, at least this many more */
829 } XExposeEvent;
830
831 typedef struct {
832 int type;
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 */
836 Drawable drawable;
837 int x, y;
838 int width, height;
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;
843
844 typedef struct {
845 int type;
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 */
849 Drawable drawable;
850 int major_code; /* core is CopyArea or CopyPlane */
851 int minor_code; /* not defined in the core */
852 } XNoExposeEvent;
853
854 typedef struct {
855 int type;
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 */
859 Window window;
860 int state; /* Visibility state */
861 } XVisibilityEvent;
862
863 typedef struct {
864 int type;
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;
875
876 typedef struct {
877 int type;
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 */
881 Window event;
882 Window window;
883 } XDestroyWindowEvent;
884
885 typedef struct {
886 int type;
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 */
890 Window event;
891 Window window;
892 BoolDef from_configure;
893 } XUnmapEvent;
894
895 typedef struct {
896 int type;
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 */
900 Window event;
901 Window window;
902 BoolDef override_redirect; /* boolean, is override set... */
903 } XMapEvent;
904
905 typedef struct {
906 int type;
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 */
910 Window parent;
911 Window window;
912 } XMapRequestEvent;
913
914 typedef struct {
915 int type;
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 */
919 Window event;
920 Window window;
921 Window parent;
922 int x, y;
923 BoolDef override_redirect;
924 } XReparentEvent;
925
926 typedef struct {
927 int type;
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 */
931 Window event;
932 Window window;
933 int x, y;
934 int width, height;
935 int border_width;
936 Window above;
937 BoolDef override_redirect;
938 } XConfigureEvent;
939
940 typedef struct {
941 int type;
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 */
945 Window event;
946 Window window;
947 int x, y;
948 } XGravityEvent;
949
950 typedef struct {
951 int type;
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 */
955 Window window;
956 int width, height;
957 } XResizeRequestEvent;
958
959 typedef struct {
960 int type;
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 */
964 Window parent;
965 Window window;
966 int x, y;
967 int width, height;
968 int border_width;
969 Window above;
970 int detail; /* Above, Below, TopIf, BottomIf, Opposite */
971 unsigned long value_mask;
972 } XConfigureRequestEvent;
973
974 typedef struct {
975 int type;
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 */
979 Window event;
980 Window window;
981 int place; /* PlaceOnTop, PlaceOnBottom */
982 } XCirculateEvent;
983
984 typedef struct {
985 int type;
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 */
989 Window parent;
990 Window window;
991 int place; /* PlaceOnTop, PlaceOnBottom */
992 } XCirculateRequestEvent;
993
994 typedef struct {
995 int type;
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 */
999 Window window;
1000 Atom atom;
1001 Time time;
1002 int state; /* NewValue, Deleted */
1003 } XPropertyEvent;
1004
1005 typedef struct {
1006 int type;
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 */
1010 Window window;
1011 Atom selection;
1012 Time time;
1013 } XSelectionClearEvent;
1014
1015 typedef struct {
1016 int type;
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 */
1020 Window owner;
1021 Window requestor;
1022 Atom selection;
1023 Atom target;
1024 Atom property;
1025 Time time;
1026 } XSelectionRequestEvent;
1027
1028 typedef struct {
1029 int type;
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 */
1033 Window requestor;
1034 Atom selection;
1035 Atom target;
1036 Atom property; /* ATOM or None */
1037 Time time;
1038 } XSelectionEvent;
1039
1040 typedef struct {
1041 int type;
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 */
1045 Window window;
1046 Colormap colormap; /* COLORMAP or None */
1047 #if defined(__cplusplus) || defined(c_plusplus)
1048 BoolDef c_new; /* C++ */
1049 #else
1050 BoolDef new;
1051 #endif
1052 int state; /* ColormapInstalled, ColormapUninstalled */
1053 } XColormapEvent;
1054
1055 typedef struct {
1056 int type;
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 */
1060 Window window;
1061 Atom message_type;
1062 int format;
1063 union {
1064 char b[20];
1065 short s[10];
1066 long l[5];
1067 } data;
1068 } XClientMessageEvent;
1069
1070 typedef struct {
1071 int type;
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,
1077 MappingPointer */
1078 int first_keycode; /* first keycode */
1079 int count; /* defines range of change w. first_keycode*/
1080 } XMappingEvent;
1081
1082 typedef struct {
1083 int type;
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 */
1090 } XErrorEvent;
1091
1092 typedef struct {
1093 int type;
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 */
1098 } XAnyEvent;
1099
1100 /*
1101 * this union is defined so Xlib can always use the same sized
1102 * event structure internally, to avoid memory fragmentation.
1103 */
1104 typedef union _XEvent {
1105 int type; /* must not be changed; first element */
1106 XAnyEvent xany;
1107 XKeyEvent xkey;
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;
1118 XUnmapEvent xunmap;
1119 XMapEvent xmap;
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;
1135 XErrorEvent xerror;
1136 XKeymapEvent xkeymap;
1137 long pad[24];
1138 } XEvent;
1139
1140 typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
1141 Display* /* display */,
1142 XErrorEvent* /* error_event */
1143 );
1144
1145
1146 typedef struct {
1147 Atom name;
1148 unsigned long card32;
1149 } XFontProp;
1150
1151 typedef struct {
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 */
1168 } XFontStruct;
1169
1170 typedef enum {
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;
1177
1178 typedef struct _XIM *XIM;
1179 typedef struct _XIC *XIC;
1180
1181 /*
1182 * Data structure for "image" data, used by image manipulation routines.
1183 */
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 */,
1205 int /* format */,
1206 int /* offset */,
1207 char* /* data */,
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);
1217 } f;
1218 } XImage;
1219
1220 typedef struct {
1221 int max_keypermod; /* The server's max # of keys per modifier */
1222 KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
1223 } XModifierKeymap;
1224
1225 typedef struct {
1226 short x, y;
1227 } XPoint;
1228
1229 typedef struct {
1230 short x, y;
1231 unsigned short width, height;
1232 } XRectangle;
1233
1234 typedef struct {
1235 short x1, y1, x2, y2;
1236 } XSegment;
1237
1238 typedef struct {
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;
1255
1256 typedef struct {
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;
1263 struct {
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 */
1269 } XSizeHints;
1270
1271 typedef struct {
1272 Colormap colormap;
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;
1283
1284 typedef struct {
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 */
1289 } XTextProperty;
1290
1291 typedef struct {
1292 Visual *visual;
1293 VisualID visualid;
1294 int screen;
1295 int depth;
1296 #if defined(__cplusplus) || defined(c_plusplus)
1297 int c_class; /* C++ */
1298 #else
1299 int class;
1300 #endif
1301 unsigned long red_mask;
1302 unsigned long green_mask;
1303 unsigned long blue_mask;
1304 int colormap_size;
1305 int bits_per_rgb;
1306 } XVisualInfo;
1307
1308 typedef struct {
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 */
1319 } XWMHints;
1320
1321 typedef struct {
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*/
1330 #else
1331 int class; /* InputOutput, InputOnly*/
1332 #endif
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;
1348
1349 struct _XrmHashBucketRec;
1350
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;
1357 typedef struct {
1358 unsigned int size;
1359 XPointer addr;
1360 } XrmValue, *XrmValuePtr;
1361
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);
1366
1367 /* functions */
1368
1369 Display *XOpenDisplay(const char *name);
1370
1371 int XCloseDisplay(Display *display);
1372
1373 char *XDisplayString(Display *display);
1374
1375 int XSync(Display *display,int discard);
1376
1377 int XFlush(Display *display);
1378
1379 XVisualInfo *XGetVisualInfo(
1380 Display *display,
1381 long vinm,
1382 XVisualInfo *vint,
1383 int *n);
1384
1385 StatusDef XMatchVisualInfo(
1386 Display* display,
1387 int screen,
1388 int depth,
1389 int class,
1390 XVisualInfo* vinfo_return);
1391
1392 int XClearWindow(Display *display, Window w);
1393
1394 Window XCreateSimpleWindow(
1395 Display *display,
1396 Window parent,
1397 int x,
1398 int y,
1399 unsigned int brd,
1400 unsigned int w,
1401 unsigned int h,
1402 unsigned long bg,
1403 unsigned long brd_col);
1404
1405 Window XCreateWindow(
1406 Display *display,
1407 Window parent,
1408 int x,
1409 int y,
1410 unsigned int width,
1411 unsigned int height,
1412 unsigned int bw,
1413 int depth,
1414 unsigned int class,
1415 Visual *visual,
1416 unsigned long valuemask,
1417 XSetWindowAttributes *attr);
1418
1419 int XDestroyWindow(
1420 Display *display,
1421 Window w);
1422
1423 StatusDef XGetGeometry(
1424 Display *display,
1425 Drawable w,
1426 Window *root,
1427 int *x,
1428 int *y,
1429 unsigned int *width,
1430 unsigned int *height,
1431 unsigned int *bw,
1432 unsigned int *depth);
1433
1434 StatusDef XGetWindowAttributes(Display *display,
1435 Window w,
1436 XWindowAttributes *wattr);
1437
1438 int XSelectInput(Display *display,
1439 Window window,
1440 long mask);
1441
1442 int XMapWindow(Display *display,
1443 Window window);
1444
1445 int XIconifyWindow(Display *display,
1446 Window w,
1447 int screen_number);
1448 GC XCreateGC(
1449 Display *display,
1450 Drawable window,
1451 unsigned long mask,
1452 XGCValues *gc_values);
1453
1454 int XFreeGC(
1455 Display *display,
1456 GC gc);
1457
1458 int XSetForeground(
1459 Display *display,
1460 GC gc,
1461 unsigned long color);
1462 int XDrawString(Display *display,
1463 Drawable window,
1464 GC gc,
1465 int x,
1466 int y,
1467 const char* str,
1468 int len);
1469 int XDrawString16(Display *display,
1470 Drawable window,
1471 GC gc, int x, int y,
1472 const XChar2b* str,
1473 int len);
1474
1475 int XDrawImageString(
1476 Display* display,
1477 Drawable d,
1478 GC gc,
1479 int x,
1480 int y,
1481 const char* string,
1482 int length);
1483
1484 int XDrawImageString16(Display *display,
1485 Drawable window,
1486 GC gc, int x, int y,
1487 const XChar2b* str,
1488 int len);
1489
1490 int XFillRectangle(
1491 Display *display,
1492 Drawable window,
1493 GC gc,
1494 int x, int y,
1495 unsigned int w, unsigned int h);
1496 int XClearArea(
1497 Display *display,
1498 Window w,
1499 int x, int y,
1500 unsigned int width, unsigned int height,
1501 BoolDef exposures);
1502
1503 Region XCreateRegion();
1504
1505 int XClipBox(
1506 Region hrgn,
1507 XRectangle *rect);
1508
1509 int XSetRegion(
1510 Display *display,
1511 GC gc,
1512 Region hrgn);
1513
1514 int XDestroyRegion(Region hrgn);
1515
1516 int XUnionRectWithRegion(XRectangle *rect,
1517 Region hrgnsrc,
1518 Region hrgndest);
1519 int XDrawArc(
1520 Display *display,
1521 Drawable w,
1522 GC gc,
1523 int x, int y,
1524 unsigned int width,unsigned int height,
1525 int a1, int a2);
1526
1527 int XFillArc(
1528 Display *display,
1529 Drawable w,
1530 GC gc,
1531 int x, int y,
1532 unsigned int width,unsigned height,
1533 int a1, int a2);
1534
1535 int XFillPolygon(
1536 Display *display,
1537 Drawable w,
1538 GC gc,
1539 XPoint *points,
1540 int nps, int shape, int mode);
1541
1542 int XDrawLine(
1543 Display *display,
1544 Drawable w,
1545 GC gc,
1546 int x1,int y1, int x2,int y2);
1547
1548 int XDrawLines(
1549 Display *display,
1550 Drawable w,
1551 GC gc,
1552 XPoint *points,
1553 int nps,int mode);
1554
1555 int XDrawPoints(
1556 Display *display,
1557 Drawable w,
1558 GC gc,
1559 XPoint *points,
1560 int nps, int mode);
1561
1562 int XDrawPoint(
1563 Display *display,
1564 Drawable w,
1565 GC gc,
1566 int x, int y);
1567 int XDrawRectangle(
1568 Display *display,
1569 Drawable w,
1570 GC gc,
1571 int x, int y,
1572 unsigned int width, unsigned int height);
1573
1574 int XDrawSegments(
1575 Display *display,
1576 Drawable w,
1577 GC gc,
1578 XSegment *segs,
1579 int nsegs);
1580
1581 Pixmap XCreatePixmap(
1582 Display *display,
1583 Drawable drawable,
1584 unsigned int width, unsigned int height,
1585 unsigned int depth);
1586
1587 Pixmap XCreateBitmapFromData(Display *display,
1588 Drawable drawable, const char *data,
1589 unsigned int width, unsigned int height);
1590 int XFreePixmap(
1591 Display *display,
1592 Pixmap pixmap);
1593
1594 int XCopyArea(
1595 Display *display,
1596 Drawable src,
1597 Drawable dest,
1598 GC gc,
1599 int src_x, int src_y,
1600 unsigned int width, unsigned int height,
1601 int dest_x, int dest_y);
1602
1603 XImage *XGetImage(
1604 Display *display,
1605 Drawable drawable,
1606 int x, int y,
1607 unsigned int width, unsigned int height,
1608 unsigned long plane_mask,
1609 int format);
1610
1611 XImage *XCreateImage(
1612 Display *display,
1613 Visual *visual,
1614 unsigned int depth,
1615 int format,
1616 int offset,
1617 char *data,
1618 unsigned int width, unsigned int height,
1619 int bitmap_pad, int bytes_per_line);
1620 int XPutImage(
1621 Display *display,
1622 Drawable w,
1623 GC gc,
1624 XImage *image,
1625 int sx,int sy,int dx,int dy,
1626 unsigned int width,unsigned int height);
1627
1628 int XSetWindowBackground(
1629 Display *display,
1630 Window w,
1631 unsigned long bg);
1632
1633 int XSetWindowBackgroundPixmap(
1634 Display *display,
1635 Window w,
1636 Pixmap background_tile);
1637
1638 int XSetFillStyle(
1639 Display *display,
1640 GC gc,
1641 int fs);
1642
1643 int XSetDashes(Display *display,
1644 GC gc, int dash_offset,
1645 const char * dash_list,
1646 int n);
1647
1648 int XChangeWindowAttributes(
1649 Display *display,
1650 Window w,
1651 unsigned long vmask,
1652 XSetWindowAttributes *attr);
1653
1654 int XLowerWindow(Display *display,
1655 Window w);
1656
1657 int XMapRaised(
1658 Display *display,
1659 Window w);
1660
1661 int
1662 XMapSubwindows(
1663 Display *display,
1664 Window w);
1665
1666 StatusDef
1667 XQueryTree(
1668 Display *display,
1669 Window w,
1670 Window* root,
1671 Window* parent,
1672 Window** ch,
1673 unsigned int *n);
1674 int
1675 XRaiseWindow(
1676 Display *display,
1677 Window w);
1678
1679 Window
1680 XRootWindow(
1681 Display *display,
1682 int scr);
1683 Window
1684 XRootWindowOfScreen(Screen *scr);
1685
1686 BoolDef XTranslateCoordinates(
1687 Display *display,
1688 Window sw, Window dw,
1689 int sx, int sy, int *dx, int *dy,
1690 Window *ch);
1691
1692 int
1693 XUnmapWindow(Display *display,
1694 Window w);
1695 int
1696 XCopyGC(
1697 Display *display,
1698 GC sgc,
1699 unsigned long vmask,
1700 GC dgc);
1701 int
1702 XSetClipMask(
1703 Display *display,
1704 GC gc,
1705 Pixmap cmask);
1706
1707 int
1708 XSetClipRectangles(
1709 Display *display,
1710 GC gc,
1711 int clx, int cly,
1712 XRectangle *rs,
1713 int n, int order);
1714 int
1715 XSetFunction(
1716 Display *display,
1717 GC gc,
1718 int fn);
1719 int
1720 XSetLineAttributes(
1721 Display *display,
1722 GC gc,
1723 unsigned int lw,
1724 int ls, int cs, int js);
1725 int
1726 XSetPlaneMask(
1727 Display *display,
1728 GC gc,
1729 unsigned long pmask);
1730 int XSetTile(
1731 Display *display,
1732 GC gc,
1733 Pixmap tile);
1734 StatusDef
1735 XAllocColorCells(
1736 Display *display,
1737 Colormap cmap,
1738 BoolDef cont,
1739 unsigned long *pmasks,
1740 unsigned int np,
1741 unsigned long *pixels,
1742 unsigned int nc);
1743 StatusDef
1744 XAllocColorPlanes(
1745 Display *display,
1746 Colormap cmap,
1747 BoolDef cont,
1748 unsigned long *pixels,
1749 int nc,
1750 int nr,int ng,int nb,
1751 unsigned long *rmask,
1752 unsigned long *gmask,
1753 unsigned long *bmask);
1754 StatusDef
1755 XAllocNamedColor(Display *display,
1756 Colormap cmap, const char *cname,
1757 XColor *cell, XColor *rgb);
1758 Colormap
1759 XCreateColormap(
1760 Display *display,
1761 Window w,
1762 Visual *visual,
1763 int alloc);
1764 StatusDef
1765 XGetStandardColormap(
1766 Display *display,
1767 Window w,
1768 XStandardColormap *cmapinf,
1769 Atom prop);
1770 StatusDef
1771 XAllocColor(
1772 Display *display,
1773 Colormap cmap,
1774 XColor *xc);
1775 int
1776 XQueryColor(
1777 Display *display,
1778 Colormap cmap,
1779 XColor *cell);
1780 int
1781 XQueryColors(
1782 Display *display,
1783 Colormap cmap,
1784 XColor *cells,
1785 int nc);
1786 int
1787 XStoreColor(
1788 Display *display,
1789 Colormap cmap,
1790 XColor *cell);
1791 int
1792 XStoreColors(
1793 Display *display,
1794 Colormap cmap,
1795 XColor *cells,
1796 int nc);
1797 char **
1798 XGetFontPath(
1799 Display *display,
1800 int *nps);
1801 BoolDef XGetFontProperty(
1802 XFontStruct *fstruct,
1803 Atom atom,
1804 unsigned long *val);
1805
1806 XFontStruct *
1807 XLoadQueryFont(Display *display, const char *name);
1808
1809 XFontStruct *
1810 XQueryFont(
1811 Display *display,
1812 XID font_id);
1813
1814 KeySym
1815 XKeycodeToKeysym(
1816 Display *display,
1817 unsigned int keycode,
1818 int index);
1819
1820 KeyCode
1821 XKeysymToKeycode(
1822 Display *display,
1823 KeySym keysym);
1824
1825 KeySym
1826 XStringToKeysym(const char *str);
1827
1828 XModifierKeymap *
1829 XGetModifierMapping(Display *display);
1830
1831 int
1832 XFreeModifiermap(XModifierKeymap *modmap);
1833
1834 int
1835 XSetFont(
1836 Display *display,
1837 GC gc,
1838 Font font);
1839 int
1840 XSetFontPath(
1841 Display *display,
1842 char **dirs,
1843 int nd);
1844 int
1845 XTextExtents(
1846 XFontStruct *fstruct,
1847 const char *str,
1848 int nc,
1849 int *dir,int *ascent,int *descent,
1850 XCharStruct *overall);
1851 int
1852 XTextExtents16(
1853 XFontStruct *fstruct,
1854 const XChar2b *str,
1855 int nc,
1856 int *dir, int *ascent, int *descent,
1857 XCharStruct *overall);
1858
1859 int
1860 XTextWidth(
1861 XFontStruct *fstruct,
1862 const char *str,
1863 int co);
1864 int
1865 XTextWidth16(
1866 XFontStruct *fstruct,
1867 const XChar2b *str,
1868 int co);
1869 int
1870 XGetErrorDatabaseText(
1871 Display *display,
1872 const char *name, const char *msg,
1873 const char *defstr,
1874 char *buf,
1875 int len);
1876
1877 int
1878 XGetErrorText(
1879 Display *display,
1880 int code,
1881 char *buf,
1882 int len);
1883
1884 XErrorHandler
1885 XSetErrorHandler(XErrorHandler handler);
1886
1887 int
1888 XDefaultScreen(Display *display);
1889
1890 Visual *
1891 XDefaultVisual(
1892 Display *display,
1893 int screen);
1894
1895 int
1896 XDefaultDepth(
1897 Display *display,
1898 int screen);
1899
1900 Colormap
1901 XDefaultColormap(
1902 Display *display,
1903 int screen);
1904 Screen *
1905 XScreenOfDisplay(
1906 Display *display,
1907 int scr);
1908 Cursor
1909 XCreateFontCursor(
1910 Display *display,
1911 unsigned int shape);
1912 int
1913 XRecolorCursor(
1914 Display *display,
1915 Cursor cursor,
1916 XColor *fg,XColor *bg);
1917
1918 int
1919 XWarpPointer(
1920 Display *display,
1921 Window sw,Window dw,
1922 int sx,int sy,
1923 unsigned int swidth,unsigned int sheight,
1924 int dx, int dy);
1925 int
1926 XBell(
1927 Display *display,
1928 int pc);
1929
1930 int
1931 XGetInputFocus(
1932 Display *display,
1933 Window *focus,
1934 int *revto);
1935 int
1936 XSetInputFocus(
1937 Display *display,
1938 Window focus,
1939 int revto,
1940 Time time);
1941 int
1942 XLookupString(
1943 XKeyEvent *event,
1944 char *buf,
1945 int nbytes,
1946 KeySym *keysym,
1947 XComposeStatus *status);
1948
1949 int
1950 XRefreshKeyboardMapping(XMappingEvent *event);
1951
1952 int
1953 XSetClassHint(
1954 Display *display,
1955 Window w,
1956 XClassHint *chints);
1957 int
1958 XSetNormalHints(
1959 Display *display,
1960 Window w,
1961 XSizeHints *hints);
1962
1963 int
1964 XSetWMHints(
1965 Display *display,
1966 Window w,
1967 XWMHints *wmhints);
1968 StatusDef
1969 XSetWMProtocols(
1970 Display *display,
1971 Window w,
1972 Atom *prots,
1973 int co);
1974 int
1975 XStoreName(Display *display,
1976 Window w,
1977 const char *wname);
1978 StatusDef
1979 XFetchName(
1980 Display *display,
1981 Window w,
1982 char **window_name_return);
1983
1984 int
1985 XDoesBackingStore(Screen *scr);
1986
1987 XExtCodes *
1988 XInitExtension(Display *display,
1989 const char *name);
1990 int
1991 XFree(void *data);
1992
1993 char *
1994 XServerVendor(Display *display);
1995
1996 int
1997 XSetIconName(Display *display,
1998 Window w,
1999 const char *iname);
2000 int
2001 XGetIconName(
2002 Display *display,
2003 Window w,
2004 char **iname);
2005 int
2006 XSetSelectionOwner(
2007 Display* display,
2008 Atom sel,
2009 Window owner,
2010 Time time);
2011 Window
2012 XGetSelectionOwner(
2013 Display* display,
2014 Atom selection);
2015
2016 int
2017 XConvertSelection(
2018 Display *display,
2019 Atom sel, Atom target, Atom prop,
2020 Window req,
2021 Time time);
2022 BoolDef XCheckTypedEvent(
2023 Display *display,
2024 int ev,
2025 XEvent *rep);
2026 BoolDef XCheckWindowEvent(
2027 Display *display,
2028 Window w,
2029 long emask,
2030 XEvent *ev);
2031 int
2032 XPending(Display *display);
2033
2034 int
2035 XPutBackEvent(Display *display,
2036 XEvent *event);
2037
2038 StatusDef
2039 XSendEvent(
2040 Display *display,
2041 Window w,
2042 BoolDef prop,
2043 long emask,
2044 XEvent *event);
2045
2046 BoolDef XCheckTypedWindowEvent(
2047 Display* display,
2048 Window w,
2049 int event_type,
2050 XEvent* event_return);
2051 int
2052 XWindowEvent(
2053 Display *display,
2054 Window w,
2055 long emask,
2056 XEvent *rep);
2057
2058 int
2059 XNextEvent(
2060 Display *display,
2061 XEvent *event);
2062
2063 Atom
2064 XInternAtom(
2065 Display *display,
2066 const char *property_name,
2067 BoolDef only_if_exists);
2068 char *
2069 XGetAtomName(
2070 Display *display,
2071 Atom atom);
2072
2073 int
2074 XChangeProperty(
2075 Display *display,
2076 Window window,
2077 Atom property,
2078 Atom type,
2079 int format,
2080 int mode,
2081 const unsigned char *data,
2082 int nelements);
2083
2084 int
2085 XGetWindowProperty(
2086 Display *display,
2087 Window window,
2088 Atom property,
2089 long long_offset,
2090 long long_length,
2091 BoolDef delete,
2092 Atom req_type,
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);
2098
2099 char **
2100 XListExtensions(
2101 Display *display,
2102 int *ret_num);
2103
2104 int XFreeExtensionList(char **list);
2105
2106 int
2107 XChangeGC(
2108 Display* display,
2109 GC gc,
2110 unsigned long mask,
2111 XGCValues* gc_values);
2112
2113 int
2114 XConnectionNumber(Display* display);
2115
2116 int
2117 XFreeFont(Display* display,XFontStruct* font_struct);
2118
2119 char *
2120 XSetLocaleModifiers(const char* modifier_list);
2121
2122 XIM
2123 XOpenIM(
2124 Display* dpy,
2125 struct _XrmHashBucketRec* rdb,
2126 char* res_name,
2127 char* res_class);
2128
2129 char *
2130 XGetIMValues(XIM im , ...);
2131
2132 XIC XCreateIC(XIM im , ...);
2133
2134 StatusDef
2135 XCloseIM(XIM im);
2136
2137 BoolDef XFilterEvent(XEvent* event,Window window);
2138
2139 char *
2140 XrmQuarkToString(void *quark);
2141
2142 int
2143 XmbLookupString(
2144 XIC ic,
2145 XKeyPressedEvent* event,
2146 char* buffer_return,
2147 int bytes_buffer,
2148 KeySym* keysym_return,
2149 StatusDef* status_return);
2150 int
2151 XmbTextPropertyToTextList(
2152 Display *display,
2153 XTextProperty *text_prop,
2154 char ***list_return,
2155 int *count_return);
2156
2157 void
2158 XFreeStringList(char **list);
2159
2160 int XmbTextListToTextProperty(
2161 Display *display,
2162 char **list,
2163 int count,
2164 XICCEncodingStyle style,
2165 XTextProperty *text_prop_return);
2166
2167 void
2168 XSetICFocus(XIC ic);
2169
2170 void
2171 XUnsetICFocus(XIC ic);
2172
2173 BoolDef XQueryPointer(
2174 Display* display,
2175 Window w,
2176 Window* root_return,
2177 Window* child_return,
2178 int* root_x_return,
2179 int* root_y_return,
2180 int* win_x_return,
2181 int* win_y_return,
2182 unsigned int* mask_return);
2183
2184 int XParseGeometry(
2185 const char* string,
2186 int* x,
2187 int* y,
2188 unsigned int* width,
2189 unsigned int* height);
2190
2191 int XResizeWindow(
2192 Display* display,
2193 Window w,
2194 unsigned int width,
2195 unsigned int height);
2196
2197 void XSetWMNormalHints(Display* display,Window w,XSizeHints* hints);
2198
2199 void XSetWMProperties(
2200 Display* display,
2201 Window w,
2202 XTextProperty* window_name,
2203 XTextProperty* icon_name,
2204 char** argv,
2205 int argc,
2206 XSizeHints* normal_hints,
2207 XWMHints* wm_hints,
2208 XClassHint* class_hints);
2209
2210 int XDefineCursor(Display* display,Window w,Cursor cursor);
2211
2212 int XMoveResizeWindow(
2213 Display* display,
2214 Window w,
2215 int x,
2216 int y,
2217 unsigned int width,
2218 unsigned int height);
2219
2220 int XMoveWindow(
2221 Display* display,
2222 Window w,
2223 int x,
2224 int y);
2225
2226 StatusDef
2227 XParseColor(
2228 Display *display,
2229 Colormap map,
2230 const char* spec,
2231 XColor *colorPtr);
2232
2233 int
2234 XFreeColors(Display *display,
2235 Colormap cmap,
2236 unsigned long pixels[],
2237 int npixels,
2238 unsigned long planes);
2239 int
2240 XGrabServer(Display *display);
2241
2242 int
2243 XUngrabServer(Display *display);
2244
2245
2246 #endif