/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6-WebEngine.
 * 
 * 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 "sipAPIQtWebEngineCore.h"

#line 26 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebenginescriptcollection.sip"
#include <qwebenginescriptcollection.h>
#line 29 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineScriptCollection.cpp"

#line 28 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 33 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineScriptCollection.cpp"
#line 26 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebenginescript.sip"
#include <qwebenginescript.h>
#line 36 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineScriptCollection.cpp"
#line 24 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 39 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineScriptCollection.cpp"


PyDoc_STRVAR(doc_QWebEngineScriptCollection_isEmpty, "isEmpty(self) -> bool");

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

    {
        const ::QWebEngineScriptCollection *sipCpp;

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

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_isEmpty, doc_QWebEngineScriptCollection_isEmpty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_count, "count(self) -> int");

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

    {
        const ::QWebEngineScriptCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScriptCollection, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->count();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_count, doc_QWebEngineScriptCollection_count);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_contains, "contains(self, value: QWebEngineScript) -> bool");

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

    {
        const ::QWebEngineScript* a0;
        const ::QWebEngineScriptCollection *sipCpp;

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

            sipRes = sipCpp->contains(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_contains, doc_QWebEngineScriptCollection_contains);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_insert, "insert(self, a0: QWebEngineScript)\n"
"insert(self, list: Iterable[QWebEngineScript])");

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

    {
        const ::QWebEngineScript* a0;
        ::QWebEngineScriptCollection *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const QList< ::QWebEngineScript>* a0;
        int a0State = 0;
        ::QWebEngineScriptCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebEngineScriptCollection, &sipCpp, sipType_QList_0100QWebEngineScript, &a0, &a0State))
        {
            sipCpp->insert(*a0);
            sipReleaseType(const_cast<QList< ::QWebEngineScript> *>(a0), sipType_QList_0100QWebEngineScript, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_insert, doc_QWebEngineScriptCollection_insert);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_remove, "remove(self, a0: QWebEngineScript) -> bool");

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

    {
        const ::QWebEngineScript* a0;
        ::QWebEngineScriptCollection *sipCpp;

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

            sipRes = sipCpp->remove(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_remove, doc_QWebEngineScriptCollection_remove);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_clear, "clear(self)");

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

    {
        ::QWebEngineScriptCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScriptCollection, &sipCpp))
        {
            sipCpp->clear();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_clear, doc_QWebEngineScriptCollection_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_toList, "toList(self) -> list[QWebEngineScript]");

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

    {
        const ::QWebEngineScriptCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineScriptCollection, &sipCpp))
        {
            QList< ::QWebEngineScript>*sipRes;

            sipRes = new QList< ::QWebEngineScript>(sipCpp->toList());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_toList, doc_QWebEngineScriptCollection_toList);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineScriptCollection_find, "find(self, name: str|None) -> list[QWebEngineScript]");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebEngineScriptCollection, &sipCpp, sipType_QString, &a0, &a0State))
        {
            QList< ::QWebEngineScript>*sipRes;

            sipRes = new QList< ::QWebEngineScript>(sipCpp->find(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QWebEngineScriptCollection, sipName_find, doc_QWebEngineScriptCollection_find);

    return SIP_NULLPTR;
}


extern "C" {static Py_ssize_t slot_QWebEngineScriptCollection___len__(PyObject *);}
static Py_ssize_t slot_QWebEngineScriptCollection___len__(PyObject *sipSelf)
{
    ::QWebEngineScriptCollection *sipCpp = reinterpret_cast< ::QWebEngineScriptCollection *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebEngineScriptCollection));

    if (!sipCpp)
        return 0;


    {
        {
            Py_ssize_t sipRes = 0;

#line 1 "Auto-generated"
            sipRes = (Py_ssize_t)sipCpp->count();
#line 285 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineScriptCollection.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


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


/* Define this type's Python slots. */
static sipPySlotDef slots_QWebEngineScriptCollection[] = {
    {(void *)slot_QWebEngineScriptCollection___len__, len_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QWebEngineScriptCollection[] = {
    {sipName_clear, meth_QWebEngineScriptCollection_clear, METH_VARARGS, doc_QWebEngineScriptCollection_clear},
    {sipName_contains, meth_QWebEngineScriptCollection_contains, METH_VARARGS, doc_QWebEngineScriptCollection_contains},
    {sipName_count, meth_QWebEngineScriptCollection_count, METH_VARARGS, doc_QWebEngineScriptCollection_count},
    {sipName_find, meth_QWebEngineScriptCollection_find, METH_VARARGS, doc_QWebEngineScriptCollection_find},
    {sipName_insert, meth_QWebEngineScriptCollection_insert, METH_VARARGS, doc_QWebEngineScriptCollection_insert},
    {sipName_isEmpty, meth_QWebEngineScriptCollection_isEmpty, METH_VARARGS, doc_QWebEngineScriptCollection_isEmpty},
    {sipName_remove, meth_QWebEngineScriptCollection_remove, METH_VARARGS, doc_QWebEngineScriptCollection_remove},
    {sipName_toList, meth_QWebEngineScriptCollection_toList, METH_VARARGS, doc_QWebEngineScriptCollection_toList}
};


sipClassTypeDef sipTypeDef_QtWebEngineCore_QWebEngineScriptCollection = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEngineScriptCollection,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QWebEngineScriptCollection,
        {0, 0, 1},
        8, methods_QWebEngineScriptCollection,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QWebEngineScriptCollection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebEngineScriptCollection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QWebEngineScriptCollection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
