summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls2
-rw-r--r--generic/tk.h41
-rw-r--r--generic/tkCanvArc.c4
-rw-r--r--generic/tkCanvBmap.c4
-rw-r--r--generic/tkCanvImg.c4
-rw-r--r--generic/tkCanvLine.c4
-rw-r--r--generic/tkCanvPoly.c4
-rw-r--r--generic/tkCanvPs.c4
-rw-r--r--generic/tkCanvText.c4
-rw-r--r--generic/tkCanvWind.c4
-rw-r--r--generic/tkCanvas.c124
-rw-r--r--generic/tkConsole.c2
-rw-r--r--generic/tkDecls.h16
-rw-r--r--generic/tkImgBmap.c2
-rw-r--r--generic/tkImgPhoto.c2
-rw-r--r--generic/tkMain.c2
-rw-r--r--generic/tkOldConfig.c32
-rw-r--r--generic/tkRectOval.c6
-rw-r--r--generic/tkScrollbar.c2
-rw-r--r--generic/tkTest.c2
-rw-r--r--generic/tkWindow.c2
21 files changed, 75 insertions, 192 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 1075977..68da8b5 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -146,7 +146,7 @@ declare 28 {
declare 29 {
int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- Tcl_Size argc, const char **argv, char *widgRec,
+ Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec,
int flags)
}
declare 30 {
diff --git a/generic/tk.h b/generic/tk.h
index 481714a..20a08e3 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,8 +17,8 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
-# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
+#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7)
+# error Tk 9.0 must be compiled with tcl.h from Tcl 8.7 or better
#endif
#ifndef EXTERN
@@ -66,17 +66,16 @@ extern "C" {
*/
#ifndef TK_MAJOR_VERSION
-# define TK_MAJOR_VERSION 8
+# define TK_MAJOR_VERSION 9
#endif
-#if TK_MAJOR_VERSION != 8
-# error "This header-file is for Tk 8 only"
-#endif
-#define TK_MINOR_VERSION 7
-#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
-#define TK_RELEASE_SERIAL 6
-
-#define TK_VERSION "8.7"
-#define TK_PATCH_LEVEL "8.7a6"
+#if TK_MAJOR_VERSION == 9
+# define TK_MINOR_VERSION 0
+# define TK_RELEASE_LEVEL TCL_BETA_RELEASE
+# define TK_RELEASE_SERIAL 0
+
+# define TK_VERSION "9.0"
+# define TK_PATCH_LEVEL "9.0b1"
+#endif /* TK_MAJOR_VERSION */
/*
* A special definition used to allow this header file to be included from
@@ -146,14 +145,6 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement;
*/
typedef const char *Tk_Uid;
-
-#if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
-# ifndef Tcl_Size
-# define Tcl_Size int
-# endif
-# define TCL_SIZE_MAX INT_MAX
-# define TCL_SIZE_MODIFIER ""
-#endif
/*
*----------------------------------------------------------------------
@@ -1092,9 +1083,7 @@ typedef struct Tk_ItemType {
* type. */
Tk_ItemDisplayProc *displayProc;
/* Procedure to display items of this type. */
- int alwaysRedraw; /* Non-zero means displayProc should be called
- * even when the item has been moved
- * off-screen. */
+ int flags; /* Combination of TK_ALWAYS_REDRAW/TK_MOVABLE_POINTS */
Tk_ItemPointProc *pointProc;/* Computes distance from item to a given
* point. */
Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside,
@@ -1131,11 +1120,11 @@ typedef struct Tk_ItemType {
} Tk_ItemType;
/*
- * Flag (used in the alwaysRedraw field) to say whether an item supports
- * point-level manipulation like the line and polygon items.
+ * Possible flags for 'flags' field.
*/
-#define TK_MOVABLE_POINTS 2
+#define TK_ALWAYS_REDRAW 1 /* item should be redrawn always*/
+#define TK_MOVABLE_POINTS 2 /* item supports point-level manipulation */
#endif /* __NO_OLD_CONFIG */
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index a730eb9..a7bcfb3 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.c
@@ -234,7 +234,7 @@ Tk_ItemType tkArcType = {
ArcCoords, /* coordProc */
DeleteArc, /* deleteProc */
DisplayArc, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
ArcToPoint, /* pointProc */
ArcToArea, /* areaProc */
ArcToPostscript, /* postscriptProc */
@@ -452,7 +452,7 @@ ConfigureArc(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) arcPtr, flags|TK_CONFIG_OBJS)) {
+ objv, arcPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 49e73cb..f2f2ca5 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.c
@@ -128,7 +128,7 @@ Tk_ItemType tkBitmapType = {
BitmapCoords, /* coordProc */
DeleteBitmap, /* deleteProc */
DisplayBitmap, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
BitmapToPoint, /* pointProc */
BitmapToArea, /* areaProc */
BitmapToPostscript, /* postscriptProc */
@@ -324,7 +324,7 @@ ConfigureBitmap(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) bmapPtr, flags|TK_CONFIG_OBJS)) {
+ objv, bmapPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 0d45dcb..9a105d9 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -116,7 +116,7 @@ Tk_ItemType tkImageType = {
ImageCoords, /* coordProc */
DeleteImage, /* deleteProc */
DisplayImage, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
ImageToPoint, /* pointProc */
ImageToArea, /* areaProc */
ImageToPostscript, /* postscriptProc */
@@ -302,7 +302,7 @@ ConfigureImage(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) imgPtr, flags|TK_CONFIG_OBJS)) {
+ objv, imgPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 8f2595f..861c8ba 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -234,7 +234,7 @@ Tk_ItemType tkLineType = {
LineCoords, /* coordProc */
DeleteLine, /* deleteProc */
DisplayLine, /* displayProc */
- TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */
+ TK_MOVABLE_POINTS, /* flags */
LineToPoint, /* pointProc */
LineToArea, /* areaProc */
LineToPostscript, /* postscriptProc */
@@ -486,7 +486,7 @@ ConfigureLine(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) linePtr, flags|TK_CONFIG_OBJS)) {
+ objv, linePtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 3d93afa..f0d6031 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -199,7 +199,7 @@ Tk_ItemType tkPolygonType = {
PolygonCoords, /* coordProc */
DeletePolygon, /* deleteProc */
DisplayPolygon, /* displayProc */
- TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */
+ TK_MOVABLE_POINTS, /* flags */
PolygonToPoint, /* pointProc */
PolygonToArea, /* areaProc */
PolygonToPostscript, /* postscriptProc */
@@ -446,7 +446,7 @@ ConfigurePolygon(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) polyPtr, flags|TK_CONFIG_OBJS)) {
+ objv, polyPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index d9759d7..f5b9a8b 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -236,8 +236,8 @@ TkCanvPostscriptObjCmd(
psInfo.prolog = 1;
psInfo.tkwin = tkwin;
Tcl_InitHashTable(&psInfo.fontTable, TCL_STRING_KEYS);
- result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, (const char **)objv+2,
- (char *) &psInfo, TK_CONFIG_ARGV_ONLY|TK_CONFIG_OBJS);
+ result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, objv+2,
+ &psInfo, TK_CONFIG_ARGV_ONLY);
if (result != TCL_OK) {
goto cleanup;
}
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index abc050c..a8c8ed1 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -276,7 +276,7 @@ Tk_ItemType tkTextType = {
TextCoords, /* coordProc */
DeleteText, /* deleteProc */
DisplayCanvText, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
TextToPoint, /* pointProc */
TextToArea, /* areaProc */
TextToPostscript, /* postscriptProc */
@@ -498,7 +498,7 @@ ConfigureText(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) textPtr, flags|TK_CONFIG_OBJS)) {
+ objv, textPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index e614b92..050ba3e 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = {
WinItemCoords, /* coordProc */
DeleteWinItem, /* deleteProc */
DisplayWinItem, /* displayProc */
- 1|TK_CONFIG_OBJS, /* flags */
+ TK_ALWAYS_REDRAW, /* flags */
WinItemToPoint, /* pointProc */
WinItemToArea, /* areaProc */
WinItemToPostscript, /* postscriptProc */
@@ -316,7 +316,7 @@ ConfigureWinItem(
oldWindow = winItemPtr->tkwin;
canvasTkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc,
- (const char **) objv, (char *) winItemPtr, flags|TK_CONFIG_OBJS)) {
+ objv, winItemPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 2d90e36..06b7be1 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -260,9 +260,6 @@ static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr,
static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr,
Tcl_Obj *const *objv, Tk_Uid uid, int enclosed);
static double GridAlign(double coord, double spacing);
-#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9)
-static const char** TkGetStringsFromObjs(Tcl_Size objc, Tcl_Obj *const *objv);
-#endif
static void InitCanvas(void);
static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr);
static Tcl_Obj * ScrollFractions(int screen1,
@@ -328,7 +325,7 @@ static inline int
AlwaysRedraw(
Tk_Item *itemPtr)
{
- return itemPtr->typePtr->alwaysRedraw & 1;
+ return itemPtr->typePtr->flags & TK_ALWAYS_REDRAW;
}
static inline int
@@ -339,25 +336,9 @@ ItemConfigure(
Tcl_Obj *const objv[])
{
Tcl_Interp *interp = canvasPtr->interp;
- int result;
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc, objv);
-
- result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, (Tcl_Obj **) args, TK_CONFIG_ARGV_ONLY);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
- }
- return result;
+ return itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
+ itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY);
}
static inline int
@@ -394,21 +375,9 @@ ItemCoords(
if (itemPtr->typePtr->coordProc == NULL) {
result = TCL_OK;
- } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, objv);
} else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc, objv);
-
result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, (Tcl_Obj **) args);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
+ itemPtr, objc, objv);
}
return result;
}
@@ -422,25 +391,9 @@ ItemCreate(
Tcl_Obj *const objv[])
{
Tcl_Interp *interp = canvasPtr->interp;
- int result;
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
+ return itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
itemPtr, objc-3, objv+3);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc-3, objv+3);
-
- result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc-3, (Tcl_Obj **) args);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
- }
- return result;
}
static inline void
@@ -494,17 +447,9 @@ ItemIndex(
if (itemPtr->typePtr->indexProc == NULL) {
return TCL_OK;
- } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objPtr, indexPtr);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, (Tcl_Obj *) Tcl_GetString(objPtr), indexPtr);
-#endif
}
+ return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
+ itemPtr, objPtr, indexPtr);
}
static inline void
@@ -514,17 +459,8 @@ ItemInsert(
int beforeThis,
Tcl_Obj *toInsert)
{
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
- beforeThis, toInsert);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
- beforeThis, (Tcl_Obj *) Tcl_GetString(toInsert));
-#endif
- }
+ itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
+ beforeThis, toInsert);
}
static inline int
@@ -1230,7 +1166,7 @@ CanvasWidgetCmd(
*/
if (itemPtr == NULL ||
- !(itemPtr->typePtr->alwaysRedraw & TK_MOVABLE_POINTS)) {
+ !(itemPtr->typePtr->flags & TK_MOVABLE_POINTS)) {
continue;
}
@@ -2324,8 +2260,8 @@ ConfigureCanvas(
Tk_State old_canvas_state=canvasPtr->canvas_state;
if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
- objc, (const char **) objv, (char *) canvasPtr,
- flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objc, objv, canvasPtr,
+ flags) != TCL_OK) {
return TCL_ERROR;
}
@@ -6090,43 +6026,7 @@ CanvasSetOrigin(
canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin),
canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin));
}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkGetStringsFromObjs --
- *
- * Results:
- * Converts object list into string list.
- *
- * Side effects:
- * Memory is allocated for the objv array, which must be freed using
- * ckfree() when no longer needed.
- *
- *----------------------------------------------------------------------
- */
-
-#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9)
-static const char **
-TkGetStringsFromObjs(
- Tcl_Size objc,
- Tcl_Obj *const objv[])
-{
- Tcl_Size i;
- const char **argv;
- if (objc <= 0) {
- return NULL;
- }
- argv = (const char **)ckalloc((objc+1) * sizeof(char *));
- for (i = 0; i < objc; i++) {
- argv[i] = Tcl_GetString(objv[i]);
- }
- argv[objc] = 0;
- return argv;
-}
-#endif
-
/*
*--------------------------------------------------------------
*
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 88aacd4..aa9c476 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -224,7 +224,7 @@ Tk_InitConsoleChannels(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return;
}
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 706d91a..21d1a54 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -142,8 +142,8 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp,
/* 29 */
EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- Tcl_Size argc, const char **argv,
- char *widgRec, int flags);
+ Tcl_Size objc, Tcl_Obj *const *objv,
+ void *widgRec, int flags);
/* 30 */
EXTERN void Tk_ConfigureWindow(Tk_Window tkwin,
unsigned int valueMask,
@@ -966,7 +966,7 @@ typedef struct TkStubs {
int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */
int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 27 */
int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 28 */
- int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size argc, const char **argv, char *widgRec, int flags); /* 29 */
+ int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags); /* 29 */
void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */
Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, Tcl_Size numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */
Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */
@@ -1862,6 +1862,16 @@ extern const TkStubs *tkStubsPtr;
#undef Tk_CreateOldPhotoImageFormat
#endif /* TK_NO_DEPRECATED */
+#if TK_MAJOR_VERSION < 9
+/* Restore 8.x signature of Tk_ConfigureWidget, but panic if TK_CONFIG_OBJS flag is not set */
+#undef Tk_ConfigureWidget
+#define Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) \
+ ((int (*)(Tcl_Interp *, Tk_Window, const Tk_ConfigSpec *, \
+ int, const char **, char *, int))(void *)(tkStubsPtr->tk_ConfigureWidget)) \
+ (((flags & TK_CONFIG_OBJS) ? interp : (Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory in Tk_ConfigureWidget"), \
+ NULL)), tkwin, specs, argc, argv, widgRec, flags)
+#endif
+
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 9344777..a06515f 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -240,7 +240,7 @@ ImgBmapConfigureModel(
int maskWidth, maskHeight, dummy1, dummy2;
if (Tk_ConfigureWidget(modelPtr->interp, Tk_MainWindow(modelPtr->interp),
- configSpecs, objc, (const char **) objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ configSpecs, objc, objv, modelPtr, flags) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 757fae4..b6596a6 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -2047,7 +2047,7 @@ ImgPhotoConfigureModel(
*/
if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs,
- objc, (const char **)objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objc, objv, modelPtr, flags) != TCL_OK) {
goto errorExit;
}
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 949afca..4419d70 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -187,7 +187,7 @@ Tk_MainEx(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
abort();
} else {
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index bb44763..fad288f 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -61,7 +61,7 @@ static void DeleteSpecCacheTable(void *clientData,
* will hold an error message.
*
* Side effects:
- * The fields of widgRec get filled in with information from argc/argv
+ * The fields of widgRec get filled in with information from objc/objv
* and the option database. Old information in widgRec's fields gets
* recycled. A copy of the spec-table is taken with (some of) the char*
* fields converted into Tk_Uid fields; this copy will be released when
@@ -76,9 +76,9 @@ Tk_ConfigureWidget(
Tk_Window tkwin, /* Window containing widget (needed to set up
* X resources). */
const Tk_ConfigSpec *specs, /* Describes legal options. */
- Tcl_Size argc, /* Number of elements in argv. */
- const char **argv, /* Command-line options. */
- char *widgRec, /* Record whose fields are to be modified.
+ Tcl_Size objc, /* Number of elements in objv. */
+ Tcl_Obj *const *objv, /* Command-line options. */
+ void *widgRec, /* Record whose fields are to be modified.
* Values must be properly initialized. */
int flags) /* Used to specify additional flags that must
* be present in config specs for them to be
@@ -125,18 +125,10 @@ Tk_ConfigureWidget(
* match entries in the specs.
*/
- for ( ; argc > 0; argc -= 2, argv += 2) {
+ for ( ; objc > 0; objc -= 2, objv += 2) {
const char *arg;
- if (flags & TK_CONFIG_OBJS) {
- arg = Tcl_GetString((Tcl_Obj *) *argv);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- arg = *argv;
-#endif
- }
+ arg = Tcl_GetString(*objv);
specPtr = FindConfigSpec(interp, staticSpecs, arg, needFlags, hateFlags);
if (specPtr == NULL) {
return TCL_ERROR;
@@ -146,21 +138,13 @@ Tk_ConfigureWidget(
* Process the entry.
*/
- if (argc < 2) {
+ if (objc < 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"value for \"%s\" missing", arg));
Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", NULL);
return TCL_ERROR;
}
- if (flags & TK_CONFIG_OBJS) {
- arg = Tcl_GetString((Tcl_Obj *) argv[1]);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- arg = argv[1];
-#endif
- }
+ arg = Tcl_GetString(objv[1]);
if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (processing \"%.40s\" option)",specPtr->argvName));
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 67b9d2b..626451c 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -171,7 +171,7 @@ Tk_ItemType tkRectangleType = {
RectOvalCoords, /* coordProc */
DeleteRectOval, /* deleteProc */
DisplayRectOval, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
RectToPoint, /* pointProc */
RectToArea, /* areaProc */
RectOvalToPostscript, /* postscriptProc */
@@ -196,7 +196,7 @@ Tk_ItemType tkOvalType = {
RectOvalCoords, /* coordProc */
DeleteRectOval, /* deleteProc */
DisplayRectOval, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
OvalToPoint, /* pointProc */
OvalToArea, /* areaProc */
RectOvalToPostscript, /* postscriptProc */
@@ -416,7 +416,7 @@ ConfigureRectOval(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **)objv, (char *) rectOvalPtr, flags|TK_CONFIG_OBJS)) {
+ objv, rectOvalPtr, flags)) {
return TCL_ERROR;
}
state = itemPtr->state;
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index 4fb8b3c..4c0ef99 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.c
@@ -532,7 +532,7 @@ ConfigureScrollbar(
int flags) /* Flags to pass to Tk_ConfigureWidget. */
{
if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc,
- (const char **)objv, (char *) scrollPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objv, (char *) scrollPtr, flags) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkTest.c b/generic/tkTest.c
index dd3764e..45df92c 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -240,7 +240,7 @@ Tktest_Init(
{
static int initialized = 0;
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}
if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 37cda60..3587ec1 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3181,7 +3181,7 @@ Initialize(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}