[AUTO]: updating luabinding automatically

This commit is contained in:
CocosRobot 2014-09-25 06:50:06 +00:00
parent 9509f4cf9a
commit 7192681618
3 changed files with 110 additions and 52 deletions

View File

@ -3,12 +3,28 @@
-- @module Application
-- @parent_module cc
--------------------------------
-- brief Open url in default browser<br>
-- param String with url to open.<br>
-- return true if the resource located by the URL was successfully opened; otherwise false.
-- @function [parent=#Application] openURL
-- @param self
-- @param #string url
-- @return bool#bool ret (return value: bool)
--------------------------------
-- brief Get target platform
-- @function [parent=#Application] getTargetPlatform
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- brief Get current language config<br>
-- return Current language config
-- @function [parent=#Application] getCurrentLanguage
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- brief Get current language iso 639-1 code<br>
-- return Current language iso 639-1 code
@ -16,13 +32,6 @@
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- brief Get current language config<br>
-- return Current language config
-- @function [parent=#Application] getCurrentLanguage
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- brief Callback by Director to limit FPS.<br>
-- param interval The time, expressed in seconds, between current frame and next.

View File

@ -58962,6 +58962,53 @@ int lua_register_cocos2dx_TextureCache(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_Application_openURL(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Application* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Application",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Application*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Application_openURL'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Application:openURL");
if(!ok)
return 0;
bool ret = cobj->openURL(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Application:openURL",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Application_openURL'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Application_getTargetPlatform(lua_State* tolua_S)
{
int argc = 0;
@ -59006,50 +59053,6 @@ int lua_cocos2dx_Application_getTargetPlatform(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Application_getCurrentLanguageCode(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Application* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Application",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Application*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Application_getCurrentLanguageCode'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const char* ret = cobj->getCurrentLanguageCode();
tolua_pushstring(tolua_S,(const char*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Application:getCurrentLanguageCode",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Application_getCurrentLanguageCode'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Application_getCurrentLanguage(lua_State* tolua_S)
{
int argc = 0;
@ -59094,6 +59097,50 @@ int lua_cocos2dx_Application_getCurrentLanguage(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Application_getCurrentLanguageCode(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Application* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Application",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Application*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Application_getCurrentLanguageCode'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const char* ret = cobj->getCurrentLanguageCode();
tolua_pushstring(tolua_S,(const char*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Application:getCurrentLanguageCode",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Application_getCurrentLanguageCode'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Application_setAnimationInterval(lua_State* tolua_S)
{
int argc = 0;
@ -59183,9 +59230,10 @@ int lua_register_cocos2dx_Application(lua_State* tolua_S)
tolua_cclass(tolua_S,"Application","cc.Application","",nullptr);
tolua_beginmodule(tolua_S,"Application");
tolua_function(tolua_S,"openURL",lua_cocos2dx_Application_openURL);
tolua_function(tolua_S,"getTargetPlatform",lua_cocos2dx_Application_getTargetPlatform);
tolua_function(tolua_S,"getCurrentLanguageCode",lua_cocos2dx_Application_getCurrentLanguageCode);
tolua_function(tolua_S,"getCurrentLanguage",lua_cocos2dx_Application_getCurrentLanguage);
tolua_function(tolua_S,"getCurrentLanguageCode",lua_cocos2dx_Application_getCurrentLanguageCode);
tolua_function(tolua_S,"setAnimationInterval",lua_cocos2dx_Application_setAnimationInterval);
tolua_function(tolua_S,"getInstance", lua_cocos2dx_Application_getInstance);
tolua_endmodule(tolua_S);

View File

@ -1573,6 +1573,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
#endif // __cocos2dx_h__