summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-13 22:39:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-13 22:39:14 (GMT)
commit8baf7d337ca0aab7fafb0e670927ab2c0200e80a (patch)
treef9895e015c28307b00ab11e88a52567b90cac9c7
parent4a95c9f7b470865b6c28e0eb34b8bf725a8951cf (diff)
downloadtk-8baf7d337ca0aab7fafb0e670927ab2c0200e80a.zip
tk-8baf7d337ca0aab7fafb0e670927ab2c0200e80a.tar.gz
tk-8baf7d337ca0aab7fafb0e670927ab2c0200e80a.tar.bz2
Fix use of DEF_LABEL_FG with Tcl 9.0 headers. Doc fix, various other tweaks
-rw-r--r--doc/menu.n2
-rw-r--r--generic/tkButton.c7
-rw-r--r--generic/tkDecls.h3
-rw-r--r--generic/tkEvent.c2
-rw-r--r--generic/tkGrab.c2
-rw-r--r--generic/tkInt.h2
-rw-r--r--generic/tkWindow.c2
-rw-r--r--unix/tkUnix3d.c4
-rw-r--r--unix/tkUnixColor.c1
-rw-r--r--unix/tkUnixDefault.h1
-rw-r--r--unix/tkUnixEvent.c1
-rw-r--r--win/tkWinDefault.h1
12 files changed, 15 insertions, 13 deletions
diff --git a/doc/menu.n b/doc/menu.n
index 45ef264..df8614b 100644
--- a/doc/menu.n
+++ b/doc/menu.n
@@ -451,7 +451,7 @@ information on the format of this list).
\fIpathName \fBindex \fIindex\fR
.
Returns the numerical index corresponding to \fIindex\fR, or
-\fB{}\fR if \fIindex\fR was specified as \fB{} or \fBnone\fR\fR.
+\fB{}\fR if \fIindex\fR was specified as \fB{}\fR or \fBnone\fR.
.TP
\fIpathName \fBinsert \fIindex type \fR?\fIoption value option value ...\fR?
.
diff --git a/generic/tkButton.c b/generic/tkButton.c
index e40f3b8..057b11c 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -104,13 +104,8 @@ static const Tk_OptionSpec labelOptionSpecs[] = {
NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
DEF_BUTTON_FONT, TCL_INDEX_NONE, offsetof(TkButton, tkfont), 0, 0, 0},
-#ifdef DEF_LABEL_FG
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_LABEL_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0},
-#else
- {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0},
-#endif
+ DEF_LABEL_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index b7b0c14..f2fe64c 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -1188,8 +1188,7 @@ typedef struct TkStubs {
Tcl_Obj * (*tk_NewWindowObj) (Tk_Window tkwin); /* 277 */
void (*tk_SendVirtualEvent) (Tk_Window tkwin, const char *eventName, Tcl_Obj *detail); /* 278 */
Tcl_Obj * (*tk_FontGetDescription) (Tk_Font tkfont); /* 279 */
- void (*tk_CreatePhotoImageFormatVersion3) (
- const Tk_PhotoImageFormatVersion3 *formatPtr); /* 280 */
+ void (*tk_CreatePhotoImageFormatVersion3) (const Tk_PhotoImageFormatVersion3 *formatPtr); /* 280 */
} TkStubs;
extern const TkStubs *tkStubsPtr;
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 698e9e1..0b37119 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -1842,7 +1842,7 @@ DelayedMotionProc(
void
TkCreateExitHandler(
Tcl_ExitProc *proc, /* Function to invoke. */
- ClientData clientData) /* Arbitrary value to pass to proc. */
+ void *clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
diff --git a/generic/tkGrab.c b/generic/tkGrab.c
index c1955a0..24bfd83 100644
--- a/generic/tkGrab.c
+++ b/generic/tkGrab.c
@@ -16,6 +16,8 @@
#include "tkWinInt.h"
#elif !defined(MAC_OSX_TK)
#include "tkUnixInt.h"
+#else
+#include "tkMacOSXInt.h"
#endif
/*
diff --git a/generic/tkInt.h b/generic/tkInt.h
index d7c4b12..031630b 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1327,7 +1327,7 @@ MODULE_SCOPE const char *TkCanvasTagsPrintProc(ClientData clientData, Tk_Window
MODULE_SCOPE void TkMapTopFrame(Tk_Window tkwin);
MODULE_SCOPE XEvent * TkpGetBindingXEvent(Tcl_Interp *interp);
MODULE_SCOPE void TkCreateExitHandler(Tcl_ExitProc *proc,
- ClientData clientData);
+ void *clientData);
MODULE_SCOPE void TkDeleteExitHandler(Tcl_ExitProc *proc,
ClientData clientData);
MODULE_SCOPE Tcl_ExitProc TkFinalize;
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index dcaaf69..917eadd 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -2863,7 +2863,7 @@ TkCygwinMainEx(
void (*tkmainex)(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
/* construct "<path>/libtk8.?.dll", from "<path>/tk8?.dll" */
- len = GetModuleFileNameW(Tk_GetHINSTANCE(), name, MAX_PATH);
+ len = GetModuleFileNameW((HINSTANCE)Tk_GetHINSTANCE(), name, MAX_PATH);
name[len-2] = '.';
name[len-1] = name[len-5];
wcscpy(name+len, L".dll");
diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c
index 13bbf06..f977624 100644
--- a/unix/tkUnix3d.c
+++ b/unix/tkUnix3d.c
@@ -13,7 +13,9 @@
#include "tkInt.h"
#include "tk3d.h"
-#if !(defined(_WIN32) || defined(MAC_OSX_TK))
+#if defined(MAC_OSX_TK)
+#include "tkMacOSXInt.h"
+#else
#include "tkUnixInt.h"
#endif
diff --git a/unix/tkUnixColor.c b/unix/tkUnixColor.c
index 9bcba0e..eccec3b 100644
--- a/unix/tkUnixColor.c
+++ b/unix/tkUnixColor.c
@@ -423,6 +423,7 @@ DeleteStressedCmap(
*----------------------------------------------------------------------
*/
+#undef TkpCmapStressed
int
TkpCmapStressed(
Tk_Window tkwin, /* Window that identifies the display
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index 3cae17b..8d91293 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -56,6 +56,7 @@
#define DEF_BUTTON_DEFAULT "disabled"
#define DEF_BUTTON_DISABLED_FG_COLOR DISABLED
#define DEF_BUTTON_DISABLED_FG_MONO ""
+#define DEF_LABEL_FG BLACK
#define DEF_BUTTON_FG BLACK
#define DEF_CHKRAD_FG DEF_BUTTON_FG
#define DEF_BUTTON_FONT "TkDefaultFont"
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 5c0f311..59ba9de 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -663,6 +663,7 @@ TkUnixDoOneXEvent(
*----------------------------------------------------------------------
*/
+#undef TkpSync
void
TkpSync(
Display *display) /* Display to sync. */
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index 0a747d9..992c7cc 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -59,6 +59,7 @@
#define DEF_BUTTON_DEFAULT "disabled"
#define DEF_BUTTON_DISABLED_FG_COLOR DISABLED
#define DEF_BUTTON_DISABLED_FG_MONO ""
+#define DEF_LABEL_FG NORMAL_FG
#define DEF_BUTTON_FG NORMAL_FG
#define DEF_CHKRAD_FG TEXT_FG
#define DEF_BUTTON_FONT "TkDefaultFont"