Files
cocos4/native/cocos/bindings/auto/jsb_webview_auto.cpp
T

946 lines
30 KiB
C++

// clang-format off
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.1.0
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
/****************************************************************************
Copyright (c) 2022 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to use Cocos Creator solely to develop games on your target platforms. You shall
not use Cocos Creator software for developing other software or tools that's
used for developing games. You are not granted to publish, distribute,
sublicense, and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed, not sold.
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4101)
#endif
/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static
#endif
#include <stdio.h>
#include "bindings/jswrapper/SeApi.h"
#include "bindings/manual/jsb_conversions.h"
#include "bindings/manual/jsb_global.h"
#include "bindings/auto/jsb_webview_auto.h"
se::Class* __jsb_cc_WebView_class = nullptr;
se::Object* __jsb_cc_WebView_proto = nullptr;
SE_DECLARE_FINALIZE_FUNC(js_delete_cc_WebView)
static bool js_cc_WebView_create_static(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *result = 0 ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
result = (cc::WebView *)cc::WebView::create();
// %typemap(out) SWIGTYPE*
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
SE_PRECONDITION2(ok, false, "WebView_create, Error processing arguments");
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
return true;
}
SE_BIND_FUNC(js_cc_WebView_create_static)
static bool js_cc_WebView_destroy(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
(arg1)->destroy();
return true;
}
SE_BIND_FUNC(js_cc_WebView_destroy)
static bool js_cc_WebView_setJavascriptInterfaceScheme(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_setJavascriptInterfaceScheme,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
(arg1)->setJavascriptInterfaceScheme((ccstd::string const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setJavascriptInterfaceScheme)
static bool js_cc_WebView_loadData(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::Data *arg2 = 0 ;
ccstd::string *arg3 = 0 ;
ccstd::string *arg4 = 0 ;
ccstd::string *arg5 = 0 ;
cc::Data temp2 ;
ccstd::string temp3 ;
ccstd::string temp4 ;
ccstd::string temp5 ;
if(argc != 4) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 4);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadData,2,SWIGTYPE_p_cc__Data");
arg2 = &temp2;
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[1], &temp3, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadData,3,SWIGTYPE_p_ccstd__string");
arg3 = &temp3;
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[2], &temp4, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadData,4,SWIGTYPE_p_ccstd__string");
arg4 = &temp4;
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[3], &temp5, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadData,5,SWIGTYPE_p_ccstd__string");
arg5 = &temp5;
(arg1)->loadData((cc::Data const &)*arg2,(ccstd::string const &)*arg3,(ccstd::string const &)*arg4,(ccstd::string const &)*arg5);
return true;
}
SE_BIND_FUNC(js_cc_WebView_loadData)
static bool js_cc_WebView_loadHTMLString__SWIG_0(se::State& s)
{
// js_overloaded_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string *arg3 = 0 ;
ccstd::string temp2 ;
ccstd::string temp3 ;
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadHTMLString,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[1], &temp3, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadHTMLString,3,SWIGTYPE_p_ccstd__string");
arg3 = &temp3;
(arg1)->loadHTMLString((ccstd::string const &)*arg2,(ccstd::string const &)*arg3);
return true;
}
static bool js_cc_WebView_loadHTMLString__SWIG_1(se::State& s)
{
// js_overloaded_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string temp2 ;
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadHTMLString,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
(arg1)->loadHTMLString((ccstd::string const &)*arg2);
return true;
}
static bool js_cc_WebView_loadHTMLString(se::State& s)
{
// js_function_dispatcher
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
// js_function_dispatch_case
if (argc == 2) {
ok = js_cc_WebView_loadHTMLString__SWIG_0(s);
if (ok) {
return true;
}
} // js_function_dispatch_case
if (argc == 1) {
ok = js_cc_WebView_loadHTMLString__SWIG_1(s);
if (ok) {
return true;
}
}
SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc);
return false;
}
SE_BIND_FUNC(js_cc_WebView_loadHTMLString)
static bool js_cc_WebView_loadURL(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadURL,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
(arg1)->loadURL((ccstd::string const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_loadURL)
static bool js_cc_WebView_loadFile(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_loadFile,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
(arg1)->loadFile((ccstd::string const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_loadFile)
static bool js_cc_WebView_stopLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
(arg1)->stopLoading();
return true;
}
SE_BIND_FUNC(js_cc_WebView_stopLoading)
static bool js_cc_WebView_reload(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
(arg1)->reload();
return true;
}
SE_BIND_FUNC(js_cc_WebView_reload)
static bool js_cc_WebView_canGoBack(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = (bool)(arg1)->canGoBack();
// out 5
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
return true;
}
SE_BIND_FUNC(js_cc_WebView_canGoBack)
static bool js_cc_WebView_canGoForward(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = (bool)(arg1)->canGoForward();
// out 5
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
return true;
}
SE_BIND_FUNC(js_cc_WebView_canGoForward)
static bool js_cc_WebView_goBack(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
(arg1)->goBack();
return true;
}
SE_BIND_FUNC(js_cc_WebView_goBack)
static bool js_cc_WebView_goForward(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
(arg1)->goForward();
return true;
}
SE_BIND_FUNC(js_cc_WebView_goForward)
static bool js_cc_WebView_evaluateJS(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
ccstd::string *arg2 = 0 ;
ccstd::string temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_evaluateJS,2,SWIGTYPE_p_ccstd__string");
arg2 = &temp2;
(arg1)->evaluateJS((ccstd::string const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_evaluateJS)
static bool js_cc_WebView_setScalesPageToFit(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool arg2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) bool
ok &= sevalue_to_native(args[0], &arg2);
SE_PRECONDITION2(ok, false, "WebView_setScalesPageToFit,2,SWIGTYPE_bool");
(arg1)->setScalesPageToFit(arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setScalesPageToFit)
static bool js_cc_WebView_setOnShouldStartLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
std::function< bool (cc::WebView *,ccstd::string const &) > *arg2 = 0 ;
std::function< bool (cc::WebView *,ccstd::string const &) > temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_setOnShouldStartLoading,2,SWIGTYPE_p_std__functionT_bool_fcc__WebView_p_ccstd__string_const_RF_t");
arg2 = &temp2;
(arg1)->setOnShouldStartLoading((std::function< bool (cc::WebView *,ccstd::string const &) > const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setOnShouldStartLoading)
static bool js_cc_WebView_setOnDidFinishLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback *arg2 = 0 ;
cc::WebView::ccWebViewCallback temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_setOnDidFinishLoading,2,SWIGTYPE_p_std__functionT_void_fcc__WebView_p_ccstd__string_const_RF_t");
arg2 = &temp2;
(arg1)->setOnDidFinishLoading((cc::WebView::ccWebViewCallback const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setOnDidFinishLoading)
static bool js_cc_WebView_setOnDidFailLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback *arg2 = 0 ;
cc::WebView::ccWebViewCallback temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_setOnDidFailLoading,2,SWIGTYPE_p_std__functionT_void_fcc__WebView_p_ccstd__string_const_RF_t");
arg2 = &temp2;
(arg1)->setOnDidFailLoading((cc::WebView::ccWebViewCallback const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setOnDidFailLoading)
static bool js_cc_WebView_setOnJSCallback(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback *arg2 = 0 ;
cc::WebView::ccWebViewCallback temp2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) SWIGTYPE&
ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
SE_PRECONDITION2(ok, false, "WebView_setOnJSCallback,2,SWIGTYPE_p_std__functionT_void_fcc__WebView_p_ccstd__string_const_RF_t");
arg2 = &temp2;
(arg1)->setOnJSCallback((cc::WebView::ccWebViewCallback const &)*arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setOnJSCallback)
static bool js_cc_WebView_getOnShouldStartLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
std::function< bool (cc::WebView *,ccstd::string const &) > result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = ((cc::WebView const *)arg1)->getOnShouldStartLoading();
// %typemap(out) SWIGTYPE
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
SE_PRECONDITION2(ok, false, "WebView_getOnShouldStartLoading, Error processing arguments");
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
return true;
}
SE_BIND_FUNC(js_cc_WebView_getOnShouldStartLoading)
static bool js_cc_WebView_getOnDidFinishLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = ((cc::WebView const *)arg1)->getOnDidFinishLoading();
// %typemap(out) SWIGTYPE
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
SE_PRECONDITION2(ok, false, "WebView_getOnDidFinishLoading, Error processing arguments");
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
return true;
}
SE_BIND_FUNC(js_cc_WebView_getOnDidFinishLoading)
static bool js_cc_WebView_getOnDidFailLoading(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = ((cc::WebView const *)arg1)->getOnDidFailLoading();
// %typemap(out) SWIGTYPE
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
SE_PRECONDITION2(ok, false, "WebView_getOnDidFailLoading, Error processing arguments");
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
return true;
}
SE_BIND_FUNC(js_cc_WebView_getOnDidFailLoading)
static bool js_cc_WebView_getOnJSCallback(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
cc::WebView::ccWebViewCallback result;
if(argc != 0) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
result = ((cc::WebView const *)arg1)->getOnJSCallback();
// %typemap(out) SWIGTYPE
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
SE_PRECONDITION2(ok, false, "WebView_getOnJSCallback, Error processing arguments");
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
return true;
}
SE_BIND_FUNC(js_cc_WebView_getOnJSCallback)
static bool js_cc_WebView_setBounces(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool arg2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) bool
ok &= sevalue_to_native(args[0], &arg2);
SE_PRECONDITION2(ok, false, "WebView_setBounces,2,SWIGTYPE_bool");
(arg1)->setBounces(arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setBounces)
static bool js_cc_WebView_setVisible(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool arg2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) bool
ok &= sevalue_to_native(args[0], &arg2);
SE_PRECONDITION2(ok, false, "WebView_setVisible,2,SWIGTYPE_bool");
(arg1)->setVisible(arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setVisible)
static bool js_cc_WebView_setFrame(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
float arg2 ;
float arg3 ;
float arg4 ;
float arg5 ;
if(argc != 4) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 4);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) int, short, long, signed char, float, double
ok &= sevalue_to_native(args[0], &arg2, nullptr);
SE_PRECONDITION2(ok, false, "WebView_setFrame,2,SWIGTYPE_float");
// %typemap(in) int, short, long, signed char, float, double
ok &= sevalue_to_native(args[1], &arg3, nullptr);
SE_PRECONDITION2(ok, false, "WebView_setFrame,3,SWIGTYPE_float");
// %typemap(in) int, short, long, signed char, float, double
ok &= sevalue_to_native(args[2], &arg4, nullptr);
SE_PRECONDITION2(ok, false, "WebView_setFrame,4,SWIGTYPE_float");
// %typemap(in) int, short, long, signed char, float, double
ok &= sevalue_to_native(args[3], &arg5, nullptr);
SE_PRECONDITION2(ok, false, "WebView_setFrame,5,SWIGTYPE_float");
(arg1)->setFrame(arg2,arg3,arg4,arg5);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setFrame)
static bool js_cc_WebView_setBackgroundTransparent(se::State& s)
{
// js_function
CC_UNUSED bool ok = true;
const auto& args = s.args();
size_t argc = args.size();
cc::WebView *arg1 = (cc::WebView *) NULL ;
bool arg2 ;
if(argc != 1) {
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
return false;
}
arg1 = SE_THIS_OBJECT<cc::WebView>(s);
SE_PRECONDITION2(arg1, false, "%s: Invalid Native Object", __FUNCTION__);
// %typemap(in) bool
ok &= sevalue_to_native(args[0], &arg2);
SE_PRECONDITION2(ok, false, "WebView_setBackgroundTransparent,2,SWIGTYPE_bool");
(arg1)->setBackgroundTransparent(arg2);
return true;
}
SE_BIND_FUNC(js_cc_WebView_setBackgroundTransparent)
bool js_register_cc_WebView(se::Object* obj) {
auto* cls = se::Class::create("WebView", obj, nullptr, nullptr);
cls->defineFunction("destroy", _SE(js_cc_WebView_destroy));
cls->defineFunction("setJavascriptInterfaceScheme", _SE(js_cc_WebView_setJavascriptInterfaceScheme));
cls->defineFunction("loadData", _SE(js_cc_WebView_loadData));
cls->defineFunction("loadHTMLString", _SE(js_cc_WebView_loadHTMLString));
cls->defineFunction("loadURL", _SE(js_cc_WebView_loadURL));
cls->defineFunction("loadFile", _SE(js_cc_WebView_loadFile));
cls->defineFunction("stopLoading", _SE(js_cc_WebView_stopLoading));
cls->defineFunction("reload", _SE(js_cc_WebView_reload));
cls->defineFunction("canGoBack", _SE(js_cc_WebView_canGoBack));
cls->defineFunction("canGoForward", _SE(js_cc_WebView_canGoForward));
cls->defineFunction("goBack", _SE(js_cc_WebView_goBack));
cls->defineFunction("goForward", _SE(js_cc_WebView_goForward));
cls->defineFunction("evaluateJS", _SE(js_cc_WebView_evaluateJS));
cls->defineFunction("setScalesPageToFit", _SE(js_cc_WebView_setScalesPageToFit));
cls->defineFunction("setOnShouldStartLoading", _SE(js_cc_WebView_setOnShouldStartLoading));
cls->defineFunction("setOnDidFinishLoading", _SE(js_cc_WebView_setOnDidFinishLoading));
cls->defineFunction("setOnDidFailLoading", _SE(js_cc_WebView_setOnDidFailLoading));
cls->defineFunction("setOnJSCallback", _SE(js_cc_WebView_setOnJSCallback));
cls->defineFunction("getOnShouldStartLoading", _SE(js_cc_WebView_getOnShouldStartLoading));
cls->defineFunction("getOnDidFinishLoading", _SE(js_cc_WebView_getOnDidFinishLoading));
cls->defineFunction("getOnDidFailLoading", _SE(js_cc_WebView_getOnDidFailLoading));
cls->defineFunction("getOnJSCallback", _SE(js_cc_WebView_getOnJSCallback));
cls->defineFunction("setBounces", _SE(js_cc_WebView_setBounces));
cls->defineFunction("setVisible", _SE(js_cc_WebView_setVisible));
cls->defineFunction("setFrame", _SE(js_cc_WebView_setFrame));
cls->defineFunction("setBackgroundTransparent", _SE(js_cc_WebView_setBackgroundTransparent));
cls->defineStaticFunction("create", _SE(js_cc_WebView_create_static));
cls->install();
JSBClassType::registerClass<cc::WebView>(cls);
__jsb_cc_WebView_proto = cls->getProto();
__jsb_cc_WebView_class = cls;
se::ScriptEngine::getInstance()->clearException();
return true;
}
bool register_all_webview(se::Object* obj) {
// Get the ns
se::Value nsVal;
if (!obj->getProperty("jsb", &nsVal, true))
{
se::HandleObject jsobj(se::Object::createPlainObject());
nsVal.setObject(jsobj);
obj->setProperty("jsb", nsVal);
}
se::Object* ns = nsVal.toObject();
/* Register classes */
js_register_cc_WebView(ns);
/* Register global variables & global functions */
return true;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif
// clang-format on