Merge pull request #7207 from CocosRobot/update_lua_bindings_1403687738

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-06-25 17:19:02 +08:00
commit 4253babe0a
13 changed files with 823 additions and 332 deletions

View File

@ -6,6 +6,11 @@
-- @function [parent=#Director] pause
-- @param self
--------------------------------
-- @function [parent=#Director] setEventDispatcher
-- @param self
-- @param #cc.EventDispatcher eventdispatcher
--------------------------------
-- @function [parent=#Director] pushScene
-- @param self
@ -277,6 +282,11 @@
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#Director] getEventDispatcher
-- @param self
-- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher)
--------------------------------
-- @function [parent=#Director] replaceScene
-- @param self

View File

@ -0,0 +1,20 @@
--------------------------------
-- @module HBox
-- @extend Layout
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create()
--
-- @function [parent=#HBox] create
-- @param self
-- @param #size_table size
-- @return HBox#HBox ret (retunr value: ccui.HBox)
--------------------------------
-- @function [parent=#HBox] HBox
-- @param self
return nil

View File

@ -0,0 +1,20 @@
--------------------------------
-- @module RelativeBox
-- @extend Layout
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create()
--
-- @function [parent=#RelativeBox] create
-- @param self
-- @param #size_table size
-- @return RelativeBox#RelativeBox ret (retunr value: ccui.RelativeBox)
--------------------------------
-- @function [parent=#RelativeBox] RelativeBox
-- @param self
return nil

View File

@ -0,0 +1,20 @@
--------------------------------
-- @module VBox
-- @extend Layout
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create()
--
-- @function [parent=#VBox] create
-- @param self
-- @param #size_table size
-- @return VBox#VBox ret (retunr value: ccui.VBox)
--------------------------------
-- @function [parent=#VBox] VBox
-- @param self
return nil

View File

@ -116,4 +116,19 @@
-- @field [parent=#ccui] RichText#RichText RichText preloaded module
--------------------------------------------------------
-- the ccui HBox
-- @field [parent=#ccui] HBox#HBox HBox preloaded module
--------------------------------------------------------
-- the ccui VBox
-- @field [parent=#ccui] VBox#VBox VBox preloaded module
--------------------------------------------------------
-- the ccui RelativeBox
-- @field [parent=#ccui] RelativeBox#RelativeBox RelativeBox preloaded module
return nil

View File

@ -11244,6 +11244,52 @@ int lua_cocos2dx_Director_pause(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Director* 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.Director",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::EventDispatcher* arg0;
ok &= luaval_to_object<cocos2d::EventDispatcher>(tolua_S, 2, "cc.EventDispatcher",&arg0);
if(!ok)
return 0;
cobj->setEventDispatcher(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setEventDispatcher",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setEventDispatcher'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Director_pushScene(lua_State* tolua_S)
{
int argc = 0;
@ -13743,6 +13789,50 @@ int lua_cocos2dx_Director_setDisplayStats(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Director_getEventDispatcher(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Director* 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.Director",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getEventDispatcher'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::EventDispatcher* ret = cobj->getEventDispatcher();
object_to_luaval<cocos2d::EventDispatcher>(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getEventDispatcher",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getEventDispatcher'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Director_replaceScene(lua_State* tolua_S)
{
int argc = 0;
@ -13926,6 +14016,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Director");
tolua_function(tolua_S,"pause",lua_cocos2dx_Director_pause);
tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Director_setEventDispatcher);
tolua_function(tolua_S,"pushScene",lua_cocos2dx_Director_pushScene);
tolua_function(tolua_S,"getDeltaTime",lua_cocos2dx_Director_getDeltaTime);
tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_Director_getContentScaleFactor);
@ -13982,6 +14073,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S)
tolua_function(tolua_S,"getAnimationInterval",lua_cocos2dx_Director_getAnimationInterval);
tolua_function(tolua_S,"isPaused",lua_cocos2dx_Director_isPaused);
tolua_function(tolua_S,"setDisplayStats",lua_cocos2dx_Director_setDisplayStats);
tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Director_getEventDispatcher);
tolua_function(tolua_S,"replaceScene",lua_cocos2dx_Director_replaceScene);
tolua_function(tolua_S,"multiplyMatrix",lua_cocos2dx_Director_multiplyMatrix);
tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Director_getActionManager);

View File

@ -1559,6 +1559,8 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -16797,6 +16797,306 @@ int lua_register_cocos2dx_ui_RichText(lua_State* tolua_S)
g_typeCast["RichText"] = "ccui.RichText";
return 1;
}
int lua_cocos2dx_ui_HBox_create(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccui.HBox",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 1)
{
cocos2d::Size arg0;
ok &= luaval_to_size(tolua_S, 2, &arg0);
if (!ok) { break; }
cocos2d::ui::HBox* ret = cocos2d::ui::HBox::create(arg0);
object_to_luaval<cocos2d::ui::HBox>(tolua_S, "ccui.HBox",(cocos2d::ui::HBox*)ret);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 0)
{
cocos2d::ui::HBox* ret = cocos2d::ui::HBox::create();
object_to_luaval<cocos2d::ui::HBox>(tolua_S, "ccui.HBox",(cocos2d::ui::HBox*)ret);
return 1;
}
} while (0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "create",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_HBox_create'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_HBox_constructor(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::HBox* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cobj = new cocos2d::ui::HBox();
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.HBox");
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "HBox",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_HBox_constructor'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_ui_HBox_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (HBox)");
return 0;
}
int lua_register_cocos2dx_ui_HBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.HBox");
tolua_cclass(tolua_S,"HBox","ccui.HBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"HBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_HBox_constructor);
tolua_function(tolua_S,"create", lua_cocos2dx_ui_HBox_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::ui::HBox).name();
g_luaType[typeName] = "ccui.HBox";
g_typeCast["HBox"] = "ccui.HBox";
return 1;
}
int lua_cocos2dx_ui_VBox_create(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccui.VBox",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 1)
{
cocos2d::Size arg0;
ok &= luaval_to_size(tolua_S, 2, &arg0);
if (!ok) { break; }
cocos2d::ui::VBox* ret = cocos2d::ui::VBox::create(arg0);
object_to_luaval<cocos2d::ui::VBox>(tolua_S, "ccui.VBox",(cocos2d::ui::VBox*)ret);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 0)
{
cocos2d::ui::VBox* ret = cocos2d::ui::VBox::create();
object_to_luaval<cocos2d::ui::VBox>(tolua_S, "ccui.VBox",(cocos2d::ui::VBox*)ret);
return 1;
}
} while (0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "create",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_VBox_create'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_VBox_constructor(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::VBox* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cobj = new cocos2d::ui::VBox();
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.VBox");
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "VBox",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_VBox_constructor'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_ui_VBox_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (VBox)");
return 0;
}
int lua_register_cocos2dx_ui_VBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.VBox");
tolua_cclass(tolua_S,"VBox","ccui.VBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"VBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_VBox_constructor);
tolua_function(tolua_S,"create", lua_cocos2dx_ui_VBox_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::ui::VBox).name();
g_luaType[typeName] = "ccui.VBox";
g_typeCast["VBox"] = "ccui.VBox";
return 1;
}
int lua_cocos2dx_ui_RelativeBox_create(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccui.RelativeBox",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 1)
{
cocos2d::Size arg0;
ok &= luaval_to_size(tolua_S, 2, &arg0);
if (!ok) { break; }
cocos2d::ui::RelativeBox* ret = cocos2d::ui::RelativeBox::create(arg0);
object_to_luaval<cocos2d::ui::RelativeBox>(tolua_S, "ccui.RelativeBox",(cocos2d::ui::RelativeBox*)ret);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 0)
{
cocos2d::ui::RelativeBox* ret = cocos2d::ui::RelativeBox::create();
object_to_luaval<cocos2d::ui::RelativeBox>(tolua_S, "ccui.RelativeBox",(cocos2d::ui::RelativeBox*)ret);
return 1;
}
} while (0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "create",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_RelativeBox_create'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_RelativeBox_constructor(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::RelativeBox* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cobj = new cocos2d::ui::RelativeBox();
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.RelativeBox");
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "RelativeBox",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_RelativeBox_constructor'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_ui_RelativeBox_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (RelativeBox)");
return 0;
}
int lua_register_cocos2dx_ui_RelativeBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RelativeBox");
tolua_cclass(tolua_S,"RelativeBox","ccui.RelativeBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"RelativeBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RelativeBox_constructor);
tolua_function(tolua_S,"create", lua_cocos2dx_ui_RelativeBox_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::ui::RelativeBox).name();
g_luaType[typeName] = "ccui.RelativeBox";
g_typeCast["RelativeBox"] = "ccui.RelativeBox";
return 1;
}
TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
{
tolua_open(tolua_S);
@ -16805,12 +17105,14 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"ccui");
lua_register_cocos2dx_ui_Widget(tolua_S);
lua_register_cocos2dx_ui_CheckBox(tolua_S);
lua_register_cocos2dx_ui_Layout(tolua_S);
lua_register_cocos2dx_ui_RelativeBox(tolua_S);
lua_register_cocos2dx_ui_CheckBox(tolua_S);
lua_register_cocos2dx_ui_TextAtlas(tolua_S);
lua_register_cocos2dx_ui_TextBMFont(tolua_S);
lua_register_cocos2dx_ui_LoadingBar(tolua_S);
lua_register_cocos2dx_ui_TextField(tolua_S);
lua_register_cocos2dx_ui_VBox(tolua_S);
lua_register_cocos2dx_ui_RichElement(tolua_S);
lua_register_cocos2dx_ui_RichElementCustomNode(tolua_S);
lua_register_cocos2dx_ui_Slider(tolua_S);
@ -16820,6 +17122,7 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
lua_register_cocos2dx_ui_LayoutParameter(tolua_S);
lua_register_cocos2dx_ui_LinearLayoutParameter(tolua_S);
lua_register_cocos2dx_ui_ImageView(tolua_S);
lua_register_cocos2dx_ui_HBox(tolua_S);
lua_register_cocos2dx_ui_RichElementText(tolua_S);
lua_register_cocos2dx_ui_PageView(tolua_S);
lua_register_cocos2dx_ui_Helper(tolua_S);

View File

@ -377,6 +377,15 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);