diff options
author | nijtmans <nijtmans> | 2009-01-28 20:47:49 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-01-28 20:47:49 (GMT) |
commit | 53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1 (patch) | |
tree | fdebc2108b277faed42ddafa5e7633fc51b503ec /macosx | |
parent | 8faa6f4e39faa11f5f8363f8ce53550991b95d3f (diff) | |
download | tk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.zip tk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.tar.gz tk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.tar.bz2 |
- eliminate some unnessary type casts
- some internal const decorations
- spacing
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXMenu.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 94 |
2 files changed, 50 insertions, 50 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 331befa..119162c 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.49 2008/12/09 21:22:56 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.50 2009/01/28 20:47:49 nijtmans Exp $ */ #include "tkMacOSXPrivate.h" @@ -537,7 +537,7 @@ int Tcl_AppendResult(interp, "No more menus can be allocated.", NULL); return TCL_ERROR; } - Tcl_SetHashValue(commandEntryPtr, (char *) menuPtr); + Tcl_SetHashValue(commandEntryPtr, menuPtr); *menuIDPtr = returnID; return TCL_OK; } @@ -2650,7 +2650,7 @@ DrawMenuEntryAccelerator( CFRelease(cfStr); } } else { - Tk_DrawChars(menuPtr->display, d, gc, tkfont, accel + + Tk_DrawChars(menuPtr->display, d, gc, tkfont, accel + geometryPtr->accelTextStart, mePtr->accelLength - geometryPtr->accelTextStart, leftEdge, baseline); } diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 5756b0c..b9c89e8 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXPrivate.h,v 1.9 2008/10/27 11:55:45 dkf Exp $ + * RCS: @(#) $Id: tkMacOSXPrivate.h,v 1.10 2009/01/28 20:47:49 nijtmans Exp $ */ #ifndef _TKMACPRIV @@ -20,65 +20,65 @@ /* Define constants only available on Mac OS X 10.3 or later */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 - #define kEventAppAvailableWindowBoundsChanged 110 - #define kEventParamTransactionID 'trns' - #define kEventParamWindowPartCode 'wpar' - #define typeWindowPartCode 'wpar' - #define kMenuAttrDoNotUseUserCommandKeys (1 << 7) - #define kSimpleWindowClass 18 - #define kWindowDoesNotCycleAttribute (1L << 15) - #define kWindowAsyncDragAttribute (1L << 23) - #define kThemeBrushAlternatePrimaryHighlightColor -5 - #define kThemeResizeUpCursor 19 - #define kThemeResizeDownCursor 19 - #define kThemeResizeUpDownCursor 19 - #define kThemePoofCursor 19 - #define kThemeBackgroundMetal 6 - #define kThemeIncDecButtonSmall 21 - #define kThemeIncDecButtonMini 22 - #define kThemeComboBox 16 - #define kThemeMiniSystemFont 109 - #define kAppearancePartUpButton 20 - #define kAppearancePartDownButton 21 - #define kAppearancePartPageUpArea 22 - #define kAppearancePartPageDownArea 23 - #define kAppearancePartIndicator 129 - #define kUIModeAllSuppressed 4 - #define FixedToInt(a) ((short)(((Fixed)(a) + fixed1/2) >> 16)) - #define IntToFixed(a) ((Fixed)(a) << 16) +# define kEventAppAvailableWindowBoundsChanged 110 +# define kEventParamTransactionID 'trns' +# define kEventParamWindowPartCode 'wpar' +# define typeWindowPartCode 'wpar' +# define kMenuAttrDoNotUseUserCommandKeys (1 << 7) +# define kSimpleWindowClass 18 +# define kWindowDoesNotCycleAttribute (1L << 15) +# define kWindowAsyncDragAttribute (1L << 23) +# define kThemeBrushAlternatePrimaryHighlightColor -5 +# define kThemeResizeUpCursor 19 +# define kThemeResizeDownCursor 19 +# define kThemeResizeUpDownCursor 19 +# define kThemePoofCursor 19 +# define kThemeBackgroundMetal 6 +# define kThemeIncDecButtonSmall 21 +# define kThemeIncDecButtonMini 22 +# define kThemeComboBox 16 +# define kThemeMiniSystemFont 109 +# define kAppearancePartUpButton 20 +# define kAppearancePartDownButton 21 +# define kAppearancePartPageUpArea 22 +# define kAppearancePartPageDownArea 23 +# define kAppearancePartIndicator 129 +# define kUIModeAllSuppressed 4 +# define FixedToInt(a) ((short)(((Fixed)(a) + fixed1/2) >> 16)) +# define IntToFixed(a) ((Fixed)(a) << 16) #endif /* Define constants only available on Mac OS X 10.4 or later */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1040 - #define kWindowNoTitleBarAttribute (1L << 9) - #define kWindowMetalNoContentSeparatorAttribute (1L << 11) - #define kThemeDisclosureTriangle 6 - #define kThemeBrushListViewOddRowBackground 56 - #define kThemeBrushListViewEvenRowBackground 57 - #define kThemeBrushListViewColumnDivider 58 - #define kThemeMetricScrollBarMinThumbHeight 132 - #define kThemeMetricSmallScrollBarMinThumbHeight 134 - #define kThemeScrollBarMedium kThemeMediumScrollBar - #define kThemeScrollBarSmall kThemeSmallScrollBar - #ifdef __BIG_ENDIAN__ - #define kCGBitmapByteOrder32Host (4 << 12) - #else - #define kCGBitmapByteOrder32Host (2 << 12) - #endif +# define kWindowNoTitleBarAttribute (1L << 9) +# define kWindowMetalNoContentSeparatorAttribute (1L << 11) +# define kThemeDisclosureTriangle 6 +# define kThemeBrushListViewOddRowBackground 56 +# define kThemeBrushListViewEvenRowBackground 57 +# define kThemeBrushListViewColumnDivider 58 +# define kThemeMetricScrollBarMinThumbHeight 132 +# define kThemeMetricSmallScrollBarMinThumbHeight 134 +# define kThemeScrollBarMedium kThemeMediumScrollBar +# define kThemeScrollBarSmall kThemeSmallScrollBar +# ifdef __BIG_ENDIAN__ +# define kCGBitmapByteOrder32Host (4 << 12) +# else +# define kCGBitmapByteOrder32Host (2 << 12) +# endif #endif /* Define constants only available on Mac OS X 10.5 or later */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 - #define kWindowUnifiedTitleAndToolbarAttribute (1L << 7) - #define kWindowTexturedSquareCornersAttribute (1L << 10) +# define kWindowUnifiedTitleAndToolbarAttribute (1L << 7) +# define kWindowTexturedSquareCornersAttribute (1L << 10) #endif /* HIToolbox version constants */ #ifndef kHIToolboxVersionNumber10_3 - #define kHIToolboxVersionNumber10_3 (145) +# define kHIToolboxVersionNumber10_3 (145) #endif #ifndef kHIToolboxVersionNumber10_4 - #define kHIToolboxVersionNumber10_4 (219) +# define kHIToolboxVersionNumber10_4 (219) #endif #ifndef kHIToolboxVersionNumber10_5 - #define kHIToolboxVersionNumber10_5 (343) +# define kHIToolboxVersionNumber10_5 (343) #endif /* Macros for HIToolbox runtime version checking */ MODULE_SCOPE float tkMacOSXToolboxVersionNumber; |