/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 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 118 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 143 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 31 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextBlockiterator.cpp"

#line 224 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 35 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextBlockiterator.cpp"


PyDoc_STRVAR(doc_QTextBlock_iterator_fragment, "fragment(self) -> QTextFragment");

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

    {
        const  ::QTextBlock::iterator *sipCpp;

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

            sipRes = new  ::QTextFragment(sipCpp->fragment());

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

    sipNoMethod(sipParseErr, sipName_iterator, sipName_fragment, doc_QTextBlock_iterator_fragment);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QTextBlock::iterator *sipCpp;

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

            sipRes = sipCpp->atEnd();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_iterator, sipName_atEnd, doc_QTextBlock_iterator_atEnd);

    return SIP_NULLPTR;
}


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

     ::QTextBlock::iterator *sipCpp = reinterpret_cast< ::QTextBlock::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextBlock_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
#line 165 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
            if (a0 > 0)
                while (a0--)
                    (*sipCpp)--;
            else if (a0 < 0)
                while (a0++)
                    (*sipCpp)++;
#line 120 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextBlockiterator.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_QTextBlock_iterator___iadd__(PyObject *,PyObject *);}
static PyObject *slot_QTextBlock_iterator___iadd__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QTextBlock_iterator)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::QTextBlock::iterator *sipCpp = reinterpret_cast< ::QTextBlock::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextBlock_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
#line 155 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
            if (a0 > 0)
                while (a0--)
                    (*sipCpp)++;
            else if (a0 < 0)
                while (a0++)
                    (*sipCpp)--;
#line 167 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextBlockiterator.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_QTextBlock_iterator___ne__(PyObject *,PyObject *);}
static PyObject *slot_QTextBlock_iterator___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextBlock::iterator *sipCpp = reinterpret_cast< ::QTextBlock::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextBlock_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextBlock::iterator* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


extern "C" {static PyObject *slot_QTextBlock_iterator___eq__(PyObject *,PyObject *);}
static PyObject *slot_QTextBlock_iterator___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextBlock::iterator *sipCpp = reinterpret_cast< ::QTextBlock::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextBlock_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextBlock::iterator* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


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


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


extern "C" {static void assign_QTextBlock_iterator(void *, SIP_SSIZE_T, void *);}
static void assign_QTextBlock_iterator(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QTextBlock::iterator *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QTextBlock::iterator *>(sipSrc);
}


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTextBlock::iterator* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QTextBlock_iterator[] = {
    {(void *)slot_QTextBlock_iterator___isub__, isub_slot},
    {(void *)slot_QTextBlock_iterator___iadd__, iadd_slot},
    {(void *)slot_QTextBlock_iterator___ne__, ne_slot},
    {(void *)slot_QTextBlock_iterator___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QTextBlock_iterator[] = {
    {SIP_MLNAME_CAST(sipName_atEnd), meth_QTextBlock_iterator_atEnd, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextBlock_iterator_atEnd)},
    {SIP_MLNAME_CAST(sipName_fragment), meth_QTextBlock_iterator_fragment, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextBlock_iterator_fragment)}
};

PyDoc_STRVAR(doc_QTextBlock_iterator, "\1QTextBlock.iterator()\n"
"QTextBlock.iterator(QTextBlock.iterator)");


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


sipClassTypeDef sipTypeDef_QtGui_QTextBlock_iterator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextBlock__iterator,
        {SIP_NULLPTR},
        &plugin_QTextBlock_iterator
    },
    {
        sipNameNr_iterator,
        {287, 255, 0},
        2, methods_QTextBlock_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_QTextBlock_iterator,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QTextBlock_iterator,
    init_type_QTextBlock_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QTextBlock_iterator,
    assign_QTextBlock_iterator,
    array_QTextBlock_iterator,
    copy_QTextBlock_iterator,
    release_QTextBlock_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
