/* Implementation : PYTHON */
#define SWIGPYTHON
+#include "Python.h"
+
#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
# define SWIGEXPORT(a) a
#endif
-#include "Python.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMouseEvent_GetLogicalPosition. Expected _wxDC_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSetCursorEvent_SetCursor. Expected _wxCursor_p.");
return NULL;
}
return _resultobj;
}
-#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode())
-static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- long _result;
- wxKeyEvent * _arg0;
- PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p.");
- return NULL;
- }
- }
-{
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (long )wxKeyEvent_KeyCode(_arg0);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("l",_result);
- return _resultobj;
-}
-
#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode())
static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
for (int i=0; i<count; i++) {
#if wxUSE_UNICODE
- PyList_SetItem(list, i, PyUnicode_FromUnicode(files[i], files[i].Len()));
+ PyList_SetItem(list, i, PyUnicode_FromWideChar(files[i], files[i].Len()));
#else
PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
return _resultobj;
}
+static void *SwigwxContextMenuEventTowxCommandEvent(void *ptr) {
+ wxContextMenuEvent *src;
+ wxCommandEvent *dest;
+ src = (wxContextMenuEvent *) ptr;
+ dest = (wxCommandEvent *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxContextMenuEventTowxEvent(void *ptr) {
+ wxContextMenuEvent *src;
+ wxEvent *dest;
+ src = (wxContextMenuEvent *) ptr;
+ dest = (wxEvent *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxContextMenuEventTowxObject(void *ptr) {
+ wxContextMenuEvent *src;
+ wxObject *dest;
+ src = (wxContextMenuEvent *) ptr;
+ dest = (wxObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxContextMenuEvent(_swigarg0,_swigarg1,_swigarg2) (new wxContextMenuEvent(_swigarg0,_swigarg1,_swigarg2))
+static PyObject *_wrap_new_wxContextMenuEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxContextMenuEvent * _result;
+ wxEventType _arg0 = (wxEventType ) wxEVT_NULL;
+ wxWindowID _arg1 = (wxWindowID ) 0;
+ wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
+ wxPoint temp;
+ PyObject * _obj2 = 0;
+ char *_kwnames[] = { "type","id","pt", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiO:new_wxContextMenuEvent",_kwnames,&_arg0,&_arg1,&_obj2))
+ return NULL;
+ if (_obj2)
+{
+ _arg2 = &temp;
+ if (! wxPoint_helper(_obj2, &_arg2))
+ return NULL;
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxContextMenuEvent_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxContextMenuEvent_GetPosition(_swigobj) (_swigobj->GetPosition())
+static PyObject *_wrap_wxContextMenuEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPoint * _result;
+ wxContextMenuEvent * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxContextMenuEvent_GetPosition",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxContextMenuEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxContextMenuEvent_GetPosition. Expected _wxContextMenuEvent_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0);
+ _result = (wxPoint *) &_result_ref;
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxContextMenuEvent_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0))
+static PyObject *_wrap_wxContextMenuEvent_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxContextMenuEvent * _arg0;
+ wxPoint * _arg1;
+ PyObject * _argo0 = 0;
+ wxPoint temp;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","pos", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxContextMenuEvent_SetPosition",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxContextMenuEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxContextMenuEvent_SetPosition. Expected _wxContextMenuEvent_p.");
+ return NULL;
+ }
+ }
+{
+ _arg1 = &temp;
+ if (! wxPoint_helper(_obj1, &_arg1))
+ return NULL;
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxContextMenuEvent_SetPosition(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static void *SwigwxTimerEventTowxEvent(void *ptr) {
wxTimerEvent *src;
wxEvent *dest;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iOll:new_wxTextUrlEvent",_kwnames,&_arg0,&_argo1,&_arg2,&_arg3))
return NULL;
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxTextUrlEvent. Expected _wxMouseEvent_p.");
return NULL;
}
{ "new_wxTextUrlEvent", (PyCFunction) _wrap_new_wxTextUrlEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxTimerEvent_GetInterval", (PyCFunction) _wrap_wxTimerEvent_GetInterval, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTimerEvent", (PyCFunction) _wrap_new_wxTimerEvent, METH_VARARGS | METH_KEYWORDS },
+ { "wxContextMenuEvent_SetPosition", (PyCFunction) _wrap_wxContextMenuEvent_SetPosition, METH_VARARGS | METH_KEYWORDS },
+ { "wxContextMenuEvent_GetPosition", (PyCFunction) _wrap_wxContextMenuEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxContextMenuEvent", (PyCFunction) _wrap_new_wxContextMenuEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindowDestroyEvent_GetWindow", (PyCFunction) _wrap_wxWindowDestroyEvent_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxWindowDestroyEvent", (PyCFunction) _wrap_new_wxWindowDestroyEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindowCreateEvent_GetWindow", (PyCFunction) _wrap_wxWindowCreateEvent_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_GetRawKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetRawKeyCode, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_HasModifiers", (PyCFunction) _wrap_wxKeyEvent_HasModifiers, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_GetKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS },
- { "wxKeyEvent_KeyCode", (PyCFunction) _wrap_wxKeyEvent_KeyCode, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_ShiftDown", (PyCFunction) _wrap_wxKeyEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_AltDown", (PyCFunction) _wrap_wxKeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS },
{ "_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent},
{ "_wxEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxEvent},
{ "_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent},
+ { "_wxEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxEvent},
{ "_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent},
{ "_wxEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent},
{ "_wxEvent","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxEvent},
{ "_wxChar","_char",0},
{ "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_wxCommandEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxCommandEvent},
+ { "_wxCommandEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxCommandEvent},
{ "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent},
{ "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent},
{ "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_wxObject","_wxPyEvent",SwigwxPyEventTowxObject},
{ "_wxObject","_wxTextUrlEvent",SwigwxTextUrlEventTowxObject},
{ "_wxObject","_wxTimerEvent",SwigwxTimerEventTowxObject},
+ { "_wxObject","_wxContextMenuEvent",SwigwxContextMenuEventTowxObject},
{ "_wxObject","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject},
{ "_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject},
{ "_wxObject","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject},