mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14408 from CocosRobot/update_lua_bindings_1447733106
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
61614d64a3
|
@ -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
|
||||
)
|
||||
{
|
||||
},
|
||||
|
|
|
@ -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<cocos2d::ui::Widget>(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<cocos2d::ui::Widget>(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<cocos2d::ui::Layout>(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<cocos2d::ui::Layout *>& 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; })()");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,67 +1,77 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module PageView
|
||||
-- @extend Layout
|
||||
-- @extend ListView
|
||||
-- @parent_module ccui
|
||||
|
||||
--------------------------------
|
||||
-- brief Query the custom scroll threshold of the PageView.<br>
|
||||
-- return Custom scroll threshold in float.
|
||||
-- @function [parent=#PageView] getCustomScrollThreshold
|
||||
-- brief Set space between page indicator's index nodes.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- param page Page to be inserted.<br>
|
||||
-- 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.<br>
|
||||
-- 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<br>
|
||||
-- see `Direction`<br>
|
||||
-- param direction Scroll direction enum.<br>
|
||||
-- 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.<br>
|
||||
-- param widget Widget to be added to pageview.<br>
|
||||
-- param pageIdx A given index.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- This is the different between scrollToPage.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- If you set it to false, then the default scroll threshold is pageView.width / 2<br>
|
||||
-- param flag True if using custom scroll threshold, false otherwise.
|
||||
-- @function [parent=#PageView] setUsingCustomScrollThreshold
|
||||
-- Jump to a page with a given index without scrolling.<br>
|
||||
-- This is the different between scrollToPage.<br>
|
||||
-- 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.<br>
|
||||
-- param threshold A threshold in float.
|
||||
-- @function [parent=#PageView] setCustomScrollThreshold
|
||||
-- brief Query page indicator state.<br>
|
||||
-- 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.<br>
|
||||
-- param page Page to be inserted.<br>
|
||||
-- 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.<br>
|
||||
-- see `Direction`<br>
|
||||
-- since v3.8<br>
|
||||
-- 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.<br>
|
||||
|
@ -117,28 +107,43 @@
|
|||
-- @return PageView#PageView self (return value: ccui.PageView)
|
||||
|
||||
--------------------------------
|
||||
-- brief Get a page at a given index<br>
|
||||
-- param index A given index.<br>
|
||||
-- return A layout pointer in PageView container.
|
||||
-- @function [parent=#PageView] getPage
|
||||
-- brief Set the page indicator's position using anchor point.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- return A vector of Layout pointers.
|
||||
-- @function [parent=#PageView] getPages
|
||||
-- Scroll to a page with a given index.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- 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.<br>
|
||||
-- param page Page to be inserted.
|
||||
-- @function [parent=#PageView] addPage
|
||||
-- Remove a page at a given index of PageView.<br>
|
||||
-- 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<br>
|
||||
-- Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.<br>
|
||||
-- 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)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -376,13 +376,6 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Return a current focused widget in your UI scene.<br>
|
||||
-- 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.<br>
|
||||
-- This function is used for determining touch area of widget.<br>
|
||||
|
@ -551,6 +544,13 @@
|
|||
-- @param #bool enable
|
||||
-- @return Widget#Widget self (return value: ccui.Widget)
|
||||
|
||||
--------------------------------
|
||||
-- Return a current focused widget in your UI scene.<br>
|
||||
-- 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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -628,6 +628,8 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue