/*
 * 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 "sipAPIQtWidgets.h"

#line 163 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qgesture.sip"
#include <qgesture.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"

#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qgesture.sip"
#include <qgesture.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"
#line 98 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpoint.sip"
#include <qpoint.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQGestureEvent.cpp"


class sipQGestureEvent : public  ::QGestureEvent
{
public:
    sipQGestureEvent(const QList< ::QGesture*>&);
    sipQGestureEvent(const  ::QGestureEvent&);
    ~sipQGestureEvent();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQGestureEvent(const sipQGestureEvent &);
    sipQGestureEvent &operator = (const sipQGestureEvent &);
};

sipQGestureEvent::sipQGestureEvent(const QList< ::QGesture*>& a0):  ::QGestureEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

sipQGestureEvent::sipQGestureEvent(const  ::QGestureEvent& a0):  ::QGestureEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_QGestureEvent_gestures, "gestures(self) -> List[QGesture]");

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

    {
        const  ::QGestureEvent *sipCpp;

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

            sipRes = new QList< ::QGesture*>(sipCpp->gestures());

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_gestures, doc_QGestureEvent_gestures);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_gesture, "gesture(self, Qt.GestureType) -> QGesture");

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

    {
         ::Qt::GestureType a0;
        const  ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_Qt_GestureType, &a0))
        {
             ::QGesture*sipRes;

            sipRes = sipCpp->gesture(a0);

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_gesture, doc_QGestureEvent_gesture);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_activeGestures, "activeGestures(self) -> List[QGesture]");

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

    {
        const  ::QGestureEvent *sipCpp;

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

            sipRes = new QList< ::QGesture*>(sipCpp->activeGestures());

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_activeGestures, doc_QGestureEvent_activeGestures);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_canceledGestures, "canceledGestures(self) -> List[QGesture]");

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

    {
        const  ::QGestureEvent *sipCpp;

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

            sipRes = new QList< ::QGesture*>(sipCpp->canceledGestures());

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_canceledGestures, doc_QGestureEvent_canceledGestures);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_setAccepted, "setAccepted(self, bool)\n"
"setAccepted(self, QGesture, bool)\n"
"setAccepted(self, Qt.GestureType, bool)");

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

    {
        bool a0;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QGestureEvent, &sipCpp, &a0))
        {
            sipCpp->setAccepted(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QGesture* a0;
        bool a1;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8b", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_QGesture, &a0, &a1))
        {
            sipCpp->setAccepted(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::Qt::GestureType a0;
        bool a1;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEb", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_Qt_GestureType, &a0, &a1))
        {
            sipCpp->setAccepted(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_setAccepted, doc_QGestureEvent_setAccepted);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_isAccepted, "isAccepted(self) -> bool\n"
"isAccepted(self, QGesture) -> bool\n"
"isAccepted(self, Qt.GestureType) -> bool");

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

    {
        const  ::QGestureEvent *sipCpp;

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

            sipRes = sipCpp->isAccepted();

            return PyBool_FromLong(sipRes);
        }
    }

    {
         ::QGesture* a0;
        const  ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_QGesture, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->isAccepted(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    {
         ::Qt::GestureType a0;
        const  ::QGestureEvent *sipCpp;

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

            sipRes = sipCpp->isAccepted(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_isAccepted, doc_QGestureEvent_isAccepted);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_accept, "accept(self)\n"
"accept(self, QGesture)\n"
"accept(self, Qt.GestureType)");

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

    {
         ::QGestureEvent *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QGesture* a0;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_QGesture, &a0))
        {
            sipCpp->accept(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::Qt::GestureType a0;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_Qt_GestureType, &a0))
        {
            sipCpp->accept(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_accept, doc_QGestureEvent_accept);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_ignore, "ignore(self)\n"
"ignore(self, QGesture)\n"
"ignore(self, Qt.GestureType)");

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

    {
         ::QGestureEvent *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QGesture* a0;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_QGesture, &a0))
        {
            sipCpp->ignore(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::Qt::GestureType a0;
         ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_Qt_GestureType, &a0))
        {
            sipCpp->ignore(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_ignore, doc_QGestureEvent_ignore);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_widget, "widget(self) -> QWidget");

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

    {
        const  ::QGestureEvent *sipCpp;

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

            sipRes = sipCpp->widget();

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_widget, doc_QGestureEvent_widget);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGestureEvent_mapToGraphicsScene, "mapToGraphicsScene(self, Union[QPointF, QPoint]) -> QPointF");

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

    {
        const  ::QPointF* a0;
        int a0State = 0;
        const  ::QGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QGestureEvent, &sipCpp, sipType_QPointF, &a0, &a0State))
        {
             ::QPointF*sipRes;

            sipRes = new  ::QPointF(sipCpp->mapToGraphicsScene(*a0));
            sipReleaseType(const_cast< ::QPointF *>(a0), sipType_QPointF, a0State);

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

    sipNoMethod(sipParseErr, sipName_QGestureEvent, sipName_mapToGraphicsScene, doc_QGestureEvent_mapToGraphicsScene);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QGestureEvent)
        return sipCppV;

    if (targetType == sipType_QEvent)
        return static_cast< ::QEvent *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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

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


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

    {
        const QList< ::QGesture*>* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QList_0101QGesture, &a0, &a0State))
        {
            sipCpp = new sipQGestureEvent(*a0);
            sipReleaseType(const_cast<QList< ::QGesture*> *>(a0), sipType_QList_0101QGesture, a0State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QGestureEvent* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QGestureEvent[] = {
    {sipName_accept, meth_QGestureEvent_accept, METH_VARARGS, doc_QGestureEvent_accept},
    {sipName_activeGestures, meth_QGestureEvent_activeGestures, METH_VARARGS, doc_QGestureEvent_activeGestures},
    {sipName_canceledGestures, meth_QGestureEvent_canceledGestures, METH_VARARGS, doc_QGestureEvent_canceledGestures},
    {sipName_gesture, meth_QGestureEvent_gesture, METH_VARARGS, doc_QGestureEvent_gesture},
    {sipName_gestures, meth_QGestureEvent_gestures, METH_VARARGS, doc_QGestureEvent_gestures},
    {sipName_ignore, meth_QGestureEvent_ignore, METH_VARARGS, doc_QGestureEvent_ignore},
    {sipName_isAccepted, meth_QGestureEvent_isAccepted, METH_VARARGS, doc_QGestureEvent_isAccepted},
    {sipName_mapToGraphicsScene, meth_QGestureEvent_mapToGraphicsScene, METH_VARARGS, doc_QGestureEvent_mapToGraphicsScene},
    {sipName_setAccepted, meth_QGestureEvent_setAccepted, METH_VARARGS, doc_QGestureEvent_setAccepted},
    {sipName_widget, meth_QGestureEvent_widget, METH_VARARGS, doc_QGestureEvent_widget}
};

PyDoc_STRVAR(doc_QGestureEvent, "\1QGestureEvent(Iterable[QGesture])\n"
"QGestureEvent(QGestureEvent)");


static pyqt5ClassPluginDef plugin_QGestureEvent = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtWidgets_QGestureEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QGestureEvent,
        SIP_NULLPTR,
        &plugin_QGestureEvent
    },
    {
        sipNameNr_QGestureEvent,
        {0, 0, 1},
        10, methods_QGestureEvent,
        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_QGestureEvent,
    -1,
    -1,
    supers_QGestureEvent,
    SIP_NULLPTR,
    init_type_QGestureEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QGestureEvent,
    assign_QGestureEvent,
    SIP_NULLPTR,
    copy_QGestureEvent,
    release_QGestureEvent,
    cast_QGestureEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QGestureEvent),
};
