diff --git a/Code/SPILDAppController.h b/Code/SPILDAppController.h new file mode 100644 index 0000000..4b2fa9e --- /dev/null +++ b/Code/SPILDAppController.h @@ -0,0 +1,26 @@ +// +// CATAppController.h +// SPILDemo +// + +#import + +@class SPILDTopLayerView; +@class SpinningProgressIndicatorLayer; + + +@interface SPILDAppController : NSObject { + IBOutlet NSWindow *_window; + IBOutlet SPILDTopLayerView *_mainView; + + IBOutlet NSButton *_startStopButton; + IBOutlet NSColorWell *_fgColorWell; + IBOutlet NSColorWell *_bgColorWell; +} + +// IB Actions +- (IBAction)pickNewForeColor:(id)sender; +- (IBAction)pickNewBackColor:(id)sender; +- (IBAction)startStopProgressIndicator:(id)sender; + +@end diff --git a/Code/SPILDAppController.m b/Code/SPILDAppController.m new file mode 100644 index 0000000..bf529f1 --- /dev/null +++ b/Code/SPILDAppController.m @@ -0,0 +1,56 @@ +// +// CATAppController.m +// SPILDemo +// + +#import "SPILDAppController.h" + +#import "SPILDTopLayerView.h" +#import "YRKSpinningProgressIndicatorLayer.h" + +@implementation SPILDAppController + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Init, Dealloc, etc +//------------------------------------------------------------------------------ + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // start with a nice green + NSColor *niceGreenColor = [NSColor colorWithCalibratedRed:0.40f green:0.69f blue:0.45f alpha:1.0f]; + _fgColorWell.color = niceGreenColor; + [self pickNewForeColor:_fgColorWell]; + + _bgColorWell.color = [NSColor blueColor]; + [self pickNewBackColor:_bgColorWell]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark IB Actions +//------------------------------------------------------------------------------ + +- (IBAction)pickNewForeColor:(id)sender { + [_mainView progressIndicatorLayer].foreColor = [sender color]; +} + +- (IBAction)pickNewBackColor:(id)sender { + [_mainView setPlainBackgroundColor:[sender color]]; +} + +- (IBAction)startStopProgressIndicator:(id)sender { + if ([[_mainView progressIndicatorLayer] isRunning]) { + // it is running, so stop it + [[_mainView progressIndicatorLayer] stopProgressAnimation]; + [_startStopButton setTitle:@"Start"]; + } + else { + // it is stopped, so start it + [[_mainView progressIndicatorLayer] startProgressAnimation]; + [_startStopButton setTitle:@"Stop"]; + } +} + + +@end diff --git a/Code/SPILDTopLayerView.h b/Code/SPILDTopLayerView.h new file mode 100644 index 0000000..0d2c589 --- /dev/null +++ b/Code/SPILDTopLayerView.h @@ -0,0 +1,31 @@ +// +// SPILDTopLayerView.h +// SPILDemo +// + +#import +#import +#import + +@class YRKSpinningProgressIndicatorLayer; + + +// the MenuView class is the view subclass that is inserted into +// the window. It hosts the rootLayer, and responds to events +@interface SPILDTopLayerView : NSView { + CALayer *_rootLayer; + CALayer *_plainBackgroundLayer; + CALayer *_qcBackgroundLayer; + YRKSpinningProgressIndicatorLayer *_progressIndicatorLayer; +} + +// IB Actions +- (IBAction)toggleBackground:(id)sender; +- (void)setPlainBackgroundColor:(NSColor *)newColor; + +// Properties +@property (readonly) CALayer *rootLayer; +@property (readonly) YRKSpinningProgressIndicatorLayer *progressIndicatorLayer; + +@end + diff --git a/Code/SPILDTopLayerView.m b/Code/SPILDTopLayerView.m new file mode 100644 index 0000000..91c6f01 --- /dev/null +++ b/Code/SPILDTopLayerView.m @@ -0,0 +1,139 @@ +// +// SPILDTopLayerView.m +// SPILDemo +// + +#import "SPILDTopLayerView.h" + +#import "YRKSpinningProgressIndicatorLayer.h" + + +@interface SPILDTopLayerView () + +- (void)setupLayers; + +- (void)usePlainBackground; +- (void)useQCBackground; + +@end + + +@implementation SPILDTopLayerView + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Init, Dealloc, etc +//------------------------------------------------------------------------------ + +- (void)dealloc { + [_rootLayer removeFromSuperlayer]; + [_rootLayer release]; + + [_progressIndicatorLayer removeFromSuperlayer]; + [_plainBackgroundLayer removeFromSuperlayer]; + [_qcBackgroundLayer removeFromSuperlayer]; + + [super dealloc]; +} + +- (void)awakeFromNib { + [self setupLayers]; +} + + +- (void)setupLayers { + _rootLayer = [CALayer layer]; + [self setLayer:_rootLayer]; + [self setWantsLayer:YES]; + + // Create the plain background layer + _plainBackgroundLayer = [CALayer layer]; + _plainBackgroundLayer.name = @"plainBackgroundLayer"; + _plainBackgroundLayer.anchorPoint = CGPointMake(0.0, 0.0); + _plainBackgroundLayer.position = CGPointMake(0, 0); + _plainBackgroundLayer.bounds = [[self layer] bounds]; + _plainBackgroundLayer.autoresizingMask = (kCALayerWidthSizable|kCALayerHeightSizable); + _plainBackgroundLayer.zPosition = 0; + _plainBackgroundLayer.backgroundColor = CGColorCreateFromNSColor([NSColor blueColor]); + [_rootLayer addSublayer:_plainBackgroundLayer]; + + // Start with QC background + [self useQCBackground]; + + // Put a YRKSpinningProgressIndicatorLayer in front of everything + _progressIndicatorLayer = [[YRKSpinningProgressIndicatorLayer alloc] init]; + _progressIndicatorLayer.name = @"progressIndicatorLayer"; + _progressIndicatorLayer.anchorPoint = CGPointMake(0.0, 0.0); + _progressIndicatorLayer.position = CGPointMake(0, 0); + _progressIndicatorLayer.bounds = [[self layer] bounds]; + _progressIndicatorLayer.autoresizingMask = (kCALayerWidthSizable|kCALayerHeightSizable); + _progressIndicatorLayer.zPosition = 10; // make sure it goes in front of the background layer + _progressIndicatorLayer.hidden = YES; + [_rootLayer addSublayer:_progressIndicatorLayer]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Toggling Background +//------------------------------------------------------------------------------ + +- (IBAction)toggleBackground:(id)sender { + if (nil == _qcBackgroundLayer) { + [self useQCBackground]; + } + else { + [self usePlainBackground]; + } +} + +- (void)usePlainBackground { + // Hide the QC background and show the plain one + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + _qcBackgroundLayer.hidden = YES; + _plainBackgroundLayer.hidden = NO; + [CATransaction commit]; + + // destroy the QC background completely, so we can test the CPU usage of just the progress indicator itself + [_qcBackgroundLayer removeFromSuperlayer]; + _qcBackgroundLayer = nil; +} + +- (void)useQCBackground { + // Create the QC background layer + _qcBackgroundLayer = [QCCompositionLayer compositionLayerWithFile: + [[NSBundle mainBundle] pathForResource:@"Background" ofType:@"qtz"]]; + _qcBackgroundLayer.name = @"qcBackgroundLayer"; + _qcBackgroundLayer.anchorPoint = CGPointMake(0.0, 0.0); + _qcBackgroundLayer.position = CGPointMake(0, 0); + _qcBackgroundLayer.bounds = [[self layer] bounds]; + _qcBackgroundLayer.autoresizingMask = (kCALayerWidthSizable|kCALayerHeightSizable); + _qcBackgroundLayer.zPosition = 0; + [_rootLayer addSublayer:_qcBackgroundLayer]; + + // Hide the plain background and show the QC one + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + _qcBackgroundLayer.hidden = NO; + _plainBackgroundLayer.hidden = YES; + [CATransaction commit]; +} + +- (void)setPlainBackgroundColor:(NSColor *)newColor { + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + _plainBackgroundLayer.backgroundColor = CGColorCreateFromNSColor(newColor); + [CATransaction commit]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Properties +//------------------------------------------------------------------------------ +@synthesize rootLayer = _rootLayer; +@synthesize progressIndicatorLayer = _progressIndicatorLayer; + +@end diff --git a/Code/YRKSpinningProgressIndicatorLayer.h b/Code/YRKSpinningProgressIndicatorLayer.h new file mode 100644 index 0000000..e2ccae2 --- /dev/null +++ b/Code/YRKSpinningProgressIndicatorLayer.h @@ -0,0 +1,33 @@ +// +// YRKSpinningProgressIndicatorLayer.h +// + +#import +#import + + +@interface YRKSpinningProgressIndicatorLayer : CALayer { + BOOL _isRunning; + NSTimer *_animationTimer; + NSUInteger _position; + + CGColorRef _foreColor; + CGFloat _fadeDownOpacity; + + NSUInteger _numFins; + NSMutableArray *_finLayers; +} + +- (void)toggleProgressAnimation; +- (void)startProgressAnimation; +- (void)stopProgressAnimation; + +// Properties and Accessors +@property (readonly) BOOL isRunning; +@property (readwrite, copy) NSColor *foreColor; // "copy" because we don't retain it -- we create a CGColor from it + +@end + +// Helper Functions +CGColorRef CGColorCreateFromNSColor(NSColor *nscolor); +NSColor *NSColorFromCGColorRef(CGColorRef cgcolor); diff --git a/Code/YRKSpinningProgressIndicatorLayer.m b/Code/YRKSpinningProgressIndicatorLayer.m new file mode 100644 index 0000000..eb26adc --- /dev/null +++ b/Code/YRKSpinningProgressIndicatorLayer.m @@ -0,0 +1,264 @@ +// +// YRKSpinningProgressIndicatorLayer.m +// + +#import "YRKSpinningProgressIndicatorLayer.h" + + +@interface YRKSpinningProgressIndicatorLayer () + +// Animation +- (void)advancePosition; + +// Helper Methods +- (void)removeFinLayers; +- (void)createFinLayers; + +- (CGRect)finBoundsForCurrentBounds; +- (CGPoint)finAnchorPointForCurrentBounds; + +@end + + +@implementation YRKSpinningProgressIndicatorLayer + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Init, Dealloc, etc +//------------------------------------------------------------------------------ + +- (id)init { + self = [super init]; + if (self) { + _position = 0; + _numFins = 12; + _fadeDownOpacity = 0.0f; + _isRunning = NO; + self.foreColor = [NSColor blackColor]; + [self setBounds:CGRectMake(0.0f, 0.0f, 10.0f, 10.0f)]; + [self createFinLayers]; + } + return self; +} + +- (void)dealloc { + self.foreColor = nil; + [self removeFinLayers]; + + [super dealloc]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Overrides +//------------------------------------------------------------------------------ + +- (void)setBounds:(CGRect)newBounds { + [super setBounds:newBounds]; + + // Resize the fins + CGRect finBounds = [self finBoundsForCurrentBounds]; + CGPoint finAnchorPoint = [self finAnchorPointForCurrentBounds]; + CGPoint finPosition = CGPointMake([self bounds].size.width/2, [self bounds].size.height/2); + CGFloat finCornerRadius = finBounds.size.width/2; + + // do the resizing all at once, immediately + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + for (CALayer *fin in _finLayers) { + fin.bounds = finBounds; + fin.anchorPoint = finAnchorPoint; + fin.position = finPosition; + fin.cornerRadius = finCornerRadius; + } + [CATransaction commit]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Animation +//------------------------------------------------------------------------------ + +- (void)advancePosition { + _position++; + if (_position >= _numFins) { + _position = 0; + } + + CALayer *fin = (CALayer *)[_finLayers objectAtIndex:_position]; + + // Set the next fin to full opacity, but do it immediately, without any animation + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + fin.opacity = 1.0; + [CATransaction commit]; + + // Tell that fin to animate its opacity to transparent. + fin.opacity = _fadeDownOpacity; + + [self setNeedsDisplay]; +} + +- (void)startProgressAnimation { + _animationTimer = [[NSTimer timerWithTimeInterval:(NSTimeInterval)0.05 + target:self + selector:@selector(advancePosition) + userInfo:nil + repeats:YES] retain]; + + [_animationTimer setFireDate:[NSDate date]]; + [[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSDefaultRunLoopMode]; + [[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode]; + + self.hidden = NO; + _isRunning = YES; +} + +- (void)stopProgressAnimation { + [_animationTimer invalidate]; + [_animationTimer release]; + _animationTimer = nil; + + _isRunning = NO; + + [self setNeedsDisplay]; +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Properties and Accessors +//------------------------------------------------------------------------------ + +@synthesize isRunning = _isRunning; + +// Can't use @synthesize because we need to convert NSColor <-> CGColor +- (NSColor *)foreColor { + // Need to convert from CGColor to NSColor + return NSColorFromCGColorRef(_foreColor); +} +- (void)setForeColor:(NSColor *)newColor { + // Need to convert from NSColor to CGColor + CGColorRef cgColor = CGColorCreateFromNSColor(newColor); + + if (nil != _foreColor) { + CGColorRelease(_foreColor); + } + _foreColor = cgColor; + + // Update do all of the fins to this new color, at once, immediately + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + for (CALayer *fin in _finLayers) { + fin.backgroundColor = cgColor; + } + [CATransaction commit]; +} + +- (void)toggleProgressAnimation { + if (_isRunning) { + [self stopProgressAnimation]; + } + else { + [self startProgressAnimation]; + } +} + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Helper Methods +//------------------------------------------------------------------------------ + +- (void)createFinLayers { + [self removeFinLayers]; + + // Create new fin layers + _finLayers = [[NSMutableArray alloc] initWithCapacity:_numFins]; + + CGRect finBounds = [self finBoundsForCurrentBounds]; + CGPoint finAnchorPoint = [self finAnchorPointForCurrentBounds]; + CGPoint finPosition = CGPointMake([self bounds].size.width/2, [self bounds].size.height/2); + CGFloat finCornerRadius = finBounds.size.width/2; + + int i; + for (i=0; i<_numFins; i++) { + CALayer *newFin = [CALayer layer]; + + newFin.bounds = finBounds; + newFin.anchorPoint = finAnchorPoint; + newFin.position = finPosition; + newFin.transform = CATransform3DMakeRotation(i*(-6.282185/_numFins), 0.0, 0.0, 1.0); + newFin.cornerRadius = finCornerRadius; + newFin.backgroundColor = _foreColor; + + // Set the fin's initial opacity + [CATransaction begin]; + [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; + newFin.opacity = _fadeDownOpacity; + [CATransaction commit]; + + // set the fin's fade-out time (for when it's animating) + CABasicAnimation *anim = [CABasicAnimation animation]; + anim.duration = 0.7f; + NSDictionary* actions = [NSDictionary dictionaryWithObjectsAndKeys: + anim, @"opacity", + nil]; + [newFin setActions:actions]; + + [self addSublayer: newFin]; + [_finLayers addObject:newFin]; + } +} + +- (void)removeFinLayers { + for (CALayer *finLayer in _finLayers) { + [finLayer removeFromSuperlayer]; + } + [_finLayers release]; +} + +- (CGRect)finBoundsForCurrentBounds { + CGSize size = [self bounds].size; + CGFloat minSide = size.width > size.height ? size.height : size.width; + CGFloat width = minSide * 0.095f; + CGFloat height = minSide * 0.30f; + return CGRectMake(0,0,width,height); +} + +- (CGPoint)finAnchorPointForCurrentBounds { + CGSize size = [self bounds].size; + CGFloat minSide = size.width > size.height ? size.height : size.width; + CGFloat height = minSide * 0.30f; + return CGPointMake(0.5, -0.9*(minSide-height)/minSide); +} + +@end + + +//------------------------------------------------------------------------------ +#pragma mark - +#pragma mark Helper Functions +//------------------------------------------------------------------------------ + +CGColorRef CGColorCreateFromNSColor(NSColor *nscolor) { + float components[4]; + NSColor *deviceColor = [nscolor colorUsingColorSpaceName: NSDeviceRGBColorSpace]; + [deviceColor getRed: &components[0] green: &components[1] blue: &components[2] alpha: &components[3]]; + + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGColorRef cgcolor = CGColorCreate(colorSpace, components); + CGColorSpaceRelease(colorSpace); + + return cgcolor; +} + + +NSColor *NSColorFromCGColorRef(CGColorRef cgcolor) { + NSColorSpace *colorSpace = [NSColorSpace deviceRGBColorSpace]; + return [NSColor colorWithColorSpace:colorSpace + components:CGColorGetComponents(cgcolor) + count:CGColorGetNumberOfComponents(cgcolor)]; +} diff --git a/Code/main.m b/Code/main.m new file mode 100644 index 0000000..91b31d7 --- /dev/null +++ b/Code/main.m @@ -0,0 +1,11 @@ +// +// main.m +// SPILDemo +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..b582c88 --- /dev/null +++ b/README.txt @@ -0,0 +1,71 @@ +YRKSpinningProgressIndicatorLayer and SPILDemo.app + +Written by: +Kelan Champagne +http://yeahrightkeller.com +Please feel free to send me questions or comments. + +History: +v1.0 2008-07-08 KJC +v1.1 2009-02-14 KJC + + +Overview: +YRKSpinningProgressIndicatorLayer is a clone of the NSProgressIndicator (spinning-style) that can be set to an arbitrary size and color, and used with CoreAnimation layers. + +Features: +* implemented as a subclass of CALayer + * can be used with and overlaid on other CALayers +* can be set to arbitrary size and color + * can even be changed while animating +* upon starting animation, each "fin" appears only when it is first drawn +* when animating, each fin fades from opaque to transparent + * as they fade, you can see through the fins to the background +* when stopped, no new fins are drawn, and the existing fins fade to transparent + +Code Architecture: +* Implemented as a subclass of CALayer. + * Each fin is a sub-layer made of a generic CALayer and drawn by setting the bounds, corner radius, and background color. +* Animation is done with an NSTimer. + +Notes/Limitations: +* If resized really fast, some fins will not be drawn. +* When drawn a large size (i.e. full-screen), the animation can take up a pretty good chunk of CPU. But, at smaller sizes, it's not bad. The good news is that since it's Leopard-only, it won't be running on anything slower than 800mhz/512MB ram. I tested it on my PPC revA Mac Mini that is 1.25Ghz/512MB (and weak graphics), and it ran OK at everything except full-screen. The QC composition in the background of the demo app was a much bigger culprit though, and with the solid background, it is ok. So, hopefully the performance is acceptable. If not, I have an idea for caching all the fin images, instead of having CoreAnimation do all the drawing on the fly. But, the way it is now makes for really clean code, so I left it like that for now. +* For some reason, the Quartz Composer background (with the clouds) of the SPILDemo app doesn't animate when built in Release mode. + +Code Conventions: +* Instance variables are prefixed with an underscore (i.e. "_"). +* "Private" methods are declared in a Class Continuation (i.e. name-less category) at the top of the .m file. + + +License: + +(The BSD License) + +Copyright (c) 2009, Kelan Champagne (http://yeahrightkeller.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY Kelan Champagne ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Kelan Champagne BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Also, I'd appreciate it if you would let me know if you find this code useful. + diff --git a/Resources/Background.qtz b/Resources/Background.qtz new file mode 100644 index 0000000..c0ca836 Binary files /dev/null and b/Resources/Background.qtz differ diff --git a/Resources/English.lproj/InfoPlist.strings b/Resources/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..4d7ae59 --- /dev/null +++ b/Resources/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Kelan Champagne, 2009"; diff --git a/Resources/English.lproj/MainMenu.nib/designable.nib b/Resources/English.lproj/MainMenu.nib/designable.nib new file mode 100644 index 0000000..3d678a6 --- /dev/null +++ b/Resources/English.lproj/MainMenu.nib/designable.nib @@ -0,0 +1,1401 @@ + + + + 0 + 9E17 + 670 + 949.33 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + NewApplication + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + NewApplication + + YES + + + About SPILDemo + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + Close + w + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + + + + Format + + 1048576 + 2147483647 + + + submenuAction: + + Format + + YES + + + Show Colors + C + 1179648 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + + + _NSMainMenu + + + 15 + 2 + {{119, 431}, {700, 600}} + 1948778496 + Window + NSWindow + + {3.40282e+38, 3.40282e+38} + {480, 360} + + + 256 + + YES + + + 274 + {{0, 60}, {700, 540}} + + SPILDTopLayerView + + + + 289 + {{564, 13}, {70, 32}} + + YES + + 67239424 + 134217728 + Start + + LucidaGrande + 1.300000e+01 + 1044 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 289 + {{442, 23}, {123, 17}} + + YES + + 67239488 + 272630784 + Progress Indicator: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 292 + {{14, 14}, {163, 32}} + + YES + + 67239424 + 134217728 + Toggle Background + + + -2038284033 + 129 + + + 200 + 25 + + + + + 289 + + YES + + YES + NSColor pasteboard type + + + {{636, 19}, {44, 23}} + + YES + YES + + 1 + MCAwIDAAA + + + + + 292 + + YES + + YES + NSColor pasteboard type + + + {{179, 20}, {44, 23}} + + YES + YES + + + + {700, 600} + + + {{0, 0}, {1600, 1178}} + {480, 382} + {3.40282e+38, 3.40282e+38} + + + SPILDAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performClose: + + + + 193 + + + + copy: + + + + 224 + + + + paste: + + + + 226 + + + + cut: + + + + 228 + + + + selectAll: + + + + 232 + + + + performZoom: + + + + 240 + + + + orderFrontColorPanel: + + + + 361 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + terminate: + + + + 369 + + + + unhideAllApplications: + + + + 370 + + + + _window + + + + 395 + + + + delegate + + + + 407 + + + + startStopProgressIndicator: + + + + 409 + + + + _mainView + + + + 410 + + + + toggleBackground: + + + + 413 + + + + _startStopButton + + + + 415 + + + + _fgColorWell + + + + 416 + + + + pickNewForeColor: + + + + 417 + + + + pickNewBackColor: + + + + 419 + + + + _bgColorWell + + + + 420 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 103 + + + YES + + + + 1 + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + 78 + + + 6 + + + 77 + + + 5 + + + 73 + + + 1 + + + 74 + + + 2 + + + 106 + + + YES + + + 2 + + + 57 + + + YES + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + 1111 + + + 144 + + + + + 143 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 299 + + + YES + + + + + + 300 + + + YES + + + + + + 345 + + + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + + + 376 + + + + + 397 + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 402 + + + + + 403 + + + + + 411 + + + YES + + + + + + 412 + + + + + 414 + + + + + 205 + + + YES + + + + + + + + + 197 + + + + + 203 + + + + + 199 + + + + + 198 + + + + + 418 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBEditorWindowLastContentRect + 106.IBPluginDependency + 106.ImportedFromIB2 + 106.editorWindowContentRectSynchronizationRect + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 217.IBPluginDependency + 217.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 299.IBPluginDependency + 300.IBEditorWindowLastContentRect + 300.IBPluginDependency + 300.editorWindowContentRectSynchronizationRect + 345.IBPluginDependency + 371.IBEditorWindowLastContentRect + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 371.editorWindowContentRectSynchronizationRect + 371.windowTemplate.hasMinSize + 371.windowTemplate.minSize + 372.IBPluginDependency + 376.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 398.ImportedFromIB2 + 399.IBPluginDependency + 402.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 414.IBPluginDependency + 418.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilder.CocoaPlugin + + {{443, 1119}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{596, 852}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{262, 1042}, {140, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{187, 434}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{372, 1052}, {197, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{76, 1125}, {428, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{1385, -66}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + {{306, 1102}, {176, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + {{231, 634}, {176, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + {{140, 479}, {700, 600}} + com.apple.InterfaceBuilder.CocoaPlugin + {{140, 479}, {700, 600}} + + {{139, 380}, {543, 405}} + + {480, 360} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{88, 972}, {235, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{220, 1052}, {182, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 474}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 420 + + + + YES + + SPILDAppController + NSObject + + YES + + YES + pickNewBackColor: + pickNewForeColor: + startStopProgressIndicator: + + + YES + id + id + id + + + + YES + + YES + _bgColorWell + _fgColorWell + _mainView + _startStopButton + _window + + + YES + NSColorWell + NSColorWell + SPILDTopLayerView + NSButton + NSWindow + + + + IBProjectSource + SPILDAppController.h + + + + SPILDTopLayerView + NSView + + toggleBackground: + id + + + IBProjectSource + SPILDTopLayerView.h + + + + + 0 + ../SPILDemo.xcodeproj + 3 + + diff --git a/Resources/English.lproj/MainMenu.nib/keyedobjects.nib b/Resources/English.lproj/MainMenu.nib/keyedobjects.nib new file mode 100644 index 0000000..40b655d Binary files /dev/null and b/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/Resources/Info.plist b/Resources/Info.plist new file mode 100644 index 0000000..d0c5736 --- /dev/null +++ b/Resources/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yeahrightkeller.SPILDemo + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/SPILDemo.xcodeproj/project.pbxproj b/SPILDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c29a5a4 --- /dev/null +++ b/SPILDemo.xcodeproj/project.pbxproj @@ -0,0 +1,322 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 44; + objects = { + +/* Begin PBXBuildFile section */ + 761A37C50CF949C7006BD459 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 761A37C30CF949C7006BD459 /* Quartz.framework */; }; + 761A37C60CF949C7006BD459 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 761A37C40CF949C7006BD459 /* QuartzCore.framework */; }; + 763459CA0F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 763459C80F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.m */; }; + 763459CF0F47D3B300C1B478 /* SPILDTopLayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 763459CB0F47D3B300C1B478 /* SPILDTopLayerView.m */; }; + 763459D00F47D3B300C1B478 /* SPILDAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 763459CD0F47D3B300C1B478 /* SPILDAppController.m */; }; + 763459D20F47D3BA00C1B478 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 763459D10F47D3BA00C1B478 /* main.m */; }; + 763459D50F47D3C600C1B478 /* Background.qtz in Resources */ = {isa = PBXBuildFile; fileRef = 763459D30F47D3C600C1B478 /* Background.qtz */; }; + 763459D90F47D3E900C1B478 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 763459D70F47D3E900C1B478 /* MainMenu.nib */; }; + 763459F20F47D42A00C1B478 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 763459F00F47D42A00C1B478 /* InfoPlist.strings */; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 761A37C30CF949C7006BD459 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = ""; }; + 761A37C40CF949C7006BD459 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = ""; }; + 7630041C0E0B614B00074CE5 /* SPILDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SPILDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 763459C80F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YRKSpinningProgressIndicatorLayer.m; path = Code/YRKSpinningProgressIndicatorLayer.m; sourceTree = ""; }; + 763459C90F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YRKSpinningProgressIndicatorLayer.h; path = Code/YRKSpinningProgressIndicatorLayer.h; sourceTree = ""; }; + 763459CB0F47D3B300C1B478 /* SPILDTopLayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPILDTopLayerView.m; path = Code/SPILDTopLayerView.m; sourceTree = ""; }; + 763459CC0F47D3B300C1B478 /* SPILDTopLayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPILDTopLayerView.h; path = Code/SPILDTopLayerView.h; sourceTree = ""; }; + 763459CD0F47D3B300C1B478 /* SPILDAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPILDAppController.m; path = Code/SPILDAppController.m; sourceTree = ""; }; + 763459CE0F47D3B300C1B478 /* SPILDAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPILDAppController.h; path = Code/SPILDAppController.h; sourceTree = ""; }; + 763459D10F47D3BA00C1B478 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Code/main.m; sourceTree = ""; }; + 763459D30F47D3C600C1B478 /* Background.qtz */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = Background.qtz; path = Resources/Background.qtz; sourceTree = ""; }; + 763459D40F47D3C600C1B478 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; + 763459D80F47D3E900C1B478 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/MainMenu.nib; sourceTree = ""; }; + 763459F10F47D42A00C1B478 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = Resources/English.lproj/InfoPlist.strings; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 761A37C50CF949C7006BD459 /* Quartz.framework in Frameworks */, + 761A37C60CF949C7006BD459 /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 764F1DB20E235DE300054919 /* YRKSpinningProgressIndicatorLayer */, + 764F1DB10E235DDC00054919 /* Demo App */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 761A37C30CF949C7006BD459 /* Quartz.framework */, + 761A37C40CF949C7006BD459 /* QuartzCore.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 7630041C0E0B614B00074CE5 /* SPILDemo.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CATest */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CATest; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 763459D10F47D3BA00C1B478 /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 763459D30F47D3C600C1B478 /* Background.qtz */, + 763459D40F47D3C600C1B478 /* Info.plist */, + 763459F00F47D42A00C1B478 /* InfoPlist.strings */, + 763459D70F47D3E900C1B478 /* MainMenu.nib */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 764F1DB10E235DDC00054919 /* Demo App */ = { + isa = PBXGroup; + children = ( + 763459CB0F47D3B300C1B478 /* SPILDTopLayerView.m */, + 763459CC0F47D3B300C1B478 /* SPILDTopLayerView.h */, + 763459CD0F47D3B300C1B478 /* SPILDAppController.m */, + 763459CE0F47D3B300C1B478 /* SPILDAppController.h */, + ); + name = "Demo App"; + sourceTree = ""; + }; + 764F1DB20E235DE300054919 /* YRKSpinningProgressIndicatorLayer */ = { + isa = PBXGroup; + children = ( + 763459C80F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.m */, + 763459C90F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.h */, + ); + name = YRKSpinningProgressIndicatorLayer; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* SPILDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SPILDemo" */; + buildPhases = ( + 8D11072C0486CEB800E47090 /* Sources */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SPILDemo; + productInstallPath = "$(HOME)/Applications"; + productName = CATest; + productReference = 7630041C0E0B614B00074CE5 /* SPILDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SPILDemo" */; + compatibilityVersion = "Xcode 3.0"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* CATest */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* SPILDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 763459D50F47D3C600C1B478 /* Background.qtz in Resources */, + 763459D90F47D3E900C1B478 /* MainMenu.nib in Resources */, + 763459F20F47D42A00C1B478 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 763459D20F47D3BA00C1B478 /* main.m in Sources */, + 763459CA0F47D3AB00C1B478 /* YRKSpinningProgressIndicatorLayer.m in Sources */, + 763459CF0F47D3B300C1B478 /* SPILDTopLayerView.m in Sources */, + 763459D00F47D3B300C1B478 /* SPILDAppController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 763459D70F47D3E900C1B478 /* MainMenu.nib */ = { + isa = PBXVariantGroup; + children = ( + 763459D80F47D3E900C1B478 /* English */, + ); + name = MainMenu.nib; + sourceTree = ""; + }; + 763459F00F47D42A00C1B478 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 763459F10F47D42A00C1B478 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = SPILDemo_Prefix.pch; + INFOPLIST_FILE = Resources/Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES; + PRODUCT_NAME = SPILDemo; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_GC = required; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = SPILDemo_Prefix.pch; + INFOPLIST_FILE = Resources/Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES; + PRODUCT_NAME = SPILDemo; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SPILDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SPILDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/SPILDemo_Prefix.pch b/SPILDemo_Prefix.pch new file mode 100644 index 0000000..4523475 --- /dev/null +++ b/SPILDemo_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'CATest' target in the 'CATest' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..fb922f2 --- /dev/null +++ b/notes.txt @@ -0,0 +1,13 @@ +TODO + +Bugs: +Why doesn't QC layer animate when built in release mode? + +Nice-to-haves: +Make it not drop frames when resizing, etc +* have it keep a record of drawn frames, and when it draws, if it notices it missed one, draw it + +Do more sampling with Shark +* this background-color method might be too slow? + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file