| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#ifndef _XLIB_H_ |
| 26 |
#define _XLIB_H_ |
| 27 |
|
| 28 |
#define XlibSpecificationRelease 5 |
| 29 |
|
| 30 |
#ifdef MAC_TCL |
| 31 |
# include <X.h> |
| 32 |
# define Cursor XCursor |
| 33 |
# define Region XRegion |
| 34 |
#else |
| 35 |
# include <X11/X.h> |
| 36 |
#endif |
| 37 |
|
| 38 |
|
| 39 |
#ifdef MAC_TCL |
| 40 |
#include <Xfuncproto.h> |
| 41 |
#else |
| 42 |
#include <X11/Xfuncproto.h> |
| 43 |
#endif |
| 44 |
|
| 45 |
#ifndef X_WCHAR |
| 46 |
#ifdef X_NOT_STDC_ENV |
| 47 |
#define X_WCHAR |
| 48 |
#endif |
| 49 |
#endif |
| 50 |
|
| 51 |
#ifndef X_WCHAR |
| 52 |
#include <stddef.h> |
| 53 |
#else |
| 54 |
|
| 55 |
typedef unsigned long wchar_t; |
| 56 |
#endif |
| 57 |
|
| 58 |
typedef char *XPointer; |
| 59 |
|
| 60 |
#define Bool int |
| 61 |
#ifdef MAC_TCL |
| 62 |
#define Status int |
| 63 |
#else |
| 64 |
typedef int Status; |
| 65 |
#endif |
| 66 |
#define True 1 |
| 67 |
#define False 0 |
| 68 |
|
| 69 |
#define QueuedAlready 0 |
| 70 |
#define QueuedAfterReading 1 |
| 71 |
#define QueuedAfterFlush 2 |
| 72 |
|
| 73 |
#define ConnectionNumber(dpy) ((dpy)->fd) |
| 74 |
#define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root) |
| 75 |
#define DefaultScreen(dpy) ((dpy)->default_screen) |
| 76 |
#define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root) |
| 77 |
#define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual) |
| 78 |
#define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc) |
| 79 |
#define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel) |
| 80 |
#define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel) |
| 81 |
#define AllPlanes ((unsigned long)~0L) |
| 82 |
#define QLength(dpy) ((dpy)->qlen) |
| 83 |
#define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width) |
| 84 |
#define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height) |
| 85 |
#define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth) |
| 86 |
#define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight) |
| 87 |
#define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth) |
| 88 |
#define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries) |
| 89 |
#define ScreenCount(dpy) ((dpy)->nscreens) |
| 90 |
#define ServerVendor(dpy) ((dpy)->vendor) |
| 91 |
#define ProtocolVersion(dpy) ((dpy)->proto_major_version) |
| 92 |
#define ProtocolRevision(dpy) ((dpy)->proto_minor_version) |
| 93 |
#define VendorRelease(dpy) ((dpy)->release) |
| 94 |
#define DisplayString(dpy) ((dpy)->display_name) |
| 95 |
#define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth) |
| 96 |
#define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap) |
| 97 |
#define BitmapUnit(dpy) ((dpy)->bitmap_unit) |
| 98 |
#define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order) |
| 99 |
#define BitmapPad(dpy) ((dpy)->bitmap_pad) |
| 100 |
#define ImageByteOrder(dpy) ((dpy)->byte_order) |
| 101 |
#define NextRequest(dpy) ((dpy)->request + 1) |
| 102 |
#define LastKnownRequestProcessed(dpy) ((dpy)->request) |
| 103 |
|
| 104 |
|
| 105 |
#define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)])) |
| 106 |
#define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen])) |
| 107 |
#define DisplayOfScreen(s) ((s)->display) |
| 108 |
#define RootWindowOfScreen(s) ((s)->root) |
| 109 |
#define BlackPixelOfScreen(s) ((s)->black_pixel) |
| 110 |
#define WhitePixelOfScreen(s) ((s)->white_pixel) |
| 111 |
#define DefaultColormapOfScreen(s)((s)->cmap) |
| 112 |
#define DefaultDepthOfScreen(s) ((s)->root_depth) |
| 113 |
#define DefaultGCOfScreen(s) ((s)->default_gc) |
| 114 |
#define DefaultVisualOfScreen(s)((s)->root_visual) |
| 115 |
#define WidthOfScreen(s) ((s)->width) |
| 116 |
#define HeightOfScreen(s) ((s)->height) |
| 117 |
#define WidthMMOfScreen(s) ((s)->mwidth) |
| 118 |
#define HeightMMOfScreen(s) ((s)->mheight) |
| 119 |
#define PlanesOfScreen(s) ((s)->root_depth) |
| 120 |
#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries) |
| 121 |
#define MinCmapsOfScreen(s) ((s)->min_maps) |
| 122 |
#define MaxCmapsOfScreen(s) ((s)->max_maps) |
| 123 |
#define DoesSaveUnders(s) ((s)->save_unders) |
| 124 |
#define DoesBackingStore(s) ((s)->backing_store) |
| 125 |
#define EventMaskOfScreen(s) ((s)->root_input_mask) |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
typedef struct _XExtData { |
| 131 |
int number; |
| 132 |
struct _XExtData *next; |
| 133 |
int (*free_private)(); |
| 134 |
XPointer private_data; |
| 135 |
} XExtData; |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
typedef struct { |
| 141 |
int extension; |
| 142 |
int major_opcode; |
| 143 |
int first_event; |
| 144 |
int first_error; |
| 145 |
} XExtCodes; |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
typedef struct { |
| 152 |
int depth; |
| 153 |
int bits_per_pixel; |
| 154 |
int scanline_pad; |
| 155 |
} XPixmapFormatValues; |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
typedef struct { |
| 162 |
int function; |
| 163 |
unsigned long plane_mask; |
| 164 |
unsigned long foreground; |
| 165 |
unsigned long background; |
| 166 |
int line_width; |
| 167 |
int line_style; |
| 168 |
int cap_style; |
| 169 |
|
| 170 |
int join_style; |
| 171 |
int fill_style; |
| 172 |
|
| 173 |
int fill_rule; |
| 174 |
int arc_mode; |
| 175 |
Pixmap tile; |
| 176 |
Pixmap stipple; |
| 177 |
int ts_x_origin; |
| 178 |
int ts_y_origin; |
| 179 |
Font font; |
| 180 |
int subwindow_mode; |
| 181 |
Bool graphics_exposures; |
| 182 |
int clip_x_origin; |
| 183 |
int clip_y_origin; |
| 184 |
Pixmap clip_mask; |
| 185 |
int dash_offset; |
| 186 |
char dashes; |
| 187 |
} XGCValues; |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
typedef XGCValues *GC; |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
typedef struct { |
| 200 |
XExtData *ext_data; |
| 201 |
VisualID visualid; |
| 202 |
#if defined(__cplusplus) || defined(c_plusplus) |
| 203 |
int c_class; |
| 204 |
#else |
| 205 |
int class; |
| 206 |
#endif |
| 207 |
unsigned long red_mask, green_mask, blue_mask; |
| 208 |
int bits_per_rgb; |
| 209 |
int map_entries; |
| 210 |
} Visual; |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
typedef struct { |
| 216 |
int depth; |
| 217 |
int nvisuals; |
| 218 |
Visual *visuals; |
| 219 |
} Depth; |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
typedef struct { |
| 227 |
XExtData *ext_data; |
| 228 |
struct _XDisplay *display; |
| 229 |
Window root; |
| 230 |
int width, height; |
| 231 |
int mwidth, mheight; |
| 232 |
int ndepths; |
| 233 |
Depth *depths; |
| 234 |
int root_depth; |
| 235 |
Visual *root_visual; |
| 236 |
GC default_gc; |
| 237 |
Colormap cmap; |
| 238 |
unsigned long white_pixel; |
| 239 |
unsigned long black_pixel; |
| 240 |
int max_maps, min_maps; |
| 241 |
int backing_store; |
| 242 |
Bool save_unders; |
| 243 |
long root_input_mask; |
| 244 |
} Screen; |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
typedef struct { |
| 250 |
XExtData *ext_data; |
| 251 |
int depth; |
| 252 |
int bits_per_pixel; |
| 253 |
int scanline_pad; |
| 254 |
} ScreenFormat; |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
typedef struct { |
| 260 |
Pixmap background_pixmap; |
| 261 |
unsigned long background_pixel; |
| 262 |
Pixmap border_pixmap; |
| 263 |
unsigned long border_pixel; |
| 264 |
int bit_gravity; |
| 265 |
int win_gravity; |
| 266 |
int backing_store; |
| 267 |
unsigned long backing_planes; |
| 268 |
unsigned long backing_pixel; |
| 269 |
Bool save_under; |
| 270 |
long event_mask; |
| 271 |
long do_not_propagate_mask; |
| 272 |
Bool override_redirect; |
| 273 |
Colormap colormap; |
| 274 |
Cursor cursor; |
| 275 |
} XSetWindowAttributes; |
| 276 |
|
| 277 |
typedef struct { |
| 278 |
int x, y; |
| 279 |
int width, height; |
| 280 |
int border_width; |
| 281 |
int depth; |
| 282 |
Visual *visual; |
| 283 |
Window root; |
| 284 |
#if defined(__cplusplus) || defined(c_plusplus) |
| 285 |
int c_class; |
| 286 |
#else |
| 287 |
int class; |
| 288 |
#endif |
| 289 |
int bit_gravity; |
| 290 |
int win_gravity; |
| 291 |
int backing_store; |
| 292 |
unsigned long backing_planes; |
| 293 |
unsigned long backing_pixel; |
| 294 |
Bool save_under; |
| 295 |
Colormap colormap; |
| 296 |
Bool map_installed; |
| 297 |
int map_state; |
| 298 |
long all_event_masks; |
| 299 |
long your_event_mask; |
| 300 |
long do_not_propagate_mask; |
| 301 |
Bool override_redirect; |
| 302 |
Screen *screen; |
| 303 |
} XWindowAttributes; |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
typedef struct { |
| 311 |
int family; |
| 312 |
int length; |
| 313 |
char *address; |
| 314 |
} XHostAddress; |
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
typedef struct _XImage { |
| 320 |
int width, height; |
| 321 |
int xoffset; |
| 322 |
int format; |
| 323 |
char *data; |
| 324 |
int byte_order; |
| 325 |
int bitmap_unit; |
| 326 |
int bitmap_bit_order; |
| 327 |
int bitmap_pad; |
| 328 |
int depth; |
| 329 |
int bytes_per_line; |
| 330 |
int bits_per_pixel; |
| 331 |
unsigned long red_mask; |
| 332 |
unsigned long green_mask; |
| 333 |
unsigned long blue_mask; |
| 334 |
XPointer obdata; |
| 335 |
struct funcs { |
| 336 |
struct _XImage *(*create_image)(); |
| 337 |
#if NeedFunctionPrototypes |
| 338 |
int (*destroy_image) (struct _XImage *); |
| 339 |
unsigned long (*get_pixel) (struct _XImage *, int, int); |
| 340 |
int (*put_pixel) (struct _XImage *, int, int, unsigned long); |
| 341 |
struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); |
| 342 |
int (*add_pixel) (struct _XImage *, long); |
| 343 |
#else |
| 344 |
int (*destroy_image)(); |
| 345 |
unsigned long (*get_pixel)(); |
| 346 |
int (*put_pixel)(); |
| 347 |
struct _XImage *(*sub_image)(); |
| 348 |
int (*add_pixel)(); |
| 349 |
#endif |
| 350 |
} f; |
| 351 |
} XImage; |
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
typedef struct { |
| 357 |
int x, y; |
| 358 |
int width, height; |
| 359 |
int border_width; |
| 360 |
Window sibling; |
| 361 |
int stack_mode; |
| 362 |
} XWindowChanges; |
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
typedef struct { |
| 368 |
unsigned long pixel; |
| 369 |
unsigned short red, green, blue; |
| 370 |
char flags; |
| 371 |
char pad; |
| 372 |
} XColor; |
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
typedef struct { |
| 380 |
short x1, y1, x2, y2; |
| 381 |
} XSegment; |
| 382 |
|
| 383 |
typedef struct { |
| 384 |
short x, y; |
| 385 |
} XPoint; |
| 386 |
|
| 387 |
typedef struct { |
| 388 |
short x, y; |
| 389 |
unsigned short width, height; |
| 390 |
} XRectangle; |
| 391 |
|
| 392 |
typedef struct { |
| 393 |
short x, y; |
| 394 |
unsigned short width, height; |
| 395 |
short angle1, angle2; |
| 396 |
} XArc; |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
typedef struct { |
| 402 |
int key_click_percent; |
| 403 |
int bell_percent; |
| 404 |
int bell_pitch; |
| 405 |
int bell_duration; |
| 406 |
int led; |
| 407 |
int led_mode; |
| 408 |
int key; |
| 409 |
int auto_repeat_mode; |
| 410 |
} XKeyboardControl; |
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
typedef struct { |
| 415 |
int key_click_percent; |
| 416 |
int bell_percent; |
| 417 |
unsigned int bell_pitch, bell_duration; |
| 418 |
unsigned long led_mask; |
| 419 |
int global_auto_repeat; |
| 420 |
char auto_repeats[32]; |
| 421 |
} XKeyboardState; |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
typedef struct { |
| 426 |
Time time; |
| 427 |
short x, y; |
| 428 |
} XTimeCoord; |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
typedef struct { |
| 433 |
int max_keypermod; |
| 434 |
KeyCode *modifiermap; |
| 435 |
} XModifierKeymap; |
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
typedef struct _XDisplay { |
| 444 |
XExtData *ext_data; |
| 445 |
struct _XFreeFuncs *free_funcs; |
| 446 |
int fd; |
| 447 |
int conn_checker; |
| 448 |
int proto_major_version; |
| 449 |
int proto_minor_version; |
| 450 |
char *vendor; |
| 451 |
XID resource_base; |
| 452 |
XID resource_mask; |
| 453 |
XID resource_id; |
| 454 |
int resource_shift; |
| 455 |
XID (*resource_alloc)(); |
| 456 |
int byte_order; |
| 457 |
int bitmap_unit; |
| 458 |
int bitmap_pad; |
| 459 |
int bitmap_bit_order; |
| 460 |
int nformats; |
| 461 |
ScreenFormat *pixmap_format; |
| 462 |
int vnumber; |
| 463 |
int release; |
| 464 |
struct _XSQEvent *head, *tail; |
| 465 |
int qlen; |
| 466 |
unsigned long request; |
| 467 |
char *last_req; |
| 468 |
char *buffer; |
| 469 |
char *bufptr; |
| 470 |
char *bufmax; |
| 471 |
unsigned max_request_size; |
| 472 |
struct _XrmHashBucketRec *db; |
| 473 |
int (*synchandler)(); |
| 474 |
char *display_name; |
| 475 |
int default_screen; |
| 476 |
int nscreens; |
| 477 |
Screen *screens; |
| 478 |
unsigned long motion_buffer; |
| 479 |
unsigned long flags; |
| 480 |
int min_keycode; |
| 481 |
int max_keycode; |
| 482 |
KeySym *keysyms; |
| 483 |
XModifierKeymap *modifiermap; |
| 484 |
int keysyms_per_keycode; |
| 485 |
char *xdefaults; |
| 486 |
char *scratch_buffer; |
| 487 |
unsigned long scratch_length; |
| 488 |
int ext_number; |
| 489 |
struct _XExten *ext_procs; |
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
Bool (*event_vec[128])(); |
| 499 |
Status (*wire_vec[128])(); |
| 500 |
KeySym lock_meaning; |
| 501 |
struct _XLockInfo *lock; |
| 502 |
struct _XInternalAsync *async_handlers; |
| 503 |
unsigned long bigreq_size; |
| 504 |
struct _XLockPtrs *lock_fns; |
| 505 |
|
| 506 |
struct _XKeytrans *key_bindings; |
| 507 |
Font cursor_font; |
| 508 |
struct _XDisplayAtoms *atoms; |
| 509 |
unsigned int mode_switch; |
| 510 |
struct _XContextDB *context_db; |
| 511 |
Bool (**error_vec)(); |
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
struct { |
| 516 |
XPointer defaultCCCs; |
| 517 |
XPointer clientCmaps; |
| 518 |
XPointer perVisualIntensityMaps; |
| 519 |
|
| 520 |
} cms; |
| 521 |
struct _XIMFilter *im_filters; |
| 522 |
struct _XSQEvent *qfree; |
| 523 |
unsigned long next_event_serial_num; |
| 524 |
int (*savedsynchandler)(); |
| 525 |
} Display; |
| 526 |
|
| 527 |
#if NeedFunctionPrototypes |
| 528 |
#undef _XEVENT_ |
| 529 |
#endif |
| 530 |
#ifndef _XEVENT_ |
| 531 |
|
| 532 |
#define XMaxTransChars 4 |
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
typedef struct { |
| 538 |
int type; |
| 539 |
unsigned long serial; |
| 540 |
Bool send_event; |
| 541 |
Display *display; |
| 542 |
Window window; |
| 543 |
Window root; |
| 544 |
Window subwindow; |
| 545 |
Time time; |
| 546 |
int x, y; |
| 547 |
int x_root, y_root; |
| 548 |
unsigned int state; |
| 549 |
unsigned int keycode; |
| 550 |
Bool same_screen; |
| 551 |
char trans_chars[XMaxTransChars]; |
| 552 |
|
| 553 |
int nbytes; |
| 554 |
} XKeyEvent; |
| 555 |
typedef XKeyEvent XKeyPressedEvent; |
| 556 |
typedef XKeyEvent XKeyReleasedEvent; |
| 557 |
|
| 558 |
typedef struct { |
| 559 |
int type; |
| 560 |
unsigned long serial; |
| 561 |
Bool send_event; |
| 562 |
Display *display; |
| 563 |
Window window; |
| 564 |
Window root; |
| 565 |
Window subwindow; |
| 566 |
Time time; |
| 567 |
int x, y; |
| 568 |
int x_root, y_root; |
| 569 |
unsigned int state; |
| 570 |
unsigned int button; |
| 571 |
Bool same_screen; |
| 572 |
} XButtonEvent; |
| 573 |
typedef XButtonEvent XButtonPressedEvent; |
| 574 |
typedef XButtonEvent XButtonReleasedEvent; |
| 575 |
|
| 576 |
typedef struct { |
| 577 |
int type; |
| 578 |
unsigned long serial; |
| 579 |
Bool send_event; |
| 580 |
Display *display; |
| 581 |
Window window; |
| 582 |
Window root; |
| 583 |
Window subwindow; |
| 584 |
Time time; |
| 585 |
int x, y; |
| 586 |
int x_root, y_root; |
| 587 |
unsigned int state; |
| 588 |
char is_hint; |
| 589 |
Bool same_screen; |
| 590 |
} XMotionEvent; |
| 591 |
typedef XMotionEvent XPointerMovedEvent; |
| 592 |
|
| 593 |
typedef struct { |
| 594 |
int type; |
| 595 |
unsigned long serial; |
| 596 |
Bool send_event; |
| 597 |
Display *display; |
| 598 |
Window window; |
| 599 |
Window root; |
| 600 |
Window subwindow; |
| 601 |
Time time; |
| 602 |
int x, y; |
| 603 |
int x_root, y_root; |
| 604 |
int mode; |
| 605 |
int detail; |
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
Bool same_screen; |
| 611 |
Bool focus; |
| 612 |
unsigned int state; |
| 613 |
} XCrossingEvent; |
| 614 |
typedef XCrossingEvent XEnterWindowEvent; |
| 615 |
typedef XCrossingEvent XLeaveWindowEvent; |
| 616 |
|
| 617 |
typedef struct { |
| 618 |
int type; |
| 619 |
unsigned long serial; |
| 620 |
Bool send_event; |
| 621 |
Display *display; |
| 622 |
Window window; |
| 623 |
int mode; |
| 624 |
int detail; |
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
} XFocusChangeEvent; |
| 631 |
typedef XFocusChangeEvent XFocusInEvent; |
| 632 |
typedef XFocusChangeEvent XFocusOutEvent; |
| 633 |
|
| 634 |
|
| 635 |
typedef struct { |
| 636 |
int type; |
| 637 |
unsigned long serial; |
| 638 |
Bool send_event; |
| 639 |
Display *display; |
| 640 |
Window window; |
| 641 |
char key_vector[32]; |
| 642 |
} XKeymapEvent; |
| 643 |
|
| 644 |
typedef struct { |
| 645 |
int type; |
| 646 |
unsigned long serial; |
| 647 |
Bool send_event; |
| 648 |
Display *display; |
| 649 |
Window window; |
| 650 |
int x, y; |
| 651 |
int width, height; |
| 652 |
int count; |
| 653 |
} XExposeEvent; |
| 654 |
|
| 655 |
typedef struct { |
| 656 |
int type; |
| 657 |
unsigned long serial; |
| 658 |
Bool send_event; |
| 659 |
Display *display; |
| 660 |
Drawable drawable; |
| 661 |
int x, y; |
| 662 |
int width, height; |
| 663 |
int count; |
| 664 |
int major_code; |
| 665 |
int minor_code; |
| 666 |
} XGraphicsExposeEvent; |
| 667 |
|
| 668 |
typedef struct { |
| 669 |
int type; |
| 670 |
unsigned long serial; |
| 671 |
Bool send_event; |
| 672 |
Display *display; |
| 673 |
Drawable drawable; |
| 674 |
int major_code; |
| 675 |
int minor_code; |
| 676 |
} XNoExposeEvent; |
| 677 |
|
| 678 |
typedef struct { |
| 679 |
int type; |
| 680 |
unsigned long serial; |
| 681 |
Bool send_event; |
| 682 |
Display *display; |
| 683 |
Window window; |
| 684 |
int state; |
| 685 |
} XVisibilityEvent; |
| 686 |
|
| 687 |
typedef struct { |
| 688 |
int type; |
| 689 |
unsigned long serial; |
| 690 |
Bool send_event; |
| 691 |
Display *display; |
| 692 |
Window parent; |
| 693 |
Window window; |
| 694 |
int x, y; |
| 695 |
int width, height; |
| 696 |
int border_width; |
| 697 |
Bool override_redirect; |
| 698 |
} XCreateWindowEvent; |
| 699 |
|
| 700 |
typedef struct { |
| 701 |
int type; |
| 702 |
unsigned long serial; |
| 703 |
Bool send_event; |
| 704 |
Display *display; |
| 705 |
Window event; |
| 706 |
Window window; |
| 707 |
} XDestroyWindowEvent; |
| 708 |
|
| 709 |
typedef struct { |
| 710 |
int type; |
| 711 |
unsigned long serial; |
| 712 |
Bool send_event; |
| 713 |
Display *display; |
| 714 |
Window event; |
| 715 |
Window window; |
| 716 |
Bool from_configure; |
| 717 |
} XUnmapEvent; |
| 718 |
|
| 719 |
typedef struct { |
| 720 |
int type; |
| 721 |
unsigned long serial; |
| 722 |
Bool send_event; |
| 723 |
Display *display; |
| 724 |
Window event; |
| 725 |
Window window; |
| 726 |
Bool override_redirect; |
| 727 |
} XMapEvent; |
| 728 |
|
| 729 |
typedef struct { |
| 730 |
int type; |
| 731 |
unsigned long serial; |
| 732 |
Bool send_event; |
| 733 |
Display *display; |
| 734 |
Window parent; |
| 735 |
Window window; |
| 736 |
} XMapRequestEvent; |
| 737 |
|
| 738 |
typedef struct { |
| 739 |
int type; |
| 740 |
unsigned long serial; |
| 741 |
Bool send_event; |
| 742 |
Display *display; |
| 743 |
Window event; |
| 744 |
Window window; |
| 745 |
Window parent; |
| 746 |
int x, y; |
| 747 |
Bool override_redirect; |
| 748 |
} XReparentEvent; |
| 749 |
|
| 750 |
typedef struct { |
| 751 |
int type; |
| 752 |
unsigned long serial; |
| 753 |
Bool send_event; |
| 754 |
Display *display; |
| 755 |
Window event; |
| 756 |
Window window; |
| 757 |
int x, y; |
| 758 |
int width, height; |
| 759 |
int border_width; |
| 760 |
Window above; |
| 761 |
Bool override_redirect; |
| 762 |
} XConfigureEvent; |
| 763 |
|
| 764 |
typedef struct { |
| 765 |
int type; |
| 766 |
unsigned long serial; |
| 767 |
Bool send_event; |
| 768 |
Display *display; |
| 769 |
Window event; |
| 770 |
Window window; |
| 771 |
int x, y; |
| 772 |
} XGravityEvent; |
| 773 |
|
| 774 |
typedef struct { |
| 775 |
int type; |
| 776 |
unsigned long serial; |
| 777 |
Bool send_event; |
| 778 |
Display *display; |
| 779 |
Window window; |
| 780 |
int width, height; |
| 781 |
} XResizeRequestEvent; |
| 782 |
|
| 783 |
typedef struct { |
| 784 |
int type; |
| 785 |
unsigned long serial; |
| 786 |
Bool send_event; |
| 787 |
Display *display; |
| 788 |
Window parent; |
| 789 |
Window window; |
| 790 |
int x, y; |
| 791 |
int width, height; |
| 792 |
int border_width; |
| 793 |
Window above; |
| 794 |
int detail; |
| 795 |
unsigned long value_mask; |
| 796 |
} XConfigureRequestEvent; |
| 797 |
|
| 798 |
typedef struct { |
| 799 |
int type; |
| 800 |
unsigned long serial; |
| 801 |
Bool send_event; |
| 802 |
Display *display; |
| 803 |
Window event; |
| 804 |
Window window; |
| 805 |
int place; |
| 806 |
} XCirculateEvent; |
| 807 |
|
| 808 |
typedef struct { |
| 809 |
int type; |
| 810 |
unsigned long serial; |
| 811 |
Bool send_event; |
| 812 |
Display *display; |
| 813 |
Window parent; |
| 814 |
Window window; |
| 815 |
int place; |
| 816 |
} XCirculateRequestEvent; |
| 817 |
|
| 818 |
typedef struct { |
| 819 |
int type; |
| 820 |
unsigned long serial; |
| 821 |
Bool send_event; |
| 822 |
Display *display; |
| 823 |
Window window; |
| 824 |
Atom atom; |
| 825 |
Time time; |
| 826 |
int state; |
| 827 |
} XPropertyEvent; |
| 828 |
|
| 829 |
typedef struct { |
| 830 |
int type; |
| 831 |
unsigned long serial; |
| 832 |
Bool send_event; |
| 833 |
Display *display; |
| 834 |
Window window; |
| 835 |
Atom selection; |
| 836 |
Time time; |
| 837 |
} XSelectionClearEvent; |
| 838 |
|
| 839 |
typedef struct { |
| 840 |
int type; |
| 841 |
unsigned long serial; |
| 842 |
Bool send_event; |
| 843 |
Display *display; |
| 844 |
Window owner; |
| 845 |
Window requestor; |
| 846 |
Atom selection; |
| 847 |
Atom target; |
| 848 |
Atom property; |
| 849 |
Time time; |
| 850 |
} XSelectionRequestEvent; |
| 851 |
|
| 852 |
typedef struct { |
| 853 |
int type; |
| 854 |
unsigned long serial; |
| 855 |
Bool send_event; |
| 856 |
Display *display; |
| 857 |
Window requestor; |
| 858 |
Atom selection; |
| 859 |
Atom target; |
| 860 |
Atom property; |
| 861 |
Time time; |
| 862 |
} XSelectionEvent; |
| 863 |
|
| 864 |
typedef struct { |
| 865 |
int type; |
| 866 |
unsigned long serial; |
| 867 |
Bool send_event; |
| 868 |
Display *display; |
| 869 |
Window window; |
| 870 |
Colormap colormap; |
| 871 |
#if defined(__cplusplus) || defined(c_plusplus) |
| 872 |
Bool c_new; |
| 873 |
#else |
| 874 |
Bool new; |
| 875 |
#endif |
| 876 |
int state; |
| 877 |
} XColormapEvent; |
| 878 |
|
| 879 |
typedef struct { |
| 880 |
int type; |
| 881 |
unsigned long serial; |
| 882 |
Bool send_event; |
| 883 |
Display *display; |
| 884 |
Window window; |
| 885 |
Atom message_type; |
| 886 |
int format; |
| 887 |
union { |
| 888 |
char b[20]; |
| 889 |
short s[10]; |
| 890 |
long l[5]; |
| 891 |
} data; |
| 892 |
} XClientMessageEvent; |
| 893 |
|
| 894 |
typedef struct { |
| 895 |
int type; |
| 896 |
unsigned long serial; |
| 897 |
Bool send_event; |
| 898 |
Display *display; |
| 899 |
Window window; |
| 900 |
int request; |
| 901 |
|
| 902 |
int first_keycode; |
| 903 |
int count; |
| 904 |
} XMappingEvent; |
| 905 |
|
| 906 |
typedef struct { |
| 907 |
int type; |
| 908 |
Display *display; |
| 909 |
XID resourceid; |
| 910 |
unsigned long serial; |
| 911 |
unsigned char error_code; |
| 912 |
unsigned char request_code; |
| 913 |
unsigned char minor_code; |
| 914 |
} XErrorEvent; |
| 915 |
|
| 916 |
typedef struct { |
| 917 |
int type; |
| 918 |
unsigned long serial; |
| 919 |
Bool send_event; |
| 920 |
Display *display; |
| 921 |
Window window; |
| 922 |
} XAnyEvent; |
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
typedef union _XEvent { |
| 929 |
int type; |
| 930 |
XAnyEvent xany; |
| 931 |
XKeyEvent xkey; |
| 932 |
XButtonEvent xbutton; |
| 933 |
XMotionEvent xmotion; |
| 934 |
XCrossingEvent xcrossing; |
| 935 |
XFocusChangeEvent xfocus; |
| 936 |
XExposeEvent xexpose; |
| 937 |
XGraphicsExposeEvent xgraphicsexpose; |
| 938 |
XNoExposeEvent xnoexpose; |
| 939 |
XVisibilityEvent xvisibility; |
| 940 |
XCreateWindowEvent xcreatewindow; |
| 941 |
XDestroyWindowEvent xdestroywindow; |
| 942 |
XUnmapEvent xunmap; |
| 943 |
XMapEvent xmap; |
| 944 |
XMapRequestEvent xmaprequest; |
| 945 |
XReparentEvent xreparent; |
| 946 |
XConfigureEvent xconfigure; |
| 947 |
XGravityEvent xgravity; |
| 948 |
XResizeRequestEvent xresizerequest; |
| 949 |
XConfigureRequestEvent xconfigurerequest; |
| 950 |
XCirculateEvent xcirculate; |
| 951 |
XCirculateRequestEvent xcirculaterequest; |
| 952 |
XPropertyEvent xproperty; |
| 953 |
XSelectionClearEvent xselectionclear; |
| 954 |
XSelectionRequestEvent xselectionrequest; |
| 955 |
XSelectionEvent xselection; |
| 956 |
XColormapEvent xcolormap; |
| 957 |
XClientMessageEvent xclient; |
| 958 |
XMappingEvent xmapping; |
| 959 |
XErrorEvent xerror; |
| 960 |
XKeymapEvent xkeymap; |
| 961 |
long pad[24]; |
| 962 |
} XEvent; |
| 963 |
#endif |
| 964 |
|
| 965 |
#define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy))) |
| 966 |
|
| 967 |
|
| 968 |
|
| 969 |
|
| 970 |
typedef struct { |
| 971 |
short lbearing; |
| 972 |
short rbearing; |
| 973 |
short width; |
| 974 |
short ascent; |
| 975 |
short descent; |
| 976 |
unsigned short attributes; |
| 977 |
} XCharStruct; |
| 978 |
|
| 979 |
|
| 980 |
|
| 981 |
|
| 982 |
|
| 983 |
typedef struct { |
| 984 |
Atom name; |
| 985 |
unsigned long card32; |
| 986 |
} XFontProp; |
| 987 |
|
| 988 |
typedef struct { |
| 989 |
XExtData *ext_data; |
| 990 |
Font fid; |
| 991 |
unsigned direction; |
| 992 |
unsigned min_char_or_byte2; |
| 993 |
unsigned max_char_or_byte2; |
| 994 |
unsigned min_byte1; |
| 995 |
unsigned max_byte1; |
| 996 |
Bool all_chars_exist; |
| 997 |
unsigned default_char; |
| 998 |
int n_properties; |
| 999 |
XFontProp *properties; |
| 1000 |
XCharStruct min_bounds; |
| 1001 |
XCharStruct max_bounds; |
| 1002 |
XCharStruct *per_char; |
| 1003 |
int ascent; |
| 1004 |
int descent; |
| 1005 |
} XFontStruct; |
| 1006 |
|
| 1007 |
|
| 1008 |
|
| 1009 |
|
| 1010 |
typedef struct { |
| 1011 |
char *chars; |
| 1012 |
int nchars; |
| 1013 |
int delta; |
| 1014 |
Font font; |
| 1015 |
} XTextItem; |
| 1016 |
|
| 1017 |
typedef struct { |
| 1018 |
unsigned char byte1; |
| 1019 |
unsigned char byte2; |
| 1020 |
} XChar2b; |
| 1021 |
|
| 1022 |
typedef struct { |
| 1023 |
XChar2b *chars; |
| 1024 |
int nchars; |
| 1025 |
int delta; |
| 1026 |
Font font; |
| 1027 |
} XTextItem16; |
| 1028 |
|
| 1029 |
|
| 1030 |
typedef union { Display *display; |
| 1031 |
GC gc; |
| 1032 |
Visual *visual; |
| 1033 |
Screen *screen; |
| 1034 |
ScreenFormat *pixmap_format; |
| 1035 |
XFontStruct *font; } XEDataObject; |
| 1036 |
|
| 1037 |
typedef struct { |
| 1038 |
XRectangle max_ink_extent; |
| 1039 |
XRectangle max_logical_extent; |
| 1040 |
} XFontSetExtents; |
| 1041 |
|
| 1042 |
typedef struct _XFontSet *XFontSet; |
| 1043 |
|
| 1044 |
typedef struct { |
| 1045 |
char *chars; |
| 1046 |
int nchars; |
| 1047 |
int delta; |
| 1048 |
XFontSet font_set; |
| 1049 |
} XmbTextItem; |
| 1050 |
|
| 1051 |
typedef struct { |
| 1052 |
wchar_t *chars; |
| 1053 |
int nchars; |
| 1054 |
int delta; |
| 1055 |
XFontSet font_set; |
| 1056 |
} XwcTextItem; |
| 1057 |
|
| 1058 |
typedef void (*XIMProc)(); |
| 1059 |
|
| 1060 |
typedef struct _XIM *XIM; |
| 1061 |
typedef struct _XIC *XIC; |
| 1062 |
|
| 1063 |
typedef unsigned long XIMStyle; |
| 1064 |
|
| 1065 |
typedef struct { |
| 1066 |
unsigned short count_styles; |
| 1067 |
XIMStyle *supported_styles; |
| 1068 |
} XIMStyles; |
| 1069 |
|
| 1070 |
#define XIMPreeditArea 0x0001L |
| 1071 |
#define XIMPreeditCallbacks 0x0002L |
| 1072 |
#define XIMPreeditPosition 0x0004L |
| 1073 |
#define XIMPreeditNothing 0x0008L |
| 1074 |
#define XIMPreeditNone 0x0010L |
| 1075 |
#define XIMStatusArea 0x0100L |
| 1076 |
#define XIMStatusCallbacks 0x0200L |
| 1077 |
#define XIMStatusNothing 0x0400L |
| 1078 |
#define XIMStatusNone 0x0800L |
| 1079 |
|
| 1080 |
#define XNVaNestedList "XNVaNestedList" |
| 1081 |
#define XNClientWindow "clientWindow" |
| 1082 |
#define XNInputStyle "inputStyle" |
| 1083 |
#define XNFocusWindow "focusWindow" |
| 1084 |
#define XNResourceName "resourceName" |
| 1085 |
#define XNResourceClass "resourceClass" |
| 1086 |
#define XNGeometryCallback "geometryCallback" |
| 1087 |
#define XNFilterEvents "filterEvents" |
| 1088 |
#define XNPreeditStartCallback "preeditStartCallback" |
| 1089 |
#define XNPreeditDoneCallback "preeditDoneCallback" |
| 1090 |
#define XNPreeditDrawCallback "preeditDrawCallback" |
| 1091 |
#define XNPreeditCaretCallback "preeditCaretCallback" |
| 1092 |
#define XNPreeditAttributes "preeditAttributes" |
| 1093 |
#define XNStatusStartCallback "statusStartCallback" |
| 1094 |
#define XNStatusDoneCallback "statusDoneCallback" |
| 1095 |
#define XNStatusDrawCallback "statusDrawCallback" |
| 1096 |
#define XNStatusAttributes "statusAttributes" |
| 1097 |
#define XNArea "area" |
| 1098 |
#define XNAreaNeeded "areaNeeded" |
| 1099 |
#define XNSpotLocation "spotLocation" |
| 1100 |
#define XNColormap "colorMap" |
| 1101 |
#define XNStdColormap "stdColorMap" |
| 1102 |
#define XNForeground "foreground" |
| 1103 |
#define XNBackground "background" |
| 1104 |
#define XNBackgroundPixmap "backgroundPixmap" |
| 1105 |
#define XNFontSet "fontSet" |
| 1106 |
#define XNLineSpace "lineSpace" |
| 1107 |
#define XNCursor "cursor" |
| 1108 |
|
| 1109 |
#define XBufferOverflow -1 |
| 1110 |
#define XLookupNone 1 |
| 1111 |
#define XLookupChars 2 |
| 1112 |
#define XLookupKeySym 3 |
| 1113 |
#define XLookupBoth 4 |
| 1114 |
|
| 1115 |
#if NeedFunctionPrototypes |
| 1116 |
typedef void *XVaNestedList; |
| 1117 |
#else |
| 1118 |
typedef XPointer XVaNestedList; |
| 1119 |
#endif |
| 1120 |
|
| 1121 |
typedef struct { |
| 1122 |
XPointer client_data; |
| 1123 |
XIMProc callback; |
| 1124 |
} XIMCallback; |
| 1125 |
|
| 1126 |
typedef unsigned long XIMFeedback; |
| 1127 |
|
| 1128 |
#define XIMReverse 1 |
| 1129 |
#define XIMUnderline (1<<1) |
| 1130 |
#define XIMHighlight (1<<2) |
| 1131 |
#define XIMPrimary (1<<5) |
| 1132 |
#define XIMSecondary (1<<6) |
| 1133 |
#define XIMTertiary (1<<7) |
| 1134 |
|
| 1135 |
typedef struct _XIMText { |
| 1136 |
unsigned short length; |
| 1137 |
XIMFeedback *feedback; |
| 1138 |
Bool encoding_is_wchar; |
| 1139 |
union { |
| 1140 |
char *multi_byte; |
| 1141 |
wchar_t *wide_char; |
| 1142 |
} string; |
| 1143 |
} XIMText; |
| 1144 |
|
| 1145 |
typedef struct _XIMPreeditDrawCallbackStruct { |
| 1146 |
int caret; |
| 1147 |
int chg_first; |
| 1148 |
int chg_length; |
| 1149 |
XIMText *text; |
| 1150 |
} XIMPreeditDrawCallbackStruct; |
| 1151 |
|
| 1152 |
typedef enum { |
| 1153 |
XIMForwardChar, XIMBackwardChar, |
| 1154 |
XIMForwardWord, XIMBackwardWord, |
| 1155 |
XIMCaretUp, XIMCaretDown, |
| 1156 |
XIMNextLine, XIMPreviousLine, |
| 1157 |
XIMLineStart, XIMLineEnd, |
| 1158 |
XIMAbsolutePosition, |
| 1159 |
XIMDontChange |
| 1160 |
} XIMCaretDirection; |
| 1161 |
|
| 1162 |
typedef enum { |
| 1163 |
XIMIsInvisible, |
| 1164 |
XIMIsPrimary, |
| 1165 |
XIMIsSecondary |
| 1166 |
} XIMCaretStyle; |
| 1167 |
|
| 1168 |
typedef struct _XIMPreeditCaretCallbackStruct { |
| 1169 |
int position; |
| 1170 |
XIMCaretDirection direction; |
| 1171 |
XIMCaretStyle style; |
| 1172 |
} XIMPreeditCaretCallbackStruct; |
| 1173 |
|
| 1174 |
typedef enum { |
| 1175 |
XIMTextType, |
| 1176 |
XIMBitmapType |
| 1177 |
} XIMStatusDataType; |
| 1178 |
|
| 1179 |
typedef struct _XIMStatusDrawCallbackStruct { |
| 1180 |
XIMStatusDataType type; |
| 1181 |
union { |
| 1182 |
XIMText *text; |
| 1183 |
Pixmap bitmap; |
| 1184 |
} data; |
| 1185 |
} XIMStatusDrawCallbackStruct; |
| 1186 |
|
| 1187 |
typedef int (*XErrorHandler) ( |
| 1188 |
#if NeedFunctionPrototypes |
| 1189 |
Display* , |
| 1190 |
XErrorEvent* |
| 1191 |
#endif |
| 1192 |
); |
| 1193 |
|
| 1194 |
_XFUNCPROTOBEGIN |
| 1195 |
|
| 1196 |
#include "X11/Xutil.h" |
| 1197 |
|
| 1198 |
extern void XSetDashes(Display * display, GC gc, int dash_offset, |
| 1199 |
_Xconst char* dash_list, int n); |
| 1200 |
|
| 1201 |
extern XModifierKeymap *XGetModifierMapping(Display *display); |
| 1202 |
|
| 1203 |
extern XImage *XCreateImage(Display *display, Visual *visual, unsigned int ui1, |
| 1204 |
int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3, |
| 1205 |
int i3, int i4); |
| 1206 |
|
| 1207 |
extern XImage *XGetImage(Display* display,Drawable dr, int i1, int i2, |
| 1208 |
unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); |
| 1209 |
|
| 1210 |
extern char *XGetAtomName(Display *d, Atom a); |
| 1211 |
|
| 1212 |
extern char *XKeysymToString(KeySym k); |
| 1213 |
|
| 1214 |
extern Colormap XCreateColormap(Display *d, Window w, Visual* v, |
| 1215 |
int i); |
| 1216 |
|
| 1217 |
extern Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, |
| 1218 |
XColor* x1, XColor* x2, unsigned int ui1, unsigned int ui2); |
| 1219 |
|
| 1220 |
extern Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, |
| 1221 |
unsigned int ui1, unsigned int ui2, XColor* x1, XColor* x2); |
| 1222 |
|
| 1223 |
extern GContext XGContextFromGC(GC g); |
| 1224 |
|
| 1225 |
extern XHostAddress *XListHosts(Display *d, int* i, Bool* b); |
| 1226 |
|
| 1227 |
extern KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i); |
| 1228 |
|
| 1229 |
extern KeySym XStringToKeysym(_Xconst char* c); |
| 1230 |
|
| 1231 |
extern Window XRootWindow(Display *d, int i); |
| 1232 |
|
| 1233 |
extern XErrorHandler XSetErrorHandler(XErrorHandler x); |
| 1234 |
|
| 1235 |
extern Status XIconifyWindow(Display *d, Window w, int i); |
| 1236 |
|
| 1237 |
extern Status XWithdrawWindow(Display *d, Window w, int i); |
| 1238 |
|
| 1239 |
extern Status XGetWMColormapWindows(Display *d, Window w, Window** wpp, |
| 1240 |
int* ip); |
| 1241 |
|
| 1242 |
extern Status XAllocColor(Display *d, Colormap c, XColor* xp); |
| 1243 |
|
| 1244 |
extern void XBell(Display *d, int i); |
| 1245 |
|
| 1246 |
extern void XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, |
| 1247 |
int i2, _Xconst unsigned char* c, int i3); |
| 1248 |
|
| 1249 |
extern void XChangeWindowAttributes(Display *d, Window w, unsigned long ul, |
| 1250 |
XSetWindowAttributes* x); |
| 1251 |
|
| 1252 |
extern void XClearWindow(Display *d, Window w); |
| 1253 |
|
| 1254 |
extern void XConfigureWindow(Display *d, Window w, unsigned int i, |
| 1255 |
XWindowChanges* x); |
| 1256 |
|
| 1257 |
extern void XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, |
| 1258 |
int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); |
| 1259 |
|
| 1260 |
extern void XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, |
| 1261 |
int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, |
| 1262 |
unsigned long ul); |
| 1263 |
|
| 1264 |
extern Pixmap XCreateBitmapFromData(Display *display, Drawable d, |
| 1265 |
_Xconst char* data, unsigned int width, unsigned int height); |
| 1266 |
|
| 1267 |
extern void XDefineCursor(Display *d, Window w, Cursor c); |
| 1268 |
|
| 1269 |
extern void XDeleteProperty(Display *d, Window w, Atom a); |
| 1270 |
|
| 1271 |
extern void XDestroyWindow(Display *d, Window w); |
| 1272 |
|
| 1273 |
extern void XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, |
| 1274 |
unsigned int ui1, unsigned int ui2, int i3, int i4); |
| 1275 |
|
| 1276 |
extern void XDrawLines(Display *d, Drawable dr, GC g, XPoint* x, int i1, |
| 1277 |
int i2); |
| 1278 |
|
| 1279 |
extern void XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, |
| 1280 |
unsigned int ui1, unsigned int ui2); |
| 1281 |
|
| 1282 |
extern void XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, |
| 1283 |
unsigned int ui1, unsigned int ui2, int i3, int i4); |
| 1284 |
|
| 1285 |
extern void XFillPolygon(Display *d, Drawable dr, GC g, XPoint* x, int i1, |
| 1286 |
int i2, int i3); |
| 1287 |
|
| 1288 |
extern void XFillRectangles(Display *d, Drawable dr, GC g, XRectangle* x, |
| 1289 |
int i); |
| 1290 |
|
| 1291 |
extern void XForceScreenSaver(Display *d, int i); |
| 1292 |
|
| 1293 |
extern void XFreeColormap(Display *d, Colormap c); |
| 1294 |
|
| 1295 |
extern void XFreeColors(Display *d, Colormap c, unsigned long* ulp, int i, |
| 1296 |
unsigned long ul); |
| 1297 |
|
| 1298 |
extern void XFreeCursor(Display *d, Cursor c); |
| 1299 |
|
| 1300 |
extern void XFreeModifiermap(XModifierKeymap* x); |
| 1301 |
|
| 1302 |
extern Status XGetGeometry(Display *d, Drawable dr, Window* w, int* i1, |
| 1303 |
int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3, |
| 1304 |
unsigned int* ui4); |
| 1305 |
|
| 1306 |
extern void XGetInputFocus(Display *d, Window* w, int* i); |
| 1307 |
|
| 1308 |
extern int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, |
| 1309 |
Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1, |
| 1310 |
unsigned long* ulp2, unsigned char** cpp); |
| 1311 |
|
| 1312 |
extern Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes* x); |
| 1313 |
|
| 1314 |
extern int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t); |
| 1315 |
|
| 1316 |
extern int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1, |
| 1317 |
int i2, Window w2, Cursor c, Time t); |
| 1318 |
|
| 1319 |
extern KeyCode XKeysymToKeycode(Display *d, KeySym k); |
| 1320 |
|
| 1321 |
extern Status XLookupColor(Display *d, Colormap c1, _Xconst char* c2, |
| 1322 |
XColor* x1, XColor* x2); |
| 1323 |
|
| 1324 |
extern void XMapWindow(Display *d, Window w); |
| 1325 |
|
| 1326 |
extern void XMoveResizeWindow(Display *d, Window w, int i1, int i2, |
| 1327 |
unsigned int ui1, unsigned int ui2); |
| 1328 |
|
| 1329 |
extern void XMoveWindow(Display *d, Window w, int i1, int i2); |
| 1330 |
|
| 1331 |
extern void XNextEvent(Display *d, XEvent* x); |
| 1332 |
|
| 1333 |
extern void XPutBackEvent(Display *d, XEvent* x); |
| 1334 |
|
| 1335 |
extern void XQueryColors(Display *d, Colormap c, XColor* x, int i); |
| 1336 |
|
| 1337 |
extern Bool XQueryPointer(Display *d, Window w1, Window* w2, Window* w3, |
| 1338 |
int* i1, int* i2, int* i3, int* i4, unsigned int* ui); |
| 1339 |
|
| 1340 |
extern Status XQueryTree(Display *d, Window w1, Window* w2, Window* w3, |
| 1341 |
Window** w4, unsigned int* ui); |
| 1342 |
|
| 1343 |
extern void XRaiseWindow(Display *d, Window w); |
| 1344 |
|
| 1345 |
extern void XRefreshKeyboardMapping(XMappingEvent* x); |
| 1346 |
|
| 1347 |
extern void XResizeWindow(Display *d, Window w, unsigned int ui1, |
| 1348 |
unsigned int ui2); |
| 1349 |
|
| 1350 |
extern void XSelectInput(Display *d, Window w, long l); |
| 1351 |
|
| 1352 |
extern Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent* x); |
| 1353 |
|
| 1354 |
extern void XSetCommand(Display *d, Window w, char** c, int i); |
| 1355 |
|
| 1356 |
extern void XSetIconName(Display *d, Window w, _Xconst char* c); |
| 1357 |
|
| 1358 |
extern void XSetInputFocus(Display *d, Window w, int i, Time t); |
| 1359 |
|
| 1360 |
extern void XSetSelectionOwner(Display *d, Atom a, Window w, Time t); |
| 1361 |
|
| 1362 |
extern void XSetWindowBackground(Display *d, Window w, unsigned long ul); |
| 1363 |
|
| 1364 |
extern void XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p); |
| 1365 |
|
| 1366 |
extern void XSetWindowBorder(Display *d, Window w, unsigned long ul); |
| 1367 |
|
| 1368 |
extern void XSetWindowBorderPixmap(Display *d, Window w, Pixmap p); |
| 1369 |
|
| 1370 |
extern void XSetWindowBorderWidth(Display *d, Window w, unsigned int ui); |
| 1371 |
|
| 1372 |
extern void XSetWindowColormap(Display *d, Window w, Colormap c); |
| 1373 |
|
| 1374 |
extern Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, |
| 1375 |
int i2, int* i3, int* i4, Window* w3); |
| 1376 |
|
| 1377 |
extern void XUngrabKeyboard(Display *d, Time t); |
| 1378 |
|
| 1379 |
extern void XUngrabPointer(Display *d, Time t); |
| 1380 |
|
| 1381 |
extern void XUnmapWindow(Display *d, Window w); |
| 1382 |
|
| 1383 |
extern void XWindowEvent(Display *d, Window w, long l, XEvent* x); |
| 1384 |
|
| 1385 |
extern void XDestroyIC(XIC x); |
| 1386 |
|
| 1387 |
extern Bool XFilterEvent(XEvent* x, Window w); |
| 1388 |
|
| 1389 |
extern int XmbLookupString(XIC xi, XKeyPressedEvent* xk, char* c, int i, |
| 1390 |
KeySym* k, Status* s); |
| 1391 |
|
| 1392 |
extern void TkPutImage(unsigned long * colors, int ncolors, Display *display, |
| 1393 |
Drawable d, GC gc, XImage* image, int src_x, int src_y, |
| 1394 |
int dest_x, int dest_y, unsigned int width, unsigned int height); |
| 1395 |
|
| 1396 |
extern Status XParseColor(Display * display, Colormap map, _Xconst char* spec, |
| 1397 |
XColor * colorPtr); |
| 1398 |
|
| 1399 |
extern GC XCreateGC(Display *display, Drawable d, unsigned long valuemask, |
| 1400 |
XGCValues* values); |
| 1401 |
|
| 1402 |
extern void XFreeGC(Display *display, GC gc); |
| 1403 |
|
| 1404 |
extern Atom XInternAtom(Display *display, _Xconst char* atom_name, |
| 1405 |
Bool only_if_exists); |
| 1406 |
|
| 1407 |
extern void XSetBackground(Display *display, GC gc, unsigned long foreground); |
| 1408 |
|
| 1409 |
extern void XSetForeground(Display *display, GC gc, unsigned long foreground); |
| 1410 |
|
| 1411 |
extern void XSetClipMask(Display *display, GC gc, Pixmap pixmap); |
| 1412 |
|
| 1413 |
extern void XSetClipOrigin(Display *display, GC gc, int clip_x_origin, |
| 1414 |
int clip_y_origin); |
| 1415 |
|
| 1416 |
extern void XSetTSOrigin(Display *display, GC gc, int ts_x_origin, |
| 1417 |
int ts_y_origin); |
| 1418 |
|
| 1419 |
extern void XChangeGC(Display *display, GC gc, unsigned long mask, |
| 1420 |
XGCValues * values); |
| 1421 |
|
| 1422 |
extern void XSetFont(Display *display, GC gc, Font font); |
| 1423 |
|
| 1424 |
extern void XSetArcMode(Display *display, GC gc, int arc_mode); |
| 1425 |
|
| 1426 |
extern void XSetStipple(Display * display, GC gc, |
| 1427 |
Pixmap stipple); |
| 1428 |
|
| 1429 |
extern void XSetFillRule(Display *display, GC gc, int fill_rule); |
| 1430 |
|
| 1431 |
extern void XSetFillStyle(Display *display, GC gc, int fill_style); |
| 1432 |
|
| 1433 |
extern void XSetFunction(Display *display, GC gc, int function); |
| 1434 |
|
| 1435 |
extern void XSetLineAttributes(Display *display, GC gc, |
| 1436 |
unsigned int line_width, int line_style, int cap_style, |
| 1437 |
int join_style); |
| 1438 |
|
| 1439 |
extern int _XInitImageFuncPtrs(XImage * image); |
| 1440 |
|
| 1441 |
extern XIC XCreateIC(void); |
| 1442 |
|
| 1443 |
extern XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, |
| 1444 |
XVisualInfo* vinfo_template, int* nitems_return); |
| 1445 |
|
| 1446 |
extern void XSetWMClientMachine(Display *display, Window w, |
| 1447 |
XTextProperty* text_prop); |
| 1448 |
|
| 1449 |
extern Status XStringListToTextProperty(char** list, int count, |
| 1450 |
XTextProperty* text_prop_return); |
| 1451 |
|
| 1452 |
extern void XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, |
| 1453 |
int y2); |
| 1454 |
|
| 1455 |
extern void XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, |
| 1456 |
unsigned int sw, unsigned int sh, int dx, int dy); |
| 1457 |
|
| 1458 |
extern void XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, |
| 1459 |
unsigned int width, unsigned int height); |
| 1460 |
|
| 1461 |
_XFUNCPROTOEND |
| 1462 |
|
| 1463 |
#ifdef MAC_TCL |
| 1464 |
# undef Cursor |
| 1465 |
# undef Region |
| 1466 |
#endif |
| 1467 |
|
| 1468 |
#endif |