/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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.3.1/sip/QtGui/qpageranges.sip"
#include <qpageranges.h>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQPageRanges.cpp"

#line 24 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQPageRanges.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQPageRanges.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qpageranges.sip"
#include <qpageranges.h>
#line 38 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qpageranges.sip"
#include <qpageranges.h>
#line 41 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQPageRanges.cpp"


PyDoc_STRVAR(doc_QPageRanges_swap, "swap(self, QPageRanges)");

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

    {
         ::QPageRanges* a0;
         ::QPageRanges *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPageRanges, &sipCpp, sipType_QPageRanges, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_swap, doc_QPageRanges_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_addPage, "addPage(self, int)");

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

    {
        int a0;
         ::QPageRanges *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QPageRanges, &sipCpp, &a0))
        {
            sipCpp->addPage(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_addPage, doc_QPageRanges_addPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_addRange, "addRange(self, int, int)");

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

    {
        int a0;
        int a1;
         ::QPageRanges *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QPageRanges, &sipCpp, &a0, &a1))
        {
            sipCpp->addRange(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_addRange, doc_QPageRanges_addRange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_toRangeList, "toRangeList(self) -> List[QPageRanges.Range]");

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

    {
        const  ::QPageRanges *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPageRanges, &sipCpp))
        {
            QList< ::QPageRanges::Range>*sipRes;

            sipRes = new QList< ::QPageRanges::Range>(sipCpp->toRangeList());

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

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_toRangeList, doc_QPageRanges_toRangeList);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_clear, "clear(self)");

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

    {
         ::QPageRanges *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_clear, doc_QPageRanges_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_toString, "toString(self) -> str");

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

    {
        const  ::QPageRanges *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_toString, doc_QPageRanges_toString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_fromString, "fromString(str) -> QPageRanges");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "CJ1", &sipSelf, sipType_QString, &a0, &a0State))
        {
             ::QPageRanges*sipRes;

            sipRes = new  ::QPageRanges( ::QPageRanges::fromString(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_fromString, doc_QPageRanges_fromString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_contains, "contains(self, int) -> bool");

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

    {
        int a0;
        const  ::QPageRanges *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QPageRanges, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->contains(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_contains, doc_QPageRanges_contains);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_isEmpty, "isEmpty(self) -> bool");

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

    {
        const  ::QPageRanges *sipCpp;

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

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_isEmpty, doc_QPageRanges_isEmpty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_firstPage, "firstPage(self) -> int");

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

    {
        const  ::QPageRanges *sipCpp;

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

            sipRes = sipCpp->firstPage();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_firstPage, doc_QPageRanges_firstPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPageRanges_lastPage, "lastPage(self) -> int");

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

    {
        const  ::QPageRanges *sipCpp;

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

            sipRes = sipCpp->lastPage();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPageRanges, sipName_lastPage, doc_QPageRanges_lastPage);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QPageRanges___eq__(PyObject *,PyObject *);}
static PyObject *slot_QPageRanges___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QPageRanges *sipCpp = reinterpret_cast< ::QPageRanges *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QPageRanges));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPageRanges* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QPageRanges, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, eq_slot, sipType_QPageRanges, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QPageRanges___ne__(PyObject *,PyObject *);}
static PyObject *slot_QPageRanges___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QPageRanges *sipCpp = reinterpret_cast< ::QPageRanges *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QPageRanges));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPageRanges* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QPageRanges, &a0))
        {
            bool sipRes;

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, ne_slot, sipType_QPageRanges, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QPageRanges* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QPageRanges[] = {
    {(void *)slot_QPageRanges___eq__, eq_slot},
    {(void *)slot_QPageRanges___ne__, ne_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QPageRanges[] = {
    {sipName_addPage, meth_QPageRanges_addPage, METH_VARARGS, doc_QPageRanges_addPage},
    {sipName_addRange, meth_QPageRanges_addRange, METH_VARARGS, doc_QPageRanges_addRange},
    {sipName_clear, meth_QPageRanges_clear, METH_VARARGS, doc_QPageRanges_clear},
    {sipName_contains, meth_QPageRanges_contains, METH_VARARGS, doc_QPageRanges_contains},
    {sipName_firstPage, meth_QPageRanges_firstPage, METH_VARARGS, doc_QPageRanges_firstPage},
    {sipName_fromString, meth_QPageRanges_fromString, METH_VARARGS, doc_QPageRanges_fromString},
    {sipName_isEmpty, meth_QPageRanges_isEmpty, METH_VARARGS, doc_QPageRanges_isEmpty},
    {sipName_lastPage, meth_QPageRanges_lastPage, METH_VARARGS, doc_QPageRanges_lastPage},
    {sipName_swap, meth_QPageRanges_swap, METH_VARARGS, doc_QPageRanges_swap},
    {sipName_toRangeList, meth_QPageRanges_toRangeList, METH_VARARGS, doc_QPageRanges_toRangeList},
    {sipName_toString, meth_QPageRanges_toString, METH_VARARGS, doc_QPageRanges_toString}
};

PyDoc_STRVAR(doc_QPageRanges, "\1QPageRanges()\n"
"QPageRanges(QPageRanges)");


sipClassTypeDef sipTypeDef_QtGui_QPageRanges = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPageRanges,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QPageRanges,
        {0, 0, 1},
        11, methods_QPageRanges,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPageRanges,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QPageRanges,
    init_type_QPageRanges,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPageRanges,
    assign_QPageRanges,
    array_QPageRanges,
    copy_QPageRanges,
    release_QPageRanges,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPageRanges,
    sizeof ( ::QPageRanges),
};
