summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls4
-rw-r--r--generic/tkInt.h5
-rw-r--r--generic/tkPlatDecls.h21
-rw-r--r--generic/tkStubInit.c4
-rw-r--r--generic/tkWindow.c2
5 files changed, 18 insertions, 18 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 12b8062..8d13223 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -1140,10 +1140,10 @@ declare 10 aqua {
int Tk_MacOSXIsAppInFront(void)
}
declare 11 aqua {
- TkWindow* TkMacOSXGetTkWindow(void *w)
+ Tk_Window Tk_MacOSXGetTkWindow(void *w)
}
declare 12 aqua {
- void *TkMacOSXGetCGContextForDrawable(Drawable drawable)
+ void *Tk_MacOSXGetCGContextForDrawable(Drawable drawable)
}
declare 16 aqua {
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 2f64f99..23605cf 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
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h
index 3485f35..7bf3d7e 100644
--- a/generic/tkPlatDecls.h
+++ b/generic/tkPlatDecls.h
@@ -83,9 +83,9 @@ EXTERN void Tk_MacOSXSetupTkNotifier(void);
/* 10 */
EXTERN int Tk_MacOSXIsAppInFront(void);
/* 11 */
-EXTERN TkWindow* TkMacOSXGetTkWindow(void *w);
+EXTERN Tk_Window Tk_MacOSXGetTkWindow(void *w);
/* 12 */
-EXTERN void * TkMacOSXGetCGContextForDrawable(Drawable drawable);
+EXTERN void * Tk_MacOSXGetCGContextForDrawable(Drawable drawable);
/* Slot 13 is reserved */
/* Slot 14 is reserved */
/* Slot 15 is reserved */
@@ -118,8 +118,8 @@ typedef struct TkPlatStubs {
void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */
int (*tk_MacOSXIsAppInFront) (void); /* 10 */
- TkWindow* (*tkMacOSXGetTkWindow) (void *w); /* 11 */
- void * (*tkMacOSXGetCGContextForDrawable) (Drawable drawable); /* 12 */
+ Tk_Window (*tk_MacOSXGetTkWindow) (void *w); /* 11 */
+ void * (*tk_MacOSXGetCGContextForDrawable) (Drawable drawable); /* 12 */
void (*reserved13)(void);
void (*reserved14)(void);
void (*reserved15)(void);
@@ -176,10 +176,10 @@ extern const TkPlatStubs *tkPlatStubsPtr;
(tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
#define Tk_MacOSXIsAppInFront \
(tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
-#define TkMacOSXGetTkWindow \
- (tkPlatStubsPtr->tkMacOSXGetTkWindow) /* 11 */
-#define TkMacOSXGetCGContextForDrawable \
- (tkPlatStubsPtr->tkMacOSXGetCGContextForDrawable) /* 12 */
+#define Tk_MacOSXGetTkWindow \
+ (tkPlatStubsPtr->tk_MacOSXGetTkWindow) /* 11 */
+#define Tk_MacOSXGetCGContextForDrawable \
+ (tkPlatStubsPtr->tk_MacOSXGetCGContextForDrawable) /* 12 */
/* Slot 13 is reserved */
/* Slot 14 is reserved */
/* Slot 15 is reserved */
@@ -198,11 +198,6 @@ extern const TkPlatStubs *tkPlatStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-/* Those cannot be used (yet) in stub-enabled extensions on MacOS */
-#ifdef MAC_OSX_TK /* AQUA */
-#undef TkMacOSXGetTkWindow
-#undef TkMacOSXGetCGContextForDrawable
-#endif
#undef TkGenWMConfigureEvent_
#endif /* _TKPLATDECLS */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 4cd4ba9..f3107b9 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -1013,8 +1013,8 @@ static const TkPlatStubs tkPlatStubs = {
TkMacOSXGetRootControl, /* 8 */
Tk_MacOSXSetupTkNotifier, /* 9 */
Tk_MacOSXIsAppInFront, /* 10 */
- TkMacOSXGetTkWindow, /* 11 */
- TkMacOSXGetCGContextForDrawable, /* 12 */
+ Tk_MacOSXGetTkWindow, /* 11 */
+ Tk_MacOSXGetCGContextForDrawable, /* 12 */
0, /* 13 */
0, /* 14 */
0, /* 15 */
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));