diff options
-rw-r--r-- | generic/tk.decls | 20 | ||||
-rw-r--r-- | generic/tkPlatDecls.h | 50 | ||||
-rw-r--r-- | generic/tkStubInit.c | 15 | ||||
-rw-r--r-- | macosx/tkMacOSXScale.c | 31 |
4 files changed, 20 insertions, 96 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index ee1d97b..3e64878 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -1139,26 +1139,6 @@ declare 9 aqua { declare 10 aqua { int Tk_MacOSXIsAppInFront(void) } -declare 11 aqua { - void Tk_MacOSXSetEmbedHandler_( - Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, - Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, - Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, - Tk_MacOSXEmbedGetClipProc *getClipProc, - Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc) -} -declare 12 aqua { - void Tk_MacOSXTurnOffMenus_(void) -} -declare 13 aqua { - void Tk_MacOSXTkOwnsCursor_(int tkOwnsIt) -} -declare 14 aqua { - void TkMacOSXInitMenus_(Tcl_Interp *interp) -} -declare 15 aqua { - void TkMacOSXInitAppleEvents_(Tcl_Interp *interp) -} 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 db9141c..ed8b1f5 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -82,21 +82,11 @@ EXTERN void * TkMacOSXGetRootControl(Drawable drawable); EXTERN void Tk_MacOSXSetupTkNotifier(void); /* 10 */ EXTERN int Tk_MacOSXIsAppInFront(void); -/* 11 */ -EXTERN void Tk_MacOSXSetEmbedHandler_( - Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, - Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, - Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, - Tk_MacOSXEmbedGetClipProc *getClipProc, - Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); -/* 12 */ -EXTERN void Tk_MacOSXTurnOffMenus_(void); -/* 13 */ -EXTERN void Tk_MacOSXTkOwnsCursor_(int tkOwnsIt); -/* 14 */ -EXTERN void TkMacOSXInitMenus_(Tcl_Interp *interp); -/* 15 */ -EXTERN void TkMacOSXInitAppleEvents_(Tcl_Interp *interp); +/* Slot 11 is reserved */ +/* Slot 12 is reserved */ +/* Slot 13 is reserved */ +/* Slot 14 is reserved */ +/* Slot 15 is reserved */ /* 16 */ EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width, int height, int flags); @@ -126,11 +116,11 @@ typedef struct TkPlatStubs { void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */ void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */ int (*tk_MacOSXIsAppInFront) (void); /* 10 */ - void (*tk_MacOSXSetEmbedHandler_) (Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); /* 11 */ - void (*tk_MacOSXTurnOffMenus_) (void); /* 12 */ - void (*tk_MacOSXTkOwnsCursor_) (int tkOwnsIt); /* 13 */ - void (*tkMacOSXInitMenus_) (Tcl_Interp *interp); /* 14 */ - void (*tkMacOSXInitAppleEvents_) (Tcl_Interp *interp); /* 15 */ + void (*reserved11)(void); + void (*reserved12)(void); + void (*reserved13)(void); + void (*reserved14)(void); + void (*reserved15)(void); void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 16 */ #endif /* AQUA */ } TkPlatStubs; @@ -184,16 +174,11 @@ extern const TkPlatStubs *tkPlatStubsPtr; (tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */ #define Tk_MacOSXIsAppInFront \ (tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */ -#define Tk_MacOSXSetEmbedHandler_ \ - (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler_) /* 11 */ -#define Tk_MacOSXTurnOffMenus_ \ - (tkPlatStubsPtr->tk_MacOSXTurnOffMenus_) /* 12 */ -#define Tk_MacOSXTkOwnsCursor_ \ - (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor_) /* 13 */ -#define TkMacOSXInitMenus_ \ - (tkPlatStubsPtr->tkMacOSXInitMenus_) /* 14 */ -#define TkMacOSXInitAppleEvents_ \ - (tkPlatStubsPtr->tkMacOSXInitAppleEvents_) /* 15 */ +/* Slot 11 is reserved */ +/* Slot 12 is reserved */ +/* Slot 13 is reserved */ +/* Slot 14 is reserved */ +/* Slot 15 is reserved */ #define TkGenWMConfigureEvent_ \ (tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 16 */ #endif /* AQUA */ @@ -202,11 +187,6 @@ extern const TkPlatStubs *tkPlatStubsPtr; /* !END!: Do not edit above this line. */ -#undef Tk_MacOSXSetEmbedHandler_ -#undef Tk_MacOSXTurnOffMenus_ -#undef Tk_MacOSXTkOwnsCursor_ -#undef TkMacOSXInitMenus_ -#undef TkMacOSXInitAppleEvents_ #undef TkGenWMConfigureEvent_ #ifdef __cplusplus diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 0020fac..c69ecac 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -55,11 +55,6 @@ MODULE_SCOPE const TkStubs tkStubs; #define TkWmCleanup_ TkWmCleanup #define TkSendCleanup_ TkSendCleanup #define TkpTestsendCmd_ TkpTestsendCmd -#define Tk_MacOSXSetEmbedHandler_ Tk_MacOSXSetEmbedHandler -#define Tk_MacOSXTurnOffMenus_ Tk_MacOSXTurnOffMenus -#define Tk_MacOSXTkOwnsCursor_ Tk_MacOSXTkOwnsCursor -#define TkMacOSXInitMenus_ TkMacOSXInitMenus -#define TkMacOSXInitAppleEvents_ TkMacOSXInitAppleEvents #define TkGenWMConfigureEvent_ TkGenWMConfigureEvent #define TkGenerateActivateEvents_ TkGenerateActivateEvents @@ -1018,11 +1013,11 @@ static const TkPlatStubs tkPlatStubs = { TkMacOSXGetRootControl, /* 8 */ Tk_MacOSXSetupTkNotifier, /* 9 */ Tk_MacOSXIsAppInFront, /* 10 */ - Tk_MacOSXSetEmbedHandler_, /* 11 */ - Tk_MacOSXTurnOffMenus_, /* 12 */ - Tk_MacOSXTkOwnsCursor_, /* 13 */ - TkMacOSXInitMenus_, /* 14 */ - TkMacOSXInitAppleEvents_, /* 15 */ + 0, /* 11 */ + 0, /* 12 */ + 0, /* 13 */ + 0, /* 14 */ + 0, /* 15 */ TkGenWMConfigureEvent_, /* 16 */ #endif /* AQUA */ }; diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c index 80b1bda..b1e918b 100644 --- a/macosx/tkMacOSXScale.c +++ b/macosx/tkMacOSXScale.c @@ -149,8 +149,6 @@ TkpDisplayScale( MacScale *macScalePtr = clientData; Rect r; WindowRef windowRef; - CGrafPtr destPort, savePort; - Boolean portChanged; MacDrawable *macDraw; SInt32 initialValue, minValue, maxValue; UInt16 numTicks; @@ -216,9 +214,7 @@ TkpDisplayScale( */ macDraw = (MacDrawable *) Tk_WindowId(tkwin); - destPort = TkMacOSXGetDrawablePort(Tk_WindowId(tkwin)); windowRef = TkMacOSXDrawableWindow(Tk_WindowId(tkwin)); - portChanged = QDSwapPort(destPort, &savePort); /* * Create Macintosh control. @@ -291,10 +287,6 @@ TkpDisplayScale( SetControlVisibility(macScalePtr->scaleHandle, true, true); HiliteControl(macScalePtr->scaleHandle, 0); Draw1Control(macScalePtr->scaleHandle); - - if (portChanged) { - QDSwapPort(savePort, NULL); - } done: scalePtr->flags &= ~REDRAW_ALL; } @@ -326,14 +318,10 @@ TkpScaleElement( ControlPartCode part; Point where; Rect bounds; - CGrafPtr destPort, savePort; - Boolean portChanged; #ifdef TK_MAC_DEBUG_SCALE TkMacOSXDbgMsg("TkpScaleElement"); #endif - destPort = TkMacOSXGetDrawablePort(Tk_WindowId(scalePtr->tkwin)); - portChanged = QDSwapPort(destPort, &savePort); /* * All of the calculations in this procedure mirror those in @@ -345,10 +333,6 @@ TkpScaleElement( where.v = y + bounds.top; part = TestControl(macScalePtr->scaleHandle, where); - if (portChanged) { - QDSwapPort(savePort, NULL); - } - #ifdef TK_MAC_DEBUG_SCALE fprintf (stderr,"ScalePart %d, pos ( %d %d )\n", part, where.h, where.v ); #endif @@ -400,22 +384,11 @@ MacScaleEventProc( Point where; Rect bounds; int part; - CGrafPtr destPort, savePort; - Boolean portChanged; #ifdef TK_MAC_DEBUG_SCALE fprintf(stderr,"MacScaleEventProc\n" ); #endif - /* - * To call Macintosh control routines we must have the port set to the - * window containing the control. We will then test which part of the - * control was hit and act accordingly. - */ - - destPort = TkMacOSXGetDrawablePort(Tk_WindowId(macScalePtr->info.tkwin)); - portChanged = QDSwapPort(destPort, &savePort); - TkMacOSXWinBounds((TkWindow *) macScalePtr->info.tkwin, &bounds); where.h = eventPtr->xbutton.x + bounds.left; where.v = eventPtr->xbutton.y + bounds.top; @@ -445,10 +418,6 @@ MacScaleEventProc( */ TkGenerateButtonEventForXPointer(Tk_WindowId(macScalePtr->info.tkwin)); - - if (portChanged) { - QDSwapPort(savePort, NULL); - } } /* |