// clang-format off

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.1.0
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

/****************************************************************************
 Copyright (c) 2022-2023 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 documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights to
 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 of the Software, and to permit persons to whom the Software is furnished to do so,
 subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 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


#define SWIG_STD_MOVE(OBJ) std::move(OBJ)


#include <stdio.h>


#include "bindings/jswrapper/SeApi.h"
#include "bindings/manual/jsb_conversions.h"
#include "bindings/manual/jsb_global.h"


#include "bindings/auto/jsb_video_auto.h"



se::Class* __jsb_cc_VideoPlayer_class = nullptr;
se::Object* __jsb_cc_VideoPlayer_proto = nullptr;
SE_DECLARE_FINALIZE_FUNC(js_delete_cc_VideoPlayer) 

static bool js_new_cc_VideoPlayer(se::State& s) // NOLINT(readability-identifier-naming)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    
    cc::VideoPlayer *result;
    result = (cc::VideoPlayer *)new cc::VideoPlayer();
    
    
    auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
    s.thisObject()->setPrivateObject(ptr);
    return true;
}
SE_BIND_CTOR(js_new_cc_VideoPlayer, __jsb_cc_VideoPlayer_class, js_delete_cc_VideoPlayer)

static bool js_delete_cc_VideoPlayer(se::State& s)
{
    return true;
}
SE_BIND_FINALIZE_FUNC(js_delete_cc_VideoPlayer) 

static bool js_cc_VideoPlayer_destroy(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    (arg1)->destroy();
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_destroy) 

static bool js_cc_VideoPlayer_setURL(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments");
    arg2 = &temp2;
    
    (arg1)->setURL((ccstd::string const &)*arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setURL) 

static bool js_cc_VideoPlayer_play(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    (arg1)->play();
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_play) 

static bool js_cc_VideoPlayer_pause(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    (arg1)->pause();
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_pause) 

static bool js_cc_VideoPlayer_stop(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    (arg1)->stop();
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_stop) 

static bool js_cc_VideoPlayer_seekTo(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    float 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->seekTo(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_seekTo) 

static bool js_cc_VideoPlayer_currentTime(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    float 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    result = (float)((cc::VideoPlayer const *)arg1)->currentTime();
    
    ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); 
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_currentTime) 

static bool js_cc_VideoPlayer_duration(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    float 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    result = (float)((cc::VideoPlayer const *)arg1)->duration();
    
    ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); 
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_duration) 

static bool js_cc_VideoPlayer_setKeepAspectRatioEnabled(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2);
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setKeepAspectRatioEnabled(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setKeepAspectRatioEnabled) 

static bool js_cc_VideoPlayer_isKeepAspectRatioEnabled(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    result = (bool)((cc::VideoPlayer const *)arg1)->isKeepAspectRatioEnabled();
    
    ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_isKeepAspectRatioEnabled) 

static bool js_cc_VideoPlayer_setFullScreenEnabled(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2);
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setFullScreenEnabled(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setFullScreenEnabled) 

static bool js_cc_VideoPlayer_addEventListener(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    ccstd::string *arg2 = 0 ;
    cc::VideoPlayer::ccVideoPlayerCallback *arg3 = 0 ;
    ccstd::string temp2 ;
    cc::VideoPlayer::ccVideoPlayerCallback temp3 ;
    
    if(argc != 2) {
        SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
        return false;
    }
    arg1 = SE_THIS_OBJECT<cc::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &temp2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments");
    arg2 = &temp2;
    
    
    ok &= sevalue_to_native(args[1], &temp3, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments");
    arg3 = &temp3;
    
    (arg1)->addEventListener((ccstd::string const &)*arg2,(cc::VideoPlayer::ccVideoPlayerCallback const &)*arg3);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_addEventListener) 

static bool js_cc_VideoPlayer_onPlayEvent(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    int 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->onPlayEvent(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_onPlayEvent) 

static bool js_cc_VideoPlayer_setVisible(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2);
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setVisible(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setVisible) 

static bool js_cc_VideoPlayer_setFrame(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    
    ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    
    ok &= sevalue_to_native(args[2], &arg4, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    
    ok &= sevalue_to_native(args[3], &arg5, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setFrame(arg2,arg3,arg4,arg5);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setFrame) 

static bool js_cc_VideoPlayer_setPlaybackRate(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) NULL ;
    float 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setPlaybackRate(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setPlaybackRate) 

static bool js_cc_VideoPlayer_setMute(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2);
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setMute(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setMute) 

static bool js_cc_VideoPlayer_setLoop(se::State& s)
{
    CC_UNUSED bool ok = true;
    const auto& args = s.args();
    size_t argc = args.size();
    cc::VideoPlayer *arg1 = (cc::VideoPlayer *) 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::VideoPlayer>(s);
    if (nullptr == arg1) return true;
    
    ok &= sevalue_to_native(args[0], &arg2);
    SE_PRECONDITION2(ok, false, "Error processing arguments"); 
    (arg1)->setLoop(arg2);
    
    
    return true;
}
SE_BIND_FUNC(js_cc_VideoPlayer_setLoop) 

bool js_register_cc_VideoPlayer(se::Object* obj) {
    auto* cls = se::Class::create("VideoPlayer", obj, nullptr, _SE(js_new_cc_VideoPlayer)); 
    
    cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
    
    cls->defineFunction("destroy", _SE(js_cc_VideoPlayer_destroy)); 
    cls->defineFunction("setURL", _SE(js_cc_VideoPlayer_setURL)); 
    cls->defineFunction("play", _SE(js_cc_VideoPlayer_play)); 
    cls->defineFunction("pause", _SE(js_cc_VideoPlayer_pause)); 
    cls->defineFunction("stop", _SE(js_cc_VideoPlayer_stop)); 
    cls->defineFunction("seekTo", _SE(js_cc_VideoPlayer_seekTo)); 
    cls->defineFunction("currentTime", _SE(js_cc_VideoPlayer_currentTime)); 
    cls->defineFunction("duration", _SE(js_cc_VideoPlayer_duration)); 
    cls->defineFunction("setKeepAspectRatioEnabled", _SE(js_cc_VideoPlayer_setKeepAspectRatioEnabled)); 
    cls->defineFunction("isKeepAspectRatioEnabled", _SE(js_cc_VideoPlayer_isKeepAspectRatioEnabled)); 
    cls->defineFunction("setFullScreenEnabled", _SE(js_cc_VideoPlayer_setFullScreenEnabled)); 
    cls->defineFunction("addEventListener", _SE(js_cc_VideoPlayer_addEventListener)); 
    cls->defineFunction("onPlayEvent", _SE(js_cc_VideoPlayer_onPlayEvent)); 
    cls->defineFunction("setVisible", _SE(js_cc_VideoPlayer_setVisible)); 
    cls->defineFunction("setFrame", _SE(js_cc_VideoPlayer_setFrame)); 
    cls->defineFunction("setPlaybackRate", _SE(js_cc_VideoPlayer_setPlaybackRate)); 
    cls->defineFunction("setMute", _SE(js_cc_VideoPlayer_setMute)); 
    cls->defineFunction("setLoop", _SE(js_cc_VideoPlayer_setLoop)); 
    
    
    
    
    cls->defineFinalizeFunction(_SE(js_delete_cc_VideoPlayer));
    
    
    cls->install();
    JSBClassType::registerClass<cc::VideoPlayer>(cls);
    
    __jsb_cc_VideoPlayer_proto = cls->getProto();
    __jsb_cc_VideoPlayer_class = cls;
    se::ScriptEngine::getInstance()->clearException();
    return true;
}




bool register_all_video(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_VideoPlayer(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
