/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qsyntaxhighlighter.sip"
#include <qsyntaxhighlighter.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"

#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextdocument.sip"
#include <qtextdocument.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 118 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 248 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 318 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qfont.sip"
#include <qfont.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 92 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 95 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 98 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 101 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"


class sipQSyntaxHighlighter : public  ::QSyntaxHighlighter
{
public:
    sipQSyntaxHighlighter( ::QTextDocument*);
    sipQSyntaxHighlighter( ::QObject*);
    virtual ~sipQSyntaxHighlighter();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void highlightBlock(const  ::QString&) SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSyntaxHighlighter(const sipQSyntaxHighlighter &);
    sipQSyntaxHighlighter &operator = (const sipQSyntaxHighlighter &);

    char sipPyMethods[8];
};

sipQSyntaxHighlighter::sipQSyntaxHighlighter( ::QTextDocument*a0):  ::QSyntaxHighlighter(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSyntaxHighlighter::sipQSyntaxHighlighter( ::QObject*a0):  ::QSyntaxHighlighter(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSyntaxHighlighter::~sipQSyntaxHighlighter()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQSyntaxHighlighter::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtGui_qt_metaobject(sipPySelf,sipType_QSyntaxHighlighter);

    return  ::QSyntaxHighlighter::metaObject();
}

int sipQSyntaxHighlighter::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QSyntaxHighlighter::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtGui_qt_metacall(sipPySelf,sipType_QSyntaxHighlighter,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQSyntaxHighlighter::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtGui_qt_metacast(sipPySelf, sipType_QSyntaxHighlighter, _clname, &sipCpp) ? sipCpp :  ::QSyntaxHighlighter::qt_metacast(_clname));
}

