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
391 lines
10 KiB
C++
391 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 427 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 15 "sip_corewxDropFilesEvent.cpp"
|
|
|
|
#line 23 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 19 "sip_corewxDropFilesEvent.cpp"
|
|
#line 40 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 22 "sip_corewxDropFilesEvent.cpp"
|
|
#line 129 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 25 "sip_corewxDropFilesEvent.cpp"
|
|
#line 17 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 28 "sip_corewxDropFilesEvent.cpp"
|
|
#line 84 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 31 "sip_corewxDropFilesEvent.cpp"
|
|
|
|
|
|
class sipwxDropFilesEvent : public wxDropFilesEvent
|
|
{
|
|
public:
|
|
sipwxDropFilesEvent(wxEventType,int,wxString *);
|
|
sipwxDropFilesEvent(const wxDropFilesEvent&);
|
|
virtual ~sipwxDropFilesEvent();
|
|
|
|
/*
|
|
* There is a protected method for every virtual method visible from
|
|
* this class.
|
|
*/
|
|
protected:
|
|
wxEvent * Clone();
|
|
wxEventCategory GetEventCategory();
|
|
wxClassInfo * GetClassInfo();
|
|
|
|
public:
|
|
sipSimpleWrapper *sipPySelf;
|
|
|
|
private:
|
|
sipwxDropFilesEvent(const sipwxDropFilesEvent &);
|
|
sipwxDropFilesEvent &operator = (const sipwxDropFilesEvent &);
|
|
|
|
char sipPyMethods[3];
|
|
};
|
|
|
|
sipwxDropFilesEvent::sipwxDropFilesEvent(wxEventType id,int noFiles,wxString *files): wxDropFilesEvent(id,noFiles,files), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxDropFilesEvent::sipwxDropFilesEvent(const wxDropFilesEvent& a0): wxDropFilesEvent(a0), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxDropFilesEvent::~sipwxDropFilesEvent()
|
|
{
|
|
sipCommonDtor(sipPySelf);
|
|
}
|
|
|
|
wxEvent * sipwxDropFilesEvent::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 sipwxDropFilesEvent::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 * sipwxDropFilesEvent::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_wxDropFilesEvent_GetFiles, "DropFilesEvent.GetFiles() -> String");
|
|
|
|
extern "C" {static PyObject *meth_wxDropFilesEvent_GetFiles(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxDropFilesEvent_GetFiles(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxDropFilesEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropFilesEvent, &sipCpp))
|
|
{
|
|
wxString *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetFiles();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromType(sipRes,sipType_wxString,NULL);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_DropFilesEvent, sipName_GetFiles, doc_wxDropFilesEvent_GetFiles);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxDropFilesEvent_GetNumberOfFiles, "DropFilesEvent.GetNumberOfFiles() -> int");
|
|
|
|
extern "C" {static PyObject *meth_wxDropFilesEvent_GetNumberOfFiles(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxDropFilesEvent_GetNumberOfFiles(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxDropFilesEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropFilesEvent, &sipCpp))
|
|
{
|
|
int sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetNumberOfFiles();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return SIPLong_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_DropFilesEvent, sipName_GetNumberOfFiles, doc_wxDropFilesEvent_GetNumberOfFiles);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxDropFilesEvent_GetPosition, "DropFilesEvent.GetPosition() -> Point");
|
|
|
|
extern "C" {static PyObject *meth_wxDropFilesEvent_GetPosition(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxDropFilesEvent_GetPosition(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxDropFilesEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropFilesEvent, &sipCpp))
|
|
{
|
|
wxPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxPoint(sipCpp->GetPosition());
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxPoint,NULL);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_DropFilesEvent, sipName_GetPosition, doc_wxDropFilesEvent_GetPosition);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_wxDropFilesEvent(void *, const sipTypeDef *);}
|
|
static void *cast_wxDropFilesEvent(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
void *res;
|
|
|
|
if (targetType == sipType_wxDropFilesEvent)
|
|
return ptr;
|
|
|
|
if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxDropFilesEvent *)ptr,targetType)) != NULL)
|
|
return res;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxDropFilesEvent(void *, int);}
|
|
static void release_wxDropFilesEvent(void *sipCppV,int sipState)
|
|
{
|
|
if (sipState & SIP_DERIVED_CLASS)
|
|
delete reinterpret_cast<sipwxDropFilesEvent *>(sipCppV);
|
|
else
|
|
delete reinterpret_cast<wxDropFilesEvent *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxDropFilesEvent(sipSimpleWrapper *);}
|
|
static void dealloc_wxDropFilesEvent(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsDerived(sipSelf))
|
|
reinterpret_cast<sipwxDropFilesEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
|
|
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxDropFilesEvent(sipGetAddress(sipSelf),sipSelf->flags);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxDropFilesEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxDropFilesEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
sipwxDropFilesEvent *sipCpp = 0;
|
|
|
|
{
|
|
wxEventType id = 0;
|
|
int noFiles = 0;
|
|
wxString * files = 0;
|
|
int filesState = 0;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_id,
|
|
sipName_noFiles,
|
|
sipName_files,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|iiJ0", &id, &noFiles, sipType_wxString,&files, &filesState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxDropFilesEvent(id,noFiles,files);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(files,sipType_wxString,filesState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(files,sipType_wxString,filesState);
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxDropFilesEvent * a0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxDropFilesEvent, &a0))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxDropFilesEvent(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Define this type's super-types. */
|
|
static sipEncodedTypeDef supers_wxDropFilesEvent[] = {{19, 255, 1}};
|
|
|
|
|
|
static PyMethodDef methods_wxDropFilesEvent[] = {
|
|
{SIP_MLNAME_CAST(sipName_GetFiles), meth_wxDropFilesEvent_GetFiles, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropFilesEvent_GetFiles)},
|
|
{SIP_MLNAME_CAST(sipName_GetNumberOfFiles), meth_wxDropFilesEvent_GetNumberOfFiles, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropFilesEvent_GetNumberOfFiles)},
|
|
{SIP_MLNAME_CAST(sipName_GetPosition), meth_wxDropFilesEvent_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropFilesEvent_GetPosition)}
|
|
};
|
|
|
|
sipVariableDef variables_wxDropFilesEvent[] = {
|
|
{PropertyVariable, sipName_Position, &methods_wxDropFilesEvent[2], NULL, NULL, NULL},
|
|
{PropertyVariable, sipName_NumberOfFiles, &methods_wxDropFilesEvent[1], NULL, NULL, NULL},
|
|
{PropertyVariable, sipName_Files, &methods_wxDropFilesEvent[0], NULL, NULL, NULL},
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxDropFilesEvent, "\1DropFilesEvent(int id=0, int noFiles=0, String files=None)\n"
|
|
"DropFilesEvent(DropFilesEvent)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxDropFilesEvent = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxDropFilesEvent,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_DropFilesEvent,
|
|
{0, 0, 1},
|
|
3, methods_wxDropFilesEvent,
|
|
0, 0,
|
|
3, variables_wxDropFilesEvent,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxDropFilesEvent,
|
|
-1,
|
|
-1,
|
|
supers_wxDropFilesEvent,
|
|
0,
|
|
init_wxDropFilesEvent,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxDropFilesEvent,
|
|
0,
|
|
0,
|
|
0,
|
|
release_wxDropFilesEvent,
|
|
cast_wxDropFilesEvent,
|
|
0,
|
|
0,
|
|
0
|
|
};
|