Files
Phoenix/sip/cpp/sip_corewxSetCursorEvent.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

459 lines
12 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 1191 "sip/gen/event.sip"
#include <wx/event.h>
#line 15 "sip_corewxSetCursorEvent.cpp"
#line 40 "sip/gen/object.sip"
#include <wx/object.h>
#line 19 "sip_corewxSetCursorEvent.cpp"
#line 129 "sip/gen/event.sip"
#include <wx/event.h>
#line 22 "sip_corewxSetCursorEvent.cpp"
#line 17 "sip/gen/object.sip"
#include <wx/object.h>
#line 25 "sip_corewxSetCursorEvent.cpp"
#line 84 "sip/gen/object.sip"
#include <wx/object.h>
#line 28 "sip_corewxSetCursorEvent.cpp"
class sipwxSetCursorEvent : public wxSetCursorEvent
{
public:
sipwxSetCursorEvent(wxCoord,wxCoord);
sipwxSetCursorEvent(const wxSetCursorEvent&);
virtual ~sipwxSetCursorEvent();
/*
* There is a protected method for every virtual method visible from
* this class.
*/
protected:
wxEvent * Clone();
wxEventCategory GetEventCategory();
wxClassInfo * GetClassInfo();
public:
sipSimpleWrapper *sipPySelf;
private:
sipwxSetCursorEvent(const sipwxSetCursorEvent &);
sipwxSetCursorEvent &operator = (const sipwxSetCursorEvent &);
char sipPyMethods[3];
};
sipwxSetCursorEvent::sipwxSetCursorEvent(wxCoord x,wxCoord y): wxSetCursorEvent(x,y), sipPySelf(0)
{
memset(sipPyMethods, 0, sizeof (sipPyMethods));
}
sipwxSetCursorEvent::sipwxSetCursorEvent(const wxSetCursorEvent& a0): wxSetCursorEvent(a0), sipPySelf(0)
{
memset(sipPyMethods, 0, sizeof (sipPyMethods));
}
sipwxSetCursorEvent::~sipwxSetCursorEvent()
{
sipCommonDtor(sipPySelf);
}
wxEvent * sipwxSetCursorEvent::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 sipwxSetCursorEvent::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 * sipwxSetCursorEvent::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_wxSetCursorEvent_GetCursor, "SetCursorEvent.GetCursor() -> Cursor");
extern "C" {static PyObject *meth_wxSetCursorEvent_GetCursor(PyObject *, PyObject *);}
static PyObject *meth_wxSetCursorEvent_GetCursor(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxSetCursorEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSetCursorEvent, &sipCpp))
{
wxCursor *sipRes;
try
{
sipRes = new wxCursor(sipCpp->GetCursor());
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return sipConvertFromNewType(sipRes,sipType_wxCursor,NULL);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_SetCursorEvent, sipName_GetCursor, doc_wxSetCursorEvent_GetCursor);
return NULL;
}
PyDoc_STRVAR(doc_wxSetCursorEvent_GetX, "SetCursorEvent.GetX() -> int");
extern "C" {static PyObject *meth_wxSetCursorEvent_GetX(PyObject *, PyObject *);}
static PyObject *meth_wxSetCursorEvent_GetX(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxSetCursorEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSetCursorEvent, &sipCpp))
{
wxCoord sipRes;
try
{
sipRes = sipCpp->GetX();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return SIPLong_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_SetCursorEvent, sipName_GetX, doc_wxSetCursorEvent_GetX);
return NULL;
}
PyDoc_STRVAR(doc_wxSetCursorEvent_GetY, "SetCursorEvent.GetY() -> int");
extern "C" {static PyObject *meth_wxSetCursorEvent_GetY(PyObject *, PyObject *);}
static PyObject *meth_wxSetCursorEvent_GetY(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxSetCursorEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSetCursorEvent, &sipCpp))
{
wxCoord sipRes;
try
{
sipRes = sipCpp->GetY();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return SIPLong_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_SetCursorEvent, sipName_GetY, doc_wxSetCursorEvent_GetY);
return NULL;
}
PyDoc_STRVAR(doc_wxSetCursorEvent_HasCursor, "SetCursorEvent.HasCursor() -> bool");
extern "C" {static PyObject *meth_wxSetCursorEvent_HasCursor(PyObject *, PyObject *);}
static PyObject *meth_wxSetCursorEvent_HasCursor(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
wxSetCursorEvent *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSetCursorEvent, &sipCpp))
{
bool sipRes;
try
{
sipRes = sipCpp->HasCursor();
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
return PyBool_FromLong(sipRes);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_SetCursorEvent, sipName_HasCursor, doc_wxSetCursorEvent_HasCursor);
return NULL;
}
PyDoc_STRVAR(doc_wxSetCursorEvent_SetCursor, "SetCursorEvent.SetCursor(Cursor)");
extern "C" {static PyObject *meth_wxSetCursorEvent_SetCursor(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxSetCursorEvent_SetCursor(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
{
const wxCursor * cursor;
wxSetCursorEvent *sipCpp;
static const char *sipKwdList[] = {
sipName_cursor,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSetCursorEvent, &sipCpp, sipType_wxCursor, &cursor))
{
try
{
sipCpp->SetCursor(*cursor);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_SetCursorEvent, sipName_SetCursor, doc_wxSetCursorEvent_SetCursor);
return NULL;
}
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_wxSetCursorEvent(void *, const sipTypeDef *);}
static void *cast_wxSetCursorEvent(void *ptr, const sipTypeDef *targetType)
{
void *res;
if (targetType == sipType_wxSetCursorEvent)
return ptr;
if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxSetCursorEvent *)ptr,targetType)) != NULL)
return res;
return NULL;
}
/* Call the instance's destructor. */
extern "C" {static void release_wxSetCursorEvent(void *, int);}
static void release_wxSetCursorEvent(void *sipCppV,int sipState)
{
if (sipState & SIP_DERIVED_CLASS)
delete reinterpret_cast<sipwxSetCursorEvent *>(sipCppV);
else
delete reinterpret_cast<wxSetCursorEvent *>(sipCppV);
}
extern "C" {static void dealloc_wxSetCursorEvent(sipSimpleWrapper *);}
static void dealloc_wxSetCursorEvent(sipSimpleWrapper *sipSelf)
{
if (sipIsDerived(sipSelf))
reinterpret_cast<sipwxSetCursorEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
if (sipIsPyOwned(sipSelf))
{
release_wxSetCursorEvent(sipGetAddress(sipSelf),sipSelf->flags);
}
}
extern "C" {static void *init_wxSetCursorEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_wxSetCursorEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
sipwxSetCursorEvent *sipCpp = 0;
{
wxCoord x = 0;
wxCoord y = 0;
static const char *sipKwdList[] = {
sipName_x,
sipName_y,
};
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &x, &y))
{
try
{
sipCpp = new sipwxSetCursorEvent(x,y);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
sipCpp->sipPySelf = sipSelf;
return sipCpp;
}
}
{
const wxSetCursorEvent * a0;
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxSetCursorEvent, &a0))
{
try
{
sipCpp = new sipwxSetCursorEvent(*a0);
}
catch (...)
{
sipRaiseUnknownException();
return NULL;
}
sipCpp->sipPySelf = sipSelf;
return sipCpp;
}
}
return NULL;
}
/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxSetCursorEvent[] = {{19, 255, 1}};
static PyMethodDef methods_wxSetCursorEvent[] = {
{SIP_MLNAME_CAST(sipName_GetCursor), meth_wxSetCursorEvent_GetCursor, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSetCursorEvent_GetCursor)},
{SIP_MLNAME_CAST(sipName_GetX), meth_wxSetCursorEvent_GetX, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSetCursorEvent_GetX)},
{SIP_MLNAME_CAST(sipName_GetY), meth_wxSetCursorEvent_GetY, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSetCursorEvent_GetY)},
{SIP_MLNAME_CAST(sipName_HasCursor), meth_wxSetCursorEvent_HasCursor, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSetCursorEvent_HasCursor)},
{SIP_MLNAME_CAST(sipName_SetCursor), (PyCFunction)meth_wxSetCursorEvent_SetCursor, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSetCursorEvent_SetCursor)}
};
sipVariableDef variables_wxSetCursorEvent[] = {
{PropertyVariable, sipName_Y, &methods_wxSetCursorEvent[2], NULL, NULL, NULL},
{PropertyVariable, sipName_X, &methods_wxSetCursorEvent[1], NULL, NULL, NULL},
{PropertyVariable, sipName_Cursor, &methods_wxSetCursorEvent[0], &methods_wxSetCursorEvent[4], NULL, NULL},
};
PyDoc_STRVAR(doc_wxSetCursorEvent, "\1SetCursorEvent(int x=0, int y=0)\n"
"SetCursorEvent(SetCursorEvent)");
sipClassTypeDef sipTypeDef__core_wxSetCursorEvent = {
{
-1,
0,
0,
SIP_TYPE_CLASS,
sipNameNr_wxSetCursorEvent,
{0}
},
{
sipNameNr_SetCursorEvent,
{0, 0, 1},
5, methods_wxSetCursorEvent,
0, 0,
3, variables_wxSetCursorEvent,
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
doc_wxSetCursorEvent,
-1,
-1,
supers_wxSetCursorEvent,
0,
init_wxSetCursorEvent,
0,
0,
#if PY_MAJOR_VERSION >= 3
0,
0,
#else
0,
0,
0,
0,
#endif
dealloc_wxSetCursorEvent,
0,
0,
0,
release_wxSetCursorEvent,
cast_wxSetCursorEvent,
0,
0,
0
};