mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-10 13:57:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
410 lines
10 KiB
C++
410 lines
10 KiB
C++
/*
|
|
* 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 577 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 15 "sip_corewxIdleEvent.cpp"
|
|
|
|
#line 40 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 19 "sip_corewxIdleEvent.cpp"
|
|
#line 129 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 22 "sip_corewxIdleEvent.cpp"
|
|
#line 17 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 25 "sip_corewxIdleEvent.cpp"
|
|
#line 84 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 28 "sip_corewxIdleEvent.cpp"
|
|
|
|
|
|
class sipwxIdleEvent : public wxIdleEvent
|
|
{
|
|
public:
|
|
sipwxIdleEvent();
|
|
sipwxIdleEvent(const wxIdleEvent&);
|
|
virtual ~sipwxIdleEvent();
|
|
|
|
/*
|
|
* There is a protected method for every virtual method visible from
|
|
* this class.
|
|
*/
|
|
protected:
|
|
wxEvent * Clone();
|
|
wxEventCategory GetEventCategory();
|
|
wxClassInfo * GetClassInfo();
|
|
|
|
public:
|
|
sipSimpleWrapper *sipPySelf;
|
|
|
|
private:
|
|
sipwxIdleEvent(const sipwxIdleEvent &);
|
|
sipwxIdleEvent &operator = (const sipwxIdleEvent &);
|
|
|
|
char sipPyMethods[3];
|
|
};
|
|
|
|
sipwxIdleEvent::sipwxIdleEvent(): wxIdleEvent(), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxIdleEvent::sipwxIdleEvent(const wxIdleEvent& a0): wxIdleEvent(a0), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxIdleEvent::~sipwxIdleEvent()
|
|
{
|
|
sipCommonDtor(sipPySelf);
|
|
}
|
|
|
|
wxEvent * sipwxIdleEvent::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 sipwxIdleEvent::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 * sipwxIdleEvent::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_wxIdleEvent_MoreRequested, "IdleEvent.MoreRequested() -> bool");
|
|
|
|
extern "C" {static PyObject *meth_wxIdleEvent_MoreRequested(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxIdleEvent_MoreRequested(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxIdleEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxIdleEvent, &sipCpp))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->MoreRequested();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_IdleEvent, sipName_MoreRequested, doc_wxIdleEvent_MoreRequested);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxIdleEvent_RequestMore, "IdleEvent.RequestMore(bool needMore=True)");
|
|
|
|
extern "C" {static PyObject *meth_wxIdleEvent_RequestMore(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxIdleEvent_RequestMore(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
bool needMore = 1;
|
|
wxIdleEvent *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_needMore,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "B|b", &sipSelf, sipType_wxIdleEvent, &sipCpp, &needMore))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->RequestMore(needMore);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_IdleEvent, sipName_RequestMore, doc_wxIdleEvent_RequestMore);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxIdleEvent_GetMode, "IdleEvent.GetMode() -> IdleMode");
|
|
|
|
extern "C" {static PyObject *meth_wxIdleEvent_GetMode(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxIdleEvent_GetMode(PyObject *, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
if (sipParseArgs(&sipParseErr, sipArgs, ""))
|
|
{
|
|
wxIdleMode sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = wxIdleEvent::GetMode();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromEnum(sipRes,sipType_wxIdleMode);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_IdleEvent, sipName_GetMode, doc_wxIdleEvent_GetMode);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxIdleEvent_SetMode, "IdleEvent.SetMode(IdleMode)");
|
|
|
|
extern "C" {static PyObject *meth_wxIdleEvent_SetMode(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxIdleEvent_SetMode(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxIdleMode mode;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_mode,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "E", sipType_wxIdleMode, &mode))
|
|
{
|
|
try
|
|
{
|
|
wxIdleEvent::SetMode(mode);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_IdleEvent, sipName_SetMode, doc_wxIdleEvent_SetMode);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_wxIdleEvent(void *, const sipTypeDef *);}
|
|
static void *cast_wxIdleEvent(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
void *res;
|
|
|
|
if (targetType == sipType_wxIdleEvent)
|
|
return ptr;
|
|
|
|
if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxIdleEvent *)ptr,targetType)) != NULL)
|
|
return res;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxIdleEvent(void *, int);}
|
|
static void release_wxIdleEvent(void *sipCppV,int sipState)
|
|
{
|
|
if (sipState & SIP_DERIVED_CLASS)
|
|
delete reinterpret_cast<sipwxIdleEvent *>(sipCppV);
|
|
else
|
|
delete reinterpret_cast<wxIdleEvent *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxIdleEvent(sipSimpleWrapper *);}
|
|
static void dealloc_wxIdleEvent(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsDerived(sipSelf))
|
|
reinterpret_cast<sipwxIdleEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
|
|
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxIdleEvent(sipGetAddress(sipSelf),sipSelf->flags);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxIdleEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxIdleEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
sipwxIdleEvent *sipCpp = 0;
|
|
|
|
{
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxIdleEvent();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxIdleEvent * a0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxIdleEvent, &a0))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxIdleEvent(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Define this type's super-types. */
|
|
static sipEncodedTypeDef supers_wxIdleEvent[] = {{19, 255, 1}};
|
|
|
|
|
|
static PyMethodDef methods_wxIdleEvent[] = {
|
|
{SIP_MLNAME_CAST(sipName_GetMode), meth_wxIdleEvent_GetMode, METH_VARARGS, SIP_MLDOC_CAST(doc_wxIdleEvent_GetMode)},
|
|
{SIP_MLNAME_CAST(sipName_MoreRequested), meth_wxIdleEvent_MoreRequested, METH_VARARGS, SIP_MLDOC_CAST(doc_wxIdleEvent_MoreRequested)},
|
|
{SIP_MLNAME_CAST(sipName_RequestMore), (PyCFunction)meth_wxIdleEvent_RequestMore, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxIdleEvent_RequestMore)},
|
|
{SIP_MLNAME_CAST(sipName_SetMode), (PyCFunction)meth_wxIdleEvent_SetMode, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxIdleEvent_SetMode)}
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxIdleEvent, "\1IdleEvent()\n"
|
|
"IdleEvent(IdleEvent)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxIdleEvent = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxIdleEvent,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_IdleEvent,
|
|
{0, 0, 1},
|
|
4, methods_wxIdleEvent,
|
|
0, 0,
|
|
0, 0,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxIdleEvent,
|
|
-1,
|
|
-1,
|
|
supers_wxIdleEvent,
|
|
0,
|
|
init_wxIdleEvent,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxIdleEvent,
|
|
0,
|
|
0,
|
|
0,
|
|
release_wxIdleEvent,
|
|
cast_wxIdleEvent,
|
|
0,
|
|
0,
|
|
0
|
|
};
|