[AUTO]: updating luabinding automatically

This commit is contained in:
CocosRobot 2014-05-27 02:21:22 +00:00
parent 866a1cb9aa
commit 9e9cab9e53
6 changed files with 140 additions and 70 deletions

View File

@ -101,6 +101,19 @@
-- @param self -- @param self
-- @return Ref#Ref ret (return value: cc.Ref) -- @return Ref#Ref ret (return value: cc.Ref)
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- @function [parent=#ListView] addChild
-- @param self
-- @param #cc.Node node
-- @param #int int
-- @param #int int
-------------------------------- --------------------------------
-- @function [parent=#ListView] setDirection -- @function [parent=#ListView] setDirection
-- @param self -- @param self
@ -111,10 +124,25 @@
-- @param self -- @param self
-- @return string#string ret (return value: string) -- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#ListView] removeAllChildrenWithCleanup
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#ListView] removeAllChildren
-- @param self
-------------------------------- --------------------------------
-- @function [parent=#ListView] sortAllChildren -- @function [parent=#ListView] sortAllChildren
-- @param self -- @param self
--------------------------------
-- @function [parent=#ListView] removeChild
-- @param self
-- @param #cc.Node node
-- @param #bool bool
-------------------------------- --------------------------------
-- @function [parent=#ListView] ListView -- @function [parent=#ListView] ListView
-- @param self -- @param self

View File

@ -1,7 +1,7 @@
-------------------------------- --------------------------------
-- @module PageView -- @module PageView
-- @extend Layout,UIScrollInterface -- @extend Layout
-------------------------------- --------------------------------
-- @function [parent=#PageView] getCurPageIndex -- @function [parent=#PageView] getCurPageIndex

View File

@ -1,7 +1,7 @@
-------------------------------- --------------------------------
-- @module ScrollView -- @module ScrollView
-- @extend Layout,UIScrollInterface -- @extend Layout,ScrollViewProtocol
-------------------------------- --------------------------------
-- @function [parent=#ScrollView] scrollToTop -- @function [parent=#ScrollView] scrollToTop
@ -222,6 +222,13 @@
-- @function [parent=#ScrollView] removeAllChildren -- @function [parent=#ScrollView] removeAllChildren
-- @param self -- @param self
--------------------------------
-- @function [parent=#ScrollView] findNextFocusedWidget
-- @param self
-- @param #ccui.Widget::FocusDirection focusdirection
-- @param #ccui.Widget widget
-- @return Widget#Widget ret (return value: ccui.Widget)
-------------------------------- --------------------------------
-- @function [parent=#ScrollView] removeChild -- @function [parent=#ScrollView] removeChild
-- @param self -- @param self

View File

@ -215,7 +215,6 @@
-------------------------------- --------------------------------
-- @function [parent=#Widget] getCurrentFocusedWidget -- @function [parent=#Widget] getCurrentFocusedWidget
-- @param self -- @param self
-- @param #bool bool
-- @return Widget#Widget ret (return value: ccui.Widget) -- @return Widget#Widget ret (return value: ccui.Widget)
-------------------------------- --------------------------------
@ -246,6 +245,13 @@
-- @param self -- @param self
-- @param #bool bool -- @param #bool bool
--------------------------------
-- @function [parent=#Widget] interceptTouchEvent
-- @param self
-- @param #ccui.Widget::TouchEventType toucheventtype
-- @param #ccui.Widget widget
-- @param #cc.Vec2 vec2
-------------------------------- --------------------------------
-- @function [parent=#Widget] addTouchEventListener -- @function [parent=#Widget] addTouchEventListener
-- @param self -- @param self
@ -277,13 +283,6 @@
-- @param self -- @param self
-- @param #ccui.Widget::SizeType sizetype -- @param #ccui.Widget::SizeType sizetype
--------------------------------
-- @function [parent=#Widget] checkChildInfo
-- @param self
-- @param #int int
-- @param #ccui.Widget widget
-- @param #cc.Vec2 vec2
-------------------------------- --------------------------------
-- @function [parent=#Widget] setSize -- @function [parent=#Widget] setSize
-- @param self -- @param self
@ -299,6 +298,11 @@
-- @param self -- @param self
-- @return bool#bool ret (return value: bool) -- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] enableDpadNavigation
-- @param self
-- @param #bool bool
-------------------------------- --------------------------------
-- @function [parent=#Widget] create -- @function [parent=#Widget] create
-- @param self -- @param self

View File

@ -2683,18 +2683,15 @@ int lua_cocos2dx_ui_Widget_getCurrentFocusedWidget(lua_State* tolua_S)
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) if (argc == 0)
{ {
bool arg0;
ok &= luaval_to_boolean(tolua_S, 2,&arg0);
if(!ok) if(!ok)
return 0; return 0;
cocos2d::ui::Widget* ret = cobj->getCurrentFocusedWidget(arg0); cocos2d::ui::Widget* ret = cobj->getCurrentFocusedWidget();
object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret); object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
return 1; return 1;
} }
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getCurrentFocusedWidget",argc, 1); CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getCurrentFocusedWidget",argc, 0);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
@ -2930,6 +2927,58 @@ int lua_cocos2dx_ui_Widget_ignoreContentAdaptWithSize(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_ui_Widget_interceptTouchEvent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_interceptTouchEvent'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 3)
{
cocos2d::ui::Widget::TouchEventType arg0;
cocos2d::ui::Widget* arg1;
cocos2d::Vec2 arg2;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 3, "ccui.Widget",&arg1);
ok &= luaval_to_vec2(tolua_S, 4, &arg2);
if(!ok)
return 0;
cobj->interceptTouchEvent(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "interceptTouchEvent",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_interceptTouchEvent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_addTouchEventListener(lua_State* tolua_S) int lua_cocos2dx_ui_Widget_addTouchEventListener(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -3205,58 +3254,6 @@ int lua_cocos2dx_ui_Widget_setSizeType(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_ui_Widget_checkChildInfo(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_checkChildInfo'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 3)
{
int arg0;
cocos2d::ui::Widget* arg1;
cocos2d::Vec2 arg2;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 3, "ccui.Widget",&arg1);
ok &= luaval_to_vec2(tolua_S, 4, &arg2);
if(!ok)
return 0;
cobj->checkChildInfo(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "checkChildInfo",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_checkChildInfo'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_setSize(lua_State* tolua_S) int lua_cocos2dx_ui_Widget_setSize(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -3393,6 +3390,38 @@ int lua_cocos2dx_ui_Widget_isFocusEnabled(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_ui_Widget_enableDpadNavigation(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.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
bool arg0;
ok &= luaval_to_boolean(tolua_S, 2,&arg0);
if(!ok)
return 0;
cocos2d::ui::Widget::enableDpadNavigation(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "enableDpadNavigation",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_enableDpadNavigation'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_create(lua_State* tolua_S) int lua_cocos2dx_ui_Widget_create(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -3517,17 +3546,18 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S)
tolua_function(tolua_S,"getSize",lua_cocos2dx_ui_Widget_getSize); tolua_function(tolua_S,"getSize",lua_cocos2dx_ui_Widget_getSize);
tolua_function(tolua_S,"getSizeType",lua_cocos2dx_ui_Widget_getSizeType); tolua_function(tolua_S,"getSizeType",lua_cocos2dx_ui_Widget_getSizeType);
tolua_function(tolua_S,"ignoreContentAdaptWithSize",lua_cocos2dx_ui_Widget_ignoreContentAdaptWithSize); tolua_function(tolua_S,"ignoreContentAdaptWithSize",lua_cocos2dx_ui_Widget_ignoreContentAdaptWithSize);
tolua_function(tolua_S,"interceptTouchEvent",lua_cocos2dx_ui_Widget_interceptTouchEvent);
tolua_function(tolua_S,"addTouchEventListener",lua_cocos2dx_ui_Widget_addTouchEventListener); tolua_function(tolua_S,"addTouchEventListener",lua_cocos2dx_ui_Widget_addTouchEventListener);
tolua_function(tolua_S,"getPositionPercent",lua_cocos2dx_ui_Widget_getPositionPercent); tolua_function(tolua_S,"getPositionPercent",lua_cocos2dx_ui_Widget_getPositionPercent);
tolua_function(tolua_S,"hitTest",lua_cocos2dx_ui_Widget_hitTest); tolua_function(tolua_S,"hitTest",lua_cocos2dx_ui_Widget_hitTest);
tolua_function(tolua_S,"isFlippedX",lua_cocos2dx_ui_Widget_isFlippedX); tolua_function(tolua_S,"isFlippedX",lua_cocos2dx_ui_Widget_isFlippedX);
tolua_function(tolua_S,"isFlippedY",lua_cocos2dx_ui_Widget_isFlippedY); tolua_function(tolua_S,"isFlippedY",lua_cocos2dx_ui_Widget_isFlippedY);
tolua_function(tolua_S,"setSizeType",lua_cocos2dx_ui_Widget_setSizeType); tolua_function(tolua_S,"setSizeType",lua_cocos2dx_ui_Widget_setSizeType);
tolua_function(tolua_S,"checkChildInfo",lua_cocos2dx_ui_Widget_checkChildInfo);
tolua_function(tolua_S,"setSize",lua_cocos2dx_ui_Widget_setSize); tolua_function(tolua_S,"setSize",lua_cocos2dx_ui_Widget_setSize);
tolua_function(tolua_S,"setBright",lua_cocos2dx_ui_Widget_setBright); tolua_function(tolua_S,"setBright",lua_cocos2dx_ui_Widget_setBright);
tolua_function(tolua_S,"isFocusEnabled",lua_cocos2dx_ui_Widget_isFocusEnabled); tolua_function(tolua_S,"isFocusEnabled",lua_cocos2dx_ui_Widget_isFocusEnabled);
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Widget_constructor); tolua_function(tolua_S,"new",lua_cocos2dx_ui_Widget_constructor);
tolua_function(tolua_S,"enableDpadNavigation", lua_cocos2dx_ui_Widget_enableDpadNavigation);
tolua_function(tolua_S,"create", lua_cocos2dx_ui_Widget_create); tolua_function(tolua_S,"create", lua_cocos2dx_ui_Widget_create);
tolua_endmodule(tolua_S); tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::ui::Widget).name(); std::string typeName = typeid(cocos2d::ui::Widget).name();
@ -16743,7 +16773,6 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
lua_register_cocos2dx_ui_TextBMFont(tolua_S); lua_register_cocos2dx_ui_TextBMFont(tolua_S);
lua_register_cocos2dx_ui_LoadingBar(tolua_S); lua_register_cocos2dx_ui_LoadingBar(tolua_S);
lua_register_cocos2dx_ui_TextField(tolua_S); lua_register_cocos2dx_ui_TextField(tolua_S);
lua_register_cocos2dx_ui_RichText(tolua_S);
lua_register_cocos2dx_ui_RichElement(tolua_S); lua_register_cocos2dx_ui_RichElement(tolua_S);
lua_register_cocos2dx_ui_RichElementCustomNode(tolua_S); lua_register_cocos2dx_ui_RichElementCustomNode(tolua_S);
lua_register_cocos2dx_ui_Slider(tolua_S); lua_register_cocos2dx_ui_Slider(tolua_S);
@ -16757,6 +16786,7 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
lua_register_cocos2dx_ui_PageView(tolua_S); lua_register_cocos2dx_ui_PageView(tolua_S);
lua_register_cocos2dx_ui_Helper(tolua_S); lua_register_cocos2dx_ui_Helper(tolua_S);
lua_register_cocos2dx_ui_Text(tolua_S); lua_register_cocos2dx_ui_Text(tolua_S);
lua_register_cocos2dx_ui_RichText(tolua_S);
lua_register_cocos2dx_ui_RichElementImage(tolua_S); lua_register_cocos2dx_ui_RichElementImage(tolua_S);
lua_register_cocos2dx_ui_RelativeLayoutParameter(tolua_S); lua_register_cocos2dx_ui_RelativeLayoutParameter(tolua_S);

View File

@ -384,6 +384,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
#endif // __cocos2dx_ui_h__ #endif // __cocos2dx_ui_h__