/*
 * 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 "sipAPIQtWidgets.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/QtWidgets/qtextedit.sip"
#include <qtextedit.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/sip/QtWidgets/qtextedit.sip"
#include <qtextedit.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/QtWidgets/sipQtWidgetsQTextEditExtraSelection.cpp"

#line 26 "sip/QtGui/qtextcursor.sip"
#include <qtextcursor.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/QtWidgets/sipQtWidgetsQTextEditExtraSelection.cpp"
#line 318 "sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 38 "/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/QtWidgets/sipQtWidgetsQTextEditExtraSelection.cpp"


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


extern "C" {static void *array_QTextEdit_ExtraSelection(Py_ssize_t);}
static void *array_QTextEdit_ExtraSelection(Py_ssize_t sipNrElem)
{
    return new  ::QTextEdit::ExtraSelection[sipNrElem];
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTextEdit::ExtraSelection* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QTextEdit_ExtraSelection_cursor(void *, PyObject *, PyObject *);}
static PyObject *varget_QTextEdit_ExtraSelection_cursor(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QTextCursor*sipVal;
     ::QTextEdit::ExtraSelection *sipCpp = reinterpret_cast< ::QTextEdit::ExtraSelection *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -59);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->cursor;

    sipPy = sipConvertFromType(sipVal, sipType_QTextCursor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -5, sipPySelf);
        sipKeepReference(sipPySelf, -59, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QTextEdit_ExtraSelection_cursor(void *, PyObject *, PyObject *);}
static int varset_QTextEdit_ExtraSelection_cursor(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QTextCursor*sipVal;
     ::QTextEdit::ExtraSelection *sipCpp = reinterpret_cast< ::QTextEdit::ExtraSelection *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QTextCursor *>(sipForceConvertToType(sipPy, sipType_QTextCursor, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->cursor = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QTextEdit_ExtraSelection_format(void *, PyObject *, PyObject *);}
static PyObject *varget_QTextEdit_ExtraSelection_format(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QTextCharFormat*sipVal;
     ::QTextEdit::ExtraSelection *sipCpp = reinterpret_cast< ::QTextEdit::ExtraSelection *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -60);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->format;

    sipPy = sipConvertFromType(sipVal, sipType_QTextCharFormat, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -6, sipPySelf);
        sipKeepReference(sipPySelf, -60, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QTextEdit_ExtraSelection_format(void *, PyObject *, PyObject *);}
static int varset_QTextEdit_ExtraSelection_format(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QTextCharFormat*sipVal;
     ::QTextEdit::ExtraSelection *sipCpp = reinterpret_cast< ::QTextEdit::ExtraSelection *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QTextCharFormat *>(sipForceConvertToType(sipPy, sipType_QTextCharFormat, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->format = *sipVal;

    return 0;
}

sipVariableDef variables_QTextEdit_ExtraSelection[] = {
    {InstanceVariable, sipName_cursor, (PyMethodDef *)varget_QTextEdit_ExtraSelection_cursor, (PyMethodDef *)varset_QTextEdit_ExtraSelection_cursor, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_format, (PyMethodDef *)varget_QTextEdit_ExtraSelection_format, (PyMethodDef *)varset_QTextEdit_ExtraSelection_format, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QTextEdit_ExtraSelection, "\1QTextEdit.ExtraSelection()\n"
"QTextEdit.ExtraSelection(QTextEdit.ExtraSelection)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QTextEdit_ExtraSelection = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextEdit__ExtraSelection,
        {SIP_NULLPTR},
        &plugin_QTextEdit_ExtraSelection
    },
    {
        sipNameNr_ExtraSelection,
        {438, 255, 0},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        2, variables_QTextEdit_ExtraSelection,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTextEdit_ExtraSelection,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QTextEdit_ExtraSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QTextEdit_ExtraSelection,
    assign_QTextEdit_ExtraSelection,
    array_QTextEdit_ExtraSelection,
    copy_QTextEdit_ExtraSelection,
    release_QTextEdit_ExtraSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
