diff options
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 0518d292d..afb0d35cb 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -15,7 +15,9 @@ */ #import <Cocoa/Cocoa.h> +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 #import <QuartzCore/CAGradientLayer.h> +#endif #import <QuartzCore/CAAnimation.h> #import <QuartzCore/CATransaction.h> @@ -137,6 +139,10 @@ static const KeyToCommand macMapDefault[] = //-------------------------------------------------------------------------------------------------- +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 + +// Only implement FindHighlightLayer on OS X 10.6+ + /** * Class to display the animated gold roundrect used on OS X for matches. */ @@ -295,6 +301,8 @@ const CGFloat paddingHighlightY = 2; @end +#endif + //-------------------------------------------------------------------------------------------------- @implementation TimerTarget @@ -2038,6 +2046,7 @@ void ScintillaCocoa::ActiveStateChanged(bool isActive) void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining) { +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 NSView *content = ContentView(); if (!layerFindIndicator) { @@ -2078,10 +2087,12 @@ void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining { [layerFindIndicator hideMatch]; } +#endif } void ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce) { +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 if (layerFindIndicator) { NSView *content = ContentView(); @@ -2091,14 +2102,17 @@ void ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce) ptText.y = rcBounds.size.height - WndProc(SCI_POINTYFROMPOSITION, 0, layerFindIndicator.positionFind); [layerFindIndicator animateMatch:ptText bounce:bounce]; } +#endif } void ScintillaCocoa::HideFindIndicator() { +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 if (layerFindIndicator) { [layerFindIndicator hideMatch]; } +#endif } |