Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge trunk |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | jn-web-colors |
Files: | files | file ages | folders |
SHA1: |
e74e9b0e03ede7c147af3686a3952dc5 |
User & Date: | jan.nijtmans 2012-04-29 08:22:32 |
Context
2012-05-05
| ||
16:27 | merge trunk check-in: e8af2579 user: jan.nijtmans tags: jn-web-colors | |
2012-04-29
| ||
08:22 | merge trunk check-in: e74e9b0e user: jan.nijtmans tags: jn-web-colors | |
07:37 | [Bug 533519]: Window placement with multiple screens check-in: 49d4d5d6 user: jan.nijtmans tags: trunk | |
2012-04-12
| ||
21:04 | merge trunk check-in: 5b94833c user: jan.nijtmans tags: jn-web-colors | |
Changes
Changes to ChangeLog.
1 2 | 2012-04-07 Jan Nijtmans <[email protected]> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 2012-04-29 Jan Nijtmans <[email protected]> * library/tk.tcl: [Bug 3508771]: Window placement with multiple screens * generic/tkBind.c: * generic/tkFocus.c: * generic/tkMenuDraw.c: * generic/tkWinWm.c: 2012-04-26 Donal K. Fellows <[email protected]> * generic/tkStubInit.c (Tk_GetHINSTANCE): Ensure that this is defined for OSX. 2012-04-26 Jan Nijtmans <[email protected]> * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region and * generic/tkInt.decls: Tk_GetHINSTANCE for Cygwin * generic/tkPlatDecls.h: * generic/tkintDecls.h: * generic/tkStubInit.c: 2012-04-22 Donal K. Fellows <[email protected]> * generic/tkBind.c (ExpandPercents): [Bug 3520202]: Ensure that the %k, %K and %N substitutions use dummy tokens with <MouseWheel> events and that the %D subsitution is a dummy with <Key>/<KeyRelease>. This was causing significant indigestion (and a read of goodness knows what memory) to Tkinter/Python because of the way they map events between languages. 2012-04-20 Donal K. Fellows <[email protected]> * generic/tkWindow.c (commands): Ensure that all descriptions of commands created by Tk are correct. 2012-04-20 Jan Nijtmans <[email protected]> * generic/tk.tcl: Use vroot size in stead of screen size for clipping window coordinates in ::tk::PlaceWindow. * generic/dialog.tcl: Use ::tk::PlaceWindow in dialog.tcl, instead of dumplicating the code there. (harmless part of [Bug 533519]) 2012-04-13 Jan Nijtmans <[email protected]> * win/rules.vc: [Bug 3517448]: TclKit build fails (unresolved __strtoi64) 2012-04-07 Jan Nijtmans <[email protected]> * generic/tkBind.c: [Bug 3176239]: control-MouseWheel causes segv 2012-03-30 Jan Nijtmans <[email protected]> * unix/tcl.m4: [Bug 3511806]: Compiler checks too early * unix/configure.in: This change allows to build the cygwin * unix/configure and mingw32 ports of Tcl/Tk to build * win/tcl.m4: out-of-the-box using a native or cross- * win/configure.in: compiler. * win/configure 2012-03-21 Jan Nijtmans <[email protected]> * generic/tkColor.c: [Bug 2809525]: Abort on overlong color name. * unix/tkUnixColor.c: 2012-03-18 Jan Nijtmans <[email protected]> * xlib/xcolors.c: [RFE 3503317]: XParseColor speedup * xlib/rgb.txt: List of all colors accepted by Tk in Xorg format * tests/color.test: Added test case for all colors in rgb.txt |
︙ | ︙ |
Changes to generic/tk.decls.
︙ | ︙ | |||
1083 1084 1085 1086 1087 1088 1089 | # Define the platform specific public Tk interface. These functions are # only available on the designated platform. interface tkPlat ################################ # Unix specific functions | > | > > > > > > > > > > > > > > > > > > > > | 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 | # Define the platform specific public Tk interface. These functions are # only available on the designated platform. interface tkPlat ################################ # Unix specific functions # declare 0 unix { Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd) } declare 1 unix { void *Tk_GetHINSTANCE(void) } declare 2 unix { void *Tk_GetHWND(Window window) } declare 3 unix { Tk_Window Tk_HWNDToWindow(void *hwnd) } declare 4 unix { void Tk_PointerEvent(void *hwnd, int x, int y) } declare 5 unix { int Tk_TranslateWinEvent(void *hwnd, unsigned int message, int wParam, int lParam, int *result) } ################################ # Windows specific functions declare 0 win { Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd) } |
︙ | ︙ |
Changes to generic/tkBind.c.
︙ | ︙ | |||
2024 2025 2026 2027 2028 2029 2030 | TkpPrintWindowId(numStorage, eventPtr->xmaprequest.window); } else { TkpPrintWindowId(numStorage, eventPtr->xany.window); } string = numStorage; goto doString; case 'k': | | | 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 | TkpPrintWindowId(numStorage, eventPtr->xmaprequest.window); } else { TkpPrintWindowId(numStorage, eventPtr->xany.window); } string = numStorage; goto doString; case 'k': if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { number = eventPtr->xkey.keycode; goto doNumber; } goto doString; case 'm': if (flags & CROSSING) { number = eventPtr->xcrossing.mode; |
︙ | ︙ | |||
2164 2165 2166 2167 2168 2169 2170 | } goto doNumber; case 'D': /* * This is used only by the MouseWheel event. */ | | | | | 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 | } goto doNumber; case 'D': /* * This is used only by the MouseWheel event. */ if ((flags & KEY) && (eventPtr->type == MouseWheelEvent)) { number = eventPtr->xkey.keycode; goto doNumber; } goto doString; case 'E': number = (int) eventPtr->xany.send_event; goto doNumber; case 'K': if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { const char *name = TkKeysymToString(keySym); if (name != NULL) { string = name; } } goto doString; case 'N': if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { number = (int) keySym; goto doNumber; } goto doString; case 'P': if (flags & PROP) { string = Tk_GetAtomName((Tk_Window) winPtr, |
︙ | ︙ | |||
2222 2223 2224 2225 2226 2227 2228 | } else { string = "??"; } goto doString; } case 'X': if (flags & KEY_BUTTON_MOTION_CROSSING) { | < < < | < < < < < < < | < < < < | 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 | } else { string = "??"; } goto doString; } case 'X': if (flags & KEY_BUTTON_MOTION_CROSSING) { number = eventPtr->xkey.x_root; Tk_IdToWindow(eventPtr->xany.display, eventPtr->xany.window); goto doNumber; } goto doString; case 'Y': if (flags & KEY_BUTTON_MOTION_CROSSING) { number = eventPtr->xkey.y_root; Tk_IdToWindow(eventPtr->xany.display, eventPtr->xany.window); goto doNumber; } goto doString; default: numStorage[0] = before[1]; numStorage[1] = '\0'; string = numStorage; |
︙ | ︙ |
Changes to generic/tkFocus.c.
︙ | ︙ | |||
711 712 713 714 715 716 717 | TkWindow *winPtr, /* Window that selects an application and a * display. */ XEvent *eventPtr) /* X event to redirect (should be KeyPress or * KeyRelease). */ { DisplayFocusInfo *displayFocusPtr; TkWindow *focusWinPtr; | | | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | TkWindow *winPtr, /* Window that selects an application and a * display. */ XEvent *eventPtr) /* X event to redirect (should be KeyPress or * KeyRelease). */ { DisplayFocusInfo *displayFocusPtr; TkWindow *focusWinPtr; int focusX, focusY; displayFocusPtr = FindDisplayFocusInfo(winPtr->mainPtr, winPtr->dispPtr); focusWinPtr = displayFocusPtr->focusWinPtr; /* * The code below is a debugging aid to make sure that dispPtr->focusPtr * is kept properly in sync with the "truth", which is the value in |
︙ | ︙ | |||
744 745 746 747 748 749 750 | */ if ((focusWinPtr->display != winPtr->display) || (focusWinPtr->screenNum != winPtr->screenNum)) { eventPtr->xkey.x = -1; eventPtr->xkey.y = -1; } else { | < < | | | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | */ if ((focusWinPtr->display != winPtr->display) || (focusWinPtr->screenNum != winPtr->screenNum)) { eventPtr->xkey.x = -1; eventPtr->xkey.y = -1; } else { Tk_GetRootCoords((Tk_Window) focusWinPtr, &focusX, &focusY); eventPtr->xkey.x = eventPtr->xkey.x_root - focusX; eventPtr->xkey.y = eventPtr->xkey.y_root - focusY; } eventPtr->xkey.window = focusWinPtr->window; return focusWinPtr; } /* * The event doesn't belong to us. Perhaps, due to embedding, it really |
︙ | ︙ |
Changes to generic/tkInt.decls.
︙ | ︙ | |||
394 395 396 397 398 399 400 | declare 111 { Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className) } declare 112 { void TkpMenuThreadInit(void) } | | | | | | | | | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | declare 111 { Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className) } declare 112 { void TkpMenuThreadInit(void) } declare 113 { void TkClipBox(TkRegion rgn, XRectangle *rect_return) } declare 114 { TkRegion TkCreateRegion(void) } declare 115 { void TkDestroyRegion(TkRegion rgn) } declare 116 { void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return) } declare 117 { int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width, unsigned int height) } declare 118 { void TkSetRegion(Display *display, GC gc, TkRegion rgn) } declare 119 { void TkUnionRectWithRegion(XRectangle *rect, TkRegion src, TkRegion dr_return) } declare 121 aqua { Pixmap TkpCreateNativeBitmap(Display *display, const void *source) } declare 122 aqua { |
︙ | ︙ | |||
459 460 461 462 463 464 465 | } declare 143 { void TkClipCleanup(TkDisplay *dispPtr) } declare 144 { void TkGCCleanup(TkDisplay *dispPtr) } | | | 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | } declare 143 { void TkClipCleanup(TkDisplay *dispPtr) } declare 144 { void TkGCCleanup(TkDisplay *dispPtr) } declare 145 { void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return) } declare 146 { void TkStylePkgInit(TkMainInfo *mainPtr) } declare 147 { void TkStylePkgFree(TkMainInfo *mainPtr) |
︙ | ︙ |
Changes to generic/tkIntDecls.h.
︙ | ︙ | |||
325 326 327 328 329 330 331 | /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); /* 111 */ EXTERN Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); /* 112 */ EXTERN void TkpMenuThreadInit(void); | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); /* 111 */ EXTERN Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); /* 112 */ EXTERN void TkpMenuThreadInit(void); /* 113 */ EXTERN void TkClipBox(TkRegion rgn, XRectangle *rect_return); /* 114 */ EXTERN TkRegion TkCreateRegion(void); /* 115 */ EXTERN void TkDestroyRegion(TkRegion rgn); /* 116 */ EXTERN void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 117 */ EXTERN int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width, unsigned int height); /* 118 */ EXTERN void TkSetRegion(Display *display, GC gc, TkRegion rgn); /* 119 */ EXTERN void TkUnionRectWithRegion(XRectangle *rect, TkRegion src, TkRegion dr_return); /* Slot 120 is reserved */ #ifdef MAC_OSX_TK /* AQUA */ /* 121 */ EXTERN Pixmap TkpCreateNativeBitmap(Display *display, const void *source); #endif /* AQUA */ #ifdef MAC_OSX_TK /* AQUA */ |
︙ | ︙ | |||
436 437 438 439 440 441 442 | EXTERN TkWindow ** TkWmStackorderToplevel(TkWindow *parentPtr); /* 142 */ EXTERN void TkFocusFree(TkMainInfo *mainPtr); /* 143 */ EXTERN void TkClipCleanup(TkDisplay *dispPtr); /* 144 */ EXTERN void TkGCCleanup(TkDisplay *dispPtr); | < < < < < < < | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | EXTERN TkWindow ** TkWmStackorderToplevel(TkWindow *parentPtr); /* 142 */ EXTERN void TkFocusFree(TkMainInfo *mainPtr); /* 143 */ EXTERN void TkClipCleanup(TkDisplay *dispPtr); /* 144 */ EXTERN void TkGCCleanup(TkDisplay *dispPtr); /* 145 */ EXTERN void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 146 */ EXTERN void TkStylePkgInit(TkMainInfo *mainPtr); /* 147 */ EXTERN void TkStylePkgFree(TkMainInfo *mainPtr); /* 148 */ EXTERN Tk_Window TkToplevelWindowForCommand(Tcl_Interp *interp, const char *cmdName); |
︙ | ︙ | |||
712 713 714 715 716 717 718 | TkDisplay * (*tkGetDisplayList) (void); /* 106 */ TkMainInfo * (*tkGetMainInfoList) (void); /* 107 */ int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ CONST86 char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ void (*tkpMenuThreadInit) (void); /* 112 */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | TkDisplay * (*tkGetDisplayList) (void); /* 106 */ TkMainInfo * (*tkGetMainInfoList) (void); /* 107 */ int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ CONST86 char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ void (*tkpMenuThreadInit) (void); /* 112 */ void (*tkClipBox) (TkRegion rgn, XRectangle *rect_return); /* 113 */ TkRegion (*tkCreateRegion) (void); /* 114 */ void (*tkDestroyRegion) (TkRegion rgn); /* 115 */ void (*tkIntersectRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 116 */ int (*tkRectInRegion) (TkRegion rgn, int x, int y, unsigned int width, unsigned int height); /* 117 */ void (*tkSetRegion) (Display *display, GC gc, TkRegion rgn); /* 118 */ void (*tkUnionRectWithRegion) (XRectangle *rect, TkRegion src, TkRegion dr_return); /* 119 */ void (*reserved120)(void); #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ void (*reserved121)(void); #endif /* X11 */ #ifdef __WIN32__ /* WIN */ void (*reserved121)(void); #endif /* WIN */ |
︙ | ︙ | |||
834 835 836 837 838 839 840 | KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */ void (*tkpInitKeymapInfo) (TkDisplay *dispPtr); /* 139 */ TkRegion (*tkPhotoGetValidRegion) (Tk_PhotoHandle handle); /* 140 */ TkWindow ** (*tkWmStackorderToplevel) (TkWindow *parentPtr); /* 141 */ void (*tkFocusFree) (TkMainInfo *mainPtr); /* 142 */ void (*tkClipCleanup) (TkDisplay *dispPtr); /* 143 */ void (*tkGCCleanup) (TkDisplay *dispPtr); /* 144 */ | < < < < < < < < < | 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */ void (*tkpInitKeymapInfo) (TkDisplay *dispPtr); /* 139 */ TkRegion (*tkPhotoGetValidRegion) (Tk_PhotoHandle handle); /* 140 */ TkWindow ** (*tkWmStackorderToplevel) (TkWindow *parentPtr); /* 141 */ void (*tkFocusFree) (TkMainInfo *mainPtr); /* 142 */ void (*tkClipCleanup) (TkDisplay *dispPtr); /* 143 */ void (*tkGCCleanup) (TkDisplay *dispPtr); /* 144 */ void (*tkSubtractRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 145 */ void (*tkStylePkgInit) (TkMainInfo *mainPtr); /* 146 */ void (*tkStylePkgFree) (TkMainInfo *mainPtr); /* 147 */ Tk_Window (*tkToplevelWindowForCommand) (Tcl_Interp *interp, const char *cmdName); /* 148 */ const Tk_OptionSpec * (*tkGetOptionSpec) (const char *name, Tk_OptionTable optionTable); /* 149 */ int (*tkMakeRawCurve) (Tk_Canvas canvas, double *pointPtr, int numPoints, int numSteps, XPoint xPoints[], double dblPoints[]); /* 150 */ void (*tkMakeRawCurvePostscript) (Tcl_Interp *interp, Tk_Canvas canvas, double *pointPtr, int numPoints); /* 151 */ void (*tkpDrawFrame) (Tk_Window tkwin, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief); /* 152 */ |
︙ | ︙ | |||
1120 1121 1122 1123 1124 1125 1126 | (tkIntStubsPtr->tkpGetString) /* 109 */ #define TkpGetSubFonts \ (tkIntStubsPtr->tkpGetSubFonts) /* 110 */ #define TkpGetSystemDefault \ (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */ #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | (tkIntStubsPtr->tkpGetString) /* 109 */ #define TkpGetSubFonts \ (tkIntStubsPtr->tkpGetSubFonts) /* 110 */ #define TkpGetSystemDefault \ (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */ #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ #define TkClipBox \ (tkIntStubsPtr->tkClipBox) /* 113 */ #define TkCreateRegion \ (tkIntStubsPtr->tkCreateRegion) /* 114 */ #define TkDestroyRegion \ (tkIntStubsPtr->tkDestroyRegion) /* 115 */ #define TkIntersectRegion \ (tkIntStubsPtr->tkIntersectRegion) /* 116 */ #define TkRectInRegion \ (tkIntStubsPtr->tkRectInRegion) /* 117 */ #define TkSetRegion \ (tkIntStubsPtr->tkSetRegion) /* 118 */ #define TkUnionRectWithRegion \ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ /* Slot 120 is reserved */ #ifdef MAC_OSX_TK /* AQUA */ #define TkpCreateNativeBitmap \ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */ #endif /* AQUA */ #ifdef MAC_OSX_TK /* AQUA */ #define TkpDefineNativeBitmaps \ |
︙ | ︙ | |||
1220 1221 1222 1223 1224 1225 1226 | (tkIntStubsPtr->tkWmStackorderToplevel) /* 141 */ #define TkFocusFree \ (tkIntStubsPtr->tkFocusFree) /* 142 */ #define TkClipCleanup \ (tkIntStubsPtr->tkClipCleanup) /* 143 */ #define TkGCCleanup \ (tkIntStubsPtr->tkGCCleanup) /* 144 */ | < < < < < < | 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | (tkIntStubsPtr->tkWmStackorderToplevel) /* 141 */ #define TkFocusFree \ (tkIntStubsPtr->tkFocusFree) /* 142 */ #define TkClipCleanup \ (tkIntStubsPtr->tkClipCleanup) /* 143 */ #define TkGCCleanup \ (tkIntStubsPtr->tkGCCleanup) /* 144 */ #define TkSubtractRegion \ (tkIntStubsPtr->tkSubtractRegion) /* 145 */ #define TkStylePkgInit \ (tkIntStubsPtr->tkStylePkgInit) /* 146 */ #define TkStylePkgFree \ (tkIntStubsPtr->tkStylePkgFree) /* 147 */ #define TkToplevelWindowForCommand \ (tkIntStubsPtr->tkToplevelWindowForCommand) /* 148 */ #define TkGetOptionSpec \ |
︙ | ︙ | |||
1313 1314 1315 1316 1317 1318 1319 1320 1321 | #endif /* defined(USE_TK_STUBS) */ /* !END!: Do not edit above this line. */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT #endif /* _TKINTDECLS */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 | #endif /* defined(USE_TK_STUBS) */ /* !END!: Do not edit above this line. */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT /* * On X11, these macros are just wrappers for the equivalent X Region calls. */ #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ #undef TkClipBox #undef TkCreateRegion #undef TkDestroyRegion #undef TkIntersectRegion #undef TkRectInRegion #undef TkSetRegion #undef TkSubtractRegion #undef TkUnionRectWithRegion #define TkClipBox(rgn, rect) XClipBox((Region) rgn, rect) #define TkCreateRegion() (TkRegion) XCreateRegion() #define TkDestroyRegion(rgn) XDestroyRegion((Region) rgn) #define TkIntersectRegion(a, b, r) XIntersectRegion((Region) a, \ (Region) b, (Region) r) #define TkRectInRegion(r, x, y, w, h) XRectInRegion((Region) r, x, y, w, h) #define TkSetRegion(d, gc, rgn) XSetRegion(d, gc, (Region) rgn) #define TkSubtractRegion(a, b, r) XSubtractRegion((Region) a, \ (Region) b, (Region) r) #define TkUnionRectWithRegion(rect, src, ret) XUnionRectWithRegion(rect, \ (Region) src, (Region) ret) #endif /* UNIX */ #endif /* _TKINTDECLS */ |
Changes to generic/tkMenuDraw.c.
︙ | ︙ | |||
840 841 842 843 844 845 846 | TkPostTearoffMenu( Tcl_Interp *interp, /* The interpreter of the menu */ TkMenu *menuPtr, /* The menu we are posting */ int x, int y) /* The root X,Y coordinates where we are * posting */ { int vRootX, vRootY, vRootWidth, vRootHeight; | | | 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 | TkPostTearoffMenu( Tcl_Interp *interp, /* The interpreter of the menu */ TkMenu *menuPtr, /* The menu we are posting */ int x, int y) /* The root X,Y coordinates where we are * posting */ { int vRootX, vRootY, vRootWidth, vRootHeight; int result; TkActivateMenuEntry(menuPtr, -1); TkRecomputeMenu(menuPtr); result = TkPostCommand(menuPtr); if (result != TCL_OK) { return result; } |
︙ | ︙ | |||
873 874 875 876 877 878 879 | * (if any) to the real root. Can't get the virtual root from the menu * itself (it will never be seen by the wm) so use its parent instead * (it would be better to have an an option that names a window to use * for this...). * 2. The menu may not have been mapped yet, so its current size might be * the default 1x1. To compute how much space it needs, use its * requested size, not its actual size. | < < < < < < < < | | | | < < | | | | | 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 | * (if any) to the real root. Can't get the virtual root from the menu * itself (it will never be seen by the wm) so use its parent instead * (it would be better to have an an option that names a window to use * for this...). * 2. The menu may not have been mapped yet, so its current size might be * the default 1x1. To compute how much space it needs, use its * requested size, not its actual size. */ Tk_GetVRootGeometry(Tk_Parent(menuPtr->tkwin), &vRootX, &vRootY, &vRootWidth, &vRootHeight); if (x > vRootX + vRootWidth) { x = vRootX + vRootWidth; } if (x < vRootX) { x = vRootX; } if (y > vRootY + vRootHeight) { y = vRootY + vRootHeight; } if (y < vRootY) { y = vRootY; } Tk_MoveToplevelWindow(menuPtr->tkwin, x, y); if (!Tk_IsMapped(menuPtr->tkwin)) { Tk_MapWindow(menuPtr->tkwin); } TkWmRestackToplevel((TkWindow *) menuPtr->tkwin, Above, NULL); return TCL_OK; |
︙ | ︙ |
Changes to generic/tkPlatDecls.h.
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | /* !BEGIN!: Do not edit below this line. */ /* * Exported function declarations: */ #ifdef __WIN32__ /* WIN */ /* 0 */ EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd); /* 1 */ EXTERN HINSTANCE Tk_GetHINSTANCE(void); /* 2 */ EXTERN HWND Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd); /* 4 */ EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y); /* 5 */ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ | > > > > > > > > > > > > > > > > | < < < < < | | | | | > | > > > > > > > > | | | | | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | /* !BEGIN!: Do not edit below this line. */ /* * Exported function declarations: */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ /* 0 */ EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd); /* 1 */ EXTERN void * Tk_GetHINSTANCE(void); /* 2 */ EXTERN void * Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd); /* 4 */ EXTERN void Tk_PointerEvent(void *hwnd, int x, int y); /* 5 */ EXTERN int Tk_TranslateWinEvent(void *hwnd, unsigned int message, int wParam, int lParam, int *result); #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ /* 0 */ EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd); /* 1 */ EXTERN HINSTANCE Tk_GetHINSTANCE(void); /* 2 */ EXTERN HWND Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd); /* 4 */ EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y); /* 5 */ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd); /* 1 */ EXTERN void * Tk_GetHINSTANCE(void); /* 2 */ EXTERN void * Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd); /* 4 */ EXTERN void Tk_PointerEvent(void *hwnd, int x, int y); /* 5 */ EXTERN int Tk_TranslateWinEvent(void *hwnd, unsigned int message, int wParam, int lParam, int *result); /* 6 */ EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin); /* 7 */ EXTERN void * TkMacOSXGetDrawablePort(Drawable drawable); /* 8 */ EXTERN void * TkMacOSXGetRootControl(Drawable drawable); /* 9 */ EXTERN void Tk_MacOSXSetupTkNotifier(void); /* 10 */ EXTERN int Tk_MacOSXIsAppInFront(void); #endif /* AQUA */ typedef struct TkPlatStubs { int magic; const struct TkPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ Window (*tk_AttachHWND) (Tk_Window tkwin, void *hwnd); /* 0 */ void * (*tk_GetHINSTANCE) (void); /* 1 */ void * (*tk_GetHWND) (Window window); /* 2 */ Tk_Window (*tk_HWNDToWindow) (void *hwnd); /* 3 */ void (*tk_PointerEvent) (void *hwnd, int x, int y); /* 4 */ int (*tk_TranslateWinEvent) (void *hwnd, unsigned int message, int wParam, int lParam, int *result); /* 5 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ Window (*tk_AttachHWND) (Tk_Window tkwin, HWND hwnd); /* 0 */ HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */ HWND (*tk_GetHWND) (Window window); /* 2 */ Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */ void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */ int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ Window (*tk_AttachHWND) (Tk_Window tkwin, void *hwnd); /* 0 */ void * (*tk_GetHINSTANCE) (void); /* 1 */ void * (*tk_GetHWND) (Window window); /* 2 */ Tk_Window (*tk_HWNDToWindow) (void *hwnd); /* 3 */ void (*tk_PointerEvent) (void *hwnd, int x, int y); /* 4 */ int (*tk_TranslateWinEvent) (void *hwnd, unsigned int message, int wParam, int lParam, int *result); /* 5 */ void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */ void * (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */ void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */ void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */ int (*tk_MacOSXIsAppInFront) (void); /* 10 */ #endif /* AQUA */ } TkPlatStubs; |
︙ | ︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | #if defined(USE_TK_STUBS) /* * Inline function declarations: */ #ifdef __WIN32__ /* WIN */ #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ #define Tk_GetHINSTANCE \ (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ #define Tk_GetHWND \ (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ #define Tk_PointerEvent \ (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ | > > > > > > > > > > > > > > | | | | | | | | | | | | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | #if defined(USE_TK_STUBS) /* * Inline function declarations: */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ #define Tk_GetHINSTANCE \ (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ #define Tk_GetHWND \ (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ #define Tk_PointerEvent \ (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ #define Tk_GetHINSTANCE \ (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ #define Tk_GetHWND \ (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ #define Tk_PointerEvent \ (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ #define Tk_GetHINSTANCE \ (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ #define Tk_GetHWND \ (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ #define Tk_PointerEvent \ (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #define TkMacOSXInvalClipRgns \ (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */ #define TkMacOSXGetDrawablePort \ (tkPlatStubsPtr->tkMacOSXGetDrawablePort) /* 7 */ #define TkMacOSXGetRootControl \ (tkPlatStubsPtr->tkMacOSXGetRootControl) /* 8 */ #define Tk_MacOSXSetupTkNotifier \ |
︙ | ︙ |
Changes to generic/tkStubInit.c.
︙ | ︙ | |||
32 33 34 35 36 37 38 | /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations * below should be made in the generic/tk.decls script. */ | | > > > > > > > > > > > | | > | > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations * below should be made in the generic/tk.decls script. */ static const TkIntStubs tkIntStubs; /* * Remove macro that might interfere with the definition below. */ #undef Tk_MainEx #undef TkClipBox #undef TkCreateRegion #undef TkDestroyRegion #undef TkIntersectRegion #undef TkRectInRegion #undef TkSetRegion #undef TkUnionRectWithRegion #undef TkSubtractRegion #undef TkPutImage #ifndef __WIN32__ /* * Make sure that extensions which call XParseColor through the stub * table, call TkParseColor instead. [Bug 3486474] */ # define XParseColor TkParseColor # ifndef __CYGWIN__ # define Tk_AttachHWND 0 # define Tk_GetHWND 0 # define Tk_HWNDToWindow 0 # define Tk_PointerEvent 0 # define Tk_TranslateWinEvent 0 # define Tk_GetHINSTANCE 0 # endif # if !defined(MAC_TCL) && !defined(MAC_OSX_TCL) # define TkClipBox (void (*) (TkRegion, XRectangle *)) XClipBox # define TkCreateRegion (TkRegion (*) ()) XCreateRegion # define TkDestroyRegion (void (*) (TkRegion)) XDestroyRegion # define TkIntersectRegion (void (*) (TkRegion, TkRegion, TkRegion)) XIntersectRegion # define TkRectInRegion (int (*) (TkRegion, int, int, unsigned int, unsigned int)) XRectInRegion # define TkSetRegion (void (*) (Display *, GC, TkRegion)) XSetRegion # define TkUnionRectWithRegion (void (*) (XRectangle *, TkRegion, TkRegion)) XUnionRectWithRegion # define TkSubtractRegion (void (*) (TkRegion, TkRegion, TkRegion)) XSubtractRegion # ifdef __CYGWIN__ # define Tk_GetHINSTANCE TkPlatGetHINSTANCE # define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004 /* * Trick, so we don't have to include <windows.h> here, which in any * case lacks this function anyway. */ int __stdcall GetModuleHandleExW(unsigned int, const char *, void *); static void *Tk_GetHINSTANCE() { void *hInstance = NULL; GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (const char *) &tkIntStubs, &hInstance); return hInstance; } # else /* !__CYGWIN__ */ # define TkPutImage 0 # endif /* __CYGWIN__ */ # endif /* !MAC_TCL && !MACC_OSX_TCL */ #endif /* !__WIN32__ */ /* !BEGIN!: Do not edit below this line. */ static const TkIntStubs tkIntStubs = { TCL_STUB_MAGIC, 0, TkAllocWindow, /* 0 */ |
︙ | ︙ | |||
164 165 166 167 168 169 170 | TkGetDisplayList, /* 106 */ TkGetMainInfoList, /* 107 */ TkGetWindowFromObj, /* 108 */ TkpGetString, /* 109 */ TkpGetSubFonts, /* 110 */ TkpGetSystemDefault, /* 111 */ TkpMenuThreadInit, /* 112 */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | TkGetDisplayList, /* 106 */ TkGetMainInfoList, /* 107 */ TkGetWindowFromObj, /* 108 */ TkpGetString, /* 109 */ TkpGetSubFonts, /* 110 */ TkpGetSystemDefault, /* 111 */ TkpMenuThreadInit, /* 112 */ TkClipBox, /* 113 */ TkCreateRegion, /* 114 */ TkDestroyRegion, /* 115 */ TkIntersectRegion, /* 116 */ TkRectInRegion, /* 117 */ TkSetRegion, /* 118 */ TkUnionRectWithRegion, /* 119 */ 0, /* 120 */ #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ 0, /* 121 */ #endif /* X11 */ #ifdef __WIN32__ /* WIN */ 0, /* 121 */ #endif /* WIN */ |
︙ | ︙ | |||
286 287 288 289 290 291 292 | TkpGetKeySym, /* 138 */ TkpInitKeymapInfo, /* 139 */ TkPhotoGetValidRegion, /* 140 */ TkWmStackorderToplevel, /* 141 */ TkFocusFree, /* 142 */ TkClipCleanup, /* 143 */ TkGCCleanup, /* 144 */ | < < < < < < < < < | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | TkpGetKeySym, /* 138 */ TkpInitKeymapInfo, /* 139 */ TkPhotoGetValidRegion, /* 140 */ TkWmStackorderToplevel, /* 141 */ TkFocusFree, /* 142 */ TkClipCleanup, /* 143 */ TkGCCleanup, /* 144 */ TkSubtractRegion, /* 145 */ TkStylePkgInit, /* 146 */ TkStylePkgFree, /* 147 */ TkToplevelWindowForCommand, /* 148 */ TkGetOptionSpec, /* 149 */ TkMakeRawCurve, /* 150 */ TkMakeRawCurvePostscript, /* 151 */ TkpDrawFrame, /* 152 */ |
︙ | ︙ | |||
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | XSync, /* 91 */ #endif /* AQUA */ }; static const TkPlatStubs tkPlatStubs = { TCL_STUB_MAGIC, 0, #ifdef __WIN32__ /* WIN */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ | > > > > > > > > | | | | | | | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | XSync, /* 91 */ #endif /* AQUA */ }; static const TkPlatStubs tkPlatStubs = { TCL_STUB_MAGIC, 0, #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ TkMacOSXInvalClipRgns, /* 6 */ TkMacOSXGetDrawablePort, /* 7 */ TkMacOSXGetRootControl, /* 8 */ Tk_MacOSXSetupTkNotifier, /* 9 */ Tk_MacOSXIsAppInFront, /* 10 */ #endif /* AQUA */ }; |
︙ | ︙ |
Changes to generic/tkWindow.c.
︙ | ︙ | |||
59 60 61 62 63 64 65 | /* * Default values for "changes" and "atts" fields of TkWindows. Note that Tk * always requests all events for all windows, except StructureNotify events * on internal windows: these events are generated internally. */ | | | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /* * Default values for "changes" and "atts" fields of TkWindows. Note that Tk * always requests all events for all windows, except StructureNotify events * on internal windows: these events are generated internally. */ static const XWindowChanges defChanges = { 0, 0, 1, 1, 0, 0, Above }; #define ALL_EVENTS_MASK \ KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \ EnterWindowMask|LeaveWindowMask|PointerMotionMask|ExposureMask| \ VisibilityChangeMask|PropertyChangeMask|ColormapChangeMask static const XSetWindowAttributes defAtts= { None, /* background_pixmap */ 0, /* background_pixel */ CopyFromParent, /* border_pixmap */ 0, /* border_pixel */ NorthWestGravity, /* bit_gravity */ NorthWestGravity, /* win_gravity */ NotUseful, /* backing_store */ |
︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 | None /* cursor */ }; /* * The following structure defines all of the commands supported by Tk, and * the C functions that execute them. */ typedef int (TkInitProc)(Tcl_Interp *interp, ClientData clientData); typedef struct { const char *name; /* Name of command. */ Tcl_CmdProc *cmdProc; /* Command's string-based function. */ Tcl_ObjCmdProc *objProc; /* Command's object-based function. */ TkInitProc *initProc; /* Command's initialization function */ | > > > > < < | < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | None /* cursor */ }; /* * The following structure defines all of the commands supported by Tk, and * the C functions that execute them. */ #define ISSAFE 1 #define PASSMAINWINDOW 2 typedef int (TkInitProc)(Tcl_Interp *interp, ClientData clientData); typedef struct { const char *name; /* Name of command. */ Tcl_CmdProc *cmdProc; /* Command's string-based function. */ Tcl_ObjCmdProc *objProc; /* Command's object-based function. */ TkInitProc *initProc; /* Command's initialization function */ int flags; } TkCmd; static const TkCmd commands[] = { /* * Commands that are part of the intrinsics: */ {"bell", NULL, Tk_BellObjCmd, NULL, PASSMAINWINDOW}, {"bind", NULL, Tk_BindObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"bindtags", NULL, Tk_BindtagsObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"clipboard", NULL, Tk_ClipboardObjCmd, NULL, PASSMAINWINDOW}, {"destroy", NULL, Tk_DestroyObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"event", NULL, Tk_EventObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"focus", NULL, Tk_FocusObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"font", NULL, Tk_FontObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"grab", NULL, Tk_GrabObjCmd, NULL, PASSMAINWINDOW}, {"grid", NULL, Tk_GridObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"image", NULL, Tk_ImageObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"lower", NULL, Tk_LowerObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"option", NULL, Tk_OptionObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"pack", NULL, Tk_PackObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"place", NULL, Tk_PlaceObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"raise", NULL, Tk_RaiseObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"selection", NULL, Tk_SelectionObjCmd, NULL, PASSMAINWINDOW}, {"tk", NULL, NULL, TkInitTkCmd, PASSMAINWINDOW|ISSAFE}, {"tkwait", NULL, Tk_TkwaitObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"update", NULL, Tk_UpdateObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"winfo", NULL, Tk_WinfoObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"wm", NULL, Tk_WmObjCmd, NULL, PASSMAINWINDOW}, /* * Default widget class commands. */ {"button", NULL, Tk_ButtonObjCmd, NULL, ISSAFE}, {"canvas", NULL, Tk_CanvasObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"checkbutton", NULL, Tk_CheckbuttonObjCmd, NULL, ISSAFE}, {"entry", NULL, Tk_EntryObjCmd, NULL, ISSAFE}, {"frame", NULL, Tk_FrameObjCmd, NULL, ISSAFE}, {"label", NULL, Tk_LabelObjCmd, NULL, ISSAFE}, {"labelframe", NULL, Tk_LabelframeObjCmd, NULL, ISSAFE}, {"listbox", NULL, Tk_ListboxObjCmd, NULL, ISSAFE}, {"menubutton", NULL, Tk_MenubuttonObjCmd, NULL, ISSAFE}, {"message", NULL, Tk_MessageObjCmd, NULL, ISSAFE}, {"panedwindow", NULL, Tk_PanedWindowObjCmd, NULL, ISSAFE}, {"radiobutton", NULL, Tk_RadiobuttonObjCmd, NULL, ISSAFE}, {"scale", NULL, Tk_ScaleObjCmd, NULL, ISSAFE}, {"scrollbar", Tk_ScrollbarCmd,NULL, NULL, PASSMAINWINDOW|ISSAFE}, {"spinbox", NULL, Tk_SpinboxObjCmd, NULL, ISSAFE}, {"text", NULL, Tk_TextObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"toplevel", NULL, Tk_ToplevelObjCmd, NULL, 0}, /* * Classic widget class commands. */ {"::tk::button", NULL, Tk_ButtonObjCmd, NULL, ISSAFE}, {"::tk::canvas", NULL, Tk_CanvasObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"::tk::checkbutton",NULL, Tk_CheckbuttonObjCmd, NULL, ISSAFE}, {"::tk::entry", NULL, Tk_EntryObjCmd, NULL, ISSAFE}, {"::tk::frame", NULL, Tk_FrameObjCmd, NULL, ISSAFE}, {"::tk::label", NULL, Tk_LabelObjCmd, NULL, ISSAFE}, {"::tk::labelframe",NULL, Tk_LabelframeObjCmd, NULL, ISSAFE}, {"::tk::listbox", NULL, Tk_ListboxObjCmd, NULL, ISSAFE}, {"::tk::menubutton",NULL, Tk_MenubuttonObjCmd, NULL, ISSAFE}, {"::tk::message", NULL, Tk_MessageObjCmd, NULL, ISSAFE}, {"::tk::panedwindow",NULL, Tk_PanedWindowObjCmd, NULL, ISSAFE}, {"::tk::radiobutton",NULL, Tk_RadiobuttonObjCmd, NULL, ISSAFE}, {"::tk::scale", NULL, Tk_ScaleObjCmd, NULL, ISSAFE}, {"::tk::scrollbar", Tk_ScrollbarCmd,NULL, NULL, PASSMAINWINDOW|ISSAFE}, {"::tk::spinbox", NULL, Tk_SpinboxObjCmd, NULL, ISSAFE}, {"::tk::text", NULL, Tk_TextObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, {"::tk::toplevel", NULL, Tk_ToplevelObjCmd, NULL, 0}, /* * Standard dialog support. Note that the Unix/X11 platform implements * these commands differently (via the script library). */ #if defined(__WIN32__) || defined(MAC_OSX_TK) {"tk_chooseColor", NULL, Tk_ChooseColorObjCmd, NULL, PASSMAINWINDOW}, {"tk_chooseDirectory", NULL, Tk_ChooseDirectoryObjCmd,NULL,PASSMAINWINDOW}, {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, NULL, PASSMAINWINDOW}, {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, NULL, PASSMAINWINDOW}, {"tk_messageBox", NULL, Tk_MessageBoxObjCmd, NULL, PASSMAINWINDOW}, #endif /* * Misc. */ #if defined(MAC_OSX_TK) {"::tk::unsupported::MacWindowStyle", NULL, TkUnsupported1ObjCmd, NULL, PASSMAINWINDOW|ISSAFE}, #endif {NULL, NULL, NULL, NULL, 0} }; /* * The variables and table below are used to parse arguments from the "argv" * variable in Tk_Init. */ |
︙ | ︙ | |||
947 948 949 950 951 952 953 | isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL) && (cmdPtr->initProc == NULL)) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } | | | | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL) && (cmdPtr->initProc == NULL)) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } if (cmdPtr->flags & PASSMAINWINDOW) { clientData = tkwin; } else { clientData = NULL; } if (cmdPtr->initProc != NULL) { cmdPtr->initProc(interp, clientData); } else if (cmdPtr->cmdProc != NULL) { Tcl_CreateCommand(interp, cmdPtr->name, cmdPtr->cmdProc, clientData, NULL); } else { Tcl_CreateObjCommand(interp, cmdPtr->name, cmdPtr->objProc, clientData, NULL); } if (isSafe) { if (!(cmdPtr->flags & ISSAFE)) { Tcl_HideCommand(interp, cmdPtr->name, cmdPtr->name); } } } TkCreateMenuCmd(interp); |
︙ | ︙ |
Changes to library/bgerror.tcl.
︙ | ︙ | |||
216 217 218 219 220 221 222 | bind $dlg <Return> [namespace code {Return ok 0}] bind $dlg <Escape> [namespace code {Return dismiss 1}] bind $dlg <Destroy> [namespace code {Destroy %W}] bind $dlg.function <Return> [namespace code {ReturnInDetails %W}] $dlg.function configure -command [namespace code Details] | > > | | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | bind $dlg <Return> [namespace code {Return ok 0}] bind $dlg <Escape> [namespace code {Return dismiss 1}] bind $dlg <Destroy> [namespace code {Destroy %W}] bind $dlg.function <Return> [namespace code {ReturnInDetails %W}] $dlg.function configure -command [namespace code Details] # 6. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $dlg # 7. Set a grab and claim the focus too. ::tk::SetFocusGrab $dlg $dlg.ok |
︙ | ︙ |
Changes to library/choosedir.tcl.
︙ | ︙ | |||
85 86 87 88 89 90 91 | set data(filter) "*" set data(previousEntryText) "" ::tk::dialog::file::UpdateWhenIdle $w # Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | set data(filter) "*" set data(previousEntryText) "" ::tk::dialog::file::UpdateWhenIdle $w # Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $w widget $data(-parent) wm title $w $data(-title) # Set a grab and claim the focus too. ::tk::SetFocusGrab $w $data(ent) |
︙ | ︙ |
Changes to library/clrpick.tcl.
︙ | ︙ | |||
85 86 87 88 89 90 91 | if {[winfo viewable [winfo toplevel $data(-parent)]] } { wm transient $w $data(-parent) } # 5. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | if {[winfo viewable [winfo toplevel $data(-parent)]] } { wm transient $w $data(-parent) } # 5. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $w widget $data(-parent) wm title $w $data(-title) # 6. Set a grab and claim the focus too. ::tk::SetFocusGrab $w $data(okBtn) |
︙ | ︙ |
Changes to library/dialog.tcl.
︙ | ︙ | |||
142 143 144 145 146 147 148 | # button variable to -1; this is needed in case something happens # that destroys the window, such as its parent window being destroyed. bind $w <Destroy> {set ::tk::Priv(button) -1} # 6. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the | | < < < < < < < < < < < < < < < < < < | | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | # button variable to -1; this is needed in case something happens # that destroys the window, such as its parent window being destroyed. bind $w <Destroy> {set ::tk::Priv(button) -1} # 6. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $w tkwait visibility $w # 7. Set a grab and claim the focus too. if {$default >= 0} { set focus $w.button$default } else { |
︙ | ︙ |
Changes to library/msgbox.tcl.
︙ | ︙ | |||
391 392 393 394 395 396 397 | bind $w <Escape> [list $w.$cancel invoke] # At <Destroy> the buttons have vanished, so must do this directly. bind $w.msg <Destroy> [list set tk::Priv(button) $cancel] # 7. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the | | | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | bind $w <Escape> [list $w.$cancel invoke] # At <Destroy> the buttons have vanished, so must do this directly. bind $w.msg <Destroy> [list set tk::Priv(button) $cancel] # 7. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $w widget $data(-parent) # 8. Set a grab and claim the focus too. if {$data(-default) ne ""} { set focus $w.$data(-default) |
︙ | ︙ |
Changes to library/tk.tcl.
︙ | ︙ | |||
107 108 109 110 111 112 113 | set y [expr {[winfo rooty $anchor] + \ ([winfo height $anchor]-[winfo reqheight $w])/2}] } else { set x [expr {([winfo screenwidth $w]-[winfo reqwidth $w])/2}] set y [expr {([winfo screenheight $w]-[winfo reqheight $w])/2}] set checkBounds 0 } | < < < < | | | | | | | | > | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | set y [expr {[winfo rooty $anchor] + \ ([winfo height $anchor]-[winfo reqheight $w])/2}] } else { set x [expr {([winfo screenwidth $w]-[winfo reqwidth $w])/2}] set y [expr {([winfo screenheight $w]-[winfo reqheight $w])/2}] set checkBounds 0 } if {$checkBounds} { if {$x < [winfo vrootx $w]} { set x [winfo vrootx $w] } elseif {$x > ([winfo vrootx $w]+[winfo vrootwidth $w]-[winfo reqwidth $w])} { set x [expr {[winfo vrootx $w]+[winfo vrootwidth $w]-[winfo reqwidth $w]}] } if {$y < [winfo vrooty $w]} { set y [winfo vrooty $w] } elseif {$y > ([winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w])} { set y [expr {[winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w]}] } if {[tk windowingsystem] eq "aqua"} { # Avoid the native menu bar which sits on top of everything. if {$y < 22} { set y 22 } } } wm maxsize $w [winfo vrootwidth $w] [winfo vrootheight $w] wm geometry $w +$x+$y wm deiconify $w } # ::tk::SetFocusGrab -- # swap out current focus and grab temporarily (for dialogs) # Arguments: |
︙ | ︙ |
Changes to library/tkfbox.tcl.
︙ | ︙ | |||
192 193 194 195 196 197 198 | } else { set data(filter) "*" $data(typeMenuBtn) configure -state disabled -takefocus 0 $data(typeMenuLab) configure -state disabled } UpdateWhenIdle $w | | | | | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | } else { set data(filter) "*" $data(typeMenuBtn) configure -state disabled -takefocus 0 $data(typeMenuLab) configure -state disabled } UpdateWhenIdle $w # Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display (Motif style) and de-iconify it. ::tk::PlaceWindow $w widget $data(-parent) wm title $w $data(-title) # Set a grab and claim the focus too. ::tk::SetFocusGrab $w $data(ent) |
︙ | ︙ |
Changes to unix/Makefile.in.
︙ | ︙ | |||
720 721 722 723 724 725 726 | done; @if test "x$(TK_SHARED_BUILD)" = "x1"; then \ echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ | > > | > > > > | > | 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | done; @if test "x$(TK_SHARED_BUILD)" = "x1"; then \ echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ echo "if {[string match CYGWIN* \$$::tcl_platform(os)]} {";\ echo " if {([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo " } else {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ echo " }";\ echo "} else {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ echo "}";\ ) > "$(PKG_INDEX)"; \ fi @echo "Installing $(LIB_FILE) to @DLL_INSTALL_DIR@/" @@INSTALL_LIB@ @chmod 555 "@DLL_INSTALL_DIR@"/$(LIB_FILE) @echo "Installing ${WISH_EXE} as $(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" @$(INSTALL_PROGRAM) ${WISH_EXE} "$(BIN_INSTALL_DIR)"/wish$(VERSION)${EXE_SUFFIX} |
︙ | ︙ |
Changes to unix/tkUnixPort.h.
︙ | ︙ | |||
109 110 111 112 113 114 115 | * Define "NBBY" (number of bits per byte) if it's not already defined. */ #ifndef NBBY # define NBBY 8 #endif | < < < < < < < < < < < < < < < < | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | * Define "NBBY" (number of bits per byte) if it's not already defined. */ #ifndef NBBY # define NBBY 8 #endif /* * The TkPutImage macro strips off the color table information, which isn't * needed for X. */ #define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \ XPutImage(display, pixels, gc, image, srcx, srcy, destx, \ |
︙ | ︙ |
Changes to win/rules.vc.
︙ | ︙ | |||
469 470 471 472 473 474 475 | !if $(STATIC_BUILD) OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD !endif !if $(TCL_NO_DEPRECATED) OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED !endif | | | | > | > > | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | !if $(STATIC_BUILD) OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD !endif !if $(TCL_NO_DEPRECATED) OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED !endif !if !$(DEBUG) OPTDEFINES = $(OPTDEFINES) -DNDEBUG !if $(OPTIMIZING) OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED !endif !endif !if $(PROFILE) OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED !endif !if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64" OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT !endif !if $(VCVERSION) < 1300 OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64 !endif #---------------------------------------------------------- # Locate the Tcl headers to build against #---------------------------------------------------------- !if "$(PROJECT)" == "tcl" |
︙ | ︙ |
Changes to win/tkWinWm.c.
︙ | ︙ | |||
6397 6398 6399 6400 6401 6402 6403 | Tk_Window tkwin, /* Window whose virtual root is to be * queried. */ int *xPtr, int *yPtr, /* Store x and y offsets of virtual root * here. */ int *widthPtr, int *heightPtr) /* Store dimensions of virtual root here. */ { | < < < < < < < < < < | | | | | 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 | Tk_Window tkwin, /* Window whose virtual root is to be * queried. */ int *xPtr, int *yPtr, /* Store x and y offsets of virtual root * here. */ int *widthPtr, int *heightPtr) /* Store dimensions of virtual root here. */ { *xPtr = GetSystemMetrics(SM_XVIRTUALSCREEN); *yPtr = GetSystemMetrics(SM_YVIRTUALSCREEN); *widthPtr = GetSystemMetrics(SM_CXVIRTUALSCREEN); *heightPtr = GetSystemMetrics(SM_CYVIRTUALSCREEN); } /* *---------------------------------------------------------------------- * * Tk_MoveToplevelWindow -- * |
︙ | ︙ |