| 1 | /* |
| 2 | |
| 3 | Copyright 1985, 1986, 1987, 1991, 1998 The Open Group |
| 4 | |
| 5 | Permission to use, copy, modify, distribute, and sell this software and its |
| 6 | documentation for any purpose is hereby granted without fee, provided that |
| 7 | the above copyright notice appear in all copies and that both that |
| 8 | copyright notice and this permission notice appear in supporting |
| 9 | documentation. |
| 10 | |
| 11 | The above copyright notice and this permission notice shall be included in |
| 12 | all copies or substantial portions of the Software. |
| 13 | |
| 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
| 18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 20 | |
| 21 | Except as contained in this notice, the name of The Open Group shall not be |
| 22 | used in advertising or otherwise to promote the sale, use or other dealings |
| 23 | in this Software without prior written authorization from The Open Group. |
| 24 | |
| 25 | */ |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | * Xlib.h - Header definition and support file for the C subroutine |
| 30 | * interface library (Xlib) to the X Window System Protocol (V11). |
| 31 | * Structures and symbols starting with "_" are private to the library. |
| 32 | */ |
| 33 | #ifndef _X11_XLIB_H_ |
| 34 | #define _X11_XLIB_H_ |
| 35 | |
| 36 | #define XlibSpecificationRelease 6 |
| 37 | |
| 38 | #include <sys/types.h> |
| 39 | |
| 40 | #if defined(__SCO__) || defined(__UNIXWARE__) |
| 41 | #include <stdint.h> |
| 42 | #endif |
| 43 | |
| 44 | #include <X11/X.h> |
| 45 | |
| 46 | /* applications should not depend on these two headers being included! */ |
| 47 | #include <X11/Xfuncproto.h> |
| 48 | #include <X11/Xosdefs.h> |
| 49 | |
| 50 | #ifndef X_WCHAR |
| 51 | #include <stddef.h> |
| 52 | #else |
| 53 | #ifdef __UNIXOS2__ |
| 54 | #include <stdlib.h> |
| 55 | #else |
| 56 | /* replace this with #include or typedef appropriate for your system */ |
| 57 | typedef unsigned long wchar_t; |
| 58 | #endif |
| 59 | #endif |
| 60 | |
| 61 | #if defined(ISC) && defined(USE_XMBTOWC) |
| 62 | #define wctomb(a,b) _Xwctomb(a,b) |
| 63 | #define mblen(a,b) _Xmblen(a,b) |
| 64 | #ifndef USE_XWCHAR_STRING |
| 65 | #define mbtowc(a,b,c) _Xmbtowc(a,b,c) |
| 66 | #endif |
| 67 | #endif |
| 68 | |
| 69 | extern int |
| 70 | _Xmblen( |
| 71 | #ifdef ISC |
| 72 | char const *str, |
| 73 | size_t len |
| 74 | #else |
| 75 | char *str, |
| 76 | int len |
| 77 | #endif |
| 78 | ); |
| 79 | |
| 80 | /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in |
| 81 | November 2000. Its presence is indicated through the following macro. */ |
| 82 | #define X_HAVE_UTF8_STRING 1 |
| 83 | |
| 84 | /* The Xlib structs are full of implicit padding to properly align members. |
| 85 | We can't clean that up without breaking ABI, so tell clang not to bother |
| 86 | complaining about it. */ |
| 87 | #ifdef __clang__ |
| 88 | #pragma clang diagnostic push |
| 89 | #pragma clang diagnostic ignored "-Wpadded" |
| 90 | #endif |
| 91 | |
| 92 | typedef char *XPointer; |
| 93 | |
| 94 | #define Bool int |
| 95 | #define Status int |
| 96 | #define True 1 |
| 97 | #define False 0 |
| 98 | |
| 99 | #define QueuedAlready 0 |
| 100 | #define QueuedAfterReading 1 |
| 101 | #define QueuedAfterFlush 2 |
| 102 | |
| 103 | #define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd) |
| 104 | #define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root) |
| 105 | #define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen) |
| 106 | #define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root) |
| 107 | #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual) |
| 108 | #define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc) |
| 109 | #define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel) |
| 110 | #define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel) |
| 111 | #define AllPlanes ((unsigned long)~0L) |
| 112 | #define QLength(dpy) (((_XPrivDisplay)dpy)->qlen) |
| 113 | #define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width) |
| 114 | #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height) |
| 115 | #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth) |
| 116 | #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight) |
| 117 | #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) |
| 118 | #define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries) |
| 119 | #define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens) |
| 120 | #define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor) |
| 121 | #define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version) |
| 122 | #define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version) |
| 123 | #define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release) |
| 124 | #define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name) |
| 125 | #define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) |
| 126 | #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap) |
| 127 | #define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit) |
| 128 | #define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order) |
| 129 | #define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad) |
| 130 | #define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order) |
| 131 | #define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1) |
| 132 | #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read) |
| 133 | |
| 134 | /* macros for screen oriented applications (toolkit) */ |
| 135 | #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr]) |
| 136 | #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy)) |
| 137 | #define DisplayOfScreen(s) ((s)->display) |
| 138 | #define RootWindowOfScreen(s) ((s)->root) |
| 139 | #define BlackPixelOfScreen(s) ((s)->black_pixel) |
| 140 | #define WhitePixelOfScreen(s) ((s)->white_pixel) |
| 141 | #define DefaultColormapOfScreen(s)((s)->cmap) |
| 142 | #define DefaultDepthOfScreen(s) ((s)->root_depth) |
| 143 | #define DefaultGCOfScreen(s) ((s)->default_gc) |
| 144 | #define DefaultVisualOfScreen(s)((s)->root_visual) |
| 145 | #define WidthOfScreen(s) ((s)->width) |
| 146 | #define HeightOfScreen(s) ((s)->height) |
| 147 | #define WidthMMOfScreen(s) ((s)->mwidth) |
| 148 | #define HeightMMOfScreen(s) ((s)->mheight) |
| 149 | #define PlanesOfScreen(s) ((s)->root_depth) |
| 150 | #define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries) |
| 151 | #define MinCmapsOfScreen(s) ((s)->min_maps) |
| 152 | #define MaxCmapsOfScreen(s) ((s)->max_maps) |
| 153 | #define DoesSaveUnders(s) ((s)->save_unders) |
| 154 | #define DoesBackingStore(s) ((s)->backing_store) |
| 155 | #define EventMaskOfScreen(s) ((s)->root_input_mask) |
| 156 | |
| 157 | /* |
| 158 | * Extensions need a way to hang private data on some structures. |
| 159 | */ |
| 160 | typedef struct _XExtData { |
| 161 | int number; /* number returned by XRegisterExtension */ |
| 162 | struct _XExtData *next; /* next item on list of data for structure */ |
| 163 | int (*free_private)( /* called to free private storage */ |
| 164 | struct _XExtData *extension |
| 165 | ); |
| 166 | XPointer private_data; /* data private to this extension. */ |
| 167 | } XExtData; |
| 168 | |
| 169 | /* |
| 170 | * This file contains structures used by the extension mechanism. |
| 171 | */ |
| 172 | typedef struct { /* public to extension, cannot be changed */ |
| 173 | int extension; /* extension number */ |
| 174 | int major_opcode; /* major op-code assigned by server */ |
| 175 | int first_event; /* first event number for the extension */ |
| 176 | int first_error; /* first error number for the extension */ |
| 177 | } XExtCodes; |
| 178 | |
| 179 | /* |
| 180 | * Data structure for retrieving info about pixmap formats. |
| 181 | */ |
| 182 | |
| 183 | typedef struct { |
| 184 | int depth; |
| 185 | int bits_per_pixel; |
| 186 | int scanline_pad; |
| 187 | } XPixmapFormatValues; |
| 188 | |
| 189 | |
| 190 | /* |
| 191 | * Data structure for setting graphics context. |
| 192 | */ |
| 193 | typedef struct { |
| 194 | int function; /* logical operation */ |
| 195 | unsigned long plane_mask;/* plane mask */ |
| 196 | unsigned long foreground;/* foreground pixel */ |
| 197 | unsigned long background;/* background pixel */ |
| 198 | int line_width; /* line width */ |
| 199 | int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */ |
| 200 | int cap_style; /* CapNotLast, CapButt, |
| 201 | CapRound, CapProjecting */ |
| 202 | int join_style; /* JoinMiter, JoinRound, JoinBevel */ |
| 203 | int fill_style; /* FillSolid, FillTiled, |
| 204 | FillStippled, FillOpaeueStippled */ |
| 205 | int fill_rule; /* EvenOddRule, WindingRule */ |
| 206 | int arc_mode; /* ArcChord, ArcPieSlice */ |
| 207 | Pixmap tile; /* tile pixmap for tiling operations */ |
| 208 | Pixmap stipple; /* stipple 1 plane pixmap for stipping */ |
| 209 | int ts_x_origin; /* offset for tile or stipple operations */ |
| 210 | int ts_y_origin; |
| 211 | Font font; /* default text font for text operations */ |
| 212 | int subwindow_mode; /* ClipByChildren, IncludeInferiors */ |
| 213 | Bool graphics_exposures;/* boolean, should exposures be generated */ |
| 214 | int clip_x_origin; /* origin for clipping */ |
| 215 | int clip_y_origin; |
| 216 | Pixmap clip_mask; /* bitmap clipping; other calls for rects */ |
| 217 | int dash_offset; /* patterned/dashed line information */ |
| 218 | char dashes; |
| 219 | } XGCValues; |
| 220 | |
| 221 | /* |
| 222 | * Graphics context. The contents of this structure are implementation |
| 223 | * dependent. A GC should be treated as opaque by application code. |
| 224 | */ |
| 225 | |
| 226 | typedef struct _XGC |
| 227 | #ifdef XLIB_ILLEGAL_ACCESS |
| 228 | { |
| 229 | XExtData *ext_data; /* hook for extension to hang data */ |
| 230 | GContext gid; /* protocol ID for graphics context */ |
| 231 | /* there is more to this structure, but it is private to Xlib */ |
| 232 | } |
| 233 | #endif |
| 234 | *GC; |
| 235 | |
| 236 | /* |
| 237 | * Visual structure; contains information about colormapping possible. |
| 238 | */ |
| 239 | typedef struct { |
| 240 | XExtData *ext_data; /* hook for extension to hang data */ |
| 241 | VisualID visualid; /* visual id of this visual */ |
| 242 | #if defined(__cplusplus) || defined(c_plusplus) |
| 243 | int c_class; /* C++ class of screen (monochrome, etc.) */ |
| 244 | #else |
| 245 | int class; /* class of screen (monochrome, etc.) */ |
| 246 | #endif |
| 247 | unsigned long red_mask, green_mask, blue_mask; /* mask values */ |
| 248 | int bits_per_rgb; /* log base 2 of distinct color values */ |
| 249 | int map_entries; /* color map entries */ |
| 250 | } Visual; |
| 251 | |
| 252 | /* |
| 253 | * Depth structure; contains information for each possible depth. |
| 254 | */ |
| 255 | typedef struct { |
| 256 | int depth; /* this depth (Z) of the depth */ |
| 257 | int nvisuals; /* number of Visual types at this depth */ |
| 258 | Visual *visuals; /* list of visuals possible at this depth */ |
| 259 | } Depth; |
| 260 | |
| 261 | /* |
| 262 | * Information about the screen. The contents of this structure are |
| 263 | * implementation dependent. A Screen should be treated as opaque |
| 264 | * by application code. |
| 265 | */ |
| 266 | |
| 267 | struct _XDisplay; /* Forward declare before use for C++ */ |
| 268 | |
| 269 | typedef struct { |
| 270 | XExtData *ext_data; /* hook for extension to hang data */ |
| 271 | struct _XDisplay *display;/* back pointer to display structure */ |
| 272 | Window root; /* Root window id. */ |
| 273 | int width, height; /* width and height of screen */ |
| 274 | int mwidth, mheight; /* width and height of in millimeters */ |
| 275 | int ndepths; /* number of depths possible */ |
| 276 | Depth *depths; /* list of allowable depths on the screen */ |
| 277 | int root_depth; /* bits per pixel */ |
| 278 | Visual *root_visual; /* root visual */ |
| 279 | GC default_gc; /* GC for the root root visual */ |
| 280 | Colormap cmap; /* default color map */ |
| 281 | unsigned long white_pixel; |
| 282 | unsigned long black_pixel; /* White and Black pixel values */ |
| 283 | int max_maps, min_maps; /* max and min color maps */ |
| 284 | int backing_store; /* Never, WhenMapped, Always */ |
| 285 | Bool save_unders; |
| 286 | long root_input_mask; /* initial root input mask */ |
| 287 | } Screen; |
| 288 | |
| 289 | /* |
| 290 | * Format structure; describes ZFormat data the screen will understand. |
| 291 | */ |
| 292 | typedef struct { |
| 293 | XExtData *ext_data; /* hook for extension to hang data */ |
| 294 | int depth; /* depth of this image format */ |
| 295 | int bits_per_pixel; /* bits/pixel at this depth */ |
| 296 | int scanline_pad; /* scanline must padded to this multiple */ |
| 297 | } ScreenFormat; |
| 298 | |
| 299 | /* |
| 300 | * Data structure for setting window attributes. |
| 301 | */ |
| 302 | typedef struct { |
| 303 | Pixmap background_pixmap; /* background or None or ParentRelative */ |
| 304 | unsigned long background_pixel; /* background pixel */ |
| 305 | Pixmap border_pixmap; /* border of the window */ |
| 306 | unsigned long border_pixel; /* border pixel value */ |
| 307 | int bit_gravity; /* one of bit gravity values */ |
| 308 | int win_gravity; /* one of the window gravity values */ |
| 309 | int backing_store; /* NotUseful, WhenMapped, Always */ |
| 310 | unsigned long backing_planes;/* planes to be preseved if possible */ |
| 311 | unsigned long backing_pixel;/* value to use in restoring planes */ |
| 312 | Bool save_under; /* should bits under be saved? (popups) */ |
| 313 | long event_mask; /* set of events that should be saved */ |
| 314 | long do_not_propagate_mask; /* set of events that should not propagate */ |
| 315 | Bool override_redirect; /* boolean value for override-redirect */ |
| 316 | Colormap colormap; /* color map to be associated with window */ |
| 317 | Cursor cursor; /* cursor to be displayed (or None) */ |
| 318 | } XSetWindowAttributes; |
| 319 | |
| 320 | typedef struct { |
| 321 | int x, y; /* location of window */ |
| 322 | int width, height; /* width and height of window */ |
| 323 | int border_width; /* border width of window */ |
| 324 | int depth; /* depth of window */ |
| 325 | Visual *visual; /* the associated visual structure */ |
| 326 | Window root; /* root of screen containing window */ |
| 327 | #if defined(__cplusplus) || defined(c_plusplus) |
| 328 | int c_class; /* C++ InputOutput, InputOnly*/ |
| 329 | #else |
| 330 | int class; /* InputOutput, InputOnly*/ |
| 331 | #endif |
| 332 | int bit_gravity; /* one of bit gravity values */ |
| 333 | int win_gravity; /* one of the window gravity values */ |
| 334 | int backing_store; /* NotUseful, WhenMapped, Always */ |
| 335 | unsigned long backing_planes;/* planes to be preserved if possible */ |
| 336 | unsigned long backing_pixel;/* value to be used when restoring planes */ |
| 337 | Bool save_under; /* boolean, should bits under be saved? */ |
| 338 | Colormap colormap; /* color map to be associated with window */ |
| 339 | Bool map_installed; /* boolean, is color map currently installed*/ |
| 340 | int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ |
| 341 | long all_event_masks; /* set of events all people have interest in*/ |
| 342 | long your_event_mask; /* my event mask */ |
| 343 | long do_not_propagate_mask; /* set of events that should not propagate */ |
| 344 | Bool override_redirect; /* boolean value for override-redirect */ |
| 345 | Screen *screen; /* back pointer to correct screen */ |
| 346 | } XWindowAttributes; |
| 347 | |
| 348 | /* |
| 349 | * Data structure for host setting; getting routines. |
| 350 | * |
| 351 | */ |
| 352 | |
| 353 | typedef struct { |
| 354 | int family; /* for example FamilyInternet */ |
| 355 | int length; /* length of address, in bytes */ |
| 356 | char *address; /* pointer to where to find the bytes */ |
| 357 | } XHostAddress; |
| 358 | |
| 359 | /* |
| 360 | * Data structure for ServerFamilyInterpreted addresses in host routines |
| 361 | */ |
| 362 | typedef struct { |
| 363 | int typelength; /* length of type string, in bytes */ |
| 364 | int valuelength; /* length of value string, in bytes */ |
| 365 | char *type; /* pointer to where to find the type string */ |
| 366 | char *value; /* pointer to where to find the address */ |
| 367 | } XServerInterpretedAddress; |
| 368 | |
| 369 | /* |
| 370 | * Data structure for "image" data, used by image manipulation routines. |
| 371 | */ |
| 372 | typedef struct _XImage { |
| 373 | int width, height; /* size of image */ |
| 374 | int xoffset; /* number of pixels offset in X direction */ |
| 375 | int format; /* XYBitmap, XYPixmap, ZPixmap */ |
| 376 | char *data; /* pointer to image data */ |
| 377 | int byte_order; /* data byte order, LSBFirst, MSBFirst */ |
| 378 | int bitmap_unit; /* quant. of scanline 8, 16, 32 */ |
| 379 | int bitmap_bit_order; /* LSBFirst, MSBFirst */ |
| 380 | int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */ |
| 381 | int depth; /* depth of image */ |
| 382 | int bytes_per_line; /* accelarator to next line */ |
| 383 | int bits_per_pixel; /* bits per pixel (ZPixmap) */ |
| 384 | unsigned long red_mask; /* bits in z arrangment */ |
| 385 | unsigned long green_mask; |
| 386 | unsigned long blue_mask; |
| 387 | XPointer obdata; /* hook for the object routines to hang on */ |
| 388 | struct funcs { /* image manipulation routines */ |
| 389 | struct _XImage *(*create_image)( |
| 390 | struct _XDisplay* /* display */, |
| 391 | Visual* /* visual */, |
| 392 | unsigned int /* depth */, |
| 393 | int /* format */, |
| 394 | int /* offset */, |
| 395 | char* /* data */, |
| 396 | unsigned int /* width */, |
| 397 | unsigned int /* height */, |
| 398 | int /* bitmap_pad */, |
| 399 | int /* bytes_per_line */); |
| 400 | int (*destroy_image) (struct _XImage *); |
| 401 | unsigned long (*get_pixel) (struct _XImage *, int, int); |
| 402 | int (*put_pixel) (struct _XImage *, int, int, unsigned long); |
| 403 | struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); |
| 404 | int (*add_pixel) (struct _XImage *, long); |
| 405 | } f; |
| 406 | } XImage; |
| 407 | |
| 408 | /* |
| 409 | * Data structure for XReconfigureWindow |
| 410 | */ |
| 411 | typedef struct { |
| 412 | int x, y; |
| 413 | int width, height; |
| 414 | int border_width; |
| 415 | Window sibling; |
| 416 | int stack_mode; |
| 417 | } XWindowChanges; |
| 418 | |
| 419 | /* |
| 420 | * Data structure used by color operations |
| 421 | */ |
| 422 | typedef struct { |
| 423 | unsigned long pixel; |
| 424 | unsigned short red, green, blue; |
| 425 | char flags; /* do_red, do_green, do_blue */ |
| 426 | char pad; |
| 427 | } XColor; |
| 428 | |
| 429 | /* |
| 430 | * Data structures for graphics operations. On most machines, these are |
| 431 | * congruent with the wire protocol structures, so reformatting the data |
| 432 | * can be avoided on these architectures. |
| 433 | */ |
| 434 | typedef struct { |
| 435 | short x1, y1, x2, y2; |
| 436 | } XSegment; |
| 437 | |
| 438 | typedef struct { |
| 439 | short x, y; |
| 440 | } XPoint; |
| 441 | |
| 442 | typedef struct { |
| 443 | short x, y; |
| 444 | unsigned short width, height; |
| 445 | } XRectangle; |
| 446 | |
| 447 | typedef struct { |
| 448 | short x, y; |
| 449 | unsigned short width, height; |
| 450 | short angle1, angle2; |
| 451 | } XArc; |
| 452 | |
| 453 | |
| 454 | /* Data structure for XChangeKeyboardControl */ |
| 455 | |
| 456 | typedef struct { |
| 457 | int key_click_percent; |
| 458 | int bell_percent; |
| 459 | int bell_pitch; |
| 460 | int bell_duration; |
| 461 | int led; |
| 462 | int led_mode; |
| 463 | int key; |
| 464 | int auto_repeat_mode; /* On, Off, Default */ |
| 465 | } XKeyboardControl; |
| 466 | |
| 467 | /* Data structure for XGetKeyboardControl */ |
| 468 | |
| 469 | typedef struct { |
| 470 | int key_click_percent; |
| 471 | int bell_percent; |
| 472 | unsigned int bell_pitch, bell_duration; |
| 473 | unsigned long led_mask; |
| 474 | int global_auto_repeat; |
| 475 | char auto_repeats[32]; |
| 476 | } XKeyboardState; |
| 477 | |
| 478 | /* Data structure for XGetMotionEvents. */ |
| 479 | |
| 480 | typedef struct { |
| 481 | Time time; |
| 482 | short x, y; |
| 483 | } XTimeCoord; |
| 484 | |
| 485 | /* Data structure for X{Set,Get}ModifierMapping */ |
| 486 | |
| 487 | typedef struct { |
| 488 | int max_keypermod; /* The server's max # of keys per modifier */ |
| 489 | KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */ |
| 490 | } XModifierKeymap; |
| 491 | |
| 492 | |
| 493 | /* |
| 494 | * Display datatype maintaining display specific data. |
| 495 | * The contents of this structure are implementation dependent. |
| 496 | * A Display should be treated as opaque by application code. |
| 497 | */ |
| 498 | #ifndef XLIB_ILLEGAL_ACCESS |
| 499 | typedef struct _XDisplay Display; |
| 500 | #endif |
| 501 | |
| 502 | struct _XPrivate; /* Forward declare before use for C++ */ |
| 503 | struct _XrmHashBucketRec; |
| 504 | |
| 505 | typedef struct |
| 506 | #ifdef XLIB_ILLEGAL_ACCESS |
| 507 | _XDisplay |
| 508 | #endif |
| 509 | { |
| 510 | XExtData *ext_data; /* hook for extension to hang data */ |
| 511 | struct _XPrivate *private1; |
| 512 | int fd; /* Network socket. */ |
| 513 | int private2; |
| 514 | int proto_major_version;/* major version of server's X protocol */ |
| 515 | int proto_minor_version;/* minor version of servers X protocol */ |
| 516 | char *vendor; /* vendor of the server hardware */ |
| 517 | XID private3; |
| 518 | XID private4; |
| 519 | XID private5; |
| 520 | int private6; |
| 521 | XID (*resource_alloc)( /* allocator function */ |
| 522 | struct _XDisplay* |
| 523 | ); |
| 524 | int byte_order; /* screen byte order, LSBFirst, MSBFirst */ |
| 525 | int bitmap_unit; /* padding and data requirements */ |
| 526 | int bitmap_pad; /* padding requirements on bitmaps */ |
| 527 | int bitmap_bit_order; /* LeastSignificant or MostSignificant */ |
| 528 | int nformats; /* number of pixmap formats in list */ |
| 529 | ScreenFormat *pixmap_format; /* pixmap format list */ |
| 530 | int private8; |
| 531 | int release; /* release of the server */ |
| 532 | struct _XPrivate *private9, *private10; |
| 533 | int qlen; /* Length of input event queue */ |
| 534 | unsigned long last_request_read; /* seq number of last event read */ |
| 535 | unsigned long request; /* sequence number of last request. */ |
| 536 | XPointer private11; |
| 537 | XPointer private12; |
| 538 | XPointer private13; |
| 539 | XPointer private14; |
| 540 | unsigned max_request_size; /* maximum number 32 bit words in request*/ |
| 541 | struct _XrmHashBucketRec *db; |
| 542 | int (*private15)( |
| 543 | struct _XDisplay* |
| 544 | ); |
| 545 | char *display_name; /* "host:display" string used on this connect*/ |
| 546 | int default_screen; /* default screen for operations */ |
| 547 | int nscreens; /* number of screens on this server*/ |
| 548 | Screen *screens; /* pointer to list of screens */ |
| 549 | unsigned long motion_buffer; /* size of motion buffer */ |
| 550 | unsigned long private16; |
| 551 | int min_keycode; /* minimum defined keycode */ |
| 552 | int max_keycode; /* maximum defined keycode */ |
| 553 | XPointer private17; |
| 554 | XPointer private18; |
| 555 | int private19; |
| 556 | char *xdefaults; /* contents of defaults from server */ |
| 557 | /* there is more to this structure, but it is private to Xlib */ |
| 558 | } |
| 559 | #ifdef XLIB_ILLEGAL_ACCESS |
| 560 | Display, |
| 561 | #endif |
| 562 | *_XPrivDisplay; |
| 563 | |
| 564 | #undef _XEVENT_ |
| 565 | #ifndef _XEVENT_ |
| 566 | /* |
| 567 | * Definitions of specific events. |
| 568 | */ |
| 569 | typedef struct { |
| 570 | int type; /* of event */ |
| 571 | unsigned long serial; /* # of last request processed by server */ |
| 572 | Bool send_event; /* true if this came from a SendEvent request */ |
| 573 | Display *display; /* Display the event was read from */ |
| 574 | Window window; /* "event" window it is reported relative to */ |
| 575 | Window root; /* root window that the event occurred on */ |
| 576 | Window subwindow; /* child window */ |
| 577 | Time time; /* milliseconds */ |
| 578 | int x, y; /* pointer x, y coordinates in event window */ |
| 579 | int x_root, y_root; /* coordinates relative to root */ |
| 580 | unsigned int state; /* key or button mask */ |
| 581 | unsigned int keycode; /* detail */ |
| 582 | Bool same_screen; /* same screen flag */ |
| 583 | } XKeyEvent; |
| 584 | typedef XKeyEvent XKeyPressedEvent; |
| 585 | typedef XKeyEvent XKeyReleasedEvent; |
| 586 | |
| 587 | typedef struct { |
| 588 | int type; /* of event */ |
| 589 | unsigned long serial; /* # of last request processed by server */ |
| 590 | Bool send_event; /* true if this came from a SendEvent request */ |
| 591 | Display *display; /* Display the event was read from */ |
| 592 | Window window; /* "event" window it is reported relative to */ |
| 593 | Window root; /* root window that the event occurred on */ |
| 594 | Window subwindow; /* child window */ |
| 595 | Time time; /* milliseconds */ |
| 596 | int x, y; /* pointer x, y coordinates in event window */ |
| 597 | int x_root, y_root; /* coordinates relative to root */ |
| 598 | unsigned int state; /* key or button mask */ |
| 599 | unsigned int button; /* detail */ |
| 600 | Bool same_screen; /* same screen flag */ |
| 601 | } XButtonEvent; |
| 602 | typedef XButtonEvent XButtonPressedEvent; |
| 603 | typedef XButtonEvent XButtonReleasedEvent; |
| 604 | |
| 605 | typedef struct { |
| 606 | int type; /* of event */ |
| 607 | unsigned long serial; /* # of last request processed by server */ |
| 608 | Bool send_event; /* true if this came from a SendEvent request */ |
| 609 | Display *display; /* Display the event was read from */ |
| 610 | Window window; /* "event" window reported relative to */ |
| 611 | Window root; /* root window that the event occurred on */ |
| 612 | Window subwindow; /* child window */ |
| 613 | Time time; /* milliseconds */ |
| 614 | int x, y; /* pointer x, y coordinates in event window */ |
| 615 | int x_root, y_root; /* coordinates relative to root */ |
| 616 | unsigned int state; /* key or button mask */ |
| 617 | char is_hint; /* detail */ |
| 618 | Bool same_screen; /* same screen flag */ |
| 619 | } XMotionEvent; |
| 620 | typedef XMotionEvent XPointerMovedEvent; |
| 621 | |
| 622 | typedef struct { |
| 623 | int type; /* of event */ |
| 624 | unsigned long serial; /* # of last request processed by server */ |
| 625 | Bool send_event; /* true if this came from a SendEvent request */ |
| 626 | Display *display; /* Display the event was read from */ |
| 627 | Window window; /* "event" window reported relative to */ |
| 628 | Window root; /* root window that the event occurred on */ |
| 629 | Window subwindow; /* child window */ |
| 630 | Time time; /* milliseconds */ |
| 631 | int x, y; /* pointer x, y coordinates in event window */ |
| 632 | int x_root, y_root; /* coordinates relative to root */ |
| 633 | int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ |
| 634 | int detail; |
| 635 | /* |
| 636 | * NotifyAncestor, NotifyVirtual, NotifyInferior, |
| 637 | * NotifyNonlinear,NotifyNonlinearVirtual |
| 638 | */ |
| 639 | Bool same_screen; /* same screen flag */ |
| 640 | Bool focus; /* boolean focus */ |
| 641 | unsigned int state; /* key or button mask */ |
| 642 | } XCrossingEvent; |
| 643 | typedef XCrossingEvent XEnterWindowEvent; |
| 644 | typedef XCrossingEvent XLeaveWindowEvent; |
| 645 | |
| 646 | typedef struct { |
| 647 | int type; /* FocusIn or FocusOut */ |
| 648 | unsigned long serial; /* # of last request processed by server */ |
| 649 | Bool send_event; /* true if this came from a SendEvent request */ |
| 650 | Display *display; /* Display the event was read from */ |
| 651 | Window window; /* window of event */ |
| 652 | int mode; /* NotifyNormal, NotifyWhileGrabbed, |
| 653 | NotifyGrab, NotifyUngrab */ |
| 654 | int detail; |
| 655 | /* |
| 656 | * NotifyAncestor, NotifyVirtual, NotifyInferior, |
| 657 | * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer, |
| 658 | * NotifyPointerRoot, NotifyDetailNone |
| 659 | */ |
| 660 | } XFocusChangeEvent; |
| 661 | typedef XFocusChangeEvent XFocusInEvent; |
| 662 | typedef XFocusChangeEvent XFocusOutEvent; |
| 663 | |
| 664 | /* generated on EnterWindow and FocusIn when KeyMapState selected */ |
| 665 | typedef struct { |
| 666 | int type; |
| 667 | unsigned long serial; /* # of last request processed by server */ |
| 668 | Bool send_event; /* true if this came from a SendEvent request */ |
| 669 | Display *display; /* Display the event was read from */ |
| 670 | Window window; |
| 671 | char key_vector[32]; |
| 672 | } XKeymapEvent; |
| 673 | |
| 674 | typedef struct { |
| 675 | int type; |
| 676 | unsigned long serial; /* # of last request processed by server */ |
| 677 | Bool send_event; /* true if this came from a SendEvent request */ |
| 678 | Display *display; /* Display the event was read from */ |
| 679 | Window window; |
| 680 | int x, y; |
| 681 | int width, height; |
| 682 | int count; /* if non-zero, at least this many more */ |
| 683 | } XExposeEvent; |
| 684 | |
| 685 | typedef struct { |
| 686 | int type; |
| 687 | unsigned long serial; /* # of last request processed by server */ |
| 688 | Bool send_event; /* true if this came from a SendEvent request */ |
| 689 | Display *display; /* Display the event was read from */ |
| 690 | Drawable drawable; |
| 691 | int x, y; |
| 692 | int width, height; |
| 693 | int count; /* if non-zero, at least this many more */ |
| 694 | int major_code; /* core is CopyArea or CopyPlane */ |
| 695 | int minor_code; /* not defined in the core */ |
| 696 | } XGraphicsExposeEvent; |
| 697 | |
| 698 | typedef struct { |
| 699 | int type; |
| 700 | unsigned long serial; /* # of last request processed by server */ |
| 701 | Bool send_event; /* true if this came from a SendEvent request */ |
| 702 | Display *display; /* Display the event was read from */ |
| 703 | Drawable drawable; |
| 704 | int major_code; /* core is CopyArea or CopyPlane */ |
| 705 | int minor_code; /* not defined in the core */ |
| 706 | } XNoExposeEvent; |
| 707 | |
| 708 | typedef struct { |
| 709 | int type; |
| 710 | unsigned long serial; /* # of last request processed by server */ |
| 711 | Bool send_event; /* true if this came from a SendEvent request */ |
| 712 | Display *display; /* Display the event was read from */ |
| 713 | Window window; |
| 714 | int state; /* Visibility state */ |
| 715 | } XVisibilityEvent; |
| 716 | |
| 717 | typedef struct { |
| 718 | int type; |
| 719 | unsigned long serial; /* # of last request processed by server */ |
| 720 | Bool send_event; /* true if this came from a SendEvent request */ |
| 721 | Display *display; /* Display the event was read from */ |
| 722 | Window parent; /* parent of the window */ |
| 723 | Window window; /* window id of window created */ |
| 724 | int x, y; /* window location */ |
| 725 | int width, height; /* size of window */ |
| 726 | int border_width; /* border width */ |
| 727 | Bool override_redirect; /* creation should be overridden */ |
| 728 | } XCreateWindowEvent; |
| 729 | |
| 730 | typedef struct { |
| 731 | int type; |
| 732 | unsigned long serial; /* # of last request processed by server */ |
| 733 | Bool send_event; /* true if this came from a SendEvent request */ |
| 734 | Display *display; /* Display the event was read from */ |
| 735 | Window event; |
| 736 | Window window; |
| 737 | } XDestroyWindowEvent; |
| 738 | |
| 739 | typedef struct { |
| 740 | int type; |
| 741 | unsigned long serial; /* # of last request processed by server */ |
| 742 | Bool send_event; /* true if this came from a SendEvent request */ |
| 743 | Display *display; /* Display the event was read from */ |
| 744 | Window event; |
| 745 | Window window; |
| 746 | Bool from_configure; |
| 747 | } XUnmapEvent; |
| 748 | |
| 749 | typedef struct { |
| 750 | int type; |
| 751 | unsigned long serial; /* # of last request processed by server */ |
| 752 | Bool send_event; /* true if this came from a SendEvent request */ |
| 753 | Display *display; /* Display the event was read from */ |
| 754 | Window event; |
| 755 | Window window; |
| 756 | Bool override_redirect; /* boolean, is override set... */ |
| 757 | } XMapEvent; |
| 758 | |
| 759 | typedef struct { |
| 760 | int type; |
| 761 | unsigned long serial; /* # of last request processed by server */ |
| 762 | Bool send_event; /* true if this came from a SendEvent request */ |
| 763 | Display *display; /* Display the event was read from */ |
| 764 | Window parent; |
| 765 | Window window; |
| 766 | } XMapRequestEvent; |
| 767 | |
| 768 | typedef struct { |
| 769 | int type; |
| 770 | unsigned long serial; /* # of last request processed by server */ |
| 771 | Bool send_event; /* true if this came from a SendEvent request */ |
| 772 | Display *display; /* Display the event was read from */ |
| 773 | Window event; |
| 774 | Window window; |
| 775 | Window parent; |
| 776 | int x, y; |
| 777 | Bool override_redirect; |
| 778 | } XReparentEvent; |
| 779 | |
| 780 | typedef struct { |
| 781 | int type; |
| 782 | unsigned long serial; /* # of last request processed by server */ |
| 783 | Bool send_event; /* true if this came from a SendEvent request */ |
| 784 | Display *display; /* Display the event was read from */ |
| 785 | Window event; |
| 786 | Window window; |
| 787 | int x, y; |
| 788 | int width, height; |
| 789 | int border_width; |
| 790 | Window above; |
| 791 | Bool override_redirect; |
| 792 | } XConfigureEvent; |
| 793 | |
| 794 | typedef struct { |
| 795 | int type; |
| 796 | unsigned long serial; /* # of last request processed by server */ |
| 797 | Bool send_event; /* true if this came from a SendEvent request */ |
| 798 | Display *display; /* Display the event was read from */ |
| 799 | Window event; |
| 800 | Window window; |
| 801 | int x, y; |
| 802 | } XGravityEvent; |
| 803 | |
| 804 | typedef struct { |
| 805 | int type; |
| 806 | unsigned long serial; /* # of last request processed by server */ |
| 807 | Bool send_event; /* true if this came from a SendEvent request */ |
| 808 | Display *display; /* Display the event was read from */ |
| 809 | Window window; |
| 810 | int width, height; |
| 811 | } XResizeRequestEvent; |
| 812 | |
| 813 | typedef struct { |
| 814 | int type; |
| 815 | unsigned long serial; /* # of last request processed by server */ |
| 816 | Bool send_event; /* true if this came from a SendEvent request */ |
| 817 | Display *display; /* Display the event was read from */ |
| 818 | Window parent; |
| 819 | Window window; |
| 820 | int x, y; |
| 821 | int width, height; |
| 822 | int border_width; |
| 823 | Window above; |
| 824 | int detail; /* Above, Below, TopIf, BottomIf, Opposite */ |
| 825 | unsigned long value_mask; |
| 826 | } XConfigureRequestEvent; |
| 827 | |
| 828 | typedef struct { |
| 829 | int type; |
| 830 | unsigned long serial; /* # of last request processed by server */ |
| 831 | Bool send_event; /* true if this came from a SendEvent request */ |
| 832 | Display *display; /* Display the event was read from */ |
| 833 | Window event; |
| 834 | Window window; |
| 835 | int place; /* PlaceOnTop, PlaceOnBottom */ |
| 836 | } XCirculateEvent; |
| 837 | |
| 838 | typedef struct { |
| 839 | int type; |
| 840 | unsigned long serial; /* # of last request processed by server */ |
| 841 | Bool send_event; /* true if this came from a SendEvent request */ |
| 842 | Display *display; /* Display the event was read from */ |
| 843 | Window parent; |
| 844 | Window window; |
| 845 | int place; /* PlaceOnTop, PlaceOnBottom */ |
| 846 | } XCirculateRequestEvent; |
| 847 | |
| 848 | typedef struct { |
| 849 | int type; |
| 850 | unsigned long serial; /* # of last request processed by server */ |
| 851 | Bool send_event; /* true if this came from a SendEvent request */ |
| 852 | Display *display; /* Display the event was read from */ |
| 853 | Window window; |
| 854 | Atom atom; |
| 855 | Time time; |
| 856 | int state; /* NewValue, Deleted */ |
| 857 | } XPropertyEvent; |
| 858 | |
| 859 | typedef struct { |
| 860 | int type; |
| 861 | unsigned long serial; /* # of last request processed by server */ |
| 862 | Bool send_event; /* true if this came from a SendEvent request */ |
| 863 | Display *display; /* Display the event was read from */ |
| 864 | Window window; |
| 865 | Atom selection; |
| 866 | Time time; |
| 867 | } XSelectionClearEvent; |
| 868 | |
| 869 | typedef struct { |
| 870 | int type; |
| 871 | unsigned long serial; /* # of last request processed by server */ |
| 872 | Bool send_event; /* true if this came from a SendEvent request */ |
| 873 | Display *display; /* Display the event was read from */ |
| 874 | Window owner; |
| 875 | Window requestor; |
| 876 | Atom selection; |
| 877 | Atom target; |
| 878 | Atom property; |
| 879 | Time time; |
| 880 | } XSelectionRequestEvent; |
| 881 | |
| 882 | typedef struct { |
| 883 | int type; |
| 884 | unsigned long serial; /* # of last request processed by server */ |
| 885 | Bool send_event; /* true if this came from a SendEvent request */ |
| 886 | Display *display; /* Display the event was read from */ |
| 887 | Window requestor; |
| 888 | Atom selection; |
| 889 | Atom target; |
| 890 | Atom property; /* ATOM or None */ |
| 891 | Time time; |
| 892 | } XSelectionEvent; |
| 893 | |
| 894 | typedef struct { |
| 895 | int type; |
| 896 | unsigned long serial; /* # of last request processed by server */ |
| 897 | Bool send_event; /* true if this came from a SendEvent request */ |
| 898 | Display *display; /* Display the event was read from */ |
| 899 | Window window; |
| 900 | Colormap colormap; /* COLORMAP or None */ |
| 901 | #if defined(__cplusplus) || defined(c_plusplus) |
| 902 | Bool c_new; /* C++ */ |
| 903 | #else |
| 904 | Bool new; |
| 905 | #endif |
| 906 | int state; /* ColormapInstalled, ColormapUninstalled */ |
| 907 | } XColormapEvent; |
| 908 | |
| 909 | typedef struct { |
| 910 | int type; |
| 911 | unsigned long serial; /* # of last request processed by server */ |
| 912 | Bool send_event; /* true if this came from a SendEvent request */ |
| 913 | Display *display; /* Display the event was read from */ |
| 914 | Window window; |
| 915 | Atom message_type; |
| 916 | int format; |
| 917 | union { |
| 918 | char b[20]; |
| 919 | short s[10]; |
| 920 | long l[5]; |
| 921 | } data; |
| 922 | } XClientMessageEvent; |
| 923 | |
| 924 | typedef struct { |
| 925 | int type; |
| 926 | unsigned long serial; /* # of last request processed by server */ |
| 927 | Bool send_event; /* true if this came from a SendEvent request */ |
| 928 | Display *display; /* Display the event was read from */ |
| 929 | Window window; /* unused */ |
| 930 | int request; /* one of MappingModifier, MappingKeyboard, |
| 931 | MappingPointer */ |
| 932 | int first_keycode; /* first keycode */ |
| 933 | int count; /* defines range of change w. first_keycode*/ |
| 934 | } XMappingEvent; |
| 935 | |
| 936 | typedef struct { |
| 937 | int type; |
| 938 | Display *display; /* Display the event was read from */ |
| 939 | XID resourceid; /* resource id */ |
| 940 | unsigned long serial; /* serial number of failed request */ |
| 941 | unsigned char error_code; /* error code of failed request */ |
| 942 | unsigned char request_code; /* Major op-code of failed request */ |
| 943 | unsigned char minor_code; /* Minor op-code of failed request */ |
| 944 | } XErrorEvent; |
| 945 | |
| 946 | typedef struct { |
| 947 | int type; |
| 948 | unsigned long serial; /* # of last request processed by server */ |
| 949 | Bool send_event; /* true if this came from a SendEvent request */ |
| 950 | Display *display;/* Display the event was read from */ |
| 951 | Window window; /* window on which event was requested in event mask */ |
| 952 | } XAnyEvent; |
| 953 | |
| 954 | |
| 955 | /*************************************************************** |
| 956 | * |
| 957 | * GenericEvent. This event is the standard event for all newer extensions. |
| 958 | */ |
| 959 | |
| 960 | typedef struct |
| 961 | { |
| 962 | int type; /* of event. Always GenericEvent */ |
| 963 | unsigned long serial; /* # of last request processed */ |
| 964 | Bool send_event; /* true if from SendEvent request */ |
| 965 | Display *display; /* Display the event was read from */ |
| 966 | int extension; /* major opcode of extension that caused the event */ |
| 967 | int evtype; /* actual event type. */ |
| 968 | } XGenericEvent; |
| 969 | |
| 970 | typedef struct { |
| 971 | int type; /* of event. Always GenericEvent */ |
| 972 | unsigned long serial; /* # of last request processed */ |
| 973 | Bool send_event; /* true if from SendEvent request */ |
| 974 | Display *display; /* Display the event was read from */ |
| 975 | int extension; /* major opcode of extension that caused the event */ |
| 976 | int evtype; /* actual event type. */ |
| 977 | unsigned int cookie; |
| 978 | void *data; |
| 979 | } XGenericEventCookie; |
| 980 | |
| 981 | /* |
| 982 | * this union is defined so Xlib can always use the same sized |
| 983 | * event structure internally, to avoid memory fragmentation. |
| 984 | */ |
| 985 | typedef union _XEvent { |
| 986 | int type; /* must not be changed; first element */ |
| 987 | XAnyEvent xany; |
| 988 | XKeyEvent xkey; |
| 989 | XButtonEvent xbutton; |
| 990 | XMotionEvent xmotion; |
| 991 | XCrossingEvent xcrossing; |
| 992 | XFocusChangeEvent xfocus; |
| 993 | XExposeEvent xexpose; |
| 994 | XGraphicsExposeEvent xgraphicsexpose; |
| 995 | XNoExposeEvent xnoexpose; |
| 996 | XVisibilityEvent xvisibility; |
| 997 | XCreateWindowEvent xcreatewindow; |
| 998 | XDestroyWindowEvent xdestroywindow; |
| 999 | XUnmapEvent xunmap; |
| 1000 | XMapEvent xmap; |
| 1001 | XMapRequestEvent xmaprequest; |
| 1002 | XReparentEvent xreparent; |
| 1003 | XConfigureEvent xconfigure; |
| 1004 | XGravityEvent xgravity; |
| 1005 | XResizeRequestEvent xresizerequest; |
| 1006 | XConfigureRequestEvent xconfigurerequest; |
| 1007 | XCirculateEvent xcirculate; |
| 1008 | XCirculateRequestEvent xcirculaterequest; |
| 1009 | XPropertyEvent xproperty; |
| 1010 | XSelectionClearEvent xselectionclear; |
| 1011 | XSelectionRequestEvent xselectionrequest; |
| 1012 | XSelectionEvent xselection; |
| 1013 | XColormapEvent xcolormap; |
| 1014 | XClientMessageEvent xclient; |
| 1015 | XMappingEvent xmapping; |
| 1016 | XErrorEvent xerror; |
| 1017 | XKeymapEvent xkeymap; |
| 1018 | XGenericEvent xgeneric; |
| 1019 | XGenericEventCookie xcookie; |
| 1020 | long pad[24]; |
| 1021 | } XEvent; |
| 1022 | #endif |
| 1023 | |
| 1024 | #define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy))) |
| 1025 | |
| 1026 | /* |
| 1027 | * per character font metric information. |
| 1028 | */ |
| 1029 | typedef struct { |
| 1030 | short lbearing; /* origin to left edge of raster */ |
| 1031 | short rbearing; /* origin to right edge of raster */ |
| 1032 | short width; /* advance to next char's origin */ |
| 1033 | short ascent; /* baseline to top edge of raster */ |
| 1034 | short descent; /* baseline to bottom edge of raster */ |
| 1035 | unsigned short attributes; /* per char flags (not predefined) */ |
| 1036 | } XCharStruct; |
| 1037 | |
| 1038 | /* |
| 1039 | * To allow arbitrary information with fonts, there are additional properties |
| 1040 | * returned. |
| 1041 | */ |
| 1042 | typedef struct { |
| 1043 | Atom name; |
| 1044 | unsigned long card32; |
| 1045 | } XFontProp; |
| 1046 | |
| 1047 | typedef struct { |
| 1048 | XExtData *ext_data; /* hook for extension to hang data */ |
| 1049 | Font fid; /* Font id for this font */ |
| 1050 | unsigned direction; /* hint about direction the font is painted */ |
| 1051 | unsigned min_char_or_byte2;/* first character */ |
| 1052 | unsigned max_char_or_byte2;/* last character */ |
| 1053 | unsigned min_byte1; /* first row that exists */ |
| 1054 | unsigned max_byte1; /* last row that exists */ |
| 1055 | Bool all_chars_exist;/* flag if all characters have non-zero size*/ |
| 1056 | unsigned default_char; /* char to print for undefined character */ |
| 1057 | int n_properties; /* how many properties there are */ |
| 1058 | XFontProp *properties; /* pointer to array of additional properties*/ |
| 1059 | XCharStruct min_bounds; /* minimum bounds over all existing char*/ |
| 1060 | XCharStruct max_bounds; /* maximum bounds over all existing char*/ |
| 1061 | XCharStruct *per_char; /* first_char to last_char information */ |
| 1062 | int ascent; /* log. extent above baseline for spacing */ |
| 1063 | int descent; /* log. descent below baseline for spacing */ |
| 1064 | } XFontStruct; |
| 1065 | |
| 1066 | /* |
| 1067 | * PolyText routines take these as arguments. |
| 1068 | */ |
| 1069 | typedef struct { |
| 1070 | char *chars; /* pointer to string */ |
| 1071 | int nchars; /* number of characters */ |
| 1072 | int delta; /* delta between strings */ |
| 1073 | Font font; /* font to print it in, None don't change */ |
| 1074 | } XTextItem; |
| 1075 | |
| 1076 | typedef struct { /* normal 16 bit characters are two bytes */ |
| 1077 | unsigned char byte1; |
| 1078 | unsigned char byte2; |
| 1079 | } XChar2b; |
| 1080 | |
| 1081 | typedef struct { |
| 1082 | XChar2b *chars; /* two byte characters */ |
| 1083 | int nchars; /* number of characters */ |
| 1084 | int delta; /* delta between strings */ |
| 1085 | Font font; /* font to print it in, None don't change */ |
| 1086 | } XTextItem16; |
| 1087 | |
| 1088 | |
| 1089 | typedef union { Display *display; |
| 1090 | GC gc; |
| 1091 | Visual *visual; |
| 1092 | Screen *screen; |
| 1093 | ScreenFormat *pixmap_format; |
| 1094 | XFontStruct *font; } XEDataObject; |
| 1095 | |
| 1096 | typedef struct { |
| 1097 | XRectangle max_ink_extent; |
| 1098 | XRectangle max_logical_extent; |
| 1099 | } XFontSetExtents; |
| 1100 | |
| 1101 | /* unused: |
| 1102 | typedef void (*XOMProc)(); |
| 1103 | */ |
| 1104 | |
| 1105 | typedef struct _XOM *XOM; |
| 1106 | typedef struct _XOC *XOC, *XFontSet; |
| 1107 | |
| 1108 | typedef struct { |
| 1109 | char *chars; |
| 1110 | int nchars; |
| 1111 | int delta; |
| 1112 | XFontSet font_set; |
| 1113 | } XmbTextItem; |
| 1114 | |
| 1115 | typedef struct { |
| 1116 | wchar_t *chars; |
| 1117 | int nchars; |
| 1118 | int delta; |
| 1119 | XFontSet font_set; |
| 1120 | } XwcTextItem; |
| 1121 | |
| 1122 | #define XNRequiredCharSet "requiredCharSet" |
| 1123 | #define XNQueryOrientation "queryOrientation" |
| 1124 | #define XNBaseFontName "baseFontName" |
| 1125 | #define XNOMAutomatic "omAutomatic" |
| 1126 | #define XNMissingCharSet "missingCharSet" |
| 1127 | #define XNDefaultString "defaultString" |
| 1128 | #define XNOrientation "orientation" |
| 1129 | #define XNDirectionalDependentDrawing "directionalDependentDrawing" |
| 1130 | #define XNContextualDrawing "contextualDrawing" |
| 1131 | #define XNFontInfo "fontInfo" |
| 1132 | |
| 1133 | typedef struct { |
| 1134 | int charset_count; |
| 1135 | char **charset_list; |
| 1136 | } XOMCharSetList; |
| 1137 | |
| 1138 | typedef enum { |
| 1139 | XOMOrientation_LTR_TTB, |
| 1140 | XOMOrientation_RTL_TTB, |
| 1141 | XOMOrientation_TTB_LTR, |
| 1142 | XOMOrientation_TTB_RTL, |
| 1143 | XOMOrientation_Context |
| 1144 | } XOrientation; |
| 1145 | |
| 1146 | typedef struct { |
| 1147 | int num_orientation; |
| 1148 | XOrientation *orientation; /* Input Text description */ |
| 1149 | } XOMOrientation; |
| 1150 | |
| 1151 | typedef struct { |
| 1152 | int num_font; |
| 1153 | XFontStruct **font_struct_list; |
| 1154 | char **font_name_list; |
| 1155 | } XOMFontInfo; |
| 1156 | |
| 1157 | typedef struct _XIM *XIM; |
| 1158 | typedef struct _XIC *XIC; |
| 1159 | |
| 1160 | typedef void (*XIMProc)( |
| 1161 | XIM, |
| 1162 | XPointer, |
| 1163 | XPointer |
| 1164 | ); |
| 1165 | |
| 1166 | typedef Bool (*XICProc)( |
| 1167 | XIC, |
| 1168 | XPointer, |
| 1169 | XPointer |
| 1170 | ); |
| 1171 | |
| 1172 | typedef void (*XIDProc)( |
| 1173 | Display*, |
| 1174 | XPointer, |
| 1175 | XPointer |
| 1176 | ); |
| 1177 | |
| 1178 | typedef unsigned long XIMStyle; |
| 1179 | |
| 1180 | typedef struct { |
| 1181 | unsigned short count_styles; |
| 1182 | XIMStyle *supported_styles; |
| 1183 | } XIMStyles; |
| 1184 | |
| 1185 | #define XIMPreeditArea 0x0001L |
| 1186 | #define XIMPreeditCallbacks 0x0002L |
| 1187 | #define XIMPreeditPosition 0x0004L |
| 1188 | #define XIMPreeditNothing 0x0008L |
| 1189 | #define XIMPreeditNone 0x0010L |
| 1190 | #define XIMStatusArea 0x0100L |
| 1191 | #define XIMStatusCallbacks 0x0200L |
| 1192 | #define XIMStatusNothing 0x0400L |
| 1193 | #define XIMStatusNone 0x0800L |
| 1194 | |
| 1195 | #define XNVaNestedList "XNVaNestedList" |
| 1196 | #define XNQueryInputStyle "queryInputStyle" |
| 1197 | #define XNClientWindow "clientWindow" |
| 1198 | #define XNInputStyle "inputStyle" |
| 1199 | #define XNFocusWindow "focusWindow" |
| 1200 | #define XNResourceName "resourceName" |
| 1201 | #define XNResourceClass "resourceClass" |
| 1202 | #define XNGeometryCallback "geometryCallback" |
| 1203 | #define XNDestroyCallback "destroyCallback" |
| 1204 | #define XNFilterEvents "filterEvents" |
| 1205 | #define XNPreeditStartCallback "preeditStartCallback" |
| 1206 | #define XNPreeditDoneCallback "preeditDoneCallback" |
| 1207 | #define XNPreeditDrawCallback "preeditDrawCallback" |
| 1208 | #define XNPreeditCaretCallback "preeditCaretCallback" |
| 1209 | #define XNPreeditStateNotifyCallback "preeditStateNotifyCallback" |
| 1210 | #define XNPreeditAttributes "preeditAttributes" |
| 1211 | #define XNStatusStartCallback "statusStartCallback" |
| 1212 | #define XNStatusDoneCallback "statusDoneCallback" |
| 1213 | #define XNStatusDrawCallback "statusDrawCallback" |
| 1214 | #define XNStatusAttributes "statusAttributes" |
| 1215 | #define XNArea "area" |
| 1216 | #define XNAreaNeeded "areaNeeded" |
| 1217 | #define XNSpotLocation "spotLocation" |
| 1218 | #define XNColormap "colorMap" |
| 1219 | #define XNStdColormap "stdColorMap" |
| 1220 | #define XNForeground "foreground" |
| 1221 | #define XNBackground "background" |
| 1222 | #define XNBackgroundPixmap "backgroundPixmap" |
| 1223 | #define XNFontSet "fontSet" |
| 1224 | #define XNLineSpace "lineSpace" |
| 1225 | #define XNCursor "cursor" |
| 1226 | |
| 1227 | #define XNQueryIMValuesList "queryIMValuesList" |
| 1228 | #define XNQueryICValuesList "queryICValuesList" |
| 1229 | #define XNVisiblePosition "visiblePosition" |
| 1230 | #define XNR6PreeditCallback "r6PreeditCallback" |
| 1231 | #define XNStringConversionCallback "stringConversionCallback" |
| 1232 | #define XNStringConversion "stringConversion" |
| 1233 | #define XNResetState "resetState" |
| 1234 | #define XNHotKey "hotKey" |
| 1235 | #define XNHotKeyState "hotKeyState" |
| 1236 | #define XNPreeditState "preeditState" |
| 1237 | #define XNSeparatorofNestedList "separatorofNestedList" |
| 1238 | |
| 1239 | #define XBufferOverflow -1 |
| 1240 | #define XLookupNone 1 |
| 1241 | #define XLookupChars 2 |
| 1242 | #define XLookupKeySym 3 |
| 1243 | #define XLookupBoth 4 |
| 1244 | |
| 1245 | typedef void *XVaNestedList; |
| 1246 | |
| 1247 | typedef struct { |
| 1248 | XPointer client_data; |
| 1249 | XIMProc callback; |
| 1250 | } XIMCallback; |
| 1251 | |
| 1252 | typedef struct { |
| 1253 | XPointer client_data; |
| 1254 | XICProc callback; |
| 1255 | } XICCallback; |
| 1256 | |
| 1257 | typedef unsigned long XIMFeedback; |
| 1258 | |
| 1259 | #define XIMReverse 1L |
| 1260 | #define XIMUnderline (1L<<1) |
| 1261 | #define XIMHighlight (1L<<2) |
| 1262 | #define XIMPrimary (1L<<5) |
| 1263 | #define XIMSecondary (1L<<6) |
| 1264 | #define XIMTertiary (1L<<7) |
| 1265 | #define XIMVisibleToForward (1L<<8) |
| 1266 | #define XIMVisibleToBackword (1L<<9) |
| 1267 | #define XIMVisibleToCenter (1L<<10) |
| 1268 | |
| 1269 | typedef struct _XIMText { |
| 1270 | unsigned short length; |
| 1271 | XIMFeedback *feedback; |
| 1272 | Bool encoding_is_wchar; |
| 1273 | union { |
| 1274 | char *multi_byte; |
| 1275 | wchar_t *wide_char; |
| 1276 | } string; |
| 1277 | } XIMText; |
| 1278 | |
| 1279 | typedef unsigned long XIMPreeditState; |
| 1280 | |
| 1281 | #define XIMPreeditUnKnown 0L |
| 1282 | #define XIMPreeditEnable 1L |
| 1283 | #define XIMPreeditDisable (1L<<1) |
| 1284 | |
| 1285 | typedef struct _XIMPreeditStateNotifyCallbackStruct { |
| 1286 | XIMPreeditState state; |
| 1287 | } XIMPreeditStateNotifyCallbackStruct; |
| 1288 | |
| 1289 | typedef unsigned long XIMResetState; |
| 1290 | |
| 1291 | #define XIMInitialState 1L |
| 1292 | #define XIMPreserveState (1L<<1) |
| 1293 | |
| 1294 | typedef unsigned long XIMStringConversionFeedback; |
| 1295 | |
| 1296 | #define XIMStringConversionLeftEdge (0x00000001) |
| 1297 | #define XIMStringConversionRightEdge (0x00000002) |
| 1298 | #define XIMStringConversionTopEdge (0x00000004) |
| 1299 | #define XIMStringConversionBottomEdge (0x00000008) |
| 1300 | #define XIMStringConversionConcealed (0x00000010) |
| 1301 | #define XIMStringConversionWrapped (0x00000020) |
| 1302 | |
| 1303 | typedef struct _XIMStringConversionText { |
| 1304 | unsigned short length; |
| 1305 | XIMStringConversionFeedback *feedback; |
| 1306 | Bool encoding_is_wchar; |
| 1307 | union { |
| 1308 | char *mbs; |
| 1309 | wchar_t *wcs; |
| 1310 | } string; |
| 1311 | } XIMStringConversionText; |
| 1312 | |
| 1313 | typedef unsigned short XIMStringConversionPosition; |
| 1314 | |
| 1315 | typedef unsigned short XIMStringConversionType; |
| 1316 | |
| 1317 | #define XIMStringConversionBuffer (0x0001) |
| 1318 | #define XIMStringConversionLine (0x0002) |
| 1319 | #define XIMStringConversionWord (0x0003) |
| 1320 | #define XIMStringConversionChar (0x0004) |
| 1321 | |
| 1322 | typedef unsigned short XIMStringConversionOperation; |
| 1323 | |
| 1324 | #define XIMStringConversionSubstitution (0x0001) |
| 1325 | #define XIMStringConversionRetrieval (0x0002) |
| 1326 | |
| 1327 | typedef enum { |
| 1328 | XIMForwardChar, XIMBackwardChar, |
| 1329 | XIMForwardWord, XIMBackwardWord, |
| 1330 | XIMCaretUp, XIMCaretDown, |
| 1331 | XIMNextLine, XIMPreviousLine, |
| 1332 | XIMLineStart, XIMLineEnd, |
| 1333 | XIMAbsolutePosition, |
| 1334 | XIMDontChange |
| 1335 | } XIMCaretDirection; |
| 1336 | |
| 1337 | typedef struct _XIMStringConversionCallbackStruct { |
| 1338 | XIMStringConversionPosition position; |
| 1339 | XIMCaretDirection direction; |
| 1340 | XIMStringConversionOperation operation; |
| 1341 | unsigned short factor; |
| 1342 | XIMStringConversionText *text; |
| 1343 | } XIMStringConversionCallbackStruct; |
| 1344 | |
| 1345 | typedef struct _XIMPreeditDrawCallbackStruct { |
| 1346 | int caret; /* Cursor offset within pre-edit string */ |
| 1347 | int chg_first; /* Starting change position */ |
| 1348 | int chg_length; /* Length of the change in character count */ |
| 1349 | XIMText *text; |
| 1350 | } XIMPreeditDrawCallbackStruct; |
| 1351 | |
| 1352 | typedef enum { |
| 1353 | XIMIsInvisible, /* Disable caret feedback */ |
| 1354 | XIMIsPrimary, /* UI defined caret feedback */ |
| 1355 | XIMIsSecondary /* UI defined caret feedback */ |
| 1356 | } XIMCaretStyle; |
| 1357 | |
| 1358 | typedef struct _XIMPreeditCaretCallbackStruct { |
| 1359 | int position; /* Caret offset within pre-edit string */ |
| 1360 | XIMCaretDirection direction; /* Caret moves direction */ |
| 1361 | XIMCaretStyle style; /* Feedback of the caret */ |
| 1362 | } XIMPreeditCaretCallbackStruct; |
| 1363 | |
| 1364 | typedef enum { |
| 1365 | XIMTextType, |
| 1366 | XIMBitmapType |
| 1367 | } XIMStatusDataType; |
| 1368 | |
| 1369 | typedef struct _XIMStatusDrawCallbackStruct { |
| 1370 | XIMStatusDataType type; |
| 1371 | union { |
| 1372 | XIMText *text; |
| 1373 | Pixmap bitmap; |
| 1374 | } data; |
| 1375 | } XIMStatusDrawCallbackStruct; |
| 1376 | |
| 1377 | typedef struct _XIMHotKeyTrigger { |
| 1378 | KeySym keysym; |
| 1379 | int modifier; |
| 1380 | int modifier_mask; |
| 1381 | } XIMHotKeyTrigger; |
| 1382 | |
| 1383 | typedef struct _XIMHotKeyTriggers { |
| 1384 | int num_hot_key; |
| 1385 | XIMHotKeyTrigger *key; |
| 1386 | } XIMHotKeyTriggers; |
| 1387 | |
| 1388 | typedef unsigned long XIMHotKeyState; |
| 1389 | |
| 1390 | #define XIMHotKeyStateON (0x0001L) |
| 1391 | #define XIMHotKeyStateOFF (0x0002L) |
| 1392 | |
| 1393 | typedef struct { |
| 1394 | unsigned short count_values; |
| 1395 | char **supported_values; |
| 1396 | } XIMValuesList; |
| 1397 | |
| 1398 | _XFUNCPROTOBEGIN |
| 1399 | |
| 1400 | #if defined(WIN32) && !defined(_XLIBINT_) |
| 1401 | #define _Xdebug (*_Xdebug_p) |
| 1402 | #endif |
| 1403 | |
| 1404 | extern int _Xdebug; |
| 1405 | |
| 1406 | extern XFontStruct *XLoadQueryFont( |
| 1407 | Display* /* display */, |
| 1408 | _Xconst char* /* name */ |
| 1409 | ); |
| 1410 | |
| 1411 | extern XFontStruct *XQueryFont( |
| 1412 | Display* /* display */, |
| 1413 | XID /* font_ID */ |
| 1414 | ); |
| 1415 | |
| 1416 | |
| 1417 | extern XTimeCoord *XGetMotionEvents( |
| 1418 | Display* /* display */, |
| 1419 | Window /* w */, |
| 1420 | Time /* start */, |
| 1421 | Time /* stop */, |
| 1422 | int* /* nevents_return */ |
| 1423 | ); |
| 1424 | |
| 1425 | extern XModifierKeymap *XDeleteModifiermapEntry( |
| 1426 | XModifierKeymap* /* modmap */, |
| 1427 | #if NeedWidePrototypes |
| 1428 | unsigned int /* keycode_entry */, |
| 1429 | #else |
| 1430 | KeyCode /* keycode_entry */, |
| 1431 | #endif |
| 1432 | int /* modifier */ |
| 1433 | ); |
| 1434 | |
| 1435 | extern XModifierKeymap *XGetModifierMapping( |
| 1436 | Display* /* display */ |
| 1437 | ); |
| 1438 | |
| 1439 | extern XModifierKeymap *XInsertModifiermapEntry( |
| 1440 | XModifierKeymap* /* modmap */, |
| 1441 | #if NeedWidePrototypes |
| 1442 | unsigned int /* keycode_entry */, |
| 1443 | #else |
| 1444 | KeyCode /* keycode_entry */, |
| 1445 | #endif |
| 1446 | int /* modifier */ |
| 1447 | ); |
| 1448 | |
| 1449 | extern XModifierKeymap *XNewModifiermap( |
| 1450 | int /* max_keys_per_mod */ |
| 1451 | ); |
| 1452 | |
| 1453 | extern XImage *XCreateImage( |
| 1454 | Display* /* display */, |
| 1455 | Visual* /* visual */, |
| 1456 | unsigned int /* depth */, |
| 1457 | int /* format */, |
| 1458 | int /* offset */, |
| 1459 | char* /* data */, |
| 1460 | unsigned int /* width */, |
| 1461 | unsigned int /* height */, |
| 1462 | int /* bitmap_pad */, |
| 1463 | int /* bytes_per_line */ |
| 1464 | ); |
| 1465 | extern Status XInitImage( |
| 1466 | XImage* /* image */ |
| 1467 | ); |
| 1468 | extern XImage *XGetImage( |
| 1469 | Display* /* display */, |
| 1470 | Drawable /* d */, |
| 1471 | int /* x */, |
| 1472 | int /* y */, |
| 1473 | unsigned int /* width */, |
| 1474 | unsigned int /* height */, |
| 1475 | unsigned long /* plane_mask */, |
| 1476 | int /* format */ |
| 1477 | ); |
| 1478 | extern XImage *XGetSubImage( |
| 1479 | Display* /* display */, |
| 1480 | Drawable /* d */, |
| 1481 | int /* x */, |
| 1482 | int /* y */, |
| 1483 | unsigned int /* width */, |
| 1484 | unsigned int /* height */, |
| 1485 | unsigned long /* plane_mask */, |
| 1486 | int /* format */, |
| 1487 | XImage* /* dest_image */, |
| 1488 | int /* dest_x */, |
| 1489 | int /* dest_y */ |
| 1490 | ); |
| 1491 | |
| 1492 | /* |
| 1493 | * X function declarations. |
| 1494 | */ |
| 1495 | extern Display *XOpenDisplay( |
| 1496 | _Xconst char* /* display_name */ |
| 1497 | ); |
| 1498 | |
| 1499 | extern void XrmInitialize( |
| 1500 | void |
| 1501 | ); |
| 1502 | |
| 1503 | extern char *XFetchBytes( |
| 1504 | Display* /* display */, |
| 1505 | int* /* nbytes_return */ |
| 1506 | ); |
| 1507 | extern char *XFetchBuffer( |
| 1508 | Display* /* display */, |
| 1509 | int* /* nbytes_return */, |
| 1510 | int /* buffer */ |
| 1511 | ); |
| 1512 | extern char *XGetAtomName( |
| 1513 | Display* /* display */, |
| 1514 | Atom /* atom */ |
| 1515 | ); |
| 1516 | extern Status XGetAtomNames( |
| 1517 | Display* /* dpy */, |
| 1518 | Atom* /* atoms */, |
| 1519 | int /* count */, |
| 1520 | char** /* names_return */ |
| 1521 | ); |
| 1522 | extern char *XGetDefault( |
| 1523 | Display* /* display */, |
| 1524 | _Xconst char* /* program */, |
| 1525 | _Xconst char* /* option */ |
| 1526 | ); |
| 1527 | extern char *XDisplayName( |
| 1528 | _Xconst char* /* string */ |
| 1529 | ); |
| 1530 | extern char *XKeysymToString( |
| 1531 | KeySym /* keysym */ |
| 1532 | ); |
| 1533 | |
| 1534 | extern int (*XSynchronize( |
| 1535 | Display* /* display */, |
| 1536 | Bool /* onoff */ |
| 1537 | ))( |
| 1538 | Display* /* display */ |
| 1539 | ); |
| 1540 | extern int (*XSetAfterFunction( |
| 1541 | Display* /* display */, |
| 1542 | int (*) ( |
| 1543 | Display* /* display */ |
| 1544 | ) /* procedure */ |
| 1545 | ))( |
| 1546 | Display* /* display */ |
| 1547 | ); |
| 1548 | extern Atom XInternAtom( |
| 1549 | Display* /* display */, |
| 1550 | _Xconst char* /* atom_name */, |
| 1551 | Bool /* only_if_exists */ |
| 1552 | ); |
| 1553 | extern Status XInternAtoms( |
| 1554 | Display* /* dpy */, |
| 1555 | char** /* names */, |
| 1556 | int /* count */, |
| 1557 | Bool /* onlyIfExists */, |
| 1558 | Atom* /* atoms_return */ |
| 1559 | ); |
| 1560 | extern Colormap XCopyColormapAndFree( |
| 1561 | Display* /* display */, |
| 1562 | Colormap /* colormap */ |
| 1563 | ); |
| 1564 | extern Colormap XCreateColormap( |
| 1565 | Display* /* display */, |
| 1566 | Window /* w */, |
| 1567 | Visual* /* visual */, |
| 1568 | int /* alloc */ |
| 1569 | ); |
| 1570 | extern Cursor XCreatePixmapCursor( |
| 1571 | Display* /* display */, |
| 1572 | Pixmap /* source */, |
| 1573 | Pixmap /* mask */, |
| 1574 | XColor* /* foreground_color */, |
| 1575 | XColor* /* background_color */, |
| 1576 | unsigned int /* x */, |
| 1577 | unsigned int /* y */ |
| 1578 | ); |
| 1579 | extern Cursor XCreateGlyphCursor( |
| 1580 | Display* /* display */, |
| 1581 | Font /* source_font */, |
| 1582 | Font /* mask_font */, |
| 1583 | unsigned int /* source_char */, |
| 1584 | unsigned int /* mask_char */, |
| 1585 | XColor _Xconst * /* foreground_color */, |
| 1586 | XColor _Xconst * /* background_color */ |
| 1587 | ); |
| 1588 | extern Cursor XCreateFontCursor( |
| 1589 | Display* /* display */, |
| 1590 | unsigned int /* shape */ |
| 1591 | ); |
| 1592 | extern Font XLoadFont( |
| 1593 | Display* /* display */, |
| 1594 | _Xconst char* /* name */ |
| 1595 | ); |
| 1596 | extern GC XCreateGC( |
| 1597 | Display* /* display */, |
| 1598 | Drawable /* d */, |
| 1599 | unsigned long /* valuemask */, |
| 1600 | XGCValues* /* values */ |
| 1601 | ); |
| 1602 | extern GContext XGContextFromGC( |
| 1603 | GC /* gc */ |
| 1604 | ); |
| 1605 | extern void XFlushGC( |
| 1606 | Display* /* display */, |
| 1607 | GC /* gc */ |
| 1608 | ); |
| 1609 | extern Pixmap XCreatePixmap( |
| 1610 | Display* /* display */, |
| 1611 | Drawable /* d */, |
| 1612 | unsigned int /* width */, |
| 1613 | unsigned int /* height */, |
| 1614 | unsigned int /* depth */ |
| 1615 | ); |
| 1616 | extern Pixmap XCreateBitmapFromData( |
| 1617 | Display* /* display */, |
| 1618 | Drawable /* d */, |
| 1619 | _Xconst char* /* data */, |
| 1620 | unsigned int /* width */, |
| 1621 | unsigned int /* height */ |
| 1622 | ); |
| 1623 | extern Pixmap XCreatePixmapFromBitmapData( |
| 1624 | Display* /* display */, |
| 1625 | Drawable /* d */, |
| 1626 | char* /* data */, |
| 1627 | unsigned int /* width */, |
| 1628 | unsigned int /* height */, |
| 1629 | unsigned long /* fg */, |
| 1630 | unsigned long /* bg */, |
| 1631 | unsigned int /* depth */ |
| 1632 | ); |
| 1633 | extern Window XCreateSimpleWindow( |
| 1634 | Display* /* display */, |
| 1635 | Window /* parent */, |
| 1636 | int /* x */, |
| 1637 | int /* y */, |
| 1638 | unsigned int /* width */, |
| 1639 | unsigned int /* height */, |
| 1640 | unsigned int /* border_width */, |
| 1641 | unsigned long /* border */, |
| 1642 | unsigned long /* background */ |
| 1643 | ); |
| 1644 | extern Window XGetSelectionOwner( |
| 1645 | Display* /* display */, |
| 1646 | Atom /* selection */ |
| 1647 | ); |
| 1648 | extern Window XCreateWindow( |
| 1649 | Display* /* display */, |
| 1650 | Window /* parent */, |
| 1651 | int /* x */, |
| 1652 | int /* y */, |
| 1653 | unsigned int /* width */, |
| 1654 | unsigned int /* height */, |
| 1655 | unsigned int /* border_width */, |
| 1656 | int /* depth */, |
| 1657 | unsigned int /* class */, |
| 1658 | Visual* /* visual */, |
| 1659 | unsigned long /* valuemask */, |
| 1660 | XSetWindowAttributes* /* attributes */ |
| 1661 | ); |
| 1662 | extern Colormap *XListInstalledColormaps( |
| 1663 | Display* /* display */, |
| 1664 | Window /* w */, |
| 1665 | int* /* num_return */ |
| 1666 | ); |
| 1667 | extern char **XListFonts( |
| 1668 | Display* /* display */, |
| 1669 | _Xconst char* /* pattern */, |
| 1670 | int /* maxnames */, |
| 1671 | int* /* actual_count_return */ |
| 1672 | ); |
| 1673 | extern char **XListFontsWithInfo( |
| 1674 | Display* /* display */, |
| 1675 | _Xconst char* /* pattern */, |
| 1676 | int /* maxnames */, |
| 1677 | int* /* count_return */, |
| 1678 | XFontStruct** /* info_return */ |
| 1679 | ); |
| 1680 | extern char **XGetFontPath( |
| 1681 | Display* /* display */, |
| 1682 | int* /* npaths_return */ |
| 1683 | ); |
| 1684 | extern char **XListExtensions( |
| 1685 | Display* /* display */, |
| 1686 | int* /* nextensions_return */ |
| 1687 | ); |
| 1688 | extern Atom *XListProperties( |
| 1689 | Display* /* display */, |
| 1690 | Window /* w */, |
| 1691 | int* /* num_prop_return */ |
| 1692 | ); |
| 1693 | extern XHostAddress *XListHosts( |
| 1694 | Display* /* display */, |
| 1695 | int* /* nhosts_return */, |
| 1696 | Bool* /* state_return */ |
| 1697 | ); |
| 1698 | _X_DEPRECATED |
| 1699 | extern KeySym XKeycodeToKeysym( |
| 1700 | Display* /* display */, |
| 1701 | #if NeedWidePrototypes |
| 1702 | unsigned int /* keycode */, |
| 1703 | #else |
| 1704 | KeyCode /* keycode */, |
| 1705 | #endif |
| 1706 | int /* index */ |
| 1707 | ); |
| 1708 | extern KeySym XLookupKeysym( |
| 1709 | XKeyEvent* /* key_event */, |
| 1710 | int /* index */ |
| 1711 | ); |
| 1712 | extern KeySym *XGetKeyboardMapping( |
| 1713 | Display* /* display */, |
| 1714 | #if NeedWidePrototypes |
| 1715 | unsigned int /* first_keycode */, |
| 1716 | #else |
| 1717 | KeyCode /* first_keycode */, |
| 1718 | #endif |
| 1719 | int /* keycode_count */, |
| 1720 | int* /* keysyms_per_keycode_return */ |
| 1721 | ); |
| 1722 | extern KeySym XStringToKeysym( |
| 1723 | _Xconst char* /* string */ |
| 1724 | ); |
| 1725 | extern long XMaxRequestSize( |
| 1726 | Display* /* display */ |
| 1727 | ); |
| 1728 | extern long XExtendedMaxRequestSize( |
| 1729 | Display* /* display */ |
| 1730 | ); |
| 1731 | extern char *XResourceManagerString( |
| 1732 | Display* /* display */ |
| 1733 | ); |
| 1734 | extern char *XScreenResourceString( |
| 1735 | Screen* /* screen */ |
| 1736 | ); |
| 1737 | extern unsigned long XDisplayMotionBufferSize( |
| 1738 | Display* /* display */ |
| 1739 | ); |
| 1740 | extern VisualID XVisualIDFromVisual( |
| 1741 | Visual* /* visual */ |
| 1742 | ); |
| 1743 | |
| 1744 | /* multithread routines */ |
| 1745 | |
| 1746 | extern Status XInitThreads( |
| 1747 | void |
| 1748 | ); |
| 1749 | |
| 1750 | extern void XLockDisplay( |
| 1751 | Display* /* display */ |
| 1752 | ); |
| 1753 | |
| 1754 | extern void XUnlockDisplay( |
| 1755 | Display* /* display */ |
| 1756 | ); |
| 1757 | |
| 1758 | /* routines for dealing with extensions */ |
| 1759 | |
| 1760 | extern XExtCodes *XInitExtension( |
| 1761 | Display* /* display */, |
| 1762 | _Xconst char* /* name */ |
| 1763 | ); |
| 1764 | |
| 1765 | extern XExtCodes *XAddExtension( |
| 1766 | Display* /* display */ |
| 1767 | ); |
| 1768 | extern XExtData *XFindOnExtensionList( |
| 1769 | XExtData** /* structure */, |
| 1770 | int /* number */ |
| 1771 | ); |
| 1772 | extern XExtData **XEHeadOfExtensionList( |
| 1773 | XEDataObject /* object */ |
| 1774 | ); |
| 1775 | |
| 1776 | /* these are routines for which there are also macros */ |
| 1777 | extern Window XRootWindow( |
| 1778 | Display* /* display */, |
| 1779 | int /* screen_number */ |
| 1780 | ); |
| 1781 | extern Window XDefaultRootWindow( |
| 1782 | Display* /* display */ |
| 1783 | ); |
| 1784 | extern Window XRootWindowOfScreen( |
| 1785 | Screen* /* screen */ |
| 1786 | ); |
| 1787 | extern Visual *XDefaultVisual( |
| 1788 | Display* /* display */, |
| 1789 | int /* screen_number */ |
| 1790 | ); |
| 1791 | extern Visual *XDefaultVisualOfScreen( |
| 1792 | Screen* /* screen */ |
| 1793 | ); |
| 1794 | extern GC XDefaultGC( |
| 1795 | Display* /* display */, |
| 1796 | int /* screen_number */ |
| 1797 | ); |
| 1798 | extern GC XDefaultGCOfScreen( |
| 1799 | Screen* /* screen */ |
| 1800 | ); |
| 1801 | extern unsigned long XBlackPixel( |
| 1802 | Display* /* display */, |
| 1803 | int /* screen_number */ |
| 1804 | ); |
| 1805 | extern unsigned long XWhitePixel( |
| 1806 | Display* /* display */, |
| 1807 | int /* screen_number */ |
| 1808 | ); |
| 1809 | extern unsigned long XAllPlanes( |
| 1810 | void |
| 1811 | ); |
| 1812 | extern unsigned long XBlackPixelOfScreen( |
| 1813 | Screen* /* screen */ |
| 1814 | ); |
| 1815 | extern unsigned long XWhitePixelOfScreen( |
| 1816 | Screen* /* screen */ |
| 1817 | ); |
| 1818 | extern unsigned long XNextRequest( |
| 1819 | Display* /* display */ |
| 1820 | ); |
| 1821 | extern unsigned long XLastKnownRequestProcessed( |
| 1822 | Display* /* display */ |
| 1823 | ); |
| 1824 | extern char *XServerVendor( |
| 1825 | Display* /* display */ |
| 1826 | ); |
| 1827 | extern char *XDisplayString( |
| 1828 | Display* /* display */ |
| 1829 | ); |
| 1830 | extern Colormap XDefaultColormap( |
| 1831 | Display* /* display */, |
| 1832 | int /* screen_number */ |
| 1833 | ); |
| 1834 | extern Colormap XDefaultColormapOfScreen( |
| 1835 | Screen* /* screen */ |
| 1836 | ); |
| 1837 | extern Display *XDisplayOfScreen( |
| 1838 | Screen* /* screen */ |
| 1839 | ); |
| 1840 | extern Screen *XScreenOfDisplay( |
| 1841 | Display* /* display */, |
| 1842 | int /* screen_number */ |
| 1843 | ); |
| 1844 | extern Screen *XDefaultScreenOfDisplay( |
| 1845 | Display* /* display */ |
| 1846 | ); |
| 1847 | extern long XEventMaskOfScreen( |
| 1848 | Screen* /* screen */ |
| 1849 | ); |
| 1850 | |
| 1851 | extern int XScreenNumberOfScreen( |
| 1852 | Screen* /* screen */ |
| 1853 | ); |
| 1854 | |
| 1855 | typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ |
| 1856 | Display* /* display */, |
| 1857 | XErrorEvent* /* error_event */ |
| 1858 | ); |
| 1859 | |
| 1860 | extern XErrorHandler XSetErrorHandler ( |
| 1861 | XErrorHandler /* handler */ |
| 1862 | ); |
| 1863 | |
| 1864 | |
| 1865 | typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */ |
| 1866 | Display* /* display */ |
| 1867 | ); |
| 1868 | |
| 1869 | extern XIOErrorHandler XSetIOErrorHandler ( |
| 1870 | XIOErrorHandler /* handler */ |
| 1871 | ); |
| 1872 | |
| 1873 | |
| 1874 | extern XPixmapFormatValues *XListPixmapFormats( |
| 1875 | Display* /* display */, |
| 1876 | int* /* count_return */ |
| 1877 | ); |
| 1878 | extern int *XListDepths( |
| 1879 | Display* /* display */, |
| 1880 | int /* screen_number */, |
| 1881 | int* /* count_return */ |
| 1882 | ); |
| 1883 | |
| 1884 | /* ICCCM routines for things that don't require special include files; */ |
| 1885 | /* other declarations are given in Xutil.h */ |
| 1886 | extern Status XReconfigureWMWindow( |
| 1887 | Display* /* display */, |
| 1888 | Window /* w */, |
| 1889 | int /* screen_number */, |
| 1890 | unsigned int /* mask */, |
| 1891 | XWindowChanges* /* changes */ |
| 1892 | ); |
| 1893 | |
| 1894 | extern Status XGetWMProtocols( |
| 1895 | Display* /* display */, |
| 1896 | Window /* w */, |
| 1897 | Atom** /* protocols_return */, |
| 1898 | int* /* count_return */ |
| 1899 | ); |
| 1900 | extern Status XSetWMProtocols( |
| 1901 | Display* /* display */, |
| 1902 | Window /* w */, |
| 1903 | Atom* /* protocols */, |
| 1904 | int /* count */ |
| 1905 | ); |
| 1906 | extern Status XIconifyWindow( |
| 1907 | Display* /* display */, |
| 1908 | Window /* w */, |
| 1909 | int /* screen_number */ |
| 1910 | ); |
| 1911 | extern Status XWithdrawWindow( |
| 1912 | Display* /* display */, |
| 1913 | Window /* w */, |
| 1914 | int /* screen_number */ |
| 1915 | ); |
| 1916 | extern Status XGetCommand( |
| 1917 | Display* /* display */, |
| 1918 | Window /* w */, |
| 1919 | char*** /* argv_return */, |
| 1920 | int* /* argc_return */ |
| 1921 | ); |
| 1922 | extern Status XGetWMColormapWindows( |
| 1923 | Display* /* display */, |
| 1924 | Window /* w */, |
| 1925 | Window** /* windows_return */, |
| 1926 | int* /* count_return */ |
| 1927 | ); |
| 1928 | extern Status XSetWMColormapWindows( |
| 1929 | Display* /* display */, |
| 1930 | Window /* w */, |
| 1931 | Window* /* colormap_windows */, |
| 1932 | int /* count */ |
| 1933 | ); |
| 1934 | extern void XFreeStringList( |
| 1935 | char** /* list */ |
| 1936 | ); |
| 1937 | extern int XSetTransientForHint( |
| 1938 | Display* /* display */, |
| 1939 | Window /* w */, |
| 1940 | Window /* prop_window */ |
| 1941 | ); |
| 1942 | |
| 1943 | /* The following are given in alphabetical order */ |
| 1944 | |
| 1945 | extern int XActivateScreenSaver( |
| 1946 | Display* /* display */ |
| 1947 | ); |
| 1948 | |
| 1949 | extern int XAddHost( |
| 1950 | Display* /* display */, |
| 1951 | XHostAddress* /* host */ |
| 1952 | ); |
| 1953 | |
| 1954 | extern int XAddHosts( |
| 1955 | Display* /* display */, |
| 1956 | XHostAddress* /* hosts */, |
| 1957 | int /* num_hosts */ |
| 1958 | ); |
| 1959 | |
| 1960 | extern int XAddToExtensionList( |
| 1961 | struct _XExtData** /* structure */, |
| 1962 | XExtData* /* ext_data */ |
| 1963 | ); |
| 1964 | |
| 1965 | extern int XAddToSaveSet( |
| 1966 | Display* /* display */, |
| 1967 | Window /* w */ |
| 1968 | ); |
| 1969 | |
| 1970 | extern Status XAllocColor( |
| 1971 | Display* /* display */, |
| 1972 | Colormap /* colormap */, |
| 1973 | XColor* /* screen_in_out */ |
| 1974 | ); |
| 1975 | |
| 1976 | extern Status XAllocColorCells( |
| 1977 | Display* /* display */, |
| 1978 | Colormap /* colormap */, |
| 1979 | Bool /* contig */, |
| 1980 | unsigned long* /* plane_masks_return */, |
| 1981 | unsigned int /* nplanes */, |
| 1982 | unsigned long* /* pixels_return */, |
| 1983 | unsigned int /* npixels */ |
| 1984 | ); |
| 1985 | |
| 1986 | extern Status XAllocColorPlanes( |
| 1987 | Display* /* display */, |
| 1988 | Colormap /* colormap */, |
| 1989 | Bool /* contig */, |
| 1990 | unsigned long* /* pixels_return */, |
| 1991 | int /* ncolors */, |
| 1992 | int /* nreds */, |
| 1993 | int /* ngreens */, |
| 1994 | int /* nblues */, |
| 1995 | unsigned long* /* rmask_return */, |
| 1996 | unsigned long* /* gmask_return */, |
| 1997 | unsigned long* /* bmask_return */ |
| 1998 | ); |
| 1999 | |
| 2000 | extern Status XAllocNamedColor( |
| 2001 | Display* /* display */, |
| 2002 | Colormap /* colormap */, |
| 2003 | _Xconst char* /* color_name */, |
| 2004 | XColor* /* screen_def_return */, |
| 2005 | XColor* /* exact_def_return */ |
| 2006 | ); |
| 2007 | |
| 2008 | extern int XAllowEvents( |
| 2009 | Display* /* display */, |
| 2010 | int /* event_mode */, |
| 2011 | Time /* time */ |
| 2012 | ); |
| 2013 | |
| 2014 | extern int XAutoRepeatOff( |
| 2015 | Display* /* display */ |
| 2016 | ); |
| 2017 | |
| 2018 | extern int XAutoRepeatOn( |
| 2019 | Display* /* display */ |
| 2020 | ); |
| 2021 | |
| 2022 | extern int XBell( |
| 2023 | Display* /* display */, |
| 2024 | int /* percent */ |
| 2025 | ); |
| 2026 | |
| 2027 | extern int XBitmapBitOrder( |
| 2028 | Display* /* display */ |
| 2029 | ); |
| 2030 | |
| 2031 | extern int XBitmapPad( |
| 2032 | Display* /* display */ |
| 2033 | ); |
| 2034 | |
| 2035 | extern int XBitmapUnit( |
| 2036 | Display* /* display */ |
| 2037 | ); |
| 2038 | |
| 2039 | extern int XCellsOfScreen( |
| 2040 | Screen* /* screen */ |
| 2041 | ); |
| 2042 | |
| 2043 | extern int XChangeActivePointerGrab( |
| 2044 | Display* /* display */, |
| 2045 | unsigned int /* event_mask */, |
| 2046 | Cursor /* cursor */, |
| 2047 | Time /* time */ |
| 2048 | ); |
| 2049 | |
| 2050 | extern int XChangeGC( |
| 2051 | Display* /* display */, |
| 2052 | GC /* gc */, |
| 2053 | unsigned long /* valuemask */, |
| 2054 | XGCValues* /* values */ |
| 2055 | ); |
| 2056 | |
| 2057 | extern int XChangeKeyboardControl( |
| 2058 | Display* /* display */, |
| 2059 | unsigned long /* value_mask */, |
| 2060 | XKeyboardControl* /* values */ |
| 2061 | ); |
| 2062 | |
| 2063 | extern int XChangeKeyboardMapping( |
| 2064 | Display* /* display */, |
| 2065 | int /* first_keycode */, |
| 2066 | int /* keysyms_per_keycode */, |
| 2067 | KeySym* /* keysyms */, |
| 2068 | int /* num_codes */ |
| 2069 | ); |
| 2070 | |
| 2071 | extern int XChangePointerControl( |
| 2072 | Display* /* display */, |
| 2073 | Bool /* do_accel */, |
| 2074 | Bool /* do_threshold */, |
| 2075 | int /* accel_numerator */, |
| 2076 | int /* accel_denominator */, |
| 2077 | int /* threshold */ |
| 2078 | ); |
| 2079 | |
| 2080 | extern int XChangeProperty( |
| 2081 | Display* /* display */, |
| 2082 | Window /* w */, |
| 2083 | Atom /* property */, |
| 2084 | Atom /* type */, |
| 2085 | int /* format */, |
| 2086 | int /* mode */, |
| 2087 | _Xconst unsigned char* /* data */, |
| 2088 | int /* nelements */ |
| 2089 | ); |
| 2090 | |
| 2091 | extern int XChangeSaveSet( |
| 2092 | Display* /* display */, |
| 2093 | Window /* w */, |
| 2094 | int /* change_mode */ |
| 2095 | ); |
| 2096 | |
| 2097 | extern int XChangeWindowAttributes( |
| 2098 | Display* /* display */, |
| 2099 | Window /* w */, |
| 2100 | unsigned long /* valuemask */, |
| 2101 | XSetWindowAttributes* /* attributes */ |
| 2102 | ); |
| 2103 | |
| 2104 | extern Bool XCheckIfEvent( |
| 2105 | Display* /* display */, |
| 2106 | XEvent* /* event_return */, |
| 2107 | Bool (*) ( |
| 2108 | Display* /* display */, |
| 2109 | XEvent* /* event */, |
| 2110 | XPointer /* arg */ |
| 2111 | ) /* predicate */, |
| 2112 | XPointer /* arg */ |
| 2113 | ); |
| 2114 | |
| 2115 | extern Bool XCheckMaskEvent( |
| 2116 | Display* /* display */, |
| 2117 | long /* event_mask */, |
| 2118 | XEvent* /* event_return */ |
| 2119 | ); |
| 2120 | |
| 2121 | extern Bool XCheckTypedEvent( |
| 2122 | Display* /* display */, |
| 2123 | int /* event_type */, |
| 2124 | XEvent* /* event_return */ |
| 2125 | ); |
| 2126 | |
| 2127 | extern Bool XCheckTypedWindowEvent( |
| 2128 | Display* /* display */, |
| 2129 | Window /* w */, |
| 2130 | int /* event_type */, |
| 2131 | XEvent* /* event_return */ |
| 2132 | ); |
| 2133 | |
| 2134 | extern Bool XCheckWindowEvent( |
| 2135 | Display* /* display */, |
| 2136 | Window /* w */, |
| 2137 | long /* event_mask */, |
| 2138 | XEvent* /* event_return */ |
| 2139 | ); |
| 2140 | |
| 2141 | extern int XCirculateSubwindows( |
| 2142 | Display* /* display */, |
| 2143 | Window /* w */, |
| 2144 | int /* direction */ |
| 2145 | ); |
| 2146 | |
| 2147 | extern int XCirculateSubwindowsDown( |
| 2148 | Display* /* display */, |
| 2149 | Window /* w */ |
| 2150 | ); |
| 2151 | |
| 2152 | extern int XCirculateSubwindowsUp( |
| 2153 | Display* /* display */, |
| 2154 | Window /* w */ |
| 2155 | ); |
| 2156 | |
| 2157 | extern int XClearArea( |
| 2158 | Display* /* display */, |
| 2159 | Window /* w */, |
| 2160 | int /* x */, |
| 2161 | int /* y */, |
| 2162 | unsigned int /* width */, |
| 2163 | unsigned int /* height */, |
| 2164 | Bool /* exposures */ |
| 2165 | ); |
| 2166 | |
| 2167 | extern int XClearWindow( |
| 2168 | Display* /* display */, |
| 2169 | Window /* w */ |
| 2170 | ); |
| 2171 | |
| 2172 | extern int XCloseDisplay( |
| 2173 | Display* /* display */ |
| 2174 | ); |
| 2175 | |
| 2176 | extern int XConfigureWindow( |
| 2177 | Display* /* display */, |
| 2178 | Window /* w */, |
| 2179 | unsigned int /* value_mask */, |
| 2180 | XWindowChanges* /* values */ |
| 2181 | ); |
| 2182 | |
| 2183 | extern int XConnectionNumber( |
| 2184 | Display* /* display */ |
| 2185 | ); |
| 2186 | |
| 2187 | extern int XConvertSelection( |
| 2188 | Display* /* display */, |
| 2189 | Atom /* selection */, |
| 2190 | Atom /* target */, |
| 2191 | Atom /* property */, |
| 2192 | Window /* requestor */, |
| 2193 | Time /* time */ |
| 2194 | ); |
| 2195 | |
| 2196 | extern int XCopyArea( |
| 2197 | Display* /* display */, |
| 2198 | Drawable /* src */, |
| 2199 | Drawable /* dest */, |
| 2200 | GC /* gc */, |
| 2201 | int /* src_x */, |
| 2202 | int /* src_y */, |
| 2203 | unsigned int /* width */, |
| 2204 | unsigned int /* height */, |
| 2205 | int /* dest_x */, |
| 2206 | int /* dest_y */ |
| 2207 | ); |
| 2208 | |
| 2209 | extern int XCopyGC( |
| 2210 | Display* /* display */, |
| 2211 | GC /* src */, |
| 2212 | unsigned long /* valuemask */, |
| 2213 | GC /* dest */ |
| 2214 | ); |
| 2215 | |
| 2216 | extern int XCopyPlane( |
| 2217 | Display* /* display */, |
| 2218 | Drawable /* src */, |
| 2219 | Drawable /* dest */, |
| 2220 | GC /* gc */, |
| 2221 | int /* src_x */, |
| 2222 | int /* src_y */, |
| 2223 | unsigned int /* width */, |
| 2224 | unsigned int /* height */, |
| 2225 | int /* dest_x */, |
| 2226 | int /* dest_y */, |
| 2227 | unsigned long /* plane */ |
| 2228 | ); |
| 2229 | |
| 2230 | extern int XDefaultDepth( |
| 2231 | Display* /* display */, |
| 2232 | int /* screen_number */ |
| 2233 | ); |
| 2234 | |
| 2235 | extern int XDefaultDepthOfScreen( |
| 2236 | Screen* /* screen */ |
| 2237 | ); |
| 2238 | |
| 2239 | extern int XDefaultScreen( |
| 2240 | Display* /* display */ |
| 2241 | ); |
| 2242 | |
| 2243 | extern int XDefineCursor( |
| 2244 | Display* /* display */, |
| 2245 | Window /* w */, |
| 2246 | Cursor /* cursor */ |
| 2247 | ); |
| 2248 | |
| 2249 | extern int XDeleteProperty( |
| 2250 | Display* /* display */, |
| 2251 | Window /* w */, |
| 2252 | Atom /* property */ |
| 2253 | ); |
| 2254 | |
| 2255 | extern int XDestroyWindow( |
| 2256 | Display* /* display */, |
| 2257 | Window /* w */ |
| 2258 | ); |
| 2259 | |
| 2260 | extern int XDestroySubwindows( |
| 2261 | Display* /* display */, |
| 2262 | Window /* w */ |
| 2263 | ); |
| 2264 | |
| 2265 | extern int XDoesBackingStore( |
| 2266 | Screen* /* screen */ |
| 2267 | ); |
| 2268 | |
| 2269 | extern Bool XDoesSaveUnders( |
| 2270 | Screen* /* screen */ |
| 2271 | ); |
| 2272 | |
| 2273 | extern int XDisableAccessControl( |
| 2274 | Display* /* display */ |
| 2275 | ); |
| 2276 | |
| 2277 | |
| 2278 | extern int XDisplayCells( |
| 2279 | Display* /* display */, |
| 2280 | int /* screen_number */ |
| 2281 | ); |
| 2282 | |
| 2283 | extern int XDisplayHeight( |
| 2284 | Display* /* display */, |
| 2285 | int /* screen_number */ |
| 2286 | ); |
| 2287 | |
| 2288 | extern int XDisplayHeightMM( |
| 2289 | Display* /* display */, |
| 2290 | int /* screen_number */ |
| 2291 | ); |
| 2292 | |
| 2293 | extern int XDisplayKeycodes( |
| 2294 | Display* /* display */, |
| 2295 | int* /* min_keycodes_return */, |
| 2296 | int* /* max_keycodes_return */ |
| 2297 | ); |
| 2298 | |
| 2299 | extern int XDisplayPlanes( |
| 2300 | Display* /* display */, |
| 2301 | int /* screen_number */ |
| 2302 | ); |
| 2303 | |
| 2304 | extern int XDisplayWidth( |
| 2305 | Display* /* display */, |
| 2306 | int /* screen_number */ |
| 2307 | ); |
| 2308 | |
| 2309 | extern int XDisplayWidthMM( |
| 2310 | Display* /* display */, |
| 2311 | int /* screen_number */ |
| 2312 | ); |
| 2313 | |
| 2314 | extern int XDrawArc( |
| 2315 | Display* /* display */, |
| 2316 | Drawable /* d */, |
| 2317 | GC /* gc */, |
| 2318 | int /* x */, |
| 2319 | int /* y */, |
| 2320 | unsigned int /* width */, |
| 2321 | unsigned int /* height */, |
| 2322 | int /* angle1 */, |
| 2323 | int /* angle2 */ |
| 2324 | ); |
| 2325 | |
| 2326 | extern int XDrawArcs( |
| 2327 | Display* /* display */, |
| 2328 | Drawable /* d */, |
| 2329 | GC /* gc */, |
| 2330 | XArc* /* arcs */, |
| 2331 | int /* narcs */ |
| 2332 | ); |
| 2333 | |
| 2334 | extern int XDrawImageString( |
| 2335 | Display* /* display */, |
| 2336 | Drawable /* d */, |
| 2337 | GC /* gc */, |
| 2338 | int /* x */, |
| 2339 | int /* y */, |
| 2340 | _Xconst char* /* string */, |
| 2341 | int /* length */ |
| 2342 | ); |
| 2343 | |
| 2344 | extern int XDrawImageString16( |
| 2345 | Display* /* display */, |
| 2346 | Drawable /* d */, |
| 2347 | GC /* gc */, |
| 2348 | int /* x */, |
| 2349 | int /* y */, |
| 2350 | _Xconst XChar2b* /* string */, |
| 2351 | int /* length */ |
| 2352 | ); |
| 2353 | |
| 2354 | extern int XDrawLine( |
| 2355 | Display* /* display */, |
| 2356 | Drawable /* d */, |
| 2357 | GC /* gc */, |
| 2358 | int /* x1 */, |
| 2359 | int /* y1 */, |
| 2360 | int /* x2 */, |
| 2361 | int /* y2 */ |
| 2362 | ); |
| 2363 | |
| 2364 | extern int XDrawLines( |
| 2365 | Display* /* display */, |
| 2366 | Drawable /* d */, |
| 2367 | GC /* gc */, |
| 2368 | XPoint* /* points */, |
| 2369 | int /* npoints */, |
| 2370 | int /* mode */ |
| 2371 | ); |
| 2372 | |
| 2373 | extern int XDrawPoint( |
| 2374 | Display* /* display */, |
| 2375 | Drawable /* d */, |
| 2376 | GC /* gc */, |
| 2377 | int /* x */, |
| 2378 | int /* y */ |
| 2379 | ); |
| 2380 | |
| 2381 | extern int XDrawPoints( |
| 2382 | Display* /* display */, |
| 2383 | Drawable /* d */, |
| 2384 | GC /* gc */, |
| 2385 | XPoint* /* points */, |
| 2386 | int /* npoints */, |
| 2387 | int /* mode */ |
| 2388 | ); |
| 2389 | |
| 2390 | extern int XDrawRectangle( |
| 2391 | Display* /* display */, |
| 2392 | Drawable /* d */, |
| 2393 | GC /* gc */, |
| 2394 | int /* x */, |
| 2395 | int /* y */, |
| 2396 | unsigned int /* width */, |
| 2397 | unsigned int /* height */ |
| 2398 | ); |
| 2399 | |
| 2400 | extern int XDrawRectangles( |
| 2401 | Display* /* display */, |
| 2402 | Drawable /* d */, |
| 2403 | GC /* gc */, |
| 2404 | XRectangle* /* rectangles */, |
| 2405 | int /* nrectangles */ |
| 2406 | ); |
| 2407 | |
| 2408 | extern int XDrawSegments( |
| 2409 | Display* /* display */, |
| 2410 | Drawable /* d */, |
| 2411 | GC /* gc */, |
| 2412 | XSegment* /* segments */, |
| 2413 | int /* nsegments */ |
| 2414 | ); |
| 2415 | |
| 2416 | extern int XDrawString( |
| 2417 | Display* /* display */, |
| 2418 | Drawable /* d */, |
| 2419 | GC /* gc */, |
| 2420 | int /* x */, |
| 2421 | int /* y */, |
| 2422 | _Xconst char* /* string */, |
| 2423 | int /* length */ |
| 2424 | ); |
| 2425 | |
| 2426 | extern int XDrawString16( |
| 2427 | Display* /* display */, |
| 2428 | Drawable /* d */, |
| 2429 | GC /* gc */, |
| 2430 | int /* x */, |
| 2431 | int /* y */, |
| 2432 | _Xconst XChar2b* /* string */, |
| 2433 | int /* length */ |
| 2434 | ); |
| 2435 | |
| 2436 | extern int XDrawText( |
| 2437 | Display* /* display */, |
| 2438 | Drawable /* d */, |
| 2439 | GC /* gc */, |
| 2440 | int /* x */, |
| 2441 | int /* y */, |
| 2442 | XTextItem* /* items */, |
| 2443 | int /* nitems */ |
| 2444 | ); |
| 2445 | |
| 2446 | extern int XDrawText16( |
| 2447 | Display* /* display */, |
| 2448 | Drawable /* d */, |
| 2449 | GC /* gc */, |
| 2450 | int /* x */, |
| 2451 | int /* y */, |
| 2452 | XTextItem16* /* items */, |
| 2453 | int /* nitems */ |
| 2454 | ); |
| 2455 | |
| 2456 | extern int XEnableAccessControl( |
| 2457 | Display* /* display */ |
| 2458 | ); |
| 2459 | |
| 2460 | extern int XEventsQueued( |
| 2461 | Display* /* display */, |
| 2462 | int /* mode */ |
| 2463 | ); |
| 2464 | |
| 2465 | extern Status XFetchName( |
| 2466 | Display* /* display */, |
| 2467 | Window /* w */, |
| 2468 | char** /* window_name_return */ |
| 2469 | ); |
| 2470 | |
| 2471 | extern int XFillArc( |
| 2472 | Display* /* display */, |
| 2473 | Drawable /* d */, |
| 2474 | GC /* gc */, |
| 2475 | int /* x */, |
| 2476 | int /* y */, |
| 2477 | unsigned int /* width */, |
| 2478 | unsigned int /* height */, |
| 2479 | int /* angle1 */, |
| 2480 | int /* angle2 */ |
| 2481 | ); |
| 2482 | |
| 2483 | extern int XFillArcs( |
| 2484 | Display* /* display */, |
| 2485 | Drawable /* d */, |
| 2486 | GC /* gc */, |
| 2487 | XArc* /* arcs */, |
| 2488 | int /* narcs */ |
| 2489 | ); |
| 2490 | |
| 2491 | extern int XFillPolygon( |
| 2492 | Display* /* display */, |
| 2493 | Drawable /* d */, |
| 2494 | GC /* gc */, |
| 2495 | XPoint* /* points */, |
| 2496 | int /* npoints */, |
| 2497 | int /* shape */, |
| 2498 | int /* mode */ |
| 2499 | ); |
| 2500 | |
| 2501 | extern int XFillRectangle( |
| 2502 | Display* /* display */, |
| 2503 | Drawable /* d */, |
| 2504 | GC /* gc */, |
| 2505 | int /* x */, |
| 2506 | int /* y */, |
| 2507 | unsigned int /* width */, |
| 2508 | unsigned int /* height */ |
| 2509 | ); |
| 2510 | |
| 2511 | extern int XFillRectangles( |
| 2512 | Display* /* display */, |
| 2513 | Drawable /* d */, |
| 2514 | GC /* gc */, |
| 2515 | XRectangle* /* rectangles */, |
| 2516 | int /* nrectangles */ |
| 2517 | ); |
| 2518 | |
| 2519 | extern int XFlush( |
| 2520 | Display* /* display */ |
| 2521 | ); |
| 2522 | |
| 2523 | extern int XForceScreenSaver( |
| 2524 | Display* /* display */, |
| 2525 | int /* mode */ |
| 2526 | ); |
| 2527 | |
| 2528 | extern int XFree( |
| 2529 | void* /* data */ |
| 2530 | ); |
| 2531 | |
| 2532 | extern int XFreeColormap( |
| 2533 | Display* /* display */, |
| 2534 | Colormap /* colormap */ |
| 2535 | ); |
| 2536 | |
| 2537 | extern int XFreeColors( |
| 2538 | Display* /* display */, |
| 2539 | Colormap /* colormap */, |
| 2540 | unsigned long* /* pixels */, |
| 2541 | int /* npixels */, |
| 2542 | unsigned long /* planes */ |
| 2543 | ); |
| 2544 | |
| 2545 | extern int XFreeCursor( |
| 2546 | Display* /* display */, |
| 2547 | Cursor /* cursor */ |
| 2548 | ); |
| 2549 | |
| 2550 | extern int XFreeExtensionList( |
| 2551 | char** /* list */ |
| 2552 | ); |
| 2553 | |
| 2554 | extern int XFreeFont( |
| 2555 | Display* /* display */, |
| 2556 | XFontStruct* /* font_struct */ |
| 2557 | ); |
| 2558 | |
| 2559 | extern int XFreeFontInfo( |
| 2560 | char** /* names */, |
| 2561 | XFontStruct* /* free_info */, |
| 2562 | int /* actual_count */ |
| 2563 | ); |
| 2564 | |
| 2565 | extern int XFreeFontNames( |
| 2566 | char** /* list */ |
| 2567 | ); |
| 2568 | |
| 2569 | extern int XFreeFontPath( |
| 2570 | char** /* list */ |
| 2571 | ); |
| 2572 | |
| 2573 | extern int XFreeGC( |
| 2574 | Display* /* display */, |
| 2575 | GC /* gc */ |
| 2576 | ); |
| 2577 | |
| 2578 | extern int XFreeModifiermap( |
| 2579 | XModifierKeymap* /* modmap */ |
| 2580 | ); |
| 2581 | |
| 2582 | extern int XFreePixmap( |
| 2583 | Display* /* display */, |
| 2584 | Pixmap /* pixmap */ |
| 2585 | ); |
| 2586 | |
| 2587 | extern int XGeometry( |
| 2588 | Display* /* display */, |
| 2589 | int /* screen */, |
| 2590 | _Xconst char* /* position */, |
| 2591 | _Xconst char* /* default_position */, |
| 2592 | unsigned int /* bwidth */, |
| 2593 | unsigned int /* fwidth */, |
| 2594 | unsigned int /* fheight */, |
| 2595 | int /* xadder */, |
| 2596 | int /* yadder */, |
| 2597 | int* /* x_return */, |
| 2598 | int* /* y_return */, |
| 2599 | int* /* width_return */, |
| 2600 | int* /* height_return */ |
| 2601 | ); |
| 2602 | |
| 2603 | extern int XGetErrorDatabaseText( |
| 2604 | Display* /* display */, |
| 2605 | _Xconst char* /* name */, |
| 2606 | _Xconst char* /* message */, |
| 2607 | _Xconst char* /* default_string */, |
| 2608 | char* /* buffer_return */, |
| 2609 | int /* length */ |
| 2610 | ); |
| 2611 | |
| 2612 | extern int XGetErrorText( |
| 2613 | Display* /* display */, |
| 2614 | int /* code */, |
| 2615 | char* /* buffer_return */, |
| 2616 | int /* length */ |
| 2617 | ); |
| 2618 | |
| 2619 | extern Bool XGetFontProperty( |
| 2620 | XFontStruct* /* font_struct */, |
| 2621 | Atom /* atom */, |
| 2622 | unsigned long* /* value_return */ |
| 2623 | ); |
| 2624 | |
| 2625 | extern Status XGetGCValues( |
| 2626 | Display* /* display */, |
| 2627 | GC /* gc */, |
| 2628 | unsigned long /* valuemask */, |
| 2629 | XGCValues* /* values_return */ |
| 2630 | ); |
| 2631 | |
| 2632 | extern Status XGetGeometry( |
| 2633 | Display* /* display */, |
| 2634 | Drawable /* d */, |
| 2635 | Window* /* root_return */, |
| 2636 | int* /* x_return */, |
| 2637 | int* /* y_return */, |
| 2638 | unsigned int* /* width_return */, |
| 2639 | unsigned int* /* height_return */, |
| 2640 | unsigned int* /* border_width_return */, |
| 2641 | unsigned int* /* depth_return */ |
| 2642 | ); |
| 2643 | |
| 2644 | extern Status XGetIconName( |
| 2645 | Display* /* display */, |
| 2646 | Window /* w */, |
| 2647 | char** /* icon_name_return */ |
| 2648 | ); |
| 2649 | |
| 2650 | extern int XGetInputFocus( |
| 2651 | Display* /* display */, |
| 2652 | Window* /* focus_return */, |
| 2653 | int* /* revert_to_return */ |
| 2654 | ); |
| 2655 | |
| 2656 | extern int XGetKeyboardControl( |
| 2657 | Display* /* display */, |
| 2658 | XKeyboardState* /* values_return */ |
| 2659 | ); |
| 2660 | |
| 2661 | extern int XGetPointerControl( |
| 2662 | Display* /* display */, |
| 2663 | int* /* accel_numerator_return */, |
| 2664 | int* /* accel_denominator_return */, |
| 2665 | int* /* threshold_return */ |
| 2666 | ); |
| 2667 | |
| 2668 | extern int XGetPointerMapping( |
| 2669 | Display* /* display */, |
| 2670 | unsigned char* /* map_return */, |
| 2671 | int /* nmap */ |
| 2672 | ); |
| 2673 | |
| 2674 | extern int XGetScreenSaver( |
| 2675 | Display* /* display */, |
| 2676 | int* /* timeout_return */, |
| 2677 | int* /* interval_return */, |
| 2678 | int* /* prefer_blanking_return */, |
| 2679 | int* /* allow_exposures_return */ |
| 2680 | ); |
| 2681 | |
| 2682 | extern Status XGetTransientForHint( |
| 2683 | Display* /* display */, |
| 2684 | Window /* w */, |
| 2685 | Window* /* prop_window_return */ |
| 2686 | ); |
| 2687 | |
| 2688 | extern int XGetWindowProperty( |
| 2689 | Display* /* display */, |
| 2690 | Window /* w */, |
| 2691 | Atom /* property */, |
| 2692 | long /* long_offset */, |
| 2693 | long /* long_length */, |
| 2694 | Bool /* delete */, |
| 2695 | Atom /* req_type */, |
| 2696 | Atom* /* actual_type_return */, |
| 2697 | int* /* actual_format_return */, |
| 2698 | unsigned long* /* nitems_return */, |
| 2699 | unsigned long* /* bytes_after_return */, |
| 2700 | unsigned char** /* prop_return */ |
| 2701 | ); |
| 2702 | |
| 2703 | extern Status XGetWindowAttributes( |
| 2704 | Display* /* display */, |
| 2705 | Window /* w */, |
| 2706 | XWindowAttributes* /* window_attributes_return */ |
| 2707 | ); |
| 2708 | |
| 2709 | extern int XGrabButton( |
| 2710 | Display* /* display */, |
| 2711 | unsigned int /* button */, |
| 2712 | unsigned int /* modifiers */, |
| 2713 | Window /* grab_window */, |
| 2714 | Bool /* owner_events */, |
| 2715 | unsigned int /* event_mask */, |
| 2716 | int /* pointer_mode */, |
| 2717 | int /* keyboard_mode */, |
| 2718 | Window /* confine_to */, |
| 2719 | Cursor /* cursor */ |
| 2720 | ); |
| 2721 | |
| 2722 | extern int XGrabKey( |
| 2723 | Display* /* display */, |
| 2724 | int /* keycode */, |
| 2725 | unsigned int /* modifiers */, |
| 2726 | Window /* grab_window */, |
| 2727 | Bool /* owner_events */, |
| 2728 | int /* pointer_mode */, |
| 2729 | int /* keyboard_mode */ |
| 2730 | ); |
| 2731 | |
| 2732 | extern int XGrabKeyboard( |
| 2733 | Display* /* display */, |
| 2734 | Window /* grab_window */, |
| 2735 | Bool /* owner_events */, |
| 2736 | int /* pointer_mode */, |
| 2737 | int /* keyboard_mode */, |
| 2738 | Time /* time */ |
| 2739 | ); |
| 2740 | |
| 2741 | extern int XGrabPointer( |
| 2742 | Display* /* display */, |
| 2743 | Window /* grab_window */, |
| 2744 | Bool /* owner_events */, |
| 2745 | unsigned int /* event_mask */, |
| 2746 | int /* pointer_mode */, |
| 2747 | int /* keyboard_mode */, |
| 2748 | Window /* confine_to */, |
| 2749 | Cursor /* cursor */, |
| 2750 | Time /* time */ |
| 2751 | ); |
| 2752 | |
| 2753 | extern int XGrabServer( |
| 2754 | Display* /* display */ |
| 2755 | ); |
| 2756 | |
| 2757 | extern int XHeightMMOfScreen( |
| 2758 | Screen* /* screen */ |
| 2759 | ); |
| 2760 | |
| 2761 | extern int XHeightOfScreen( |
| 2762 | Screen* /* screen */ |
| 2763 | ); |
| 2764 | |
| 2765 | extern int XIfEvent( |
| 2766 | Display* /* display */, |
| 2767 | XEvent* /* event_return */, |
| 2768 | Bool (*) ( |
| 2769 | Display* /* display */, |
| 2770 | XEvent* /* event */, |
| 2771 | XPointer /* arg */ |
| 2772 | ) /* predicate */, |
| 2773 | XPointer /* arg */ |
| 2774 | ); |
| 2775 | |
| 2776 | extern int XImageByteOrder( |
| 2777 | Display* /* display */ |
| 2778 | ); |
| 2779 | |
| 2780 | extern int XInstallColormap( |
| 2781 | Display* /* display */, |
| 2782 | Colormap /* colormap */ |
| 2783 | ); |
| 2784 | |
| 2785 | extern KeyCode XKeysymToKeycode( |
| 2786 | Display* /* display */, |
| 2787 | KeySym /* keysym */ |
| 2788 | ); |
| 2789 | |
| 2790 | extern int XKillClient( |
| 2791 | Display* /* display */, |
| 2792 | XID /* resource */ |
| 2793 | ); |
| 2794 | |
| 2795 | extern Status XLookupColor( |
| 2796 | Display* /* display */, |
| 2797 | Colormap /* colormap */, |
| 2798 | _Xconst char* /* color_name */, |
| 2799 | XColor* /* exact_def_return */, |
| 2800 | XColor* /* screen_def_return */ |
| 2801 | ); |
| 2802 | |
| 2803 | extern int XLowerWindow( |
| 2804 | Display* /* display */, |
| 2805 | Window /* w */ |
| 2806 | ); |
| 2807 | |
| 2808 | extern int XMapRaised( |
| 2809 | Display* /* display */, |
| 2810 | Window /* w */ |
| 2811 | ); |
| 2812 | |
| 2813 | extern int XMapSubwindows( |
| 2814 | Display* /* display */, |
| 2815 | Window /* w */ |
| 2816 | ); |
| 2817 | |
| 2818 | extern int XMapWindow( |
| 2819 | Display* /* display */, |
| 2820 | Window /* w */ |
| 2821 | ); |
| 2822 | |
| 2823 | extern int XMaskEvent( |
| 2824 | Display* /* display */, |
| 2825 | long /* event_mask */, |
| 2826 | XEvent* /* event_return */ |
| 2827 | ); |
| 2828 | |
| 2829 | extern int XMaxCmapsOfScreen( |
| 2830 | Screen* /* screen */ |
| 2831 | ); |
| 2832 | |
| 2833 | extern int XMinCmapsOfScreen( |
| 2834 | Screen* /* screen */ |
| 2835 | ); |
| 2836 | |
| 2837 | extern int XMoveResizeWindow( |
| 2838 | Display* /* display */, |
| 2839 | Window /* w */, |
| 2840 | int /* x */, |
| 2841 | int /* y */, |
| 2842 | unsigned int /* width */, |
| 2843 | unsigned int /* height */ |
| 2844 | ); |
| 2845 | |
| 2846 | extern int XMoveWindow( |
| 2847 | Display* /* display */, |
| 2848 | Window /* w */, |
| 2849 | int /* x */, |
| 2850 | int /* y */ |
| 2851 | ); |
| 2852 | |
| 2853 | extern int XNextEvent( |
| 2854 | Display* /* display */, |
| 2855 | XEvent* /* event_return */ |
| 2856 | ); |
| 2857 | |
| 2858 | extern int XNoOp( |
| 2859 | Display* /* display */ |
| 2860 | ); |
| 2861 | |
| 2862 | extern Status XParseColor( |
| 2863 | Display* /* display */, |
| 2864 | Colormap /* colormap */, |
| 2865 | _Xconst char* /* spec */, |
| 2866 | XColor* /* exact_def_return */ |
| 2867 | ); |
| 2868 | |
| 2869 | extern int XParseGeometry( |
| 2870 | _Xconst char* /* parsestring */, |
| 2871 | int* /* x_return */, |
| 2872 | int* /* y_return */, |
| 2873 | unsigned int* /* width_return */, |
| 2874 | unsigned int* /* height_return */ |
| 2875 | ); |
| 2876 | |
| 2877 | extern int XPeekEvent( |
| 2878 | Display* /* display */, |
| 2879 | XEvent* /* event_return */ |
| 2880 | ); |
| 2881 | |
| 2882 | extern int XPeekIfEvent( |
| 2883 | Display* /* display */, |
| 2884 | XEvent* /* event_return */, |
| 2885 | Bool (*) ( |
| 2886 | Display* /* display */, |
| 2887 | XEvent* /* event */, |
| 2888 | XPointer /* arg */ |
| 2889 | ) /* predicate */, |
| 2890 | XPointer /* arg */ |
| 2891 | ); |
| 2892 | |
| 2893 | extern int XPending( |
| 2894 | Display* /* display */ |
| 2895 | ); |
| 2896 | |
| 2897 | extern int XPlanesOfScreen( |
| 2898 | Screen* /* screen */ |
| 2899 | ); |
| 2900 | |
| 2901 | extern int XProtocolRevision( |
| 2902 | Display* /* display */ |
| 2903 | ); |
| 2904 | |
| 2905 | extern int XProtocolVersion( |
| 2906 | Display* /* display */ |
| 2907 | ); |
| 2908 | |
| 2909 | |
| 2910 | extern int XPutBackEvent( |
| 2911 | Display* /* display */, |
| 2912 | XEvent* /* event */ |
| 2913 | ); |
| 2914 | |
| 2915 | extern int XPutImage( |
| 2916 | Display* /* display */, |
| 2917 | Drawable /* d */, |
| 2918 | GC /* gc */, |
| 2919 | XImage* /* image */, |
| 2920 | int /* src_x */, |
| 2921 | int /* src_y */, |
| 2922 | int /* dest_x */, |
| 2923 | int /* dest_y */, |
| 2924 | unsigned int /* width */, |
| 2925 | unsigned int /* height */ |
| 2926 | ); |
| 2927 | |
| 2928 | extern int XQLength( |
| 2929 | Display* /* display */ |
| 2930 | ); |
| 2931 | |
| 2932 | extern Status XQueryBestCursor( |
| 2933 | Display* /* display */, |
| 2934 | Drawable /* d */, |
| 2935 | unsigned int /* width */, |
| 2936 | unsigned int /* height */, |
| 2937 | unsigned int* /* width_return */, |
| 2938 | unsigned int* /* height_return */ |
| 2939 | ); |
| 2940 | |
| 2941 | extern Status XQueryBestSize( |
| 2942 | Display* /* display */, |
| 2943 | int /* class */, |
| 2944 | Drawable /* which_screen */, |
| 2945 | unsigned int /* width */, |
| 2946 | unsigned int /* height */, |
| 2947 | unsigned int* /* width_return */, |
| 2948 | unsigned int* /* height_return */ |
| 2949 | ); |
| 2950 | |
| 2951 | extern Status XQueryBestStipple( |
| 2952 | Display* /* display */, |
| 2953 | Drawable /* which_screen */, |
| 2954 | unsigned int /* width */, |
| 2955 | unsigned int /* height */, |
| 2956 | unsigned int* /* width_return */, |
| 2957 | unsigned int* /* height_return */ |
| 2958 | ); |
| 2959 | |
| 2960 | extern Status XQueryBestTile( |
| 2961 | Display* /* display */, |
| 2962 | Drawable /* which_screen */, |
| 2963 | unsigned int /* width */, |
| 2964 | unsigned int /* height */, |
| 2965 | unsigned int* /* width_return */, |
| 2966 | unsigned int* /* height_return */ |
| 2967 | ); |
| 2968 | |
| 2969 | extern int XQueryColor( |
| 2970 | Display* /* display */, |
| 2971 | Colormap /* colormap */, |
| 2972 | XColor* /* def_in_out */ |
| 2973 | ); |
| 2974 | |
| 2975 | extern int XQueryColors( |
| 2976 | Display* /* display */, |
| 2977 | Colormap /* colormap */, |
| 2978 | XColor* /* defs_in_out */, |
| 2979 | int /* ncolors */ |
| 2980 | ); |
| 2981 | |
| 2982 | extern Bool XQueryExtension( |
| 2983 | Display* /* display */, |
| 2984 | _Xconst char* /* name */, |
| 2985 | int* /* major_opcode_return */, |
| 2986 | int* /* first_event_return */, |
| 2987 | int* /* first_error_return */ |
| 2988 | ); |
| 2989 | |
| 2990 | extern int XQueryKeymap( |
| 2991 | Display* /* display */, |
| 2992 | char [32] /* keys_return */ |
| 2993 | ); |
| 2994 | |
| 2995 | extern Bool XQueryPointer( |
| 2996 | Display* /* display */, |
| 2997 | Window /* w */, |
| 2998 | Window* /* root_return */, |
| 2999 | Window* /* child_return */, |
| 3000 | int* /* root_x_return */, |
| 3001 | int* /* root_y_return */, |
| 3002 | int* /* win_x_return */, |
| 3003 | int* /* win_y_return */, |
| 3004 | unsigned int* /* mask_return */ |
| 3005 | ); |
| 3006 | |
| 3007 | extern int XQueryTextExtents( |
| 3008 | Display* /* display */, |
| 3009 | XID /* font_ID */, |
| 3010 | _Xconst char* /* string */, |
| 3011 | int /* nchars */, |
| 3012 | int* /* direction_return */, |
| 3013 | int* /* font_ascent_return */, |
| 3014 | int* /* font_descent_return */, |
| 3015 | XCharStruct* /* overall_return */ |
| 3016 | ); |
| 3017 | |
| 3018 | extern int XQueryTextExtents16( |
| 3019 | Display* /* display */, |
| 3020 | XID /* font_ID */, |
| 3021 | _Xconst XChar2b* /* string */, |
| 3022 | int /* nchars */, |
| 3023 | int* /* direction_return */, |
| 3024 | int* /* font_ascent_return */, |
| 3025 | int* /* font_descent_return */, |
| 3026 | XCharStruct* /* overall_return */ |
| 3027 | ); |
| 3028 | |
| 3029 | extern Status XQueryTree( |
| 3030 | Display* /* display */, |
| 3031 | Window /* w */, |
| 3032 | Window* /* root_return */, |
| 3033 | Window* /* parent_return */, |
| 3034 | Window** /* children_return */, |
| 3035 | unsigned int* /* nchildren_return */ |
| 3036 | ); |
| 3037 | |
| 3038 | extern int XRaiseWindow( |
| 3039 | Display* /* display */, |
| 3040 | Window /* w */ |
| 3041 | ); |
| 3042 | |
| 3043 | extern int XReadBitmapFile( |
| 3044 | Display* /* display */, |
| 3045 | Drawable /* d */, |
| 3046 | _Xconst char* /* filename */, |
| 3047 | unsigned int* /* width_return */, |
| 3048 | unsigned int* /* height_return */, |
| 3049 | Pixmap* /* bitmap_return */, |
| 3050 | int* /* x_hot_return */, |
| 3051 | int* /* y_hot_return */ |
| 3052 | ); |
| 3053 | |
| 3054 | extern int XReadBitmapFileData( |
| 3055 | _Xconst char* /* filename */, |
| 3056 | unsigned int* /* width_return */, |
| 3057 | unsigned int* /* height_return */, |
| 3058 | unsigned char** /* data_return */, |
| 3059 | int* /* x_hot_return */, |
| 3060 | int* /* y_hot_return */ |
| 3061 | ); |
| 3062 | |
| 3063 | extern int XRebindKeysym( |
| 3064 | Display* /* display */, |
| 3065 | KeySym /* keysym */, |
| 3066 | KeySym* /* list */, |
| 3067 | int /* mod_count */, |
| 3068 | _Xconst unsigned char* /* string */, |
| 3069 | int /* bytes_string */ |
| 3070 | ); |
| 3071 | |
| 3072 | extern int XRecolorCursor( |
| 3073 | Display* /* display */, |
| 3074 | Cursor /* cursor */, |
| 3075 | XColor* /* foreground_color */, |
| 3076 | XColor* /* background_color */ |
| 3077 | ); |
| 3078 | |
| 3079 | extern int XRefreshKeyboardMapping( |
| 3080 | XMappingEvent* /* event_map */ |
| 3081 | ); |
| 3082 | |
| 3083 | extern int XRemoveFromSaveSet( |
| 3084 | Display* /* display */, |
| 3085 | Window /* w */ |
| 3086 | ); |
| 3087 | |
| 3088 | extern int XRemoveHost( |
| 3089 | Display* /* display */, |
| 3090 | XHostAddress* /* host */ |
| 3091 | ); |
| 3092 | |
| 3093 | extern int XRemoveHosts( |
| 3094 | Display* /* display */, |
| 3095 | XHostAddress* /* hosts */, |
| 3096 | int /* num_hosts */ |
| 3097 | ); |
| 3098 | |
| 3099 | extern int XReparentWindow( |
| 3100 | Display* /* display */, |
| 3101 | Window /* w */, |
| 3102 | Window /* parent */, |
| 3103 | int /* x */, |
| 3104 | int /* y */ |
| 3105 | ); |
| 3106 | |
| 3107 | extern int XResetScreenSaver( |
| 3108 | Display* /* display */ |
| 3109 | ); |
| 3110 | |
| 3111 | extern int XResizeWindow( |
| 3112 | Display* /* display */, |
| 3113 | Window /* w */, |
| 3114 | unsigned int /* width */, |
| 3115 | unsigned int /* height */ |
| 3116 | ); |
| 3117 | |
| 3118 | extern int XRestackWindows( |
| 3119 | Display* /* display */, |
| 3120 | Window* /* windows */, |
| 3121 | int /* nwindows */ |
| 3122 | ); |
| 3123 | |
| 3124 | extern int XRotateBuffers( |
| 3125 | Display* /* display */, |
| 3126 | int /* rotate */ |
| 3127 | ); |
| 3128 | |
| 3129 | extern int XRotateWindowProperties( |
| 3130 | Display* /* display */, |
| 3131 | Window /* w */, |
| 3132 | Atom* /* properties */, |
| 3133 | int /* num_prop */, |
| 3134 | int /* npositions */ |
| 3135 | ); |
| 3136 | |
| 3137 | extern int XScreenCount( |
| 3138 | Display* /* display */ |
| 3139 | ); |
| 3140 | |
| 3141 | extern int XSelectInput( |
| 3142 | Display* /* display */, |
| 3143 | Window /* w */, |
| 3144 | long /* event_mask */ |
| 3145 | ); |
| 3146 | |
| 3147 | extern Status XSendEvent( |
| 3148 | Display* /* display */, |
| 3149 | Window /* w */, |
| 3150 | Bool /* propagate */, |
| 3151 | long /* event_mask */, |
| 3152 | XEvent* /* event_send */ |
| 3153 | ); |
| 3154 | |
| 3155 | extern int XSetAccessControl( |
| 3156 | Display* /* display */, |
| 3157 | int /* mode */ |
| 3158 | ); |
| 3159 | |
| 3160 | extern int XSetArcMode( |
| 3161 | Display* /* display */, |
| 3162 | GC /* gc */, |
| 3163 | int /* arc_mode */ |
| 3164 | ); |
| 3165 | |
| 3166 | extern int XSetBackground( |
| 3167 | Display* /* display */, |
| 3168 | GC /* gc */, |
| 3169 | unsigned long /* background */ |
| 3170 | ); |
| 3171 | |
| 3172 | extern int XSetClipMask( |
| 3173 | Display* /* display */, |
| 3174 | GC /* gc */, |
| 3175 | Pixmap /* pixmap */ |
| 3176 | ); |
| 3177 | |
| 3178 | extern int XSetClipOrigin( |
| 3179 | Display* /* display */, |
| 3180 | GC /* gc */, |
| 3181 | int /* clip_x_origin */, |
| 3182 | int /* clip_y_origin */ |
| 3183 | ); |
| 3184 | |
| 3185 | extern int XSetClipRectangles( |
| 3186 | Display* /* display */, |
| 3187 | GC /* gc */, |
| 3188 | int /* clip_x_origin */, |
| 3189 | int /* clip_y_origin */, |
| 3190 | XRectangle* /* rectangles */, |
| 3191 | int /* n */, |
| 3192 | int /* ordering */ |
| 3193 | ); |
| 3194 | |
| 3195 | extern int XSetCloseDownMode( |
| 3196 | Display* /* display */, |
| 3197 | int /* close_mode */ |
| 3198 | ); |
| 3199 | |
| 3200 | extern int XSetCommand( |
| 3201 | Display* /* display */, |
| 3202 | Window /* w */, |
| 3203 | char** /* argv */, |
| 3204 | int /* argc */ |
| 3205 | ); |
| 3206 | |
| 3207 | extern int XSetDashes( |
| 3208 | Display* /* display */, |
| 3209 | GC /* gc */, |
| 3210 | int /* dash_offset */, |
| 3211 | _Xconst char* /* dash_list */, |
| 3212 | int /* n */ |
| 3213 | ); |
| 3214 | |
| 3215 | extern int XSetFillRule( |
| 3216 | Display* /* display */, |
| 3217 | GC /* gc */, |
| 3218 | int /* fill_rule */ |
| 3219 | ); |
| 3220 | |
| 3221 | extern int XSetFillStyle( |
| 3222 | Display* /* display */, |
| 3223 | GC /* gc */, |
| 3224 | int /* fill_style */ |
| 3225 | ); |
| 3226 | |
| 3227 | extern int XSetFont( |
| 3228 | Display* /* display */, |
| 3229 | GC /* gc */, |
| 3230 | Font /* font */ |
| 3231 | ); |
| 3232 | |
| 3233 | extern int XSetFontPath( |
| 3234 | Display* /* display */, |
| 3235 | char** /* directories */, |
| 3236 | int /* ndirs */ |
| 3237 | ); |
| 3238 | |
| 3239 | extern int XSetForeground( |
| 3240 | Display* /* display */, |
| 3241 | GC /* gc */, |
| 3242 | unsigned long /* foreground */ |
| 3243 | ); |
| 3244 | |
| 3245 | extern int XSetFunction( |
| 3246 | Display* /* display */, |
| 3247 | GC /* gc */, |
| 3248 | int /* function */ |
| 3249 | ); |
| 3250 | |
| 3251 | extern int XSetGraphicsExposures( |
| 3252 | Display* /* display */, |
| 3253 | GC /* gc */, |
| 3254 | Bool /* graphics_exposures */ |
| 3255 | ); |
| 3256 | |
| 3257 | extern int XSetIconName( |
| 3258 | Display* /* display */, |
| 3259 | Window /* w */, |
| 3260 | _Xconst char* /* icon_name */ |
| 3261 | ); |
| 3262 | |
| 3263 | extern int XSetInputFocus( |
| 3264 | Display* /* display */, |
| 3265 | Window /* focus */, |
| 3266 | int /* revert_to */, |
| 3267 | Time /* time */ |
| 3268 | ); |
| 3269 | |
| 3270 | extern int XSetLineAttributes( |
| 3271 | Display* /* display */, |
| 3272 | GC /* gc */, |
| 3273 | unsigned int /* line_width */, |
| 3274 | int /* line_style */, |
| 3275 | int /* cap_style */, |
| 3276 | int /* join_style */ |
| 3277 | ); |
| 3278 | |
| 3279 | extern int XSetModifierMapping( |
| 3280 | Display* /* display */, |
| 3281 | XModifierKeymap* /* modmap */ |
| 3282 | ); |
| 3283 | |
| 3284 | extern int XSetPlaneMask( |
| 3285 | Display* /* display */, |
| 3286 | GC /* gc */, |
| 3287 | unsigned long /* plane_mask */ |
| 3288 | ); |
| 3289 | |
| 3290 | extern int XSetPointerMapping( |
| 3291 | Display* /* display */, |
| 3292 | _Xconst unsigned char* /* map */, |
| 3293 | int /* nmap */ |
| 3294 | ); |
| 3295 | |
| 3296 | extern int XSetScreenSaver( |
| 3297 | Display* /* display */, |
| 3298 | int /* timeout */, |
| 3299 | int /* interval */, |
| 3300 | int /* prefer_blanking */, |
| 3301 | int /* allow_exposures */ |
| 3302 | ); |
| 3303 | |
| 3304 | extern int XSetSelectionOwner( |
| 3305 | Display* /* display */, |
| 3306 | Atom /* selection */, |
| 3307 | Window /* owner */, |
| 3308 | Time /* time */ |
| 3309 | ); |
| 3310 | |
| 3311 | extern int XSetState( |
| 3312 | Display* /* display */, |
| 3313 | GC /* gc */, |
| 3314 | unsigned long /* foreground */, |
| 3315 | unsigned long /* background */, |
| 3316 | int /* function */, |
| 3317 | unsigned long /* plane_mask */ |
| 3318 | ); |
| 3319 | |
| 3320 | extern int XSetStipple( |
| 3321 | Display* /* display */, |
| 3322 | GC /* gc */, |
| 3323 | Pixmap /* stipple */ |
| 3324 | ); |
| 3325 | |
| 3326 | extern int XSetSubwindowMode( |
| 3327 | Display* /* display */, |
| 3328 | GC /* gc */, |
| 3329 | int /* subwindow_mode */ |
| 3330 | ); |
| 3331 | |
| 3332 | extern int XSetTSOrigin( |
| 3333 | Display* /* display */, |
| 3334 | GC /* gc */, |
| 3335 | int /* ts_x_origin */, |
| 3336 | int /* ts_y_origin */ |
| 3337 | ); |
| 3338 | |
| 3339 | extern int XSetTile( |
| 3340 | Display* /* display */, |
| 3341 | GC /* gc */, |
| 3342 | Pixmap /* tile */ |
| 3343 | ); |
| 3344 | |
| 3345 | extern int XSetWindowBackground( |
| 3346 | Display* /* display */, |
| 3347 | Window /* w */, |
| 3348 | unsigned long /* background_pixel */ |
| 3349 | ); |
| 3350 | |
| 3351 | extern int XSetWindowBackgroundPixmap( |
| 3352 | Display* /* display */, |
| 3353 | Window /* w */, |
| 3354 | Pixmap /* background_pixmap */ |
| 3355 | ); |
| 3356 | |
| 3357 | extern int XSetWindowBorder( |
| 3358 | Display* /* display */, |
| 3359 | Window /* w */, |
| 3360 | unsigned long /* border_pixel */ |
| 3361 | ); |
| 3362 | |
| 3363 | extern int XSetWindowBorderPixmap( |
| 3364 | Display* /* display */, |
| 3365 | Window /* w */, |
| 3366 | Pixmap /* border_pixmap */ |
| 3367 | ); |
| 3368 | |
| 3369 | extern int XSetWindowBorderWidth( |
| 3370 | Display* /* display */, |
| 3371 | Window /* w */, |
| 3372 | unsigned int /* width */ |
| 3373 | ); |
| 3374 | |
| 3375 | extern int XSetWindowColormap( |
| 3376 | Display* /* display */, |
| 3377 | Window /* w */, |
| 3378 | Colormap /* colormap */ |
| 3379 | ); |
| 3380 | |
| 3381 | extern int XStoreBuffer( |
| 3382 | Display* /* display */, |
| 3383 | _Xconst char* /* bytes */, |
| 3384 | int /* nbytes */, |
| 3385 | int /* buffer */ |
| 3386 | ); |
| 3387 | |
| 3388 | extern int XStoreBytes( |
| 3389 | Display* /* display */, |
| 3390 | _Xconst char* /* bytes */, |
| 3391 | int /* nbytes */ |
| 3392 | ); |
| 3393 | |
| 3394 | extern int XStoreColor( |
| 3395 | Display* /* display */, |
| 3396 | Colormap /* colormap */, |
| 3397 | XColor* /* color */ |
| 3398 | ); |
| 3399 | |
| 3400 | extern int XStoreColors( |
| 3401 | Display* /* display */, |
| 3402 | Colormap /* colormap */, |
| 3403 | XColor* /* color */, |
| 3404 | int /* ncolors */ |
| 3405 | ); |
| 3406 | |
| 3407 | extern int XStoreName( |
| 3408 | Display* /* display */, |
| 3409 | Window /* w */, |
| 3410 | _Xconst char* /* window_name */ |
| 3411 | ); |
| 3412 | |
| 3413 | extern int XStoreNamedColor( |
| 3414 | Display* /* display */, |
| 3415 | Colormap /* colormap */, |
| 3416 | _Xconst char* /* color */, |
| 3417 | unsigned long /* pixel */, |
| 3418 | int /* flags */ |
| 3419 | ); |
| 3420 | |
| 3421 | extern int XSync( |
| 3422 | Display* /* display */, |
| 3423 | Bool /* discard */ |
| 3424 | ); |
| 3425 | |
| 3426 | extern int XTextExtents( |
| 3427 | XFontStruct* /* font_struct */, |
| 3428 | _Xconst char* /* string */, |
| 3429 | int /* nchars */, |
| 3430 | int* /* direction_return */, |
| 3431 | int* /* font_ascent_return */, |
| 3432 | int* /* font_descent_return */, |
| 3433 | XCharStruct* /* overall_return */ |
| 3434 | ); |
| 3435 | |
| 3436 | extern int XTextExtents16( |
| 3437 | XFontStruct* /* font_struct */, |
| 3438 | _Xconst XChar2b* /* string */, |
| 3439 | int /* nchars */, |
| 3440 | int* /* direction_return */, |
| 3441 | int* /* font_ascent_return */, |
| 3442 | int* /* font_descent_return */, |
| 3443 | XCharStruct* /* overall_return */ |
| 3444 | ); |
| 3445 | |
| 3446 | extern int XTextWidth( |
| 3447 | XFontStruct* /* font_struct */, |
| 3448 | _Xconst char* /* string */, |
| 3449 | int /* count */ |
| 3450 | ); |
| 3451 | |
| 3452 | extern int XTextWidth16( |
| 3453 | XFontStruct* /* font_struct */, |
| 3454 | _Xconst XChar2b* /* string */, |
| 3455 | int /* count */ |
| 3456 | ); |
| 3457 | |
| 3458 | extern Bool XTranslateCoordinates( |
| 3459 | Display* /* display */, |
| 3460 | Window /* src_w */, |
| 3461 | Window /* dest_w */, |
| 3462 | int /* src_x */, |
| 3463 | int /* src_y */, |
| 3464 | int* /* dest_x_return */, |
| 3465 | int* /* dest_y_return */, |
| 3466 | Window* /* child_return */ |
| 3467 | ); |
| 3468 | |
| 3469 | extern int XUndefineCursor( |
| 3470 | Display* /* display */, |
| 3471 | Window /* w */ |
| 3472 | ); |
| 3473 | |
| 3474 | extern int XUngrabButton( |
| 3475 | Display* /* display */, |
| 3476 | unsigned int /* button */, |
| 3477 | unsigned int /* modifiers */, |
| 3478 | Window /* grab_window */ |
| 3479 | ); |
| 3480 | |
| 3481 | extern int XUngrabKey( |
| 3482 | Display* /* display */, |
| 3483 | int /* keycode */, |
| 3484 | unsigned int /* modifiers */, |
| 3485 | Window /* grab_window */ |
| 3486 | ); |
| 3487 | |
| 3488 | extern int XUngrabKeyboard( |
| 3489 | Display* /* display */, |
| 3490 | Time /* time */ |
| 3491 | ); |
| 3492 | |
| 3493 | extern int XUngrabPointer( |
| 3494 | Display* /* display */, |
| 3495 | Time /* time */ |
| 3496 | ); |
| 3497 | |
| 3498 | extern int XUngrabServer( |
| 3499 | Display* /* display */ |
| 3500 | ); |
| 3501 | |
| 3502 | extern int XUninstallColormap( |
| 3503 | Display* /* display */, |
| 3504 | Colormap /* colormap */ |
| 3505 | ); |
| 3506 | |
| 3507 | extern int XUnloadFont( |
| 3508 | Display* /* display */, |
| 3509 | Font /* font */ |
| 3510 | ); |
| 3511 | |
| 3512 | extern int XUnmapSubwindows( |
| 3513 | Display* /* display */, |
| 3514 | Window /* w */ |
| 3515 | ); |
| 3516 | |
| 3517 | extern int XUnmapWindow( |
| 3518 | Display* /* display */, |
| 3519 | Window /* w */ |
| 3520 | ); |
| 3521 | |
| 3522 | extern int XVendorRelease( |
| 3523 | Display* /* display */ |
| 3524 | ); |
| 3525 | |
| 3526 | extern int XWarpPointer( |
| 3527 | Display* /* display */, |
| 3528 | Window /* src_w */, |
| 3529 | Window /* dest_w */, |
| 3530 | int /* src_x */, |
| 3531 | int /* src_y */, |
| 3532 | unsigned int /* src_width */, |
| 3533 | unsigned int /* src_height */, |
| 3534 | int /* dest_x */, |
| 3535 | int /* dest_y */ |
| 3536 | ); |
| 3537 | |
| 3538 | extern int XWidthMMOfScreen( |
| 3539 | Screen* /* screen */ |
| 3540 | ); |
| 3541 | |
| 3542 | extern int XWidthOfScreen( |
| 3543 | Screen* /* screen */ |
| 3544 | ); |
| 3545 | |
| 3546 | extern int XWindowEvent( |
| 3547 | Display* /* display */, |
| 3548 | Window /* w */, |
| 3549 | long /* event_mask */, |
| 3550 | XEvent* /* event_return */ |
| 3551 | ); |
| 3552 | |
| 3553 | extern int XWriteBitmapFile( |
| 3554 | Display* /* display */, |
| 3555 | _Xconst char* /* filename */, |
| 3556 | Pixmap /* bitmap */, |
| 3557 | unsigned int /* width */, |
| 3558 | unsigned int /* height */, |
| 3559 | int /* x_hot */, |
| 3560 | int /* y_hot */ |
| 3561 | ); |
| 3562 | |
| 3563 | extern Bool XSupportsLocale (void); |
| 3564 | |
| 3565 | extern char *XSetLocaleModifiers( |
| 3566 | const char* /* modifier_list */ |
| 3567 | ); |
| 3568 | |
| 3569 | extern XOM XOpenOM( |
| 3570 | Display* /* display */, |
| 3571 | struct _XrmHashBucketRec* /* rdb */, |
| 3572 | _Xconst char* /* res_name */, |
| 3573 | _Xconst char* /* res_class */ |
| 3574 | ); |
| 3575 | |
| 3576 | extern Status XCloseOM( |
| 3577 | XOM /* om */ |
| 3578 | ); |
| 3579 | |
| 3580 | extern char *XSetOMValues( |
| 3581 | XOM /* om */, |
| 3582 | ... |
| 3583 | ) _X_SENTINEL(0); |
| 3584 | |
| 3585 | extern char *XGetOMValues( |
| 3586 | XOM /* om */, |
| 3587 | ... |
| 3588 | ) _X_SENTINEL(0); |
| 3589 | |
| 3590 | extern Display *XDisplayOfOM( |
| 3591 | XOM /* om */ |
| 3592 | ); |
| 3593 | |
| 3594 | extern char *XLocaleOfOM( |
| 3595 | XOM /* om */ |
| 3596 | ); |
| 3597 | |
| 3598 | extern XOC XCreateOC( |
| 3599 | XOM /* om */, |
| 3600 | ... |
| 3601 | ) _X_SENTINEL(0); |
| 3602 | |
| 3603 | extern void XDestroyOC( |
| 3604 | XOC /* oc */ |
| 3605 | ); |
| 3606 | |
| 3607 | extern XOM XOMOfOC( |
| 3608 | XOC /* oc */ |
| 3609 | ); |
| 3610 | |
| 3611 | extern char *XSetOCValues( |
| 3612 | XOC /* oc */, |
| 3613 | ... |
| 3614 | ) _X_SENTINEL(0); |
| 3615 | |
| 3616 | extern char *XGetOCValues( |
| 3617 | XOC /* oc */, |
| 3618 | ... |
| 3619 | ) _X_SENTINEL(0); |
| 3620 | |
| 3621 | extern XFontSet XCreateFontSet( |
| 3622 | Display* /* display */, |
| 3623 | _Xconst char* /* base_font_name_list */, |
| 3624 | char*** /* missing_charset_list */, |
| 3625 | int* /* missing_charset_count */, |
| 3626 | char** /* def_string */ |
| 3627 | ); |
| 3628 | |
| 3629 | extern void XFreeFontSet( |
| 3630 | Display* /* display */, |
| 3631 | XFontSet /* font_set */ |
| 3632 | ); |
| 3633 | |
| 3634 | extern int XFontsOfFontSet( |
| 3635 | XFontSet /* font_set */, |
| 3636 | XFontStruct*** /* font_struct_list */, |
| 3637 | char*** /* font_name_list */ |
| 3638 | ); |
| 3639 | |
| 3640 | extern char *XBaseFontNameListOfFontSet( |
| 3641 | XFontSet /* font_set */ |
| 3642 | ); |
| 3643 | |
| 3644 | extern char *XLocaleOfFontSet( |
| 3645 | XFontSet /* font_set */ |
| 3646 | ); |
| 3647 | |
| 3648 | extern Bool XContextDependentDrawing( |
| 3649 | XFontSet /* font_set */ |
| 3650 | ); |
| 3651 | |
| 3652 | extern Bool XDirectionalDependentDrawing( |
| 3653 | XFontSet /* font_set */ |
| 3654 | ); |
| 3655 | |
| 3656 | extern Bool XContextualDrawing( |
| 3657 | XFontSet /* font_set */ |
| 3658 | ); |
| 3659 | |
| 3660 | extern XFontSetExtents *XExtentsOfFontSet( |
| 3661 | XFontSet /* font_set */ |
| 3662 | ); |
| 3663 | |
| 3664 | extern int XmbTextEscapement( |
| 3665 | XFontSet /* font_set */, |
| 3666 | _Xconst char* /* text */, |
| 3667 | int /* bytes_text */ |
| 3668 | ); |
| 3669 | |
| 3670 | extern int XwcTextEscapement( |
| 3671 | XFontSet /* font_set */, |
| 3672 | _Xconst wchar_t* /* text */, |
| 3673 | int /* num_wchars */ |
| 3674 | ); |
| 3675 | |
| 3676 | extern int Xutf8TextEscapement( |
| 3677 | XFontSet /* font_set */, |
| 3678 | _Xconst char* /* text */, |
| 3679 | int /* bytes_text */ |
| 3680 | ); |
| 3681 | |
| 3682 | extern int XmbTextExtents( |
| 3683 | XFontSet /* font_set */, |
| 3684 | _Xconst char* /* text */, |
| 3685 | int /* bytes_text */, |
| 3686 | XRectangle* /* overall_ink_return */, |
| 3687 | XRectangle* /* overall_logical_return */ |
| 3688 | ); |
| 3689 | |
| 3690 | extern int XwcTextExtents( |
| 3691 | XFontSet /* font_set */, |
| 3692 | _Xconst wchar_t* /* text */, |
| 3693 | int /* num_wchars */, |
| 3694 | XRectangle* /* overall_ink_return */, |
| 3695 | XRectangle* /* overall_logical_return */ |
| 3696 | ); |
| 3697 | |
| 3698 | extern int Xutf8TextExtents( |
| 3699 | XFontSet /* font_set */, |
| 3700 | _Xconst char* /* text */, |
| 3701 | int /* bytes_text */, |
| 3702 | XRectangle* /* overall_ink_return */, |
| 3703 | XRectangle* /* overall_logical_return */ |
| 3704 | ); |
| 3705 | |
| 3706 | extern Status XmbTextPerCharExtents( |
| 3707 | XFontSet /* font_set */, |
| 3708 | _Xconst char* /* text */, |
| 3709 | int /* bytes_text */, |
| 3710 | XRectangle* /* ink_extents_buffer */, |
| 3711 | XRectangle* /* logical_extents_buffer */, |
| 3712 | int /* buffer_size */, |
| 3713 | int* /* num_chars */, |
| 3714 | XRectangle* /* overall_ink_return */, |
| 3715 | XRectangle* /* overall_logical_return */ |
| 3716 | ); |
| 3717 | |
| 3718 | extern Status XwcTextPerCharExtents( |
| 3719 | XFontSet /* font_set */, |
| 3720 | _Xconst wchar_t* /* text */, |
| 3721 | int /* num_wchars */, |
| 3722 | XRectangle* /* ink_extents_buffer */, |
| 3723 | XRectangle* /* logical_extents_buffer */, |
| 3724 | int /* buffer_size */, |
| 3725 | int* /* num_chars */, |
| 3726 | XRectangle* /* overall_ink_return */, |
| 3727 | XRectangle* /* overall_logical_return */ |
| 3728 | ); |
| 3729 | |
| 3730 | extern Status Xutf8TextPerCharExtents( |
| 3731 | XFontSet /* font_set */, |
| 3732 | _Xconst char* /* text */, |
| 3733 | int /* bytes_text */, |
| 3734 | XRectangle* /* ink_extents_buffer */, |
| 3735 | XRectangle* /* logical_extents_buffer */, |
| 3736 | int /* buffer_size */, |
| 3737 | int* /* num_chars */, |
| 3738 | XRectangle* /* overall_ink_return */, |
| 3739 | XRectangle* /* overall_logical_return */ |
| 3740 | ); |
| 3741 | |
| 3742 | extern void XmbDrawText( |
| 3743 | Display* /* display */, |
| 3744 | Drawable /* d */, |
| 3745 | GC /* gc */, |
| 3746 | int /* x */, |
| 3747 | int /* y */, |
| 3748 | XmbTextItem* /* text_items */, |
| 3749 | int /* nitems */ |
| 3750 | ); |
| 3751 | |
| 3752 | extern void XwcDrawText( |
| 3753 | Display* /* display */, |
| 3754 | Drawable /* d */, |
| 3755 | GC /* gc */, |
| 3756 | int /* x */, |
| 3757 | int /* y */, |
| 3758 | XwcTextItem* /* text_items */, |
| 3759 | int /* nitems */ |
| 3760 | ); |
| 3761 | |
| 3762 | extern void Xutf8DrawText( |
| 3763 | Display* /* display */, |
| 3764 | Drawable /* d */, |
| 3765 | GC /* gc */, |
| 3766 | int /* x */, |
| 3767 | int /* y */, |
| 3768 | XmbTextItem* /* text_items */, |
| 3769 | int /* nitems */ |
| 3770 | ); |
| 3771 | |
| 3772 | extern void XmbDrawString( |
| 3773 | Display* /* display */, |
| 3774 | Drawable /* d */, |
| 3775 | XFontSet /* font_set */, |
| 3776 | GC /* gc */, |
| 3777 | int /* x */, |
| 3778 | int /* y */, |
| 3779 | _Xconst char* /* text */, |
| 3780 | int /* bytes_text */ |
| 3781 | ); |
| 3782 | |
| 3783 | extern void XwcDrawString( |
| 3784 | Display* /* display */, |
| 3785 | Drawable /* d */, |
| 3786 | XFontSet /* font_set */, |
| 3787 | GC /* gc */, |
| 3788 | int /* x */, |
| 3789 | int /* y */, |
| 3790 | _Xconst wchar_t* /* text */, |
| 3791 | int /* num_wchars */ |
| 3792 | ); |
| 3793 | |
| 3794 | extern void Xutf8DrawString( |
| 3795 | Display* /* display */, |
| 3796 | Drawable /* d */, |
| 3797 | XFontSet /* font_set */, |
| 3798 | GC /* gc */, |
| 3799 | int /* x */, |
| 3800 | int /* y */, |
| 3801 | _Xconst char* /* text */, |
| 3802 | int /* bytes_text */ |
| 3803 | ); |
| 3804 | |
| 3805 | extern void XmbDrawImageString( |
| 3806 | Display* /* display */, |
| 3807 | Drawable /* d */, |
| 3808 | XFontSet /* font_set */, |
| 3809 | GC /* gc */, |
| 3810 | int /* x */, |
| 3811 | int /* y */, |
| 3812 | _Xconst char* /* text */, |
| 3813 | int /* bytes_text */ |
| 3814 | ); |
| 3815 | |
| 3816 | extern void XwcDrawImageString( |
| 3817 | Display* /* display */, |
| 3818 | Drawable /* d */, |
| 3819 | XFontSet /* font_set */, |
| 3820 | GC /* gc */, |
| 3821 | int /* x */, |
| 3822 | int /* y */, |
| 3823 | _Xconst wchar_t* /* text */, |
| 3824 | int /* num_wchars */ |
| 3825 | ); |
| 3826 | |
| 3827 | extern void Xutf8DrawImageString( |
| 3828 | Display* /* display */, |
| 3829 | Drawable /* d */, |
| 3830 | XFontSet /* font_set */, |
| 3831 | GC /* gc */, |
| 3832 | int /* x */, |
| 3833 | int /* y */, |
| 3834 | _Xconst char* /* text */, |
| 3835 | int /* bytes_text */ |
| 3836 | ); |
| 3837 | |
| 3838 | extern XIM XOpenIM( |
| 3839 | Display* /* dpy */, |
| 3840 | struct _XrmHashBucketRec* /* rdb */, |
| 3841 | char* /* res_name */, |
| 3842 | char* /* res_class */ |
| 3843 | ); |
| 3844 | |
| 3845 | extern Status XCloseIM( |
| 3846 | XIM /* im */ |
| 3847 | ); |
| 3848 | |
| 3849 | extern char *XGetIMValues( |
| 3850 | XIM /* im */, ... |
| 3851 | ) _X_SENTINEL(0); |
| 3852 | |
| 3853 | extern char *XSetIMValues( |
| 3854 | XIM /* im */, ... |
| 3855 | ) _X_SENTINEL(0); |
| 3856 | |
| 3857 | extern Display *XDisplayOfIM( |
| 3858 | XIM /* im */ |
| 3859 | ); |
| 3860 | |
| 3861 | extern char *XLocaleOfIM( |
| 3862 | XIM /* im*/ |
| 3863 | ); |
| 3864 | |
| 3865 | extern XIC XCreateIC( |
| 3866 | XIM /* im */, ... |
| 3867 | ) _X_SENTINEL(0); |
| 3868 | |
| 3869 | extern void XDestroyIC( |
| 3870 | XIC /* ic */ |
| 3871 | ); |
| 3872 | |
| 3873 | extern void XSetICFocus( |
| 3874 | XIC /* ic */ |
| 3875 | ); |
| 3876 | |
| 3877 | extern void XUnsetICFocus( |
| 3878 | XIC /* ic */ |
| 3879 | ); |
| 3880 | |
| 3881 | extern wchar_t *XwcResetIC( |
| 3882 | XIC /* ic */ |
| 3883 | ); |
| 3884 | |
| 3885 | extern char *XmbResetIC( |
| 3886 | XIC /* ic */ |
| 3887 | ); |
| 3888 | |
| 3889 | extern char *Xutf8ResetIC( |
| 3890 | XIC /* ic */ |
| 3891 | ); |
| 3892 | |
| 3893 | extern char *XSetICValues( |
| 3894 | XIC /* ic */, ... |
| 3895 | ) _X_SENTINEL(0); |
| 3896 | |
| 3897 | extern char *XGetICValues( |
| 3898 | XIC /* ic */, ... |
| 3899 | ) _X_SENTINEL(0); |
| 3900 | |
| 3901 | extern XIM XIMOfIC( |
| 3902 | XIC /* ic */ |
| 3903 | ); |
| 3904 | |
| 3905 | extern Bool XFilterEvent( |
| 3906 | XEvent* /* event */, |
| 3907 | Window /* window */ |
| 3908 | ); |
| 3909 | |
| 3910 | extern int XmbLookupString( |
| 3911 | XIC /* ic */, |
| 3912 | XKeyPressedEvent* /* event */, |
| 3913 | char* /* buffer_return */, |
| 3914 | int /* bytes_buffer */, |
| 3915 | KeySym* /* keysym_return */, |
| 3916 | Status* /* status_return */ |
| 3917 | ); |
| 3918 | |
| 3919 | extern int XwcLookupString( |
| 3920 | XIC /* ic */, |
| 3921 | XKeyPressedEvent* /* event */, |
| 3922 | wchar_t* /* buffer_return */, |
| 3923 | int /* wchars_buffer */, |
| 3924 | KeySym* /* keysym_return */, |
| 3925 | Status* /* status_return */ |
| 3926 | ); |
| 3927 | |
| 3928 | extern int Xutf8LookupString( |
| 3929 | XIC /* ic */, |
| 3930 | XKeyPressedEvent* /* event */, |
| 3931 | char* /* buffer_return */, |
| 3932 | int /* bytes_buffer */, |
| 3933 | KeySym* /* keysym_return */, |
| 3934 | Status* /* status_return */ |
| 3935 | ); |
| 3936 | |
| 3937 | extern XVaNestedList XVaCreateNestedList( |
| 3938 | int /*unused*/, ... |
| 3939 | ) _X_SENTINEL(0); |
| 3940 | |
| 3941 | /* internal connections for IMs */ |
| 3942 | |
| 3943 | extern Bool XRegisterIMInstantiateCallback( |
| 3944 | Display* /* dpy */, |
| 3945 | struct _XrmHashBucketRec* /* rdb */, |
| 3946 | char* /* res_name */, |
| 3947 | char* /* res_class */, |
| 3948 | XIDProc /* callback */, |
| 3949 | XPointer /* client_data */ |
| 3950 | ); |
| 3951 | |
| 3952 | extern Bool XUnregisterIMInstantiateCallback( |
| 3953 | Display* /* dpy */, |
| 3954 | struct _XrmHashBucketRec* /* rdb */, |
| 3955 | char* /* res_name */, |
| 3956 | char* /* res_class */, |
| 3957 | XIDProc /* callback */, |
| 3958 | XPointer /* client_data */ |
| 3959 | ); |
| 3960 | |
| 3961 | typedef void (*XConnectionWatchProc)( |
| 3962 | Display* /* dpy */, |
| 3963 | XPointer /* client_data */, |
| 3964 | int /* fd */, |
| 3965 | Bool /* opening */, /* open or close flag */ |
| 3966 | XPointer* /* watch_data */ /* open sets, close uses */ |
| 3967 | ); |
| 3968 | |
| 3969 | |
| 3970 | extern Status XInternalConnectionNumbers( |
| 3971 | Display* /* dpy */, |
| 3972 | int** /* fd_return */, |
| 3973 | int* /* count_return */ |
| 3974 | ); |
| 3975 | |
| 3976 | extern void XProcessInternalConnection( |
| 3977 | Display* /* dpy */, |
| 3978 | int /* fd */ |
| 3979 | ); |
| 3980 | |
| 3981 | extern Status XAddConnectionWatch( |
| 3982 | Display* /* dpy */, |
| 3983 | XConnectionWatchProc /* callback */, |
| 3984 | XPointer /* client_data */ |
| 3985 | ); |
| 3986 | |
| 3987 | extern void XRemoveConnectionWatch( |
| 3988 | Display* /* dpy */, |
| 3989 | XConnectionWatchProc /* callback */, |
| 3990 | XPointer /* client_data */ |
| 3991 | ); |
| 3992 | |
| 3993 | extern void XSetAuthorization( |
| 3994 | char * /* name */, |
| 3995 | int /* namelen */, |
| 3996 | char * /* data */, |
| 3997 | int /* datalen */ |
| 3998 | ); |
| 3999 | |
| 4000 | extern int _Xmbtowc( |
| 4001 | wchar_t * /* wstr */, |
| 4002 | #ifdef ISC |
| 4003 | char const * /* str */, |
| 4004 | size_t /* len */ |
| 4005 | #else |
| 4006 | char * /* str */, |
| 4007 | int /* len */ |
| 4008 | #endif |
| 4009 | ); |
| 4010 | |
| 4011 | extern int _Xwctomb( |
| 4012 | char * /* str */, |
| 4013 | wchar_t /* wc */ |
| 4014 | ); |
| 4015 | |
| 4016 | extern Bool XGetEventData( |
| 4017 | Display* /* dpy */, |
| 4018 | XGenericEventCookie* /* cookie*/ |
| 4019 | ); |
| 4020 | |
| 4021 | extern void XFreeEventData( |
| 4022 | Display* /* dpy */, |
| 4023 | XGenericEventCookie* /* cookie*/ |
| 4024 | ); |
| 4025 | |
| 4026 | #ifdef __clang__ |
| 4027 | #pragma clang diagnostic pop |
| 4028 | #endif |
| 4029 | |
| 4030 | _XFUNCPROTOEND |
| 4031 | |
| 4032 | #endif /* _X11_XLIB_H_ */ |
| 4033 | |