Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git] / QuartzCore / CALayer.h
blob135fff88f9294b14e742dd2adff8237836810289
2 #import <Foundation/Foundation.h>
3 #import <ApplicationServices/ApplicationServices.h>
4 #import <QuartzCore/CATransform3D.h>
5 #import <QuartzCore/CAAction.h>
7 @class CAAnimation, CALayerContext;
9 enum {
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;
25 CALayer *_superlayer;
26 NSArray *_sublayers;
27 id _delegate;
28 CGPoint _anchorPoint;
29 CGPoint _position;
30 CGRect _bounds;
31 float _opacity;
32 BOOL _opaque;
33 id _contents;
34 CATransform3D _transform;
35 CATransform3D _sublayerTransform;
36 NSString *_minificationFilter;
37 NSString *_magnificationFilter;
38 BOOL _needsDisplay;
39 NSMutableDictionary *_animations;
40 NSNumber *_textureId;
43 + layer;
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;
61 - init;
63 - (void)addSublayer:(CALayer *)layer;
64 - (void)replaceSublayer:(CALayer *)layer with:(CALayer *)other;
65 - (void)display;
66 - (void)displayIfNeeded;
67 - (void)drawInContext:(CGContextRef)context;
68 - (BOOL)needsDisplay;
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;
81 @end
83 @interface NSObject (CALayerDelegate)
85 - (void)displayLayer:(CALayer *)layer;
86 - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context;
88 @end