/* * Interface wrapper code. * * Generated by SIP 4.12-snapshot-93040d2c716c * * Copyright: (c) 2010 by Total Control Software * License: wxWindows License */ #include "sipAPI_core.h" #line 1259 "sip/gen/event.sip" #include #line 15 "sip_corewxSizeEvent.cpp" #line 177 "sip/gen/gdicmn.sip" #include #line 19 "sip_corewxSizeEvent.cpp" #line 386 "sip/gen/gdicmn.sip" #include #line 22 "sip_corewxSizeEvent.cpp" #line 40 "sip/gen/object.sip" #include #line 25 "sip_corewxSizeEvent.cpp" #line 129 "sip/gen/event.sip" #include #line 28 "sip_corewxSizeEvent.cpp" #line 17 "sip/gen/object.sip" #include #line 31 "sip_corewxSizeEvent.cpp" #line 84 "sip/gen/object.sip" #include #line 34 "sip_corewxSizeEvent.cpp" class sipwxSizeEvent : public wxSizeEvent { public: sipwxSizeEvent(const wxSize&,int); sipwxSizeEvent(const wxSizeEvent&); virtual ~sipwxSizeEvent(); /* * There is a protected method for every virtual method visible from * this class. */ protected: wxEvent * Clone(); wxEventCategory GetEventCategory(); wxClassInfo * GetClassInfo(); public: sipSimpleWrapper *sipPySelf; private: sipwxSizeEvent(const sipwxSizeEvent &); sipwxSizeEvent &operator = (const sipwxSizeEvent &); char sipPyMethods[3]; }; sipwxSizeEvent::sipwxSizeEvent(const wxSize& sz,int id): wxSizeEvent(sz,id), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxSizeEvent::sipwxSizeEvent(const wxSizeEvent& a0): wxSizeEvent(a0), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxSizeEvent::~sipwxSizeEvent() { sipCommonDtor(sipPySelf); } wxEvent * sipwxSizeEvent::Clone() { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_Clone); if (!sipMeth) return wxEvent::Clone(); extern wxEvent * sipVH__core_1(sip_gilstate_t,PyObject *); return sipVH__core_1(sipGILState,sipMeth); } wxEventCategory sipwxSizeEvent::GetEventCategory() { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_GetEventCategory); if (!sipMeth) return wxEvent::GetEventCategory(); extern wxEventCategory sipVH__core_0(sip_gilstate_t,PyObject *); return sipVH__core_0(sipGILState,sipMeth); } wxClassInfo * sipwxSizeEvent::GetClassInfo() { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_GetClassInfo); if (!sipMeth) return wxObject::GetClassInfo(); extern wxClassInfo * sipVH__core_6(sip_gilstate_t,PyObject *); return sipVH__core_6(sipGILState,sipMeth); } PyDoc_STRVAR(doc_wxSizeEvent_GetSize, "SizeEvent.GetSize() -> Size"); extern "C" {static PyObject *meth_wxSizeEvent_GetSize(PyObject *, PyObject *);} static PyObject *meth_wxSizeEvent_GetSize(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxSizeEvent *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSizeEvent, &sipCpp)) { wxSize *sipRes; try { sipRes = new wxSize(sipCpp->GetSize()); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromNewType(sipRes,sipType_wxSize,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_SizeEvent, sipName_GetSize, doc_wxSizeEvent_GetSize); return NULL; } PyDoc_STRVAR(doc_wxSizeEvent_SetSize, "SizeEvent.SetSize(Size)"); extern "C" {static PyObject *meth_wxSizeEvent_SetSize(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxSizeEvent_SetSize(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { wxSize * size; int sizeState = 0; wxSizeEvent *sipCpp; static const char *sipKwdList[] = { sipName_size, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxSizeEvent, &sipCpp, sipType_wxSize, &size, &sizeState)) { try { sipCpp->SetSize(*size); } catch (...) { sipReleaseType(size,sipType_wxSize,sizeState); sipRaiseUnknownException(); return NULL; } sipReleaseType(size,sipType_wxSize,sizeState); Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_SizeEvent, sipName_SetSize, doc_wxSizeEvent_SetSize); return NULL; } PyDoc_STRVAR(doc_wxSizeEvent_GetRect, "SizeEvent.GetRect() -> Rect"); extern "C" {static PyObject *meth_wxSizeEvent_GetRect(PyObject *, PyObject *);} static PyObject *meth_wxSizeEvent_GetRect(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxSizeEvent *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSizeEvent, &sipCpp)) { wxRect *sipRes; try { sipRes = new wxRect(sipCpp->GetRect()); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromNewType(sipRes,sipType_wxRect,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_SizeEvent, sipName_GetRect, doc_wxSizeEvent_GetRect); return NULL; } PyDoc_STRVAR(doc_wxSizeEvent_SetRect, "SizeEvent.SetRect(Rect)"); extern "C" {static PyObject *meth_wxSizeEvent_SetRect(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxSizeEvent_SetRect(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { wxRect * rect; int rectState = 0; wxSizeEvent *sipCpp; static const char *sipKwdList[] = { sipName_rect, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxSizeEvent, &sipCpp, sipType_wxRect, &rect, &rectState)) { try { sipCpp->SetRect(*rect); } catch (...) { sipReleaseType(rect,sipType_wxRect,rectState); sipRaiseUnknownException(); return NULL; } sipReleaseType(rect,sipType_wxRect,rectState); Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_SizeEvent, sipName_SetRect, doc_wxSizeEvent_SetRect); return NULL; } /* Cast a pointer to a type somewhere in its superclass hierarchy. */ extern "C" {static void *cast_wxSizeEvent(void *, const sipTypeDef *);} static void *cast_wxSizeEvent(void *ptr, const sipTypeDef *targetType) { void *res; if (targetType == sipType_wxSizeEvent) return ptr; if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxSizeEvent *)ptr,targetType)) != NULL) return res; return NULL; } /* Call the instance's destructor. */ extern "C" {static void release_wxSizeEvent(void *, int);} static void release_wxSizeEvent(void *sipCppV,int sipState) { if (sipState & SIP_DERIVED_CLASS) delete reinterpret_cast(sipCppV); else delete reinterpret_cast(sipCppV); } extern "C" {static void dealloc_wxSizeEvent(sipSimpleWrapper *);} static void dealloc_wxSizeEvent(sipSimpleWrapper *sipSelf) { if (sipIsDerived(sipSelf)) reinterpret_cast(sipGetAddress(sipSelf))->sipPySelf = NULL; if (sipIsPyOwned(sipSelf)) { release_wxSizeEvent(sipGetAddress(sipSelf),sipSelf->flags); } } extern "C" {static void *init_wxSizeEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);} static void *init_wxSizeEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr) { sipwxSizeEvent *sipCpp = 0; { const wxSize * sz; int szState = 0; int id = 0; static const char *sipKwdList[] = { sipName_sz, sipName_id, }; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1|i", sipType_wxSize, &sz, &szState, &id)) { try { sipCpp = new sipwxSizeEvent(*sz,id); } catch (...) { sipReleaseType(const_cast(sz),sipType_wxSize,szState); sipRaiseUnknownException(); return NULL; } sipReleaseType(const_cast(sz),sipType_wxSize,szState); sipCpp->sipPySelf = sipSelf; return sipCpp; } } { const wxSizeEvent * a0; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxSizeEvent, &a0)) { try { sipCpp = new sipwxSizeEvent(*a0); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } return NULL; } /* Define this type's super-types. */ static sipEncodedTypeDef supers_wxSizeEvent[] = {{19, 255, 1}}; static PyMethodDef methods_wxSizeEvent[] = { {SIP_MLNAME_CAST(sipName_GetRect), meth_wxSizeEvent_GetRect, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSizeEvent_GetRect)}, {SIP_MLNAME_CAST(sipName_GetSize), meth_wxSizeEvent_GetSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSizeEvent_GetSize)}, {SIP_MLNAME_CAST(sipName_SetRect), (PyCFunction)meth_wxSizeEvent_SetRect, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSizeEvent_SetRect)}, {SIP_MLNAME_CAST(sipName_SetSize), (PyCFunction)meth_wxSizeEvent_SetSize, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSizeEvent_SetSize)} }; sipVariableDef variables_wxSizeEvent[] = { {PropertyVariable, sipName_Size, &methods_wxSizeEvent[1], &methods_wxSizeEvent[3], NULL, NULL}, {PropertyVariable, sipName_Rect, &methods_wxSizeEvent[0], &methods_wxSizeEvent[2], NULL, NULL}, }; PyDoc_STRVAR(doc_wxSizeEvent, "\1SizeEvent(Size, int id=0)\n" "SizeEvent(SizeEvent)"); sipClassTypeDef sipTypeDef__core_wxSizeEvent = { { -1, 0, 0, SIP_TYPE_CLASS, sipNameNr_wxSizeEvent, {0} }, { sipNameNr_SizeEvent, {0, 0, 1}, 4, methods_wxSizeEvent, 0, 0, 2, variables_wxSizeEvent, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, doc_wxSizeEvent, -1, -1, supers_wxSizeEvent, 0, init_wxSizeEvent, 0, 0, #if PY_MAJOR_VERSION >= 3 0, 0, #else 0, 0, 0, 0, #endif dealloc_wxSizeEvent, 0, 0, 0, release_wxSizeEvent, cast_wxSizeEvent, 0, 0, 0 };