From 0794c7a43c7506c59dc22a655a03cd516d536c9e Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 17 Nov 2015 04:09:43 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../auto/api/jsb_cocos2dx_ui_auto_api.js | 256 ++--- .../js-bindings/auto/jsb_cocos2dx_ui_auto.cpp | 633 ++++++------ .../js-bindings/auto/jsb_cocos2dx_ui_auto.hpp | 32 +- .../lua-bindings/auto/api/ListView.lua | 8 +- .../lua-bindings/auto/api/PageView.lua | 222 ++-- .../lua-bindings/auto/api/Widget.lua | 14 +- .../auto/lua_cocos2dx_ui_auto.cpp | 948 ++++++++++-------- .../auto/lua_cocos2dx_ui_auto.hpp | 2 + 8 files changed, 1114 insertions(+), 1001 deletions(-) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js index b80d8118b7..ef1bdc4d44 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js @@ -692,16 +692,6 @@ isPropagateTouchEvents : function ( return false; }, -/** - * @method getCurrentFocusedWidget - * @return {ccui.Widget} - */ -getCurrentFocusedWidget : function ( -) -{ - return ccui.Widget; -}, - /** * @method hitTest * @param {vec2_object} arg0 @@ -928,6 +918,16 @@ bool { }, +/** + * @method getCurrentFocusedWidget + * @return {ccui.Widget} + */ +getCurrentFocusedWidget : function ( +) +{ + return ccui.Widget; +}, + /** * @method create * @return {ccui.Widget} @@ -3353,12 +3353,12 @@ getItemsMargin : function ( /** * @method jumpToItem - * @param {int} arg0 + * @param {long} arg0 * @param {vec2_object} arg1 * @param {vec2_object} arg2 */ jumpToItem : function ( -int, +long, vec2, vec2 ) @@ -3517,13 +3517,13 @@ long /** * @method scrollToItem -* @param {int|int} int +* @param {long|long} long * @param {vec2_object|vec2_object} vec2 * @param {vec2_object|vec2_object} vec2 * @param {float} float */ scrollToItem : function( -int, +long, vec2, vec2, float @@ -4706,121 +4706,117 @@ TextBMFont : function ( ccui.PageView = { /** - * @method getCustomScrollThreshold - * @return {float} - */ -getCustomScrollThreshold : function ( -) -{ - return 0; -}, - -/** - * @method getCurPageIndex - * @return {long} - */ -getCurPageIndex : function ( -) -{ - return 0; -}, - -/** - * @method setDirection - * @param {ccui.PageView::Direction} arg0 - */ -setDirection : function ( -direction -) -{ -}, - -/** - * @method addWidgetToPage - * @param {ccui.Widget} arg0 - * @param {long} arg1 - * @param {bool} arg2 - */ -addWidgetToPage : function ( -widget, -long, -bool -) -{ -}, - -/** - * @method isUsingCustomScrollThreshold - * @return {bool} - */ -isUsingCustomScrollThreshold : function ( -) -{ - return false; -}, - -/** - * @method setCurPageIndex - * @param {long} arg0 - */ -setCurPageIndex : function ( -long -) -{ -}, - -/** - * @method removePage - * @param {ccui.Layout} arg0 - */ -removePage : function ( -layout -) -{ -}, - -/** - * @method setUsingCustomScrollThreshold - * @param {bool} arg0 - */ -setUsingCustomScrollThreshold : function ( -bool -) -{ -}, - -/** - * @method setCustomScrollThreshold + * @method setIndicatorSpaceBetweenIndexNodes * @param {float} arg0 */ -setCustomScrollThreshold : function ( +setIndicatorSpaceBetweenIndexNodes : function ( float ) { }, +/** + * @method setIndicatorSelectedIndexColor + * @param {color3b_object} arg0 + */ +setIndicatorSelectedIndexColor : function ( +color3b +) +{ +}, + +/** + * @method getIndicatorSelectedIndexColor + * @return {color3b_object} + */ +getIndicatorSelectedIndexColor : function ( +) +{ + return cc.Color3B; +}, + +/** + * @method getIndicatorPositionAsAnchorPoint + * @return {vec2_object} + */ +getIndicatorPositionAsAnchorPoint : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method setIndicatorPosition + * @param {vec2_object} arg0 + */ +setIndicatorPosition : function ( +vec2 +) +{ +}, + +/** + * @method getIndicatorPosition + * @return {vec2_object} + */ +getIndicatorPosition : function ( +) +{ + return cc.Vec2; +}, + /** * @method insertPage - * @param {ccui.Layout} arg0 + * @param {ccui.Widget} arg0 * @param {int} arg1 */ insertPage : function ( -layout, +widget, int ) { }, /** - * @method getDirection - * @return {ccui.PageView::Direction} + * @method getCurrentPageIndex + * @return {long} */ -getDirection : function ( +getCurrentPageIndex : function ( ) { return 0; }, +/** + * @method removePage + * @param {ccui.Widget} arg0 + */ +removePage : function ( +widget +) +{ +}, + +/** + * @method setCurrentPageIndex + * @param {long} arg0 + */ +setCurrentPageIndex : function ( +long +) +{ +}, + +/** + * @method getIndicatorEnabled + * @return {bool} + */ +getIndicatorEnabled : function ( +) +{ + return false; +}, + /** * @method scrollToPage * @param {long} arg0 @@ -4832,35 +4828,53 @@ long }, /** - * @method getPage - * @param {long} arg0 - * @return {ccui.Layout} + * @method setIndicatorPositionAsAnchorPoint + * @param {vec2_object} arg0 */ -getPage : function ( -long +setIndicatorPositionAsAnchorPoint : function ( +vec2 ) { - return ccui.Layout; }, /** - * @method removePageAtIndex + * @method scrollToItem * @param {long} arg0 */ -removePageAtIndex : function ( +scrollToItem : function ( long ) { }, /** - * @method getPages - * @return {Array} + * @method setIndicatorEnabled + * @param {bool} arg0 */ -getPages : function ( +setIndicatorEnabled : function ( +bool ) { - return new Array(); +}, + +/** + * @method addPage + * @param {ccui.Widget} arg0 + */ +addPage : function ( +widget +) +{ +}, + +/** + * @method getIndicatorSpaceBetweenIndexNodes + * @return {float} + */ +getIndicatorSpaceBetweenIndexNodes : function ( +) +{ + return 0; }, /** @@ -4872,11 +4886,11 @@ removeAllPages : function ( }, /** - * @method addPage - * @param {ccui.Layout} arg0 + * @method removePageAtIndex + * @param {long} arg0 */ -addPage : function ( -layout +removePageAtIndex : function ( +long ) { }, diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp index f2bae23c52..5806452cd8 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp @@ -1642,31 +1642,6 @@ bool js_cocos2dx_ui_Widget_isPropagateTouchEvents(JSContext *cx, uint32_t argc, JS_ReportError(cx, "js_cocos2dx_ui_Widget_isPropagateTouchEvents : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ui_Widget_getCurrentFocusedWidget(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getCurrentFocusedWidget : Invalid Native Object"); - if (argc == 0) { - cocos2d::ui::Widget* ret = cobj->getCurrentFocusedWidget(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_Widget_getCurrentFocusedWidget : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_ui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -2184,6 +2159,27 @@ bool js_cocos2dx_ui_Widget_enableDpadNavigation(JSContext *cx, uint32_t argc, js return false; } +bool js_cocos2dx_ui_Widget_getCurrentFocusedWidget(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ui::Widget* ret = cocos2d::ui::Widget::getCurrentFocusedWidget(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getCurrentFocusedWidget : wrong number of arguments"); + return false; +} + bool js_cocos2dx_ui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -2321,7 +2317,6 @@ void js_register_cocos2dx_ui_Widget(JSContext *cx, JS::HandleObject global) { JS_FN("dispatchFocusEvent", js_cocos2dx_ui_Widget_dispatchFocusEvent, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setUnifySizeEnabled", js_cocos2dx_ui_Widget_setUnifySizeEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isPropagateTouchEvents", js_cocos2dx_ui_Widget_isPropagateTouchEvents, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getCurrentFocusedWidget", js_cocos2dx_ui_Widget_getCurrentFocusedWidget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("hitTest", js_cocos2dx_ui_Widget_hitTest, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isLayoutComponentEnabled", js_cocos2dx_ui_Widget_isLayoutComponentEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("requestFocus", js_cocos2dx_ui_Widget_requestFocus, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -2348,6 +2343,7 @@ void js_register_cocos2dx_ui_Widget(JSContext *cx, JS::HandleObject global) { static JSFunctionSpec st_funcs[] = { JS_FN("enableDpadNavigation", js_cocos2dx_ui_Widget_enableDpadNavigation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCurrentFocusedWidget", js_cocos2dx_ui_Widget_getCurrentFocusedWidget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("create", js_cocos2dx_ui_Widget_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -8795,10 +8791,10 @@ bool js_cocos2dx_ui_ListView_jumpToItem(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_jumpToItem : Invalid Native Object"); if (argc == 3) { - int arg0 = 0; + ssize_t arg0 = 0; cocos2d::Vec2 arg1; cocos2d::Vec2 arg2; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_ssize(cx, args.get(0), &arg0); ok &= jsval_to_vector2(cx, args.get(1), &arg1); ok &= jsval_to_vector2(cx, args.get(2), &arg2); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_jumpToItem : Error processing arguments"); @@ -9153,8 +9149,8 @@ bool js_cocos2dx_ui_ListView_scrollToItem(JSContext *cx, uint32_t argc, jsval *v JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_scrollToItem : Invalid Native Object"); do { if (argc == 4) { - int arg0 = 0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ssize_t arg0 = 0; + ok &= jsval_to_ssize(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } cocos2d::Vec2 arg1; ok &= jsval_to_vector2(cx, args.get(1), &arg1); @@ -9173,8 +9169,8 @@ bool js_cocos2dx_ui_ListView_scrollToItem(JSContext *cx, uint32_t argc, jsval *v do { if (argc == 3) { - int arg0 = 0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ssize_t arg0 = 0; + ok &= jsval_to_ssize(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } cocos2d::Vec2 arg1; ok &= jsval_to_vector2(cx, args.get(1), &arg1); @@ -12143,198 +12139,118 @@ void js_register_cocos2dx_ui_TextBMFont(JSContext *cx, JS::HandleObject global) JSClass *jsb_cocos2d_ui_PageView_class; JSObject *jsb_cocos2d_ui_PageView_prototype; -bool js_cocos2dx_ui_PageView_getCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getCustomScrollThreshold : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getCustomScrollThreshold(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_getCustomScrollThreshold : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getCurPageIndex : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getCurPageIndex(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_getCurPageIndex : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ui_PageView_setDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setDirection : Invalid Native Object"); - if (argc == 1) { - cocos2d::ui::PageView::Direction arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setDirection : Error processing arguments"); - cobj->setDirection(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_setDirection : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_addWidgetToPage : Invalid Native Object"); - if (argc == 3) { - cocos2d::ui::Widget* arg0 = nullptr; - ssize_t arg1 = 0; - bool arg2; - do { - if (args.get(0).isNull()) { arg0 = nullptr; break; } - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_ssize(cx, args.get(1), &arg1); - arg2 = JS::ToBoolean(args.get(2)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_addWidgetToPage : Error processing arguments"); - cobj->addWidgetToPage(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_addWidgetToPage : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_ui_PageView_isUsingCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_isUsingCustomScrollThreshold : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isUsingCustomScrollThreshold(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_isUsingCustomScrollThreshold : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ui_PageView_setCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setCurPageIndex : Invalid Native Object"); - 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_setCurPageIndex : Error processing arguments"); - cobj->setCurPageIndex(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_setCurPageIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removePage : Invalid Native Object"); - if (argc == 1) { - cocos2d::ui::Layout* arg0 = nullptr; - do { - if (args.get(0).isNull()) { arg0 = nullptr; break; } - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::ui::Layout*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_removePage : Error processing arguments"); - cobj->removePage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_removePage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold : Error processing arguments"); - cobj->setUsingCustomScrollThreshold(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ui_PageView_setCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setCustomScrollThreshold : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes : Invalid Native Object"); if (argc == 1) { double arg0 = 0; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setCustomScrollThreshold : Error processing arguments"); - cobj->setCustomScrollThreshold(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes : Error processing arguments"); + cobj->setIndicatorSpaceBetweenIndexNodes(arg0); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_ui_PageView_setCustomScrollThreshold : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color3B arg0; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor : Error processing arguments"); + cobj->setIndicatorSelectedIndexColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color3B& ret = cobj->getIndicatorSelectedIndexColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor3b_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getIndicatorPositionAsAnchorPoint(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ui_PageView_setIndicatorPosition(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setIndicatorPosition : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setIndicatorPosition : Error processing arguments"); + cobj->setIndicatorPosition(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setIndicatorPosition : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_getIndicatorPosition(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getIndicatorPosition : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getIndicatorPosition(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getIndicatorPosition : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) @@ -12346,7 +12262,7 @@ bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_insertPage : Invalid Native Object"); if (argc == 2) { - cocos2d::ui::Layout* arg0 = nullptr; + cocos2d::ui::Widget* arg0 = nullptr; int arg1 = 0; do { if (args.get(0).isNull()) { arg0 = nullptr; break; } @@ -12354,7 +12270,7 @@ bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::ui::Layout*)(jsProxy ? jsProxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); @@ -12367,22 +12283,88 @@ bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_ui_PageView_insertPage : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_ui_PageView_getDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_getCurrentPageIndex(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getDirection : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getCurrentPageIndex : Invalid Native Object"); if (argc == 0) { - int ret = (int)cobj->getDirection(); + ssize_t ret = cobj->getCurrentPageIndex(); jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); + jsret = ssize_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ui_PageView_getDirection : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getCurrentPageIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removePage : Invalid Native Object"); + if (argc == 1) { + cocos2d::ui::Widget* arg0 = nullptr; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_removePage : Error processing arguments"); + cobj->removePage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_removePage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_setCurrentPageIndex(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setCurrentPageIndex : Invalid Native Object"); + 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_setCurrentPageIndex : Error processing arguments"); + cobj->setCurrentPageIndex(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setCurrentPageIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_getIndicatorEnabled(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getIndicatorEnabled : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getIndicatorEnabled(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getIndicatorEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp) @@ -12405,33 +12387,126 @@ bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *v JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToPage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getPage : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint : Error processing arguments"); + cobj->setIndicatorPositionAsAnchorPoint(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +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()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToItem : Invalid Native Object"); 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_getPage : Error processing arguments"); - cocos2d::ui::Layout* ret = cobj->getPage(arg0); - jsval jsret = JSVAL_NULL; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_scrollToItem : Error processing arguments"); + cobj->scrollToItem(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToItem : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_setIndicatorEnabled(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_setIndicatorEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_setIndicatorEnabled : Error processing arguments"); + cobj->setIndicatorEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_setIndicatorEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_addPage : Invalid Native Object"); + if (argc == 1) { + cocos2d::ui::Widget* arg0 = nullptr; do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ui::Layout*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_addPage : Error processing arguments"); + cobj->addPage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_addPage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getIndicatorSpaceBetweenIndexNodes(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ui_PageView_getPage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removeAllPages : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllPages(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_PageView_removeAllPages : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp) @@ -12454,68 +12529,6 @@ bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsv JS_ReportError(cx, "js_cocos2dx_ui_PageView_removePageAtIndex : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getPages : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vector& ret = cobj->getPages(); - jsval jsret = JSVAL_NULL; - jsret = ccvector_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_getPages : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removeAllPages : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllPages(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_removeAllPages : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_addPage : Invalid Native Object"); - if (argc == 1) { - cocos2d::ui::Layout* arg0 = nullptr; - do { - if (args.get(0).isNull()) { arg0 = nullptr; break; } - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::ui::Layout*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_addPage : Error processing arguments"); - cobj->addPage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ui_PageView_addPage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -12601,7 +12614,7 @@ bool js_cocos2dx_ui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp return true; } -extern JSObject *jsb_cocos2d_ui_Layout_prototype; +extern JSObject *jsb_cocos2d_ui_ListView_prototype; void js_cocos2d_ui_PageView_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (PageView)", obj); @@ -12626,23 +12639,25 @@ void js_register_cocos2dx_ui_PageView(JSContext *cx, JS::HandleObject global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getCustomScrollThreshold", js_cocos2dx_ui_PageView_getCustomScrollThreshold, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getCurPageIndex", js_cocos2dx_ui_PageView_getCurPageIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDirection", js_cocos2dx_ui_PageView_setDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addWidgetToPage", js_cocos2dx_ui_PageView_addWidgetToPage, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isUsingCustomScrollThreshold", js_cocos2dx_ui_PageView_isUsingCustomScrollThreshold, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCurPageIndex", js_cocos2dx_ui_PageView_setCurPageIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removePage", js_cocos2dx_ui_PageView_removePage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setUsingCustomScrollThreshold", js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCustomScrollThreshold", js_cocos2dx_ui_PageView_setCustomScrollThreshold, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIndicatorSpaceBetweenIndexNodes", js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIndicatorSelectedIndexColor", js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndicatorSelectedIndexColor", js_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndicatorPositionAsAnchorPoint", js_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIndicatorPosition", js_cocos2dx_ui_PageView_setIndicatorPosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndicatorPosition", js_cocos2dx_ui_PageView_getIndicatorPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("insertPage", js_cocos2dx_ui_PageView_insertPage, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDirection", js_cocos2dx_ui_PageView_getDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCurrentPageIndex", js_cocos2dx_ui_PageView_getCurrentPageIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePage", js_cocos2dx_ui_PageView_removePage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCurrentPageIndex", js_cocos2dx_ui_PageView_setCurrentPageIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndicatorEnabled", js_cocos2dx_ui_PageView_getIndicatorEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("scrollToPage", js_cocos2dx_ui_PageView_scrollToPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPage", js_cocos2dx_ui_PageView_getPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removePageAtIndex", js_cocos2dx_ui_PageView_removePageAtIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPages", js_cocos2dx_ui_PageView_getPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllPages", js_cocos2dx_ui_PageView_removeAllPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIndicatorPositionAsAnchorPoint", js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToItem", js_cocos2dx_ui_PageView_scrollToItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIndicatorEnabled", js_cocos2dx_ui_PageView_setIndicatorEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("addPage", js_cocos2dx_ui_PageView_addPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndicatorSpaceBetweenIndexNodes", js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllPages", js_cocos2dx_ui_PageView_removeAllPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePageAtIndex", js_cocos2dx_ui_PageView_removePageAtIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("ctor", js_cocos2dx_ui_PageView_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -12655,7 +12670,7 @@ void js_register_cocos2dx_ui_PageView(JSContext *cx, JS::HandleObject global) { jsb_cocos2d_ui_PageView_prototype = JS_InitClass( cx, global, - JS::RootedObject(cx, jsb_cocos2d_ui_Layout_prototype), + JS::RootedObject(cx, jsb_cocos2d_ui_ListView_prototype), jsb_cocos2d_ui_PageView_class, js_cocos2dx_ui_PageView_constructor, 0, // constructor properties, @@ -12676,7 +12691,7 @@ void js_register_cocos2dx_ui_PageView(JSContext *cx, JS::HandleObject global) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); p->jsclass = jsb_cocos2d_ui_PageView_class; p->proto = jsb_cocos2d_ui_PageView_prototype; - p->parentProto = jsb_cocos2d_ui_Layout_prototype; + p->parentProto = jsb_cocos2d_ui_ListView_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } anonEvaluate(cx, global, "(function () { ccui.PageView.extend = cc.Class.extend; })()"); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp index ec3970e86e..e90d2a5ace 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp @@ -102,7 +102,6 @@ bool js_cocos2dx_ui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_dispatchFocusEvent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_setUnifySizeEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_isPropagateTouchEvents(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_Widget_getCurrentFocusedWidget(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_isLayoutComponentEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_requestFocus(JSContext *cx, uint32_t argc, jsval *vp); @@ -124,6 +123,7 @@ bool js_cocos2dx_ui_Widget_setBright(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_setCallbackType(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_isSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_enableDpadNavigation(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getCurrentFocusedWidget(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Widget_Widget(JSContext *cx, uint32_t argc, jsval *vp); @@ -607,23 +607,25 @@ bool js_cocos2dx_ui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp void js_cocos2dx_ui_PageView_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_ui_PageView(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_ui(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ui_PageView_getCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_setDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_isUsingCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_setCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_setUsingCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_setCustomScrollThreshold(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setIndicatorPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getIndicatorPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_getDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getCurrentPageIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setCurrentPageIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getIndicatorEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_scrollToItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_setIndicatorEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_createInstance(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_PageView_PageView(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/ListView.lua b/cocos/scripting/lua-bindings/auto/api/ListView.lua index 9710529b45..46a57edddc 100644 --- a/cocos/scripting/lua-bindings/auto/api/ListView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ListView.lua @@ -46,7 +46,7 @@ -- param itemAnchorPoint Specifies an anchor point of each item for position to calculate distance. -- @function [parent=#ListView] jumpToItem -- @param self --- @param #int itemIndex +-- @param #long itemIndex -- @param #vec2_table positionRatioInView -- @param #vec2_table itemAnchorPoint -- @return ListView#ListView self (return value: ccui.ListView) @@ -171,11 +171,11 @@ -- @return ListView#ListView self (return value: ccui.ListView) -------------------------------- --- @overload self, int, vec2_table, vec2_table, float --- @overload self, int, vec2_table, vec2_table +-- @overload self, long, vec2_table, vec2_table, float +-- @overload self, long, vec2_table, vec2_table -- @function [parent=#ListView] scrollToItem -- @param self --- @param #int itemIndex +-- @param #long itemIndex -- @param #vec2_table positionRatioInView -- @param #vec2_table itemAnchorPoint -- @param #float timeInSec diff --git a/cocos/scripting/lua-bindings/auto/api/PageView.lua b/cocos/scripting/lua-bindings/auto/api/PageView.lua index 496a94045b..f323541202 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageView.lua @@ -1,67 +1,77 @@ -------------------------------- -- @module PageView --- @extend Layout +-- @extend ListView -- @parent_module ccui -------------------------------- --- brief Query the custom scroll threshold of the PageView.
--- return Custom scroll threshold in float. --- @function [parent=#PageView] getCustomScrollThreshold +-- brief Set space between page indicator's index nodes.
+-- param spaceBetweenIndexNodes Space between nodes in pixel. +-- @function [parent=#PageView] setIndicatorSpaceBetweenIndexNodes -- @param self --- @return float#float ret (return value: float) +-- @param #float spaceBetweenIndexNodes +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- brief Set color of page indicator's selected index.
+-- param spaceBetweenIndexNodes Space between nodes in pixel. +-- @function [parent=#PageView] setIndicatorSelectedIndexColor +-- @param self +-- @param #color3b_table color +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- brief Get the color of page indicator's selected index.
+-- return color +-- @function [parent=#PageView] getIndicatorSelectedIndexColor +-- @param self +-- @return color3b_table#color3b_table ret (return value: color3b_table) + +-------------------------------- +-- brief Get the page indicator's position as anchor point.
+-- return positionAsAnchorPoint +-- @function [parent=#PageView] getIndicatorPositionAsAnchorPoint +-- @param self +-- @return vec2_table#vec2_table ret (return value: vec2_table) + +-------------------------------- +-- brief Set the page indicator's position in page view.
+-- param position The position in page view +-- @function [parent=#PageView] setIndicatorPosition +-- @param self +-- @param #vec2_table position +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- brief Get the page indicator's position.
+-- return positionAsAnchorPoint +-- @function [parent=#PageView] getIndicatorPosition +-- @param self +-- @return vec2_table#vec2_table ret (return value: vec2_table) + +-------------------------------- +-- Insert a page into PageView at a given index.
+-- param page Page to be inserted.
+-- param idx A given index. +-- @function [parent=#PageView] insertPage +-- @param self +-- @param #ccui.Widget page +-- @param #int idx +-- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- -- Gets current displayed page index.
-- return current page index. --- @function [parent=#PageView] getCurPageIndex +-- @function [parent=#PageView] getCurrentPageIndex -- @param self -- @return long#long ret (return value: long) --------------------------------- --- Changes scroll direction of PageView
--- see `Direction`
--- param direction Scroll direction enum.
--- since v3.8 --- @function [parent=#PageView] setDirection --- @param self --- @param #int direction --- @return PageView#PageView self (return value: ccui.PageView) - --------------------------------- --- Add a widget as a page of PageView in a given index.
--- param widget Widget to be added to pageview.
--- param pageIdx A given index.
--- param forceCreate If `forceCreate` is true and `widget` isn't exists, pageview would create a default page and add it. --- @function [parent=#PageView] addWidgetToPage --- @param self --- @param #ccui.Widget widget --- @param #long pageIdx --- @param #bool forceCreate --- @return PageView#PageView self (return value: ccui.PageView) - --------------------------------- --- brief Query whether use user defined scroll page threshold or not.
--- return True if using custom scroll threshold, false otherwise. --- @function [parent=#PageView] isUsingCustomScrollThreshold --- @param self --- @return bool#bool ret (return value: bool) - --------------------------------- --- Jump to a page with a given index without scrolling.
--- This is the different between scrollToPage.
--- param index A given index in PageView. Index start from 0 to pageCount -1. --- @function [parent=#PageView] setCurPageIndex --- @param self --- @param #long index --- @return PageView#PageView self (return value: ccui.PageView) - -------------------------------- -- Remove a page of PageView.
-- param page Page to be removed. -- @function [parent=#PageView] removePage -- @param self --- @param #ccui.Layout page +-- @param #ccui.Widget page -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- @@ -73,40 +83,20 @@ -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- --- brief Set using user defined scroll page threshold or not.
--- If you set it to false, then the default scroll threshold is pageView.width / 2
--- param flag True if using custom scroll threshold, false otherwise. --- @function [parent=#PageView] setUsingCustomScrollThreshold +-- Jump to a page with a given index without scrolling.
+-- This is the different between scrollToPage.
+-- param index A given index in PageView. Index start from 0 to pageCount -1. +-- @function [parent=#PageView] setCurrentPageIndex -- @param self --- @param #bool flag +-- @param #long index -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- --- brief If you don't specify the value, the pageView will turn page when scrolling at the half width of a page.
--- param threshold A threshold in float. --- @function [parent=#PageView] setCustomScrollThreshold +-- brief Query page indicator state.
+-- return True if page indicator is enabled, false otherwise. +-- @function [parent=#PageView] getIndicatorEnabled -- @param self --- @param #float threshold --- @return PageView#PageView self (return value: ccui.PageView) - --------------------------------- --- Insert a page into PageView at a given index.
--- param page Page to be inserted.
--- param idx A given index. --- @function [parent=#PageView] insertPage --- @param self --- @param #ccui.Layout page --- @param #int idx --- @return PageView#PageView self (return value: ccui.PageView) - --------------------------------- --- Query scroll direction of PageView.
--- see `Direction`
--- since v3.8
--- return PageView scroll direction. --- @function [parent=#PageView] getDirection --- @param self --- @return int#int ret (return value: int) +-- @return bool#bool ret (return value: bool) -------------------------------- -- Scroll to a page with a given index.
@@ -117,28 +107,43 @@ -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- --- brief Get a page at a given index
--- param index A given index.
--- return A layout pointer in PageView container. --- @function [parent=#PageView] getPage +-- brief Set the page indicator's position using anchor point.
+-- param positionAsAnchorPoint The position as anchor point. +-- @function [parent=#PageView] setIndicatorPositionAsAnchorPoint -- @param self --- @param #long index --- @return Layout#Layout ret (return value: ccui.Layout) - --------------------------------- --- Remove a page at a given index of PageView.
--- param index A given index. --- @function [parent=#PageView] removePageAtIndex --- @param self --- @param #long index +-- @param #vec2_table positionAsAnchorPoint -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- --- brief Get all the pages in the PageView.
--- return A vector of Layout pointers. --- @function [parent=#PageView] getPages +-- Scroll to a page with a given index.
+-- param idx A given index in the PageView. Index start from 0 to pageCount -1. +-- @function [parent=#PageView] scrollToItem -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @param #long itemIndex +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- brief Toggle page indicator enabled.
+-- param enabled True if enable page indicator, false otherwise. +-- @function [parent=#PageView] setIndicatorEnabled +-- @param self +-- @param #bool enabled +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- Insert a page into the end of PageView.
+-- param page Page to be inserted. +-- @function [parent=#PageView] addPage +-- @param self +-- @param #ccui.Widget page +-- @return PageView#PageView self (return value: ccui.PageView) + +-------------------------------- +-- brief Get the space between page indicator's index nodes.
+-- return spaceBetweenIndexNodes +-- @function [parent=#PageView] getIndicatorSpaceBetweenIndexNodes +-- @param self +-- @return float#float ret (return value: float) -------------------------------- -- brief Remove all pages of the PageView. @@ -147,11 +152,11 @@ -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- --- Insert a page into the end of PageView.
--- param page Page to be inserted. --- @function [parent=#PageView] addPage +-- Remove a page at a given index of PageView.
+-- param index A given index. +-- @function [parent=#PageView] removePageAtIndex -- @param self --- @param #ccui.Layout page +-- @param #long index -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- @@ -169,21 +174,8 @@ -------------------------------- -- --- @function [parent=#PageView] getLayoutType +-- @function [parent=#PageView] doLayout -- @param self --- @return int#int ret (return value: int) - --------------------------------- --- --- @function [parent=#PageView] getDescription --- @param self --- @return string#string ret (return value: string) - --------------------------------- --- --- @function [parent=#PageView] update --- @param self --- @param #float dt -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- @@ -194,9 +186,17 @@ -------------------------------- -- --- @function [parent=#PageView] setLayoutType +-- @function [parent=#PageView] getDescription -- @param self --- @param #int type +-- @return string#string ret (return value: string) + +-------------------------------- +-- Changes direction
+-- Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.
+-- param direction Set the page view's scroll direction. +-- @function [parent=#PageView] setDirection +-- @param self +-- @param #int direction -- @return PageView#PageView self (return value: ccui.PageView) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Widget.lua b/cocos/scripting/lua-bindings/auto/api/Widget.lua index 0a035ad5bd..e4cdc1ea47 100644 --- a/cocos/scripting/lua-bindings/auto/api/Widget.lua +++ b/cocos/scripting/lua-bindings/auto/api/Widget.lua @@ -376,13 +376,6 @@ -- @param self -- @return bool#bool ret (return value: bool) --------------------------------- --- Return a current focused widget in your UI scene.
--- No matter what widget object you call this method on , it will return you the exact one focused widget. --- @function [parent=#Widget] getCurrentFocusedWidget --- @param self --- @return Widget#Widget ret (return value: ccui.Widget) - -------------------------------- -- Checks a point is in widget's content space.
-- This function is used for determining touch area of widget.
@@ -551,6 +544,13 @@ -- @param #bool enable -- @return Widget#Widget self (return value: ccui.Widget) +-------------------------------- +-- Return a current focused widget in your UI scene.
+-- No matter what widget object you call this method on , it will return you the exact one focused widget. +-- @function [parent=#Widget] getCurrentFocusedWidget +-- @param self +-- @return Widget#Widget ret (return value: ccui.Widget) + -------------------------------- -- Create and return a empty Widget instance pointer. -- @function [parent=#Widget] create diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp index 1b3ab7b6f0..d6b2cf6c60 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -3102,53 +3102,6 @@ int lua_cocos2dx_ui_Widget_isPropagateTouchEvents(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_Widget_getCurrentFocusedWidget(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_getCurrentFocusedWidget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'", nullptr); - return 0; - } - cocos2d::ui::Widget* ret = cobj->getCurrentFocusedWidget(); - object_to_luaval(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.Widget:getCurrentFocusedWidget",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_ui_Widget_hitTest(lua_State* tolua_S) { int argc = 0; @@ -4127,6 +4080,40 @@ int lua_cocos2dx_ui_Widget_enableDpadNavigation(lua_State* tolua_S) #endif return 0; } +int lua_cocos2dx_ui_Widget_getCurrentFocusedWidget(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 == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'", nullptr); + return 0; + } + cocos2d::ui::Widget* ret = cocos2d::ui::Widget::getCurrentFocusedWidget(); + object_to_luaval(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Widget:getCurrentFocusedWidget",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'.",&tolua_err); +#endif + return 0; +} int lua_cocos2dx_ui_Widget_create(lua_State* tolua_S) { int argc = 0; @@ -4257,7 +4244,6 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"dispatchFocusEvent",lua_cocos2dx_ui_Widget_dispatchFocusEvent); tolua_function(tolua_S,"setUnifySizeEnabled",lua_cocos2dx_ui_Widget_setUnifySizeEnabled); tolua_function(tolua_S,"isPropagateTouchEvents",lua_cocos2dx_ui_Widget_isPropagateTouchEvents); - tolua_function(tolua_S,"getCurrentFocusedWidget",lua_cocos2dx_ui_Widget_getCurrentFocusedWidget); tolua_function(tolua_S,"hitTest",lua_cocos2dx_ui_Widget_hitTest); tolua_function(tolua_S,"isLayoutComponentEnabled",lua_cocos2dx_ui_Widget_isLayoutComponentEnabled); tolua_function(tolua_S,"requestFocus",lua_cocos2dx_ui_Widget_requestFocus); @@ -4278,6 +4264,7 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"setCallbackType",lua_cocos2dx_ui_Widget_setCallbackType); tolua_function(tolua_S,"isSwallowTouches",lua_cocos2dx_ui_Widget_isSwallowTouches); tolua_function(tolua_S,"enableDpadNavigation", lua_cocos2dx_ui_Widget_enableDpadNavigation); + tolua_function(tolua_S,"getCurrentFocusedWidget", lua_cocos2dx_ui_Widget_getCurrentFocusedWidget); tolua_function(tolua_S,"create", lua_cocos2dx_ui_Widget_create); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::ui::Widget).name(); @@ -16118,11 +16105,11 @@ int lua_cocos2dx_ui_ListView_jumpToItem(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 3) { - int arg0; + ssize_t arg0; cocos2d::Vec2 arg1; cocos2d::Vec2 arg2; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.ListView:jumpToItem"); + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.ListView:jumpToItem"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "ccui.ListView:jumpToItem"); @@ -16952,8 +16939,8 @@ int lua_cocos2dx_ui_ListView_scrollToItem(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; do{ if (argc == 4) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.ListView:scrollToItem"); + ssize_t arg0; + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.ListView:scrollToItem"); if (!ok) { break; } cocos2d::Vec2 arg1; @@ -16976,8 +16963,8 @@ int lua_cocos2dx_ui_ListView_scrollToItem(lua_State* tolua_S) ok = true; do{ if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.ListView:scrollToItem"); + ssize_t arg0; + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.ListView:scrollToItem"); if (!ok) { break; } cocos2d::Vec2 arg1; @@ -21342,7 +21329,7 @@ int lua_register_cocos2dx_ui_TextBMFont(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ui_PageView_getCustomScrollThreshold(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -21362,101 +21349,7 @@ int lua_cocos2dx_ui_PageView_getCustomScrollThreshold(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getCustomScrollThreshold'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getCustomScrollThreshold'", nullptr); - return 0; - } - double ret = cobj->getCustomScrollThreshold(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getCustomScrollThreshold",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getCustomScrollThreshold'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_getCurPageIndex(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getCurPageIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getCurPageIndex'", nullptr); - return 0; - } - ssize_t ret = cobj->getCurPageIndex(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getCurPageIndex",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getCurPageIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_setDirection(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setDirection'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes'", nullptr); return 0; } #endif @@ -21464,29 +21357,29 @@ int lua_cocos2dx_ui_PageView_setDirection(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::ui::PageView::Direction arg0; + double arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.PageView:setDirection"); + ok &= luaval_to_number(tolua_S, 2,&arg0, "ccui.PageView:setIndicatorSpaceBetweenIndexNodes"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setDirection'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes'", nullptr); return 0; } - cobj->setDirection(arg0); + cobj->setIndicatorSpaceBetweenIndexNodes(arg0); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setDirection",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setIndicatorSpaceBetweenIndexNodes",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setDirection'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ui_PageView_addWidgetToPage(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -21506,43 +21399,281 @@ int lua_cocos2dx_ui_PageView_addWidgetToPage(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_addWidgetToPage'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 3) + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "ccui.PageView:setIndicatorSelectedIndexColor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor'", nullptr); + return 0; + } + cobj->setIndicatorSelectedIndexColor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setIndicatorSelectedIndexColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor'", nullptr); + return 0; + } + const cocos2d::Color3B& ret = cobj->getIndicatorSelectedIndexColor(); + color3b_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getIndicatorSelectedIndexColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint'", nullptr); + return 0; + } + const cocos2d::Vec2& ret = cobj->getIndicatorPositionAsAnchorPoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getIndicatorPositionAsAnchorPoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_setIndicatorPosition(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setIndicatorPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccui.PageView:setIndicatorPosition"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setIndicatorPosition'", nullptr); + return 0; + } + cobj->setIndicatorPosition(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setIndicatorPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setIndicatorPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_getIndicatorPosition(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getIndicatorPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getIndicatorPosition'", nullptr); + return 0; + } + const cocos2d::Vec2& ret = cobj->getIndicatorPosition(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getIndicatorPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getIndicatorPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_insertPage(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_insertPage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) { cocos2d::ui::Widget* arg0; - ssize_t arg1; - bool arg2; + int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.PageView:addWidgetToPage"); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.PageView:insertPage"); - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "ccui.PageView:addWidgetToPage"); - - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "ccui.PageView:addWidgetToPage"); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.PageView:insertPage"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_addWidgetToPage'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_insertPage'", nullptr); return 0; } - cobj->addWidgetToPage(arg0, arg1, arg2); + cobj->insertPage(arg0, arg1); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:addWidgetToPage",argc, 3); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:insertPage",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_addWidgetToPage'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_insertPage'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_getCurrentPageIndex(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -21562,7 +21693,7 @@ int lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getCurrentPageIndex'", nullptr); return 0; } #endif @@ -21572,69 +21703,19 @@ int lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getCurrentPageIndex'", nullptr); return 0; } - bool ret = cobj->isUsingCustomScrollThreshold(); - tolua_pushboolean(tolua_S,(bool)ret); + ssize_t ret = cobj->getCurrentPageIndex(); + tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:isUsingCustomScrollThreshold",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getCurrentPageIndex",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_setCurPageIndex(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setCurPageIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - ssize_t arg0; - - ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:setCurPageIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setCurPageIndex'", nullptr); - return 0; - } - cobj->setCurPageIndex(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setCurPageIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setCurPageIndex'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getCurrentPageIndex'.",&tolua_err); #endif return 0; @@ -21667,9 +21748,9 @@ int lua_cocos2dx_ui_PageView_removePage(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::ui::Layout* arg0; + cocos2d::ui::Widget* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:removePage"); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.PageView:removePage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_removePage'", nullptr); @@ -21743,7 +21824,7 @@ int lua_cocos2dx_ui_PageView_addEventListener(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_setCurrentPageIndex(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -21763,7 +21844,7 @@ int lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setCurrentPageIndex'", nullptr); return 0; } #endif @@ -21771,29 +21852,29 @@ int lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - bool arg0; + ssize_t arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.PageView:setUsingCustomScrollThreshold"); + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:setCurrentPageIndex"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setCurrentPageIndex'", nullptr); return 0; } - cobj->setUsingCustomScrollThreshold(arg0); + cobj->setCurrentPageIndex(arg0); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setUsingCustomScrollThreshold",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setCurrentPageIndex",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setCurrentPageIndex'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ui_PageView_setCustomScrollThreshold(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_getIndicatorEnabled(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -21813,110 +21894,7 @@ int lua_cocos2dx_ui_PageView_setCustomScrollThreshold(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setCustomScrollThreshold'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "ccui.PageView:setCustomScrollThreshold"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setCustomScrollThreshold'", nullptr); - return 0; - } - cobj->setCustomScrollThreshold(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setCustomScrollThreshold",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setCustomScrollThreshold'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_insertPage(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_insertPage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::ui::Layout* arg0; - int arg1; - - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:insertPage"); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.PageView:insertPage"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_insertPage'", nullptr); - return 0; - } - cobj->insertPage(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:insertPage",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_insertPage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_getDirection(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getDirection'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getIndicatorEnabled'", nullptr); return 0; } #endif @@ -21926,19 +21904,19 @@ int lua_cocos2dx_ui_PageView_getDirection(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getDirection'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getIndicatorEnabled'", nullptr); return 0; } - int ret = (int)cobj->getDirection(); - tolua_pushnumber(tolua_S,(lua_Number)ret); + bool ret = cobj->getIndicatorEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getDirection",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getIndicatorEnabled",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getDirection'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getIndicatorEnabled'.",&tolua_err); #endif return 0; @@ -21993,7 +21971,7 @@ int lua_cocos2dx_ui_PageView_scrollToPage(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_PageView_getPage(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -22013,7 +21991,7 @@ int lua_cocos2dx_ui_PageView_getPage(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getPage'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint'", nullptr); return 0; } #endif @@ -22021,79 +21999,29 @@ int lua_cocos2dx_ui_PageView_getPage(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - ssize_t arg0; + cocos2d::Vec2 arg0; - ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:getPage"); + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccui.PageView:setIndicatorPositionAsAnchorPoint"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getPage'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint'", nullptr); return 0; } - cocos2d::ui::Layout* ret = cobj->getPage(arg0); - object_to_luaval(tolua_S, "ccui.Layout",(cocos2d::ui::Layout*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getPage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getPage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ui_PageView_removePageAtIndex(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) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - ssize_t arg0; - - ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:removePageAtIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'", nullptr); - return 0; - } - cobj->removePageAtIndex(arg0); + cobj->setIndicatorPositionAsAnchorPoint(arg0); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:removePageAtIndex",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setIndicatorPositionAsAnchorPoint",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ui_PageView_getPages(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_scrollToItem(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -22113,7 +22041,157 @@ int lua_cocos2dx_ui_PageView_getPages(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getPages'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_scrollToItem'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + 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; + } + cobj->scrollToItem(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:scrollToItem",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_scrollToItem'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_setIndicatorEnabled(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_setIndicatorEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.PageView:setIndicatorEnabled"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_setIndicatorEnabled'", nullptr); + return 0; + } + cobj->setIndicatorEnabled(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:setIndicatorEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_setIndicatorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_addPage(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_addPage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ui::Widget* arg0; + + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.PageView:addPage"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_addPage'", nullptr); + return 0; + } + cobj->addPage(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:addPage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_addPage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes(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) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes'", nullptr); return 0; } #endif @@ -22123,19 +22201,19 @@ int lua_cocos2dx_ui_PageView_getPages(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getPages'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes'", nullptr); return 0; } - cocos2d::Vector& ret = cobj->getPages(); - ccvector_to_luaval(tolua_S, ret); + double ret = cobj->getIndicatorSpaceBetweenIndexNodes(); + tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getPages",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:getIndicatorSpaceBetweenIndexNodes",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getPages'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes'.",&tolua_err); #endif return 0; @@ -22187,7 +22265,7 @@ int lua_cocos2dx_ui_PageView_removeAllPages(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_PageView_addPage(lua_State* tolua_S) +int lua_cocos2dx_ui_PageView_removePageAtIndex(lua_State* tolua_S) { int argc = 0; cocos2d::ui::PageView* cobj = nullptr; @@ -22207,7 +22285,7 @@ int lua_cocos2dx_ui_PageView_addPage(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_addPage'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'", nullptr); return 0; } #endif @@ -22215,24 +22293,24 @@ int lua_cocos2dx_ui_PageView_addPage(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::ui::Layout* arg0; + ssize_t arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:addPage"); + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "ccui.PageView:removePageAtIndex"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_addPage'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'", nullptr); return 0; } - cobj->addPage(arg0); + cobj->removePageAtIndex(arg0); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:addPage",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.PageView:removePageAtIndex",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_addPage'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_PageView_removePageAtIndex'.",&tolua_err); #endif return 0; @@ -22351,28 +22429,30 @@ static int lua_cocos2dx_ui_PageView_finalize(lua_State* tolua_S) int lua_register_cocos2dx_ui_PageView(lua_State* tolua_S) { tolua_usertype(tolua_S,"ccui.PageView"); - tolua_cclass(tolua_S,"PageView","ccui.PageView","ccui.Layout",nullptr); + tolua_cclass(tolua_S,"PageView","ccui.PageView","ccui.ListView",nullptr); tolua_beginmodule(tolua_S,"PageView"); tolua_function(tolua_S,"new",lua_cocos2dx_ui_PageView_constructor); - tolua_function(tolua_S,"getCustomScrollThreshold",lua_cocos2dx_ui_PageView_getCustomScrollThreshold); - tolua_function(tolua_S,"getCurPageIndex",lua_cocos2dx_ui_PageView_getCurPageIndex); - tolua_function(tolua_S,"setDirection",lua_cocos2dx_ui_PageView_setDirection); - tolua_function(tolua_S,"addWidgetToPage",lua_cocos2dx_ui_PageView_addWidgetToPage); - tolua_function(tolua_S,"isUsingCustomScrollThreshold",lua_cocos2dx_ui_PageView_isUsingCustomScrollThreshold); - tolua_function(tolua_S,"setCurPageIndex",lua_cocos2dx_ui_PageView_setCurPageIndex); + tolua_function(tolua_S,"setIndicatorSpaceBetweenIndexNodes",lua_cocos2dx_ui_PageView_setIndicatorSpaceBetweenIndexNodes); + tolua_function(tolua_S,"setIndicatorSelectedIndexColor",lua_cocos2dx_ui_PageView_setIndicatorSelectedIndexColor); + tolua_function(tolua_S,"getIndicatorSelectedIndexColor",lua_cocos2dx_ui_PageView_getIndicatorSelectedIndexColor); + tolua_function(tolua_S,"getIndicatorPositionAsAnchorPoint",lua_cocos2dx_ui_PageView_getIndicatorPositionAsAnchorPoint); + tolua_function(tolua_S,"setIndicatorPosition",lua_cocos2dx_ui_PageView_setIndicatorPosition); + tolua_function(tolua_S,"getIndicatorPosition",lua_cocos2dx_ui_PageView_getIndicatorPosition); + tolua_function(tolua_S,"insertPage",lua_cocos2dx_ui_PageView_insertPage); + tolua_function(tolua_S,"getCurrentPageIndex",lua_cocos2dx_ui_PageView_getCurrentPageIndex); tolua_function(tolua_S,"removePage",lua_cocos2dx_ui_PageView_removePage); tolua_function(tolua_S,"addEventListener",lua_cocos2dx_ui_PageView_addEventListener); - tolua_function(tolua_S,"setUsingCustomScrollThreshold",lua_cocos2dx_ui_PageView_setUsingCustomScrollThreshold); - tolua_function(tolua_S,"setCustomScrollThreshold",lua_cocos2dx_ui_PageView_setCustomScrollThreshold); - tolua_function(tolua_S,"insertPage",lua_cocos2dx_ui_PageView_insertPage); - tolua_function(tolua_S,"getDirection",lua_cocos2dx_ui_PageView_getDirection); + tolua_function(tolua_S,"setCurrentPageIndex",lua_cocos2dx_ui_PageView_setCurrentPageIndex); + tolua_function(tolua_S,"getIndicatorEnabled",lua_cocos2dx_ui_PageView_getIndicatorEnabled); tolua_function(tolua_S,"scrollToPage",lua_cocos2dx_ui_PageView_scrollToPage); - tolua_function(tolua_S,"getPage",lua_cocos2dx_ui_PageView_getPage); - tolua_function(tolua_S,"removePageAtIndex",lua_cocos2dx_ui_PageView_removePageAtIndex); - tolua_function(tolua_S,"getPages",lua_cocos2dx_ui_PageView_getPages); - tolua_function(tolua_S,"removeAllPages",lua_cocos2dx_ui_PageView_removeAllPages); + tolua_function(tolua_S,"setIndicatorPositionAsAnchorPoint",lua_cocos2dx_ui_PageView_setIndicatorPositionAsAnchorPoint); + tolua_function(tolua_S,"scrollToItem",lua_cocos2dx_ui_PageView_scrollToItem); + tolua_function(tolua_S,"setIndicatorEnabled",lua_cocos2dx_ui_PageView_setIndicatorEnabled); tolua_function(tolua_S,"addPage",lua_cocos2dx_ui_PageView_addPage); + tolua_function(tolua_S,"getIndicatorSpaceBetweenIndexNodes",lua_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes); + tolua_function(tolua_S,"removeAllPages",lua_cocos2dx_ui_PageView_removeAllPages); + tolua_function(tolua_S,"removePageAtIndex",lua_cocos2dx_ui_PageView_removePageAtIndex); tolua_function(tolua_S,"create", lua_cocos2dx_ui_PageView_create); tolua_function(tolua_S,"createInstance", lua_cocos2dx_ui_PageView_createInstance); tolua_endmodule(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp index 15e87279e6..0730c1684c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp @@ -628,6 +628,8 @@ int register_all_cocos2dx_ui(lua_State* tolua_S); + +