update luabinding

This commit is contained in:
dualface 2012-12-02 15:48:15 +08:00
parent 393ce26330
commit 5bc95780c0
10 changed files with 26 additions and 20 deletions

View File

@ -1 +1 @@
58e432f8cbf9f340398f9d6db2b61303b6a06034 4aaca551348faf166a1d43ff3db90b59bcd16212

View File

@ -23,6 +23,7 @@ enum TargetPlatform
class CCApplication class CCApplication
{ {
~CCApplication();
static CCApplication* sharedApplication(); static CCApplication* sharedApplication();
ccLanguageType getCurrentLanguage(); ccLanguageType getCurrentLanguage();
TargetPlatform getTargetPlatform(); TargetPlatform getTargetPlatform();

View File

@ -13,7 +13,6 @@ class CCDirector : public CCObject
double getAnimationInterval(void); double getAnimationInterval(void);
bool isDisplayStats(void); bool isDisplayStats(void);
void setDisplayStats(bool bDisplayFPS);
bool isPaused(void); bool isPaused(void);
unsigned int getTotalFrames(void); unsigned int getTotalFrames(void);
@ -37,12 +36,13 @@ class CCDirector : public CCObject
void end @ endToLua (); void end @ endToLua ();
float getContentScaleFactor(void); float getContentScaleFactor(void);
void setContentScaleFactor(float scaleFactor);
CCScheduler* getScheduler(); CCScheduler* getScheduler();
CCActionManager* getActionManager(); CCActionManager* getActionManager();
CCTouchDispatcher* getTouchDispatcher(); CCTouchDispatcher* getTouchDispatcher();
CCKeypadDispatcher* getKeypadDispatcher(); // CCKeypadDispatcher* getKeypadDispatcher();
CCAccelerometer* getAccelerometer(); // CCAccelerometer* getAccelerometer();
void setDepthTest(bool var); void setDepthTest(bool var);
void setProjection(ccDirectorProjection kProjection); void setProjection(ccDirectorProjection kProjection);

View File

@ -0,0 +1,6 @@
typedef enum {
// the back key clicked msg
kTypeBackClicked = 1,
kTypeMenuClicked,
} ccKeypadMSGType;

View File

@ -31,8 +31,6 @@ class CCLabelBMFont : public CCNode
bool isOpacityModifyRGB(); bool isOpacityModifyRGB();
void setOpacityModifyRGB(bool isOpacityModifyRGB); void setOpacityModifyRGB(bool isOpacityModifyRGB);
tolua_property__CCOpacity GLubyte opacity;
static void purgeCachedData(); static void purgeCachedData();
static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointMake(0, 0)); static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointMake(0, 0));
static CCLabelBMFont * create(); static CCLabelBMFont * create();

View File

@ -10,12 +10,18 @@ class CCLayer : public CCNode
void setKeypadEnabled(bool bValue); void setKeypadEnabled(bool bValue);
bool isKeypadEnabled(); bool isKeypadEnabled();
void registerScriptTouchHandler(LUA_FUNCTION funcID, void registerScriptTouchHandler(LUA_FUNCTION nHandler,
bool bIsMultiTouches = false, bool bIsMultiTouches = false,
int nPriority = 0, int nPriority = 0,
bool bSwallowsTouches = false); bool bSwallowsTouches = false);
void unregisterScriptTouchHandler(); void unregisterScriptTouchHandler();
void registerScriptKeypadHandler(LUA_FUNCTION nHandler);
void unregisterScriptKeypadHandler(void);
void registerScriptAccelerateHandler(LUA_FUNCTION nHandler);
void unregisterScriptAccelerateHandler(void);
static CCLayer *create(void); static CCLayer *create(void);
}; };

View File

@ -68,8 +68,6 @@ class CCSprite : public CCNode
void setOpacity(GLubyte opacity); void setOpacity(GLubyte opacity);
GLubyte getOpacity(void); GLubyte getOpacity(void);
tolua_property__CCOpacity GLubyte opacity;
void setColor(ccColor3B color3); void setColor(ccColor3B color3);
ccColor3B getColor(void); ccColor3B getColor(void);
void setOpacityModifyRGB(bool bValue); void setOpacityModifyRGB(bool bValue);

View File

@ -0,0 +1,6 @@
class CCTouchDispatcher : public CCObject
{
bool isDispatchEvents(void);
void setDispatchEvents(bool bDispatchEvents);
};

View File

@ -16,9 +16,11 @@ $pfile "CCFileUtils.pkg"
$pfile "CCDrawingPrimitives.pkg" $pfile "CCDrawingPrimitives.pkg"
$pfile "CCAffineTransform.pkg" $pfile "CCAffineTransform.pkg"
$pfile "CCApplication.pkg" $pfile "CCApplication.pkg"
$pfile "CCTouchDispatcher.pkg"
$pfile "CCDirector.pkg" $pfile "CCDirector.pkg"
$pfile "CCUserDefault.pkg" $pfile "CCUserDefault.pkg"
$pfile "CCNotificationCenter.pkg" $pfile "CCNotificationCenter.pkg"
$pfile "CCKeypadDispatcher.pkg"
$pfile "CCNode.pkg" $pfile "CCNode.pkg"
$pfile "CCTexture2D.pkg" $pfile "CCTexture2D.pkg"

View File

@ -201,14 +201,3 @@ _to_functions["LUA_FUNCTION"] = "toluafix_ref_function"
_is_functions["LUA_FUNCTION"] = "toluafix_isfunction" _is_functions["LUA_FUNCTION"] = "toluafix_isfunction"
_to_functions["LUA_TABLE"] = "toluafix_totable" _to_functions["LUA_TABLE"] = "toluafix_totable"
_is_functions["LUA_TABLE"] = "toluafix_istable" _is_functions["LUA_TABLE"] = "toluafix_istable"
function get_property_methods_hook(ptype, name)
if ptype == "IsVisible" then
return "isVisible", "setVisible"
end
if string.sub(ptype, 1, 2) == "CC" then
ptype = string.sub(ptype, 3)
end
return "get"..ptype, "set"..ptype
end