From da68cb938e2bec4280883c4052906b9811aadf7c Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 29 May 2012 14:57:44 +0000 Subject: Added OSX-specific mechanism to allow retrieval of the drawing surface. --- ChangeLog | 6 ++++++ carbon/tkMacOSXSubwindows.c | 7 +++++++ generic/tkInt.decls | 5 +++++ generic/tkIntPlatDecls.h | 5 +++++ generic/tkStubInit.c | 1 + macosx/tkMacOSXSubwindows.c | 7 +++++++ 6 files changed, 31 insertions(+) diff --git a/ChangeLog b/ChangeLog index 37dfceb..6bcd66c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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-05-28 Francois Vogel * doc/text.n: [Bug 1630251]: Documentation for -endline option was wrong diff --git a/carbon/tkMacOSXSubwindows.c b/carbon/tkMacOSXSubwindows.c index 23e73ff..437906f 100644 --- a/carbon/tkMacOSXSubwindows.c +++ b/carbon/tkMacOSXSubwindows.c @@ -1051,6 +1051,13 @@ TkMacOSXDrawableWindow( } return result; } + +void * +TkMacOSXDrawable( + Drawable drawable) +{ + return TkMacOSXDrawableWindow(drawable); +} /* *---------------------------------------------------------------------- diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 7e33de4..480f596 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1027,6 +1027,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 b940db9..e2528d8 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -249,6 +249,8 @@ EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin); /* Slot 52 is reserved */ /* 53 */ EXTERN unsigned long TkpGetMS(void); +/* 54 */ +EXTERN void * TkMacOSXDrawable(Drawable drawable); #endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ /* 0 */ @@ -388,6 +390,7 @@ typedef struct TkIntPlatStubs { void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */ void (*reserved52)(void); 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 */ @@ -615,6 +618,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 52 is reserved */ #define TkpGetMS \ (tkIntPlatStubsPtr->tkpGetMS) /* 53 */ +#define TkMacOSXDrawable \ + (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */ #endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ #define TkCreateXEventSource \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 66b1b80..34cf671 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -555,6 +555,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkGenWMDestroyEvent, /* 51 */ 0, /* 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 2933876..8cf8d65 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -969,6 +969,13 @@ TkMacOSXDrawableWindow( } return result; } + +void * +TkMacOSXDrawable( + Drawable drawable) +{ + return TkMacOSXDrawableWindow(drawable); +} /* *---------------------------------------------------------------------- -- cgit v0.12