| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#ifndef _TK |
| 19 |
#define _TK |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
extern "C" { |
| 27 |
#endif |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
#define TK_MAJOR_VERSION 8 |
| 51 |
#define TK_MINOR_VERSION 4 |
| 52 |
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE |
| 53 |
#define TK_RELEASE_SERIAL 5 |
| 54 |
|
| 55 |
#define TK_VERSION "8.4" |
| 56 |
#define TK_PATCH_LEVEL "8.4.5" |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
#if defined(MAC_TCL) || defined(MAC_OSX_TK) |
| 64 |
# ifndef REDO_KEYSYM_LOOKUP |
| 65 |
# define REDO_KEYSYM_LOOKUP |
| 66 |
# endif |
| 67 |
#endif |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
#ifdef RC_INVOKED |
| 81 |
#include "tcl.h" |
| 82 |
#endif |
| 83 |
|
| 84 |
#ifndef RC_INVOKED |
| 85 |
|
| 86 |
#ifndef _TKPORT |
| 87 |
#include "tkPort.h" |
| 88 |
#endif |
| 89 |
|
| 90 |
#ifndef _XLIB_H |
| 91 |
# if defined (MAC_TCL) |
| 92 |
# include <Xlib.h> |
| 93 |
# include <X.h> |
| 94 |
# elif defined(MAC_OSX_TK) |
| 95 |
# include <X11/Xlib.h> |
| 96 |
# include <X11/X.h> |
| 97 |
# else |
| 98 |
# include <X11/Xlib.h> |
| 99 |
# endif |
| 100 |
#if !defined(_XLIB_H) |
| 101 |
#define _XLIB_H |
| 102 |
#endif |
| 103 |
#endif |
| 104 |
|
| 105 |
|
| 106 |
#ifdef __STDC__ |
| 107 |
# include <stddef.h> |
| 108 |
#endif |
| 109 |
|
| 110 |
#ifdef BUILD_tk |
| 111 |
# undef TCL_STORAGE_CLASS |
| 112 |
# define TCL_STORAGE_CLASS DLLEXPORT |
| 113 |
#endif |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
#ifdef XNQueryInputStyle |
| 120 |
#define TK_USE_INPUT_METHODS |
| 121 |
#endif |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
typedef struct Tk_BindingTable_ *Tk_BindingTable; |
| 128 |
typedef struct Tk_Canvas_ *Tk_Canvas; |
| 129 |
typedef struct Tk_Cursor_ *Tk_Cursor; |
| 130 |
typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler; |
| 131 |
typedef struct Tk_Font_ *Tk_Font; |
| 132 |
typedef struct Tk_Image__ *Tk_Image; |
| 133 |
typedef struct Tk_ImageMaster_ *Tk_ImageMaster; |
| 134 |
typedef struct Tk_OptionTable_ *Tk_OptionTable; |
| 135 |
typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo; |
| 136 |
typedef struct Tk_TextLayout_ *Tk_TextLayout; |
| 137 |
typedef struct Tk_Window_ *Tk_Window; |
| 138 |
typedef struct Tk_3DBorder_ *Tk_3DBorder; |
| 139 |
typedef struct Tk_Style_ *Tk_Style; |
| 140 |
typedef struct Tk_StyleEngine_ *Tk_StyleEngine; |
| 141 |
typedef struct Tk_StyledElement_ *Tk_StyledElement; |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
typedef CONST char *Tk_Uid; |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
typedef enum { |
| 155 |
TK_OPTION_BOOLEAN, |
| 156 |
TK_OPTION_INT, |
| 157 |
TK_OPTION_DOUBLE, |
| 158 |
TK_OPTION_STRING, |
| 159 |
TK_OPTION_STRING_TABLE, |
| 160 |
TK_OPTION_COLOR, |
| 161 |
TK_OPTION_FONT, |
| 162 |
TK_OPTION_BITMAP, |
| 163 |
TK_OPTION_BORDER, |
| 164 |
TK_OPTION_RELIEF, |
| 165 |
TK_OPTION_CURSOR, |
| 166 |
TK_OPTION_JUSTIFY, |
| 167 |
TK_OPTION_ANCHOR, |
| 168 |
TK_OPTION_SYNONYM, |
| 169 |
TK_OPTION_PIXELS, |
| 170 |
TK_OPTION_WINDOW, |
| 171 |
TK_OPTION_END, |
| 172 |
TK_OPTION_CUSTOM, |
| 173 |
TK_OPTION_STYLE, |
| 174 |
TK_OPTION_OBJ, |
| 175 |
TK_OPTION_CALLBACK, |
| 176 |
TK_OPTION_SCALARVAR, |
| 177 |
TK_OPTION_HASHVAR, |
| 178 |
TK_OPTION_ARRAYVAR |
| 179 |
} Tk_OptionType; |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
typedef struct Tk_OptionSpec { |
| 190 |
Tk_OptionType type; |
| 191 |
|
| 192 |
|
| 193 |
char *optionName; |
| 194 |
|
| 195 |
char *dbName; |
| 196 |
char *dbClass; |
| 197 |
char *defValue; |
| 198 |
|
| 199 |
|
| 200 |
int objOffset; |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
int internalOffset; |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
int flags; |
| 215 |
|
| 216 |
ClientData clientData; |
| 217 |
|
| 218 |
|
| 219 |
int typeMask; |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
} Tk_OptionSpec; |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
#define TK_OPTION_NULL_OK (1 << 0) |
| 235 |
#define TK_OPTION_DONT_SET_DEFAULT (1 << 3) |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
typedef int (Tk_CustomOptionSetProc) _ANSI_ARGS_((ClientData clientData, |
| 244 |
Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *widgRec, |
| 245 |
int offset, char *saveInternalPtr, int flags)); |
| 246 |
typedef Tcl_Obj *(Tk_CustomOptionGetProc) _ANSI_ARGS_((ClientData clientData, |
| 247 |
Tk_Window tkwin, char *widgRec, int offset)); |
| 248 |
typedef void (Tk_CustomOptionRestoreProc) _ANSI_ARGS_((ClientData clientData, |
| 249 |
Tk_Window tkwin, char *internalPtr, char *saveInternalPtr)); |
| 250 |
typedef void (Tk_CustomOptionFreeProc) _ANSI_ARGS_((ClientData clientData, |
| 251 |
Tk_Window tkwin, char *internalPtr)); |
| 252 |
|
| 253 |
typedef struct Tk_ObjCustomOption { |
| 254 |
char *name; |
| 255 |
Tk_CustomOptionSetProc *setProc; |
| 256 |
|
| 257 |
Tk_CustomOptionGetProc *getProc; |
| 258 |
|
| 259 |
|
| 260 |
Tk_CustomOptionRestoreProc *restoreProc; |
| 261 |
|
| 262 |
|
| 263 |
Tk_CustomOptionFreeProc *freeProc; |
| 264 |
|
| 265 |
ClientData clientData; |
| 266 |
|
| 267 |
} Tk_ObjCustomOption; |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
#ifdef offsetof |
| 277 |
#define Tk_Offset(type, field) ((int) offsetof(type, field)) |
| 278 |
#else |
| 279 |
#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field)) |
| 280 |
#endif |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
typedef struct Tk_SavedOption { |
| 293 |
struct TkOption *optionPtr; |
| 294 |
|
| 295 |
Tcl_Obj *valuePtr; |
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
double internalForm; |
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
} Tk_SavedOption; |
| 312 |
|
| 313 |
#ifdef TCL_MEM_DEBUG |
| 314 |
# define TK_NUM_SAVED_OPTIONS 2 |
| 315 |
#else |
| 316 |
# define TK_NUM_SAVED_OPTIONS 20 |
| 317 |
#endif |
| 318 |
|
| 319 |
typedef struct Tk_SavedOptions { |
| 320 |
char *recordPtr; |
| 321 |
|
| 322 |
Tk_Window tkwin; |
| 323 |
|
| 324 |
int numItems; |
| 325 |
|
| 326 |
Tk_SavedOption items[TK_NUM_SAVED_OPTIONS]; |
| 327 |
|
| 328 |
struct Tk_SavedOptions *nextPtr; |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
} Tk_SavedOptions; |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
#ifndef __NO_OLD_CONFIG |
| 348 |
|
| 349 |
typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData, |
| 350 |
Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *value, char *widgRec, |
| 351 |
int offset)); |
| 352 |
typedef Tcl_Obj *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData, |
| 353 |
Tk_Window tkwin, char *widgRec, int offset, |
| 354 |
Tcl_FreeProc **freeProcPtr)); |
| 355 |
|
| 356 |
typedef struct Tk_CustomOption { |
| 357 |
Tk_OptionParseProc *parseProc; |
| 358 |
|
| 359 |
|
| 360 |
Tk_OptionPrintProc *printProc; |
| 361 |
|
| 362 |
|
| 363 |
ClientData clientData; |
| 364 |
|
| 365 |
|
| 366 |
} Tk_CustomOption; |
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
typedef struct Tk_ConfigSpec { |
| 376 |
int type; |
| 377 |
|
| 378 |
|
| 379 |
char *argvName; |
| 380 |
|
| 381 |
Tk_Uid dbName; |
| 382 |
Tk_Uid dbClass; |
| 383 |
Tk_Uid defValue; |
| 384 |
|
| 385 |
int offset; |
| 386 |
|
| 387 |
|
| 388 |
int specFlags; |
| 389 |
|
| 390 |
|
| 391 |
Tk_CustomOption *customPtr; |
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
} Tk_ConfigSpec; |
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
#ifdef offsetof |
| 410 |
#define Tk_Offset(type, field) ((int) offsetof(type, field)) |
| 411 |
#else |
| 412 |
#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field)) |
| 413 |
#endif |
| 414 |
|
| 415 |
typedef enum { |
| 416 |
TK_CONFIG_BOOLEAN, TK_CONFIG_INT, TK_CONFIG_DOUBLE, TK_CONFIG_STRING, |
| 417 |
TK_CONFIG_UID, TK_CONFIG_COLOR, TK_CONFIG_FONT, TK_CONFIG_BITMAP, |
| 418 |
TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR, |
| 419 |
TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR, |
| 420 |
TK_CONFIG_SYNONYM, TK_CONFIG_CAP_STYLE, TK_CONFIG_JOIN_STYLE, |
| 421 |
TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM, |
| 422 |
TK_CONFIG_CALLBACK, TK_CONFIG_LANGARG, TK_CONFIG_SCALARVAR, |
| 423 |
TK_CONFIG_HASHVAR, TK_CONFIG_ARRAYVAR, TK_CONFIG_OBJECT, |
| 424 |
TK_CONFIG_END |
| 425 |
} Tk_ConfigTypes; |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
#define TK_CONFIG_ARGV_ONLY 1 |
| 432 |
#define TK_CONFIG_OBJS 0x80 |
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
#define TK_CONFIG_NULL_OK (1 << 0) |
| 442 |
#define TK_CONFIG_COLOR_ONLY (1 << 1) |
| 443 |
#define TK_CONFIG_MONO_ONLY (1 << 2) |
| 444 |
#define TK_CONFIG_DONT_SET_DEFAULT (1 << 3) |
| 445 |
#define TK_CONFIG_OPTION_SPECIFIED (1 << 4) |
| 446 |
#define TK_CONFIG_USER_BIT 0x100 |
| 447 |
#endif |
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
typedef struct { |
| 454 |
char *key; |
| 455 |
|
| 456 |
int type; |
| 457 |
char *src; |
| 458 |
|
| 459 |
char *dst; |
| 460 |
|
| 461 |
char *help; |
| 462 |
} Tk_ArgvInfo; |
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
#define TK_ARGV_CONSTANT 15 |
| 470 |
#define TK_ARGV_INT 16 |
| 471 |
#define TK_ARGV_STRING 17 |
| 472 |
#define TK_ARGV_UID 18 |
| 473 |
#define TK_ARGV_REST 19 |
| 474 |
#define TK_ARGV_FLOAT 20 |
| 475 |
#define TK_ARGV_FUNC 21 |
| 476 |
#define TK_ARGV_GENFUNC 22 |
| 477 |
#define TK_ARGV_HELP 23 |
| 478 |
#define TK_ARGV_CONST_OPTION 24 |
| 479 |
#define TK_ARGV_OPTION_VALUE 25 |
| 480 |
#define TK_ARGV_OPTION_NAME_VALUE 26 |
| 481 |
#define TK_ARGV_END 27 |
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
#define TK_ARGV_NO_DEFAULTS 0x1 |
| 488 |
#define TK_ARGV_NO_LEFTOVERS 0x2 |
| 489 |
#define TK_ARGV_NO_ABBREV 0x4 |
| 490 |
#define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8 |
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
typedef enum { |
| 498 |
TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT |
| 499 |
} Tk_RestrictAction; |
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
#define TK_WIDGET_DEFAULT_PRIO 20 |
| 506 |
#define TK_STARTUP_FILE_PRIO 40 |
| 507 |
#define TK_USER_DEFAULT_PRIO 60 |
| 508 |
#define TK_INTERACTIVE_PRIO 80 |
| 509 |
#define TK_MAX_PRIO 100 |
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
#define TK_RELIEF_NULL -1 |
| 516 |
#define TK_RELIEF_FLAT 0 |
| 517 |
#define TK_RELIEF_GROOVE 1 |
| 518 |
#define TK_RELIEF_RAISED 2 |
| 519 |
#define TK_RELIEF_RIDGE 3 |
| 520 |
#define TK_RELIEF_SOLID 4 |
| 521 |
#define TK_RELIEF_SUNKEN 5 |
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
#define TK_3D_FLAT_GC 1 |
| 528 |
#define TK_3D_LIGHT_GC 2 |
| 529 |
#define TK_3D_DARK_GC 3 |
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
#define TK_NOTIFY_SHARE 20 |
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
typedef enum { |
| 545 |
TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE, |
| 546 |
TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW, |
| 547 |
TK_ANCHOR_CENTER |
| 548 |
} Tk_Anchor; |
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
typedef enum { |
| 555 |
TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER |
| 556 |
} Tk_Justify; |
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
typedef struct Tk_FontMetrics { |
| 564 |
int ascent; |
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
int descent; |
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
int linespace; |
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
} Tk_FontMetrics; |
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
#define TK_WHOLE_WORDS 1 |
| 584 |
#define TK_AT_LEAST_ONE 2 |
| 585 |
#define TK_PARTIAL_OK 4 |
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
#define TK_IGNORE_TABS 8 |
| 592 |
#define TK_IGNORE_NEWLINES 16 |
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
typedef Window (Tk_ClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, |
| 600 |
Window parent, ClientData instanceData)); |
| 601 |
typedef void (Tk_ClassWorldChangedProc) _ANSI_ARGS_((ClientData instanceData)); |
| 602 |
typedef void (Tk_ClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, |
| 603 |
XEvent *eventPtr)); |
| 604 |
|
| 605 |
typedef struct Tk_ClassProcs { |
| 606 |
unsigned int size; |
| 607 |
Tk_ClassWorldChangedProc *worldChangedProc; |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
Tk_ClassCreateProc *createProc; |
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
Tk_ClassModalProc *modalProc; |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
} Tk_ClassProcs; |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
#define Tk_GetClassProc(procs, which) \ |
| 636 |
(((procs) == NULL) ? NULL : \ |
| 637 |
(((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which)) |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData, |
| 646 |
Tk_Window tkwin)); |
| 647 |
typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData, |
| 648 |
Tk_Window tkwin)); |
| 649 |
|
| 650 |
typedef struct Tk_GeomMgr { |
| 651 |
char *name; |
| 652 |
|
| 653 |
|
| 654 |
Tk_GeomRequestProc *requestProc; |
| 655 |
|
| 656 |
|
| 657 |
Tk_GeomLostSlaveProc *lostSlaveProc; |
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
} Tk_GeomMgr; |
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
#define TK_SCROLL_MOVETO 1 |
| 669 |
#define TK_SCROLL_PAGES 2 |
| 670 |
#define TK_SCROLL_UNITS 3 |
| 671 |
#define TK_SCROLL_ERROR 4 |
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
#define VirtualEvent (MappingNotify + 1) |
| 681 |
#define ActivateNotify (MappingNotify + 2) |
| 682 |
#define DeactivateNotify (MappingNotify + 3) |
| 683 |
#define MouseWheelEvent (MappingNotify + 4) |
| 684 |
#define TK_LASTEVENT (MappingNotify + 5) |
| 685 |
|
| 686 |
#define MouseWheelMask (1L << 28) |
| 687 |
#define ActivateMask (1L << 29) |
| 688 |
#define VirtualEventMask (1L << 30) |
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
|
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
typedef struct { |
| 701 |
int type; |
| 702 |
unsigned long serial; |
| 703 |
Bool send_event; |
| 704 |
Display *display; |
| 705 |
Window event; |
| 706 |
Window root; |
| 707 |
Window subwindow; |
| 708 |
Time time; |
| 709 |
int x, y; |
| 710 |
int x_root, y_root; |
| 711 |
unsigned int state; |
| 712 |
Tk_Uid name; |
| 713 |
Bool same_screen; |
| 714 |
} XVirtualEvent; |
| 715 |
|
| 716 |
typedef struct { |
| 717 |
int type; |
| 718 |
unsigned long serial; |
| 719 |
Bool send_event; |
| 720 |
Display *display; |
| 721 |
Window window; |
| 722 |
} XActivateDeactivateEvent; |
| 723 |
typedef XActivateDeactivateEvent XActivateEvent; |
| 724 |
typedef XActivateDeactivateEvent XDeactivateEvent; |
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
#define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display) |
| 736 |
#define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum) |
| 737 |
#define Tk_Screen(tkwin) (ScreenOfDisplay(Tk_Display(tkwin), \ |
| 738 |
Tk_ScreenNumber(tkwin))) |
| 739 |
#define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) |
| 740 |
#define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) |
| 741 |
#define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) |
| 742 |
#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) |
| 743 |
#define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) |
| 744 |
#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) |
| 745 |
#define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) |
| 746 |
#define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) |
| 747 |
#define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) |
| 748 |
#define Tk_Height(tkwin) \ |
| 749 |
(((Tk_FakeWin *) (tkwin))->changes.height) |
| 750 |
#define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes) |
| 751 |
#define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts) |
| 752 |
#define Tk_IsEmbedded(tkwin) \ |
| 753 |
(((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED) |
| 754 |
#define Tk_IsContainer(tkwin) \ |
| 755 |
(((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER) |
| 756 |
#define Tk_IsMapped(tkwin) \ |
| 757 |
(((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED) |
| 758 |
#define Tk_IsTopLevel(tkwin) \ |
| 759 |
(((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL) |
| 760 |
#define Tk_HasWrapper(tkwin) \ |
| 761 |
(((Tk_FakeWin *) (tkwin))->flags & TK_HAS_WRAPPER) |
| 762 |
#define Tk_WinManaged(tkwin) \ |
| 763 |
(((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED) |
| 764 |
#define Tk_TopWinHierarchy(tkwin) \ |
| 765 |
(((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) |
| 766 |
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) |
| 767 |
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) |
| 768 |
|
| 769 |
#define Tk_InternalBorderWidth(tkwin) \ |
| 770 |
(((Tk_FakeWin *) (tkwin))->internalBorderLeft) |
| 771 |
#define Tk_InternalBorderLeft(tkwin) \ |
| 772 |
(((Tk_FakeWin *) (tkwin))->internalBorderLeft) |
| 773 |
#define Tk_InternalBorderRight(tkwin) \ |
| 774 |
(((Tk_FakeWin *) (tkwin))->internalBorderRight) |
| 775 |
#define Tk_InternalBorderTop(tkwin) \ |
| 776 |
(((Tk_FakeWin *) (tkwin))->internalBorderTop) |
| 777 |
#define Tk_InternalBorderBottom(tkwin) \ |
| 778 |
(((Tk_FakeWin *) (tkwin))->internalBorderBottom) |
| 779 |
#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth) |
| 780 |
#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight) |
| 781 |
#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) |
| 782 |
#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) |
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
typedef struct Tk_FakeWin { |
| 796 |
Display *display; |
| 797 |
char *dummy1; |
| 798 |
int screenNum; |
| 799 |
Visual *visual; |
| 800 |
int depth; |
| 801 |
Window window; |
| 802 |
char *dummy2; |
| 803 |
char *dummy3; |
| 804 |
Tk_Window parentPtr; |
| 805 |
char *dummy4; |
| 806 |
char *dummy5; |
| 807 |
char *pathName; |
| 808 |
Tk_Uid nameUid; |
| 809 |
Tk_Uid classUid; |
| 810 |
XWindowChanges changes; |
| 811 |
unsigned int dummy6; |
| 812 |
XSetWindowAttributes atts; |
| 813 |
unsigned long dummy7; |
| 814 |
unsigned int flags; |
| 815 |
char *dummy8; |
| 816 |
#ifdef TK_USE_INPUT_METHODS |
| 817 |
XIC dummy9; |
| 818 |
#endif |
| 819 |
ClientData *dummy10; |
| 820 |
int dummy11; |
| 821 |
int dummy12; |
| 822 |
char *dummy13; |
| 823 |
char *dummy14; |
| 824 |
ClientData dummy15; |
| 825 |
int reqWidth, reqHeight; |
| 826 |
int internalBorderLeft; |
| 827 |
char *dummy16; |
| 828 |
char *dummy17; |
| 829 |
ClientData dummy18; |
| 830 |
char *dummy19; |
| 831 |
int internalBorderRight; |
| 832 |
int internalBorderTop; |
| 833 |
int internalBorderBottom; |
| 834 |
int minReqWidth; |
| 835 |
int minReqHeight; |
| 836 |
} Tk_FakeWin; |
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
|
| 868 |
|
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
|
| 875 |
|
| 876 |
|
| 877 |
|
| 878 |
|
| 879 |
|
| 880 |
|
| 881 |
|
| 882 |
|
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
|
| 900 |
|
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
|
| 906 |
|
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
#define TK_MAPPED 1 |
| 911 |
#define TK_TOP_LEVEL 2 |
| 912 |
#define TK_ALREADY_DEAD 4 |
| 913 |
#define TK_NEED_CONFIG_NOTIFY 8 |
| 914 |
#define TK_GRAB_FLAG 0x10 |
| 915 |
#define TK_CHECKED_IC 0x20 |
| 916 |
#define TK_DONT_DESTROY_WINDOW 0x40 |
| 917 |
#define TK_WM_COLORMAP_WINDOW 0x80 |
| 918 |
#define TK_EMBEDDED 0x100 |
| 919 |
#define TK_CONTAINER 0x200 |
| 920 |
#define TK_BOTH_HALVES 0x400 |
| 921 |
#define TK_DEFER_MODAL 0x800 |
| 922 |
#define TK_WRAPPER 0x1000 |
| 923 |
#define TK_REPARENTED 0x2000 |
| 924 |
#define TK_ANONYMOUS_WINDOW 0x4000 |
| 925 |
#define TK_HAS_WRAPPER 0x8000 |
| 926 |
#define TK_WIN_MANAGED 0x10000 |
| 927 |
#define TK_TOP_HIERARCHY 0x20000 |
| 928 |
#define TK_PROP_PROPCHANGE 0x40000 |
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
typedef enum { |
| 940 |
TK_STATE_NULL = -1, TK_STATE_ACTIVE, TK_STATE_DISABLED, |
| 941 |
TK_STATE_NORMAL, TK_STATE_HIDDEN |
| 942 |
} Tk_State; |
| 943 |
|
| 944 |
typedef struct Tk_SmoothMethod { |
| 945 |
char *name; |
| 946 |
int (*coordProc) _ANSI_ARGS_((Tk_Canvas canvas, |
| 947 |
double *pointPtr, int numPoints, int numSteps, |
| 948 |
XPoint xPoints[], double dblPoints[])); |
| 949 |
void (*postscriptProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 950 |
Tk_Canvas canvas, double *coordPtr, |
| 951 |
int numPoints, int numSteps)); |
| 952 |
} Tk_SmoothMethod; |
| 953 |
|
| 954 |
|
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
|
| 961 |
#define TK_TAG_SPACE 3 |
| 962 |
|
| 963 |
typedef struct Tk_Item { |
| 964 |
int id; |
| 965 |
|
| 966 |
|
| 967 |
struct Tk_Item *nextPtr; |
| 968 |
|
| 969 |
|
| 970 |
|
| 971 |
Tk_Uid staticTagSpace[TK_TAG_SPACE]; |
| 972 |
|
| 973 |
Tk_Uid *tagPtr; |
| 974 |
|
| 975 |
|
| 976 |
|
| 977 |
int tagSpace; |
| 978 |
|
| 979 |
int numTags; |
| 980 |
|
| 981 |
struct Tk_ItemType *typePtr; |
| 982 |
|
| 983 |
int x1, y1, x2, y2; |
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
|
| 989 |
struct Tk_Item *prevPtr; |
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
Tk_State state; |
| 994 |
LangCallback *updateCmd; |
| 995 |
int redraw_flags; |
| 996 |
struct Tk_Item *group; |
| 997 |
|
| 998 |
|
| 999 |
|
| 1000 |
|
| 1001 |
|
| 1002 |
|
| 1003 |
|
| 1004 |
|
| 1005 |
|
| 1006 |
} Tk_Item; |
| 1007 |
|
| 1008 |
|
| 1009 |
|
| 1010 |
|
| 1011 |
|
| 1012 |
|
| 1013 |
|
| 1014 |
|
| 1015 |
|
| 1016 |
|
| 1017 |
|
| 1018 |
#define TK_ITEM_STATE_DEPENDANT 1 |
| 1019 |
#define TK_ITEM_DONT_REDRAW 2 |
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
|
| 1024 |
|
| 1025 |
typedef ClientData Tk_VisitorStartProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1026 |
Tk_Canvas canvas, int argc, char **argv)); |
| 1027 |
typedef int Tk_VisitorItemProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1028 |
Tk_Canvas canvas, ClientData clientData, |
| 1029 |
Tk_Item *itemPtr)); |
| 1030 |
typedef int Tk_VisitorEndProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1031 |
Tk_Canvas canvas, ClientData clientData)); |
| 1032 |
|
| 1033 |
typedef struct Tk_VisitorType { |
| 1034 |
char *name; |
| 1035 |
int typeSize; |
| 1036 |
int flags; |
| 1037 |
|
| 1038 |
Tk_VisitorStartProc *startProc; |
| 1039 |
Tk_VisitorEndProc *endProc; |
| 1040 |
Tk_VisitorItemProc *visitArc; |
| 1041 |
Tk_VisitorItemProc *visitBitmap; |
| 1042 |
Tk_VisitorItemProc *visitImage; |
| 1043 |
Tk_VisitorItemProc *visitLine; |
| 1044 |
Tk_VisitorItemProc *visitOval; |
| 1045 |
Tk_VisitorItemProc *visitPolygon; |
| 1046 |
Tk_VisitorItemProc *visitRectangle; |
| 1047 |
Tk_VisitorItemProc *visitText; |
| 1048 |
Tk_VisitorItemProc *visitWindow; |
| 1049 |
Tk_VisitorItemProc *visitSticker; |
| 1050 |
|
| 1051 |
Tk_VisitorItemProc *visitViewport; |
| 1052 |
|
| 1053 |
Tk_VisitorItemProc *visitBarchart; |
| 1054 |
|
| 1055 |
Tk_VisitorItemProc *visitStripchart; |
| 1056 |
|
| 1057 |
|
| 1058 |
|
| 1059 |
Tk_VisitorItemProc *visitGroup; |
| 1060 |
Tk_VisitorItemProc *visitGrid; |
| 1061 |
|
| 1062 |
|
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
} Tk_VisitorType; |
| 1069 |
|
| 1070 |
|
| 1071 |
|
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
|
| 1076 |
#ifdef USE_OLD_CANVAS |
| 1077 |
typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1078 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1079 |
char **argv)); |
| 1080 |
typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1081 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1082 |
char **argv, int flags)); |
| 1083 |
typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1084 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1085 |
char **argv)); |
| 1086 |
#else |
| 1087 |
typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1088 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1089 |
Tcl_Obj *CONST objv[])); |
| 1090 |
typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1091 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1092 |
CONST84 Tcl_Obj *CONST objv[], int flags)); |
| 1093 |
typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1094 |
Tk_Canvas canvas, Tk_Item *itemPtr, int argc, |
| 1095 |
Tcl_Obj *CONST objv[])); |
| 1096 |
#endif |
| 1097 |
typedef void Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1098 |
Tk_Item *itemPtr, Display *display)); |
| 1099 |
typedef void Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1100 |
Tk_Item *itemPtr, Display *display, Drawable dst, |
| 1101 |
int x, int y, int width, int height)); |
| 1102 |
typedef double Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1103 |
Tk_Item *itemPtr, double *pointPtr)); |
| 1104 |
typedef int Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1105 |
Tk_Item *itemPtr, double *rectPtr)); |
| 1106 |
typedef int Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1107 |
Tk_Canvas canvas, Tk_Item *itemPtr, int prepass)); |
| 1108 |
typedef void Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1109 |
Tk_Item *itemPtr, double originX, double originY, |
| 1110 |
double scaleX, double scaleY)); |
| 1111 |
typedef void Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1112 |
Tk_Item *itemPtr, double deltaX, double deltaY)); |
| 1113 |
typedef int Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp, |
| 1114 |
Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Obj *indexString, |
| 1115 |
int *indexPtr)); |
| 1116 |
typedef void Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1117 |
Tk_Item *itemPtr, int index)); |
| 1118 |
typedef int Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1119 |
Tk_Item *itemPtr, int offset, char *buffer, |
| 1120 |
int maxBytes)); |
| 1121 |
typedef void Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1122 |
Tk_Item *itemPtr, int beforeThis, Tcl_Obj *string)); |
| 1123 |
typedef void Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1124 |
Tk_Item *itemPtr, int first, int last)); |
| 1125 |
typedef void Tk_ItemBboxProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1126 |
Tk_Item *itemPtr)); |
| 1127 |
typedef int Tk_ItemGetCoordProc _ANSI_ARGS_((Tk_Item *itemPtr, |
| 1128 |
double **coordsPtr, Tcl_FreeProc *freeProc)); |
| 1129 |
typedef int Tk_ItemSetCoordProc _ANSI_ARGS_((Tk_Canvas canvas, |
| 1130 |
Tk_Item *itemPtr, int num, double *coords)); |
| 1131 |
|
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
#define TK_ITEM_ALWAYS_REDRAW 1 |
| 1137 |
#define TK_ITEM_VISITOR_SUPPORT 2 |
| 1138 |
|
| 1139 |
|
| 1140 |
|
| 1141 |
|
| 1142 |
#ifndef __NO_OLD_CONFIG |
| 1143 |
|
| 1144 |
typedef struct Tk_ItemType { |
| 1145 |
char *name; |
| 1146 |
|
| 1147 |
int itemSize; |
| 1148 |
|
| 1149 |
Tk_ItemCreateProc *createProc; |
| 1150 |
|
| 1151 |
Tk_ConfigSpec *configSpecs; |
| 1152 |
|
| 1153 |
|
| 1154 |
Tk_ItemConfigureProc *configProc; |
| 1155 |
|
| 1156 |
Tk_ItemCoordProc *coordProc; |
| 1157 |
|
| 1158 |
Tk_ItemDeleteProc *deleteProc; |
| 1159 |
|
| 1160 |
Tk_ItemDisplayProc *displayProc; |
| 1161 |
|
| 1162 |
int alwaysRedraw; |
| 1163 |
|
| 1164 |
|
| 1165 |
Tk_ItemPointProc *pointProc; |
| 1166 |
|
| 1167 |
Tk_ItemAreaProc *areaProc; |
| 1168 |
|
| 1169 |
Tk_ItemPostscriptProc *postscriptProc; |
| 1170 |
|
| 1171 |
|
| 1172 |
|
| 1173 |
Tk_ItemScaleProc *scaleProc; |
| 1174 |
|
| 1175 |
Tk_ItemTranslateProc *translateProc; |
| 1176 |
|
| 1177 |
Tk_ItemIndexProc *indexProc; |
| 1178 |
|
| 1179 |
|
| 1180 |
Tk_ItemCursorProc *icursorProc; |
| 1181 |
|
| 1182 |
Tk_ItemSelectionProc *selectionProc; |
| 1183 |
|
| 1184 |
|
| 1185 |
Tk_ItemInsertProc *insertProc; |
| 1186 |
|
| 1187 |
Tk_ItemDCharsProc *dCharsProc; |
| 1188 |
|
| 1189 |
struct Tk_ItemType *nextPtr; |
| 1190 |
|
| 1191 |
Tk_ItemBboxProc *bboxProc; |
| 1192 |
int reserved2; |
| 1193 |
char *reserved3; |
| 1194 |
char *reserved4; |
| 1195 |
} Tk_ItemType; |
| 1196 |
|
| 1197 |
#endif |
| 1198 |
|
| 1199 |
|
| 1200 |
|
| 1201 |
|
| 1202 |
|
| 1203 |
|
| 1204 |
|
| 1205 |
|
| 1206 |
|
| 1207 |
typedef struct Tk_CanvasTextInfo { |
| 1208 |
Tk_3DBorder selBorder; |
| 1209 |
|
| 1210 |
int selBorderWidth; |
| 1211 |
|
| 1212 |
XColor *selFgColorPtr; |
| 1213 |
|
| 1214 |
Tk_Item *selItemPtr; |
| 1215 |
|
| 1216 |
|
| 1217 |
int selectFirst; |
| 1218 |
|
| 1219 |
int selectLast; |
| 1220 |
|
| 1221 |
Tk_Item *anchorItemPtr; |
| 1222 |
|
| 1223 |
|
| 1224 |
int selectAnchor; |
| 1225 |
|
| 1226 |
|
| 1227 |
|
| 1228 |
Tk_3DBorder insertBorder; |
| 1229 |
|
| 1230 |
int insertWidth; |
| 1231 |
|
| 1232 |
int insertBorderWidth; |
| 1233 |
|
| 1234 |
Tk_Item *focusItemPtr; |
| 1235 |
|
| 1236 |
|
| 1237 |
int gotFocus; |
| 1238 |
|
| 1239 |
int cursorOn; |
| 1240 |
|
| 1241 |
|
| 1242 |
} Tk_CanvasTextInfo; |
| 1243 |
|
| 1244 |
|
| 1245 |
|
| 1246 |
|
| 1247 |
|
| 1248 |
typedef struct Tk_Dash { |
| 1249 |
int number; |
| 1250 |
union { |
| 1251 |
char *pt; |
| 1252 |
char array[sizeof(char *)]; |
| 1253 |
} pattern; |
| 1254 |
} Tk_Dash; |
| 1255 |
|
| 1256 |
typedef struct Tk_TSOffset { |
| 1257 |
int flags; |
| 1258 |
int xoffset; |
| 1259 |
int yoffset; |
| 1260 |
} Tk_TSOffset; |
| 1261 |
|
| 1262 |
|
| 1263 |
|
| 1264 |
|
| 1265 |
|
| 1266 |
#define TK_OFFSET_INDEX 1 |
| 1267 |
#define TK_OFFSET_RELATIVE 2 |
| 1268 |
#define TK_OFFSET_LEFT 4 |
| 1269 |
#define TK_OFFSET_CENTER 8 |
| 1270 |
#define TK_OFFSET_RIGHT 16 |
| 1271 |
#define TK_OFFSET_TOP 32 |
| 1272 |
#define TK_OFFSET_MIDDLE 64 |
| 1273 |
#define TK_OFFSET_BOTTOM 128 |
| 1274 |
|
| 1275 |
typedef struct Tk_Tile_ *Tk_Tile; |
| 1276 |
|
| 1277 |
typedef struct Tk_Outline { |
| 1278 |
GC gc; |
| 1279 |
double width; |
| 1280 |
double activeWidth; |
| 1281 |
double disabledWidth; |
| 1282 |
int offset; |
| 1283 |
Tk_Dash dash; |
| 1284 |
Tk_Dash activeDash; |
| 1285 |
Tk_Dash disabledDash; |
| 1286 |
VOID *reserved1; |
| 1287 |
VOID *reserved2; |
| 1288 |
VOID *reserved3; |
| 1289 |
Tk_TSOffset tsoffset; |
| 1290 |
XColor *color; |
| 1291 |
XColor *activeColor; |
| 1292 |
XColor *disabledColor; |
| 1293 |
Pixmap stipple; |
| 1294 |
Pixmap activeStipple; |
| 1295 |
Pixmap disabledStipple; |
| 1296 |
Tk_Tile tile; |
| 1297 |
} Tk_Outline; |
| 1298 |
|
| 1299 |
|
| 1300 |
|
| 1301 |
|
| 1302 |
|
| 1303 |
|
| 1304 |
EXTERN void Tk_CreateOutline _ANSI_ARGS_((Tk_Outline *outline)); |
| 1305 |
EXTERN void Tk_DeleteOutline _ANSI_ARGS_((Display *display, |
| 1306 |
Tk_Outline *outline)); |
| 1307 |
EXTERN int Tk_ConfigOutlineGC _ANSI_ARGS_((XGCValues *gcValues, |
| 1308 |
Tk_Canvas canvas ,Tk_Item *item, |
| 1309 |
Tk_Outline *outline)); |
| 1310 |
EXTERN int Tk_ChangeOutlineGC _ANSI_ARGS_((Tk_Canvas canvas, |
| 1311 |
Tk_Item *item, Tk_Outline *outline)); |
| 1312 |
EXTERN int Tk_ResetOutlineGC _ANSI_ARGS_((Tk_Canvas canvas, |
| 1313 |
Tk_Item *item, Tk_Outline *outline)); |
| 1314 |
EXTERN int Tk_CanvasPsOutline _ANSI_ARGS_((Tk_Canvas canvas, |
| 1315 |
Tk_Item *item, Tk_Outline *outline)); |
| 1316 |
|
| 1317 |
|
| 1318 |
|
| 1319 |
|
| 1320 |
|
| 1321 |
typedef void (Tk_TileChangedProc) _ANSI_ARGS_((ClientData clientData, |
| 1322 |
Tk_Tile tile)); |
| 1323 |
EXTERN Tk_Tile Tk_GetTile _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, |
| 1324 |
CONST char *imageName)); |
| 1325 |
EXTERN void Tk_FreeTile _ANSI_ARGS_((Tk_Tile tile)); |
| 1326 |
EXTERN CONST char * Tk_NameOfTile _ANSI_ARGS_((Tk_Tile tile)); |
| 1327 |
EXTERN void Tk_SetTileChangedProc _ANSI_ARGS_((Tk_Tile tile, |
| 1328 |
Tk_TileChangedProc * changeProc, ClientData clientData)); |
| 1329 |
EXTERN Pixmap Tk_PixmapOfTile _ANSI_ARGS_((Tk_Tile tile)); |
| 1330 |
EXTERN int Tk_PixelParseProc _ANSI_ARGS_(( |
| 1331 |
ClientData clientData, Tcl_Interp *interp, |
| 1332 |
Tk_Window tkwin, Tcl_Obj *value, char *widgRec, |
| 1333 |
int offset)); |
| 1334 |
EXTERN Tcl_Obj *Tk_PixelPrintProc _ANSI_ARGS_(( |
| 1335 |
ClientData clientData, Tk_Window tkwin, |
| 1336 |
char *widgRec, int offset, |
| 1337 |
Tcl_FreeProc **freeProcPtr)); |
| 1338 |
EXTERN void Tk_SizeOfTile _ANSI_ARGS_((Tk_Tile tile, int *widthPtr, |
| 1339 |
int *heightPtr)); |
| 1340 |
EXTERN int Tk_TileParseProc _ANSI_ARGS_(( |
| 1341 |
ClientData clientData, Tcl_Interp *interp, |
| 1342 |
Tk_Window tkwin, Tcl_Obj *value, char *widgRec, |
| 1343 |
int offset)); |
| 1344 |
EXTERN Tcl_Obj *Tk_TilePrintProc _ANSI_ARGS_(( |
| 1345 |
ClientData clientData, Tk_Window tkwin, |
| 1346 |
char *widgRec, int offset, |
| 1347 |
Tcl_FreeProc **freeProcPtr)); |
| 1348 |
EXTERN int Tk_OffsetParseProc _ANSI_ARGS_(( |
| 1349 |
ClientData clientData, Tcl_Interp *interp, |
| 1350 |
Tk_Window tkwin, Tcl_Obj *value, char *widgRec, |
| 1351 |
int offset)); |
| 1352 |
EXTERN Tcl_Obj *Tk_OffsetPrintProc _ANSI_ARGS_(( |
| 1353 |
ClientData clientData, Tk_Window tkwin, |
| 1354 |
char *widgRec, int offset, |
| 1355 |
Tcl_FreeProc **freeProcPtr)); |
| 1356 |
EXTERN int Tk_OrientParseProc _ANSI_ARGS_(( |
| 1357 |
ClientData clientData, Tcl_Interp *interp, |
| 1358 |
Tk_Window tkwin, Tcl_Obj *value, char *widgRec, |
| 1359 |
int offset)); |
| 1360 |
EXTERN Tcl_Obj *Tk_OrientPrintProc _ANSI_ARGS_(( |
| 1361 |
ClientData clientData, Tk_Window tkwin, |
| 1362 |
char *widgRec, int offset, |
| 1363 |
Tcl_FreeProc **freeProcPtr)); |
| 1364 |
|
| 1365 |
|
| 1366 |
|
| 1367 |
|
| 1368 |
|
| 1369 |
|
| 1370 |
|
| 1371 |
|
| 1372 |
|
| 1373 |
|
| 1374 |
typedef struct Tk_ImageType Tk_ImageType; |
| 1375 |
#ifdef USE_OLD_IMAGE |
| 1376 |
typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1377 |
char *name, int argc, char **argv, Tk_ImageType *typePtr, |
| 1378 |
Tk_ImageMaster master, ClientData *masterDataPtr)); |
| 1379 |
#else |
| 1380 |
typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1381 |
char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr, |
| 1382 |
Tk_ImageMaster master, ClientData *masterDataPtr)); |
| 1383 |
#endif |
| 1384 |
typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin, |
| 1385 |
ClientData masterData)); |
| 1386 |
typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData, |
| 1387 |
Display *display, Drawable drawable, int imageX, int imageY, |
| 1388 |
int width, int height, int drawableX, int drawableY)); |
| 1389 |
typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData, |
| 1390 |
Display *display)); |
| 1391 |
typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData)); |
| 1392 |
typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData, |
| 1393 |
int x, int y, int width, int height, int imageWidth, |
| 1394 |
int imageHeight)); |
| 1395 |
typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData, |
| 1396 |
Tcl_Interp *interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo, |
| 1397 |
int x, int y, int width, int height, int prepass)); |
| 1398 |
|
| 1399 |
|
| 1400 |
|
| 1401 |
|
| 1402 |
|
| 1403 |
|
| 1404 |
|
| 1405 |
|
| 1406 |
|
| 1407 |
|
| 1408 |
struct Tk_ImageType { |
| 1409 |
char *name; |
| 1410 |
Tk_ImageCreateProc *createProc; |
| 1411 |
|
| 1412 |
|
| 1413 |
Tk_ImageGetProc *getProc; |
| 1414 |
|
| 1415 |
|
| 1416 |
Tk_ImageDisplayProc *displayProc; |
| 1417 |
|
| 1418 |
|
| 1419 |
Tk_ImageFreeProc *freeProc; |
| 1420 |
|
| 1421 |
|
| 1422 |
Tk_ImageDeleteProc *deleteProc; |
| 1423 |
|
| 1424 |
|
| 1425 |
|
| 1426 |
|
| 1427 |
Tk_ImagePostscriptProc *postscriptProc; |
| 1428 |
|
| 1429 |
|
| 1430 |
struct Tk_ImageType *nextPtr; |
| 1431 |
|
| 1432 |
|
| 1433 |
|
| 1434 |
char *reserved; |
| 1435 |
}; |
| 1436 |
|
| 1437 |
|
| 1438 |
|
| 1439 |
|
| 1440 |
|
| 1441 |
|
| 1442 |
|
| 1443 |
|
| 1444 |
|
| 1445 |
|
| 1446 |
|
| 1447 |
|
| 1448 |
|
| 1449 |
|
| 1450 |
typedef void *Tk_PhotoHandle; |
| 1451 |
|
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
|
| 1456 |
typedef struct Tk_PhotoImageBlock { |
| 1457 |
unsigned char *pixelPtr; |
| 1458 |
int width; |
| 1459 |
int height; |
| 1460 |
int pitch; |
| 1461 |
|
| 1462 |
int pixelSize; |
| 1463 |
|
| 1464 |
int offset[4]; |
| 1465 |
|
| 1466 |
|
| 1467 |
int reserved; |
| 1468 |
} Tk_PhotoImageBlock; |
| 1469 |
|
| 1470 |
|
| 1471 |
|
| 1472 |
|
| 1473 |
|
| 1474 |
|
| 1475 |
|
| 1476 |
#define TK_PHOTO_COMPOSITE_OVERLAY 0 |
| 1477 |
#define TK_PHOTO_COMPOSITE_SET 1 |
| 1478 |
|
| 1479 |
|
| 1480 |
|
| 1481 |
|
| 1482 |
|
| 1483 |
|
| 1484 |
typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; |
| 1485 |
#ifdef USE_OLD_IMAGE |
| 1486 |
typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan, |
| 1487 |
char *fileName, char *formatString, int *widthPtr, int *heightPtr)); |
| 1488 |
typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string, |
| 1489 |
char *formatString, int *widthPtr, int *heightPtr)); |
| 1490 |
typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1491 |
Tcl_Channel chan, char *fileName, char *formatString, |
| 1492 |
Tk_PhotoHandle imageHandle, int destX, int destY, |
| 1493 |
int width, int height, int srcX, int srcY)); |
| 1494 |
typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1495 |
char *string, char *formatString, Tk_PhotoHandle imageHandle, |
| 1496 |
int destX, int destY, int width, int height, int srcX, int srcY)); |
| 1497 |
typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1498 |
char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr)); |
| 1499 |
typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1500 |
Tcl_DString *dataPtr, char *formatString, |
| 1501 |
Tk_PhotoImageBlock *blockPtr)); |
| 1502 |
#else |
| 1503 |
typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan, |
| 1504 |
Tcl_Obj *fileName, Tcl_Obj *format, int *widthPtr, |
| 1505 |
int *heightPtr,Tcl_Interp *interp)); |
| 1506 |
typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj, |
| 1507 |
Tcl_Obj *format, int *widthPtr, int *heightPt, Tcl_Interp *interp)); |
| 1508 |
typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1509 |
Tcl_Channel chan, Tcl_Obj *fileName, Tcl_Obj *format, |
| 1510 |
Tk_PhotoHandle imageHandle, int destX, int destY, |
| 1511 |
int width, int height, int srcX, int srcY)); |
| 1512 |
typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1513 |
Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle, |
| 1514 |
int destX, int destY, int width, int height, int srcX, int srcY)); |
| 1515 |
typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1516 |
char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr)); |
| 1517 |
typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 1518 |
Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr)); |
| 1519 |
#endif |
| 1520 |
|
| 1521 |
|
| 1522 |
|
| 1523 |
|
| 1524 |
|
| 1525 |
|
| 1526 |
|
| 1527 |
|
| 1528 |
struct Tk_PhotoImageFormat { |
| 1529 |
char *name; |
| 1530 |
Tk_ImageFileMatchProc *fileMatchProc; |
| 1531 |
|
| 1532 |
|
| 1533 |
Tk_ImageStringMatchProc *stringMatchProc; |
| 1534 |
|
| 1535 |
|
| 1536 |
Tk_ImageFileReadProc *fileReadProc; |
| 1537 |
|
| 1538 |
|
| 1539 |
Tk_ImageStringReadProc *stringReadProc; |
| 1540 |
|
| 1541 |
|
| 1542 |
Tk_ImageFileWriteProc *fileWriteProc; |
| 1543 |
|
| 1544 |
|
| 1545 |
Tk_ImageStringWriteProc *stringWriteProc; |
| 1546 |
|
| 1547 |
|
| 1548 |
|
| 1549 |
struct Tk_PhotoImageFormat *nextPtr; |
| 1550 |
|
| 1551 |
|
| 1552 |
|
| 1553 |
}; |
| 1554 |
|
| 1555 |
EXTERN void Tk_CreateOldImageType _ANSI_ARGS_(( |
| 1556 |
Tk_ImageType *typePtr)); |
| 1557 |
EXTERN void Tk_CreateOldPhotoImageFormat _ANSI_ARGS_(( |
| 1558 |
Tk_PhotoImageFormat *formatPtr)); |
| 1559 |
|
| 1560 |
#if !defined(USE_TK_STUBS) && defined(USE_OLD_IMAGE) |
| 1561 |
#define Tk_CreateImageType Tk_CreateOldImageType |
| 1562 |
#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat |
| 1563 |
#endif |
| 1564 |
|
| 1565 |
|
| 1566 |
|
| 1567 |
|
| 1568 |
|
| 1569 |
|
| 1570 |
|
| 1571 |
|
| 1572 |
|
| 1573 |
|
| 1574 |
|
| 1575 |
|
| 1576 |
|
| 1577 |
#define TK_STYLE_VERSION_1 0x1 |
| 1578 |
#define TK_STYLE_VERSION TK_STYLE_VERSION_1 |
| 1579 |
|
| 1580 |
|
| 1581 |
|
| 1582 |
|
| 1583 |
|
| 1584 |
|
| 1585 |
typedef void (Tk_GetElementSizeProc) _ANSI_ARGS_((ClientData clientData, |
| 1586 |
char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin, |
| 1587 |
int width, int height, int inner, int *widthPtr, int *heightPtr)); |
| 1588 |
typedef void (Tk_GetElementBoxProc) _ANSI_ARGS_((ClientData clientData, |
| 1589 |
char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin, |
| 1590 |
int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, |
| 1591 |
int *widthPtr, int *heightPtr)); |
| 1592 |
typedef int (Tk_GetElementBorderWidthProc) _ANSI_ARGS_((ClientData clientData, |
| 1593 |
char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin)); |
| 1594 |
typedef void (Tk_DrawElementProc) _ANSI_ARGS_((ClientData clientData, |
| 1595 |
char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin, |
| 1596 |
Drawable d, int x, int y, int width, int height, int state)); |
| 1597 |
|
| 1598 |
typedef struct Tk_ElementOptionSpec { |
| 1599 |
char *name; |
| 1600 |
Tk_OptionType type; |
| 1601 |
|
| 1602 |
} Tk_ElementOptionSpec; |
| 1603 |
|
| 1604 |
typedef struct Tk_ElementSpec { |
| 1605 |
int version; |
| 1606 |
char *name; |
| 1607 |
Tk_ElementOptionSpec *options; |
| 1608 |
|
| 1609 |
|
| 1610 |
|
| 1611 |
|
| 1612 |
|
| 1613 |
|
| 1614 |
|
| 1615 |
Tk_GetElementSizeProc *getSize; |
| 1616 |
|
| 1617 |
|
| 1618 |
|
| 1619 |
Tk_GetElementBoxProc *getBox; |
| 1620 |
|
| 1621 |
|
| 1622 |
Tk_GetElementBorderWidthProc *getBorderWidth; |
| 1623 |
|
| 1624 |
|
| 1625 |
Tk_DrawElementProc *draw; |
| 1626 |
} Tk_ElementSpec; |
| 1627 |
|
| 1628 |
|
| 1629 |
|
| 1630 |
|
| 1631 |
|
| 1632 |
#define TK_ELEMENT_STATE_ACTIVE 1<<0 |
| 1633 |
#define TK_ELEMENT_STATE_DISABLED 1<<1 |
| 1634 |
#define TK_ELEMENT_STATE_FOCUS 1<<2 |
| 1635 |
#define TK_ELEMENT_STATE_PRESSED 1<<3 |
| 1636 |
|
| 1637 |
|
| 1638 |
|
| 1639 |
|
| 1640 |
|
| 1641 |
|
| 1642 |
|
| 1643 |
|
| 1644 |
|
| 1645 |
|
| 1646 |
|
| 1647 |
#if 0 |
| 1648 |
|
| 1649 |
#define TK_READABLE TCL_READABLE |
| 1650 |
#define TK_WRITABLE TCL_WRITABLE |
| 1651 |
#define TK_EXCEPTION TCL_EXCEPTION |
| 1652 |
|
| 1653 |
#define TK_DONT_WAIT TCL_DONT_WAIT |
| 1654 |
#define TK_X_EVENTS TCL_WINDOW_EVENTS |
| 1655 |
#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS |
| 1656 |
#define TK_FILE_EVENTS TCL_FILE_EVENTS |
| 1657 |
#define TK_TIMER_EVENTS TCL_TIMER_EVENTS |
| 1658 |
#define TK_IDLE_EVENTS TCL_IDLE_EVENTS |
| 1659 |
#define TK_ALL_EVENTS TCL_ALL_EVENTS |
| 1660 |
|
| 1661 |
#define Tk_IdleProc Tcl_IdleProc |
| 1662 |
#define Tk_FileProc Tcl_FileProc |
| 1663 |
#define Tk_TimerProc Tcl_TimerProc |
| 1664 |
#define Tk_TimerToken Tcl_TimerToken |
| 1665 |
|
| 1666 |
#define Tk_BackgroundError Tcl_BackgroundError |
| 1667 |
#define Tk_CancelIdleCall Tcl_CancelIdleCall |
| 1668 |
#define Tk_CreateFileHandler Tcl_CreateFileHandler |
| 1669 |
#define Tk_CreateTimerHandler Tcl_CreateTimerHandler |
| 1670 |
#define Tk_DeleteFileHandler Tcl_DeleteFileHandler |
| 1671 |
#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler |
| 1672 |
#define Tk_DoOneEvent Tcl_DoOneEvent |
| 1673 |
#define Tk_DoWhenIdle Tcl_DoWhenIdle |
| 1674 |
#define Tk_Sleep Tcl_Sleep |
| 1675 |
|
| 1676 |
|
| 1677 |
|
| 1678 |
#define Tk_EventuallyFree Tcl_EventuallyFree |
| 1679 |
#define Tk_FreeProc Tcl_FreeProc |
| 1680 |
#define Tk_Preserve Tcl_Preserve |
| 1681 |
#define Tk_Release Tcl_Release |
| 1682 |
#define Tk_FileeventCmd Tcl_FileEventCmd |
| 1683 |
|
| 1684 |
#endif |
| 1685 |
|
| 1686 |
|
| 1687 |
|
| 1688 |
#define Tk_Main(argc, argv, proc) \ |
| 1689 |
Tk_MainEx(argc, argv, proc, Tcl_CreateInterp()) |
| 1690 |
|
| 1691 |
extern CONST char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact)); |
| 1692 |
|
| 1693 |
#ifndef USE_TK_STUBS |
| 1694 |
|
| 1695 |
#define Tk_InitStubs(interp, version, exact) \ |
| 1696 |
Tcl_PkgRequire(interp, "Tk", version, exact) |
| 1697 |
|
| 1698 |
#endif |
| 1699 |
|
| 1700 |
extern void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***argv)); |
| 1701 |
|
| 1702 |
#if !defined(USE_TK_STUBS) || !defined(USE_OLD_IMAGE) |
| 1703 |
|
| 1704 |
#define Tk_InitImageArgs(interp, argc, argv) |
| 1705 |
|
| 1706 |
#endif |
| 1707 |
|
| 1708 |
|
| 1709 |
|
| 1710 |
|
| 1711 |
|
| 1712 |
|
| 1713 |
|
| 1714 |
|
| 1715 |
|
| 1716 |
|
| 1717 |
#define TK_EVENTTYPE_NONE 0 |
| 1718 |
#define TK_EVENTTYPE_STRING 1 |
| 1719 |
#define TK_EVENTTYPE_NUMBER 2 |
| 1720 |
#define TK_EVENTTYPE_WINDOW 3 |
| 1721 |
#define TK_EVENTTYPE_ATOM 4 |
| 1722 |
#define TK_EVENTTYPE_DISPLAY 5 |
| 1723 |
#define TK_EVENTTYPE_DATA 6 |
| 1724 |
|
| 1725 |
typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData, |
| 1726 |
XErrorEvent *errEventPtr)); |
| 1727 |
typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData, |
| 1728 |
XEvent *eventPtr)); |
| 1729 |
typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData, |
| 1730 |
XEvent *eventPtr)); |
| 1731 |
typedef int (Tk_ClientMessageProc) _ANSI_ARGS_((Tk_Window tkwin, |
| 1732 |
XEvent *eventPtr)); |
| 1733 |
typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData, |
| 1734 |
Tcl_Interp *interp, char *portion)); |
| 1735 |
typedef int (Tk_GetXSelProc) _ANSI_ARGS_((ClientData clientData, |
| 1736 |
Tcl_Interp *interp, long *portion, int numValues, |
| 1737 |
int format, Atom type, Tk_Window tkwin)); |
| 1738 |
typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData)); |
| 1739 |
typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_(( |
| 1740 |
ClientData clientData, XEvent *eventPtr)); |
| 1741 |
typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, |
| 1742 |
int offset, char *buffer, int maxBytes)); |
| 1743 |
|
| 1744 |
typedef int (Tk_XSelectionProc) _ANSI_ARGS_((ClientData clientData, |
| 1745 |
int offset, long *buffer, int maxBytes, |
| 1746 |
Atom type, Tk_Window tkwin)); |
| 1747 |
|
| 1748 |
|
| 1749 |
typedef struct { |
| 1750 |
char *name; |
| 1751 |
int (*cmdProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, |
| 1752 |
int argc, char **argv)); |
| 1753 |
|
| 1754 |
} Tk_Cmd; |
| 1755 |
|
| 1756 |
|
| 1757 |
|
| 1758 |
|
| 1759 |
|
| 1760 |
|
| 1761 |
|
| 1762 |
|
| 1763 |
|
| 1764 |
#include "tkDecls.h" |
| 1765 |
|
| 1766 |
|
| 1767 |
|
| 1768 |
|
| 1769 |
|
| 1770 |
|
| 1771 |
|
| 1772 |
|
| 1773 |
|
| 1774 |
|
| 1775 |
#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK |
| 1776 |
# ifdef Tk_PhotoPutBlock |
| 1777 |
# undef Tk_PhotoPutBlock |
| 1778 |
# endif |
| 1779 |
# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite |
| 1780 |
# ifdef Tk_PhotoPutZoomedBlock |
| 1781 |
# undef Tk_PhotoPutZoomedBlock |
| 1782 |
# endif |
| 1783 |
# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite |
| 1784 |
#endif |
| 1785 |
|
| 1786 |
|
| 1787 |
|
| 1788 |
|
| 1789 |
|
| 1790 |
EXTERN Tcl_Command Lang_CreateWidget _ANSI_ARGS_((Tcl_Interp *interp, |
| 1791 |
Tk_Window, Tcl_ObjCmdProc *proc, |
| 1792 |
ClientData clientData, |
| 1793 |
Tcl_CmdDeleteProc *deleteProc)); |
| 1794 |
|
| 1795 |
EXTERN Tcl_Command Lang_CreateImage _ANSI_ARGS_((Tcl_Interp *interp, |
| 1796 |
char *cmdName, Tcl_ObjCmdProc *proc, |
| 1797 |
ClientData clientData, |
| 1798 |
Tcl_CmdDeleteProc *deleteProc, |
| 1799 |
Tk_ImageType *typePtr)); |
| 1800 |
|
| 1801 |
EXTERN void Lang_DeleteWidget _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Command cmd)); |
| 1802 |
|
| 1803 |
EXTERN void Tk_ChangeScreen _ANSI_ARGS_((Tcl_Interp *interp, |
| 1804 |
char *dispName, int screenIndex)); |
| 1805 |
|
| 1806 |
EXTERN Var LangFindVar _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window, CONST char *name)); |
| 1807 |
|
| 1808 |
EXTERN Tcl_Obj * LangWidgetObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window)); |
| 1809 |
EXTERN Tcl_Obj * LangFontObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Font font, char *name)); |
| 1810 |
EXTERN Tcl_Obj * LangObjectObj _ANSI_ARGS_((Tcl_Interp *interp, char *)); |
| 1811 |
|
| 1812 |
#define LangWidgetArg(interp,win) LangObjArg(LangWidgetObj(interp,win),__FILE__,__LINE__) |
| 1813 |
#define LangFontArg(interp,font,name) LangObjArg(LangFontObj(interp,font,name),__FILE__,__LINE__) |
| 1814 |
#define LangObjectArg(interp,name) LangObjArg(LangObjectObj(interp,name),__FILE__,__LINE__) |
| 1815 |
|
| 1816 |
|
| 1817 |
#ifndef NO_EXTERN |
| 1818 |
EXTERN void Lang_DeadMainWindow _ANSI_ARGS_((Tcl_Interp *, Tk_Window)); |
| 1819 |
EXTERN void Lang_NewMainWindow _ANSI_ARGS_((Tcl_Interp *, Tk_Window)); |
| 1820 |
EXTERN void LangDeadWindow _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window)); |
| 1821 |
EXTERN void LangClientMessage _ANSI_ARGS_((Tcl_Interp *interp,Tk_Window, XEvent *)); |
| 1822 |
EXTERN void LangSelectHook _ANSI_ARGS_((CONST char *what, Tk_Window tkwin, |
| 1823 |
Atom selection, Atom target, Atom type)); |
| 1824 |
#endif |
| 1825 |
|
| 1826 |
EXTERN int LangEventCallback _ANSI_ARGS_((ClientData, Tcl_Interp *,XEvent *,Tk_Window,KeySym)); |
| 1827 |
EXTERN int Tk_GetXSelection _ANSI_ARGS_((Tcl_Interp *interp, |
| 1828 |
Tk_Window tkwin, Atom selection, Atom target, |
| 1829 |
Tk_GetXSelProc *proc, ClientData clientData)); |
| 1830 |
EXTERN Tk_Window Tk_EventWindow _ANSI_ARGS_((XEvent *eventPtr)); |
| 1831 |
EXTERN char * Tk_EventInfo _ANSI_ARGS_((int letter, Tk_Window tkwin, XEvent *eventPtr, |
| 1832 |
KeySym keySym, int *numPtr, int *isNum, int *type, |
| 1833 |
int num_size, char *numStorage)); |
| 1834 |
|
| 1835 |
extern void LangCheckDC _ANSI_ARGS_((const char *file, int line)); |
| 1836 |
|
| 1837 |
|
| 1838 |
#undef TCL_STORAGE_CLASS |
| 1839 |
#define TCL_STORAGE_CLASS DLLIMPORT |
| 1840 |
|
| 1841 |
#endif |
| 1842 |
|
| 1843 |
|
| 1844 |
|
| 1845 |
|
| 1846 |
|
| 1847 |
#ifdef __cplusplus |
| 1848 |
} |
| 1849 |
#endif |
| 1850 |
|
| 1851 |
#endif |
| 1852 |
|
| 1853 |
|
| 1854 |
|
| 1855 |
|
| 1856 |
|
| 1857 |
|