Files
Phoenix/sip/cpp/sip_corewxCommandEvent.cpp
Robin Dunn 62e8448d8e regenerated sip and c++ files
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-18 08:32:48 +00:00

688 lines
19 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 205 "sip/gen/event.sip"
#include <wx/event.h>
#line 15 "sip_corewxCommandEvent.cpp"
#line 40 "sip/gen/object.sip"
#include <wx/object.h>
#line 19 "sip_corewxCommandEvent.cpp"
#line 129 "sip/gen/event.sip"
#include <wx/event.h>
#line 22 "sip_corewxCommandEvent.cpp"
#line 17 "sip/gen/object.sip"
#include <wx/object.h>
#line 25 "sip_corewxCommandEvent.cpp"
#line 84 "sip/gen/object.sip"
#include <wx/object.h>
#line 28 "sip_corewxCommandEvent.cpp"
class sipwxCommandEvent : public wxCommandEvent
{
public:
sipwxCommandEvent(wxEventType,int);
sipwxCommandEvent(const wxCommandEvent&);
virtual ~sipwxCommandEvent();
/*
* There is a protected method for every virtual method visible from
* this class.
*/
protected:
wxEvent * Clone();
wxEventCategory GetEventCategory();
wxClassInfo * GetClassInfo();
public:
sipSimpleWrapper *sipPySelf;
private:
sipwxCommandEvent(const sipwxCommandEvent &);
sipwxCommandEvent &operator = (const sipwxCommandEvent &);
char sipPyMethods[3];
};
sipwxCommandEvent::sipwxCommandEvent(wxEventType commandEventType,int id): wxCommandEvent(commandEventType,id), sipPySelf(0)
{
memset(sipPyMethods, 0, sizeof (sipPyMethods));
}
sipwxCommandEvent::sipwxCommandEvent(const wxCommandEvent& a0): wxCommandEvent(a0), sipPySelf(0)
{
memset(sipPyMethods, 0, sizeof (sipPyMethods));
}
sipwxCommandEvent::~sipwxCommandEvent()
{
sipCommonDtor(sipPySelf);
}
wxEvent * sipwxCommandEvent::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 sipwxCommandEvent::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 * sipwxCommandEvent::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_wxCommandEvent_GetExtraLong, "CommandEvent.GetExtraLong() -> int");
extern "C" {static PyObject *meth_wxCommandEvent_GetExtraLong(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_GetExtraLong(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
long sipRes;
try
{
sipRes = sipCpp->GetExtraLong();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return PyLong_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_GetExtraLong, doc_wxCommandEvent_GetExtraLong);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_GetInt, "CommandEvent.GetInt() -> int");
extern "C" {static PyObject *meth_wxCommandEvent_GetInt(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_GetInt(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
int sipRes;
try
{
sipRes = sipCpp->GetInt();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return SIPLong_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_GetInt, doc_wxCommandEvent_GetInt);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_GetSelection, "CommandEvent.GetSelection() -> int");
extern "C" {static PyObject *meth_wxCommandEvent_GetSelection(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_GetSelection(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
int sipRes;
try
{
sipRes = sipCpp->GetSelection();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return SIPLong_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_GetSelection, doc_wxCommandEvent_GetSelection);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_GetString, "CommandEvent.GetString() -> String");
extern "C" {static PyObject *meth_wxCommandEvent_GetString(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_GetString(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
wxString *sipRes;
try
{
sipRes = new wxString(sipCpp->GetString());
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return sipConvertFromNewType(sipRes,sipType_wxString,NULL);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_GetString, doc_wxCommandEvent_GetString);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_IsChecked, "CommandEvent.IsChecked() -> bool");
extern "C" {static PyObject *meth_wxCommandEvent_IsChecked(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_IsChecked(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
bool sipRes;
try
{
sipRes = sipCpp->IsChecked();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return PyBool_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_IsChecked, doc_wxCommandEvent_IsChecked);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_IsSelection, "CommandEvent.IsSelection() -> bool");
extern "C" {static PyObject *meth_wxCommandEvent_IsSelection(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_IsSelection(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
bool sipRes;
try
{
sipRes = sipCpp->IsSelection();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return PyBool_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_IsSelection, doc_wxCommandEvent_IsSelection);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_SetExtraLong, "CommandEvent.SetExtraLong(int)");
extern "C" {static PyObject *meth_wxCommandEvent_SetExtraLong(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_SetExtraLong(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
{
long extraLong;
wxCommandEvent *sipCpp;
static const char *sipKwdList[] = {
sipName_extraLong,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bl", &sipSelf, sipType_wxCommandEvent, &sipCpp, &extraLong))
{
try
{
sipCpp->SetExtraLong(extraLong);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_SetExtraLong, doc_wxCommandEvent_SetExtraLong);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_SetInt, "CommandEvent.SetInt(int)");
extern "C" {static PyObject *meth_wxCommandEvent_SetInt(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_SetInt(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
{
int intCommand;
wxCommandEvent *sipCpp;
static const char *sipKwdList[] = {
sipName_intCommand,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxCommandEvent, &sipCpp, &intCommand))
{
try
{
sipCpp->SetInt(intCommand);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_SetInt, doc_wxCommandEvent_SetInt);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_SetString, "CommandEvent.SetString(String)");
extern "C" {static PyObject *meth_wxCommandEvent_SetString(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_SetString(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
{
const wxString * string;
int stringState = 0;
wxCommandEvent *sipCpp;
static const char *sipKwdList[] = {
sipName_string,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxCommandEvent, &sipCpp, sipType_wxString,&string, &stringState))
{
try
{
sipCpp->SetString(*string);
}
catch (...)
{
sipReleaseType(const_cast<wxString *>(string),sipType_wxString,stringState);
sipRaiseUnknownException();
return NULL;
}
sipReleaseType(const_cast<wxString *>(string),sipType_wxString,stringState);
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_SetString, doc_wxCommandEvent_SetString);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_GetClientData, "CommandEvent.GetClientData() -> object");
extern "C" {static PyObject *meth_wxCommandEvent_GetClientData(PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_GetClientData(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxCommandEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxCommandEvent, &sipCpp))
{
PyObject * sipRes = 0;
#line 240 "sip/gen/event.sip"
wxPyClientData* data = (wxPyClientData*)sipCpp->GetClientObject();
if (data) {
Py_INCREF(data->m_obj);
sipRes = data->m_obj;
} else {
Py_INCREF(Py_None);
sipRes = Py_None;
}
#line 481 "sip_corewxCommandEvent.cpp"
return sipRes;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_GetClientData, doc_wxCommandEvent_GetClientData);
return NULL;
}
PyDoc_STRVAR(doc_wxCommandEvent_SetClientData, "CommandEvent.SetClientData(object)");
extern "C" {static PyObject *meth_wxCommandEvent_SetClientData(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxCommandEvent_SetClientData(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
{
PyObject * clientData;
wxCommandEvent *sipCpp;
static const char *sipKwdList[] = {
sipName_clientData,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BP0", &sipSelf, sipType_wxCommandEvent, &sipCpp, &clientData))
{
#line 252 "sip/gen/event.sip"
wxPyClientData* data = new wxPyClientData(clientData);
sipCpp->SetClientObject(data);
#line 515 "sip_corewxCommandEvent.cpp"
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_CommandEvent, sipName_SetClientData, doc_wxCommandEvent_SetClientData);
return NULL;
}
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_wxCommandEvent(void *, const sipTypeDef *);}
static void *cast_wxCommandEvent(void *ptr, const sipTypeDef *targetType)
{
void *res;
if (targetType == sipType_wxCommandEvent)
return ptr;
if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxCommandEvent *)ptr,targetType)) != NULL)
return res;
return NULL;
}
/* Call the instance's destructor. */
extern "C" {static void release_wxCommandEvent(void *, int);}
static void release_wxCommandEvent(void *sipCppV,int sipState)
{
if (sipState & SIP_DERIVED_CLASS)
delete reinterpret_cast<sipwxCommandEvent *>(sipCppV);
else
delete reinterpret_cast<wxCommandEvent *>(sipCppV);
}
extern "C" {static void dealloc_wxCommandEvent(sipSimpleWrapper *);}
static void dealloc_wxCommandEvent(sipSimpleWrapper *sipSelf)
{
if (sipIsDerived(sipSelf))
reinterpret_cast<sipwxCommandEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
if (sipIsPyOwned(sipSelf))
{
release_wxCommandEvent(sipGetAddress(sipSelf),sipSelf->flags);
}
}
extern "C" {static void *init_wxCommandEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_wxCommandEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
sipwxCommandEvent *sipCpp = 0;
{
wxEventType commandEventType = wxEVT_NULL;
int id = 0;
static const char *sipKwdList[] = {
sipName_commandEventType,
sipName_id,
};
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &commandEventType, &id))
{
try
{
sipCpp = new sipwxCommandEvent(commandEventType,id);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
sipCpp->sipPySelf = sipSelf;
return sipCpp;
}
}
{
const wxCommandEvent * a0;
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxCommandEvent, &a0))
{
try
{
sipCpp = new sipwxCommandEvent(*a0);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
sipCpp->sipPySelf = sipSelf;
return sipCpp;
}
}
return NULL;
}
/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxCommandEvent[] = {{19, 255, 1}};
static PyMethodDef methods_wxCommandEvent[] = {
{SIP_MLNAME_CAST(sipName_GetClientData), meth_wxCommandEvent_GetClientData, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_GetClientData)},
{SIP_MLNAME_CAST(sipName_GetExtraLong), meth_wxCommandEvent_GetExtraLong, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_GetExtraLong)},
{SIP_MLNAME_CAST(sipName_GetInt), meth_wxCommandEvent_GetInt, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_GetInt)},
{SIP_MLNAME_CAST(sipName_GetSelection), meth_wxCommandEvent_GetSelection, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_GetSelection)},
{SIP_MLNAME_CAST(sipName_GetString), meth_wxCommandEvent_GetString, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_GetString)},
{SIP_MLNAME_CAST(sipName_IsChecked), meth_wxCommandEvent_IsChecked, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_IsChecked)},
{SIP_MLNAME_CAST(sipName_IsSelection), meth_wxCommandEvent_IsSelection, METH_VARARGS, SIP_MLDOC_CAST(doc_wxCommandEvent_IsSelection)},
{SIP_MLNAME_CAST(sipName_SetClientData), (PyCFunction)meth_wxCommandEvent_SetClientData, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxCommandEvent_SetClientData)},
{SIP_MLNAME_CAST(sipName_SetExtraLong), (PyCFunction)meth_wxCommandEvent_SetExtraLong, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxCommandEvent_SetExtraLong)},
{SIP_MLNAME_CAST(sipName_SetInt), (PyCFunction)meth_wxCommandEvent_SetInt, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxCommandEvent_SetInt)},
{SIP_MLNAME_CAST(sipName_SetString), (PyCFunction)meth_wxCommandEvent_SetString, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxCommandEvent_SetString)}
};
sipVariableDef variables_wxCommandEvent[] = {
{PropertyVariable, sipName_String, &methods_wxCommandEvent[4], &methods_wxCommandEvent[10], NULL, NULL},
{PropertyVariable, sipName_Selection, &methods_wxCommandEvent[3], NULL, NULL, NULL},
{PropertyVariable, sipName_Int, &methods_wxCommandEvent[2], &methods_wxCommandEvent[9], NULL, NULL},
{PropertyVariable, sipName_ExtraLong, &methods_wxCommandEvent[1], &methods_wxCommandEvent[8], NULL, NULL},
{PropertyVariable, sipName_ClientData, &methods_wxCommandEvent[0], &methods_wxCommandEvent[7], NULL, NULL},
};
PyDoc_STRVAR(doc_wxCommandEvent, "\1CommandEvent(int commandEventType=wxEVT_NULL, int id=0)\n"
"CommandEvent(CommandEvent)");
sipClassTypeDef sipTypeDef__core_wxCommandEvent = {
{
-1,
0,
0,
SIP_TYPE_CLASS,
sipNameNr_wxCommandEvent,
{0}
},
{
sipNameNr_CommandEvent,
{0, 0, 1},
11, methods_wxCommandEvent,
0, 0,
5, variables_wxCommandEvent,
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
doc_wxCommandEvent,
-1,
-1,
supers_wxCommandEvent,
0,
init_wxCommandEvent,
0,
0,
#if PY_MAJOR_VERSION >= 3
0,
0,
#else
0,
0,
0,
0,
#endif
dealloc_wxCommandEvent,
0,
0,
0,
release_wxCommandEvent,
cast_wxCommandEvent,
0,
0,
0
};