From 6a0e1b323f21b620ed65ee3e5585330d0f88018e Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 20 Oct 2015 02:42:17 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../auto/api/jsb_cocos2dx_auto_api.js | 20 ++++ .../js-bindings/auto/jsb_cocos2dx_auto.cpp | 40 ++++++++ .../js-bindings/auto/jsb_cocos2dx_auto.hpp | 2 + .../scripting/lua-bindings/auto/api/Label.lua | 13 +++ .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 99 +++++++++++++++++++ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 2 + 6 files changed, 176 insertions(+) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js index f28a989f1a..3e33268198 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js @@ -11861,6 +11861,16 @@ float { }, +/** + * @method getLineSpacing + * @return {float} + */ +getLineSpacing : function ( +) +{ + return 0; +}, + /** * @method updateContent */ @@ -11989,6 +11999,16 @@ textvalignment { }, +/** + * @method setLineSpacing + * @param {float} arg0 + */ +setLineSpacing : function ( +float +) +{ +}, + /** * @method getLineHeight * @return {float} diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index a9ce68a383..81c617c446 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -37559,6 +37559,24 @@ bool js_cocos2dx_Label_setSystemFontSize(JSContext *cx, uint32_t argc, jsval *vp JS_ReportError(cx, "js_cocos2dx_Label_setSystemFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Label_getLineSpacing(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::Label* cobj = (cocos2d::Label *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Label_getLineSpacing : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLineSpacing(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Label_getLineSpacing : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Label_updateContent(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -37854,6 +37872,26 @@ bool js_cocos2dx_Label_setVerticalAlignment(JSContext *cx, uint32_t argc, jsval JS_ReportError(cx, "js_cocos2dx_Label_setVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Label_setLineSpacing(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::Label* cobj = (cocos2d::Label *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Label_setLineSpacing : 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_Label_setLineSpacing : Error processing arguments"); + cobj->setLineSpacing(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Label_setLineSpacing : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Label_getLineHeight(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -38584,6 +38622,7 @@ void js_register_cocos2dx_Label(JSContext *cx, JS::HandleObject global) { JS_FN("setBMFontFilePath", js_cocos2dx_Label_setBMFontFilePath, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setLineHeight", js_cocos2dx_Label_setLineHeight, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setSystemFontSize", js_cocos2dx_Label_setSystemFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLineSpacing", js_cocos2dx_Label_getLineSpacing, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("updateContent", js_cocos2dx_Label_updateContent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getStringLength", js_cocos2dx_Label_getStringLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setLineBreakWithoutSpace", js_cocos2dx_Label_setLineBreakWithoutSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -38596,6 +38635,7 @@ void js_register_cocos2dx_Label(JSContext *cx, JS::HandleObject global) { JS_FN("setMaxLineWidth", js_cocos2dx_Label_setMaxLineWidth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getSystemFontName", js_cocos2dx_Label_getSystemFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setVerticalAlignment", js_cocos2dx_Label_setVerticalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLineSpacing", js_cocos2dx_Label_setLineSpacing, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getLineHeight", js_cocos2dx_Label_getLineHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTTFConfig", js_cocos2dx_Label_getTTFConfig, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getVerticalAlignment", js_cocos2dx_Label_getVerticalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index 716c47cb11..6de4d40bb4 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -2205,6 +2205,7 @@ bool js_cocos2dx_Label_setSystemFontName(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_Label_setBMFontFilePath(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_setLineHeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_setSystemFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Label_getLineSpacing(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_updateContent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_getStringLength(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_setLineBreakWithoutSpace(JSContext *cx, uint32_t argc, jsval *vp); @@ -2217,6 +2218,7 @@ bool js_cocos2dx_Label_getDimensions(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_setMaxLineWidth(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_getSystemFontName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_setVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Label_setLineSpacing(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_getLineHeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_getTTFConfig(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_getVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index f2e1d6f750..8d37a58725 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -138,6 +138,12 @@ -- @param #float fontSize -- @return Label#Label self (return value: cc.Label) +-------------------------------- +-- +-- @function [parent=#Label] getLineSpacing +-- @param self +-- @return float#float ret (return value: float) + -------------------------------- -- Update content immediately. -- @function [parent=#Label] updateContent @@ -227,6 +233,13 @@ -- @param #int vAlignment -- @return Label#Label self (return value: cc.Label) +-------------------------------- +-- +-- @function [parent=#Label] setLineSpacing +-- @param self +-- @param #float height +-- @return Label#Label self (return value: cc.Label) + -------------------------------- -- Returns the line height of this Label.
-- warning Not support system font.
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 59276e678f..27c1ec31d8 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -50540,6 +50540,53 @@ int lua_cocos2dx_Label_setSystemFontSize(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Label_getLineSpacing(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Label* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Label",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Label*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Label_getLineSpacing'", 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_Label_getLineSpacing'", nullptr); + return 0; + } + double ret = cobj->getLineSpacing(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Label:getLineSpacing",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Label_getLineSpacing'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Label_updateContent(lua_State* tolua_S) { int argc = 0; @@ -51180,6 +51227,56 @@ int lua_cocos2dx_Label_setVerticalAlignment(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Label_setLineSpacing(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Label* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Label",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Label*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Label_setLineSpacing'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Label:setLineSpacing"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Label_setLineSpacing'", nullptr); + return 0; + } + cobj->setLineSpacing(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Label:setLineSpacing",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Label_setLineSpacing'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Label_getLineHeight(lua_State* tolua_S) { int argc = 0; @@ -52307,6 +52404,7 @@ int lua_register_cocos2dx_Label(lua_State* tolua_S) tolua_function(tolua_S,"getFontAtlas",lua_cocos2dx_Label_getFontAtlas); tolua_function(tolua_S,"setLineHeight",lua_cocos2dx_Label_setLineHeight); tolua_function(tolua_S,"setSystemFontSize",lua_cocos2dx_Label_setSystemFontSize); + tolua_function(tolua_S,"getLineSpacing",lua_cocos2dx_Label_getLineSpacing); tolua_function(tolua_S,"updateContent",lua_cocos2dx_Label_updateContent); tolua_function(tolua_S,"getStringLength",lua_cocos2dx_Label_getStringLength); tolua_function(tolua_S,"setLineBreakWithoutSpace",lua_cocos2dx_Label_setLineBreakWithoutSpace); @@ -52319,6 +52417,7 @@ int lua_register_cocos2dx_Label(lua_State* tolua_S) tolua_function(tolua_S,"setMaxLineWidth",lua_cocos2dx_Label_setMaxLineWidth); tolua_function(tolua_S,"getSystemFontName",lua_cocos2dx_Label_getSystemFontName); tolua_function(tolua_S,"setVerticalAlignment",lua_cocos2dx_Label_setVerticalAlignment); + tolua_function(tolua_S,"setLineSpacing",lua_cocos2dx_Label_setLineSpacing); tolua_function(tolua_S,"getLineHeight",lua_cocos2dx_Label_getLineHeight); tolua_function(tolua_S,"getTTFConfig",lua_cocos2dx_Label_getTTFConfig); tolua_function(tolua_S,"getVerticalAlignment",lua_cocos2dx_Label_getVerticalAlignment); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 90893c963e..7bb4e20b98 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -2146,6 +2146,8 @@ int register_all_cocos2dx(lua_State* tolua_S); + +