/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * 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 "sipAPIQtPdf.h"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtPdf/qpdfselection.sip"
#include <qpdfselection.h>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtGui/qclipboard.sip"
#include <qclipboard.h>
#line 33 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"
#line 154 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 36 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"
#line 24 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 39 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 42 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"
#line 274 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtGui/qpolygon.sip"
#include <qpolygon.h>
#line 45 "/build/pyqt6/src/PyQt6-6.4.0/build/QtPdf/sipQtPdfQPdfSelection.cpp"


PyDoc_STRVAR(doc_QPdfSelection_swap, "swap(self, QPdfSelection)");

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

    {
         ::QPdfSelection* a0;
         ::QPdfSelection *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_swap, doc_QPdfSelection_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_isValid, "isValid(self) -> bool");

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

    {
        const  ::QPdfSelection *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_isValid, doc_QPdfSelection_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_bounds, "bounds(self) -> List[QPolygonF]");

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

    {
        const  ::QPdfSelection *sipCpp;

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

            sipRes = new QList< ::QPolygonF>(sipCpp->bounds());

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

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_bounds, doc_QPdfSelection_bounds);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QPdfSelection *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_text, doc_QPdfSelection_text);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_boundingRectangle, "boundingRectangle(self) -> QRectF");

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

    {
        const  ::QPdfSelection *sipCpp;

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

            sipRes = new  ::QRectF(sipCpp->boundingRectangle());

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

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_boundingRectangle, doc_QPdfSelection_boundingRectangle);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_startIndex, "startIndex(self) -> int");

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

    {
        const  ::QPdfSelection *sipCpp;

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

            sipRes = sipCpp->startIndex();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_startIndex, doc_QPdfSelection_startIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_endIndex, "endIndex(self) -> int");

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

    {
        const  ::QPdfSelection *sipCpp;

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

            sipRes = sipCpp->endIndex();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_endIndex, doc_QPdfSelection_endIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPdfSelection_copyToClipboard, "copyToClipboard(self, mode: QClipboard.Mode = QClipboard.Clipboard)");

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

    {
         ::QClipboard::Mode a0 = QClipboard::Clipboard;
        const  ::QPdfSelection *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|E", &sipSelf, sipType_QPdfSelection, &sipCpp, sipType_QClipboard_Mode, &a0))
        {
            sipCpp->copyToClipboard(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPdfSelection, sipName_copyToClipboard, doc_QPdfSelection_copyToClipboard);

    return SIP_NULLPTR;
}


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


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


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


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


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

    {
        const  ::QPdfSelection* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QPdfSelection[] = {
    {sipName_boundingRectangle, meth_QPdfSelection_boundingRectangle, METH_VARARGS, doc_QPdfSelection_boundingRectangle},
    {sipName_bounds, meth_QPdfSelection_bounds, METH_VARARGS, doc_QPdfSelection_bounds},
    {sipName_copyToClipboard, SIP_MLMETH_CAST(meth_QPdfSelection_copyToClipboard), METH_VARARGS|METH_KEYWORDS, doc_QPdfSelection_copyToClipboard},
    {sipName_endIndex, meth_QPdfSelection_endIndex, METH_VARARGS, doc_QPdfSelection_endIndex},
    {sipName_isValid, meth_QPdfSelection_isValid, METH_VARARGS, doc_QPdfSelection_isValid},
    {sipName_startIndex, meth_QPdfSelection_startIndex, METH_VARARGS, doc_QPdfSelection_startIndex},
    {sipName_swap, meth_QPdfSelection_swap, METH_VARARGS, doc_QPdfSelection_swap},
    {sipName_text, meth_QPdfSelection_text, METH_VARARGS, doc_QPdfSelection_text}
};

PyDoc_STRVAR(doc_QPdfSelection, "\1QPdfSelection(QPdfSelection)");


sipClassTypeDef sipTypeDef_QtPdf_QPdfSelection = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPdfSelection,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QPdfSelection,
        {0, 0, 1},
        8, methods_QPdfSelection,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPdfSelection,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QPdfSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPdfSelection,
    assign_QPdfSelection,
    SIP_NULLPTR,
    copy_QPdfSelection,
    release_QPdfSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QPdfSelection),
};
