[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18522)

This commit is contained in:
CocosRobot 2017-11-29 09:19:23 +08:00 committed by minggo
parent 7dee719a94
commit 187a6639e9
2 changed files with 46 additions and 25 deletions

View File

@ -4669,12 +4669,12 @@ bool
/** /**
* @method create * @method create
* @param {String} arg0 * @param {String} str
* @param {String} arg1 * @param {String} str
* @param {float} arg2 * @param {float} float
* @return {ccui.UICCTextField} * @return {ccui.UICCTextField|ccui.UICCTextField}
*/ */
create : function ( create : function(
str, str,
str, str,
float float

View File

@ -11281,25 +11281,46 @@ bool js_cocos2dx_ui_UICCTextField_create(JSContext *cx, uint32_t argc, jsval *vp
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true; bool ok = true;
do {
if (argc == 3) { if (argc == 3) {
std::string arg0; std::string arg0;
std::string arg1;
double arg2 = 0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0); ok &= jsval_to_std_string(cx, args.get(0), &arg0);
if (!ok) { ok = true; break; }
std::string arg1;
ok &= jsval_to_std_string(cx, args.get(1), &arg1); ok &= jsval_to_std_string(cx, args.get(1), &arg1);
if (!ok) { ok = true; break; }
double arg2 = 0;
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_UICCTextField_create : Error processing arguments"); if (!ok) { ok = true; break; }
cocos2d::ui::UICCTextField* ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2);
auto ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2); jsval jsret = JSVAL_NULL;
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::UICCTextField>(ret); if (ret) {
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::UICCTextField")); jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<cocos2d::ui::UICCTextField>(cx, (cocos2d::ui::UICCTextField*)ret));
args.rval().set(OBJECT_TO_JSVAL(jsret)); } else {
jsret = JSVAL_NULL;
};
args.rval().set(jsret);
return true; return true;
} }
} while (0);
do {
if (argc == 0) {
cocos2d::ui::UICCTextField* ret = cocos2d::ui::UICCTextField::create();
jsval jsret = JSVAL_NULL;
if (ret) {
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<cocos2d::ui::UICCTextField>(cx, (cocos2d::ui::UICCTextField*)ret));
} else {
jsret = JSVAL_NULL;
};
args.rval().set(jsret);
return true;
}
} while (0);
JS_ReportError(cx, "js_cocos2dx_ui_UICCTextField_create : wrong number of arguments"); JS_ReportError(cx, "js_cocos2dx_ui_UICCTextField_create : wrong number of arguments");
return false; return false;
} }
bool js_cocos2dx_ui_UICCTextField_constructor(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_ui_UICCTextField_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -11364,7 +11385,7 @@ void js_register_cocos2dx_ui_UICCTextField(JSContext *cx, JS::HandleObject globa
}; };
static JSFunctionSpec st_funcs[] = { static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_UICCTextField_create, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("create", js_cocos2dx_ui_UICCTextField_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END JS_FS_END
}; };