X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d26dc89c5e7a421f4f8807728928eee91aa5f7e..8961add6aaf26a969a0073f209a38be08a1541e2:/wxPython/src/msw/events.cpp diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index 285afc6ef6..2f6d0191c8 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -3212,6 +3212,207 @@ static PyObject *_wrap_wxMouseCaptureChangedEvent_GetCapturedWindow(PyObject *se return _resultobj; } +static void *SwigwxSetCursorEventTowxEvent(void *ptr) { + wxSetCursorEvent *src; + wxEvent *dest; + src = (wxSetCursorEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +static void *SwigwxSetCursorEventTowxObject(void *ptr) { + wxSetCursorEvent *src; + wxObject *dest; + src = (wxSetCursorEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxSetCursorEvent(_swigarg0,_swigarg1) (new wxSetCursorEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxSetCursorEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSetCursorEvent * _result; + wxCoord _arg0 = (wxCoord ) 0; + wxCoord _arg1 = (wxCoord ) 0; + char *_kwnames[] = { "x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSetCursorEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSetCursorEvent *)new_wxSetCursorEvent(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSetCursorEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSetCursorEvent_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxSetCursorEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCoord _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetX. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCoord )wxSetCursorEvent_GetX(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSetCursorEvent_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxSetCursorEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCoord _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetY. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCoord )wxSetCursorEvent_GetY(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSetCursorEvent_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0)) +static PyObject *_wrap_wxSetCursorEvent_SetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSetCursorEvent * _arg0; + wxCursor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSetCursorEvent_SetCursor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_SetCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else 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; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSetCursorEvent_SetCursor(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSetCursorEvent_GetCursor(_swigobj) (_swigobj->GetCursor()) +static PyObject *_wrap_wxSetCursorEvent_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxCursor & _result_ref = wxSetCursorEvent_GetCursor(_arg0); + _result = (wxCursor *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSetCursorEvent_HasCursor(_swigobj) (_swigobj->HasCursor()) +static PyObject *_wrap_wxSetCursorEvent_HasCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_HasCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_HasCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSetCursorEvent_HasCursor(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxKeyEventTowxEvent(void *ptr) { wxKeyEvent *src; wxEvent *dest; @@ -6876,6 +7077,139 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * 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; @@ -7387,6 +7721,9 @@ static PyMethodDef eventscMethods[] = { { "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 }, @@ -7497,6 +7834,12 @@ static PyMethodDef eventscMethods[] = { { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_HasCursor", (PyCFunction) _wrap_wxSetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetCursor", (PyCFunction) _wrap_wxSetCursorEvent_GetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_SetCursor", (PyCFunction) _wrap_wxSetCursorEvent_SetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetY", (PyCFunction) _wrap_wxSetCursorEvent_GetY, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetX", (PyCFunction) _wrap_wxSetCursorEvent_GetX, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSetCursorEvent", (PyCFunction) _wrap_new_wxSetCursorEvent, METH_VARARGS | METH_KEYWORDS }, { "wxMouseCaptureChangedEvent_GetCapturedWindow", (PyCFunction) _wrap_wxMouseCaptureChangedEvent_GetCapturedWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxMouseCaptureChangedEvent", (PyCFunction) _wrap_new_wxMouseCaptureChangedEvent, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_m_linesPerAction_get", (PyCFunction) _wrap_wxMouseEvent_m_linesPerAction_get, METH_VARARGS | METH_KEYWORDS }, @@ -7612,6 +7955,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent}, { "_wxEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxEvent}, { "_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent}, + { "_wxEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxEvent}, { "_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_wxEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent}, { "_wxEvent","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxEvent}, @@ -7636,6 +7980,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent}, { "_wxEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxEvent}, { "_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent}, + { "_wxEvent","_wxSetCursorEvent",SwigwxSetCursorEventTowxEvent}, { "_wxEvent","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxEvent}, { "_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent}, { "_wxEvent","_wxSpinEvent",SwigwxSpinEventTowxEvent}, @@ -7674,6 +8019,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxChar","_char",0}, { "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, { "_wxCommandEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxCommandEvent}, + { "_wxCommandEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxCommandEvent}, { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, @@ -7704,6 +8050,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxPyEvent",SwigwxPyEventTowxObject}, { "_wxObject","_wxTextUrlEvent",SwigwxTextUrlEventTowxObject}, { "_wxObject","_wxTimerEvent",SwigwxTimerEventTowxObject}, + { "_wxObject","_wxContextMenuEvent",SwigwxContextMenuEventTowxObject}, { "_wxObject","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject}, { "_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject}, { "_wxObject","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject}, @@ -7728,6 +8075,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxMoveEvent",SwigwxMoveEventTowxObject}, { "_wxObject","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, { "_wxObject","_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_wxObject","_wxSetCursorEvent",SwigwxSetCursorEventTowxObject}, { "_wxObject","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxObject}, { "_wxObject","_wxMouseEvent",SwigwxMouseEventTowxObject}, { "_wxObject","_wxSpinEvent",SwigwxSpinEventTowxObject},