axmol/tools/tolua++/CCLayer.pkg

122 lines
3.3 KiB
Plaintext

#include "CCNode.h"
#include "CCProtocols.h"
#include "CCTouchDelegateProtocol.h"
#include "CCAccelerometerDelegate.h"
#include "CCKeypadDelegate.h"
namespace cocos2d {
class CCLayer : public CCNode, public CCTouchDelegate, public CCAccelerometerDelegate, public CCKeypadDelegate
{
public:
CCLayer();
bool init();
static CCLayer *node(void);
void onEnter();
void onExit();
void onEnterTransitionDidFinish();
bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
void destroy(void);
void keep(void);
void didAccelerate(CCAcceleration* pAccelerationValue) {}
void AccelerometerDestroy(void);
void AccelerometerKeep(void);
void KeypadDestroy();
void KeypadKeep();
void registerWithTouchDispatcher(void);
void setIsTouchEnabled(bool bValue);
bool getIsTouchEnabled();
void setIsAccelerometerEnabled(bool bValue);
bool getIsAccelerometerEnabled();
void setIsKeypadEnabled(bool bValue);
bool getIsKeypadEnabled();
};
class CCLayerColor : public CCLayer , public CCRGBAProtocol, public CCBlendProtocol
{
CCLayerColor();
void draw();
void setContentSize(CCSize var);
static CCLayerColor * layerWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
static CCLayerColor * layerWithColor(ccColor4B color);
bool initWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
bool initWithColor(ccColor4B color);
void changeWidth(GLfloat w);
void changeHeight(GLfloat h);
void changeWidthAndHeight(GLfloat w ,GLfloat h);
GLubyte getOpacity(void);
void setOpacity(GLubyte var);
void setColor(ccColor3B Value);
ccColor3B getColor(void);
void setBlendFunc(ccBlendFunc Value);
ccBlendFunc getBlendFunc(void);
CCRGBAProtocol* convertToRGBAProtocol();
};
class CCColorLayer : public CCLayerColor
{
};
class CCLayerGradient : public CCLayerColor
{
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end);
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v. */
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end, CCPoint v);
/** Initializes the CCLayer with a gradient between start and end. */
bool initWithColor(ccColor4B start, ccColor4B end);
/** Initializes the CCLayer with a gradient between start and end in the direction of v. */
bool initWithColor(ccColor4B start, ccColor4B end, CCPoint v);
ccColor3B getStartColor();
void setStartColor(ccColor3B colors);
void setEndColor(ccColor3B Value);
ccColor3B getEndColor(void);
void setStartOpacity(GLubyte Value);
GLubyte getStartOpacity(void);
void setEndOpacity(GLubyte Value);
GLubyte getEndOpacity(void);
void setVector(CCPoint Value);
CCPoint getVector(void);
};
class CCMultiplexLayer : public CCLayer
{
CCMultiplexLayer();
//static CCMultiplexLayer * layerWithLayers(CCLayer* layer, ... );
//lua instead with follow func
static CCMultiplexLayer * layerWithLayer(CCLayer* layer);
void addLayer(CCLayer* layer);
bool initWithLayer(CCLayer* layer);
bool initWithLayers(CCLayer* layer, va_list params);
void switchTo(unsigned int n);
void switchToAndReleaseMe(unsigned int n);
};
}//namespace cocos2d