/* * 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 484 "sip/gen/event.sip" #include #line 15 "sip_corewxFocusEvent.cpp" #line 40 "sip/gen/object.sip" #include #line 19 "sip_corewxFocusEvent.cpp" #line 129 "sip/gen/event.sip" #include #line 22 "sip_corewxFocusEvent.cpp" #line 17 "sip/gen/object.sip" #include #line 25 "sip_corewxFocusEvent.cpp" #line 84 "sip/gen/object.sip" #include #line 28 "sip_corewxFocusEvent.cpp" class sipwxFocusEvent : public wxFocusEvent { public: sipwxFocusEvent(wxEventType,int); sipwxFocusEvent(const wxFocusEvent&); virtual ~sipwxFocusEvent(); /* * There is a protected method for every virtual method visible from * this class. */ protected: wxEvent * Clone(); wxEventCategory GetEventCategory(); wxClassInfo * GetClassInfo(); public: sipSimpleWrapper *sipPySelf; private: sipwxFocusEvent(const sipwxFocusEvent &); sipwxFocusEvent &operator = (const sipwxFocusEvent &); char sipPyMethods[3]; }; sipwxFocusEvent::sipwxFocusEvent(wxEventType eventType,int id): wxFocusEvent(eventType,id), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxFocusEvent::sipwxFocusEvent(const wxFocusEvent& a0): wxFocusEvent(a0), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxFocusEvent::~sipwxFocusEvent() { sipCommonDtor(sipPySelf); } wxEvent * sipwxFocusEvent::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 sipwxFocusEvent::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 * sipwxFocusEvent::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_wxFocusEvent_GetWindow, "FocusEvent.GetWindow() -> Window"); extern "C" {static PyObject *meth_wxFocusEvent_GetWindow(PyObject *, PyObject *);} static PyObject *meth_wxFocusEvent_GetWindow(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxFocusEvent *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxFocusEvent, &sipCpp)) { wxWindow *sipRes; try { sipRes = sipCpp->GetWindow(); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromType(sipRes,sipType_wxWindow,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_FocusEvent, sipName_GetWindow, doc_wxFocusEvent_GetWindow); return NULL; } PyDoc_STRVAR(doc_wxFocusEvent_SetWindow, "FocusEvent.SetWindow(Window)"); extern "C" {static PyObject *meth_wxFocusEvent_SetWindow(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxFocusEvent_SetWindow(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { wxWindow * win; wxFocusEvent *sipCpp; static const char *sipKwdList[] = { sipName_win, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ8", &sipSelf, sipType_wxFocusEvent, &sipCpp, sipType_wxWindow, &win)) { try { sipCpp->SetWindow(win); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_FocusEvent, sipName_SetWindow, doc_wxFocusEvent_SetWindow); return NULL; } /* Cast a pointer to a type somewhere in its superclass hierarchy. */ extern "C" {static void *cast_wxFocusEvent(void *, const sipTypeDef *);} static void *cast_wxFocusEvent(void *ptr, const sipTypeDef *targetType) { void *res; if (targetType == sipType_wxFocusEvent) return ptr; if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxFocusEvent *)ptr,targetType)) != NULL) return res; return NULL; } /* Call the instance's destructor. */ extern "C" {static void release_wxFocusEvent(void *, int);} static void release_wxFocusEvent(void *sipCppV,int sipState) { if (sipState & SIP_DERIVED_CLASS) delete reinterpret_cast(sipCppV); else delete reinterpret_cast(sipCppV); } extern "C" {static void dealloc_wxFocusEvent(sipSimpleWrapper *);} static void dealloc_wxFocusEvent(sipSimpleWrapper *sipSelf) { if (sipIsDerived(sipSelf)) reinterpret_cast(sipGetAddress(sipSelf))->sipPySelf = NULL; if (sipIsPyOwned(sipSelf)) { release_wxFocusEvent(sipGetAddress(sipSelf),sipSelf->flags); } } extern "C" {static void *init_wxFocusEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);} static void *init_wxFocusEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr) { sipwxFocusEvent *sipCpp = 0; { wxEventType eventType = wxEVT_NULL; int id = 0; static const char *sipKwdList[] = { sipName_eventType, sipName_id, }; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &eventType, &id)) { try { sipCpp = new sipwxFocusEvent(eventType,id); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } { const wxFocusEvent * a0; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxFocusEvent, &a0)) { try { sipCpp = new sipwxFocusEvent(*a0); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } return NULL; } /* Define this type's super-types. */ static sipEncodedTypeDef supers_wxFocusEvent[] = {{19, 255, 1}}; static PyMethodDef methods_wxFocusEvent[] = { {SIP_MLNAME_CAST(sipName_GetWindow), meth_wxFocusEvent_GetWindow, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFocusEvent_GetWindow)}, {SIP_MLNAME_CAST(sipName_SetWindow), (PyCFunction)meth_wxFocusEvent_SetWindow, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFocusEvent_SetWindow)} }; sipVariableDef variables_wxFocusEvent[] = { {PropertyVariable, sipName_Window, &methods_wxFocusEvent[0], &methods_wxFocusEvent[1], NULL, NULL}, }; PyDoc_STRVAR(doc_wxFocusEvent, "\1FocusEvent(int eventType=wxEVT_NULL, int id=0)\n" "FocusEvent(FocusEvent)"); sipClassTypeDef sipTypeDef__core_wxFocusEvent = { { -1, 0, 0, SIP_TYPE_CLASS, sipNameNr_wxFocusEvent, {0} }, { sipNameNr_FocusEvent, {0, 0, 1}, 2, methods_wxFocusEvent, 0, 0, 1, variables_wxFocusEvent, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, doc_wxFocusEvent, -1, -1, supers_wxFocusEvent, 0, init_wxFocusEvent, 0, 0, #if PY_MAJOR_VERSION >= 3 0, 0, #else 0, 0, 0, 0, #endif dealloc_wxFocusEvent, 0, 0, 0, release_wxFocusEvent, cast_wxFocusEvent, 0, 0, 0 };