From 12db177f5cf1e2c7f0ffe68aeb101b0022a64047 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 7 Jun 2017 16:54:36 +0800 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17905) --- ..._cocos2dx_experimental_webView_auto_api.js | 28 ++++ ...jsb_cocos2dx_experimental_webView_auto.cpp | 57 +++++++ ...jsb_cocos2dx_experimental_webView_auto.hpp | 3 + .../lua-bindings/auto/api/WebView.lua | 19 +++ ...lua_cocos2dx_experimental_webview_auto.cpp | 147 ++++++++++++++++++ ...lua_cocos2dx_experimental_webview_auto.hpp | 3 + 6 files changed, 257 insertions(+) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js index e234d50ed7..e3c55603ed 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js @@ -8,6 +8,16 @@ var ccui = ccui || {}; */ ccui.WebView = { +/** + * @method setOpacityWebView + * @param {float} arg0 + */ +setOpacityWebView : function ( +float +) +{ +}, + /** * @method canGoBack * @return {bool} @@ -108,6 +118,14 @@ str { }, +/** + * @method setBackgroundTransparent + */ +setBackgroundTransparent : function ( +) +{ +}, + /** * @method getOnJSCallback * @return {function} @@ -146,6 +164,16 @@ stopLoading : function ( { }, +/** + * @method getOpacityWebView + * @return {float} + */ +getOpacityWebView : function ( +) +{ + return 0; +}, + /** * @method reload */ diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp index 80c29120a6..f59f4b4b06 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp @@ -23,6 +23,26 @@ static bool js_is_native_obj(JSContext *cx, uint32_t argc, jsval *vp) JSClass *jsb_cocos2d_experimental_ui_WebView_class; JSObject *jsb_cocos2d_experimental_ui_WebView_prototype; +bool js_cocos2dx_experimental_webView_WebView_setOpacityWebView(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::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_setOpacityWebView : Invalid Native Object"); + if (argc == 1) { + double arg0 = 0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !std::isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_setOpacityWebView : Error processing arguments"); + cobj->setOpacityWebView(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_setOpacityWebView : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_experimental_webView_WebView_canGoBack(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -239,6 +259,22 @@ bool js_cocos2dx_experimental_webView_WebView_evaluateJS(JSContext *cx, uint32_t JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_evaluateJS : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_experimental_webView_WebView_setBackgroundTransparent(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::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_setBackgroundTransparent : Invalid Native Object"); + if (argc == 0) { + cobj->setBackgroundTransparent(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_setBackgroundTransparent : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_experimental_webView_WebView_getOnJSCallback(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -309,6 +345,24 @@ bool js_cocos2dx_experimental_webView_WebView_stopLoading(JSContext *cx, uint32_ JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_stopLoading : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_experimental_webView_WebView_getOpacityWebView(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::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_getOpacityWebView : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getOpacityWebView(); + JS::RootedValue jsret(cx); + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_getOpacityWebView : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_experimental_webView_WebView_reload(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -414,6 +468,7 @@ void js_register_cocos2dx_experimental_webView_WebView(JSContext *cx, JS::Handle }; static JSFunctionSpec funcs[] = { + JS_FN("setOpacityWebView", js_cocos2dx_experimental_webView_WebView_setOpacityWebView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("canGoBack", js_cocos2dx_experimental_webView_WebView_canGoBack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("loadHTMLString", js_cocos2dx_experimental_webView_WebView_loadHTMLString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("goForward", js_cocos2dx_experimental_webView_WebView_goForward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -424,10 +479,12 @@ void js_register_cocos2dx_experimental_webView_WebView(JSContext *cx, JS::Handle JS_FN("loadURL", js_cocos2dx_experimental_webView_WebView_loadURL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setBounces", js_cocos2dx_experimental_webView_WebView_setBounces, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("evaluateJS", js_cocos2dx_experimental_webView_WebView_evaluateJS, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackgroundTransparent", js_cocos2dx_experimental_webView_WebView_setBackgroundTransparent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getOnJSCallback", js_cocos2dx_experimental_webView_WebView_getOnJSCallback, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("canGoForward", js_cocos2dx_experimental_webView_WebView_canGoForward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getOnShouldStartLoading", js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("stopLoading", js_cocos2dx_experimental_webView_WebView_stopLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOpacityWebView", js_cocos2dx_experimental_webView_WebView_getOpacityWebView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("reload", js_cocos2dx_experimental_webView_WebView_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setJavascriptInterfaceScheme", js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getOnDidFinishLoading", js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp index e6a06d6528..c6187ad6c4 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp @@ -13,6 +13,7 @@ bool js_cocos2dx_experimental_webView_WebView_constructor(JSContext *cx, uint32_ void js_cocos2dx_experimental_webView_WebView_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_experimental_webView_WebView(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_experimental_webView(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_experimental_webView_WebView_setOpacityWebView(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_canGoBack(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_loadHTMLString(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_goForward(JSContext *cx, uint32_t argc, jsval *vp); @@ -23,10 +24,12 @@ bool js_cocos2dx_experimental_webView_WebView_loadFile(JSContext *cx, uint32_t a bool js_cocos2dx_experimental_webView_WebView_loadURL(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_setBounces(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_evaluateJS(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_setBackgroundTransparent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_getOnJSCallback(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_canGoForward(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_stopLoading(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_getOpacityWebView(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_reload(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/WebView.lua b/cocos/scripting/lua-bindings/auto/api/WebView.lua index 507c1b3f83..fe4881be94 100644 --- a/cocos/scripting/lua-bindings/auto/api/WebView.lua +++ b/cocos/scripting/lua-bindings/auto/api/WebView.lua @@ -4,6 +4,13 @@ -- @extend Widget -- @parent_module ccexp +-------------------------------- +-- SetOpacity of webview. +-- @function [parent=#WebView] setOpacityWebView +-- @param self +-- @param #float opacity +-- @return experimental::ui::WebView#experimental::ui::WebView self (return value: cc.experimental::ui::WebView) + -------------------------------- -- Gets whether this WebView has a back history item.
-- return WebView has a back history item. @@ -71,6 +78,12 @@ -- @param #string js -- @return experimental::ui::WebView#experimental::ui::WebView self (return value: cc.experimental::ui::WebView) +-------------------------------- +-- set the background transparent +-- @function [parent=#WebView] setBackgroundTransparent +-- @param self +-- @return experimental::ui::WebView#experimental::ui::WebView self (return value: cc.experimental::ui::WebView) + -------------------------------- -- Get the Javascript callback. -- @function [parent=#WebView] getOnJSCallback @@ -90,6 +103,12 @@ -- @param self -- @return experimental::ui::WebView#experimental::ui::WebView self (return value: cc.experimental::ui::WebView) +-------------------------------- +-- getOpacity of webview. +-- @function [parent=#WebView] getOpacityWebView +-- @param self +-- @return float#float ret (return value: float) + -------------------------------- -- Reloads the current URL. -- @function [parent=#WebView] reload diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.cpp index f8b5e5947a..5cae61af06 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.cpp @@ -4,6 +4,56 @@ #include "scripting/lua-bindings/manual/tolua_fix.h" #include "scripting/lua-bindings/manual/LuaBasicConversions.h" +int lua_cocos2dx_experimental_webview_WebView_setOpacityWebView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::experimental::ui::WebView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "ccexp.WebView:setOpacityWebView"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'", nullptr); + return 0; + } + cobj->setOpacityWebView(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setOpacityWebView",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_experimental_webview_WebView_canGoBack(lua_State* tolua_S) { int argc = 0; @@ -471,6 +521,53 @@ int lua_cocos2dx_experimental_webview_WebView_evaluateJS(lua_State* tolua_S) return 0; } +int lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::experimental::ui::WebView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent'", 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_experimental_webview_WebView_setBackgroundTransparent'", nullptr); + return 0; + } + cobj->setBackgroundTransparent(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setBackgroundTransparent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_experimental_webview_WebView_getOnJSCallback(lua_State* tolua_S) { int argc = 0; @@ -612,6 +709,53 @@ int lua_cocos2dx_experimental_webview_WebView_stopLoading(lua_State* tolua_S) return 0; } +int lua_cocos2dx_experimental_webview_WebView_getOpacityWebView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::experimental::ui::WebView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_getOpacityWebView'", 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_experimental_webview_WebView_getOpacityWebView'", nullptr); + return 0; + } + double ret = cobj->getOpacityWebView(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:getOpacityWebView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_getOpacityWebView'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_experimental_webview_WebView_reload(lua_State* tolua_S) { int argc = 0; @@ -793,6 +937,7 @@ int lua_register_cocos2dx_experimental_webview_WebView(lua_State* tolua_S) tolua_beginmodule(tolua_S,"WebView"); tolua_function(tolua_S,"new",lua_cocos2dx_experimental_webview_WebView_constructor); + tolua_function(tolua_S,"setOpacityWebView",lua_cocos2dx_experimental_webview_WebView_setOpacityWebView); tolua_function(tolua_S,"canGoBack",lua_cocos2dx_experimental_webview_WebView_canGoBack); tolua_function(tolua_S,"loadHTMLString",lua_cocos2dx_experimental_webview_WebView_loadHTMLString); tolua_function(tolua_S,"goForward",lua_cocos2dx_experimental_webview_WebView_goForward); @@ -802,9 +947,11 @@ int lua_register_cocos2dx_experimental_webview_WebView(lua_State* tolua_S) tolua_function(tolua_S,"loadURL",lua_cocos2dx_experimental_webview_WebView_loadURL); tolua_function(tolua_S,"setBounces",lua_cocos2dx_experimental_webview_WebView_setBounces); tolua_function(tolua_S,"evaluateJS",lua_cocos2dx_experimental_webview_WebView_evaluateJS); + tolua_function(tolua_S,"setBackgroundTransparent",lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent); tolua_function(tolua_S,"getOnJSCallback",lua_cocos2dx_experimental_webview_WebView_getOnJSCallback); tolua_function(tolua_S,"canGoForward",lua_cocos2dx_experimental_webview_WebView_canGoForward); tolua_function(tolua_S,"stopLoading",lua_cocos2dx_experimental_webview_WebView_stopLoading); + tolua_function(tolua_S,"getOpacityWebView",lua_cocos2dx_experimental_webview_WebView_getOpacityWebView); tolua_function(tolua_S,"reload",lua_cocos2dx_experimental_webview_WebView_reload); tolua_function(tolua_S,"setJavascriptInterfaceScheme",lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme); tolua_function(tolua_S,"create", lua_cocos2dx_experimental_webview_WebView_create); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp index 4c48ba6da9..3d5c1be37c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp @@ -29,6 +29,9 @@ int register_all_cocos2dx_experimental_webview(lua_State* tolua_S); + + + #endif // __cocos2dx_experimental_webview_h__ #endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)