/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtWebEngine.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtWebEngineWidgets.h"

#line 28 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/sip/QtWebEngineWidgets/qwebenginescript.sip"
#include <qwebenginescript.h>
#line 29 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/build/QtWebEngineWidgets/sipQtWebEngineWidgetsQWebEngineScript.cpp"

#line 27 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/build/QtWebEngineWidgets/sipQtWebEngineWidgetsQWebEngineScript.cpp"


PyDoc_STRVAR(doc_QWebEngineScript_isNull, "isNull(self) -> bool");

extern "C" {static PyObject *meth_QWebEngineScript_isNull(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_isNull(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_isNull, doc_QWebEngineScript_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_name, "name(self) -> str");

extern "C" {static PyObject *meth_QWebEngineScript_name(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_name(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->name());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_name, doc_QWebEngineScript_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_setName, "setName(self, str)");

extern "C" {static PyObject *meth_QWebEngineScript_setName(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_setName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebEngineScript, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_setName, doc_QWebEngineScript_setName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_sourceCode, "sourceCode(self) -> str");

extern "C" {static PyObject *meth_QWebEngineScript_sourceCode(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_sourceCode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->sourceCode());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_sourceCode, doc_QWebEngineScript_sourceCode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_setSourceCode, "setSourceCode(self, str)");

extern "C" {static PyObject *meth_QWebEngineScript_setSourceCode(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_setSourceCode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebEngineScript, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setSourceCode(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_setSourceCode, doc_QWebEngineScript_setSourceCode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_injectionPoint, "injectionPoint(self) -> QWebEngineScript.InjectionPoint");

extern "C" {static PyObject *meth_QWebEngineScript_injectionPoint(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_injectionPoint(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
             ::QWebEngineScript::InjectionPoint sipRes;

            sipRes = sipCpp->injectionPoint();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QWebEngineScript_InjectionPoint);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_injectionPoint, doc_QWebEngineScript_injectionPoint);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_setInjectionPoint, "setInjectionPoint(self, QWebEngineScript.InjectionPoint)");

extern "C" {static PyObject *meth_QWebEngineScript_setInjectionPoint(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_setInjectionPoint(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QWebEngineScript::InjectionPoint a0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QWebEngineScript, &sipCpp, sipType_QWebEngineScript_InjectionPoint, &a0))
        {
            sipCpp->setInjectionPoint(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_setInjectionPoint, doc_QWebEngineScript_setInjectionPoint);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_worldId, "worldId(self) -> int");

extern "C" {static PyObject *meth_QWebEngineScript_worldId(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_worldId(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
             ::quint32 sipRes;

            sipRes = sipCpp->worldId();

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_worldId, doc_QWebEngineScript_worldId);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_setWorldId, "setWorldId(self, int)");

extern "C" {static PyObject *meth_QWebEngineScript_setWorldId(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_setWorldId(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::quint32 a0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bu", &sipSelf, sipType_QWebEngineScript, &sipCpp, &a0))
        {
            sipCpp->setWorldId(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_setWorldId, doc_QWebEngineScript_setWorldId);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_runsOnSubFrames, "runsOnSubFrames(self) -> bool");

extern "C" {static PyObject *meth_QWebEngineScript_runsOnSubFrames(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_runsOnSubFrames(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScript, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->runsOnSubFrames();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_runsOnSubFrames, doc_QWebEngineScript_runsOnSubFrames);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_setRunsOnSubFrames, "setRunsOnSubFrames(self, bool)");

extern "C" {static PyObject *meth_QWebEngineScript_setRunsOnSubFrames(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_setRunsOnSubFrames(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QWebEngineScript, &sipCpp, &a0))
        {
            sipCpp->setRunsOnSubFrames(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_setRunsOnSubFrames, doc_QWebEngineScript_setRunsOnSubFrames);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScript_swap, "swap(self, QWebEngineScript)");

extern "C" {static PyObject *meth_QWebEngineScript_swap(PyObject *, PyObject *);}
static PyObject *meth_QWebEngineScript_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QWebEngineScript* a0;
         ::QWebEngineScript *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QWebEngineScript, &sipCpp, sipType_QWebEngineScript, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScript, sipName_swap, doc_QWebEngineScript_swap);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QWebEngineScript___ne__(PyObject *,PyObject *);}
static PyObject *slot_QWebEngineScript___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QWebEngineScript *sipCpp = reinterpret_cast< ::QWebEngineScript *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QWebEngineScript));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QWebEngineScript, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QWebEngineScript::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineWidgets, ne_slot, sipType_QWebEngineScript, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QWebEngineScript___eq__(PyObject *,PyObject *);}
static PyObject *slot_QWebEngineScript___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QWebEngineScript *sipCpp = reinterpret_cast< ::QWebEngineScript *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QWebEngineScript));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QWebEngineScript* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QWebEngineScript, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QWebEngineScript::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineWidgets, eq_slot, sipType_QWebEngineScript, sipSelf, sipArg);
}


/* Call the instance's destructor. */
extern "C" {static void release_QWebEngineScript(void *, int);}
static void release_QWebEngineScript(void *sipCppV, int)
{
    delete reinterpret_cast< ::QWebEngineScript *>(sipCppV);
}


extern "C" {static void *array_QWebEngineScript(Py_ssize_t);}
static void *array_QWebEngineScript(Py_ssize_t sipNrElem)
{
    return new  ::QWebEngineScript[sipNrElem];
}


extern "C" {static void array_delete_QWebEngineScript(void *);}
static void array_delete_QWebEngineScript(void *sipCpp)
{
    delete[] reinterpret_cast< ::QWebEngineScript *>(sipCpp);
}


extern "C" {static void assign_QWebEngineScript(void *, Py_ssize_t, void *);}
static void assign_QWebEngineScript(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QWebEngineScript *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QWebEngineScript *>(sipSrc);
}


extern "C" {static void *copy_QWebEngineScript(const void *, Py_ssize_t);}
static void *copy_QWebEngineScript(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QWebEngineScript(reinterpret_cast<const  ::QWebEngineScript *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_QWebEngineScript(sipSimpleWrapper *);}
static void dealloc_QWebEngineScript(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QWebEngineScript(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QWebEngineScript(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QWebEngineScript(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QWebEngineScript *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new  ::QWebEngineScript();

            return sipCpp;
        }
    }

    {
        const  ::QWebEngineScript* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QWebEngineScript, &a0))
        {
            sipCpp = new  ::QWebEngineScript(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QWebEngineScript[] = {
    {(void *)slot_QWebEngineScript___ne__, ne_slot},
    {(void *)slot_QWebEngineScript___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QWebEngineScript[] = {
    {sipName_injectionPoint, meth_QWebEngineScript_injectionPoint, METH_VARARGS, doc_QWebEngineScript_injectionPoint},
    {sipName_isNull, meth_QWebEngineScript_isNull, METH_VARARGS, doc_QWebEngineScript_isNull},
    {sipName_name, meth_QWebEngineScript_name, METH_VARARGS, doc_QWebEngineScript_name},
    {sipName_runsOnSubFrames, meth_QWebEngineScript_runsOnSubFrames, METH_VARARGS, doc_QWebEngineScript_runsOnSubFrames},
    {sipName_setInjectionPoint, meth_QWebEngineScript_setInjectionPoint, METH_VARARGS, doc_QWebEngineScript_setInjectionPoint},
    {sipName_setName, meth_QWebEngineScript_setName, METH_VARARGS, doc_QWebEngineScript_setName},
    {sipName_setRunsOnSubFrames, meth_QWebEngineScript_setRunsOnSubFrames, METH_VARARGS, doc_QWebEngineScript_setRunsOnSubFrames},
    {sipName_setSourceCode, meth_QWebEngineScript_setSourceCode, METH_VARARGS, doc_QWebEngineScript_setSourceCode},
    {sipName_setWorldId, meth_QWebEngineScript_setWorldId, METH_VARARGS, doc_QWebEngineScript_setWorldId},
    {sipName_sourceCode, meth_QWebEngineScript_sourceCode, METH_VARARGS, doc_QWebEngineScript_sourceCode},
    {sipName_swap, meth_QWebEngineScript_swap, METH_VARARGS, doc_QWebEngineScript_swap},
    {sipName_worldId, meth_QWebEngineScript_worldId, METH_VARARGS, doc_QWebEngineScript_worldId}
};

static sipEnumMemberDef enummembers_QWebEngineScript[] = {
    {sipName_ApplicationWorld, static_cast<int>( ::QWebEngineScript::ApplicationWorld), 36},
    {sipName_Deferred, static_cast<int>( ::QWebEngineScript::Deferred), 35},
    {sipName_DocumentCreation, static_cast<int>( ::QWebEngineScript::DocumentCreation), 35},
    {sipName_DocumentReady, static_cast<int>( ::QWebEngineScript::DocumentReady), 35},
    {sipName_MainWorld, static_cast<int>( ::QWebEngineScript::MainWorld), 36},
    {sipName_UserWorld, static_cast<int>( ::QWebEngineScript::UserWorld), 36},
};

PyDoc_STRVAR(doc_QWebEngineScript, "\1QWebEngineScript()\n"
"QWebEngineScript(QWebEngineScript)");


static pyqt5ClassPluginDef plugin_QWebEngineScript = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtWebEngineWidgets_QWebEngineScript = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEngineScript,
        SIP_NULLPTR,
        &plugin_QWebEngineScript
    },
    {
        sipNameNr_QWebEngineScript,
        {0, 0, 1},
        12, methods_QWebEngineScript,
        6, enummembers_QWebEngineScript,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebEngineScript,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QWebEngineScript,
    init_type_QWebEngineScript,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebEngineScript,
    assign_QWebEngineScript,
    array_QWebEngineScript,
    copy_QWebEngineScript,
    release_QWebEngineScript,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QWebEngineScript,
    sizeof ( ::QWebEngineScript),
};
