| 1 | Description: Patch removes internal definitions of the main Tk structures. |
| 2 | Since they have been changed since Tcl/Tk 8.4 it's much better to |
| 3 | include tkInt.h and other few headers. They are internal Tk headers, |
| 4 | so the BLT library built with Tcl/Tk 8.6 won't work with Tcl/Tk 8.5. |
| 5 | Author: FreeBSD BLT port maintainers |
| 6 | Last-Modified: Fri, 04 Jul 2014 09:13:24 +0400 |
| 7 | |
| 8 | --- a/generic/bltTkInt.h |
| 9 | +++ b/generic/bltTkInt.h |
| 10 | @@ -27,214 +27,8 @@ |
| 11 | #ifndef _BLT_TKINT_H |
| 12 | #define _BLT_TKINT_H |
| 13 | |
| 14 | -typedef struct { |
| 15 | - Tk_Uid family; /* Font family. The most important field. */ |
| 16 | - int pointsize; /* Pointsize of font, 0 for default size, or |
| 17 | - * negative number meaning pixel size. */ |
| 18 | - int weight; /* Weight flag; see below for def'n. */ |
| 19 | - int slant; /* Slant flag; see below for def'n. */ |
| 20 | - int underline; /* Non-zero for underline font. */ |
| 21 | - int overstrike; /* Non-zero for overstrike font. */ |
| 22 | -} TkFontAttributes; |
| 23 | - |
| 24 | -typedef struct { |
| 25 | - int ascent; /* From baseline to top of font. */ |
| 26 | - int descent; /* From baseline to bottom of font. */ |
| 27 | - int maxWidth; /* Width of widest character in font. */ |
| 28 | - int fixed; /* Non-zero if this is a fixed-width font, |
| 29 | - * 0 otherwise. */ |
| 30 | -} TkFontMetrics; |
| 31 | - |
| 32 | - |
| 33 | -typedef struct TkFontStruct { |
| 34 | - /* |
| 35 | - * Fields used and maintained exclusively by generic code. |
| 36 | - */ |
| 37 | -#if (TK_VERSION_NUMBER >= _VERSION(8,1,0)) |
| 38 | - int resourceRefCount; /* Number of active uses of this font (each |
| 39 | - * active use corresponds to a call to |
| 40 | - * Tk_AllocFontFromTable or Tk_GetFont). |
| 41 | - * If this count is 0, then this TkFont |
| 42 | - * structure is no longer valid and it isn't |
| 43 | - * present in a hash table: it is being |
| 44 | - * kept around only because there are objects |
| 45 | - * referring to it. The structure is freed |
| 46 | - * when resourceRefCount and objRefCount |
| 47 | - * are both 0. */ |
| 48 | - int objRefCount; /* The number of Tcl objects that reference |
| 49 | - * this structure. */ |
| 50 | -#else |
| 51 | - int refCount; /* Number of users of the TkFont. */ |
| 52 | -#endif |
| 53 | - Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure, |
| 54 | - * used when deleting it. */ |
| 55 | - Tcl_HashEntry *namedHashPtr;/* Pointer to hash table entry that |
| 56 | - * corresponds to the named font that the |
| 57 | - * tkfont was based on, or NULL if the tkfont |
| 58 | - * was not based on a named font. */ |
| 59 | -#if (TK_VERSION_NUMBER >= _VERSION(8,1,0)) |
| 60 | - Screen *screen; /* The screen where this font is valid. */ |
| 61 | -#endif /* TK_VERSION_NUMBER >= 8.1.0 */ |
| 62 | - int tabWidth; /* Width of tabs in this font (pixels). */ |
| 63 | - int underlinePos; /* Offset from baseline to origin of |
| 64 | - * underline bar (used for drawing underlines |
| 65 | - * on a non-underlined font). */ |
| 66 | - int underlineHeight; /* Height of underline bar (used for drawing |
| 67 | - * underlines on a non-underlined font). */ |
| 68 | - |
| 69 | - /* |
| 70 | - * Fields in the generic font structure that are filled in by |
| 71 | - * platform-specific code. |
| 72 | - */ |
| 73 | - |
| 74 | - Font fid; /* For backwards compatibility with XGCValues |
| 75 | - * structures. Remove when TkGCValues is |
| 76 | - * implemented. */ |
| 77 | - TkFontAttributes fa; /* Actual font attributes obtained when the |
| 78 | - * the font was created, as opposed to the |
| 79 | - * desired attributes passed in to |
| 80 | - * TkpGetFontFromAttributes(). The desired |
| 81 | - * metrics can be determined from the string |
| 82 | - * that was used to create this font. */ |
| 83 | - TkFontMetrics fm; /* Font metrics determined when font was |
| 84 | - * created. */ |
| 85 | -#if (TK_VERSION_NUMBER >= _VERSION(8,1,0)) |
| 86 | - struct TkFontStruct *nextPtr; /* Points to the next TkFont structure with |
| 87 | - * the same name. All fonts with the |
| 88 | - * same name (but different displays) are |
| 89 | - * chained together off a single entry in |
| 90 | - * a hash table. */ |
| 91 | -#endif /* TK_VERSION_NUMBER >= 8.1.0 */ |
| 92 | -} TkFont; |
| 93 | - |
| 94 | -/* |
| 95 | - * This structure is used by the Mac and Window porting layers as |
| 96 | - * the internal representation of a clip_mask in a GC. |
| 97 | - */ |
| 98 | -typedef struct TkRegionStruct *TkRegion; |
| 99 | - |
| 100 | -typedef struct { |
| 101 | - int type; /* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */ |
| 102 | - union { |
| 103 | - Pixmap pixmap; |
| 104 | - TkRegion region; |
| 105 | - } value; |
| 106 | -} TkpClipMask; |
| 107 | - |
| 108 | -#define TKP_CLIP_PIXMAP 0 |
| 109 | -#define TKP_CLIP_REGION 1 |
| 110 | - |
| 111 | -#ifdef WIN32 |
| 112 | -/* |
| 113 | - * The TkWinDrawable is the internal implementation of an X Drawable (either |
| 114 | - * a Window or a Pixmap). The following constants define the valid Drawable |
| 115 | - * types. |
| 116 | - */ |
| 117 | - |
| 118 | -#define TWD_BITMAP 1 |
| 119 | -#define TWD_WINDOW 2 |
| 120 | -#define TWD_WINDC 3 |
| 121 | - |
| 122 | -typedef struct TkWindowStruct TkWindow; |
| 123 | - |
| 124 | -typedef struct { |
| 125 | - int type; |
| 126 | - HWND handle; |
| 127 | - TkWindow *winPtr; |
| 128 | -} TkWinWindow; |
| 129 | - |
| 130 | -typedef struct { |
| 131 | - int type; |
| 132 | - HBITMAP handle; |
| 133 | - Colormap colormap; |
| 134 | - int depth; |
| 135 | -} TkWinBitmap; |
| 136 | - |
| 137 | -typedef struct { |
| 138 | - int type; |
| 139 | - HDC hdc; |
| 140 | -} TkWinDC; |
| 141 | - |
| 142 | -typedef union { |
| 143 | - int type; |
| 144 | - TkWinWindow window; |
| 145 | - TkWinBitmap bitmap; |
| 146 | - TkWinDC winDC; |
| 147 | -} TkWinDrawable; |
| 148 | - |
| 149 | -/* |
| 150 | - * The TkWinDCState is used to save the state of a device context |
| 151 | - * so that it can be restored later. |
| 152 | - */ |
| 153 | - |
| 154 | -typedef struct { |
| 155 | - HPALETTE palette; |
| 156 | - int bkmode; /* This field was added in Tk |
| 157 | - * 8.3.1. Be careful that you don't |
| 158 | - * use this structure in a context |
| 159 | - * where its size is important. */ |
| 160 | -} TkWinDCState; |
| 161 | - |
| 162 | -extern HDC TkWinGetDrawableDC(Display *display, Drawable drawable, |
| 163 | - TkWinDCState * state); |
| 164 | -extern HDC TkWinReleaseDrawableDC(Drawable drawable, HDC dc, |
| 165 | - TkWinDCState * state); |
| 166 | - |
| 167 | -extern HWND Tk_GetHWND _ANSI_ARGS_((Window window)); |
| 168 | - |
| 169 | -extern HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void)); |
| 170 | - |
| 171 | -extern Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, HWND hWnd)); |
| 172 | - |
| 173 | -#endif /* WIN32 */ |
| 174 | - |
| 175 | -/* |
| 176 | - * The Border structure used internally by the Tk_3D* routines. |
| 177 | - * The following is a copy of it from tk3d.c. |
| 178 | - */ |
| 179 | - |
| 180 | -typedef struct TkBorderStruct { |
| 181 | - Screen *screen; /* Screen on which the border will be used. */ |
| 182 | - Visual *visual; /* Visual for all windows and pixmaps using |
| 183 | - * the border. */ |
| 184 | - int depth; /* Number of bits per pixel of drawables where |
| 185 | - * the border will be used. */ |
| 186 | - Colormap colormap; /* Colormap out of which pixels are |
| 187 | - * allocated. */ |
| 188 | - int refCount; /* Number of different users of |
| 189 | - * this border. */ |
| 190 | -#if (TK_VERSION_NUMBER >= _VERSION(8,1,0)) |
| 191 | - int objRefCount; /* The number of Tcl objects that reference |
| 192 | - * this structure. */ |
| 193 | -#endif /* TK_VERSION_NUMBER >= 8.1.0 */ |
| 194 | - XColor *bgColor; /* Background color (intensity between |
| 195 | - * lightColorPtr and darkColorPtr). */ |
| 196 | - XColor *darkColor; /* Color for darker areas (must free when |
| 197 | - * deleting structure). NULL means shadows |
| 198 | - * haven't been allocated yet.*/ |
| 199 | - XColor *lightColor; /* Color used for lighter areas of border |
| 200 | - * (must free this when deleting structure). |
| 201 | - * NULL means shadows haven't been allocated |
| 202 | - * yet. */ |
| 203 | - Pixmap shadow; /* Stipple pattern to use for drawing |
| 204 | - * shadows areas. Used for displays with |
| 205 | - * <= 64 colors or where colormap has filled |
| 206 | - * up. */ |
| 207 | - GC bgGC; /* Used (if necessary) to draw areas in |
| 208 | - * the background color. */ |
| 209 | - GC darkGC; /* Used to draw darker parts of the |
| 210 | - * border. None means the shadow colors |
| 211 | - * haven't been allocated yet.*/ |
| 212 | - GC lightGC; /* Used to draw lighter parts of |
| 213 | - * the border. None means the shadow colors |
| 214 | - * haven't been allocated yet. */ |
| 215 | - Tcl_HashEntry *hashPtr; /* Entry in borderTable (needed in |
| 216 | - * order to delete structure). */ |
| 217 | - struct TkBorderStruct *nextPtr; /* Points to the next TkBorder structure with |
| 218 | - * the same color name. Borders with the |
| 219 | - * same name but different screens or |
| 220 | - * colormaps are chained together off a |
| 221 | - * single entry in borderTable. */ |
| 222 | -} TkBorder; |
| 223 | +#include <tkInt.h> |
| 224 | +#include <tk3d.h> |
| 225 | +#include <tkFont.h> |
| 226 | |
| 227 | #endif /* BLT_TKINT_H */ |
| 228 | --- a/generic/bltWindow.c |
| 229 | +++ b/generic/bltWindow.c |
| 230 | @@ -33,25 +33,7 @@ |
| 231 | #include <X11/Xproto.h> |
| 232 | #endif |
| 233 | |
| 234 | -typedef struct TkIdStackStruct TkIdStack; |
| 235 | -typedef struct TkErrorHandlerStruct TkErrorHandler; |
| 236 | -typedef struct TkSelectionInfoStruct TkSelectionInfo; |
| 237 | -typedef struct TkClipboardTargetStruct TkClipboardTarget; |
| 238 | - |
| 239 | -#ifndef WIN32 |
| 240 | -typedef struct TkWindowStruct TkWindow; |
| 241 | -#endif |
| 242 | -typedef struct TkWindowEventStruct TkWindowEvent; |
| 243 | -typedef struct TkMainInfoStruct TkMainInfo; |
| 244 | -typedef struct TkEventHandlerStruct TkEventHandler; |
| 245 | -typedef struct TkSelHandlerStruct TkSelHandler; |
| 246 | -typedef struct TkWinInfoStruct TkWinInfo; |
| 247 | -typedef struct TkClassProcsStruct TkClassProcs; |
| 248 | -typedef struct TkWindowPrivateStruct TkWindowPrivate; |
| 249 | -typedef struct TkGrabEventStruct TkGrabEvent; |
| 250 | -typedef struct TkColormapStruct TkColormap; |
| 251 | -typedef struct TkStressedCmapStruct TkStressedCmap; |
| 252 | -typedef struct TkWmInfoStruct TkWmInfo; |
| 253 | +#include <tkInt.h> |
| 254 | |
| 255 | #ifdef XNQueryInputStyle |
| 256 | #define TK_USE_INPUT_METHODS |
| 257 | @@ -70,766 +52,6 @@ |
| 258 | #define TK_REPARENTED 0 |
| 259 | #endif |
| 260 | |
| 261 | -#if (TK_VERSION_NUMBER >= _VERSION(8,1,0)) |
| 262 | - |
| 263 | -typedef struct TkCaret { |
| 264 | - struct TkWindow *winPtr; /* the window on which we requested caret |
| 265 | - * placement */ |
| 266 | - int x; /* relative x coord of the caret */ |
| 267 | - int y; /* relative y coord of the caret */ |
| 268 | - int height; /* specified height of the window */ |
| 269 | -} TkCaret; |
| 270 | - |
| 271 | -/* |
| 272 | - * One of the following structures is maintained for each display |
| 273 | - * containing a window managed by Tk. In part, the structure is |
| 274 | - * used to store thread-specific data, since each thread will have |
| 275 | - * its own TkDisplay structure. |
| 276 | - */ |
| 277 | - |
| 278 | -typedef struct TkDisplayStruct { |
| 279 | - Display *display; /* Xlib's info about display. */ |
| 280 | - struct TkDisplayStruct *nextPtr; /* Next in list of all displays. */ |
| 281 | - char *name; /* Name of display (with any screen |
| 282 | - * identifier removed). Malloc-ed. */ |
| 283 | - Time lastEventTime; /* Time of last event received for this |
| 284 | - * display. */ |
| 285 | - |
| 286 | - /* |
| 287 | - * Information used primarily by tk3d.c: |
| 288 | - */ |
| 289 | - |
| 290 | - int borderInit; /* 0 means borderTable needs initializing. */ |
| 291 | - Tcl_HashTable borderTable; /* Maps from color name to TkBorder |
| 292 | - * structure. */ |
| 293 | - |
| 294 | - /* |
| 295 | - * Information used by tkAtom.c only: |
| 296 | - */ |
| 297 | - |
| 298 | - int atomInit; /* 0 means stuff below hasn't been |
| 299 | - * initialized yet. */ |
| 300 | - Tcl_HashTable nameTable; /* Maps from names to Atom's. */ |
| 301 | - Tcl_HashTable atomTable; /* Maps from Atom's back to names. */ |
| 302 | - |
| 303 | - /* |
| 304 | - * Information used primarily by tkBind.c: |
| 305 | - */ |
| 306 | - |
| 307 | - int bindInfoStale; /* Non-zero means the variables in this |
| 308 | - * part of the structure are potentially |
| 309 | - * incorrect and should be recomputed. */ |
| 310 | - unsigned int modeModMask; /* Has one bit set to indicate the modifier |
| 311 | - * corresponding to "mode shift". If no |
| 312 | - * such modifier, than this is zero. */ |
| 313 | - unsigned int metaModMask; /* Has one bit set to indicate the modifier |
| 314 | - * corresponding to the "Meta" key. If no |
| 315 | - * such modifier, then this is zero. */ |
| 316 | - unsigned int altModMask; /* Has one bit set to indicate the modifier |
| 317 | - * corresponding to the "Meta" key. If no |
| 318 | - * such modifier, then this is zero. */ |
| 319 | - enum { |
| 320 | - LU_IGNORE, LU_CAPS, LU_SHIFT |
| 321 | - } lockUsage; /* Indicates how to interpret lock modifier. */ |
| 322 | - int numModKeyCodes; /* Number of entries in modKeyCodes array |
| 323 | - * below. */ |
| 324 | - KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for |
| 325 | - * all of the keys that have modifiers |
| 326 | - * associated with them. Malloc'ed, but |
| 327 | - * may be NULL. */ |
| 328 | - |
| 329 | - /* |
| 330 | - * Information used by tkBitmap.c only: |
| 331 | - */ |
| 332 | - |
| 333 | - int bitmapInit; /* 0 means tables above need initializing. */ |
| 334 | - int bitmapAutoNumber; /* Used to number bitmaps. */ |
| 335 | - Tcl_HashTable bitmapNameTable; |
| 336 | - /* Maps from name of bitmap to the first |
| 337 | - * TkBitmap record for that name. */ |
| 338 | - Tcl_HashTable bitmapIdTable;/* Maps from bitmap id to the TkBitmap |
| 339 | - * structure for the bitmap. */ |
| 340 | - Tcl_HashTable bitmapDataTable; |
| 341 | - /* Used by Tk_GetBitmapFromData to map from |
| 342 | - * a collection of in-core data about a |
| 343 | - * bitmap to a reference giving an auto- |
| 344 | - * matically-generated name for the bitmap. */ |
| 345 | - |
| 346 | - /* |
| 347 | - * Information used by tkCanvas.c only: |
| 348 | - */ |
| 349 | - |
| 350 | - int numIdSearches; |
| 351 | - int numSlowSearches; |
| 352 | - |
| 353 | - /* |
| 354 | - * Used by tkColor.c only: |
| 355 | - */ |
| 356 | - |
| 357 | - int colorInit; /* 0 means color module needs initializing. */ |
| 358 | - TkStressedCmap *stressPtr; /* First in list of colormaps that have |
| 359 | - * filled up, so we have to pick an |
| 360 | - * approximate color. */ |
| 361 | - Tcl_HashTable colorNameTable; |
| 362 | - /* Maps from color name to TkColor structure |
| 363 | - * for that color. */ |
| 364 | - Tcl_HashTable colorValueTable; |
| 365 | - /* Maps from integer RGB values to TkColor |
| 366 | - * structures. */ |
| 367 | - |
| 368 | - /* |
| 369 | - * Used by tkCursor.c only: |
| 370 | - */ |
| 371 | - |
| 372 | - int cursorInit; /* 0 means cursor module need initializing. */ |
| 373 | - Tcl_HashTable cursorNameTable; |
| 374 | - /* Maps from a string name to a cursor to the |
| 375 | - * TkCursor record for the cursor. */ |
| 376 | - Tcl_HashTable cursorDataTable; |
| 377 | - /* Maps from a collection of in-core data |
| 378 | - * about a cursor to a TkCursor structure. */ |
| 379 | - Tcl_HashTable cursorIdTable; |
| 380 | - /* Maps from a cursor id to the TkCursor |
| 381 | - * structure for the cursor. */ |
| 382 | - char cursorString[20]; /* Used to store a cursor id string. */ |
| 383 | - Font cursorFont; /* Font to use for standard cursors. |
| 384 | - * None means font not loaded yet. */ |
| 385 | - |
| 386 | - /* |
| 387 | - * Information used by tkError.c only: |
| 388 | - */ |
| 389 | - |
| 390 | - struct TkErrorHandler *errorPtr; |
| 391 | - /* First in list of error handlers |
| 392 | - * for this display. NULL means |
| 393 | - * no handlers exist at present. */ |
| 394 | - int deleteCount; /* Counts # of handlers deleted since |
| 395 | - * last time inactive handlers were |
| 396 | - * garbage-collected. When this number |
| 397 | - * gets big, handlers get cleaned up. */ |
| 398 | - |
| 399 | - /* |
| 400 | - * Used by tkEvent.c only: |
| 401 | - */ |
| 402 | - |
| 403 | - struct TkWindowEvent *delayedMotionPtr; |
| 404 | - /* Points to a malloc-ed motion event |
| 405 | - * whose processing has been delayed in |
| 406 | - * the hopes that another motion event |
| 407 | - * will come along right away and we can |
| 408 | - * merge the two of them together. NULL |
| 409 | - * means that there is no delayed motion |
| 410 | - * event. */ |
| 411 | - |
| 412 | - /* |
| 413 | - * Information used by tkFocus.c only: |
| 414 | - */ |
| 415 | - |
| 416 | - int focusDebug; /* 1 means collect focus debugging |
| 417 | - * statistics. */ |
| 418 | - struct TkWindow *implicitWinPtr; |
| 419 | - /* If the focus arrived at a toplevel window |
| 420 | - * implicitly via an Enter event (rather |
| 421 | - * than via a FocusIn event), this points |
| 422 | - * to the toplevel window. Otherwise it is |
| 423 | - * NULL. */ |
| 424 | - struct TkWindow *focusPtr; /* Points to the window on this display that |
| 425 | - * should be receiving keyboard events. When |
| 426 | - * multiple applications on the display have |
| 427 | - * the focus, this will refer to the |
| 428 | - * innermost window in the innermost |
| 429 | - * application. This information isn't used |
| 430 | - * under Unix or Windows, but it's needed on |
| 431 | - * the Macintosh. */ |
| 432 | - |
| 433 | - /* |
| 434 | - * Information used by tkGC.c only: |
| 435 | - */ |
| 436 | - |
| 437 | - Tcl_HashTable gcValueTable; /* Maps from a GC's values to a TkGC structure |
| 438 | - * describing a GC with those values. */ |
| 439 | - Tcl_HashTable gcIdTable; /* Maps from a GC to a TkGC. */ |
| 440 | - int gcInit; /* 0 means the tables below need |
| 441 | - * initializing. */ |
| 442 | - |
| 443 | - /* |
| 444 | - * Information used by tkGeometry.c only: |
| 445 | - */ |
| 446 | - |
| 447 | - Tcl_HashTable maintainHashTable; |
| 448 | - /* Hash table that maps from a master's |
| 449 | - * Tk_Window token to a list of slaves |
| 450 | - * managed by that master. */ |
| 451 | - int geomInit; |
| 452 | - |
| 453 | - /* |
| 454 | - * Information used by tkGet.c only: |
| 455 | - */ |
| 456 | - |
| 457 | - Tcl_HashTable uidTable; /* Stores all Tk_Uids used in a thread. */ |
| 458 | - int uidInit; /* 0 means uidTable needs initializing. */ |
| 459 | - |
| 460 | - /* |
| 461 | - * Information used by tkGrab.c only: |
| 462 | - */ |
| 463 | - |
| 464 | - struct TkWindow *grabWinPtr; |
| 465 | - /* Window in which the pointer is currently |
| 466 | - * grabbed, or NULL if none. */ |
| 467 | - struct TkWindow *eventualGrabWinPtr; |
| 468 | - /* Value that grabWinPtr will have once the |
| 469 | - * grab event queue (below) has been |
| 470 | - * completely emptied. */ |
| 471 | - struct TkWindow *buttonWinPtr; |
| 472 | - /* Window in which first mouse button was |
| 473 | - * pressed while grab was in effect, or NULL |
| 474 | - * if no such press in effect. */ |
| 475 | - struct TkWindow *serverWinPtr; |
| 476 | - /* If no application contains the pointer then |
| 477 | - * this is NULL. Otherwise it contains the |
| 478 | - * last window for which we've gotten an |
| 479 | - * Enter or Leave event from the server (i.e. |
| 480 | - * the last window known to have contained |
| 481 | - * the pointer). Doesn't reflect events |
| 482 | - * that were synthesized in tkGrab.c. */ |
| 483 | - TkGrabEvent *firstGrabEventPtr; |
| 484 | - /* First in list of enter/leave events |
| 485 | - * synthesized by grab code. These events |
| 486 | - * must be processed in order before any other |
| 487 | - * events are processed. NULL means no such |
| 488 | - * events. */ |
| 489 | - TkGrabEvent *lastGrabEventPtr; |
| 490 | - /* Last in list of synthesized events, or NULL |
| 491 | - * if list is empty. */ |
| 492 | - int grabFlags; /* Miscellaneous flag values. See definitions |
| 493 | - * in tkGrab.c. */ |
| 494 | - |
| 495 | - /* |
| 496 | - * Information used by tkGrid.c only: |
| 497 | - */ |
| 498 | - |
| 499 | - int gridInit; /* 0 means table below needs initializing. */ |
| 500 | - Tcl_HashTable gridHashTable;/* Maps from Tk_Window tokens to |
| 501 | - * corresponding Grid structures. */ |
| 502 | - |
| 503 | - /* |
| 504 | - * Information used by tkImage.c only: |
| 505 | - */ |
| 506 | - |
| 507 | - int imageId; /* Value used to number image ids. */ |
| 508 | - |
| 509 | - /* |
| 510 | - * Information used by tkMacWinMenu.c only: |
| 511 | - */ |
| 512 | - |
| 513 | - int postCommandGeneration; |
| 514 | - |
| 515 | - /* |
| 516 | - * Information used by tkOption.c only. |
| 517 | - */ |
| 518 | - |
| 519 | - |
| 520 | - |
| 521 | - /* |
| 522 | - * Information used by tkPack.c only. |
| 523 | - */ |
| 524 | - |
| 525 | - int packInit; /* 0 means table below needs initializing. */ |
| 526 | - Tcl_HashTable packerHashTable; |
| 527 | - /* Maps from Tk_Window tokens to |
| 528 | - * corresponding Packer structures. */ |
| 529 | - |
| 530 | - |
| 531 | - /* |
| 532 | - * Information used by tkPlace.c only. |
| 533 | - */ |
| 534 | - |
| 535 | - int placeInit; /* 0 means tables below need initializing. */ |
| 536 | - Tcl_HashTable masterTable; /* Maps from Tk_Window toke to the Master |
| 537 | - * structure for the window, if it exists. */ |
| 538 | - Tcl_HashTable slaveTable; /* Maps from Tk_Window toke to the Slave |
| 539 | - * structure for the window, if it exists. */ |
| 540 | - |
| 541 | - /* |
| 542 | - * Information used by tkSelect.c and tkClipboard.c only: |
| 543 | - */ |
| 544 | - |
| 545 | - |
| 546 | - struct TkSelectionInfo *selectionInfoPtr; |
| 547 | - /* First in list of selection information |
| 548 | - * records. Each entry contains information |
| 549 | - * about the current owner of a particular |
| 550 | - * selection on this display. */ |
| 551 | - Atom multipleAtom; /* Atom for MULTIPLE. None means |
| 552 | - * selection stuff isn't initialized. */ |
| 553 | - Atom incrAtom; /* Atom for INCR. */ |
| 554 | - Atom targetsAtom; /* Atom for TARGETS. */ |
| 555 | - Atom timestampAtom; /* Atom for TIMESTAMP. */ |
| 556 | - Atom textAtom; /* Atom for TEXT. */ |
| 557 | - Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ |
| 558 | - Atom applicationAtom; /* Atom for TK_APPLICATION. */ |
| 559 | - Atom windowAtom; /* Atom for TK_WINDOW. */ |
| 560 | - Atom clipboardAtom; /* Atom for CLIPBOARD. */ |
| 561 | -#if (TK_VERSION_NUMBER >= _VERSION(8,4,0)) |
| 562 | - Atom utf8Atom; |
| 563 | -#endif |
| 564 | - Tk_Window clipWindow; /* Window used for clipboard ownership and to |
| 565 | - * retrieve selections between processes. NULL |
| 566 | - * means clipboard info hasn't been |
| 567 | - * initialized. */ |
| 568 | - int clipboardActive; /* 1 means we currently own the clipboard |
| 569 | - * selection, 0 means we don't. */ |
| 570 | - struct TkMainInfo *clipboardAppPtr; |
| 571 | - /* Last application that owned clipboard. */ |
| 572 | - struct TkClipboardTarget *clipTargetPtr; |
| 573 | - /* First in list of clipboard type information |
| 574 | - * records. Each entry contains information |
| 575 | - * about the buffers for a given selection |
| 576 | - * target. */ |
| 577 | - |
| 578 | - /* |
| 579 | - * Information used by tkSend.c only: |
| 580 | - */ |
| 581 | - |
| 582 | - Tk_Window commTkwin; /* Window used for communication |
| 583 | - * between interpreters during "send" |
| 584 | - * commands. NULL means send info hasn't |
| 585 | - * been initialized yet. */ |
| 586 | - Atom commProperty; /* X's name for comm property. */ |
| 587 | - Atom registryProperty; /* X's name for property containing |
| 588 | - * registry of interpreter names. */ |
| 589 | - Atom appNameProperty; /* X's name for property used to hold the |
| 590 | - * application name on each comm window. */ |
| 591 | - |
| 592 | - /* |
| 593 | - * Information used by tkXId.c only: |
| 594 | - */ |
| 595 | - |
| 596 | - struct TkIdStack *idStackPtr; |
| 597 | - /* First in list of chunks of free resource |
| 598 | - * identifiers, or NULL if there are no free |
| 599 | - * resources. */ |
| 600 | - XID(*defaultAllocProc) _ANSI_ARGS_((Display *display)); |
| 601 | - /* Default resource allocator for display. */ |
| 602 | - struct TkIdStack *windowStackPtr; |
| 603 | - /* First in list of chunks of window |
| 604 | - * identifers that can't be reused right |
| 605 | - * now. */ |
| 606 | -#if (TK_VERSION_NUMBER < _VERSION(8,4,0)) |
| 607 | - int idCleanupScheduled; /* 1 means a call to WindowIdCleanup has |
| 608 | - * already been scheduled, 0 means it |
| 609 | - * hasn't. */ |
| 610 | -#else |
| 611 | - Tcl_TimerToken idCleanupScheduled; |
| 612 | - /* If set, it means a call to WindowIdCleanup |
| 613 | - * has already been scheduled, 0 means it |
| 614 | - * hasn't. */ |
| 615 | -#endif |
| 616 | - /* |
| 617 | - * Information used by tkUnixWm.c and tkWinWm.c only: |
| 618 | - */ |
| 619 | - |
| 620 | -#if (TK_VERSION_NUMBER < _VERSION(8,4,0)) |
| 621 | - int wmTracing; /* Used to enable or disable tracing in |
| 622 | - * this module. If tracing is enabled, |
| 623 | - * then information is printed on |
| 624 | - * standard output about interesting |
| 625 | - * interactions with the window manager. */ |
| 626 | -#endif |
| 627 | - struct TkWmInfo *firstWmPtr; /* Points to first top-level window. */ |
| 628 | - struct TkWmInfo *foregroundWmPtr; |
| 629 | - /* Points to the foreground window. */ |
| 630 | - |
| 631 | - /* |
| 632 | - * Information maintained by tkWindow.c for use later on by tkXId.c: |
| 633 | - */ |
| 634 | - |
| 635 | - |
| 636 | - int destroyCount; /* Number of Tk_DestroyWindow operations |
| 637 | - * in progress. */ |
| 638 | - unsigned long lastDestroyRequest; |
| 639 | - /* Id of most recent XDestroyWindow request; |
| 640 | - * can re-use ids in windowStackPtr when |
| 641 | - * server has seen this request and event |
| 642 | - * queue is empty. */ |
| 643 | - |
| 644 | - /* |
| 645 | - * Information used by tkVisual.c only: |
| 646 | - */ |
| 647 | - |
| 648 | - TkColormap *cmapPtr; /* First in list of all non-default colormaps |
| 649 | - * allocated for this display. */ |
| 650 | - |
| 651 | - /* |
| 652 | - * Miscellaneous information: |
| 653 | - */ |
| 654 | - |
| 655 | -#ifdef TK_USE_INPUT_METHODS |
| 656 | - XIM inputMethod; /* Input method for this display */ |
| 657 | - XIMStyle inputStyle; /* Input style selected for this display. */ |
| 658 | -#if (TK_VERSION_NUMBER >= _VERSION(8,4,0)) |
| 659 | -#if TK_XIM_SPOT |
| 660 | - XFontSet inputXfs; /* XFontSet cached for over-the-spot XIM. */ |
| 661 | -#endif /* TK_XIM_SPOT */ |
| 662 | -#endif /* TK_VERSION_NUMBER >= 8.4 */ |
| 663 | -#endif /* TK_USE_INPUT_METHODS */ |
| 664 | - Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */ |
| 665 | - int refCount; /* Reference count of how many Tk applications |
| 666 | - * are using this display. Used to clean up |
| 667 | - * the display when we no longer have any |
| 668 | - * Tk applications using it. |
| 669 | - */ |
| 670 | - /* |
| 671 | - * The following field were all added for Tk8.3 |
| 672 | - */ |
| 673 | - int mouseButtonState; /* current mouse button state for this |
| 674 | - * display */ |
| 675 | - Window mouseButtonWindow; /* Window the button state was set in, added |
| 676 | - * in Tk 8.4. */ |
| 677 | -#if (TK_VERSION_NUMBER < _VERSION(8,4,0)) |
| 678 | - int warpInProgress; |
| 679 | -#endif |
| 680 | - Window warpWindow; |
| 681 | - int warpX; |
| 682 | - int warpY; |
| 683 | -#if (TK_VERSION_NUMBER < _VERSION(8,4,0)) |
| 684 | - int useInputMethods; /* Whether to use input methods */ |
| 685 | -#else |
| 686 | - /* |
| 687 | - * The following field(s) were all added for Tk8.4 |
| 688 | - */ |
| 689 | -/* long deletionEpoch; * Incremented by window deletions */ |
| 690 | - unsigned int flags; /* Various flag values: these are all |
| 691 | - * defined in below. */ |
| 692 | - TkCaret caret; /* information about the caret for this |
| 693 | - * display. This is not a pointer. */ |
| 694 | - |
| 695 | - int iconDataSize; /* Size of default iconphoto image data. */ |
| 696 | - unsigned char *iconDataPtr; /* Default iconphoto image data, if set. */ |
| 697 | - |
| 698 | -#endif |
| 699 | -} TkDisplay; |
| 700 | - |
| 701 | -#else |
| 702 | - |
| 703 | -/* |
| 704 | - * One of the following structures is maintained for each display |
| 705 | - * containing a window managed by Tk: |
| 706 | - */ |
| 707 | -typedef struct TkDisplayStruct { |
| 708 | - Display *display; /* Xlib's info about display. */ |
| 709 | - struct TkDisplayStruct *nextPtr; /* Next in list of all displays. */ |
| 710 | - char *name; /* Name of display (with any screen |
| 711 | - * identifier removed). Malloc-ed. */ |
| 712 | - Time lastEventTime; /* Time of last event received for this |
| 713 | - * display. */ |
| 714 | - |
| 715 | - /* |
| 716 | - * Information used primarily by tkBind.c: |
| 717 | - */ |
| 718 | - |
| 719 | - int bindInfoStale; /* Non-zero means the variables in this |
| 720 | - * part of the structure are potentially |
| 721 | - * incorrect and should be recomputed. */ |
| 722 | - unsigned int modeModMask; /* Has one bit set to indicate the modifier |
| 723 | - * corresponding to "mode shift". If no |
| 724 | - * such modifier, than this is zero. */ |
| 725 | - unsigned int metaModMask; /* Has one bit set to indicate the modifier |
| 726 | - * corresponding to the "Meta" key. If no |
| 727 | - * such modifier, then this is zero. */ |
| 728 | - unsigned int altModMask; /* Has one bit set to indicate the modifier |
| 729 | - * corresponding to the "Meta" key. If no |
| 730 | - * such modifier, then this is zero. */ |
| 731 | - enum { |
| 732 | - LU_IGNORE, LU_CAPS, LU_SHIFT |
| 733 | - } lockUsage; |
| 734 | - /* Indicates how to interpret lock modifier. */ |
| 735 | - int numModKeyCodes; /* Number of entries in modKeyCodes array |
| 736 | - * below. */ |
| 737 | - KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for |
| 738 | - * all of the keys that have modifiers |
| 739 | - * associated with them. Malloc'ed, but |
| 740 | - * may be NULL. */ |
| 741 | - |
| 742 | - /* |
| 743 | - * Information used by tkError.c only: |
| 744 | - */ |
| 745 | - |
| 746 | - TkErrorHandler *errorPtr; |
| 747 | - /* First in list of error handlers |
| 748 | - * for this display. NULL means |
| 749 | - * no handlers exist at present. */ |
| 750 | - int deleteCount; /* Counts # of handlers deleted since |
| 751 | - * last time inactive handlers were |
| 752 | - * garbage-collected. When this number |
| 753 | - * gets big, handlers get cleaned up. */ |
| 754 | - |
| 755 | - /* |
| 756 | - * Information used by tkSend.c only: |
| 757 | - */ |
| 758 | - |
| 759 | - Tk_Window commTkwin; /* Window used for communication |
| 760 | - * between interpreters during "send" |
| 761 | - * commands. NULL means send info hasn't |
| 762 | - * been initialized yet. */ |
| 763 | - Atom commProperty; /* X's name for comm property. */ |
| 764 | - Atom registryProperty; /* X's name for property containing |
| 765 | - * registry of interpreter names. */ |
| 766 | - Atom appNameProperty; /* X's name for property used to hold the |
| 767 | - * application name on each comm window. */ |
| 768 | - |
| 769 | - /* |
| 770 | - * Information used by tkSelect.c and tkClipboard.c only: |
| 771 | - */ |
| 772 | - |
| 773 | - TkSelectionInfo *selectionInfoPtr; |
| 774 | - /* First in list of selection information |
| 775 | - * records. Each entry contains information |
| 776 | - * about the current owner of a particular |
| 777 | - * selection on this display. */ |
| 778 | - Atom multipleAtom; /* Atom for MULTIPLE. None means |
| 779 | - * selection stuff isn't initialized. */ |
| 780 | - Atom incrAtom; /* Atom for INCR. */ |
| 781 | - Atom targetsAtom; /* Atom for TARGETS. */ |
| 782 | - Atom timestampAtom; /* Atom for TIMESTAMP. */ |
| 783 | - Atom textAtom; /* Atom for TEXT. */ |
| 784 | - Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ |
| 785 | - Atom applicationAtom; /* Atom for TK_APPLICATION. */ |
| 786 | - Atom windowAtom; /* Atom for TK_WINDOW. */ |
| 787 | - Atom clipboardAtom; /* Atom for CLIPBOARD. */ |
| 788 | - |
| 789 | - Tk_Window clipWindow; /* Window used for clipboard ownership and to |
| 790 | - * retrieve selections between processes. NULL |
| 791 | - * means clipboard info hasn't been |
| 792 | - * initialized. */ |
| 793 | - int clipboardActive; /* 1 means we currently own the clipboard |
| 794 | - * selection, 0 means we don't. */ |
| 795 | - TkMainInfo *clipboardAppPtr; |
| 796 | - /* Last application that owned clipboard. */ |
| 797 | - TkClipboardTarget *clipTargetPtr; |
| 798 | - /* First in list of clipboard type information |
| 799 | - * records. Each entry contains information |
| 800 | - * about the buffers for a given selection |
| 801 | - * target. */ |
| 802 | - |
| 803 | - /* |
| 804 | - * Information used by tkAtom.c only: |
| 805 | - */ |
| 806 | - |
| 807 | - int atomInit; /* 0 means stuff below hasn't been |
| 808 | - * initialized yet. */ |
| 809 | - Tcl_HashTable nameTable; /* Maps from names to Atom's. */ |
| 810 | - Tcl_HashTable atomTable; /* Maps from Atom's back to names. */ |
| 811 | - |
| 812 | - /* |
| 813 | - * Information used by tkCursor.c only: |
| 814 | - */ |
| 815 | - |
| 816 | - Font cursorFont; /* Font to use for standard cursors. |
| 817 | - * None means font not loaded yet. */ |
| 818 | - |
| 819 | - /* |
| 820 | - * Information used by tkGrab.c only: |
| 821 | - */ |
| 822 | - |
| 823 | - TkWindow *grabWinPtr; |
| 824 | - /* Window in which the pointer is currently |
| 825 | - * grabbed, or NULL if none. */ |
| 826 | - TkWindow *eventualGrabWinPtr; |
| 827 | - /* Value that grabWinPtr will have once the |
| 828 | - * grab event queue (below) has been |
| 829 | - * completely emptied. */ |
| 830 | - TkWindow *buttonWinPtr; |
| 831 | - /* Window in which first mouse button was |
| 832 | - * pressed while grab was in effect, or NULL |
| 833 | - * if no such press in effect. */ |
| 834 | - TkWindow *serverWinPtr; |
| 835 | - /* If no application contains the pointer then |
| 836 | - * this is NULL. Otherwise it contains the |
| 837 | - * last window for which we've gotten an |
| 838 | - * Enter or Leave event from the server (i.e. |
| 839 | - * the last window known to have contained |
| 840 | - * the pointer). Doesn't reflect events |
| 841 | - * that were synthesized in tkGrab.c. */ |
| 842 | - TkGrabEvent *firstGrabEventPtr; |
| 843 | - /* First in list of enter/leave events |
| 844 | - * synthesized by grab code. These events |
| 845 | - * must be processed in order before any other |
| 846 | - * events are processed. NULL means no such |
| 847 | - * events. */ |
| 848 | - TkGrabEvent *lastGrabEventPtr; |
| 849 | - /* Last in list of synthesized events, or NULL |
| 850 | - * if list is empty. */ |
| 851 | - int grabFlags; /* Miscellaneous flag values. See definitions |
| 852 | - * in tkGrab.c. */ |
| 853 | - |
| 854 | - /* |
| 855 | - * Information used by tkXId.c only: |
| 856 | - */ |
| 857 | - |
| 858 | - TkIdStack *idStackPtr; |
| 859 | - /* First in list of chunks of free resource |
| 860 | - * identifiers, or NULL if there are no free |
| 861 | - * resources. */ |
| 862 | - XID(*defaultAllocProc) _ANSI_ARGS_((Display *display)); |
| 863 | - /* Default resource allocator for display. */ |
| 864 | - TkIdStack *windowStackPtr; |
| 865 | - /* First in list of chunks of window |
| 866 | - * identifers that can't be reused right |
| 867 | - * now. */ |
| 868 | - int idCleanupScheduled; /* 1 means a call to WindowIdCleanup has |
| 869 | - * already been scheduled, 0 means it |
| 870 | - * hasn't. */ |
| 871 | - |
| 872 | - /* |
| 873 | - * Information maintained by tkWindow.c for use later on by tkXId.c: |
| 874 | - */ |
| 875 | - |
| 876 | - |
| 877 | - int destroyCount; /* Number of Tk_DestroyWindow operations |
| 878 | - * in progress. */ |
| 879 | - unsigned long lastDestroyRequest; |
| 880 | - /* Id of most recent XDestroyWindow request; |
| 881 | - * can re-use ids in windowStackPtr when |
| 882 | - * server has seen this request and event |
| 883 | - * queue is empty. */ |
| 884 | - |
| 885 | - /* |
| 886 | - * Information used by tkVisual.c only: |
| 887 | - */ |
| 888 | - |
| 889 | - TkColormap *cmapPtr; /* First in list of all non-default colormaps |
| 890 | - * allocated for this display. */ |
| 891 | - |
| 892 | - /* |
| 893 | - * Information used by tkFocus.c only: |
| 894 | - */ |
| 895 | -#if (TK_MAJOR_VERSION == 4) |
| 896 | - |
| 897 | - TkWindow *focusWinPtr; |
| 898 | - /* Window that currently has the focus for |
| 899 | - * this display, or NULL if none. */ |
| 900 | - TkWindow *implicitWinPtr; |
| 901 | - /* If the focus arrived at a toplevel window |
| 902 | - * implicitly via an Enter event (rather |
| 903 | - * than via a FocusIn event), this points |
| 904 | - * to the toplevel window. Otherwise it is |
| 905 | - * NULL. */ |
| 906 | - TkWindow *focusOnMapPtr; |
| 907 | - /* This points to a toplevel window that is |
| 908 | - * supposed to receive the X input focus as |
| 909 | - * soon as it is mapped (needed to handle the |
| 910 | - * fact that X won't allow the focus on an |
| 911 | - * unmapped window). NULL means no delayed |
| 912 | - * focus op in progress. */ |
| 913 | - int forceFocus; /* Associated with focusOnMapPtr: non-zero |
| 914 | - * means claim the focus even if some other |
| 915 | - * application currently has it. */ |
| 916 | -#else |
| 917 | - TkWindow *implicitWinPtr; |
| 918 | - /* If the focus arrived at a toplevel window |
| 919 | - * implicitly via an Enter event (rather |
| 920 | - * than via a FocusIn event), this points |
| 921 | - * to the toplevel window. Otherwise it is |
| 922 | - * NULL. */ |
| 923 | - TkWindow *focusPtr; /* Points to the window on this display that |
| 924 | - * should be receiving keyboard events. When |
| 925 | - * multiple applications on the display have |
| 926 | - * the focus, this will refer to the |
| 927 | - * innermost window in the innermost |
| 928 | - * application. This information isn't used |
| 929 | - * under Unix or Windows, but it's needed on |
| 930 | - * the Macintosh. */ |
| 931 | -#endif /* TK_MAJOR_VERSION == 4 */ |
| 932 | - |
| 933 | - /* |
| 934 | - * Used by tkColor.c only: |
| 935 | - */ |
| 936 | - |
| 937 | - TkStressedCmap *stressPtr; /* First in list of colormaps that have |
| 938 | - * filled up, so we have to pick an |
| 939 | - * approximate color. */ |
| 940 | - |
| 941 | - /* |
| 942 | - * Used by tkEvent.c only: |
| 943 | - */ |
| 944 | - |
| 945 | - TkWindowEvent *delayedMotionPtr; |
| 946 | - /* Points to a malloc-ed motion event |
| 947 | - * whose processing has been delayed in |
| 948 | - * the hopes that another motion event |
| 949 | - * will come along right away and we can |
| 950 | - * merge the two of them together. NULL |
| 951 | - * means that there is no delayed motion |
| 952 | - * event. */ |
| 953 | - /* |
| 954 | - * Miscellaneous information: |
| 955 | - */ |
| 956 | - |
| 957 | -#ifdef TK_USE_INPUT_METHODS |
| 958 | - XIM inputMethod; /* Input method for this display */ |
| 959 | -#endif /* TK_USE_INPUT_METHODS */ |
| 960 | - Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */ |
| 961 | -#if (TK_MAJOR_VERSION > 4) |
| 962 | - int refCount; /* Reference count of how many Tk applications |
| 963 | - * are using this display. Used to clean up |
| 964 | - * the display when we no longer have any |
| 965 | - * Tk applications using it. |
| 966 | - */ |
| 967 | -#endif /* TK_MAJOR_VERSION > 4 */ |
| 968 | - |
| 969 | -} TkDisplay; |
| 970 | - |
| 971 | -#endif /* TK_VERSION_NUMBER >= _VERSION(8,1,0) */ |
| 972 | - |
| 973 | - |
| 974 | -struct TkWindowStruct { |
| 975 | - Display *display; |
| 976 | - TkDisplay *dispPtr; |
| 977 | - int screenNum; |
| 978 | - Visual *visual; |
| 979 | - int depth; |
| 980 | - Window window; |
| 981 | - TkWindow *childList; |
| 982 | - TkWindow *lastChildPtr; |
| 983 | - TkWindow *parentPtr; |
| 984 | - TkWindow *nextPtr; |
| 985 | - TkMainInfo *infoPtr; |
| 986 | - char *pathName; |
| 987 | - Tk_Uid nameUid; |
| 988 | - Tk_Uid classUid; |
| 989 | - XWindowChanges changes; |
| 990 | - unsigned int dirtyChanges; |
| 991 | - XSetWindowAttributes atts; |
| 992 | - unsigned long dirtyAtts; |
| 993 | - unsigned int flags; |
| 994 | - TkEventHandler *handlerList; |
| 995 | -#ifdef TK_USE_INPUT_METHODS |
| 996 | - XIC inputContext; |
| 997 | -#endif /* TK_USE_INPUT_METHODS */ |
| 998 | - ClientData *tagPtr; |
| 999 | - int nTags; |
| 1000 | - int optionLevel; |
| 1001 | - TkSelHandler *selHandlerList; |
| 1002 | - Tk_GeomMgr *geomMgrPtr; |
| 1003 | - ClientData geomData; |
| 1004 | - int reqWidth, reqHeight; |
| 1005 | - int internalBorderWidth; |
| 1006 | - TkWinInfo *wmInfoPtr; |
| 1007 | -#if (TK_MAJOR_VERSION > 4) |
| 1008 | - TkClassProcs *classProcsPtr; |
| 1009 | - ClientData instanceData; |
| 1010 | -#endif |
| 1011 | - TkWindowPrivate *privatePtr; |
| 1012 | - int internalBorderRight; |
| 1013 | - int internalBorderTop; |
| 1014 | - int internalBorderBottom; |
| 1015 | - |
| 1016 | - int minReqWidth; |
| 1017 | - int minReqHeight; |
| 1018 | - |
| 1019 | -}; |
| 1020 | - |
| 1021 | #ifdef WIN32 |
| 1022 | /* |
| 1023 | *---------------------------------------------------------------------- |
| 1024 | --- a/generic/bltPs.c |
| 1025 | +++ b/generic/bltPs.c |
| 1026 | @@ -895,7 +895,7 @@ |
| 1027 | return; |
| 1028 | } |
| 1029 | if ((relief == TK_RELIEF_SOLID) || |
| 1030 | - (borderPtr->lightColor == NULL) || (borderPtr->darkColor == NULL)) { |
| 1031 | + (borderPtr->lightColorPtr == NULL) || (borderPtr->darkColorPtr == NULL)) { |
| 1032 | if (relief == TK_RELIEF_SOLID) { |
| 1033 | darkColor.red = darkColor.blue = darkColor.green = 0x00; |
| 1034 | lightColor.red = lightColor.blue = lightColor.green = 0x00; |
| 1035 | @@ -903,7 +903,7 @@ |
| 1036 | } else { |
| 1037 | Screen *screenPtr; |
| 1038 | |
| 1039 | - lightColor = *borderPtr->bgColor; |
| 1040 | + lightColor = *borderPtr->bgColorPtr; |
| 1041 | screenPtr = Tk_Screen(tokenPtr->tkwin); |
| 1042 | if (lightColor.pixel == WhitePixelOfScreen(screenPtr)) { |
| 1043 | darkColor.red = darkColor.blue = darkColor.green = 0x00; |
| 1044 | @@ -914,8 +914,8 @@ |
| 1045 | lightColorPtr = &lightColor; |
| 1046 | darkColorPtr = &darkColor; |
| 1047 | } else { |
| 1048 | - lightColorPtr = borderPtr->lightColor; |
| 1049 | - darkColorPtr = borderPtr->darkColor; |
| 1050 | + lightColorPtr = borderPtr->lightColorPtr; |
| 1051 | + darkColorPtr = borderPtr->darkColorPtr; |
| 1052 | } |
| 1053 | |
| 1054 | |
| 1055 | @@ -944,7 +944,7 @@ |
| 1056 | topColor = darkColorPtr; |
| 1057 | bottomColor = lightColorPtr; |
| 1058 | } else { |
| 1059 | - topColor = bottomColor = borderPtr->bgColor; |
| 1060 | + topColor = bottomColor = borderPtr->bgColorPtr; |
| 1061 | } |
| 1062 | Blt_BackgroundToPostScript(tokenPtr, bottomColor); |
| 1063 | Blt_RectangleToPostScript(tokenPtr, x, y + height - borderWidth, width, |
| 1064 | @@ -984,7 +984,7 @@ |
| 1065 | * Setting the pen color as foreground or background only affects |
| 1066 | * the plot when the colormode option is "monochrome". |
| 1067 | */ |
| 1068 | - Blt_BackgroundToPostScript(tokenPtr, borderPtr->bgColor); |
| 1069 | + Blt_BackgroundToPostScript(tokenPtr, borderPtr->bgColorPtr); |
| 1070 | Blt_RectangleToPostScript(tokenPtr, x, y, width, height); |
| 1071 | Blt_Draw3DRectangleToPostScript(tokenPtr, border, x, y, width, height, |
| 1072 | borderWidth, relief); |
| 1073 | --- a/generic/bltText.c |
| 1074 | +++ b/generic/bltText.c |
| 1075 | @@ -903,7 +903,7 @@ |
| 1076 | TkBorder *borderPtr = (TkBorder *) tsPtr->border; |
| 1077 | XColor *color1, *color2; |
| 1078 | |
| 1079 | - color1 = borderPtr->lightColor, color2 = borderPtr->darkColor; |
| 1080 | + color1 = borderPtr->lightColorPtr, color2 = borderPtr->darkColorPtr; |
| 1081 | if (tsPtr->state & STATE_EMPHASIS) { |
| 1082 | XColor *hold; |
| 1083 | |
| 1084 | @@ -968,7 +968,7 @@ |
| 1085 | TkBorder *borderPtr = (TkBorder *) tsPtr->border; |
| 1086 | XColor *color1, *color2; |
| 1087 | |
| 1088 | - color1 = borderPtr->lightColor, color2 = borderPtr->darkColor; |
| 1089 | + color1 = borderPtr->lightColorPtr, color2 = borderPtr->darkColorPtr; |
| 1090 | if (tsPtr->state & STATE_EMPHASIS) { |
| 1091 | XColor *hold; |
| 1092 | |
| 1093 | --- a/generic/tkFrame.c |
| 1094 | +++ b/generic/tkFrame.c |
| 1095 | @@ -116,7 +116,7 @@ |
| 1096 | int flags; /* Various flags; see below for |
| 1097 | * definitions. */ |
| 1098 | Blt_Tile tile; |
| 1099 | -} Frame; |
| 1100 | +} bltFrame; |
| 1101 | |
| 1102 | /* |
| 1103 | * Flag bits for frames: |
| 1104 | @@ -143,65 +143,65 @@ |
| 1105 | static Tk_ConfigSpec configSpecs[] = |
| 1106 | { |
| 1107 | {TK_CONFIG_BORDER, "-background", "background", "Background", |
| 1108 | - DEF_FRAME_BACKGROUND, Tk_Offset(Frame, border), |
| 1109 | + DEF_FRAME_BACKGROUND, Tk_Offset(bltFrame, border), |
| 1110 | BOTH | TK_CONFIG_COLOR_ONLY | TK_CONFIG_NULL_OK}, |
| 1111 | {TK_CONFIG_BORDER, "-background", "background", "Background", |
| 1112 | - DEF_FRAME_BG_MONO, Tk_Offset(Frame, border), |
| 1113 | + DEF_FRAME_BG_MONO, Tk_Offset(bltFrame, border), |
| 1114 | BOTH | TK_CONFIG_MONO_ONLY | TK_CONFIG_NULL_OK}, |
| 1115 | {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, |
| 1116 | (char *)NULL, 0, BOTH}, |
| 1117 | {TK_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, |
| 1118 | (char *)NULL, 0, BOTH}, |
| 1119 | {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", |
| 1120 | - DEF_FRAME_BORDERWIDTH, Tk_Offset(Frame, borderWidth), BOTH}, |
| 1121 | + DEF_FRAME_BORDERWIDTH, Tk_Offset(bltFrame, borderWidth), BOTH}, |
| 1122 | {TK_CONFIG_STRING, "-class", "class", "Class", |
| 1123 | - DEF_FRAME_CLASS, Tk_Offset(Frame, className), FRAME}, |
| 1124 | + DEF_FRAME_CLASS, Tk_Offset(bltFrame, className), FRAME}, |
| 1125 | {TK_CONFIG_STRING, "-class", "class", "Class", |
| 1126 | - DEF_TOPLEVEL_CLASS, Tk_Offset(Frame, className), TOPLEVEL}, |
| 1127 | + DEF_TOPLEVEL_CLASS, Tk_Offset(bltFrame, className), TOPLEVEL}, |
| 1128 | {TK_CONFIG_STRING, "-colormap", "colormap", "Colormap", |
| 1129 | - DEF_FRAME_COLORMAP, Tk_Offset(Frame, colormapName), |
| 1130 | + DEF_FRAME_COLORMAP, Tk_Offset(bltFrame, colormapName), |
| 1131 | BOTH | TK_CONFIG_NULL_OK}, |
| 1132 | #if (TK_MAJOR_VERSION > 4) |
| 1133 | {TK_CONFIG_BOOLEAN, "-container", "container", "Container", |
| 1134 | - DEF_FRAME_CONTAINER, Tk_Offset(Frame, isContainer), BOTH}, |
| 1135 | + DEF_FRAME_CONTAINER, Tk_Offset(bltFrame, isContainer), BOTH}, |
| 1136 | #endif /* TK_MAJOR_VERSION > 4 */ |
| 1137 | {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", |
| 1138 | - DEF_FRAME_CURSOR, Tk_Offset(Frame, cursor), BOTH | TK_CONFIG_NULL_OK}, |
| 1139 | + DEF_FRAME_CURSOR, Tk_Offset(bltFrame, cursor), BOTH | TK_CONFIG_NULL_OK}, |
| 1140 | {TK_CONFIG_PIXELS, "-height", "height", "Height", |
| 1141 | - DEF_FRAME_HEIGHT, Tk_Offset(Frame, height), BOTH}, |
| 1142 | + DEF_FRAME_HEIGHT, Tk_Offset(bltFrame, height), BOTH}, |
| 1143 | {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", |
| 1144 | "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, |
| 1145 | - Tk_Offset(Frame, highlightBgColorPtr), BOTH}, |
| 1146 | + Tk_Offset(bltFrame, highlightBgColorPtr), BOTH}, |
| 1147 | {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", |
| 1148 | - DEF_FRAME_HIGHLIGHT, Tk_Offset(Frame, highlightColorPtr), BOTH}, |
| 1149 | + DEF_FRAME_HIGHLIGHT, Tk_Offset(bltFrame, highlightColorPtr), BOTH}, |
| 1150 | {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", |
| 1151 | "HighlightThickness", |
| 1152 | - DEF_FRAME_HIGHLIGHT_WIDTH, Tk_Offset(Frame, highlightWidth), BOTH}, |
| 1153 | + DEF_FRAME_HIGHLIGHT_WIDTH, Tk_Offset(bltFrame, highlightWidth), BOTH}, |
| 1154 | #if (TK_MAJOR_VERSION > 4) |
| 1155 | {TK_CONFIG_STRING, "-menu", "menu", "Menu", |
| 1156 | - DEF_TOPLEVEL_MENU, Tk_Offset(Frame, menuName), |
| 1157 | + DEF_TOPLEVEL_MENU, Tk_Offset(bltFrame, menuName), |
| 1158 | TOPLEVEL | TK_CONFIG_NULL_OK}, |
| 1159 | #endif /* TK_MAJOR_VERSION > 4 */ |
| 1160 | {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", |
| 1161 | - DEF_FRAME_RELIEF, Tk_Offset(Frame, relief), BOTH}, |
| 1162 | + DEF_FRAME_RELIEF, Tk_Offset(bltFrame, relief), BOTH}, |
| 1163 | {TK_CONFIG_STRING, "-screen", "screen", "Screen", |
| 1164 | - DEF_TOPLEVEL_SCREEN, Tk_Offset(Frame, screenName), |
| 1165 | + DEF_TOPLEVEL_SCREEN, Tk_Offset(bltFrame, screenName), |
| 1166 | TOPLEVEL | TK_CONFIG_NULL_OK}, |
| 1167 | {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", |
| 1168 | - DEF_FRAME_TAKE_FOCUS, Tk_Offset(Frame, takeFocus), |
| 1169 | + DEF_FRAME_TAKE_FOCUS, Tk_Offset(bltFrame, takeFocus), |
| 1170 | BOTH | TK_CONFIG_NULL_OK}, |
| 1171 | {TK_CONFIG_CUSTOM, "-tile", "tile", "Tile", |
| 1172 | - (char *)NULL, Tk_Offset(Frame, tile), BOTH | TK_CONFIG_NULL_OK, |
| 1173 | + (char *)NULL, Tk_Offset(bltFrame, tile), BOTH | TK_CONFIG_NULL_OK, |
| 1174 | &bltTileOption}, |
| 1175 | #if (TK_MAJOR_VERSION > 4) |
| 1176 | {TK_CONFIG_STRING, "-use", "use", "Use", |
| 1177 | - DEF_FRAME_USE, Tk_Offset(Frame, useThis), TOPLEVEL|TK_CONFIG_NULL_OK}, |
| 1178 | + DEF_FRAME_USE, Tk_Offset(bltFrame, useThis), TOPLEVEL|TK_CONFIG_NULL_OK}, |
| 1179 | #endif |
| 1180 | {TK_CONFIG_STRING, "-visual", "visual", "Visual", |
| 1181 | - DEF_FRAME_VISUAL, Tk_Offset(Frame, visualName), |
| 1182 | + DEF_FRAME_VISUAL, Tk_Offset(bltFrame, visualName), |
| 1183 | BOTH | TK_CONFIG_NULL_OK}, |
| 1184 | {TK_CONFIG_PIXELS, "-width", "width", "Width", |
| 1185 | - DEF_FRAME_WIDTH, Tk_Offset(Frame, width), BOTH}, |
| 1186 | + DEF_FRAME_WIDTH, Tk_Offset(bltFrame, width), BOTH}, |
| 1187 | {TK_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, |
| 1188 | (char *)NULL, 0, 0} |
| 1189 | }; |
| 1190 | @@ -211,7 +211,7 @@ |
| 1191 | */ |
| 1192 | |
| 1193 | static int ConfigureFrame _ANSI_ARGS_((Tcl_Interp *interp, |
| 1194 | - Frame * framePtr, int argc, char **argv, |
| 1195 | + bltFrame * framePtr, int argc, CONST84 char **argv, |
| 1196 | int flags)); |
| 1197 | static void DestroyFrame _ANSI_ARGS_((DestroyData *memPtr)); |
| 1198 | static void DisplayFrame _ANSI_ARGS_((ClientData clientData)); |
| 1199 | @@ -219,27 +219,16 @@ |
| 1200 | ClientData clientData)); |
| 1201 | static void FrameEventProc _ANSI_ARGS_((ClientData clientData, |
| 1202 | XEvent *eventPtr)); |
| 1203 | -static int FrameWidgetCmd _ANSI_ARGS_((ClientData clientData, |
| 1204 | - Tcl_Interp *interp, int argc, char **argv)); |
| 1205 | static void MapFrame _ANSI_ARGS_((ClientData clientData)); |
| 1206 | |
| 1207 | static Blt_TileChangedProc TileChangedProc; |
| 1208 | -static Tcl_CmdProc FrameCmd, ToplevelCmd; |
| 1209 | +static Tcl_CmdProc FrameCmd, ToplevelCmd, FrameWidgetCmd; |
| 1210 | |
| 1211 | -#ifdef TILE_MAINWINDOW |
| 1212 | -EXTERN |
| 1213 | -#else |
| 1214 | static |
| 1215 | -#endif |
| 1216 | -int TkCreateFrame _ANSI_ARGS_((ClientData clientData, |
| 1217 | - Tcl_Interp *interp, int argc, char **argv, |
| 1218 | +int BltCreateFrame _ANSI_ARGS_((ClientData clientData, |
| 1219 | + Tcl_Interp *interp, int argc, CONST84 char **argv, |
| 1220 | int toplevel, char *appName)); |
| 1221 | |
| 1222 | -EXTERN void TkSetWindowMenuBar _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, |
| 1223 | - char *oldMenuName, char *menuName)); |
| 1224 | - |
| 1225 | -EXTERN Tk_Window TkCreateMainWindow _ANSI_ARGS_((Tcl_Interp * interp, |
| 1226 | - char * screenName, char * baseName)); |
| 1227 | #if (TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION > 3) |
| 1228 | #define TkSetClassProcs Tk_SetClassProcs |
| 1229 | #else |
| 1230 | @@ -247,10 +236,10 @@ |
| 1231 | ClientData instanceData)); |
| 1232 | #endif /* TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION > 3 */ |
| 1233 | |
| 1234 | +#if (TCL_VERSION_NUMBER < _VERSION(8,6,0)) |
| 1235 | EXTERN void TkpSetMainMenubar _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, |
| 1236 | char * menuName)); |
| 1237 | -EXTERN int TkpUseWindow _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, |
| 1238 | - char * string)); |
| 1239 | +#endif |
| 1240 | EXTERN void TkpMakeContainer _ANSI_ARGS_((Tk_Window tkwin)); |
| 1241 | |
| 1242 | |
| 1243 | @@ -279,9 +268,9 @@ |
| 1244 | * interpreter. */ |
| 1245 | Tcl_Interp *interp; /* Current interpreter. */ |
| 1246 | int argc; /* Number of arguments. */ |
| 1247 | - char **argv; /* Argument strings. */ |
| 1248 | + CONST84 char **argv; /* Argument strings. */ |
| 1249 | { |
| 1250 | - return TkCreateFrame(clientData, interp, argc, argv, 0, (char *)NULL); |
| 1251 | + return BltCreateFrame(clientData, interp, argc, argv, 0, (char *)NULL); |
| 1252 | } |
| 1253 | |
| 1254 | static int |
| 1255 | @@ -290,9 +279,9 @@ |
| 1256 | * interpreter. */ |
| 1257 | Tcl_Interp *interp; /* Current interpreter. */ |
| 1258 | int argc; /* Number of arguments. */ |
| 1259 | - char **argv; /* Argument strings. */ |
| 1260 | + CONST84 char **argv; /* Argument strings. */ |
| 1261 | { |
| 1262 | - return TkCreateFrame(clientData, interp, argc, argv, 1, (char *)NULL); |
| 1263 | + return BltCreateFrame(clientData, interp, argc, argv, 1, (char *)NULL); |
| 1264 | } |
| 1265 | |
| 1266 | /* |
| 1267 | @@ -319,20 +308,20 @@ |
| 1268 | static |
| 1269 | #endif /* TILE_MAINWINDOW */ |
| 1270 | int |
| 1271 | -TkCreateFrame(clientData, interp, argc, argv, toplevel, appName) |
| 1272 | +BltCreateFrame(clientData, interp, argc, argv, toplevel, appName) |
| 1273 | ClientData clientData; /* Main window associated with interpreter. |
| 1274 | * If we're called by Tk_Init to create a |
| 1275 | * new application, then this is NULL. */ |
| 1276 | Tcl_Interp *interp; /* Current interpreter. */ |
| 1277 | int argc; /* Number of arguments. */ |
| 1278 | - char **argv; /* Argument strings. */ |
| 1279 | + CONST84 char *argv[]; /* Argument strings. */ |
| 1280 | int toplevel; /* Non-zero means create a toplevel window, |
| 1281 | * zero means create a frame. */ |
| 1282 | char *appName; /* Should only be non-NULL if clientData is |
| 1283 | * NULL: gives the base name to use for the |
| 1284 | * new application. */ |
| 1285 | { |
| 1286 | - Frame *framePtr; |
| 1287 | + bltFrame *framePtr; |
| 1288 | Tk_Window new; |
| 1289 | char *className, *screenName, *visualName, *colormapName, *arg, *useOption; |
| 1290 | int i, c, length, depth; |
| 1291 | @@ -407,7 +396,7 @@ |
| 1292 | */ |
| 1293 | |
| 1294 | if (appName == NULL) { |
| 1295 | - panic("TkCreateFrame didn't get application name"); |
| 1296 | + panic("BltCreateFrame didn't get application name"); |
| 1297 | } |
| 1298 | new = (Tk_Window)TkCreateMainWindow(interp, screenName, appName); |
| 1299 | } |
| 1300 | @@ -467,7 +456,7 @@ |
| 1301 | * in the widget record from the special options. |
| 1302 | */ |
| 1303 | |
| 1304 | - framePtr = Blt_Malloc(sizeof(Frame)); |
| 1305 | + framePtr = Blt_Malloc(sizeof(bltFrame)); |
| 1306 | framePtr->tkwin = new; |
| 1307 | framePtr->display = Tk_Display(new); |
| 1308 | framePtr->interp = interp; |
| 1309 | @@ -558,9 +547,9 @@ |
| 1310 | ClientData clientData; /* Information about frame widget. */ |
| 1311 | Tcl_Interp *interp; /* Current interpreter. */ |
| 1312 | int argc; /* Number of arguments. */ |
| 1313 | - char **argv; /* Argument strings. */ |
| 1314 | + CONST84 char *argv[]; /* Argument strings. */ |
| 1315 | { |
| 1316 | - register Frame *framePtr = (Frame *) clientData; |
| 1317 | + register bltFrame *framePtr = (bltFrame *) clientData; |
| 1318 | int result; |
| 1319 | size_t length; |
| 1320 | int c, i; |
| 1321 | @@ -660,7 +649,7 @@ |
| 1322 | DestroyFrame(memPtr) |
| 1323 | DestroyData *memPtr; /* Info about frame widget. */ |
| 1324 | { |
| 1325 | - register Frame *framePtr = (Frame *) memPtr; |
| 1326 | + register bltFrame *framePtr = (bltFrame *) memPtr; |
| 1327 | |
| 1328 | Tk_FreeOptions(configSpecs, (char *)framePtr, framePtr->display, |
| 1329 | framePtr->mask); |
| 1330 | @@ -689,7 +678,7 @@ |
| 1331 | ClientData clientData; |
| 1332 | Blt_Tile tile; |
| 1333 | { |
| 1334 | - Frame *framePtr = (Frame *) clientData; |
| 1335 | + bltFrame *framePtr = (bltFrame *) clientData; |
| 1336 | |
| 1337 | if (framePtr->tkwin != NULL) { |
| 1338 | if (!(framePtr->flags & REDRAW_PENDING)) { |
| 1339 | @@ -723,10 +712,10 @@ |
| 1340 | static int |
| 1341 | ConfigureFrame(interp, framePtr, argc, argv, flags) |
| 1342 | Tcl_Interp *interp; /* Used for error reporting. */ |
| 1343 | - register Frame *framePtr; /* Information about widget; may or may |
| 1344 | + register bltFrame *framePtr; /* Information about widget; may or may |
| 1345 | * not already have values for some fields. */ |
| 1346 | int argc; /* Number of valid entries in argv. */ |
| 1347 | - char **argv; /* Arguments. */ |
| 1348 | + CONST84 char **argv; /* Arguments. */ |
| 1349 | int flags; /* Flags to pass to Tk_ConfigureWidget. */ |
| 1350 | { |
| 1351 | #if (TK_MAJOR_VERSION > 4) |
| 1352 | @@ -810,7 +799,7 @@ |
| 1353 | DisplayFrame(clientData) |
| 1354 | ClientData clientData; /* Information about widget. */ |
| 1355 | { |
| 1356 | - register Frame *framePtr = (Frame *) clientData; |
| 1357 | + register bltFrame *framePtr = (bltFrame *) clientData; |
| 1358 | register Tk_Window tkwin = framePtr->tkwin; |
| 1359 | GC gc; |
| 1360 | |
| 1361 | @@ -877,7 +866,7 @@ |
| 1362 | ClientData clientData; /* Information about window. */ |
| 1363 | register XEvent *eventPtr; /* Information about event. */ |
| 1364 | { |
| 1365 | - register Frame *framePtr = (Frame *) clientData; |
| 1366 | + register bltFrame *framePtr = (bltFrame *) clientData; |
| 1367 | |
| 1368 | if (((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) |
| 1369 | || (eventPtr->type == ConfigureNotify)) { |
| 1370 | @@ -964,7 +953,7 @@ |
| 1371 | FrameCmdDeletedProc(clientData) |
| 1372 | ClientData clientData; /* Pointer to widget record for widget. */ |
| 1373 | { |
| 1374 | - Frame *framePtr = (Frame *) clientData; |
| 1375 | + bltFrame *framePtr = (bltFrame *) clientData; |
| 1376 | Tk_Window tkwin = framePtr->tkwin; |
| 1377 | |
| 1378 | #if (TK_MAJOR_VERSION > 4) |
| 1379 | @@ -1010,7 +999,7 @@ |
| 1380 | MapFrame(clientData) |
| 1381 | ClientData clientData; /* Pointer to frame structure. */ |
| 1382 | { |
| 1383 | - Frame *framePtr = (Frame *) clientData; |
| 1384 | + bltFrame *framePtr = (bltFrame *) clientData; |
| 1385 | |
| 1386 | /* |
| 1387 | * Wait for all other background events to be processed before |
| 1388 | @@ -1067,9 +1056,9 @@ |
| 1389 | #define Tk_InstanceData(tkwin) (((Tk_FakeWin *)(tkwin))->dummy18) |
| 1390 | #define Tk_MainPtr(tkwin) (((Tk_FakeWin *)(tkwin))->dummy5) |
| 1391 | if (Tk_MainPtr(tkwin) != NULL) { |
| 1392 | - Frame *framePtr; |
| 1393 | + bltFrame *framePtr; |
| 1394 | |
| 1395 | - framePtr = (Frame *) Tk_InstanceData(tkwin); |
| 1396 | + framePtr = (bltFrame *) Tk_InstanceData(tkwin); |
| 1397 | TkpMenuNotifyToplevelCreate(framePtr->interp, framePtr->menuName); |
| 1398 | } |
| 1399 | #endif /* TK_MAJOR_VERSION > 4 */ |
| 1400 | --- a/configure.in |
| 1401 | +++ b/configure.in |
| 1402 | @@ -816,6 +816,7 @@ |
| 1403 | if test "${TK_INC_DIR}" != "/usr/include" ; then |
| 1404 | INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}" |
| 1405 | fi |
| 1406 | +INC_SPECS="${INC_SPECS} -I${TK_SRC_DIR}/generic -I${TK_SRC_DIR}/unix" |
| 1407 | |
| 1408 | # Tcl include files |
| 1409 | # |