00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #import <Availability.h>
00029 #ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
00030 #import <UIKit/UIKit.h>
00031 #import "Platforms/iOS/CCTouchDelegateProtocol.h"
00032 #elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
00033 #import "Platforms/Mac/CCEventDispatcher.h"
00034 #endif
00035
00036 #import "CCProtocols.h"
00037 #import "CCNode.h"
00038
00039
00040
00041
00048 #ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
00049 @interface CCLayer : CCNode <UIAccelerometerDelegate, CCStandardTouchDelegate, CCTargetedTouchDelegate>
00050 {
00051 BOOL isTouchEnabled_;
00052 BOOL isAccelerometerEnabled_;
00053 }
00067 -(void) registerWithTouchDispatcher;
00068
00077 @property(nonatomic,assign) BOOL isTouchEnabled;
00085 @property(nonatomic,assign) BOOL isAccelerometerEnabled;
00086
00087 #elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
00088
00089
00090 @interface CCLayer : CCNode <CCKeyboardEventDelegate, CCMouseEventDelegate>
00091 {
00092 BOOL isMouseEnabled_;
00093 BOOL isKeyboardEnabled_;
00094 }
00095
00100 @property (nonatomic, readwrite) BOOL isMouseEnabled;
00101
00106 @property (nonatomic, readwrite) BOOL isKeyboardEnabled;
00107
00114 -(NSInteger) mouseDelegatePriority;
00115
00122 -(NSInteger) keyboardDelegatePriority;
00123
00124 #endif // mac
00125
00126
00127 @end
00128
00129
00130
00131
00138 @interface CCLayerColor : CCLayer <CCRGBAProtocol, CCBlendProtocol>
00139 {
00140 GLubyte opacity_;
00141 ccColor3B color_;
00142 GLfloat squareVertices[4 * 2];
00143 GLubyte squareColors[4 * 4];
00144
00145 ccBlendFunc blendFunc_;
00146 }
00147
00149 + (id) layerWithColor: (ccColor4B)color width:(GLfloat)w height:(GLfloat)h;
00151 + (id) layerWithColor: (ccColor4B)color;
00152
00154 - (id) initWithColor:(ccColor4B)color width:(GLfloat)w height:(GLfloat)h;
00156 - (id) initWithColor:(ccColor4B)color;
00157
00159 -(void) changeWidth: (GLfloat)w;
00161 -(void) changeHeight: (GLfloat)h;
00165 -(void) changeWidth:(GLfloat)w height:(GLfloat)h;
00166
00168 @property (nonatomic,readonly) GLubyte opacity;
00170 @property (nonatomic,readonly) ccColor3B color;
00172 @property (nonatomic,readwrite) ccBlendFunc blendFunc;
00173 @end
00174
00180 DEPRECATED_ATTRIBUTE @interface CCColorLayer : CCLayerColor
00181 @end
00182
00183
00184
00185
00186
00205 @interface CCLayerGradient : CCLayerColor
00206 {
00207 ccColor3B endColor_;
00208 GLubyte startOpacity_;
00209 GLubyte endOpacity_;
00210 CGPoint vector_;
00211 }
00212
00214 + (id) layerWithColor: (ccColor4B) start fadingTo: (ccColor4B) end;
00216 + (id) layerWithColor: (ccColor4B) start fadingTo: (ccColor4B) end alongVector: (CGPoint) v;
00217
00219 - (id) initWithColor: (ccColor4B) start fadingTo: (ccColor4B) end;
00221 - (id) initWithColor: (ccColor4B) start fadingTo: (ccColor4B) end alongVector: (CGPoint) v;
00222
00224 - (ccColor3B) startColor;
00225 - (void) setStartColor:(ccColor3B)colors;
00226
00228 @property (nonatomic, readwrite) ccColor3B endColor;
00230 @property (nonatomic, readwrite) GLubyte startOpacity;
00232 @property (nonatomic, readwrite) GLubyte endOpacity;
00234 @property (nonatomic, readwrite) CGPoint vector;
00235
00236 @end
00237
00243 @interface CCMultiplexLayer : CCLayer
00244 {
00245 unsigned int enabledLayer;
00246 NSMutableArray *layers;
00247 }
00248
00250 +(id) layerWithLayers: (CCLayer*) layer, ... NS_REQUIRES_NIL_TERMINATION;
00252 -(id) initWithLayers: (CCLayer*) layer vaList:(va_list) params;
00256 -(void) switchTo: (unsigned int) n;
00260 -(void) switchToAndReleaseMe: (unsigned int) n;
00261 @end