From b787b2a9d7581ac38e5f84633984acdebe43e8b3 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 4 May 2002 04:53:14 +0000 Subject: [PATCH] swigged updated code for wxMac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/mac/glcanvas.cpp | 2 +- wxPython/contrib/stc/mac/stc_.cpp | 3 +- wxPython/contrib/stc/mac/stc_.py | 1 + wxPython/src/mac/calendar.cpp | 2 +- wxPython/src/mac/frames.cpp | 173 +++++++++++++++++++++ wxPython/src/mac/frames.py | 15 ++ wxPython/src/mac/grid.cpp | 2 +- wxPython/src/mac/help.cpp | 2 +- wxPython/src/mac/html.cpp | 2 +- wxPython/src/mac/htmlhelp.cpp | 2 +- wxPython/src/mac/stattool.cpp | 71 +++++++++ wxPython/src/mac/stattool.py | 6 + wxPython/src/mac/wx.cpp | 2 +- 13 files changed, 275 insertions(+), 8 deletions(-) diff --git a/wxPython/contrib/glcanvas/mac/glcanvas.cpp b/wxPython/contrib/glcanvas/mac/glcanvas.cpp index 45e3207d52..81d2ef305c 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/mac/glcanvas.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "glcanvasc" -#include "export.h" +#include "wxPython.h" #ifdef __WXMSW__ #include "myglcanvas.h" #else diff --git a/wxPython/contrib/stc/mac/stc_.cpp b/wxPython/contrib/stc/mac/stc_.cpp index 10d3e490e3..3c80bf62f4 100644 --- a/wxPython/contrib/stc/mac/stc_.cpp +++ b/wxPython/contrib/stc/mac/stc_.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "stc_c" -#include "export.h" +#include "wxPython.h" #include "wx/stc/stc.h" @@ -11042,6 +11042,7 @@ SWIGEXPORT(void) initstc_c() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("stc_c", stc_cMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSTC_USE_POPUP", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxSTC_INVALID_POSITION", PyInt_FromLong((long) -1)); PyDict_SetItemString(d,"wxSTC_START", PyInt_FromLong((long) 2000)); PyDict_SetItemString(d,"wxSTC_OPTIONAL_START", PyInt_FromLong((long) 3000)); diff --git a/wxPython/contrib/stc/mac/stc_.py b/wxPython/contrib/stc/mac/stc_.py index 4be749e525..3e189c0e64 100644 --- a/wxPython/contrib/stc/mac/stc_.py +++ b/wxPython/contrib/stc/mac/stc_.py @@ -1158,6 +1158,7 @@ class wxStyledTextEvent(wxStyledTextEventPtr): #-------------- VARIABLE WRAPPERS ------------------ +wxSTC_USE_POPUP = stc_c.wxSTC_USE_POPUP wxSTC_INVALID_POSITION = stc_c.wxSTC_INVALID_POSITION wxSTC_START = stc_c.wxSTC_START wxSTC_OPTIONAL_START = stc_c.wxSTC_OPTIONAL_START diff --git a/wxPython/src/mac/calendar.cpp b/wxPython/src/mac/calendar.cpp index a2c88b4e42..cca579bbf6 100644 --- a/wxPython/src/mac/calendar.cpp +++ b/wxPython/src/mac/calendar.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "calendarc" -#include "export.h" +#include "wxPython.h" #include diff --git a/wxPython/src/mac/frames.cpp b/wxPython/src/mac/frames.cpp index 3b2facfa3b..7b8cc08ad4 100644 --- a/wxPython/src/mac/frames.cpp +++ b/wxPython/src/mac/frames.cpp @@ -1254,6 +1254,174 @@ static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, P return _resultobj; } +#define wxFrame_PushStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->PushStatusText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_PushStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text","number", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFrame_PushStatusText",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_PushStatusText. Expected _wxFrame_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_PushStatusText(_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFrame_PopStatusText(_swigobj,_swigarg0) (_swigobj->PopStatusText(_swigarg0)) +static PyObject *_wrap_wxFrame_PopStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + int _arg1 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","number", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_PopStatusText",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_PopStatusText. Expected _wxFrame_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_PopStatusText(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_DoGiveHelp(_swigobj,_swigarg0,_swigarg1) (_swigobj->DoGiveHelp(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_DoGiveHelp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxString * _arg1; + bool _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2; + char *_kwnames[] = { "self","text","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxFrame_DoGiveHelp",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_DoGiveHelp. Expected _wxFrame_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_DoGiveHelp(_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFrame_SetStatusBarPane(_swigobj,_swigarg0) (_swigobj->SetStatusBarPane(_swigarg0)) +static PyObject *_wrap_wxFrame_SetStatusBarPane(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_SetStatusBarPane",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusBarPane. Expected _wxFrame_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_SetStatusBarPane(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_GetStatusBarPane(_swigobj) (_swigobj->GetStatusBarPane()) +static PyObject *_wrap_wxFrame_GetStatusBarPane(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetStatusBarPane",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetStatusBarPane. Expected _wxFrame_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxFrame_GetStatusBarPane(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxFrame_CreateToolBar(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CreateToolBar(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2455,6 +2623,11 @@ static PyMethodDef framescMethods[] = { { "wxFrame_SetToolBar", (PyCFunction) _wrap_wxFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetToolBar", (PyCFunction) _wrap_wxFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetStatusBarPane", (PyCFunction) _wrap_wxFrame_GetStatusBarPane, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_SetStatusBarPane", (PyCFunction) _wrap_wxFrame_SetStatusBarPane, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_DoGiveHelp", (PyCFunction) _wrap_wxFrame_DoGiveHelp, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_PopStatusText", (PyCFunction) _wrap_wxFrame_PopStatusText, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_PushStatusText", (PyCFunction) _wrap_wxFrame_PushStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusWidths", (PyCFunction) _wrap_wxFrame_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusText", (PyCFunction) _wrap_wxFrame_SetStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusBar", (PyCFunction) _wrap_wxFrame_SetStatusBar, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/frames.py b/wxPython/src/mac/frames.py index d2ac054f6a..81d3be22cb 100644 --- a/wxPython/src/mac/frames.py +++ b/wxPython/src/mac/frames.py @@ -116,6 +116,21 @@ class wxFramePtr(wxTopLevelWindowPtr): def SetStatusWidths(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetStatusWidths,(self,) + _args, _kwargs) return val + def PushStatusText(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_PushStatusText,(self,) + _args, _kwargs) + return val + def PopStatusText(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_PopStatusText,(self,) + _args, _kwargs) + return val + def DoGiveHelp(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_DoGiveHelp,(self,) + _args, _kwargs) + return val + def SetStatusBarPane(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_SetStatusBarPane,(self,) + _args, _kwargs) + return val + def GetStatusBarPane(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetStatusBarPane,(self,) + _args, _kwargs) + return val def CreateToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/mac/grid.cpp b/wxPython/src/mac/grid.cpp index e3bf3d4ff0..e615fcc19f 100644 --- a/wxPython/src/mac/grid.cpp +++ b/wxPython/src/mac/grid.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "gridc" -#include "export.h" +#include "wxPython.h" #include #include diff --git a/wxPython/src/mac/help.cpp b/wxPython/src/mac/help.cpp index c30029a5d3..1d2d1bc578 100644 --- a/wxPython/src/mac/help.cpp +++ b/wxPython/src/mac/help.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "helpc" -#include "export.h" +#include "wxPython.h" #include diff --git a/wxPython/src/mac/html.cpp b/wxPython/src/mac/html.cpp index 37e1ac0410..4ef85ccc84 100644 --- a/wxPython/src/mac/html.cpp +++ b/wxPython/src/mac/html.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlc" -#include "export.h" +#include "wxPython.h" #include #include #include diff --git a/wxPython/src/mac/htmlhelp.cpp b/wxPython/src/mac/htmlhelp.cpp index 1ed69ea4dc..ac7b519d01 100644 --- a/wxPython/src/mac/htmlhelp.cpp +++ b/wxPython/src/mac/htmlhelp.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlhelpc" -#include "export.h" +#include "wxPython.h" #include #include #include diff --git a/wxPython/src/mac/stattool.cpp b/wxPython/src/mac/stattool.cpp index 34068b5b91..33d1d5e9bb 100644 --- a/wxPython/src/mac/stattool.cpp +++ b/wxPython/src/mac/stattool.cpp @@ -523,6 +523,75 @@ static PyObject *_wrap_wxStatusBar_SetStatusWidths(PyObject *self, PyObject *arg return _resultobj; } +#define wxStatusBar_PushStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->PushStatusText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStatusBar_PushStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStatusBar * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text","number", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxStatusBar_PushStatusText",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStatusBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStatusBar_PushStatusText. Expected _wxStatusBar_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStatusBar_PushStatusText(_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStatusBar_PopStatusText(_swigobj,_swigarg0) (_swigobj->PopStatusText(_swigarg0)) +static PyObject *_wrap_wxStatusBar_PopStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStatusBar * _arg0; + int _arg1 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","number", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxStatusBar_PopStatusText",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStatusBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStatusBar_PopStatusText. Expected _wxStatusBar_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStatusBar_PopStatusText(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxStatusBar_SetMinHeight(_swigobj,_swigarg0) (_swigobj->SetMinHeight(_swigarg0)) static PyObject *_wrap_wxStatusBar_SetMinHeight(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3465,6 +3534,8 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBarToolBase_GetId", (PyCFunction) _wrap_wxToolBarToolBase_GetId, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_Destroy", (PyCFunction) _wrap_wxToolBarToolBase_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_SetMinHeight", (PyCFunction) _wrap_wxStatusBar_SetMinHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxStatusBar_PopStatusText", (PyCFunction) _wrap_wxStatusBar_PopStatusText, METH_VARARGS | METH_KEYWORDS }, + { "wxStatusBar_PushStatusText", (PyCFunction) _wrap_wxStatusBar_PushStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_SetStatusWidths", (PyCFunction) _wrap_wxStatusBar_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_SetStatusText", (PyCFunction) _wrap_wxStatusBar_SetStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_SetFieldsCount", (PyCFunction) _wrap_wxStatusBar_SetFieldsCount, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/stattool.py b/wxPython/src/mac/stattool.py index c5206b656f..c366b640a1 100644 --- a/wxPython/src/mac/stattool.py +++ b/wxPython/src/mac/stattool.py @@ -48,6 +48,12 @@ class wxStatusBarPtr(wxWindowPtr): def SetStatusWidths(self, *_args, **_kwargs): val = apply(stattoolc.wxStatusBar_SetStatusWidths,(self,) + _args, _kwargs) return val + def PushStatusText(self, *_args, **_kwargs): + val = apply(stattoolc.wxStatusBar_PushStatusText,(self,) + _args, _kwargs) + return val + def PopStatusText(self, *_args, **_kwargs): + val = apply(stattoolc.wxStatusBar_PopStatusText,(self,) + _args, _kwargs) + return val def SetMinHeight(self, *_args, **_kwargs): val = apply(stattoolc.wxStatusBar_SetMinHeight,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/mac/wx.cpp b/wxPython/src/mac/wx.cpp index 7842f48d6f..aaf1ea6aea 100644 --- a/wxPython/src/mac/wx.cpp +++ b/wxPython/src/mac/wx.cpp @@ -596,7 +596,7 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { wxPyApp* wxGetApp() { //return wxPythonApp; - return (wxPyApp*)wxGetApp(); + return (wxPyApp*)wxTheApp; } void wxApp_CleanUp() { -- 2.45.2