/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtGui.h"

#line 59 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 76 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextFrameiterator.cpp"

#line 118 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextFrameiterator.cpp"
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextFrameiterator.cpp"


PyDoc_STRVAR(doc_QTextFrame_iterator_parentFrame, "parentFrame(self) -> QTextFrame");

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

    {
        const  ::QTextFrame::iterator *sipCpp;

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

            sipRes = sipCpp->parentFrame();

            return sipConvertFromType(sipRes,sipType_QTextFrame,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_iterator, sipName_parentFrame, doc_QTextFrame_iterator_parentFrame);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFrame_iterator_currentFrame, "currentFrame(self) -> QTextFrame");

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

    {
        const  ::QTextFrame::iterator *sipCpp;

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

            sipRes = sipCpp->currentFrame();

            return sipConvertFromType(sipRes,sipType_QTextFrame,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_iterator, sipName_currentFrame, doc_QTextFrame_iterator_currentFrame);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFrame_iterator_currentBlock, "currentBlock(self) -> QTextBlock");

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

    {
        const  ::QTextFrame::iterator *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->currentBlock());

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

    sipNoMethod(sipParseErr, sipName_iterator, sipName_currentBlock, doc_QTextFrame_iterator_currentBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFrame_iterator_atEnd, "atEnd(self) -> bool");

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

    {
        const  ::QTextFrame::iterator *sipCpp;

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

            sipRes = sipCpp->atEnd();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_iterator, sipName_atEnd, doc_QTextFrame_iterator_atEnd);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QTextFrame_iterator___isub__(PyObject *,PyObject *);}
static PyObject *slot_QTextFrame_iterator___isub__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QTextFrame_iterator)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::QTextFrame::iterator *sipCpp = reinterpret_cast< ::QTextFrame::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFrame_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
#line 100 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
            if (a0 > 0)
                while (a0--)
                    (*sipCpp)--;
            else if (a0 < 0)
                while (a0++)
                    (*sipCpp)++;
#line 177 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextFrameiterator.cpp"

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_QTextFrame_iterator___iadd__(PyObject *,PyObject *);}
static PyObject *slot_QTextFrame_iterator___iadd__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QTextFrame_iterator)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::QTextFrame::iterator *sipCpp = reinterpret_cast< ::QTextFrame::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFrame_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
#line 90 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
            if (a0 > 0)
                while (a0--)
                    (*sipCpp)++;
            else if (a0 < 0)
                while (a0++)
                    (*sipCpp)--;
#line 224 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextFrameiterator.cpp"

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_QTextFrame_iterator___ne__(PyObject *,PyObject *);}
static PyObject *slot_QTextFrame_iterator___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFrame::iterator *sipCpp = reinterpret_cast< ::QTextFrame::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFrame_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFrame::iterator* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, ne_slot, sipType_QTextFrame_iterator, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QTextFrame_iterator___eq__(PyObject *,PyObject *);}
static PyObject *slot_QTextFrame_iterator___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFrame::iterator *sipCpp = reinterpret_cast< ::QTextFrame::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFrame_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFrame::iterator* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, eq_slot, sipType_QTextFrame_iterator, sipSelf, sipArg);
}


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


extern "C" {static void *array_QTextFrame_iterator(Py_ssize_t);}
static void *array_QTextFrame_iterator(Py_ssize_t sipNrElem)
{
    return new  ::QTextFrame::iterator[sipNrElem];
}


extern "C" {static void array_delete_QTextFrame_iterator(void *);}
static void array_delete_QTextFrame_iterator(void *sipCpp)
{
    delete[] reinterpret_cast< ::QTextFrame::iterator *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTextFrame::iterator* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QTextFrame_iterator[] = {
    {(void *)slot_QTextFrame_iterator___isub__, isub_slot},
    {(void *)slot_QTextFrame_iterator___iadd__, iadd_slot},
    {(void *)slot_QTextFrame_iterator___ne__, ne_slot},
    {(void *)slot_QTextFrame_iterator___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QTextFrame_iterator[] = {
    {sipName_atEnd, meth_QTextFrame_iterator_atEnd, METH_VARARGS, doc_QTextFrame_iterator_atEnd},
    {sipName_currentBlock, meth_QTextFrame_iterator_currentBlock, METH_VARARGS, doc_QTextFrame_iterator_currentBlock},
    {sipName_currentFrame, meth_QTextFrame_iterator_currentFrame, METH_VARARGS, doc_QTextFrame_iterator_currentFrame},
    {sipName_parentFrame, meth_QTextFrame_iterator_parentFrame, METH_VARARGS, doc_QTextFrame_iterator_parentFrame}
};

PyDoc_STRVAR(doc_QTextFrame_iterator, "\1QTextFrame.iterator()\n"
"QTextFrame.iterator(QTextFrame.iterator)");


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


sipClassTypeDef sipTypeDef_QtGui_QTextFrame_iterator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextFrame__iterator,
        SIP_NULLPTR,
        &plugin_QTextFrame_iterator
    },
    {
        sipNameNr_iterator,
        {323, 255, 0},
        4, methods_QTextFrame_iterator,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTextFrame_iterator,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QTextFrame_iterator,
    init_type_QTextFrame_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QTextFrame_iterator,
    assign_QTextFrame_iterator,
    array_QTextFrame_iterator,
    copy_QTextFrame_iterator,
    release_QTextFrame_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QTextFrame_iterator,
    sizeof ( ::QTextFrame::iterator),
};
