axmol/tools/tolua++/CCLayer.pkg

115 lines
3.5 KiB
Plaintext

typedef enum {
kCCTouchesAllAtOnce,
kCCTouchesOneByOne,
} ccTouchesMode;
class CCLayer : public CCNode
{
void setTouchEnabled(bool bValue);
bool isTouchEnabled() const;
void setAccelerometerEnabled(bool bValue);
bool isAccelerometerEnabled() const;
void setKeypadEnabled(bool bValue);
bool isKeypadEnabled() const;
virtual void setTouchMode(ccTouchesMode mode);
virtual int getTouchMode() const;
virtual void setTouchPriority(int priority);
virtual int getTouchPriority() const;
void registerScriptTouchHandler(LUA_FUNCTION nHandler,
bool bIsMultiTouches = false,
int nPriority = 0,
bool bSwallowsTouches = false);
void unregisterScriptTouchHandler();
void registerScriptKeypadHandler(LUA_FUNCTION nHandler);
void unregisterScriptKeypadHandler(void);
void registerScriptAccelerateHandler(LUA_FUNCTION nHandler);
void unregisterScriptAccelerateHandler(void);
static CCLayer *create(void);
};
class CCLayerRGBA : public CCLayer, public CCRGBAProtocol
{
static CCLayerRGBA* create();
CCLayerRGBA();
virtual ~CCLayerRGBA();
virtual bool init();
virtual GLubyte getOpacity() const;
virtual GLubyte getDisplayedOpacity() const;
virtual void setOpacity(GLubyte opacity);
virtual void updateDisplayedOpacity(GLubyte parentOpacity);
virtual bool isCascadeOpacityEnabled() const;
virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled);
virtual const Color3B& getColor() const;
virtual const Color3B& getDisplayedColor() const;
virtual void setColor(const Color3B& color);
virtual void updateDisplayedColor(const Color3B& parentColor);
virtual bool isCascadeColorEnabled() const;
virtual void setCascadeColorEnabled(bool cascadeColorEnabled);
virtual void setOpacityModifyRGB(bool bValue);
virtual bool isOpacityModifyRGB() const;
};
class CCLayerColor : public CCLayerRGBA
{
void changeWidth(GLfloat w);
void changeHeight(GLfloat h);
void changeWidthAndHeight(GLfloat w ,GLfloat h);
void setContentSize(const CCSize & var);
void setOpacity(GLubyte var);
void setColor(Color3B Value);
void setBlendFunc(BlendFunc Value);
BlendFunc getBlendFunc(void) const;
void setOpacityModifyRGB(bool bValue);
bool isOpacityModifyRGB(void) const;
static CCLayerColor * create(Color4B color, GLfloat width, GLfloat height);
static CCLayerColor * create(Color4B color);
};
class CCLayerGradient : public CCLayerColor
{
void setStartColor(Color3B colors);
Color3B getStartColor() const;
void setEndColor(Color3B Value);
Color3B getEndColor(void) const;
void setStartOpacity(GLubyte Value);
GLubyte getStartOpacity(void);
void setEndOpacity(GLubyte Value);
GLubyte getEndOpacity(void);
void setVector(CCPoint Value);
CCPoint getVector(void);
void setCompressedInterpolation(bool Value);
bool isCompressedInterpolation(void) const;
static CCLayerGradient* create(Color4B start, Color4B end, CCPoint v);
static CCLayerGradient* create(Color4B start, Color4B end);
static CCLayerGradient* create();
};
class CCLayerMultiplex : public CCLayer
{
void addLayer(CCLayer* layer);
void switchTo(unsigned int n);
void switchToAndReleaseMe(unsigned int n);
static CCLayerMultiplex* createWithArray(CCArray* arrayOfLayers);
static CCLayerMultiplex * create();
static CCLayerMultiplex * createWithLayer(CCLayer* layer);
};