/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpageranges.sip"
#include <qpageranges.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"
#line 90 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qmargins.sip"
#include <qmargins.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpagelayout.sip"
#include <qpagelayout.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpagesize.sip"
#include <qpagesize.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpaintdevice.sip"
#include <qpaintdevice.h>
#line 45 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"
#line 50 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qpaintengine.sip"
#include <qpaintengine.h>
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQPagedPaintDevice.cpp"


PyDoc_STRVAR(doc_QPagedPaintDevice_newPage, "newPage(self) -> bool");

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

    {
        ::QPagedPaintDevice *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QPagedPaintDevice, sipName_newPage);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->newPage();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_newPage, doc_QPagedPaintDevice_newPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_setPageSize, "setPageSize(self, pageSize: QPageSize) -> bool");

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

    {
        const ::QPageSize* a0;
        ::QPagedPaintDevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPagedPaintDevice, &sipCpp, sipType_QPageSize, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QPagedPaintDevice::setPageSize(*a0) : sipCpp->setPageSize(*a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_setPageSize, doc_QPagedPaintDevice_setPageSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_setPageLayout, "setPageLayout(self, pageLayout: QPageLayout) -> bool");

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

    {
        const ::QPageLayout* a0;
        ::QPagedPaintDevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPagedPaintDevice, &sipCpp, sipType_QPageLayout, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QPagedPaintDevice::setPageLayout(*a0) : sipCpp->setPageLayout(*a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_setPageLayout, doc_QPagedPaintDevice_setPageLayout);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_pageLayout, "pageLayout(self) -> QPageLayout");

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

    {
        const ::QPagedPaintDevice *sipCpp;

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

            sipRes = new ::QPageLayout(sipCpp->pageLayout());

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

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_pageLayout, doc_QPagedPaintDevice_pageLayout);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_setPageOrientation, "setPageOrientation(self, orientation: QPageLayout.Orientation) -> bool");

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

    {
        ::QPageLayout::Orientation a0;
        ::QPagedPaintDevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPagedPaintDevice, &sipCpp, sipType_QPageLayout_Orientation, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QPagedPaintDevice::setPageOrientation(a0) : sipCpp->setPageOrientation(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_setPageOrientation, doc_QPagedPaintDevice_setPageOrientation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_setPageMargins, "setPageMargins(self, margins: QMarginsF, units: QPageLayout.Unit = QPageLayout.Millimeter) -> bool");

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

    {
        const ::QMarginsF* a0;
        ::QPageLayout::Unit a1 = QPageLayout::Millimeter;
        ::QPagedPaintDevice *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|E", &sipSelf, sipType_QPagedPaintDevice, &sipCpp, sipType_QMarginsF, &a0, sipType_QPageLayout_Unit, &a1))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QPagedPaintDevice::setPageMargins(*a0, a1) : sipCpp->setPageMargins(*a0, a1));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_setPageMargins, doc_QPagedPaintDevice_setPageMargins);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_setPageRanges, "setPageRanges(self, ranges: QPageRanges)");

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

    {
        const ::QPageRanges* a0;
        ::QPagedPaintDevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPagedPaintDevice, &sipCpp, sipType_QPageRanges, &a0))
        {
            (sipSelfWasArg ? sipCpp->::QPagedPaintDevice::setPageRanges(*a0) : sipCpp->setPageRanges(*a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_setPageRanges, doc_QPagedPaintDevice_setPageRanges);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPagedPaintDevice_pageRanges, "pageRanges(self) -> QPageRanges");

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

    {
        const ::QPagedPaintDevice *sipCpp;

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

            sipRes = new ::QPageRanges(sipCpp->pageRanges());

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

    sipNoMethod(sipParseErr, sipName_QPagedPaintDevice, sipName_pageRanges, doc_QPagedPaintDevice_pageRanges);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QPagedPaintDevice)
        return sipCppV;

    if (targetType == sipType_QPaintDevice)
        return static_cast< ::QPaintDevice *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QPagedPaintDevice[] = {{203, 255, 1}};


static PyMethodDef methods_QPagedPaintDevice[] = {
    {sipName_newPage, meth_QPagedPaintDevice_newPage, METH_VARARGS, doc_QPagedPaintDevice_newPage},
    {sipName_pageLayout, meth_QPagedPaintDevice_pageLayout, METH_VARARGS, doc_QPagedPaintDevice_pageLayout},
    {sipName_pageRanges, meth_QPagedPaintDevice_pageRanges, METH_VARARGS, doc_QPagedPaintDevice_pageRanges},
    {sipName_setPageLayout, meth_QPagedPaintDevice_setPageLayout, METH_VARARGS, doc_QPagedPaintDevice_setPageLayout},
    {sipName_setPageMargins, SIP_MLMETH_CAST(meth_QPagedPaintDevice_setPageMargins), METH_VARARGS|METH_KEYWORDS, doc_QPagedPaintDevice_setPageMargins},
    {sipName_setPageOrientation, meth_QPagedPaintDevice_setPageOrientation, METH_VARARGS, doc_QPagedPaintDevice_setPageOrientation},
    {sipName_setPageRanges, meth_QPagedPaintDevice_setPageRanges, METH_VARARGS, doc_QPagedPaintDevice_setPageRanges},
    {sipName_setPageSize, meth_QPagedPaintDevice_setPageSize, METH_VARARGS, doc_QPagedPaintDevice_setPageSize}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QPagedPaintDevice[] = {
    {sipName_PdfVersion_1_4, static_cast<int>(::QPagedPaintDevice::PdfVersion_1_4)},
    {sipName_PdfVersion_A1b, static_cast<int>(::QPagedPaintDevice::PdfVersion_A1b)},
    {sipName_PdfVersion_1_6, static_cast<int>(::QPagedPaintDevice::PdfVersion_1_6)},
    {sipName_PdfVersion_X4, static_cast<int>(::QPagedPaintDevice::PdfVersion_X4)},
    {0, 0}
};


sipClassTypeDef sipTypeDef_QtGui_QPagedPaintDevice = {
    {
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPagedPaintDevice,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QPagedPaintDevice,
        {0, 0, 1},
        8, methods_QPagedPaintDevice,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QPagedPaintDevice, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QPagedPaintDevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPagedPaintDevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QPagedPaintDevice,
    cast_QPagedPaintDevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
