/*
 * 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 26 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/sip/qsciprinter.sip"
#include <Qsci/qsciprinter.h>
#line 29 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"

#line 28 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtPrintSupport/qprinter.sip"
#include <qprinter.h>
#line 33 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 24 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/sip/qsciscintilla.sip"
#include <Qsci/qsciscintilla.h>
#line 36 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 24 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/sip/qsciscintillabase.sip"
#include <Qsci/qsciscintillabase.h>
#line 39 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpainter.sip"
#include <qpainter.h>
#line 42 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 30 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qrect.sip"
#include <qrect.h>
#line 45 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 48 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 28 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtPrintSupport/qprintengine.sip"
#include <qprintengine.h>
#line 51 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 50 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpaintengine.sip"
#include <qpaintengine.h>
#line 54 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpaintdevice.sip"
#include <qpaintdevice.h>
#line 57 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 24 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 60 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 170 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qrect.sip"
#include <qrect.h>
#line 63 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 789 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 66 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpageranges.sip"
#include <qpageranges.h>
#line 69 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 90 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qmargins.sip"
#include <qmargins.h>
#line 72 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpagelayout.sip"
#include <qpagelayout.h>
#line 75 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qpagesize.sip"
#include <qpagesize.h>
#line 78 "/build/qscintilla/src/QScintilla_src-2.14.1/Python/build/Qsci/sipQsciQsciPrinter.cpp"


class sipQsciPrinter : public ::QsciPrinter
{
public:
    sipQsciPrinter(::QPrinter::PrinterMode);
    virtual ~sipQsciPrinter();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void setWrapMode(::QsciScintilla::WrapMode) SIP_OVERRIDE;
    int printRange(::QsciScintillaBase*, int, int) SIP_OVERRIDE;
    int printRange(::QsciScintillaBase*, ::QPainter&, int, int) SIP_OVERRIDE;
    void setMagnification(int) SIP_OVERRIDE;
    void formatPage(::QPainter&, bool, ::QRect&, int) SIP_OVERRIDE;
    void setPageRanges(const ::QPageRanges&) SIP_OVERRIDE;
    bool setPageMargins(const ::QMarginsF&, ::QPageLayout::Unit) SIP_OVERRIDE;
    bool setPageOrientation(::QPageLayout::Orientation) SIP_OVERRIDE;
    bool setPageLayout(const ::QPageLayout&) SIP_OVERRIDE;
    bool setPageSize(const ::QPageSize&) SIP_OVERRIDE;
    bool newPage() SIP_OVERRIDE;
    ::QPaintEngine* paintEngine() const SIP_OVERRIDE;
    int metric(::QPaintDevice::PaintDeviceMetric) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[13];
};

sipQsciPrinter::sipQsciPrinter(::QPrinter::PrinterMode a0): ::QsciPrinter(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipQsciPrinter::setWrapMode(::QsciScintilla::WrapMode a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_setWrapMode);

    if (!sipMeth)
    {
        ::QsciPrinter::setWrapMode(a0);
        return;
    }

    extern void sipVH_Qsci_62(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QsciScintilla::WrapMode);

    sipVH_Qsci_62(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

int sipQsciPrinter::printRange(::QsciScintillaBase*a0, int a1, int a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QsciPrinter::printRange(a0, a1, a2);

    extern int sipVH_Qsci_88(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QsciScintillaBase*, int, int);

    return sipVH_Qsci_88(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

int sipQsciPrinter::printRange(::QsciScintillaBase*a0, ::QPainter& a1, int a2, int a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QsciPrinter::printRange(a0, a1, a2, a3);

    extern int sipVH_Qsci_87(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QsciScintillaBase*, ::QPainter&, int, int);

    return sipVH_Qsci_87(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQsciPrinter::setMagnification(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::QsciPrinter::setMagnification(a0);
        return;
    }

    extern void sipVH_Qsci_48(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    sipVH_Qsci_48(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQsciPrinter::formatPage(::QPainter& a0, bool a1, ::QRect& a2, int a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::QsciPrinter::formatPage(a0, a1, a2, a3);
        return;
    }

    extern void sipVH_Qsci_86(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter&, bool, ::QRect&, int);

    sipVH_Qsci_86(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQsciPrinter::setPageRanges(const ::QPageRanges& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::QsciPrinter::setPageRanges(a0);
        return;
    }

    extern void sipVH_Qsci_85(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QPageRanges&);

    sipVH_Qsci_85(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQsciPrinter::setPageMargins(const ::QMarginsF& a0, ::QPageLayout::Unit a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QsciPrinter::setPageMargins(a0, a1);

    extern bool sipVH_Qsci_84(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QMarginsF&, ::QPageLayout::Unit);

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

bool sipQsciPrinter::setPageOrientation(::QPageLayout::Orientation a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QsciPrinter::setPageOrientation(a0);

    extern bool sipVH_Qsci_83(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPageLayout::Orientation);

    return sipVH_Qsci_83(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQsciPrinter::setPageLayout(const ::QPageLayout& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_setPageLayout);

    if (!sipMeth)
        return ::QsciPrinter::setPageLayout(a0);

    extern bool sipVH_Qsci_82(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QPageLayout&);

    return sipVH_Qsci_82(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQsciPrinter::setPageSize(const ::QPageSize& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[9], &sipPySelf, SIP_NULLPTR, sipName_setPageSize);

    if (!sipMeth)
        return ::QsciPrinter::setPageSize(a0);

    extern bool sipVH_Qsci_81(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QPageSize&);

    return sipVH_Qsci_81(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQsciPrinter::newPage()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_newPage);

    if (!sipMeth)
        return ::QsciPrinter::newPage();

    extern bool sipVH_Qsci_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_Qsci_7(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

::QPaintEngine* sipQsciPrinter::paintEngine() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[11]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_paintEngine);

    if (!sipMeth)
        return ::QsciPrinter::paintEngine();

    extern ::QPaintEngine* sipVH_Qsci_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_Qsci_33(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQsciPrinter::metric(::QPaintDevice::PaintDeviceMetric a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[12]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_metric);

    if (!sipMeth)
        return ::QsciPrinter::metric(a0);

    extern int sipVH_Qsci_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPaintDevice::PaintDeviceMetric);

    return sipVH_Qsci_34(sipGILState, sipImportedVirtErrorHandlers_Qsci_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QsciPrinter_formatPage, "formatPage(self, painter: QPainter, drawing: bool, area: QRect, pagenr: int)");

extern "C" {static PyObject *meth_QsciPrinter_formatPage(PyObject *, PyObject *);}
static PyObject *meth_QsciPrinter_formatPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QsciPrinter)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QPainter* a0;
        bool a1;
        ::QRect* a2;
        int a3;
        ::QsciPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9bJ9i", &sipSelf, sipType_QsciPrinter, &sipCpp, sipType_QPainter, &a0, &a1, sipType_QRect, &a2, &a3))
        {
            (sipSelfWasArg ? sipCpp->::QsciPrinter::formatPage(*a0, a1, *a2, a3) : sipCpp->formatPage(*a0, a1, *a2, a3));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_formatPage, doc_QsciPrinter_formatPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciPrinter_magnification, "magnification(self) -> int");

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

    {
        const ::QsciPrinter *sipCpp;

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

            sipRes = sipCpp->magnification();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_magnification, doc_QsciPrinter_magnification);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciPrinter_setMagnification, "setMagnification(self, magnification: int)");

extern "C" {static PyObject *meth_QsciPrinter_setMagnification(PyObject *, PyObject *);}
static PyObject *meth_QsciPrinter_setMagnification(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QsciPrinter)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
        ::QsciPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QsciPrinter, &sipCpp, &a0))
        {
            (sipSelfWasArg ? sipCpp->::QsciPrinter::setMagnification(a0) : sipCpp->setMagnification(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_setMagnification, doc_QsciPrinter_setMagnification);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciPrinter_printRange, "printRange(self, qsb: QsciScintillaBase|None, painter: QPainter, from_: int = -1, to: int = -1) -> int\n"
"printRange(self, qsb: QsciScintillaBase|None, from_: int = -1, to: int = -1) -> int");

extern "C" {static PyObject *meth_QsciPrinter_printRange(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QsciPrinter_printRange(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QsciPrinter)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QsciScintillaBase* a0;
        ::QPainter* a1;
        int a2 = -1;
        int a3 = -1;
        ::QsciPrinter *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9|ii", &sipSelf, sipType_QsciPrinter, &sipCpp, sipType_QsciScintillaBase, &a0, sipType_QPainter, &a1, &a2, &a3))
        {
            int sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QsciPrinter::printRange(a0, *a1, a2, a3) : sipCpp->printRange(a0, *a1, a2, a3));

            return PyLong_FromLong(sipRes);
        }
    }

    {
        ::QsciScintillaBase* a0;
        int a1 = -1;
        int a2 = -1;
        ::QsciPrinter *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|ii", &sipSelf, sipType_QsciPrinter, &sipCpp, sipType_QsciScintillaBase, &a0, &a1, &a2))
        {
            int sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QsciPrinter::printRange(a0, a1, a2) : sipCpp->printRange(a0, a1, a2));

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_printRange, doc_QsciPrinter_printRange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciPrinter_wrapMode, "wrapMode(self) -> QsciScintilla.WrapMode");

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

    {
        const ::QsciPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QsciPrinter, &sipCpp))
        {
            ::QsciScintilla::WrapMode sipRes;

            sipRes = sipCpp->wrapMode();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QsciScintilla_WrapMode);
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_wrapMode, doc_QsciPrinter_wrapMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QsciPrinter_setWrapMode, "setWrapMode(self, a0: QsciScintilla.WrapMode)");

extern "C" {static PyObject *meth_QsciPrinter_setWrapMode(PyObject *, PyObject *);}
static PyObject *meth_QsciPrinter_setWrapMode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QsciPrinter)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QsciScintilla::WrapMode a0;
        ::QsciPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QsciPrinter, &sipCpp, sipType_QsciScintilla_WrapMode, &a0))
        {
            (sipSelfWasArg ? sipCpp->::QsciPrinter::setWrapMode(a0) : sipCpp->setWrapMode(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QsciPrinter, sipName_setWrapMode, doc_QsciPrinter_setWrapMode);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QsciPrinter)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QPrinter)->ctd_cast(static_cast< ::QPrinter *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QsciPrinter(void *, int);}
static void release_QsciPrinter(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQsciPrinter *>(sipCppV);
    else
        delete reinterpret_cast< ::QsciPrinter *>(sipCppV);
}


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


extern "C" {static void array_delete_QsciPrinter(void *);}
static void array_delete_QsciPrinter(void *sipCpp)
{
    delete[] reinterpret_cast< ::QsciPrinter *>(sipCpp);
}


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

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


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

    {
        ::QPrinter::PrinterMode a0 = QPrinter::ScreenResolution;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|E", sipType_QPrinter_PrinterMode, &a0))
        {
            sipCpp = new sipQsciPrinter(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QsciPrinter[] = {
    {sipName_formatPage, meth_QsciPrinter_formatPage, METH_VARARGS, doc_QsciPrinter_formatPage},
    {sipName_magnification, meth_QsciPrinter_magnification, METH_VARARGS, doc_QsciPrinter_magnification},
    {sipName_printRange, SIP_MLMETH_CAST(meth_QsciPrinter_printRange), METH_VARARGS|METH_KEYWORDS, doc_QsciPrinter_printRange},
    {sipName_setMagnification, meth_QsciPrinter_setMagnification, METH_VARARGS, doc_QsciPrinter_setMagnification},
    {sipName_setWrapMode, meth_QsciPrinter_setWrapMode, METH_VARARGS, doc_QsciPrinter_setWrapMode},
    {sipName_wrapMode, meth_QsciPrinter_wrapMode, METH_VARARGS, doc_QsciPrinter_wrapMode}
};

PyDoc_STRVAR(doc_QsciPrinter, "\1QsciPrinter(mode: QPrinter.PrinterMode = QPrinter.ScreenResolution)");


sipClassTypeDef sipTypeDef_Qsci_QsciPrinter = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QsciPrinter,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QsciPrinter,
        {0, 0, 1},
        6, methods_QsciPrinter,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QsciPrinter,
    -1,
    -1,
    supers_QsciPrinter,
    SIP_NULLPTR,
    init_type_QsciPrinter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QsciPrinter,
    SIP_NULLPTR,
    array_QsciPrinter,
    SIP_NULLPTR,
    release_QsciPrinter,
    cast_QsciPrinter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QsciPrinter,
    sizeof (::QsciPrinter),
};
