Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Partial port of the LayerPolynomials example from Chapter 32.

  • Loading branch information...
commit 9a28962afa8650fcf86348ec38bc21f163bbb113 1 parent 6a7f7e9
@timburks authored
View
BIN  32_CoreAnimation/LayerPolynomials/English.lproj/InfoPlist.strings
Binary file not shown
View
2,639 32_CoreAnimation/LayerPolynomials/English.lproj/MainMenu.nib/designable.nib
2,639 additions, 0 deletions not shown
View
BIN  32_CoreAnimation/LayerPolynomials/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
View
28 32_CoreAnimation/LayerPolynomials/Info.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.Polynomials</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
View
143 32_CoreAnimation/LayerPolynomials/Nu/main.nu
@@ -0,0 +1,143 @@
+;; file main.nu
+;; discussion Entry point for a Nu program.
+;; copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
+
+(import Cocoa) ;; bridgesupport
+(load "console") ;; interactive console
+
+(set MARGIN 10)
+
+(global M_PI 3.1415927)
+(global hypot (NuBridgedFunction functionWithName:"hypot" signature:"ddd"))
+(global random (NuBridgedFunction functionWithName:"random" signature:"l"))
+(global cos (NuBridgedFunction functionWithName:"cos" signature:"dd"))
+(global sin (NuBridgedFunction functionWithName:"sin" signature:"dd"))
+
+(class PolynomialView is NSView
+ (ivar (id) polynomials (BOOL) blasted)
+
+ (- (id)initWithFrame:(NSRect)frame is
+ (super initWithFrame:frame)
+ (set @polynomials (array))
+ (set @blasted NO)
+ self)
+
+ (- (void)resizeAndRedrawPolynomialLayers is
+ (set b ((self layer) bounds))
+ (set b (CGRectInset b MARGIN MARGIN))
+ (NSAnimationContext beginGrouping)
+ ((NSAnimationContext currentContext) setDuration:0)
+ (set polynomialLayers ((self layer) sublayers))
+ (polynomialLayers each:
+ (do (layer)
+ (layer setFrame:(list ((layer frame) 0)
+ ((layer frame) 1)
+ (b 2)
+ (b 3)))
+ (layer setNeedsDisplay)))
+ (NSAnimationContext endGrouping))
+
+ (- (void)setFrameSize:(NSSize)newSize is
+ (super setFrameSize:newSize)
+ (unless (self inLiveResize))
+ (self resizeAndRedrawPolynomialLayers))
+
+ (- (void)viewDidEndLiveResize is
+ (self resizeAndRedrawPolynomialLayers))
+
+ (- (void)blastem:(id)sender is
+ (NSAnimationContext beginGrouping)
+ ((NSAnimationContext currentContext) setDuration:3.0)
+ (set polynomialLayers ((self layer) sublayers))
+ (polynomialLayers each:
+ (do (layer)
+ (if @blasted
+ (then (set p (list MARGIN MARGIN)))
+ (else (set p (self randomOffViewPosition))))
+ (layer setPosition:p)))
+ (NSAnimationContext endGrouping)
+ (self willChangeValueForKey:"blasted")
+ (set @blasted (not @blasted))
+ (self didChangeValueForKey:"blasted"))
+
+ (- (NSPoint)randomOffViewPosition is
+ (set bounds (self bounds))
+ (set radius (hypot (bounds third) (bounds fourth)))
+ (set angle (* 2.0 M_PI (/ (% (random) 360) 360.0)))
+ (list (* radius (cos angle)) (* radius (sin angle))))
+
+ (- (void)createNewPolynomial:(id)sender is
+ (set p ((Polynomial alloc) init))
+ (@polynomials addObject:p)
+ (set layer (CALayer layer))
+ (set b ((self layer) bounds))
+ (set b (CGRectInset b MARGIN MARGIN))
+ (layer setAnchorPoint:'(0 0))
+ (layer setFrame:b)
+ (layer setDelegate:p)
+ (layer setCornerRadius:12)
+ (layer setBorderColor:(p color))
+ (layer setBorderWidth:3.5)
+ ((self layer) addSublayer:layer)
+ (layer display)
+ (set anim (CABasicAnimation animationWithKeyPath:"position"))
+ (anim setFromValue:(NSValue valueWithPoint:(self randomOffViewPosition)))
+ (anim setToValue:(NSValue valueWithPoint:(list MARGIN MARGIN)))
+ (anim setDuration:1.0)
+ (set f (CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear))
+ (anim setTimingFunction:f)
+ (layer addAnimation:anim forKey:"whatever"))
+
+ (- (void)deleteRandomPolynomial:(id)sender is
+ (set polynomialLayers ((self layer) sublayers))
+ (if (or (eq polynomialLayers nil) (eq (polynomialLayers count) 0))
+ (NSBeep)
+ (return))
+ (set i (% (random) (polynomialLayers count)))
+ (set toPoint (self randomOffViewPosition))
+ (set layerToPull (polynomialLayers objectAtIndex:i))
+ (set anim (CABasicAnimation animationWithKeyPath:"position"))
+ (anim setValue:layerToPull forKey:"representedPolynomialLayer")
+ (anim setFromValue:(NSValue valueWithPoint:(NSMakePoint MARGIN MARGIN)))
+ (anim setToValue:(NSValue valueWithPoint:toPoint))
+ (anim setDuration:1.0)
+ (set f (CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear))
+ (anim setTimingFunction:f)
+ (anim setDelegate:self)
+ (layerToPull addAnimation:anim forKey:"whatever")
+ (layerToPull setPosition:toPoint))
+
+ (- (void)animationDidStop:(id)anim finished:(BOOL)flag is
+ (NSLog "deleting polynomial")
+ ;; FIXME: layer flashes at Position 0,0 before removal
+ (set layerToPull (anim valueForKey:"representedPolynomialLayer"))
+ (set p (layerToPull delegate))
+ (@polynomials removeObjectIdenticalTo:p)
+ (layerToPull removeFromSuperlayer))
+
+ (- (void)drawRect:(NSRect)rect is
+ (set bounds (self bounds))
+ ((NSColor whiteColor) set)
+ (NSBezierPath fillRect:bounds)))
+
+(set SHOW_CONSOLE_AT_STARTUP nil)
+
+;; @class ApplicationDelegate
+;; @discussion Methods of this class perform general-purpose tasks that are not appropriate methods of any other classes.
+(class ApplicationDelegate is NSObject
+
+ ;; This method is called after Cocoa has finished its basic application setup.
+ ;; It instantiates application-specific components.
+ ;; In this case, it constructs an interactive Nu console that can be activated from the application's Window menu.
+ (- (void) applicationDidFinishLaunching:(id) sender is
+ (set $console ((NuConsoleWindowController alloc) init))
+ (if SHOW_CONSOLE_AT_STARTUP ($console toggleConsole:self))))
+
+;; install the delegate and keep a reference to it since the application won't retain it.
+((NSApplication sharedApplication) setDelegate:(set $delegate ((ApplicationDelegate alloc) init)))
+
+;; this makes the application window take focus when we've started it from the terminal (or with nuke)
+((NSApplication sharedApplication) activateIgnoringOtherApps:YES)
+
+;; run the main Cocoa event loop
+(NSApplicationMain 0 nil)
View
21 32_CoreAnimation/LayerPolynomials/Polynomial.h
@@ -0,0 +1,21 @@
+//
+// Polynomial.h
+// Polynomials
+//
+// Created by Aaron Hillegass on 11/27/07.
+// Copyright 2007 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface Polynomial : NSObject {
+ __strong CGFloat * terms;
+ int termCount;
+ __strong CGColorRef color;
+}
+- (id)init;
+- (float)valueAt:(float)x;
+- (void)drawInRect:(CGRect)b
+ inContext:(CGContextRef)ctx;
+- (CGColorRef)color;
+@end
View
97 32_CoreAnimation/LayerPolynomials/Polynomial.m
@@ -0,0 +1,97 @@
+//
+// Polynomial.m
+// Polynomials
+//
+// Created by Aaron Hillegass on 11/27/07.
+// Copyright 2007 __MyCompanyName__. All rights reserved.
+//
+
+#import "Polynomial.h"
+#import <QuartzCore/QuartzCore.h>
+
+#define HOPS (100)
+#define RANDFLOAT() (random() % 128 / 128.0)
+
+static CGRect funcRect = {-20, -20, 40, 40};
+
+@implementation Polynomial
+- (id)init
+{
+ [super init];
+ termCount = (random() % 3) + 2;
+ terms = NSAllocateCollectable(termCount * sizeof(CGFloat), NSScannedOption);
+ color = CGColorCreateGenericRGB(RANDFLOAT(), RANDFLOAT(), RANDFLOAT(), 0.7);
+ NSMakeCollectable(color);
+
+ int i;
+ for (i = 0; i < termCount; i++) {
+ terms[i] = 5.0 - (random() % 100) / 10.0;
+ }
+
+ return self;
+}
+- (float)valueAt:(float)x
+{
+ float result = 0;
+ int i;
+ for (i = 0; i < termCount; i++) {
+ result = (result * x) + terms[i];
+ }
+ return result;
+}
+
+- (void)drawInRect:(CGRect)b inContext:(CGContextRef)ctx
+{
+ NSLog(@"drawing");
+ CGAffineTransform tf;
+ tf = CGAffineTransformMake(b.size.width / funcRect.size.width, 0,
+ 0, b.size.height / funcRect.size.height,
+ b.size.width/2, b.size.height/2);
+ CGContextSaveGState(ctx);
+ CGContextConcatCTM(ctx, tf);
+ CGContextSetStrokeColorWithColor(ctx, color);
+ CGContextSetLineWidth(ctx, 0.4);
+ float distance = funcRect.size.width / HOPS;
+ float currentX = funcRect.origin.x;
+ BOOL first = YES;
+ while (currentX <= funcRect.origin.x + funcRect.size.width) {
+ float currentY = [self valueAt:currentX];
+ if (first) {
+ CGContextMoveToPoint(ctx, currentX, currentY);
+ first = NO;
+ } else {
+ CGContextAddLineToPoint(ctx, currentX, currentY);
+ }
+ currentX += distance;
+ }
+ CGContextStrokePath(ctx);
+ CGContextRestoreGState(ctx);
+
+}
+
+- (void)drawLayer:(CALayer *)layer
+ inContext:(CGContextRef)ctx
+{
+ CGRect cgb = [layer bounds];
+ [self drawInRect:cgb
+ inContext:ctx];
+}
+- (id<CAAction>)actionForLayer:(CALayer *)layer
+ forKey:(NSString *)event
+{
+ NSLog(@"action = %@", event);
+ return nil;
+}
+
+
+- (CGColorRef)color
+{
+ return color;
+}
+- (void)finalize
+{
+ NSLog(@"finalizing");
+ [super finalize];
+}
+
+@end
View
306 32_CoreAnimation/LayerPolynomials/Polynomials.xcodeproj/project.pbxproj
@@ -0,0 +1,306 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 44;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 2293DC580DE769340020A69D /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = 2293DC570DE769340020A69D /* main.nu */; };
+ 2293DC9B0DE7721D0020A69D /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2293DC9A0DE7721D0020A69D /* Nu.framework */; };
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ 93BC9DBA0CFC8997007CEC11 /* Polynomial.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BC9DB90CFC8997007CEC11 /* Polynomial.m */; };
+ 93DF76860D1728060009FDDE /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DF76850D1728060009FDDE /* QuartzCore.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 2293DC570DE769340020A69D /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = Nu/main.nu; sourceTree = "<group>"; };
+ 2293DC9A0DE7721D0020A69D /* Nu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nu.framework; path = /Library/Frameworks/Nu.framework; sourceTree = "<absolute>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32CA4F630368D1EE00C91783 /* Polynomials_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Polynomials_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* Polynomials.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Polynomials.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 93BC9DB80CFC8997007CEC11 /* Polynomial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Polynomial.h; sourceTree = "<group>"; };
+ 93BC9DB90CFC8997007CEC11 /* Polynomial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Polynomial.m; sourceTree = "<group>"; };
+ 93DF76850D1728060009FDDE /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ 93DF76860D1728060009FDDE /* QuartzCore.framework in Frameworks */,
+ 2293DC9B0DE7721D0020A69D /* Nu.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 93BC9DB80CFC8997007CEC11 /* Polynomial.h */,
+ 93BC9DB90CFC8997007CEC11 /* Polynomial.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2293DC9A0DE7721D0020A69D /* Nu.framework */,
+ 93DF76850D1728060009FDDE /* QuartzCore.framework */,
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* Polynomials.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2293DC4C0DE769110020A69D /* Nu */ = {
+ isa = PBXGroup;
+ children = (
+ 2293DC570DE769340020A69D /* main.nu */,
+ );
+ name = Nu;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* Polynomials */ = {
+ isa = PBXGroup;
+ children = (
+ 2293DC4C0DE769110020A69D /* Nu */,
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = Polynomials;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* Polynomials_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* Polynomials */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Polynomials" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Polynomials;
+ productInstallPath = "$(HOME)/Applications";
+ productName = Polynomials;
+ productReference = 8D1107320486CEB800E47090 /* Polynomials.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 "Polynomials" */;
+ compatibilityVersion = "Xcode 3.0";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* Polynomials */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* Polynomials */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ 2293DC580DE769340020A69D /* main.nu in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ 93BC9DBA0CFC8997007CEC11 /* Polynomial.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 29B97319FDCFA39411CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH_32_BIT)";
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ GCC_MODEL_TUNING = "";
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Polynomials_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = Polynomials;
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_OBJC_GC = unsupported;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Polynomials_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = Polynomials;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_ENABLE_OBJC_GC = unsupported;
+ 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_ENABLE_OBJC_GC = unsupported;
+ 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 "Polynomials" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Polynomials" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
View
7 32_CoreAnimation/LayerPolynomials/Polynomials_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'Polynomials' target in the 'Polynomials' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
22 32_CoreAnimation/LayerPolynomials/main.m
@@ -0,0 +1,22 @@
+/*!
+ @file main.m
+ @copyright Copyright (c) 2007 Neon Design Technology, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+int NuMain(int argc, const char *argv[]);
+
+int main(int argc, const char *argv[])
+{
+ return NuMain(argc, argv);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.