[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
* @param {long} arg0
* @param {long|long} long
* @param {float} float
*/
scrollToPage : function(
long
long,
float
)
{
},
@ -5199,10 +5201,12 @@ vec2
/**
* @method scrollToItem
* @param {long} arg0
* @param {long|long} long
* @param {float} float
*/
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)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
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);
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");
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) {
ssize_t arg0 = 0;
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);
args.rval().setUndefined();
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;
}
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)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
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);
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");
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) {
ssize_t arg0 = 0;
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);
args.rval().setUndefined();
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;
}
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)
--------------------------------
-- Scroll to a page with a given index.<br>
-- param idx A given index in the PageView. Index start from 0 to pageCount -1.
-- @overload self, long, float
-- @overload self, long
-- @function [parent=#PageView] scrollToPage
-- @param self
-- @param #long idx
-- @param #float time
-- @return PageView#PageView self (return value: ccui.PageView)
--------------------------------
@ -129,11 +130,12 @@
-- @return PageView#PageView self (return value: ccui.PageView)
--------------------------------
-- Scroll to a page with a given index.<br>
-- param itemIndex A given index in the PageView. Index start from 0 to pageCount -1.
-- @overload self, long, float
-- @overload self, long
-- @function [parent=#PageView] scrollToItem
-- @param self
-- @param #long itemIndex
-- @param #long idx
-- @param #float time
-- @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;
cocos2d::ui::PageView* 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.PageView",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
@ -23940,22 +23936,35 @@ int lua_cocos2dx_ui_PageView_scrollToPage(lua_State* tolua_S)
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
do{
if (argc == 2) {
ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToPage");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_scrollToPage'", nullptr);
return 0;
if (!ok) { break; }
double arg1;
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);
lua_settop(tolua_S, 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);
return 0;
@ -24021,18 +24030,14 @@ int lua_cocos2dx_ui_PageView_scrollToItem(lua_State* tolua_S)
int argc = 0;
cocos2d::ui::PageView* 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.PageView",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::PageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
@ -24040,22 +24045,35 @@ int lua_cocos2dx_ui_PageView_scrollToItem(lua_State* tolua_S)
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
do{
if (argc == 2) {
ssize_t arg0;
ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:scrollToItem");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_scrollToItem'", nullptr);
return 0;
if (!ok) { break; }
double arg1;
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);
lua_settop(tolua_S, 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);
return 0;