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

#line 24 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/sip/qscistyledtext.sip"
#include <Qsci/qscistyledtext.h>
#line 29 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciStyledText.cpp"

#line 24 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciStyledText.cpp"
#line 24 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/sip/qscistyle.sip"
#include <Qsci/qscistyle.h>
#line 36 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciStyledText.cpp"


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

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

    {
        ::QsciStyledText *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QsciStyledText, sipName_text, doc_QsciStyledText_text);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciStyledText_style, "style(self) -> int");

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

    {
        const ::QsciStyledText *sipCpp;

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

            sipRes = sipCpp->style();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciStyledText, sipName_style, doc_QsciStyledText_style);

    return SIP_NULLPTR;
}


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


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


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


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


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

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1i", sipType_QString, &a0, &a0State, &a1))
        {
            sipCpp = new ::QsciStyledText(*a0, a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipCpp;
        }
    }

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1J9", sipType_QString, &a0, &a0State, sipType_QsciStyle, &a1))
        {
            sipCpp = new ::QsciStyledText(*a0, *a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipCpp;
        }
    }

    {
        const ::QsciStyledText* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QsciStyledText[] = {
    {sipName_style, meth_QsciStyledText_style, METH_VARARGS, doc_QsciStyledText_style},
    {sipName_text, meth_QsciStyledText_text, METH_VARARGS, doc_QsciStyledText_text}
};

PyDoc_STRVAR(doc_QsciStyledText, "\1QsciStyledText(text: str|None, style: int)\n"
"QsciStyledText(text: str|None, style: QsciStyle)\n"
"QsciStyledText(a0: QsciStyledText)");


sipClassTypeDef sipTypeDef_Qsci_QsciStyledText = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QsciStyledText,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QsciStyledText,
        {0, 0, 1},
        2, methods_QsciStyledText,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QsciStyledText,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QsciStyledText,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QsciStyledText,
    assign_QsciStyledText,
    SIP_NULLPTR,
    copy_QsciStyledText,
    release_QsciStyledText,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QsciStyledText),
};
