/* * 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 1116 "sip/gen/event.sip" #include #line 15 "sip_corewxScrollEvent.cpp" #line 40 "sip/gen/object.sip" #include #line 19 "sip_corewxScrollEvent.cpp" #line 129 "sip/gen/event.sip" #include #line 22 "sip_corewxScrollEvent.cpp" #line 17 "sip/gen/object.sip" #include #line 25 "sip_corewxScrollEvent.cpp" #line 84 "sip/gen/object.sip" #include #line 28 "sip_corewxScrollEvent.cpp" class sipwxScrollEvent : public wxScrollEvent { public: sipwxScrollEvent(wxEventType,int,int,int); sipwxScrollEvent(const wxScrollEvent&); virtual ~sipwxScrollEvent(); /* * There is a protected method for every virtual method visible from * this class. */ protected: wxEvent * Clone(); wxEventCategory GetEventCategory(); wxClassInfo * GetClassInfo(); public: sipSimpleWrapper *sipPySelf; private: sipwxScrollEvent(const sipwxScrollEvent &); sipwxScrollEvent &operator = (const sipwxScrollEvent &); char sipPyMethods[3]; }; sipwxScrollEvent::sipwxScrollEvent(wxEventType commandType,int id,int pos,int orientation): wxScrollEvent(commandType,id,pos,orientation), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxScrollEvent::sipwxScrollEvent(const wxScrollEvent& a0): wxScrollEvent(a0), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxScrollEvent::~sipwxScrollEvent() { sipCommonDtor(sipPySelf); } wxEvent * sipwxScrollEvent::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 sipwxScrollEvent::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 * sipwxScrollEvent::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_wxScrollEvent_GetOrientation, "ScrollEvent.GetOrientation() -> int"); extern "C" {static PyObject *meth_wxScrollEvent_GetOrientation(PyObject *, PyObject *);} static PyObject *meth_wxScrollEvent_GetOrientation(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxScrollEvent *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxScrollEvent, &sipCpp)) { int sipRes; try { sipRes = sipCpp->GetOrientation(); } catch (...) { sipRaiseUnknownException(); return NULL; } return SIPLong_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ScrollEvent, sipName_GetOrientation, doc_wxScrollEvent_GetOrientation); return NULL; } PyDoc_STRVAR(doc_wxScrollEvent_GetPosition, "ScrollEvent.GetPosition() -> int"); extern "C" {static PyObject *meth_wxScrollEvent_GetPosition(PyObject *, PyObject *);} static PyObject *meth_wxScrollEvent_GetPosition(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxScrollEvent *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxScrollEvent, &sipCpp)) { int sipRes; try { sipRes = sipCpp->GetPosition(); } catch (...) { sipRaiseUnknownException(); return NULL; } return SIPLong_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ScrollEvent, sipName_GetPosition, doc_wxScrollEvent_GetPosition); return NULL; } PyDoc_STRVAR(doc_wxScrollEvent_SetOrientation, "ScrollEvent.SetOrientation(int)"); extern "C" {static PyObject *meth_wxScrollEvent_SetOrientation(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxScrollEvent_SetOrientation(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { int orient; wxScrollEvent *sipCpp; static const char *sipKwdList[] = { sipName_orient, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxScrollEvent, &sipCpp, &orient)) { try { sipCpp->SetOrientation(orient); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ScrollEvent, sipName_SetOrientation, doc_wxScrollEvent_SetOrientation); return NULL; } PyDoc_STRVAR(doc_wxScrollEvent_SetPosition, "ScrollEvent.SetPosition(int)"); extern "C" {static PyObject *meth_wxScrollEvent_SetPosition(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxScrollEvent_SetPosition(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { int pos; wxScrollEvent *sipCpp; static const char *sipKwdList[] = { sipName_pos, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxScrollEvent, &sipCpp, &pos)) { try { sipCpp->SetPosition(pos); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ScrollEvent, sipName_SetPosition, doc_wxScrollEvent_SetPosition); return NULL; } /* Cast a pointer to a type somewhere in its superclass hierarchy. */ extern "C" {static void *cast_wxScrollEvent(void *, const sipTypeDef *);} static void *cast_wxScrollEvent(void *ptr, const sipTypeDef *targetType) { void *res; if (targetType == sipType_wxScrollEvent) return ptr; if ((res = ((const sipClassTypeDef *)sipType_wxCommandEvent)->ctd_cast((wxCommandEvent *)(wxScrollEvent *)ptr,targetType)) != NULL) return res; return NULL; } /* Call the instance's destructor. */ extern "C" {static void release_wxScrollEvent(void *, int);} static void release_wxScrollEvent(void *sipCppV,int sipState) { if (sipState & SIP_DERIVED_CLASS) delete reinterpret_cast(sipCppV); else delete reinterpret_cast(sipCppV); } extern "C" {static void dealloc_wxScrollEvent(sipSimpleWrapper *);} static void dealloc_wxScrollEvent(sipSimpleWrapper *sipSelf) { if (sipIsDerived(sipSelf)) reinterpret_cast(sipGetAddress(sipSelf))->sipPySelf = NULL; if (sipIsPyOwned(sipSelf)) { release_wxScrollEvent(sipGetAddress(sipSelf),sipSelf->flags); } } extern "C" {static void *init_wxScrollEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);} static void *init_wxScrollEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr) { sipwxScrollEvent *sipCpp = 0; { wxEventType commandType = wxEVT_NULL; int id = 0; int pos = 0; int orientation = 0; static const char *sipKwdList[] = { sipName_commandType, sipName_id, sipName_pos, sipName_orientation, }; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|iiii", &commandType, &id, &pos, &orientation)) { try { sipCpp = new sipwxScrollEvent(commandType,id,pos,orientation); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } { const wxScrollEvent * a0; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxScrollEvent, &a0)) { try { sipCpp = new sipwxScrollEvent(*a0); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } return NULL; } /* Define this type's super-types. */ static sipEncodedTypeDef supers_wxScrollEvent[] = {{9, 255, 1}}; static PyMethodDef methods_wxScrollEvent[] = { {SIP_MLNAME_CAST(sipName_GetOrientation), meth_wxScrollEvent_GetOrientation, METH_VARARGS, SIP_MLDOC_CAST(doc_wxScrollEvent_GetOrientation)}, {SIP_MLNAME_CAST(sipName_GetPosition), meth_wxScrollEvent_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxScrollEvent_GetPosition)}, {SIP_MLNAME_CAST(sipName_SetOrientation), (PyCFunction)meth_wxScrollEvent_SetOrientation, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxScrollEvent_SetOrientation)}, {SIP_MLNAME_CAST(sipName_SetPosition), (PyCFunction)meth_wxScrollEvent_SetPosition, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxScrollEvent_SetPosition)} }; sipVariableDef variables_wxScrollEvent[] = { {PropertyVariable, sipName_Position, &methods_wxScrollEvent[1], &methods_wxScrollEvent[3], NULL, NULL}, {PropertyVariable, sipName_Orientation, &methods_wxScrollEvent[0], &methods_wxScrollEvent[2], NULL, NULL}, }; PyDoc_STRVAR(doc_wxScrollEvent, "\1ScrollEvent(int commandType=wxEVT_NULL, int id=0, int pos=0, int orientation=0)\n" "ScrollEvent(ScrollEvent)"); sipClassTypeDef sipTypeDef__core_wxScrollEvent = { { -1, 0, 0, SIP_TYPE_CLASS, sipNameNr_wxScrollEvent, {0} }, { sipNameNr_ScrollEvent, {0, 0, 1}, 4, methods_wxScrollEvent, 0, 0, 2, variables_wxScrollEvent, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, doc_wxScrollEvent, -1, -1, supers_wxScrollEvent, 0, init_wxScrollEvent, 0, 0, #if PY_MAJOR_VERSION >= 3 0, 0, #else 0, 0, 0, 0, #endif dealloc_wxScrollEvent, 0, 0, 0, release_wxScrollEvent, cast_wxScrollEvent, 0, 0, 0 };