bzr branch
/browse/iphone/common
| Line | Revision | Contents |
| 1 | 25 | // |
| 2 | // ElAnimation.h |
|
| 3 | // Jigs |
|
| 4 | // |
|
| 5 | // Created by döme on 11.08.2009. |
|
| 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. |
|
| 7 | // |
|
| 8 | ||
| 9 | #import <Foundation/Foundation.h> |
|
| 10 | 43 | #import "geometry.h" |
| 11 | 25 | |
| 12 | enum |
|
| 13 | { |
|
| 14 | kElLinearInterpolation, |
|
| 15 | kElEaseInInterpolation, |
|
| 16 | kElEaseOutInterpolation, |
|
| 17 | kElSmoothInterpolation, |
|
| 18 | kElInterpolationLast |
|
| 19 | }; |
|
| 20 | ||
| 21 | @interface ElAnimation : NSObject |
|
| 22 | { |
|
| 23 | NSTimeInterval startTime, duration; |
|
| 24 | int interpolation; |
|
| 25 | } |
|
| 26 | ||
| 27 | 27 | @property(assign) NSTimeInterval duration; |
| 28 | 25 | |
| 29 | @property(assign) int interpolation; |
|
| 30 | ||
| 31 | 27 | - (void) queueForKey: (NSString*) key atBeginning: (BOOL) atBeginning cancelPending: (BOOL) cancelPending; |
| 32 | ||
| 33 | + (ElAnimation*) delayedAnimationWithDelay: (float) seconds; |
|
| 34 | 25 | |
| 35 | + (NSTimeInterval) now; |
|
| 36 | 65 | + (NSTimeInterval) currentTime; |
| 37 | 25 | |
| 38 | @end |
|
| 39 | ||
| 40 | ||
| 41 | ||
| 42 | @interface ElFloatAnimation : ElAnimation |
|
| 43 | { |
|
| 44 | float startValue, endValue; |
|
| 45 | NSString* property; |
|
| 46 | id target; |
|
| 47 | |
|
| 48 | |
|
| 49 | } |
|
| 50 | ||
| 51 | @property(assign) float startValue, endValue; |
|
| 52 | ||
| 53 | @property(copy) NSString* property; |
|
| 54 | @property(retain) id target; |
|
| 55 | ||
| 56 | @end |
|
| 57 | 28 | |
| 58 | 43 | @interface ElV3Animation : ElAnimation |
| 59 | { |
|
| 60 | 65 | v3 startv, endv; |
| 61 | 43 | SEL setter; |
| 62 | id target; |
|
| 63 | |
|
| 64 | |
|
| 65 | } |
|
| 66 | ||
| 67 | @property(assign) v3 startv, endv; |
|
| 68 | ||
| 69 | @property(assign) SEL setter; |
|
| 70 | @property(retain) id target; |
|
| 71 | ||
| 72 | @end |
|
| 73 | ||
| 74 | 65 | @interface ElCGPositionAnimation : ElAnimation |
| 75 | { |
|
| 76 | CGPoint startPoint, endPoint; |
|
| 77 | id target; |
|
| 78 | |
|
| 79 | |
|
| 80 | } |
|
| 81 | ||
| 82 | @property(assign) CGPoint startPoint, endPoint; |
|
| 83 | ||
| 84 | @property(retain) id target; |
|
| 85 | ||
| 86 | @end |
|
| 87 | ||
| 88 | ||
| 89 | 43 | |
| 90 | 28 | extern NSString* AnimationAbsoluteTimeKey; |
| 91 | extern NSString* AnimationPassedTimeKey; |
|
| 92 | extern NSString* AnimationDeltaTimeKey; |
|
| 93 | 34 | extern NSString* AnimationUserInfoKey; |
| 94 | 28 | |
| 95 | @interface ElCallbackAnimation : ElAnimation |
|
| 96 | { |
|
| 97 | id target; |
|
| 98 | id userInfo; |
|
| 99 | SEL callback; |
|
| 100 | } |
|
| 101 | ||
| 102 | @property(retain) id target; |
|
| 103 | @property(retain) id userInfo; |
|
| 104 | @property(assign) SEL callback; |
|
| 105 | ||
| 106 | @end |
|
| 107 | ||
| 108 | 65 | /* |
| 109 | typedef int (^ElAnimationBlock)(id target, id userInfo); |
|
| 110 | ||
| 111 | @interface ElBlockAnimation : ElAnimation |
|
| 112 | { |
|
| 113 | id target; |
|
| 114 | id userInfo; |
|
| 115 | ElAnimationBlock callback; |
|
| 116 | } |
|
| 117 | ||
| 118 | @property(retain) id target; |
|
| 119 | @property(retain) id userInfo; |
|
| 120 | @property(retain) ElAnimationBlock callback; |
|
| 121 | ||
| 122 | @end |
|
| 123 | */ |
|
| 124 |
Loggerhead 1.17 is a web-based interface for Bazaar branches