[ci skip][AUTO]: updating luabinding & jsbinding automatically (#16454)

This commit is contained in:
CocosRobot 2016-08-29 11:48:21 +08:00 committed by minggo
parent 6c3f5e6d6b
commit ee4d59cf76
4 changed files with 145 additions and 83 deletions

View File

@ -5179,10 +5179,12 @@ vec2
/** /**
* @method scrollToPage * @method scrollToPage
* @param {long} arg0 * @param {long|long} long
* @param {float} float
*/ */
scrollToPage : function( scrollToPage : function(
long long,
float
) )
{ {
}, },
@ -5199,10 +5201,12 @@ vec2
/** /**
* @method scrollToItem * @method scrollToItem
* @param {long} arg0 * @param {long|long} long
* @param {float} float
*/ */
scrollToItem : function( scrollToItem : function(
long long,
float
) )
{ {
}, },

View File

@ -12541,22 +12541,41 @@ bool js_cocos2dx_ui_PageView_setIndicatorPosition(JSContext *cx, uint32_t argc,
} }
bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true; bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); cocos2d::ui::PageView* cobj = nullptr;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx);
obj.set(args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : nullptr);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToPage : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToPage : Invalid Native Object");
do {
if (argc == 2) {
ssize_t arg0 = 0;
ok &= jsval_to_ssize(cx, args.get(0), &arg0);
if (!ok) { ok = true; break; }
double arg1 = 0;
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !std::isnan(arg1);
if (!ok) { ok = true; break; }
cobj->scrollToPage(arg0, arg1);
args.rval().setUndefined();
return true;
}
} while(0);
do {
if (argc == 1) { if (argc == 1) {
ssize_t arg0 = 0; ssize_t arg0 = 0;
ok &= jsval_to_ssize(cx, args.get(0), &arg0); ok &= jsval_to_ssize(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_scrollToPage : Error processing arguments"); if (!ok) { ok = true; break; }
cobj->scrollToPage(arg0); cobj->scrollToPage(arg0);
args.rval().setUndefined(); args.rval().setUndefined();
return true; return true;
} }
} while(0);
JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToPage : wrong number of arguments: %d, was expecting %d", argc, 1); JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToPage : wrong number of arguments");
return false; return false;
} }
bool js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp)
@ -12581,22 +12600,41 @@ bool js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(JSContext *cx, ui
} }
bool js_cocos2dx_ui_PageView_scrollToItem(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_ui_PageView_scrollToItem(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true; bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); cocos2d::ui::PageView* cobj = nullptr;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx);
obj.set(args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : nullptr);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToItem : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToItem : Invalid Native Object");
do {
if (argc == 2) {
ssize_t arg0 = 0;
ok &= jsval_to_ssize(cx, args.get(0), &arg0);
if (!ok) { ok = true; break; }
double arg1 = 0;
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !std::isnan(arg1);
if (!ok) { ok = true; break; }
cobj->scrollToItem(arg0, arg1);
args.rval().setUndefined();
return true;
}
} while(0);
do {
if (argc == 1) { if (argc == 1) {
ssize_t arg0 = 0; ssize_t arg0 = 0;
ok &= jsval_to_ssize(cx, args.get(0), &arg0); ok &= jsval_to_ssize(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_scrollToItem : Error processing arguments"); if (!ok) { ok = true; break; }
cobj->scrollToItem(arg0); cobj->scrollToItem(arg0);
args.rval().setUndefined(); args.rval().setUndefined();
return true; return true;
} }
} while(0);
JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToItem : wrong number of arguments: %d, was expecting %d", argc, 1); JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToItem : wrong number of arguments");
return false; return false;
} }
bool js_cocos2dx_ui_PageView_setIndicatorIndexNodesColor(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_ui_PageView_setIndicatorIndexNodesColor(JSContext *cx, uint32_t argc, jsval *vp)

View File

@ -113,11 +113,12 @@
-- @return PageView#PageView self (return value: ccui.PageView) -- @return PageView#PageView self (return value: ccui.PageView)
-------------------------------- --------------------------------
-- Scroll to a page with a given index.<br> -- @overload self, long, float
-- param idx A given index in the PageView. Index start from 0 to pageCount -1. -- @overload self, long
-- @function [parent=#PageView] scrollToPage -- @function [parent=#PageView] scrollToPage
-- @param self -- @param self
-- @param #long idx -- @param #long idx
-- @param #float time
-- @return PageView#PageView self (return value: ccui.PageView) -- @return PageView#PageView self (return value: ccui.PageView)
-------------------------------- --------------------------------
@ -129,11 +130,12 @@
-- @return PageView#PageView self (return value: ccui.PageView) -- @return PageView#PageView self (return value: ccui.PageView)
-------------------------------- --------------------------------
-- Scroll to a page with a given index.<br> -- @overload self, long, float
-- param itemIndex A given index in the PageView. Index start from 0 to pageCount -1. -- @overload self, long
-- @function [parent=#PageView] scrollToItem -- @function [parent=#PageView] scrollToItem
-- @param self -- @param self
-- @param #long itemIndex -- @param #long idx
-- @param #float time
-- @return PageView#PageView self (return value: ccui.PageView) -- @return PageView#PageView self (return value: ccui.PageView)
-------------------------------- --------------------------------

View File

@ -23921,18 +23921,14 @@ int lua_cocos2dx_ui_PageView_scrollToPage(lua_State* tolua_S)
int argc = 0; int argc = 0;
cocos2d::ui::PageView* cobj = nullptr; cocos2d::ui::PageView* cobj = nullptr;
bool ok = true; bool ok = true;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_Error tolua_err; tolua_Error tolua_err;
#endif #endif
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.PageView",0,&tolua_err)) goto tolua_lerror; if (!tolua_isusertype(tolua_S,1,"ccui.PageView",0,&tolua_err)) goto tolua_lerror;
#endif #endif
cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0); cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
@ -23940,22 +23936,35 @@ int lua_cocos2dx_ui_PageView_scrollToPage(lua_State* tolua_S)
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) do{
{ if (argc == 2) {
ssize_t arg0; ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToPage"); ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToPage");
if(!ok)
{ if (!ok) { break; }
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_scrollToPage'", nullptr); double arg1;
return 0; ok &= luaval_to_number(tolua_S, 3,&arg1, "ccui.PageView:scrollToPage");
if (!ok) { break; }
cobj->scrollToPage(arg0, arg1);
lua_settop(tolua_S, 1);
return 1;
} }
}while(0);
ok = true;
do{
if (argc == 1) {
ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToPage");
if (!ok) { break; }
cobj->scrollToPage(arg0); cobj->scrollToPage(arg0);
lua_settop(tolua_S, 1); lua_settop(tolua_S, 1);
return 1; return 1;
} }
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:scrollToPage",argc, 1); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:scrollToPage",argc, 1);
return 0; return 0;
@ -24021,18 +24030,14 @@ int lua_cocos2dx_ui_PageView_scrollToItem(lua_State* tolua_S)
int argc = 0; int argc = 0;
cocos2d::ui::PageView* cobj = nullptr; cocos2d::ui::PageView* cobj = nullptr;
bool ok = true; bool ok = true;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_Error tolua_err; tolua_Error tolua_err;
#endif #endif
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.PageView",0,&tolua_err)) goto tolua_lerror; if (!tolua_isusertype(tolua_S,1,"ccui.PageView",0,&tolua_err)) goto tolua_lerror;
#endif #endif
cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0); cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
@ -24040,22 +24045,35 @@ int lua_cocos2dx_ui_PageView_scrollToItem(lua_State* tolua_S)
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) do{
{ if (argc == 2) {
ssize_t arg0; ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToItem"); ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToItem");
if(!ok)
{ if (!ok) { break; }
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_scrollToItem'", nullptr); double arg1;
return 0; ok &= luaval_to_number(tolua_S, 3,&arg1, "ccui.PageView:scrollToItem");
if (!ok) { break; }
cobj->scrollToItem(arg0, arg1);
lua_settop(tolua_S, 1);
return 1;
} }
}while(0);
ok = true;
do{
if (argc == 1) {
ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToItem");
if (!ok) { break; }
cobj->scrollToItem(arg0); cobj->scrollToItem(arg0);
lua_settop(tolua_S, 1); lua_settop(tolua_S, 1);
return 1; return 1;
} }
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:scrollToItem",argc, 1); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:scrollToItem",argc, 1);
return 0; return 0;