/*
 * 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 28 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebengineframe.sip"
#include <qwebengineframe.h>
#line 29 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"

#line 24 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
#line 114 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qsize.sip"
#include <qsize.h>
#line 36 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qurl.sip"
#include <qurl.h>
#line 39 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
#line 28 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 42 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
#line 32 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebengineframe.sip"
#include <QVariant>
#line 45 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"


PyDoc_STRVAR(doc_QWebEngineFrame_isValid, "isValid(self) -> bool");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_isValid, doc_QWebEngineFrame_isValid);

    return SIP_NULLPTR;
}


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

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

    {
        const ::QWebEngineFrame *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_name, doc_QWebEngineFrame_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_htmlName, "htmlName(self) -> str");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_htmlName, doc_QWebEngineFrame_htmlName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_children, "children(self) -> list[QWebEngineFrame]");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

            sipRes = new QList< ::QWebEngineFrame>(sipCpp->children());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_children, doc_QWebEngineFrame_children);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_url, "url(self) -> QUrl");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

            sipRes = new ::QUrl(sipCpp->url());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_url, doc_QWebEngineFrame_url);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_size, "size(self) -> QSizeF");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

            sipRes = new ::QSizeF(sipCpp->size());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_size, doc_QWebEngineFrame_size);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_isMainFrame, "isMainFrame(self) -> bool");

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

    {
        const ::QWebEngineFrame *sipCpp;

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

            sipRes = sipCpp->isMainFrame();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_isMainFrame, doc_QWebEngineFrame_isMainFrame);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_runJavaScript, "runJavaScript(self, script: str|None, worldId: int = 0)\n"
"runJavaScript(self, script: str|None, callback: Callable[[Any], None])\n"
"runJavaScript(self, script: str|None, worldId: int, callback: Callable[[Any], None])");

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

    {
        const ::QString* a0;
        int a0State = 0;
        ::quint32 a1 = 0;
        ::QWebEngineFrame *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_worldId,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|u", &sipSelf, sipType_QWebEngineFrame, &sipCpp, sipType_QString, &a0, &a0State, &a1))
        {
            sipCpp->runJavaScript(*a0, a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;
        PyObject * a1;
        ::QWebEngineFrame *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ1F", &sipSelf, sipType_QWebEngineFrame, &sipCpp, sipType_QString, &a0, &a0State, &a1))
        {
#line 49 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebengineframe.sip"
        // Make sure the callable doesn't get garbage collected until it is invoked.
        Py_INCREF(a1);
        
        Py_BEGIN_ALLOW_THREADS
        
        sipCpp->runJavaScript(*a0, [a1](const QVariant &arg) {
            SIP_BLOCK_THREADS
        
            PyObject *res;
        
            res = sipCallMethod(NULL, a1, "N", new QVariant(arg), sipType_QVariant, NULL);
        
            Py_DECREF(a1);
        
            if (!res)
                pyqt6_qtwebenginecore_err_print();
            else
                Py_DECREF(res);
        
            SIP_UNBLOCK_THREADS
        });
        
        Py_END_ALLOW_THREADS
#line 292 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;
        ::quint32 a1;
        PyObject * a2;
        ::QWebEngineFrame *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ1uF", &sipSelf, sipType_QWebEngineFrame, &sipCpp, sipType_QString, &a0, &a0State, &a1, &a2))
        {
#line 76 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebengineframe.sip"
        // Make sure the callable doesn't get garbage collected until it is invoked.
        Py_INCREF(a2);
        
        Py_BEGIN_ALLOW_THREADS
        
        sipCpp->runJavaScript(*a0, a1, [a2](const QVariant &arg) {
            SIP_BLOCK_THREADS
        
            PyObject *res;
        
            res = sipCallMethod(NULL, a2, "N", new QVariant(arg), sipType_QVariant, NULL);
        
            Py_DECREF(a2);
        
            if (!res)
                pyqt6_qtwebenginecore_err_print();
            else
                Py_DECREF(res);
        
            SIP_UNBLOCK_THREADS
        });
        
        Py_END_ALLOW_THREADS
#line 333 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_runJavaScript, doc_QWebEngineFrame_runJavaScript);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineFrame_printToPdf, "printToPdf(self, filePath: str|None)\n"
"printToPdf(self, callback: Callable[[QByteArray|bytes|bytearray|memoryview], None])");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        PyObject * a0;
        ::QWebEngineFrame *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BF", &sipSelf, sipType_QWebEngineFrame, &sipCpp, &a0))
        {
#line 104 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebengineframe.sip"
        // Make sure the callable doesn't get garbage collected until it is invoked.
        Py_INCREF(a0);
        
        Py_BEGIN_ALLOW_THREADS
        
        sipCpp->printToPdf([a0](const QByteArray &arg) {
            SIP_BLOCK_THREADS
            
            PyObject *res;
        
            res = sipCallMethod(NULL, a0, "N", new QByteArray(arg), sipType_QByteArray, NULL);
        
            Py_DECREF(a0);
        
            if (!res)
                pyqt6_qtwebenginecore_err_print();
            else
                Py_DECREF(res);
        
            SIP_UNBLOCK_THREADS
        });
        
        Py_END_ALLOW_THREADS
#line 400 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineFrame.cpp"

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineFrame, sipName_printToPdf, doc_QWebEngineFrame_printToPdf);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QWebEngineFrame___eq__(PyObject *, PyObject *);}
static PyObject *slot_QWebEngineFrame___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebEngineFrame *sipCpp = reinterpret_cast< ::QWebEngineFrame *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebEngineFrame));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebEngineFrame* a0;

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

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineCore, eq_slot, sipType_QWebEngineFrame, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QWebEngineFrame___ne__(PyObject *, PyObject *);}
static PyObject *slot_QWebEngineFrame___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebEngineFrame *sipCpp = reinterpret_cast< ::QWebEngineFrame *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebEngineFrame));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebEngineFrame* a0;

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

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineCore, ne_slot, sipType_QWebEngineFrame, sipSelf, sipArg);
}


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


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


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


static PyMethodDef methods_QWebEngineFrame[] = {
    {sipName_children, meth_QWebEngineFrame_children, METH_VARARGS, doc_QWebEngineFrame_children},
    {sipName_htmlName, meth_QWebEngineFrame_htmlName, METH_VARARGS, doc_QWebEngineFrame_htmlName},
    {sipName_isMainFrame, meth_QWebEngineFrame_isMainFrame, METH_VARARGS, doc_QWebEngineFrame_isMainFrame},
    {sipName_isValid, meth_QWebEngineFrame_isValid, METH_VARARGS, doc_QWebEngineFrame_isValid},
    {sipName_name, meth_QWebEngineFrame_name, METH_VARARGS, doc_QWebEngineFrame_name},
    {sipName_printToPdf, meth_QWebEngineFrame_printToPdf, METH_VARARGS, doc_QWebEngineFrame_printToPdf},
    {sipName_runJavaScript, SIP_MLMETH_CAST(meth_QWebEngineFrame_runJavaScript), METH_VARARGS|METH_KEYWORDS, doc_QWebEngineFrame_runJavaScript},
    {sipName_size, meth_QWebEngineFrame_size, METH_VARARGS, doc_QWebEngineFrame_size},
    {sipName_url, meth_QWebEngineFrame_url, METH_VARARGS, doc_QWebEngineFrame_url}
};


sipClassTypeDef sipTypeDef_QtWebEngineCore_QWebEngineFrame = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEngineFrame,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QWebEngineFrame,
        {0, 0, 1},
        9, methods_QWebEngineFrame,
        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_QWebEngineFrame,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebEngineFrame,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QWebEngineFrame,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
