2 #import <Foundation/Foundation.h>
3 #import <ApplicationServices/ApplicationServices.h>
4 #import <QuartzCore/CATransform3D.h>
5 #import <QuartzCore/CAAction.h>
7 @
class CAAnimation
, CALayerContext
;
10 kCALayerNotSizable
= 0x00,
11 kCALayerMinXMargin
= 0x01,
12 kCALayerWidthSizable
= 0x02,
13 kCALayerMaxXMargin
= 0x04,
14 kCALayerMinYMargin
= 0x08,
15 kCALayerHeightSizable
= 0x10,
16 kCALayerMaxYMargin
= 0x20,
19 CA_EXPORT NSString
*const kCAFilterLinear
;
20 CA_EXPORT NSString
*const kCAFilterNearest
;
21 CA_EXPORT NSString
*const kCAFilterTrilinear
;
23 @interface CALayer
: NSObject
{
24 CALayerContext
*_context
;
34 CATransform3D _transform
;
35 CATransform3D _sublayerTransform
;
36 NSString
*_minificationFilter
;
37 NSString
*_magnificationFilter
;
39 NSMutableDictionary
*_animations
;
45 @
property(readonly
) CALayer
*superlayer
;
46 @
property(copy
) NSArray
*sublayers
;
47 @
property(assign
) id delegate
;
48 @property CGPoint anchorPoint
;
49 @property CGPoint position
;
50 @property CGRect bounds
;
51 @property CGRect frame
;
52 @property
float opacity
;
53 @property BOOL opaque
;
54 @
property(retain
) id contents
;
55 //@property CATransform3D transform;
56 @property CATransform3D sublayerTransform
;
58 @
property(copy
) NSString
*minificationFilter
;
59 @
property(copy
) NSString
*magnificationFilter
;
63 - (void)addSublayer
:(CALayer
*)layer
;
64 - (void)replaceSublayer
:(CALayer
*)layer with
:(CALayer
*)other
;
66 - (void)displayIfNeeded
;
67 - (void)drawInContext
:(CGContextRef
)context
;
69 - (void)removeFromSuperlayer
;
70 - (void)setNeedsDisplay
;
71 - (void)setNeedsDisplayInRect
:(CGRect
)rect
;
73 - (void)addAnimation
:(CAAnimation
*)animation forKey
:(NSString
*)key
;
74 - (CAAnimation
*)animationForKey
:(NSString
*)key
;
75 - (void)removeAllAnimations
;
76 - (void)removeAnimationForKey
:(NSString
*)key
;
77 - (NSArray
*)animationKeys
;
79 - (id
<CAAction
>)actionForKey
:(NSString
*)key
;
83 @interface
NSObject (CALayerDelegate
)
85 - (void)displayLayer
:(CALayer
*)layer
;
86 - (void)drawLayer
:(CALayer
*)layer inContext
:(CGContextRef
)context
;