/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.24
 *
 *     Copyright: (c) 2020 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_core.h"

        #include <wx/event.h>

        #include <wx/event.h>
        #include <wx/gdicmn.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxZoomGestureEvent : public  ::wxZoomGestureEvent
{
public:
    sipwxZoomGestureEvent( ::wxWindowID);
    sipwxZoomGestureEvent(const  ::wxZoomGestureEvent&);
    virtual ~sipwxZoomGestureEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
     ::wxEvent* Clone() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipwxZoomGestureEvent::sipwxZoomGestureEvent( ::wxWindowID windid):  ::wxZoomGestureEvent(windid), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxZoomGestureEvent::sipwxZoomGestureEvent(const  ::wxZoomGestureEvent& a0):  ::wxZoomGestureEvent(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

 ::wxEventCategory sipwxZoomGestureEvent::GetEventCategory() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);

    if (!sipMeth)
        return  ::wxZoomGestureEvent::GetEventCategory();

    extern  ::wxEventCategory sipVH__core_99(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__core_99(sipGILState, 0, sipPySelf, sipMeth);
}

 ::wxEvent* sipwxZoomGestureEvent::Clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_Clone);

    if (!sipMeth)
        return  ::wxZoomGestureEvent::Clone();

    extern  ::wxEvent* sipVH__core_98(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__core_98(sipGILState, 0, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_wxZoomGestureEvent_GetZoomFactor, "GetZoomFactor() -> double\n"
"\n"
"Returns the zoom Factor since the gesture started.");

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

    {
        const  ::wxZoomGestureEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxZoomGestureEvent, &sipCpp))
        {
            double sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetZoomFactor();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_ZoomGestureEvent, sipName_GetZoomFactor, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxZoomGestureEvent_SetZoomFactor, "SetZoomFactor(zoomFactor)\n"
"\n"
"Sets the zoom Factor.");

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

    {
        double zoomFactor;
         ::wxZoomGestureEvent *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bd", &sipSelf, sipType_wxZoomGestureEvent, &sipCpp, &zoomFactor))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetZoomFactor(zoomFactor);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_ZoomGestureEvent, sipName_SetZoomFactor, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxZoomGestureEvent_Clone, "Clone(self) -> Event");

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

    {
        const  ::wxZoomGestureEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxZoomGestureEvent::Clone() : sipCpp->Clone());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_ZoomGestureEvent, sipName_Clone, doc_wxZoomGestureEvent_Clone);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxGestureEvent)
        return static_cast< ::wxGestureEvent *>(sipCpp);

    if (targetType == sipType_wxEvent)
        return static_cast< ::wxEvent *>(sipCpp);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_wxZoomGestureEvent(void *, int);}
static void release_wxZoomGestureEvent(void *sipCppV, int sipState)
{
    Py_BEGIN_ALLOW_THREADS

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxZoomGestureEvent *>(sipCppV);
    else
        delete reinterpret_cast< ::wxZoomGestureEvent *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
         ::wxWindowID windid = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|i", &windid))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxZoomGestureEvent(windid);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxZoomGestureEvent* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxZoomGestureEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxZoomGestureEvent(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxZoomGestureEvent[] = {
    {SIP_MLNAME_CAST(sipName_Clone), meth_wxZoomGestureEvent_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxZoomGestureEvent_Clone)},
    {SIP_MLNAME_CAST(sipName_GetZoomFactor), meth_wxZoomGestureEvent_GetZoomFactor, METH_VARARGS, SIP_MLDOC_CAST(doc_wxZoomGestureEvent_GetZoomFactor)},
    {SIP_MLNAME_CAST(sipName_SetZoomFactor), SIP_MLMETH_CAST(meth_wxZoomGestureEvent_SetZoomFactor), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxZoomGestureEvent_SetZoomFactor)}
};

sipVariableDef variables_wxZoomGestureEvent[] = {
    {PropertyVariable, sipName_ZoomFactor, &methods_wxZoomGestureEvent[1], &methods_wxZoomGestureEvent[2], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxZoomGestureEvent, "ZoomGestureEvent(windid=0)\n"
"\n"
"This event is generated when two fingers pinch the surface to zoom in\n"
"or out.");


sipClassTypeDef sipTypeDef__core_wxZoomGestureEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxZoomGestureEvent,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_ZoomGestureEvent,
        {0, 0, 1},
        3, methods_wxZoomGestureEvent,
        0, SIP_NULLPTR,
        1, variables_wxZoomGestureEvent,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxZoomGestureEvent,
    -1,
    -1,
    supers_wxZoomGestureEvent,
    SIP_NULLPTR,
    init_type_wxZoomGestureEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxZoomGestureEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxZoomGestureEvent,
    cast_wxZoomGestureEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
