summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreask <andreask>2012-10-09 17:40:09 (GMT)
committerandreask <andreask>2012-10-09 17:40:09 (GMT)
commit34503c379176b9ccdae64491677af2d05d07fad3 (patch)
tree5f8696828dd980e8c20a6717ee7ebf370cc25b42
parent7f4870654825831b4547a63422ede867f6d60f00 (diff)
downloadtk-34503c379176b9ccdae64491677af2d05d07fad3.zip
tk-34503c379176b9ccdae64491677af2d05d07fad3.tar.gz
tk-34503c379176b9ccdae64491677af2d05d07fad3.tar.bz2
Cherrypick Merge, Backport of [6223d9e067]. Restored from
tk-cocoa-8-5-bacport-branch, did not survive the merge. See trunk 2012-05-29 Donal K. Fellows * generic/tkInt.decls (TkMacOSXDrawable): Added OSX-specific mechanism to allow retrieval of the drawing surface. Allows Canvas3d to be adapted to 8.6.
-rw-r--r--ChangeLog10
-rw-r--r--generic/tkInt.decls5
-rw-r--r--generic/tkIntPlatDecls.h10
-rw-r--r--generic/tkStubInit.c1
-rw-r--r--macosx/tkMacOSXSubwindows.c7
5 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b0daed..f4b349f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-10-09 Andreas Kupries <andreask@activestate.com>
+
+ Cherrypick Merge, Backport of [6223d9e067]. Restored from
+ tk-cocoa-8-5-bacport-branch, did not survive the merge.
+ See trunk 2012-05-29 Donal K. Fellows
+
+ * generic/tkInt.decls (TkMacOSXDrawable): Added OSX-specific mechanism
+ to allow retrieval of the drawing surface. Allows Canvas3d to be
+ adapted to 8.6.
+
2012-09-28 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tkInt.h: Add 8 colors to the supported color list
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 84e1bc3..36475df 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -963,6 +963,11 @@ declare 51 aqua {
declare 53 aqua {
unsigned long TkpGetMS(void)
}
+
+# For Canvas3d, requested by Sean Woods
+declare 54 aqua {
+ void *TkMacOSXDrawable(Drawable drawable)
+}
##############################################################################
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index 5418473..a181073 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -522,6 +522,11 @@ EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin);
/* 53 */
EXTERN unsigned long TkpGetMS(void);
#endif
+#ifndef TkMacOSXDrawable_TCL_DECLARED
+#define TkMacOSXDrawable_TCL_DECLARED
+/* 54 */
+EXTERN VOID * TkMacOSXDrawable(Drawable drawable);
+#endif
#endif /* AQUA */
#if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
#ifndef TkCreateXEventSource_TCL_DECLARED
@@ -706,6 +711,7 @@ typedef struct TkIntPlatStubs {
void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */
VOID *reserved52;
unsigned long (*tkpGetMS) (void); /* 53 */
+ VOID * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */
#endif /* AQUA */
#if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
void (*tkCreateXEventSource) (void); /* 0 */
@@ -1115,6 +1121,10 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkpGetMS \
(tkIntPlatStubsPtr->tkpGetMS) /* 53 */
#endif
+#ifndef TkMacOSXDrawable
+#define TkMacOSXDrawable \
+ (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */
+#endif
#endif /* AQUA */
#if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
#ifndef TkCreateXEventSource
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index cee9133..c2ef290 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -584,6 +584,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkGenWMDestroyEvent, /* 51 */
NULL, /* 52 */
TkpGetMS, /* 53 */
+ TkMacOSXDrawable, /* 54 */
#endif /* AQUA */
#if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
TkCreateXEventSource, /* 0 */
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 2eb4ee8..7d1a5eb 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -971,6 +971,13 @@ TkMacOSXDrawableWindow(
}
return result;
}
+
+void *
+TkMacOSXDrawable(
+ Drawable drawable)
+{
+ return TkMacOSXDrawableWindow(drawable);
+}
/*
*----------------------------------------------------------------------