From 924f9a4201fc120b80acc7d05180a4c134edffad Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 26 Sep 2003 16:30:40 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/stc/mac/stc_.cpp | 2 +- wxPython/contrib/stc/mac/stc_.py | 2 +- .../mac/wxPythonOSX/resources/Welcome.txt | 5 --- .../mac/wxPythonOSX/resources/postflight | 18 ----------- wxPython/src/mac/gdi.cpp | 31 +++++++++++++++++++ wxPython/src/mac/gdi.py | 5 ++- wxPython/src/mac/grid.cpp | 6 ++-- wxPython/src/mac/misc.cpp | 19 ++++++++++++ wxPython/src/mac/misc.py | 2 ++ 9 files changed, 61 insertions(+), 29 deletions(-) delete mode 100644 wxPython/distrib/mac/wxPythonOSX/resources/Welcome.txt delete mode 100755 wxPython/distrib/mac/wxPythonOSX/resources/postflight diff --git a/wxPython/contrib/stc/mac/stc_.cpp b/wxPython/contrib/stc/mac/stc_.cpp index 3ac96de5d7..9b39f73130 100644 --- a/wxPython/contrib/stc/mac/stc_.cpp +++ b/wxPython/contrib/stc/mac/stc_.cpp @@ -12589,6 +12589,7 @@ SWIGEXPORT(void) initstc_c() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("stc_c", stc_cMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1)); 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)); @@ -13360,7 +13361,6 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_CMD_PARADOWNEXTEND", PyInt_FromLong((long) 2414)); PyDict_SetItemString(d,"wxSTC_CMD_PARAUP", PyInt_FromLong((long) 2415)); PyDict_SetItemString(d,"wxSTC_CMD_PARAUPEXTEND", PyInt_FromLong((long) 2416)); - PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE)); PyDict_SetItemString(d,"wxEVT_STC_STYLENEEDED", PyInt_FromLong((long) wxEVT_STC_STYLENEEDED)); PyDict_SetItemString(d,"wxEVT_STC_CHARADDED", PyInt_FromLong((long) wxEVT_STC_CHARADDED)); diff --git a/wxPython/contrib/stc/mac/stc_.py b/wxPython/contrib/stc/mac/stc_.py index 5d6eaf7f91..d526f8faa3 100644 --- a/wxPython/contrib/stc/mac/stc_.py +++ b/wxPython/contrib/stc/mac/stc_.py @@ -1313,6 +1313,7 @@ class wxStyledTextEvent(wxStyledTextEventPtr): #-------------- VARIABLE WRAPPERS ------------------ +STC_USE_DND = stc_c.STC_USE_DND wxSTC_USE_POPUP = stc_c.wxSTC_USE_POPUP wxSTC_INVALID_POSITION = stc_c.wxSTC_INVALID_POSITION wxSTC_START = stc_c.wxSTC_START @@ -2084,7 +2085,6 @@ wxSTC_CMD_PARADOWN = stc_c.wxSTC_CMD_PARADOWN wxSTC_CMD_PARADOWNEXTEND = stc_c.wxSTC_CMD_PARADOWNEXTEND wxSTC_CMD_PARAUP = stc_c.wxSTC_CMD_PARAUP wxSTC_CMD_PARAUPEXTEND = stc_c.wxSTC_CMD_PARAUPEXTEND -STC_USE_DND = stc_c.STC_USE_DND wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE wxEVT_STC_STYLENEEDED = stc_c.wxEVT_STC_STYLENEEDED wxEVT_STC_CHARADDED = stc_c.wxEVT_STC_CHARADDED diff --git a/wxPython/distrib/mac/wxPythonOSX/resources/Welcome.txt b/wxPython/distrib/mac/wxPythonOSX/resources/Welcome.txt deleted file mode 100644 index d46dd152e1..0000000000 --- a/wxPython/distrib/mac/wxPythonOSX/resources/Welcome.txt +++ /dev/null @@ -1,5 +0,0 @@ -Welcome! - -This program will install wxPython 2.4.1.1 for MacPython-OSX 2.3. - -Build date: Fri Jun 13 10:07:30 PDT 2003 diff --git a/wxPython/distrib/mac/wxPythonOSX/resources/postflight b/wxPython/distrib/mac/wxPythonOSX/resources/postflight deleted file mode 100755 index bfa196a360..0000000000 --- a/wxPython/distrib/mac/wxPythonOSX/resources/postflight +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -e -# Compile the .py files in the wxPython pacakge -/usr/local/bin/python $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython -/usr/local/bin/python -O $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython - -# and in the demo -/usr/local/bin/python $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py /Applications/wxPythonOSX-2.4.1.1/demo - -# Make the demo/data dir writable -chmod a+w /Applications/wxPythonOSX-2.4.1.1/demo/data - -# and the wxPython pacakge should be group writable -chgrp -R admin $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython -chgrp -R admin /Applications/wxPythonOSX-2.4.1.1 -chmod -R g+w $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython -chmod -R g+w /Applications/wxPythonOSX-2.4.1.1 - -exit 0 diff --git a/wxPython/src/mac/gdi.cpp b/wxPython/src/mac/gdi.cpp index 0ad8b03767..c8dd043bd5 100644 --- a/wxPython/src/mac/gdi.cpp +++ b/wxPython/src/mac/gdi.cpp @@ -10615,7 +10615,38 @@ static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyO return _resultobj; } +static bool wxRegionIterator___nonzero__(wxRegionIterator *self) { + return self->operator bool(); + } +static PyObject *_wrap_wxRegionIterator___nonzero__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator___nonzero__",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator___nonzero__. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegionIterator___nonzero__(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef gdicMethods[] = { + { "wxRegionIterator___nonzero__", (PyCFunction) _wrap_wxRegionIterator___nonzero__, METH_VARARGS | METH_KEYWORDS }, { "wxRegionIterator_Next", (PyCFunction) _wrap_wxRegionIterator_Next, METH_VARARGS | METH_KEYWORDS }, { "wxRegionIterator_Reset", (PyCFunction) _wrap_wxRegionIterator_Reset, METH_VARARGS | METH_KEYWORDS }, { "wxRegionIterator_HaveRects", (PyCFunction) _wrap_wxRegionIterator_HaveRects, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index db7218bed0..f144d3b3c1 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -269,7 +269,7 @@ class wxColourPtr(wxObjectPtr): return "<%s.%s instance; proxy of C++ wxColour instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) asTuple = Get def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxColour:' + str(self.asTuple()) + def __repr__(self): return 'wxColour' + str(self.asTuple()) def __nonzero__(self): return self.Ok() def __getinitargs__(self): return () def __getstate__(self): return self.asTuple() @@ -1238,6 +1238,9 @@ class wxRegionIteratorPtr(wxObjectPtr): def Next(self, *_args, **_kwargs): val = gdic.wxRegionIterator_Next(self, *_args, **_kwargs) return val + def __nonzero__(self, *_args, **_kwargs): + val = gdic.wxRegionIterator___nonzero__(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxRegionIterator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxRegionIterator(wxRegionIteratorPtr): diff --git a/wxPython/src/mac/grid.cpp b/wxPython/src/mac/grid.cpp index 75350e82cd..0d25fbb75c 100644 --- a/wxPython/src/mac/grid.cpp +++ b/wxPython/src/mac/grid.cpp @@ -2723,6 +2723,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_PaintBackground(PyObject *self, P #define wxPyGridCellEditor_base_IsAcceptedKey(_swigobj,_swigarg0) (_swigobj->base_IsAcceptedKey(_swigarg0)) static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxPyGridCellEditor * _arg0; wxKeyEvent * _arg1; PyObject * _argo0 = 0; @@ -2747,12 +2748,11 @@ static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); + _result = (bool )wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } diff --git a/wxPython/src/mac/misc.cpp b/wxPython/src/mac/misc.cpp index fed5e8915b..743a7d61f4 100644 --- a/wxPython/src/mac/misc.cpp +++ b/wxPython/src/mac/misc.cpp @@ -836,6 +836,24 @@ static PyObject *_wrap_wxGetProcessId(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxTrap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTrap",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTrap(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxAcceleratorEntry * _result; @@ -5515,6 +5533,7 @@ static PyMethodDef misccMethods[] = { { "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxTrap", (PyCFunction) _wrap_wxTrap, METH_VARARGS | METH_KEYWORDS }, { "wxGetProcessId", (PyCFunction) _wrap_wxGetProcessId, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/misc.py b/wxPython/src/mac/misc.py index 747c3ff1c2..c5754da970 100644 --- a/wxPython/src/mac/misc.py +++ b/wxPython/src/mac/misc.py @@ -805,6 +805,8 @@ wxGetUserHome = miscc.wxGetUserHome wxGetProcessId = miscc.wxGetProcessId +wxTrap = miscc.wxTrap + def wxGetAccelFromString(*_args, **_kwargs): val = miscc.wxGetAccelFromString(*_args,**_kwargs) if val: val = wxAcceleratorEntryPtr(val)