/*
 * 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 26 "/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/qtextdocumentfragment.sip"
#include <qtextdocumentfragment.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/sipQtGuiQTextDocumentFragment.cpp"

#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/sip/QtGui/qtextdocument.sip"
#include <qtextdocument.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/sipQtGuiQTextDocumentFragment.cpp"
#line 26 "/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/qtextcursor.sip"
#include <qtextcursor.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/sipQtGuiQTextDocumentFragment.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/sipQtGuiQTextDocumentFragment.cpp"
#line 30 "sip/QtCore/qbytearray.sip"
#include <qbytearray.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/sipQtGuiQTextDocumentFragment.cpp"


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

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

    {
        const  ::QTextDocumentFragment *sipCpp;

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

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocumentFragment, sipName_isEmpty, doc_QTextDocumentFragment_isEmpty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocumentFragment_toPlainText, "toPlainText(self) -> str");

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

    {
        const  ::QTextDocumentFragment *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QTextDocumentFragment, sipName_toPlainText, doc_QTextDocumentFragment_toPlainText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocumentFragment_toHtml, "toHtml(self, encoding: Union[QByteArray, bytes, bytearray] = QByteArray()) -> str");

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

    {
        const  ::QByteArray& a0def = QByteArray();
        const  ::QByteArray* a0 = &a0def;
        int a0State = 0;
        const  ::QTextDocumentFragment *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QTextDocumentFragment, &sipCpp, sipType_QByteArray, &a0, &a0State))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->toHtml(*a0));
            sipReleaseType(const_cast< ::QByteArray *>(a0),sipType_QByteArray,a0State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocumentFragment, sipName_toHtml, doc_QTextDocumentFragment_toHtml);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocumentFragment_fromPlainText, "fromPlainText(str) -> QTextDocumentFragment");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString,&a0, &a0State))
        {
             ::QTextDocumentFragment*sipRes;

            sipRes = new  ::QTextDocumentFragment( ::QTextDocumentFragment::fromPlainText(*a0));
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocumentFragment, sipName_fromPlainText, doc_QTextDocumentFragment_fromPlainText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocumentFragment_fromHtml, "fromHtml(str) -> QTextDocumentFragment\n"
"fromHtml(str, QTextDocument) -> QTextDocumentFragment");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString,&a0, &a0State))
        {
             ::QTextDocumentFragment*sipRes;

            sipRes = new  ::QTextDocumentFragment( ::QTextDocumentFragment::fromHtml(*a0));
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

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

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QTextDocument* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1J8", sipType_QString,&a0, &a0State, sipType_QTextDocument, &a1))
        {
             ::QTextDocumentFragment*sipRes;

            sipRes = new  ::QTextDocumentFragment( ::QTextDocumentFragment::fromHtml(*a0,a1));
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocumentFragment, sipName_fromHtml, doc_QTextDocumentFragment_fromHtml);

    return SIP_NULLPTR;
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTextDocument* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J8", sipType_QTextDocument, &a0))
        {
            sipCpp = new  ::QTextDocumentFragment(a0);

            return sipCpp;
        }
    }

    {
        const  ::QTextCursor* a0;

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

            return sipCpp;
        }
    }

    {
        const  ::QTextDocumentFragment* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QTextDocumentFragment[] = {
    {SIP_MLNAME_CAST(sipName_fromHtml), meth_QTextDocumentFragment_fromHtml, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocumentFragment_fromHtml)},
    {SIP_MLNAME_CAST(sipName_fromPlainText), meth_QTextDocumentFragment_fromPlainText, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocumentFragment_fromPlainText)},
    {SIP_MLNAME_CAST(sipName_isEmpty), meth_QTextDocumentFragment_isEmpty, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocumentFragment_isEmpty)},
    {SIP_MLNAME_CAST(sipName_toHtml), SIP_MLMETH_CAST(meth_QTextDocumentFragment_toHtml), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocumentFragment_toHtml)},
    {SIP_MLNAME_CAST(sipName_toPlainText), meth_QTextDocumentFragment_toPlainText, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocumentFragment_toPlainText)}
};

PyDoc_STRVAR(doc_QTextDocumentFragment, "\1QTextDocumentFragment()\n"
"QTextDocumentFragment(QTextDocument)\n"
"QTextDocumentFragment(QTextCursor)\n"
"QTextDocumentFragment(QTextDocumentFragment)");


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


sipClassTypeDef sipTypeDef_QtGui_QTextDocumentFragment = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextDocumentFragment,
        {SIP_NULLPTR},
        &plugin_QTextDocumentFragment
    },
    {
        sipNameNr_QTextDocumentFragment,
        {0, 0, 1},
        5, methods_QTextDocumentFragment,
        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_QTextDocumentFragment,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QTextDocumentFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QTextDocumentFragment,
    assign_QTextDocumentFragment,
    array_QTextDocumentFragment,
    copy_QTextDocumentFragment,
    release_QTextDocumentFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
