summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-28 09:36:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-28 09:36:12 (GMT)
commit078bc1618f77b4a7e2ad2a8ea73125e5979bea24 (patch)
treee77064f6aba766c97bc440bdf42c931d7443a268
parent9cfbd3e51461d673752779dc1a09e8011a701846 (diff)
downloadtk-078bc1618f77b4a7e2ad2a8ea73125e5979bea24.zip
tk-078bc1618f77b4a7e2ad2a8ea73125e5979bea24.tar.gz
tk-078bc1618f77b4a7e2ad2a8ea73125e5979bea24.tar.bz2
Export TkMacOSXGetTkWindow() for TkDND, without this it cannot be compiled as stub-enabled extension
-rw-r--r--generic/tk.decls3
-rw-r--r--generic/tkPlatDecls.h8
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--macosx/tkMacOSXPrivate.h1
-rw-r--r--macosx/tkMacOSXWm.c6
5 files changed, 12 insertions, 8 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 3e64878..0d6c7a1 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -1139,6 +1139,9 @@ declare 9 aqua {
declare 10 aqua {
int Tk_MacOSXIsAppInFront(void)
}
+declare 11 aqua {
+ TkWindow* TkMacOSXGetTkWindow(void *w)
+}
declare 16 aqua {
void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width,
int height, int flags)
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h
index ed8b1f5..f2eb7bf 100644
--- a/generic/tkPlatDecls.h
+++ b/generic/tkPlatDecls.h
@@ -82,7 +82,8 @@ EXTERN void * TkMacOSXGetRootControl(Drawable drawable);
EXTERN void Tk_MacOSXSetupTkNotifier(void);
/* 10 */
EXTERN int Tk_MacOSXIsAppInFront(void);
-/* Slot 11 is reserved */
+/* 11 */
+EXTERN TkWindow* TkMacOSXGetTkWindow(void *w);
/* Slot 12 is reserved */
/* Slot 13 is reserved */
/* Slot 14 is reserved */
@@ -116,7 +117,7 @@ typedef struct TkPlatStubs {
void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */
int (*tk_MacOSXIsAppInFront) (void); /* 10 */
- void (*reserved11)(void);
+ TkWindow* (*tkMacOSXGetTkWindow) (void *w); /* 11 */
void (*reserved12)(void);
void (*reserved13)(void);
void (*reserved14)(void);
@@ -174,7 +175,8 @@ extern const TkPlatStubs *tkPlatStubsPtr;
(tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
#define Tk_MacOSXIsAppInFront \
(tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
-/* Slot 11 is reserved */
+#define TkMacOSXGetTkWindow \
+ (tkPlatStubsPtr->tkMacOSXGetTkWindow) /* 11 */
/* Slot 12 is reserved */
/* Slot 13 is reserved */
/* Slot 14 is reserved */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index c69ecac..52b545c 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -1013,7 +1013,7 @@ static const TkPlatStubs tkPlatStubs = {
TkMacOSXGetRootControl, /* 8 */
Tk_MacOSXSetupTkNotifier, /* 9 */
Tk_MacOSXIsAppInFront, /* 10 */
- 0, /* 11 */
+ TkMacOSXGetTkWindow, /* 11 */
0, /* 12 */
0, /* 13 */
0, /* 14 */
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index e62456c..c4ef1b6 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -283,7 +283,6 @@ MODULE_SCOPE NSImage* TkMacOSXGetNSImageFromBitmap(Display *display,
Pixmap bitmap, GC gc, int width, int height);
MODULE_SCOPE CGColorRef TkMacOSXCreateCGColor(GC gc, unsigned long pixel);
MODULE_SCOPE NSColor* TkMacOSXGetNSColor(GC gc, unsigned long pixel);
-MODULE_SCOPE TkWindow* TkMacOSXGetTkWindow(NSWindow *w);
MODULE_SCOPE NSFont* TkMacOSXNSFontForFont(Tk_Font tkfont);
MODULE_SCOPE NSDictionary* TkMacOSXNSFontAttributesForFont(Tk_Font tkfont);
MODULE_SCOPE NSModalSession TkMacOSXGetModalSession(void);
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 1dc79e4..8918866 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5425,11 +5425,11 @@ TkMacOSXGetXWindow(
*----------------------------------------------------------------------
*/
-TkWindow*
+TkWindow *
TkMacOSXGetTkWindow(
- NSWindow *w)
+ void *w)
{
- Window window = TkMacOSXGetXWindow(w);
+ Window window = TkMacOSXGetXWindow((NSWindow *)w);
TkDisplay *dispPtr = TkGetDisplayList();
return (window != None ?