summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-31 21:34:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-31 21:34:30 (GMT)
commit13eac4f6e1e2bd707f065365379246227962d632 (patch)
treed94855edeed9ef24275b5a15134505906637bca9 /generic
parentb077b2bc1b970fa85f89c9b5286b40a6797eb93b (diff)
downloadtk-13eac4f6e1e2bd707f065365379246227962d632.zip
tk-13eac4f6e1e2bd707f065365379246227962d632.tar.gz
tk-13eac4f6e1e2bd707f065365379246227962d632.tar.bz2
Make TkpWillDrawWidget()/TkpRedrawWidget() available to all platforms, not only MacOSX
Diffstat (limited to 'generic')
-rw-r--r--generic/tkInt.decls4
-rw-r--r--generic/tkIntDecls.h26
-rw-r--r--generic/tkStubInit.c18
-rw-r--r--generic/tkTextDisp.c5
4 files changed, 5 insertions, 48 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 28cddd2..2640196 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -636,10 +636,10 @@ declare 184 {
}
# Support for aqua's inability to draw outside [NSView drawRect:]
-declare 185 macosx {
+declare 185 {
void TkpRedrawWidget(Tk_Window tkwin)
}
-declare 186 macosx {
+declare 186 {
int TkpWillDrawWidget(Tk_Window tkwin)
}
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index de7e9fc..a2f57ac 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -559,14 +559,10 @@ EXTERN void TkDrawAngledChars(Display *display,
Drawable drawable, GC gc, Tk_Font tkfont,
const char *source, int numBytes, double x,
double y, double angle);
-#ifdef MAC_OSX_TCL /* MACOSX */
/* 185 */
EXTERN void TkpRedrawWidget(Tk_Window tkwin);
-#endif /* MACOSX */
-#ifdef MAC_OSX_TCL /* MACOSX */
/* 186 */
EXTERN int TkpWillDrawWidget(Tk_Window tkwin);
-#endif /* MACOSX */
/* 187 */
EXTERN int TkDebugPhotoStringMatchDef(Tcl_Interp *inter,
Tcl_Obj *data, Tcl_Obj *formatString,
@@ -788,24 +784,8 @@ typedef struct TkIntStubs {
void (*tkUnderlineAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int underline); /* 182 */
int (*tkIntersectAngledTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height, double angle); /* 183 */
void (*tkDrawAngledChars) (Display *display, Drawable drawable, GC gc, Tk_Font tkfont, const char *source, int numBytes, double x, double y, double angle); /* 184 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- void (*reserved185)(void);
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- void (*reserved185)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
void (*tkpRedrawWidget) (Tk_Window tkwin); /* 185 */
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- void (*reserved186)(void);
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- void (*reserved186)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
int (*tkpWillDrawWidget) (Tk_Window tkwin); /* 186 */
-#endif /* MACOSX */
int (*tkDebugPhotoStringMatchDef) (Tcl_Interp *inter, Tcl_Obj *data, Tcl_Obj *formatString, int *widthPtr, int *heightPtr); /* 187 */
} TkIntStubs;
@@ -1179,14 +1159,10 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkIntersectAngledTextLayout) /* 183 */
#define TkDrawAngledChars \
(tkIntStubsPtr->tkDrawAngledChars) /* 184 */
-#ifdef MAC_OSX_TCL /* MACOSX */
#define TkpRedrawWidget \
(tkIntStubsPtr->tkpRedrawWidget) /* 185 */
-#endif /* MACOSX */
-#ifdef MAC_OSX_TCL /* MACOSX */
#define TkpWillDrawWidget \
(tkIntStubsPtr->tkpWillDrawWidget) /* 186 */
-#endif /* MACOSX */
#define TkDebugPhotoStringMatchDef \
(tkIntStubsPtr->tkDebugPhotoStringMatchDef) /* 187 */
@@ -1225,7 +1201,7 @@ extern const TkIntStubs *tkIntStubsPtr;
# define TkpMakeWindow ((Window (*)(TkWindow *, Window))(void *)Tk_MakeWindow)
#endif
-#if !defined(MAC_OSX_TK)
+#if !defined(MAC_OSX_TCL)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
# define TkpWillDrawWidget(w) 0
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 8a18796..0b19dbf 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -120,7 +120,7 @@ static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj)
(const char *(*) (void *,Tk_Window, char *, int, \
Tcl_FreeProc **))(void *)TkCanvasTagsPrintProc
-#if !defined(MAC_OSX_TK) && defined(MAC_OSX_TCL)
+#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
# define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing)
@@ -514,24 +514,8 @@ static const TkIntStubs tkIntStubs = {
TkUnderlineAngledTextLayout, /* 182 */
TkIntersectAngledTextLayout, /* 183 */
TkDrawAngledChars, /* 184 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- 0, /* 185 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- 0, /* 185 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
TkpRedrawWidget, /* 185 */
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- 0, /* 186 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- 0, /* 186 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
TkpWillDrawWidget, /* 186 */
-#endif /* MACOSX */
TkDebugPhotoStringMatchDef, /* 187 */
};
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 906190a..651cb96 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -22,12 +22,9 @@
#include "tkUnixInt.h"
#elif defined(MAC_OSX_TK)
#include "tkMacOSXInt.h"
-#define OK_TO_LOG (!TkpWillDrawWidget(textPtr->tkwin))
#endif
-#if !defined(MAC_OSX_TK)
-#define OK_TO_LOG 1
-#endif
+#define OK_TO_LOG (!TkpWillDrawWidget(textPtr->tkwin))
/*
* "Calculations of line pixel heights and the size of the vertical