/*
 * 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 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 29 "/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/sipQtGuiQTextFragment.cpp"

#line 38 "sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 33 "/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/sipQtGuiQTextFragment.cpp"
#line 28 "/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/qglyphrun.sip"
#include <qglyphrun.h>
#line 36 "/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/sipQtGuiQTextFragment.cpp"
#line 27 "sip/QtCore/qstring.sip"
#include <qstring.h>
#line 39 "/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/sipQtGuiQTextFragment.cpp"
#line 318 "/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/qtextformat.sip"
#include <qtextformat.h>
#line 42 "/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/sipQtGuiQTextFragment.cpp"


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

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

    {
        const  ::QTextFragment *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_isValid, doc_QTextFragment_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_position, "position(self) -> int");

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

    {
        const  ::QTextFragment *sipCpp;

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

            sipRes = sipCpp->position();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_position, doc_QTextFragment_position);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_length, "length(self) -> int");

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

    {
        const  ::QTextFragment *sipCpp;

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

            sipRes = sipCpp->length();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_length, doc_QTextFragment_length);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_contains, "contains(self, int) -> bool");

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

    {
        int a0;
        const  ::QTextFragment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QTextFragment, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->contains(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_contains, doc_QTextFragment_contains);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_charFormat, "charFormat(self) -> QTextCharFormat");

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

    {
        const  ::QTextFragment *sipCpp;

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

            sipRes = new  ::QTextCharFormat(sipCpp->charFormat());

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

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_charFormat, doc_QTextFragment_charFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_charFormatIndex, "charFormatIndex(self) -> int");

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

    {
        const  ::QTextFragment *sipCpp;

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

            sipRes = sipCpp->charFormatIndex();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_charFormatIndex, doc_QTextFragment_charFormatIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_text, "text(self) -> str");

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

    {
        const  ::QTextFragment *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_text, doc_QTextFragment_text);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextFragment_glyphRuns, "glyphRuns(self, from_: int = -1, length: int = -1) -> List[QGlyphRun]");

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

    {
        int a0 = -1;
        int a1 = -1;
        const  ::QTextFragment *sipCpp;

        static const char *sipKwdList[] = {
            sipName_from,
            sipName_length,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|ii", &sipSelf, sipType_QTextFragment, &sipCpp, &a0, &a1))
        {
            QList< ::QGlyphRun>*sipRes;

            sipRes = new QList< ::QGlyphRun>(sipCpp->glyphRuns(a0,a1));

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

    sipNoMethod(sipParseErr, sipName_QTextFragment, sipName_glyphRuns, doc_QTextFragment_glyphRuns);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QTextFragment___ge__(PyObject *,PyObject *);}
static PyObject *slot_QTextFragment___ge__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFragment *sipCpp = reinterpret_cast< ::QTextFragment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFragment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFragment* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, ge_slot, sipType_QTextFragment, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QTextFragment___lt__(PyObject *,PyObject *);}
static PyObject *slot_QTextFragment___lt__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFragment *sipCpp = reinterpret_cast< ::QTextFragment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFragment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFragment* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, lt_slot, sipType_QTextFragment, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QTextFragment___ne__(PyObject *,PyObject *);}
static PyObject *slot_QTextFragment___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFragment *sipCpp = reinterpret_cast< ::QTextFragment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFragment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFragment* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


extern "C" {static PyObject *slot_QTextFragment___eq__(PyObject *,PyObject *);}
static PyObject *slot_QTextFragment___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextFragment *sipCpp = reinterpret_cast< ::QTextFragment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextFragment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextFragment* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTextFragment* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QTextFragment[] = {
    {(void *)slot_QTextFragment___ge__, ge_slot},
    {(void *)slot_QTextFragment___lt__, lt_slot},
    {(void *)slot_QTextFragment___ne__, ne_slot},
    {(void *)slot_QTextFragment___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QTextFragment[] = {
    {SIP_MLNAME_CAST(sipName_charFormat), meth_QTextFragment_charFormat, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_charFormat)},
    {SIP_MLNAME_CAST(sipName_charFormatIndex), meth_QTextFragment_charFormatIndex, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_charFormatIndex)},
    {SIP_MLNAME_CAST(sipName_contains), meth_QTextFragment_contains, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_contains)},
    {SIP_MLNAME_CAST(sipName_glyphRuns), SIP_MLMETH_CAST(meth_QTextFragment_glyphRuns), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextFragment_glyphRuns)},
    {SIP_MLNAME_CAST(sipName_isValid), meth_QTextFragment_isValid, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_isValid)},
    {SIP_MLNAME_CAST(sipName_length), meth_QTextFragment_length, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_length)},
    {SIP_MLNAME_CAST(sipName_position), meth_QTextFragment_position, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_position)},
    {SIP_MLNAME_CAST(sipName_text), meth_QTextFragment_text, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextFragment_text)}
};

PyDoc_STRVAR(doc_QTextFragment, "\1QTextFragment()\n"
"QTextFragment(QTextFragment)");


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


sipClassTypeDef sipTypeDef_QtGui_QTextFragment = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextFragment,
        {SIP_NULLPTR},
        &plugin_QTextFragment
    },
    {
        sipNameNr_QTextFragment,
        {0, 0, 1},
        8, methods_QTextFragment,
        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_QTextFragment,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QTextFragment,
    init_type_QTextFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QTextFragment,
    assign_QTextFragment,
    array_QTextFragment,
    copy_QTextFragment,
    release_QTextFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
