From e2f820df25d96f9f1c519f8ef811c0895bad444d Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 18 Mar 2016 09:11:18 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../auto/api/jsb_cocos2dx_auto_api.js | 10 ++++ .../js-bindings/auto/jsb_cocos2dx_auto.cpp | 19 ++++++++ .../js-bindings/auto/jsb_cocos2dx_auto.hpp | 1 + .../lua-bindings/auto/api/MenuItemLabel.lua | 6 +++ .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 48 +++++++++++++++++++ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 6 files changed, 85 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 74217aac91..e679847df3 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 @@ -13819,6 +13819,16 @@ node { }, +/** + * @method getString + * @return {String} + */ +getString : function ( +) +{ + return ; +}, + /** * @method getDisabledColor * @return {color3b_object} diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index 57aa4fa3fc..0ef1d6f253 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -38132,6 +38132,24 @@ bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setLabel : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_MenuItemLabel_getString(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getString : Invalid Native Object"); + if (argc == 0) { + std::string ret = cobj->getString(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getString : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -38321,6 +38339,7 @@ void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global) static JSFunctionSpec funcs[] = { JS_FN("setLabel", js_cocos2dx_MenuItemLabel_setLabel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getString", js_cocos2dx_MenuItemLabel_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDisabledColor", js_cocos2dx_MenuItemLabel_getDisabledColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setString", js_cocos2dx_MenuItemLabel_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initWithLabel", js_cocos2dx_MenuItemLabel_initWithLabel, 2, 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 2ab8ebea52..881bf2a9ee 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -2464,6 +2464,7 @@ void js_cocos2dx_MenuItemLabel_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_getString(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_MenuItemLabel_setString(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua index 74d50ce21a..751e96bcb2 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua @@ -11,6 +11,12 @@ -- @param #cc.Node node -- @return MenuItemLabel#MenuItemLabel self (return value: cc.MenuItemLabel) +-------------------------------- +-- Get the inner string of the inner label. +-- @function [parent=#MenuItemLabel] getString +-- @param self +-- @return string#string ret (return value: string) + -------------------------------- -- Gets the color that will be used when the item is disabled. -- @function [parent=#MenuItemLabel] getDisabledColor diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index a8c6e144d4..3efb08d2d6 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -57395,6 +57395,53 @@ int lua_cocos2dx_MenuItemLabel_setLabel(lua_State* tolua_S) return 0; } +int lua_cocos2dx_MenuItemLabel_getString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::MenuItemLabel* 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.MenuItemLabel",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::MenuItemLabel*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_MenuItemLabel_getString'", 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_MenuItemLabel_getString'", nullptr); + return 0; + } + std::string ret = cobj->getString(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MenuItemLabel:getString",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_MenuItemLabel_getString'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_MenuItemLabel_getDisabledColor(lua_State* tolua_S) { int argc = 0; @@ -57697,6 +57744,7 @@ int lua_register_cocos2dx_MenuItemLabel(lua_State* tolua_S) tolua_beginmodule(tolua_S,"MenuItemLabel"); tolua_function(tolua_S,"new",lua_cocos2dx_MenuItemLabel_constructor); tolua_function(tolua_S,"setLabel",lua_cocos2dx_MenuItemLabel_setLabel); + tolua_function(tolua_S,"getString",lua_cocos2dx_MenuItemLabel_getString); tolua_function(tolua_S,"getDisabledColor",lua_cocos2dx_MenuItemLabel_getDisabledColor); tolua_function(tolua_S,"setString",lua_cocos2dx_MenuItemLabel_setString); tolua_function(tolua_S,"initWithLabel",lua_cocos2dx_MenuItemLabel_initWithLabel); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 7984e43f18..f2b944b10f 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -2187,6 +2187,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__