diff options
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index aa45895..857ce34 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -194,13 +194,6 @@ TkpDisplayButton( } pixmap = (Pixmap) Tk_WindowId(tkwin); - /* - * Set up clipping region. Make sure the we are using the port - * for this button, or we will set the wrong window's clip. - */ - - TkMacOSXSetUpClippingRgn(Tk_WindowId(tkwin)); - if (TkMacOSXComputeButtonDrawParams(butPtr, dpPtr)) { macButtonPtr->useTkText = 0; } else { @@ -399,7 +392,7 @@ TkpComputeButtonGeometry( width += butPtr->inset*2; height += butPtr->inset*2; - if ([NSApp macMinorVersion] == 6) { + if ([NSApp macOSVersion] == 100600) { width += 12; } if (mbPtr->btnkind == kThemePushButton) { @@ -726,7 +719,7 @@ TkpDestroyButton( static void TkMacOSXDrawButton( MacButton *mbPtr, /* Mac button. */ - GC gc, /* The GC we are drawing into - needed for + TCL_UNUSED(GC), /* The GC we are drawing into - needed for * the bevel button */ Pixmap pixmap) /* The pixmap we are drawing into - needed * for the bevel button */ @@ -737,7 +730,6 @@ TkMacOSXDrawButton( TkMacOSXDrawingContext dc; DrawParams *dpPtr = &mbPtr->drawParams; int useNewerHITools = 1; - (void)gc; TkMacOSXComputeButtonParams(butPtr, &mbPtr->btnkind, &mbPtr->drawinfo); @@ -752,7 +744,7 @@ TkMacOSXDrawButton( ButtonBackgroundDrawCB(&cntrRect, mbPtr, 32, true); - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } @@ -785,7 +777,7 @@ TkMacOSXDrawButton( ButtonContentDrawCB(&contHIRec, mbPtr->btnkind, &mbPtr->drawinfo, (MacButton *) mbPtr, 32, true); } else { - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } @@ -813,19 +805,16 @@ TkMacOSXDrawButton( static void ButtonBackgroundDrawCB( - const HIRect *btnbounds, + TCL_UNUSED(const HIRect *), MacButton *ptr, - SInt16 depth, - Boolean isColorDev) + TCL_UNUSED(SInt16), + TCL_UNUSED(Boolean)) { MacButton *mbPtr = (MacButton *) ptr; TkButton *butPtr = (TkButton *) mbPtr; Tk_Window tkwin = butPtr->tkwin; Pixmap pixmap; int usehlborder = 0; - (void)btnbounds; - (void)depth; - (void)isColorDev; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { return; @@ -868,20 +857,15 @@ ButtonBackgroundDrawCB( */ static void ButtonContentDrawCB ( - const HIRect * btnbounds, - ThemeButtonKind kind, - const HIThemeButtonDrawInfo *drawinfo, + TCL_UNUSED(const HIRect *), + TCL_UNUSED(ThemeButtonKind), + TCL_UNUSED(const HIThemeButtonDrawInfo *), MacButton *ptr, - SInt16 depth, - Boolean isColorDev) + TCL_UNUSED(SInt16), + TCL_UNUSED(Boolean)) { TkButton *butPtr = (TkButton *) ptr; Tk_Window tkwin = butPtr->tkwin; - (void)btnbounds; - (void)kind; - (void)drawinfo; - (void)depth; - (void)isColorDev; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { return; @@ -1063,7 +1047,7 @@ TkMacOSXComputeButtonParams( * the button periodically. */ - if (!mbPtr->defaultPulseHandler && ([NSApp macMinorVersion] <= 9)) { + if (!mbPtr->defaultPulseHandler && ([NSApp macOSVersion] <= 100900)) { mbPtr->defaultPulseHandler = Tcl_CreateTimerHandler( PULSE_TIMER_MSECS, PulseDefaultButtonProc, butPtr); } |