From ba77f39094de162f80a09cc84f0c93373c2584f9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 6 Jul 2002 01:47:02 +0000 Subject: [PATCH] SWIGged updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/events.cpp | 139 ++++++++++++++++++++++++++++++++++++ wxPython/src/gtk/events.py | 21 ++++++ wxPython/src/gtk/gdi.cpp | 15 ++-- wxPython/src/gtk/help.cpp | 139 ------------------------------------ wxPython/src/gtk/help.py | 22 ------ wxPython/src/gtk/misc2.cpp | 9 ++- wxPython/src/gtk/misc2.py | 7 ++ wxPython/src/gtk/wx.cpp | 7 ++ wxPython/src/gtk/wx.py | 10 ++- 9 files changed, 202 insertions(+), 167 deletions(-) diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index 282252098f..cf58c0d255 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -7077,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; @@ -7588,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 }, @@ -7819,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}, @@ -7882,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}, @@ -7912,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}, diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index 14c4797811..402df0334c 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -1030,6 +1030,27 @@ class wxWindowDestroyEvent(wxWindowDestroyEventPtr): +class wxContextMenuEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPosition(self, *_args, **_kwargs): + val = apply(eventsc.wxContextMenuEvent_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) + return val + def SetPosition(self, *_args, **_kwargs): + val = apply(eventsc.wxContextMenuEvent_SetPosition,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxContextMenuEvent(wxContextMenuEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxContextMenuEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxTimerEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index fb08fa8702..27998ae6d7 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -136,8 +136,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) { - return new wxBitmap(bits, width, height, depth); + wxBitmap* wxBitmapFromBits(PyObject* bits, int width, int height, int depth = 1 ) { + char* buf; + int length; + PyString_AsStringAndSize(bits, &buf, &length); + return new wxBitmap(buf, width, height, depth); } @@ -368,16 +371,20 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_wxBitmapFromBits(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxBitmap * _result; - char * _arg0; + PyObject * _arg0; int _arg1; int _arg2; int _arg3 = (int ) 1; + PyObject * _obj0 = 0; char *_kwnames[] = { "bits","width","height","depth", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"sii|i:wxBitmapFromBits",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxBitmapFromBits",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; +{ + _arg0 = _obj0; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3); diff --git a/wxPython/src/gtk/help.cpp b/wxPython/src/gtk/help.cpp index 987adc95a2..5d0570f0a4 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/help.cpp @@ -368,139 +368,6 @@ static PyObject *_wrap_wxHelpEvent_SetTarget(PyObject *self, PyObject *args, PyO 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 *SwigwxContextHelpTowxObject(void *ptr) { wxContextHelp *src; wxObject *dest; @@ -1049,9 +916,6 @@ static PyMethodDef helpcMethods[] = { { "wxContextHelp_BeginContextHelp", (PyCFunction) _wrap_wxContextHelp_BeginContextHelp, METH_VARARGS | METH_KEYWORDS }, { "delete_wxContextHelp", (PyCFunction) _wrap_delete_wxContextHelp, METH_VARARGS | METH_KEYWORDS }, { "new_wxContextHelp", (PyCFunction) _wrap_new_wxContextHelp, 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 }, { "wxHelpEvent_SetTarget", (PyCFunction) _wrap_wxHelpEvent_SetTarget, METH_VARARGS | METH_KEYWORDS }, { "wxHelpEvent_GetTarget", (PyCFunction) _wrap_wxHelpEvent_GetTarget, METH_VARARGS | METH_KEYWORDS }, { "wxHelpEvent_SetLink", (PyCFunction) _wrap_wxHelpEvent_SetLink, METH_VARARGS | METH_KEYWORDS }, @@ -1068,7 +932,6 @@ static PyMethodDef helpcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxEvent}, { "_wxEvent","_wxHelpEvent",SwigwxHelpEventTowxEvent}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, @@ -1099,7 +962,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, - { "_wxCommandEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxCommandEvent}, { "_wxCommandEvent","_wxHelpEvent",SwigwxHelpEventTowxCommandEvent}, { "_char","_wxChar",0}, { "_wxHelpProvider","_wxSimpleHelpProvider",SwigwxSimpleHelpProviderTowxHelpProvider}, @@ -1123,7 +985,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_short",0}, { "_wxObject","_wxContextHelpButton",SwigwxContextHelpButtonTowxObject}, { "_wxObject","_wxContextHelp",SwigwxContextHelpTowxObject}, - { "_wxObject","_wxContextMenuEvent",SwigwxContextMenuEventTowxObject}, { "_wxObject","_wxHelpEvent",SwigwxHelpEventTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, diff --git a/wxPython/src/gtk/help.py b/wxPython/src/gtk/help.py index ef92ad9ad4..add867a444 100644 --- a/wxPython/src/gtk/help.py +++ b/wxPython/src/gtk/help.py @@ -61,27 +61,6 @@ class wxHelpEvent(wxHelpEventPtr): -class wxContextMenuEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self, *_args, **_kwargs): - val = apply(helpc.wxContextMenuEvent_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) - return val - def SetPosition(self, *_args, **_kwargs): - val = apply(helpc.wxContextMenuEvent_SetPosition,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxContextMenuEvent(wxContextMenuEventPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(helpc.new_wxContextMenuEvent,_args,_kwargs) - self.thisown = 1 - - - - class wxContextHelpPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -192,4 +171,3 @@ wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx wx.wxHelpEventPtr = wxHelpEventPtr -wx.wxContextMenuEventPtr = wxContextMenuEventPtr diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index bdf0424555..d031f2fd1b 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -6402,7 +6402,7 @@ static void *SwigwxJoystickTowxObject(void *ptr) { static PyObject *_wrap_new_wxJoystick(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxJoystick * _result; - int _arg0 = (int ) wxJOYSTICK1; + int _arg0 = (int ) (wxJOYSTICK1); char *_kwnames[] = { "joystick", NULL }; char _ptemp[128]; @@ -10744,6 +10744,13 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxEXEC_SYNC", PyInt_FromLong((long) wxEXEC_SYNC)); PyDict_SetItemString(d,"wxEXEC_NOHIDE", PyInt_FromLong((long) wxEXEC_NOHIDE)); PyDict_SetItemString(d,"wxEXEC_MAKE_GROUP_LEADER", PyInt_FromLong((long) wxEXEC_MAKE_GROUP_LEADER)); + PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); + PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2)); + PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); + PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1)); + PyDict_SetItemString(d,"wxJOY_BUTTON2", PyInt_FromLong((long) wxJOY_BUTTON2)); + PyDict_SetItemString(d,"wxJOY_BUTTON3", PyInt_FromLong((long) wxJOY_BUTTON3)); + PyDict_SetItemString(d,"wxJOY_BUTTON4", PyInt_FromLong((long) wxJOY_BUTTON4)); PyDict_SetItemString(d,"wxMAILCAP_STANDARD", PyInt_FromLong((long) wxMAILCAP_STANDARD)); PyDict_SetItemString(d,"wxMAILCAP_NETSCAPE", PyInt_FromLong((long) wxMAILCAP_NETSCAPE)); PyDict_SetItemString(d,"wxMAILCAP_KDE", PyInt_FromLong((long) wxMAILCAP_KDE)); diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index e283381dec..93159e2f6e 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -1331,6 +1331,13 @@ wxEXEC_ASYNC = misc2c.wxEXEC_ASYNC wxEXEC_SYNC = misc2c.wxEXEC_SYNC wxEXEC_NOHIDE = misc2c.wxEXEC_NOHIDE wxEXEC_MAKE_GROUP_LEADER = misc2c.wxEXEC_MAKE_GROUP_LEADER +wxJOYSTICK1 = misc2c.wxJOYSTICK1 +wxJOYSTICK2 = misc2c.wxJOYSTICK2 +wxJOY_BUTTON_ANY = misc2c.wxJOY_BUTTON_ANY +wxJOY_BUTTON1 = misc2c.wxJOY_BUTTON1 +wxJOY_BUTTON2 = misc2c.wxJOY_BUTTON2 +wxJOY_BUTTON3 = misc2c.wxJOY_BUTTON3 +wxJOY_BUTTON4 = misc2c.wxJOY_BUTTON4 wxMAILCAP_STANDARD = misc2c.wxMAILCAP_STANDARD wxMAILCAP_NETSCAPE = misc2c.wxMAILCAP_NETSCAPE wxMAILCAP_KDE = misc2c.wxMAILCAP_KDE diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 3998a0e3a3..2ad2a6566f 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -2004,6 +2004,8 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxPRINT_QUALITY_MEDIUM", PyInt_FromLong((long) wxPRINT_QUALITY_MEDIUM)); PyDict_SetItemString(d,"wxPRINT_QUALITY_LOW", PyInt_FromLong((long) wxPRINT_QUALITY_LOW)); PyDict_SetItemString(d,"wxPRINT_QUALITY_DRAFT", PyInt_FromLong((long) wxPRINT_QUALITY_DRAFT)); + PyDict_SetItemString(d,"wxID_ANY", PyInt_FromLong((long) wxID_ANY)); + PyDict_SetItemString(d,"wxID_SEPARATOR", PyInt_FromLong((long) wxID_SEPARATOR)); PyDict_SetItemString(d,"wxID_OPEN", PyInt_FromLong((long) wxID_OPEN)); PyDict_SetItemString(d,"wxID_CLOSE", PyInt_FromLong((long) wxID_CLOSE)); PyDict_SetItemString(d,"wxID_NEW", PyInt_FromLong((long) wxID_NEW)); @@ -2123,6 +2125,11 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxMM_METRIC", PyInt_FromLong((long) wxMM_METRIC)); PyDict_SetItemString(d,"wxTIMER_CONTINUOUS", PyInt_FromLong((long) wxTIMER_CONTINUOUS)); PyDict_SetItemString(d,"wxTIMER_ONE_SHOT", PyInt_FromLong((long) wxTIMER_ONE_SHOT)); + PyDict_SetItemString(d,"wxMOUSE_BTN_ANY", PyInt_FromLong((long) wxMOUSE_BTN_ANY)); + PyDict_SetItemString(d,"wxMOUSE_BTN_NONE", PyInt_FromLong((long) wxMOUSE_BTN_NONE)); + PyDict_SetItemString(d,"wxMOUSE_BTN_LEFT", PyInt_FromLong((long) wxMOUSE_BTN_LEFT)); + PyDict_SetItemString(d,"wxMOUSE_BTN_MIDDLE", PyInt_FromLong((long) wxMOUSE_BTN_MIDDLE)); + PyDict_SetItemString(d,"wxMOUSE_BTN_RIGHT", PyInt_FromLong((long) wxMOUSE_BTN_RIGHT)); PyDict_SetItemString(d,"wxBORDER_DEFAULT", PyInt_FromLong((long) wxBORDER_DEFAULT)); PyDict_SetItemString(d,"wxBORDER_NONE", PyInt_FromLong((long) wxBORDER_NONE)); PyDict_SetItemString(d,"wxBORDER_STATIC", PyInt_FromLong((long) wxBORDER_STATIC)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 5e6aee5840..d44a968b40 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -344,6 +344,8 @@ wxPRINT_QUALITY_HIGH = wxc.wxPRINT_QUALITY_HIGH wxPRINT_QUALITY_MEDIUM = wxc.wxPRINT_QUALITY_MEDIUM wxPRINT_QUALITY_LOW = wxc.wxPRINT_QUALITY_LOW wxPRINT_QUALITY_DRAFT = wxc.wxPRINT_QUALITY_DRAFT +wxID_ANY = wxc.wxID_ANY +wxID_SEPARATOR = wxc.wxID_SEPARATOR wxID_OPEN = wxc.wxID_OPEN wxID_CLOSE = wxc.wxID_CLOSE wxID_NEW = wxc.wxID_NEW @@ -463,6 +465,11 @@ wxMM_POINTS = wxc.wxMM_POINTS wxMM_METRIC = wxc.wxMM_METRIC wxTIMER_CONTINUOUS = wxc.wxTIMER_CONTINUOUS wxTIMER_ONE_SHOT = wxc.wxTIMER_ONE_SHOT +wxMOUSE_BTN_ANY = wxc.wxMOUSE_BTN_ANY +wxMOUSE_BTN_NONE = wxc.wxMOUSE_BTN_NONE +wxMOUSE_BTN_LEFT = wxc.wxMOUSE_BTN_LEFT +wxMOUSE_BTN_MIDDLE = wxc.wxMOUSE_BTN_MIDDLE +wxMOUSE_BTN_RIGHT = wxc.wxMOUSE_BTN_RIGHT wxBORDER_DEFAULT = wxc.wxBORDER_DEFAULT wxBORDER_NONE = wxc.wxBORDER_NONE wxBORDER_STATIC = wxc.wxBORDER_STATIC @@ -1570,7 +1577,8 @@ _wxCallAfterId = None def wxCallAfter(callable, *args, **kw): """ Call the specified function after the current and pending event - handlers have been completed. + handlers have been completed. This is also good for making GUI + method calls from non-GUI threads. """ app = wxGetApp() assert app, 'No wxApp created yet' -- 2.45.2