void sipQSyntaxHighlighter::highlightBlock(const  ::QString& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QSyntaxHighlighter, sipName_highlightBlock);

    if (!sipMeth)
        return;

    extern void sipVH_QtGui_103(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QString&);

    sipVH_QtGui_103(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSyntaxHighlighter::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QSyntaxHighlighter::event(a0);

    extern bool sipVH_QtGui_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtGui_5(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSyntaxHighlighter::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QSyntaxHighlighter::eventFilter(a0,a1);

    extern bool sipVH_QtGui_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtGui_4(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQSyntaxHighlighter::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QSyntaxHighlighter::timerEvent(a0);
        return;
    }

    extern void sipVH_QtGui_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtGui_3(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSyntaxHighlighter::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QSyntaxHighlighter::childEvent(a0);
        return;
    }

    extern void sipVH_QtGui_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtGui_2(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSyntaxHighlighter::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QSyntaxHighlighter::customEvent(a0);
        return;
    }

    extern void sipVH_QtGui_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtGui_1(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSyntaxHighlighter::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QSyntaxHighlighter::connectNotify(a0);
        return;
    }

    extern void sipVH_QtGui_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtGui_0(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSyntaxHighlighter::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QSyntaxHighlighter::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtGui_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtGui_0(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_setDocument, "setDocument(self, QTextDocument)");

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

    {
         ::QTextDocument* a0;
        PyObject *a0Keep;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0Keep, sipType_QTextDocument, &a0))
        {
            sipCpp->setDocument(a0);

            sipKeepReference(sipSelf, -3, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_setDocument, doc_QSyntaxHighlighter_setDocument);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_document, "document(self) -> QTextDocument");

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

    {
        const  ::QSyntaxHighlighter *sipCpp;

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

            sipRes = sipCpp->document();

            return sipConvertFromType(sipRes,sipType_QTextDocument,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_document, doc_QSyntaxHighlighter_document);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_rehighlight, "rehighlight(self)");

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

    {
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp))
        {
            sipCpp->rehighlight();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_rehighlight, doc_QSyntaxHighlighter_rehighlight);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_rehighlightBlock, "rehighlightBlock(self, QTextBlock)");

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

    {
        const  ::QTextBlock* a0;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, sipType_QTextBlock, &a0))
        {
            sipCpp->rehighlightBlock(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_rehighlightBlock, doc_QSyntaxHighlighter_rehighlightBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_highlightBlock, "highlightBlock(self, str)");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ1", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSyntaxHighlighter, sipName_highlightBlock);
                return SIP_NULLPTR;
            }

            sipCpp->highlightBlock(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_highlightBlock, doc_QSyntaxHighlighter_highlightBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_setFormat, "setFormat(self, int, int, QTextCharFormat)\n"
"setFormat(self, int, int, Union[QColor, Qt.GlobalColor, QGradient])\n"
"setFormat(self, int, int, QFont)");

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

    {
        int a0;
        int a1;
        const  ::QTextCharFormat* a2;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "piiJ9", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0, &a1, sipType_QTextCharFormat, &a2))
        {
            sipCpp->setFormat(a0,a1,*a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        int a0;
        int a1;
        const  ::QColor* a2;
        int a2State = 0;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "piiJ1", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0, &a1, sipType_QColor, &a2, &a2State))
        {
            sipCpp->setFormat(a0,a1,*a2);
            sipReleaseType(const_cast< ::QColor *>(a2), sipType_QColor, a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        int a0;
        int a1;
        const  ::QFont* a2;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "piiJ9", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0, &a1, sipType_QFont, &a2))
        {
            sipCpp->setFormat(a0,a1,*a2);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_setFormat, doc_QSyntaxHighlighter_setFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_format, "format(self, int) -> QTextCharFormat");

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

    {
        int a0;
        const  ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pi", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0))
        {
             ::QTextCharFormat*sipRes;

            sipRes = new  ::QTextCharFormat(sipCpp->format(a0));

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

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_format, doc_QSyntaxHighlighter_format);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_previousBlockState, "previousBlockState(self) -> int");

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

    {
        const  ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->previousBlockState();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_previousBlockState, doc_QSyntaxHighlighter_previousBlockState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_currentBlockState, "currentBlockState(self) -> int");

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

    {
        const  ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->currentBlockState();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_currentBlockState, doc_QSyntaxHighlighter_currentBlockState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_setCurrentBlockState, "setCurrentBlockState(self, int)");

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

    {
        int a0;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pi", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0))
        {
            sipCpp->setCurrentBlockState(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_setCurrentBlockState, doc_QSyntaxHighlighter_setCurrentBlockState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_setCurrentBlockUserData, "setCurrentBlockUserData(self, QTextBlockUserData)");

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

    {
         ::QTextBlockUserData* a0;
        PyObject *a0Wrapper;
         ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p@J8", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp, &a0Wrapper, sipType_QTextBlockUserData, &a0))
        {
            int sipIsErr = 0;

#line 51 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qsyntaxhighlighter.sip"
        // Ownership of the user data is with the document not the syntax highlighter.
        
        typedef PyObject *(*helper_func)(QObject *, const sipTypeDef *);
        
        static helper_func helper = 0;
        
        if (!helper)
        {
            helper = (helper_func)sipImportSymbol("qtgui_wrap_ancestors");
            Q_ASSERT(helper);
        }
        
        QTextDocument *td = sipCpp->document();
        
        if (td)
        {
            PyObject *py_td = helper(td, sipType_QTextDocument);
        
            if (!py_td)
            {
                sipIsErr = 1;
            }
            else
            {
                sipTransferTo(a0Wrapper, py_td);
                Py_DECREF(py_td);
            }
        }
        
        #if defined(SIP_PROTECTED_IS_PUBLIC)
        sipCpp->setCurrentBlockUserData(a0);
        #else
        sipCpp->sipProtect_setCurrentBlockUserData(a0);
        #endif
#line 691 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQSyntaxHighlighter.cpp"

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_setCurrentBlockUserData, doc_QSyntaxHighlighter_setCurrentBlockUserData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_currentBlockUserData, "currentBlockUserData(self) -> QTextBlockUserData");

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

    {
        const  ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp))
        {
             ::QTextBlockUserData*sipRes;

            sipRes = sipCpp->currentBlockUserData();

            return sipConvertFromType(sipRes,sipType_QTextBlockUserData,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_currentBlockUserData, doc_QSyntaxHighlighter_currentBlockUserData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSyntaxHighlighter_currentBlock, "currentBlock(self) -> QTextBlock");

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

    {
        const  ::QSyntaxHighlighter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSyntaxHighlighter, &sipCpp))
        {
             ::QTextBlock*sipRes;

            sipRes = new  ::QTextBlock(sipCpp->currentBlock());

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

    sipNoMethod(sipParseErr, sipName_QSyntaxHighlighter, sipName_currentBlock, doc_QSyntaxHighlighter_currentBlock);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSyntaxHighlighter(void *, const sipTypeDef *);}
static void *cast_QSyntaxHighlighter(void *sipCppV, const sipTypeDef *targetType)
{
     ::QSyntaxHighlighter *sipCpp = reinterpret_cast< ::QSyntaxHighlighter *>(sipCppV);

    if (targetType == sipType_QSyntaxHighlighter)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSyntaxHighlighter(void *, int);}
static void release_QSyntaxHighlighter(void *sipCppV, int)
{
     ::QSyntaxHighlighter *sipCpp = reinterpret_cast< ::QSyntaxHighlighter *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void dealloc_QSyntaxHighlighter(sipSimpleWrapper *);}
static void dealloc_QSyntaxHighlighter(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSyntaxHighlighter *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSyntaxHighlighter(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QSyntaxHighlighter(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSyntaxHighlighter(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQSyntaxHighlighter *sipCpp = SIP_NULLPTR;

    {
         ::QTextDocument* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "JH", sipType_QTextDocument, &a0, sipOwner))
        {
            sipCpp = new sipQSyntaxHighlighter(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QObject* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQSyntaxHighlighter(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSyntaxHighlighter[] = {{25, 0, 1}};


static PyMethodDef methods_QSyntaxHighlighter[] = {
    {sipName_currentBlock, meth_QSyntaxHighlighter_currentBlock, METH_VARARGS, doc_QSyntaxHighlighter_currentBlock},
    {sipName_currentBlockState, meth_QSyntaxHighlighter_currentBlockState, METH_VARARGS, doc_QSyntaxHighlighter_currentBlockState},
    {sipName_currentBlockUserData, meth_QSyntaxHighlighter_currentBlockUserData, METH_VARARGS, doc_QSyntaxHighlighter_currentBlockUserData},
    {sipName_document, meth_QSyntaxHighlighter_document, METH_VARARGS, doc_QSyntaxHighlighter_document},
    {sipName_format, meth_QSyntaxHighlighter_format, METH_VARARGS, doc_QSyntaxHighlighter_format},
    {sipName_highlightBlock, meth_QSyntaxHighlighter_highlightBlock, METH_VARARGS, doc_QSyntaxHighlighter_highlightBlock},
    {sipName_previousBlockState, meth_QSyntaxHighlighter_previousBlockState, METH_VARARGS, doc_QSyntaxHighlighter_previousBlockState},
    {sipName_rehighlight, meth_QSyntaxHighlighter_rehighlight, METH_VARARGS, doc_QSyntaxHighlighter_rehighlight},
    {sipName_rehighlightBlock, meth_QSyntaxHighlighter_rehighlightBlock, METH_VARARGS, doc_QSyntaxHighlighter_rehighlightBlock},
    {sipName_setCurrentBlockState, meth_QSyntaxHighlighter_setCurrentBlockState, METH_VARARGS, doc_QSyntaxHighlighter_setCurrentBlockState},
    {sipName_setCurrentBlockUserData, meth_QSyntaxHighlighter_setCurrentBlockUserData, METH_VARARGS, doc_QSyntaxHighlighter_setCurrentBlockUserData},
    {sipName_setDocument, meth_QSyntaxHighlighter_setDocument, METH_VARARGS, doc_QSyntaxHighlighter_setDocument},
    {sipName_setFormat, meth_QSyntaxHighlighter_setFormat, METH_VARARGS, doc_QSyntaxHighlighter_setFormat}
};

PyDoc_STRVAR(doc_QSyntaxHighlighter, "\1QSyntaxHighlighter(QTextDocument)\n"
"QSyntaxHighlighter(QObject)");


static pyqt5ClassPluginDef plugin_QSyntaxHighlighter = {
    & ::QSyntaxHighlighter::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QSyntaxHighlighter = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSyntaxHighlighter,
        SIP_NULLPTR,
        &plugin_QSyntaxHighlighter
    },
    {
        sipNameNr_QSyntaxHighlighter,
        {0, 0, 1},
        13, methods_QSyntaxHighlighter,
        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_QSyntaxHighlighter,
    -1,
    -1,
    supers_QSyntaxHighlighter,
    SIP_NULLPTR,
    init_type_QSyntaxHighlighter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSyntaxHighlighter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QSyntaxHighlighter,
    cast_QSyntaxHighlighter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QSyntaxHighlighter),
};
