diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-12 09:44:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-12 09:44:56 (GMT) |
commit | 9353f4752d719dabcbfd4794332748dfe1537423 (patch) | |
tree | 70ffd720faeb76cc733ce87c7b7bc32b0936b8bb /generic | |
parent | 589d0dde98f21d4046bf3fa2fb4112c90863b8ad (diff) | |
download | tk-9353f4752d719dabcbfd4794332748dfe1537423.zip tk-9353f4752d719dabcbfd4794332748dfe1537423.tar.gz tk-9353f4752d719dabcbfd4794332748dfe1537423.tar.bz2 |
Implementation ofr TIP #581 for Tk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 1 | ||||
-rw-r--r-- | generic/tkDecls.h | 1 | ||||
-rw-r--r-- | generic/tkGrid.c | 9 | ||||
-rw-r--r-- | generic/tkInt.h | 6 | ||||
-rw-r--r-- | generic/tkIntPlatDecls.h | 2 | ||||
-rw-r--r-- | generic/tkPack.c | 9 | ||||
-rw-r--r-- | generic/tkPlace.c | 5 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 |
8 files changed, 24 insertions, 11 deletions
diff --git a/generic/tk.h b/generic/tk.h index 01f3657..116f6d8 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -137,6 +137,7 @@ typedef struct Tk_3DBorder_ *Tk_3DBorder; typedef struct Tk_Style_ *Tk_Style; typedef struct Tk_StyleEngine_ *Tk_StyleEngine; typedef struct Tk_StyledElement_ *Tk_StyledElement; +#define Tk_ImageModel Tk_ImageMaster /* * Additional types exported to clients. diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 64c32cd..b02f286 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -1720,6 +1720,7 @@ extern const TkStubs *tkStubsPtr; #undef Tk_Init #undef Tk_SafeInit #undef Tk_CreateConsoleWindow +#define Tk_GetImageModelData Tk_GetImageMasterData #if defined(_WIN32) && defined(UNICODE) # define Tk_MainEx Tk_MainExW diff --git a/generic/tkGrid.c b/generic/tkGrid.c index be15c14..835971d 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -338,13 +338,13 @@ Tk_GridObjCmd( Tk_Window tkwin = clientData; static const char *const optionStrings[] = { "anchor", "bbox", "columnconfigure", "configure", - "forget", "info", "location", "propagate", "remove", - "rowconfigure", "size", "slaves", NULL + "content", "forget", "info", "location", "propagate", + "remove", "rowconfigure", "size", "slaves", NULL }; enum options { GRID_ANCHOR, GRID_BBOX, GRID_COLUMNCONFIGURE, GRID_CONFIGURE, - GRID_FORGET, GRID_INFO, GRID_LOCATION, GRID_PROPAGATE, GRID_REMOVE, - GRID_ROWCONFIGURE, GRID_SIZE, GRID_SLAVES + GRID_CONTENT, GRID_FORGET, GRID_INFO, GRID_LOCATION, GRID_PROPAGATE, + GRID_REMOVE, GRID_ROWCONFIGURE, GRID_SIZE, GRID_SLAVES }; int index; @@ -384,6 +384,7 @@ Tk_GridObjCmd( return GridPropagateCommand(tkwin, interp, objc, objv); case GRID_SIZE: return GridSizeCommand(tkwin, interp, objc, objv); + case GRID_CONTENT: case GRID_SLAVES: return GridSlavesCommand(tkwin, interp, objc, objv); diff --git a/generic/tkInt.h b/generic/tkInt.h index 2f64f99..9735c32 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -84,6 +84,11 @@ # endif #endif + +#ifndef Tcl_GetParent +# define Tcl_GetParent Tcl_GetMaster +#endif + /* * Macros used to cast between pointers and integers (e.g. when storing an int * in ClientData), on 64-bit architectures they avoid gcc warning about "cast @@ -360,6 +365,7 @@ typedef struct TkDisplay { #define TkGetGeomMaster(tkwin) (((TkWindow *)tkwin)->maintainerPtr != NULL ? \ ((TkWindow *)tkwin)->maintainerPtr : ((TkWindow *)tkwin)->parentPtr) +#define TkGetGeomContainer TkGetGeomMaster /* * Information used by tkGet.c only: diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 8221d7a..02bb9ae 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -799,6 +799,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; #undef TkpTestsendCmd_ #undef TkGenerateActivateEvents_ +#define TkGetTransientContainer TkGetTransientMaster + #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/generic/tkPack.c b/generic/tkPack.c index 9005d7f..245c6a4 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -198,11 +198,11 @@ Tk_PackObjCmd( const char *argv2; static const char *const optionStrings[] = { /* after, append, before and unpack are deprecated */ - "after", "append", "before", "unpack", - "configure", "forget", "info", "propagate", "slaves", NULL }; + "after", "append", "before", "unpack", "configure", + "content", "forget", "info", "propagate", "slaves", NULL }; enum options { - PACK_AFTER, PACK_APPEND, PACK_BEFORE, PACK_UNPACK, - PACK_CONFIGURE, PACK_FORGET, PACK_INFO, PACK_PROPAGATE, PACK_SLAVES }; + PACK_AFTER, PACK_APPEND, PACK_BEFORE, PACK_UNPACK, PACK_CONFIGURE, + PACK_CONTENT, PACK_FORGET, PACK_INFO, PACK_PROPAGATE, PACK_SLAVES }; int index; if (objc >= 2) { @@ -436,6 +436,7 @@ Tk_PackObjCmd( } break; } + case PACK_CONTENT: case PACK_SLAVES: { Tk_Window master; Packer *masterPtr, *slavePtr; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 59b8a2b..f5afa38 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -214,9 +214,9 @@ Tk_PlaceObjCmd( TkDisplay *dispPtr; Tk_OptionTable optionTable; static const char *const optionStrings[] = { - "configure", "forget", "info", "slaves", NULL + "configure", "content", "forget", "info", "slaves", NULL }; - enum options { PLACE_CONFIGURE, PLACE_FORGET, PLACE_INFO, PLACE_SLAVES }; + enum options { PLACE_CONFIGURE, PLACE_CONTENT, PLACE_FORGET, PLACE_INFO, PLACE_SLAVES }; int index; if (objc < 3) { @@ -330,6 +330,7 @@ Tk_PlaceObjCmd( } return PlaceInfoCommand(interp, tkwin); + case PLACE_CONTENT: case PLACE_SLAVES: { Master *masterPtr; diff --git a/generic/tkWindow.c b/generic/tkWindow.c index a67329c..5e5e836 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3094,7 +3094,7 @@ Initialize( Tcl_Interp *parent = interp; while (Tcl_IsSafe(parent)) { - parent = Tcl_GetMaster(parent); + parent = Tcl_GetParent(parent); if (parent == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "no controlling parent interpreter", -1)); |