From 9416aa89ca06d0fb20b1002e026d2c7ac7aa6a17 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 17 May 2001 22:47:09 +0000 Subject: [PATCH] Implemented the first phase of OOR (Original Object Return). See the text in the demo for more details of what this means, but in a nutshell methods such as wxWindow.GetParent or FindWindowById will now return a shadow object of the proper type if it can. By "proper type" I mean that if the wxWindow pointer returned from FindWindowById really points to a wxButton then the Python object constructed will be of a wxButtonPtr class instead of wxWindowPtr as before. This should reduce or eliminiate the need for wxPyTypeCast. (Woo Hoo!) The objects returned are still not the original Python object, but that is the next step. (Although it will probably only work on Python 2.1 and beyond because it will use weak references.) A few other minor tweaks and fixes and additions for things found while doing the OOR stuff. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/CHANGES.txt | 67 +- wxPython/SWIG/README.txt | 13 +- wxPython/SWIG/python.cxx.patch | 20 + wxPython/b.bat | 4 +- wxPython/contrib/glcanvas/glcanvas.i | 2 +- wxPython/contrib/glcanvas/msw/glcanvas.cpp | 37 +- wxPython/contrib/glcanvas/msw/glcanvas.py | 3 +- wxPython/contrib/ogl/_ogldefs.i | 14 +- wxPython/contrib/ogl/_oglextras.py | 21 +- wxPython/contrib/ogl/ogl.cpp | 31 +- wxPython/contrib/ogl/ogl.i | 17 + wxPython/contrib/ogl/ogl.py | 21 +- wxPython/contrib/ogl/oglbasic.cpp | 131 +- wxPython/contrib/ogl/oglbasic.i | 8 +- wxPython/contrib/ogl/oglbasic.py | 12 +- wxPython/contrib/ogl/oglcanvas.cpp | 111 +- wxPython/contrib/ogl/oglcanvas.i | 4 +- wxPython/contrib/ogl/oglcanvas.py | 8 +- wxPython/contrib/ogl/oglhelpers.h | 16 + wxPython/contrib/ogl/oglshapes.cpp | 203 ++- wxPython/contrib/ogl/oglshapes.i | 4 +- wxPython/contrib/ogl/oglshapes.py | 13 +- wxPython/contrib/ogl/oglshapes2.cpp | 164 +- wxPython/contrib/ogl/oglshapes2.i | 9 +- wxPython/contrib/ogl/oglshapes2.py | 10 +- wxPython/demo/GridHugeTable.py | 2 +- wxPython/demo/GridSimple.py | 3 + wxPython/demo/GridStdEdRend.py | 1 + wxPython/demo/Main.py | 4 +- wxPython/demo/OOR.py | 118 ++ wxPython/demo/data/grid.i | 322 ++-- wxPython/demo/wxListCtrl.py | 12 +- wxPython/demo/wxTreeCtrl.py | 3 +- wxPython/demo/wxValidator.py | 110 +- wxPython/src/_defs.i | 2 + wxPython/src/_extras.py | 7 +- wxPython/src/_htmlextras.py | 1 - wxPython/src/clip_dnd.i | 6 +- wxPython/src/cmndlgs.i | 4 +- wxPython/src/controls2.i | 14 +- wxPython/src/events.i | 2 +- wxPython/src/export.h | 4 + wxPython/src/filesys.i | 14 +- wxPython/src/frames.i | 2 - wxPython/src/gdi.i | 120 +- wxPython/src/grid.i | 84 +- wxPython/src/helpers.cpp | 178 ++- wxPython/src/helpers.h | 38 +- wxPython/src/html.i | 39 +- wxPython/src/image.i | 4 +- wxPython/src/libpy.c | 2 +- wxPython/src/misc.i | 89 +- wxPython/src/misc2.i | 15 +- wxPython/src/msw/calendar.cpp | 28 + wxPython/src/msw/clip_dnd.cpp | 20 +- wxPython/src/msw/clip_dnd.py | 2 +- wxPython/src/msw/cmndlgs.cpp | 124 ++ wxPython/src/msw/cmndlgs.py | 4 +- wxPython/src/msw/controls.cpp | 256 ++++ wxPython/src/msw/controls2.cpp | 179 +-- wxPython/src/msw/controls2.py | 15 +- wxPython/src/msw/events.cpp | 454 +++++- wxPython/src/msw/events.py | 7 +- wxPython/src/msw/filesys.cpp | 158 +- wxPython/src/msw/filesys.py | 11 +- wxPython/src/msw/frames.cpp | 73 +- wxPython/src/msw/frames.py | 5 - wxPython/src/msw/gdi.cpp | 1565 ++++++++++++++++++++ wxPython/src/msw/gdi.py | 180 ++- wxPython/src/msw/grid.cpp | 530 ++++++- wxPython/src/msw/grid.py | 45 +- wxPython/src/msw/html.cpp | 384 ++++- wxPython/src/msw/html.py | 48 +- wxPython/src/msw/htmlhelp.cpp | 32 + wxPython/src/msw/image.cpp | 112 ++ wxPython/src/msw/image.py | 4 +- wxPython/src/msw/mdi.cpp | 76 +- wxPython/src/msw/mdi.py | 4 - wxPython/src/msw/misc.cpp | 1334 +++-------------- wxPython/src/msw/misc.py | 153 +- wxPython/src/msw/misc2.cpp | 189 ++- wxPython/src/msw/misc2.py | 15 +- wxPython/src/msw/printfw.cpp | 189 ++- wxPython/src/msw/printfw.py | 19 +- wxPython/src/msw/sizers.cpp | 138 +- wxPython/src/msw/sizers.py | 8 +- wxPython/src/msw/stattool.cpp | 181 +-- wxPython/src/msw/stattool.py | 15 +- wxPython/src/msw/streams.cpp | 13 +- wxPython/src/msw/windows.cpp | 547 +++---- wxPython/src/msw/windows.py | 85 +- wxPython/src/msw/windows2.cpp | 110 +- wxPython/src/msw/windows2.py | 5 - wxPython/src/msw/windows3.cpp | 76 + wxPython/src/msw/windows3.py | 2 +- wxPython/src/msw/wx.cpp | 30 +- wxPython/src/msw/wx.py | 8 +- wxPython/src/my_typemaps.i | 49 + wxPython/src/printfw.i | 17 +- wxPython/src/sizers.i | 6 +- wxPython/src/stattool.i | 117 +- wxPython/src/streams.i | 30 +- wxPython/src/windows.i | 67 +- wxPython/src/windows2.i | 1 + wxPython/src/windows3.i | 2 +- wxPython/src/wx.i | 5 + 106 files changed, 6375 insertions(+), 3495 deletions(-) create mode 100644 wxPython/SWIG/python.cxx.patch create mode 100644 wxPython/demo/OOR.py diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 882c1135f3..866eafe865 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,14 +2,15 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- -????? + +2.3.0 ----- Removed initial startup dependency on the OpenGL DLLs so only the -glcanvasc.pyd depends on them. +glcanvasc.pyd depends on them, (on wxMSW.) Changed wxFont, wxPen, wxBrush to not implicitly use the -wxThe[Font|Pen|Brush]List behind the scenes, but to use normal ctor -and dtors. +wxThe[Font|Pen|Brush]List objects behind the scenes, but to use normal +ctor and dtors. Exposed the wxThe[Font|Pen|Brush]List to wxPython. @@ -37,12 +38,14 @@ it gobs faster in certain situations. Added tools that will take an image file in a wx supported format and convert it to data embedded in a Python source file. The image is -converted to XPM format (with its transparency mask intact, if there -is one) which is essentially a list of strings containing info about -each pixel. It is then pickled and optionally compressed and written -to a Python source file along with functions to convert it to either a -wxBitmap or a wxImage. See wxPython/demo/images.py for examples, and -wxPython/Tools/img2py.py for the implementation. +converted to XPM format which is essentially a list of strings +containing info about each pixel. The image's transparency mask is +included, if there is one, or a mask can be added if a mask colour is +specified on the command line. It is then pickled and optionally +compressed and written to a Python source file along with functions to +convert it to either a wxBitmap or a wxImage. See +wxPython/demo/images.py for examples, and wxPython/Tools/img2py.py for +the implementation. Fixed wxStyledTextCtrl to be much faster on wxGTK. There was some experimental code that got left in place that ended up causing way too @@ -59,6 +62,50 @@ Added wxToggleButton. Fixed bug that prevented wxTreeCtrl.OnCompareItems from being called. +Added some methods to wxGrid: + GetCellHighlightPenWidth + GetCellHighlightROPenWidth + SetCellHighlightPenWidth + SetCellHighlightROPenWidth + GetGridWindow + GetGridRowLabelWindow + GetGridColLabelWindow + GetGridCornerLabelWindow + +Added wxGetClientDisplayRect which on wxMSW returns a wxRect +representing the area on screen not occupied by the taskbar and such. +On other platforms it is equivallent to wxGetDisplaySize. + + +***---***---***---***---***---***---***---***---***---***---***--- + Implemented the first phase of OOR (Original Object Return). See + the text in the demo for more details of what this means, but in a + nutshell methods such as wxWindow.GetParent or FindWindowById will + now return a shadow object of the proper type if it can. By + "proper type" I mean that if the wxWindow pointer returned from + FindWindowById really points to a wxButton then the Python object + constructed will be of a wxButtonPtr class instead of wxWindowPtr + as before. This should reduce or eliminiate the need for + wxPyTypeCast. (Woo Hoo!) The objects returned are still not the + original Python object, but that is the next step. (Although it + will probably only work on Python 2.1 and beyond because it will + use weak references.) + + This first phase of the OOR plan is fairly significant and has + required a lot of changes all over wxPython, most of which should + be transparent to you, however I'm not 100% sure that it didn't + introduce any new bugs that are hiding somewhere and didn't get + stomped on during my testing. So please be sure to test everything + thoroughly when you install this version and be sure to report any + object-type related oddities to me. +***---***---***---***---***---***---***---***---***---***---***--- + +There is now a wxObject class that most other classes derive from like +in C++, but the methods provided don't really match but are wxPython +specific. It could have been added long ago but OOR required it. + +Finally added wxPyLineShape.GetLineControlPoints, which has been on my +list for a while. The above OOR modification made this easier. diff --git a/wxPython/SWIG/README.txt b/wxPython/SWIG/README.txt index 2343c669bb..8fe39f6ecd 100644 --- a/wxPython/SWIG/README.txt +++ b/wxPython/SWIG/README.txt @@ -1,6 +1,11 @@ -Some minor tweaks were made to these files to allow wxPython to build -with Python 1.6. Just put these in your swig_lib/python dir and -you'll be all set. These are from SWIG 1.1-810, (yes, I am a bit -behind.) +Some minor tweaks were made to pyexp.swg and typemaps.i to allow +wxPython to build with Python 1.6. Just put these in your +swig_lib/python dir and you'll be all set. These are from SWIG +1.1-883. + + +Additionally, there is a patch in python.cxx.patch that should be +applied to SWIG's .../Modules/python.cxx file. This patch prevents +the out typemap from being used on constructors. diff --git a/wxPython/SWIG/python.cxx.patch b/wxPython/SWIG/python.cxx.patch new file mode 100644 index 0000000000..b1c8158a8d --- /dev/null +++ b/wxPython/SWIG/python.cxx.patch @@ -0,0 +1,20 @@ +*** Modules\python.cxx.orig Fri May 11 16:04:01 2001 +--- Modules\python.cxx Fri May 11 16:14:08 2001 +*************** +*** 879,885 **** + // If there was a result, it was saved in _result. + // If the function is a void type, don't do anything. + +! if ((tm = typemap_lookup("out","python",d,iname,"_result","_resultobj"))) { + // Yep. Use it instead of the default + f.code << tm << "\n"; + } else { +--- 879,886 ---- + // If there was a result, it was saved in _result. + // If the function is a void type, don't do anything. + +! if ((strncmp(name, "new_", 4) != 0) && // don't use the out typemap for constructors +! (tm = typemap_lookup("out","python",d,iname,"_result","_resultobj"))) { + // Yep. Use it instead of the default + f.code << tm << "\n"; + } else { diff --git a/wxPython/b.bat b/wxPython/b.bat index 90092a1e94..fba0a037f4 100755 --- a/wxPython/b.bat +++ b/wxPython/b.bat @@ -9,7 +9,9 @@ iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" then set PYTHON=c:\tools\python%1%\python.exe shift else - set PYTHON=python + beep + echo You must specify Python version as first parameter. + quit endiff set SETUP=%PYTHON% -u setup.py diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index 049c8e9581..30be533da8 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -52,7 +52,7 @@ class wxGLCanvas; //--------------------------------------------------------------------------- -class wxGLContext { +class wxGLContext : public wxObject { public: wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette); ~wxGLContext(); diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index 83697d41df..9daa8ef7a5 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -117,6 +117,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static void *SwigwxGLContextTowxObject(void *ptr) { + wxGLContext *src; + wxObject *dest; + src = (wxGLContext *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -279,7 +287,6 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO wxGLContext * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0)) @@ -296,13 +303,7 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO _result = (wxWindow *)wxGLContext_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -338,6 +339,14 @@ static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxGLCanvasTowxObject(void *ptr) { + wxGLCanvas *src; + wxObject *dest; + src = (wxGLCanvas *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -643,6 +652,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -652,6 +662,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_class_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_class_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, + { "_class_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -875,6 +890,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxGLCanvas","_class_wxGLCanvas",0}, + { "_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, + { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -954,6 +974,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.py b/wxPython/contrib/glcanvas/msw/glcanvas.py index 2e4beb50d8..856b998918 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.py +++ b/wxPython/contrib/glcanvas/msw/glcanvas.py @@ -41,7 +41,7 @@ from filesys import * from utils import * import wx -class wxGLContextPtr : +class wxGLContextPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -59,7 +59,6 @@ class wxGLContextPtr : return val def GetWindow(self, *_args, **_kwargs): val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/contrib/ogl/_ogldefs.i b/wxPython/contrib/ogl/_ogldefs.i index 2aa9cf1bef..1241092a2e 100644 --- a/wxPython/contrib/ogl/_ogldefs.i +++ b/wxPython/contrib/ogl/_ogldefs.i @@ -57,10 +57,22 @@ class wxPyControlPoint; // Typemaps just for OGL +// OOR Support +%typemap(python, out) wxPyShape* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPyShapeCanvas* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxDiagram* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxOGLConstraint* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPseudoMetaFile* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxArrowHead* { $target = wxPyMake_wxObject($source); } + + + + // wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll // use the pen and brush lists to simulate that... - %typemap(python, in) wxPen* { wxPen* temp; if ($source) { diff --git a/wxPython/contrib/ogl/_oglextras.py b/wxPython/contrib/ogl/_oglextras.py index d5309e4a5b..8390362de7 100644 --- a/wxPython/contrib/ogl/_oglextras.py +++ b/wxPython/contrib/ogl/_oglextras.py @@ -1,4 +1,5 @@ +# aliases wxShapeCanvas = wxPyShapeCanvas wxShapeEvtHandler = wxPyShapeEvtHandler wxShape = wxPyShape @@ -17,20 +18,24 @@ wxControlPoint = wxPyControlPoint # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx -wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr -wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr -wx.wxPyShapePtr = wxPyShapePtr -wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr +wx.wxArrowHeadPtr = wxArrowHeadPtr +wx.wxControlPointPtr = wxPyControlPointPtr +wx.wxDiagramPtr = wxDiagramPtr +wx.wxOGLConstraintPtr = wxOGLConstraintPtr +wx.wxPseudoMetaFilePtr = wxPseudoMetaFile wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr -wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr +wx.wxPyCircleShapePtr = wxPyCircleShapePtr wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr +wx.wxPyControlPointPtr = wxPyControlPointPtr wx.wxPyDividedShapePtr = wxPyDividedShapePtr wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr +wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr -wx.wxPyCircleShapePtr = wxPyCircleShapePtr wx.wxPyLineShapePtr = wxPyLineShapePtr wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr +wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr +wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr +wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr +wx.wxPyShapePtr = wxPyShapePtr wx.wxPyTextShapePtr = wxPyTextShapePtr wx.wxShapeRegionPtr = wxShapeRegionPtr -wx.wxOGLConstraintPtr = wxOGLConstraintPtr -wx.wxControlPointPtr = wxPyControlPointPtr diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index 94d335682a..b6b50f6325 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -190,6 +190,23 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { //--------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas); +IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler); +IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint); +IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape); + +//--------------------------------------------------------------------------- extern "C" SWIGEXPORT(void) initoglbasicc(); extern "C" SWIGEXPORT(void) initoglshapesc(); @@ -332,6 +349,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -341,6 +359,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, @@ -357,6 +376,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -366,7 +386,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -434,6 +453,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPenList","_class_wxPenList",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -529,6 +549,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -565,6 +586,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -573,6 +595,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -582,6 +605,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -592,7 +616,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -601,6 +624,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -652,6 +676,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -693,6 +718,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -753,6 +779,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxFontList","_wxFontList",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index a679aed93e..8af76dd0ed 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -214,6 +214,23 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { //--------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas); +IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler); +IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint); +IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape); +IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape); + +//--------------------------------------------------------------------------- extern "C" SWIGEXPORT(void) initoglbasicc(); extern "C" SWIGEXPORT(void) initoglshapesc(); diff --git a/wxPython/contrib/ogl/ogl.py b/wxPython/contrib/ogl/ogl.py index 5c3b81333d..d7bd04da26 100644 --- a/wxPython/contrib/ogl/ogl.py +++ b/wxPython/contrib/ogl/ogl.py @@ -128,6 +128,7 @@ DIVISION_SIDE_BOTTOM = oglc.DIVISION_SIDE_BOTTOM #-------------- USER INCLUDE ----------------------- +# aliases wxShapeCanvas = wxPyShapeCanvas wxShapeEvtHandler = wxPyShapeEvtHandler wxShape = wxPyShape @@ -146,20 +147,24 @@ wxControlPoint = wxPyControlPoint # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx -wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr -wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr -wx.wxPyShapePtr = wxPyShapePtr -wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr +wx.wxArrowHeadPtr = wxArrowHeadPtr +wx.wxControlPointPtr = wxPyControlPointPtr +wx.wxDiagramPtr = wxDiagramPtr +wx.wxOGLConstraintPtr = wxOGLConstraintPtr +wx.wxPseudoMetaFilePtr = wxPseudoMetaFile wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr -wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr +wx.wxPyCircleShapePtr = wxPyCircleShapePtr wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr +wx.wxPyControlPointPtr = wxPyControlPointPtr wx.wxPyDividedShapePtr = wxPyDividedShapePtr wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr +wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr -wx.wxPyCircleShapePtr = wxPyCircleShapePtr wx.wxPyLineShapePtr = wxPyLineShapePtr wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr +wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr +wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr +wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr +wx.wxPyShapePtr = wxPyShapePtr wx.wxPyTextShapePtr = wxPyTextShapePtr wx.wxShapeRegionPtr = wxShapeRegionPtr -wx.wxOGLConstraintPtr = wxOGLConstraintPtr -wx.wxControlPointPtr = wxPyControlPointPtr diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index caa8370cb6..cac0c4d8be 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -116,6 +116,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static void *SwigwxShapeRegionTowxObject(void *ptr) { + wxShapeRegion *src; + wxObject *dest; + src = (wxShapeRegion *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxShapeRegion() (new wxShapeRegion()) static PyObject *_wrap_new_wxShapeRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1154,6 +1162,14 @@ static PyObject *_wrap_wxShapeRegion_ClearText(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPyShapeEvtHandlerTowxObject(void *ptr) { + wxPyShapeEvtHandler *src; + wxObject *dest; + src = (wxPyShapeEvtHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyShapeEvtHandler(_swigarg0,_swigarg1) (new wxPyShapeEvtHandler(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyShapeEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1304,7 +1320,6 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetShape(PyObject *self, PyObject *ar wxPyShapeEvtHandler * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeEvtHandler_GetShape",_kwnames,&_argo0)) @@ -1321,13 +1336,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetShape(PyObject *self, PyObject *ar _result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1374,7 +1383,6 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetPreviousHandler(PyObject *self, Py wxPyShapeEvtHandler * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeEvtHandler_GetPreviousHandler",_kwnames,&_argo0)) @@ -1391,13 +1399,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetPreviousHandler(PyObject *self, Py _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShapeEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1408,7 +1410,6 @@ static PyObject *_wrap_wxPyShapeEvtHandler_CreateNewCopy(PyObject *self, PyObjec wxPyShapeEvtHandler * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeEvtHandler_CreateNewCopy",_kwnames,&_argo0)) @@ -1425,13 +1426,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_CreateNewCopy(PyObject *self, PyObjec _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShapeEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2457,6 +2452,14 @@ static void *SwigwxPyShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyShapeTowxObject(void *ptr) { + wxPyShape *src; + wxObject *dest; + src = (wxPyShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxPyShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2673,7 +2676,6 @@ static PyObject *_wrap_wxPyShape_GetCanvas(PyObject *self, PyObject *args, PyObj wxPyShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetCanvas",_kwnames,&_argo0)) @@ -2690,13 +2692,7 @@ static PyObject *_wrap_wxPyShape_GetCanvas(PyObject *self, PyObject *args, PyObj _result = (wxPyShapeCanvas *)wxPyShape_GetCanvas(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShapeCanvas_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2970,7 +2966,6 @@ static PyObject *_wrap_wxPyShape_GetParent(PyObject *self, PyObject *args, PyObj wxPyShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetParent",_kwnames,&_argo0)) @@ -2987,13 +2982,7 @@ static PyObject *_wrap_wxPyShape_GetParent(PyObject *self, PyObject *args, PyObj _result = (wxPyShape *)wxPyShape_GetParent(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3040,7 +3029,6 @@ static PyObject *_wrap_wxPyShape_GetTopAncestor(PyObject *self, PyObject *args, wxPyShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetTopAncestor",_kwnames,&_argo0)) @@ -3057,13 +3045,7 @@ static PyObject *_wrap_wxPyShape_GetTopAncestor(PyObject *self, PyObject *args, _result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3280,7 +3262,6 @@ static PyObject *_wrap_wxPyShape_GetEventHandler(PyObject *self, PyObject *args, wxPyShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetEventHandler",_kwnames,&_argo0)) @@ -3297,13 +3278,7 @@ static PyObject *_wrap_wxPyShape_GetEventHandler(PyObject *self, PyObject *args, _result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShapeEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5790,7 +5765,6 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","regionName", NULL }; - char _ptemp[128]; self = self; { @@ -5828,13 +5802,7 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); @@ -6896,7 +6864,6 @@ static PyObject *_wrap_wxPyShape_CreateNewCopy(PyObject *self, PyObject *args, P int tempbool1 = (int) TRUE; int tempbool2 = (int) TRUE; char *_kwnames[] = { "self","resetMapping","recompute", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyShape_CreateNewCopy",_kwnames,&_argo0,&tempbool1,&tempbool2)) @@ -6915,13 +6882,7 @@ static PyObject *_wrap_wxPyShape_CreateNewCopy(PyObject *self, PyObject *args, P _result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8491,6 +8452,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -8500,6 +8462,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxPyShape",SwigwxPyShapeTowxObject}, + { "_class_wxObject","_wxPyShape",SwigwxPyShapeTowxObject}, + { "_class_wxObject","_class_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, + { "_class_wxObject","_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, + { "_class_wxObject","_class_wxShapeRegion",SwigwxShapeRegionTowxObject}, + { "_class_wxObject","_wxShapeRegion",SwigwxShapeRegionTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -8514,6 +8483,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, @@ -8523,7 +8493,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8588,6 +8557,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPenList","_class_wxPenList",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -8676,6 +8646,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8711,12 +8682,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxPyShape",SwigwxPyShapeTowxObject}, + { "_wxObject","_wxPyShape",SwigwxPyShapeTowxObject}, + { "_wxObject","_class_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, + { "_wxObject","_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, + { "_wxObject","_class_wxShapeRegion",SwigwxShapeRegionTowxObject}, + { "_wxObject","_wxShapeRegion",SwigwxShapeRegionTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -8726,6 +8705,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -8735,7 +8715,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8744,6 +8723,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8793,6 +8773,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -8834,6 +8815,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -8891,6 +8873,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxFontList","_wxFontList",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglbasic.i b/wxPython/contrib/ogl/oglbasic.i index d93ef67c75..f12f64033f 100644 --- a/wxPython/contrib/ogl/oglbasic.i +++ b/wxPython/contrib/ogl/oglbasic.i @@ -42,7 +42,7 @@ //--------------------------------------------------------------------------- -class wxShapeRegion { +class wxShapeRegion : public wxObject { public: wxShapeRegion(); //~wxShapeRegion(); @@ -87,7 +87,7 @@ public: %} -class wxPyShapeEvtHandler { +class wxPyShapeEvtHandler : public wxObject { public: wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL, wxPyShape *shape = NULL); @@ -95,9 +95,7 @@ public: void _setSelf(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeEvtHandler)" - %addmethods { - void Destroy() { delete self; } - } + %addmethods { void Destroy() { delete self; } } void SetShape(wxPyShape *sh); wxPyShape *GetShape(); diff --git a/wxPython/contrib/ogl/oglbasic.py b/wxPython/contrib/ogl/oglbasic.py index 1bb9b5c307..bcb2658308 100644 --- a/wxPython/contrib/ogl/oglbasic.py +++ b/wxPython/contrib/ogl/oglbasic.py @@ -42,7 +42,7 @@ from filesys import * from utils import * import wx from oglcanvas import wxPyShapeCanvasPtr -class wxShapeRegionPtr : +class wxShapeRegionPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -143,7 +143,7 @@ class wxShapeRegion(wxShapeRegionPtr): -class wxPyShapeEvtHandlerPtr : +class wxPyShapeEvtHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -158,18 +158,15 @@ class wxPyShapeEvtHandlerPtr : return val def GetShape(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShapeEvtHandler_GetShape,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def SetPreviousHandler(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShapeEvtHandler_SetPreviousHandler,(self,) + _args, _kwargs) return val def GetPreviousHandler(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShapeEvtHandler_GetPreviousHandler,(self,) + _args, _kwargs) - if val: val = wxPyShapeEvtHandlerPtr(val) return val def CreateNewCopy(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShapeEvtHandler_CreateNewCopy,(self,) + _args, _kwargs) - if val: val = wxPyShapeEvtHandlerPtr(val) return val def base_OnDelete(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDelete,(self,) + _args, _kwargs) @@ -290,7 +287,6 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr): return val def GetCanvas(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_GetCanvas,(self,) + _args, _kwargs) - if val: val = wxPyShapeCanvasPtr(val) return val def SetCanvas(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_SetCanvas,(self,) + _args, _kwargs) @@ -318,14 +314,12 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr): return val def GetParent(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_GetParent,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def SetParent(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_SetParent,(self,) + _args, _kwargs) return val def GetTopAncestor(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_GetTopAncestor,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def GetChildren(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_GetChildren,(self,) + _args, _kwargs) @@ -350,7 +344,6 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr): return val def GetEventHandler(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_GetEventHandler,(self,) + _args, _kwargs) - if val: val = wxPyShapeEvtHandlerPtr(val) return val def SetEventHandler(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_SetEventHandler,(self,) + _args, _kwargs) @@ -668,7 +661,6 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr): return val def CreateNewCopy(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_CreateNewCopy,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def Copy(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_Copy,(self,) + _args, _kwargs) diff --git a/wxPython/contrib/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp index 788c352f08..1ec075e66b 100644 --- a/wxPython/contrib/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -121,6 +121,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static void *SwigwxDiagramTowxObject(void *ptr) { + wxDiagram *src; + wxObject *dest; + src = (wxDiagram *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxDiagram() (new wxDiagram()) static PyObject *_wrap_new_wxDiagram(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -146,33 +154,6 @@ static PyObject *_wrap_new_wxDiagram(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define delete_wxDiagram(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxDiagram(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDiagram * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDiagram",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDiagram. Expected _wxDiagram_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxDiagram(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxDiagram_AddShape(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddShape(_swigarg0,_swigarg1)) static PyObject *_wrap_wxDiagram_AddShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -329,7 +310,6 @@ static PyObject *_wrap_wxDiagram_FindShape(PyObject *self, PyObject *args, PyObj long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDiagram_FindShape",_kwnames,&_argo0,&_arg1)) @@ -346,13 +326,7 @@ static PyObject *_wrap_wxDiagram_FindShape(PyObject *self, PyObject *args, PyObj _result = (wxPyShape *)wxDiagram_FindShape(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -363,7 +337,6 @@ static PyObject *_wrap_wxDiagram_GetCanvas(PyObject *self, PyObject *args, PyObj wxDiagram * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDiagram_GetCanvas",_kwnames,&_argo0)) @@ -380,13 +353,7 @@ static PyObject *_wrap_wxDiagram_GetCanvas(PyObject *self, PyObject *args, PyObj _result = (wxPyShapeCanvas *)wxDiagram_GetCanvas(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShapeCanvas_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1203,6 +1170,14 @@ static void *SwigwxPyShapeCanvasTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyShapeCanvasTowxObject(void *ptr) { + wxPyShapeCanvas *src; + wxObject *dest; + src = (wxPyShapeCanvas *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1354,7 +1329,6 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args, PyObject * _argo4 = 0; PyObject * _argo5 = 0; char *_kwnames[] = { "self","x1","y","info","notImage", NULL }; - char _ptemp[128]; self = self; { @@ -1388,13 +1362,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args, _result = (wxPyShape *)wxPyShapeCanvas_FindShape(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { PyObject *o; o = PyInt_FromLong((long) (*_arg3)); @@ -1415,7 +1383,6 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P int _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x1","y","op", NULL }; - char _ptemp[128]; self = self; { @@ -1435,13 +1402,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P _result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { PyObject *o; o = PyInt_FromLong((long) (*_arg3)); @@ -1457,7 +1418,6 @@ static PyObject *_wrap_wxPyShapeCanvas_GetDiagram(PyObject *self, PyObject *args wxPyShapeCanvas * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeCanvas_GetDiagram",_kwnames,&_argo0)) @@ -1474,13 +1434,7 @@ static PyObject *_wrap_wxPyShapeCanvas_GetDiagram(PyObject *self, PyObject *args _result = (wxDiagram *)wxPyShapeCanvas_GetDiagram(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDiagram_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2002,7 +1956,6 @@ static PyMethodDef oglcanvascMethods[] = { { "wxDiagram_DeleteAllShapes", (PyCFunction) _wrap_wxDiagram_DeleteAllShapes, METH_VARARGS | METH_KEYWORDS }, { "wxDiagram_Clear", (PyCFunction) _wrap_wxDiagram_Clear, METH_VARARGS | METH_KEYWORDS }, { "wxDiagram_AddShape", (PyCFunction) _wrap_wxDiagram_AddShape, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxDiagram", (PyCFunction) _wrap_delete_wxDiagram, METH_VARARGS | METH_KEYWORDS }, { "new_wxDiagram", (PyCFunction) _wrap_new_wxDiagram, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; @@ -2098,6 +2051,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -2107,6 +2061,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxObject}, + { "_class_wxObject","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxObject}, + { "_class_wxObject","_class_wxDiagram",SwigwxDiagramTowxObject}, + { "_class_wxObject","_wxDiagram",SwigwxDiagramTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -2121,6 +2080,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -2128,7 +2088,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_class_wxPanel",0}, @@ -2196,6 +2155,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPenList","_class_wxPenList",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -2287,6 +2247,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -2324,12 +2285,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxObject}, + { "_wxObject","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxObject}, + { "_wxObject","_class_wxDiagram",SwigwxDiagramTowxObject}, + { "_wxObject","_wxDiagram",SwigwxDiagramTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -2339,6 +2306,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -2348,7 +2316,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -2359,6 +2326,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -2408,6 +2376,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -2449,6 +2418,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -2507,6 +2477,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxFontList","_wxFontList",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglcanvas.i b/wxPython/contrib/ogl/oglcanvas.i index 036aaa8377..1761f82f8a 100644 --- a/wxPython/contrib/ogl/oglcanvas.i +++ b/wxPython/contrib/ogl/oglcanvas.i @@ -40,10 +40,10 @@ //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -class wxDiagram { +class wxDiagram : public wxObject { public: wxDiagram(); - ~wxDiagram(); + //~wxDiagram(); void AddShape(wxPyShape*shape, wxPyShape *addAfter = NULL); void Clear(wxDC& dc); diff --git a/wxPython/contrib/ogl/oglcanvas.py b/wxPython/contrib/ogl/oglcanvas.py index 2467d6f08d..218121aae1 100644 --- a/wxPython/contrib/ogl/oglcanvas.py +++ b/wxPython/contrib/ogl/oglcanvas.py @@ -41,13 +41,10 @@ from filesys import * from utils import * import wx -class wxDiagramPtr : +class wxDiagramPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,oglcanvasc=oglcanvasc): - if self.thisown == 1 : - oglcanvasc.delete_wxDiagram(self) def AddShape(self, *_args, **_kwargs): val = apply(oglcanvasc.wxDiagram_AddShape,(self,) + _args, _kwargs) return val @@ -62,11 +59,9 @@ class wxDiagramPtr : return val def FindShape(self, *_args, **_kwargs): val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def GetCanvas(self, *_args, **_kwargs): val = apply(oglcanvasc.wxDiagram_GetCanvas,(self,) + _args, _kwargs) - if val: val = wxPyShapeCanvasPtr(val) return val def GetCount(self, *_args, **_kwargs): val = apply(oglcanvasc.wxDiagram_GetCount,(self,) + _args, _kwargs) @@ -165,7 +160,6 @@ class wxPyShapeCanvasPtr(wxScrolledWindowPtr): return val def GetDiagram(self, *_args, **_kwargs): val = apply(oglcanvasc.wxPyShapeCanvas_GetDiagram,(self,) + _args, _kwargs) - if val: val = wxDiagramPtr(val) return val def GetQuickEditMode(self, *_args, **_kwargs): val = apply(oglcanvasc.wxPyShapeCanvas_GetQuickEditMode,(self,) + _args, _kwargs) diff --git a/wxPython/contrib/ogl/oglhelpers.h b/wxPython/contrib/ogl/oglhelpers.h index 19404c2826..532e7d68e4 100644 --- a/wxPython/contrib/ogl/oglhelpers.h +++ b/wxPython/contrib/ogl/oglhelpers.h @@ -108,6 +108,7 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList); // virtual callbacks into Python callbacks. class wxPyShapeCanvas : public wxShapeCanvas { + DECLARE_DYNAMIC_CLASS(wxPyShapeCanvas); public: wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -130,6 +131,7 @@ public: class wxPyShapeEvtHandler : public wxShapeEvtHandler { + DECLARE_DYNAMIC_CLASS(wxPyShapeEvtHandler); public: wxPyShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL) : wxShapeEvtHandler(prev, shape) {} @@ -139,6 +141,7 @@ public: class wxPyShape : public wxShape { + DECLARE_ABSTRACT_CLASS(wxPyShape); public: wxPyShape(wxPyShapeCanvas *can = NULL) : wxShape(can) {} @@ -149,6 +152,7 @@ public: class wxPyRectangleShape : public wxRectangleShape { + DECLARE_DYNAMIC_CLASS(wxPyRectangleShape); public: wxPyRectangleShape(double width = 0.0, double height = 0.0) : wxRectangleShape(width, height) {} @@ -157,6 +161,7 @@ public: }; class wxPyControlPoint : public wxControlPoint { + DECLARE_DYNAMIC_CLASS(wxPyControlPoint); public: wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL, wxPyShape *object = NULL, @@ -171,6 +176,7 @@ public: class wxPyBitmapShape : public wxBitmapShape { + DECLARE_DYNAMIC_CLASS(wxPyBitmapShape); public: wxPyBitmapShape() : wxBitmapShape() {} @@ -180,6 +186,7 @@ public: class wxPyDrawnShape : public wxDrawnShape { + DECLARE_DYNAMIC_CLASS(wxPyDrawnShape); public: wxPyDrawnShape() : wxDrawnShape() {} @@ -188,6 +195,7 @@ public: class wxPyCompositeShape : public wxCompositeShape { + DECLARE_DYNAMIC_CLASS(wxPyCompositeShape); public: wxPyCompositeShape() : wxCompositeShape() {} @@ -196,6 +204,7 @@ public: class wxPyDividedShape : public wxDividedShape { + DECLARE_DYNAMIC_CLASS(wxPyDividedShape); public: wxPyDividedShape(double width = 0.0, double height = 0.0) : wxDividedShape(width, height) {} @@ -205,6 +214,7 @@ public: class wxPyDivisionShape : public wxDivisionShape { + DECLARE_DYNAMIC_CLASS(wxPyDivisionShape); public: wxPyDivisionShape() : wxDivisionShape() {} @@ -213,6 +223,7 @@ public: class wxPyEllipseShape : public wxEllipseShape { + DECLARE_DYNAMIC_CLASS(wxPyEllipseShape); public: wxPyEllipseShape(double width = 0.0, double height = 0.0) : wxEllipseShape(width, height) {} @@ -222,6 +233,7 @@ public: class wxPyCircleShape : public wxCircleShape { + DECLARE_DYNAMIC_CLASS(wxPyCircleShape); public: wxPyCircleShape(double width = 0.0) : wxCircleShape(width) {} @@ -231,6 +243,7 @@ public: class wxPyLineShape : public wxLineShape { + DECLARE_DYNAMIC_CLASS(wxPyLineShape); public: wxPyLineShape() : wxLineShape() {} @@ -239,6 +252,7 @@ public: class wxPyPolygonShape : public wxPolygonShape { + DECLARE_DYNAMIC_CLASS(wxPyPolygonShape); public: wxPyPolygonShape() : wxPolygonShape() {} @@ -247,6 +261,7 @@ public: class wxPyTextShape : public wxTextShape { + DECLARE_DYNAMIC_CLASS(wxPyTextShape); public: wxPyTextShape(double width = 0.0, double height = 0.0) : wxTextShape(width, height) {} @@ -260,3 +275,4 @@ public: //--------------------------------------------------------------------------- #endif + diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index 279975f1d1..25e03213b6 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -126,6 +126,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static void *SwigwxPseudoMetaFileTowxObject(void *ptr) { + wxPseudoMetaFile *src; + wxObject *dest; + src = (wxPseudoMetaFile *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPseudoMetaFile() (new wxPseudoMetaFile()) static PyObject *_wrap_new_wxPseudoMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1722,6 +1730,14 @@ static void *SwigwxPyRectangleShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyRectangleShapeTowxObject(void *ptr) { + wxPyRectangleShape *src; + wxObject *dest; + src = (wxPyRectangleShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyRectangleShape(_swigarg0,_swigarg1) (new wxPyRectangleShape(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2852,6 +2868,14 @@ static void *SwigwxPyControlPointTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyControlPointTowxObject(void *ptr) { + wxPyControlPoint *src; + wxObject *dest; + src = (wxPyControlPoint *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4002,6 +4026,14 @@ static void *SwigwxPyBitmapShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyBitmapShapeTowxObject(void *ptr) { + wxPyBitmapShape *src; + wxObject *dest; + src = (wxPyBitmapShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyBitmapShape() (new wxPyBitmapShape()) static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5256,6 +5288,14 @@ static void *SwigwxPyDrawnShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyDrawnShapeTowxObject(void *ptr) { + wxPyDrawnShape *src; + wxObject *dest; + src = (wxPyDrawnShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyDrawnShape() (new wxPyDrawnShape()) static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5863,7 +5903,6 @@ static PyObject *_wrap_wxPyDrawnShape_GetMetaFile(PyObject *self, PyObject *args wxPyDrawnShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDrawnShape_GetMetaFile",_kwnames,&_argo0)) @@ -5881,13 +5920,7 @@ static PyObject *_wrap_wxPyDrawnShape_GetMetaFile(PyObject *self, PyObject *args _result = (wxPseudoMetaFile *) &_result_ref; wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPseudoMetaFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7354,6 +7387,14 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndSize(PyObject *self, PyObject *a return _resultobj; } +static void *SwigwxOGLConstraintTowxObject(void *ptr) { + wxOGLConstraint *src; + wxObject *dest; + src = (wxOGLConstraint *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static wxOGLConstraint *new_wxOGLConstraint(int type,wxPyShape *constraining,PyObject *constrained) { wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p"); wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list); @@ -7509,6 +7550,14 @@ static void *SwigwxPyCompositeShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyCompositeShapeTowxObject(void *ptr) { + wxPyCompositeShape *src; + wxObject *dest; + src = (wxPyCompositeShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyCompositeShape() (new wxPyCompositeShape()) static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7625,7 +7674,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","constraint", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCompositeShape_AddConstraint",_kwnames,&_argo0,&_argo1)) @@ -7649,13 +7697,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstraint(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7676,7 +7718,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, P PyObject * _argo2 = 0; PyObject * _obj3 = 0; char *_kwnames[] = { "self","type","constraining","constrained", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddConstrainedShapes",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3)) @@ -7703,13 +7744,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, P _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7725,7 +7760,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, Py PyObject * _argo2 = 0; PyObject * _argo3 = 0; char *_kwnames[] = { "self","type","constraining","constrained", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddSimpleConstraint",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3)) @@ -7756,13 +7790,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, Py _result = (wxOGLConstraint *)wxPyCompositeShape_AddSimpleConstraint(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7908,7 +7936,6 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO wxPyCompositeShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyCompositeShape_FindContainerImage",_kwnames,&_argo0)) @@ -7925,13 +7952,7 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -9127,6 +9148,14 @@ static void *SwigwxPyDividedShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyDividedShapeTowxObject(void *ptr) { + wxPyDividedShape *src; + wxObject *dest; + src = (wxPyDividedShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyDividedShape(_swigarg0,_swigarg1) (new wxPyDividedShape(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10291,6 +10320,14 @@ static void *SwigwxPyDivisionShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyDivisionShapeTowxObject(void *ptr) { + wxPyDivisionShape *src; + wxObject *dest; + src = (wxPyDivisionShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyDivisionShape() (new wxPyDivisionShape()) static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10540,7 +10577,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject wxPyDivisionShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetBottomSide",_kwnames,&_argo0)) @@ -10557,13 +10593,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -10601,7 +10631,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a wxPyDivisionShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetLeftSide",_kwnames,&_argo0)) @@ -10618,13 +10647,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -10701,7 +10724,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject * wxPyDivisionShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetRightSide",_kwnames,&_argo0)) @@ -10718,13 +10740,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject * _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -10735,7 +10751,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar wxPyDivisionShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetTopSide",_kwnames,&_argo0)) @@ -10752,13 +10767,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -12685,6 +12694,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -12694,6 +12704,25 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxObject}, + { "_class_wxObject","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxObject}, + { "_class_wxObject","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxObject}, + { "_class_wxObject","_wxPyDividedShape",SwigwxPyDividedShapeTowxObject}, + { "_class_wxObject","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxObject}, + { "_class_wxObject","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxObject}, + { "_class_wxObject","_class_wxOGLConstraint",SwigwxOGLConstraintTowxObject}, + { "_class_wxObject","_wxOGLConstraint",SwigwxOGLConstraintTowxObject}, + { "_class_wxObject","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxObject}, + { "_class_wxObject","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxObject}, + { "_class_wxObject","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxObject}, + { "_class_wxObject","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxObject}, + { "_class_wxObject","_class_wxPyControlPoint",SwigwxPyControlPointTowxObject}, + { "_class_wxObject","_wxPyControlPoint",SwigwxPyControlPointTowxObject}, + { "_class_wxObject","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxObject}, + { "_class_wxObject","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxObject}, + { "_class_wxObject","_class_wxPseudoMetaFile",SwigwxPseudoMetaFileTowxObject}, + { "_class_wxObject","_wxPseudoMetaFile",SwigwxPseudoMetaFileTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, @@ -12709,6 +12738,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler}, @@ -12733,7 +12763,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -12800,6 +12829,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPenList","_class_wxPenList",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -12891,6 +12921,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -12926,6 +12957,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -12933,6 +12965,25 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, + { "_wxObject","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxObject}, + { "_wxObject","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxObject}, + { "_wxObject","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxObject}, + { "_wxObject","_wxPyDividedShape",SwigwxPyDividedShapeTowxObject}, + { "_wxObject","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxObject}, + { "_wxObject","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxObject}, + { "_wxObject","_class_wxOGLConstraint",SwigwxOGLConstraintTowxObject}, + { "_wxObject","_wxOGLConstraint",SwigwxOGLConstraintTowxObject}, + { "_wxObject","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxObject}, + { "_wxObject","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxObject}, + { "_wxObject","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxObject}, + { "_wxObject","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxObject}, + { "_wxObject","_class_wxPyControlPoint",SwigwxPyControlPointTowxObject}, + { "_wxObject","_wxPyControlPoint",SwigwxPyControlPointTowxObject}, + { "_wxObject","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxObject}, + { "_wxObject","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxObject}, + { "_wxObject","_class_wxPseudoMetaFile",SwigwxPseudoMetaFileTowxObject}, + { "_wxObject","_wxPseudoMetaFile",SwigwxPseudoMetaFileTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -12942,6 +12993,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -12952,7 +13004,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -12975,6 +13026,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -13025,6 +13077,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -13066,6 +13119,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -13138,6 +13192,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxFontList","_wxFontList",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglshapes.i b/wxPython/contrib/ogl/oglshapes.i index 05f39ba9ec..4b89b5a8c2 100644 --- a/wxPython/contrib/ogl/oglshapes.i +++ b/wxPython/contrib/ogl/oglshapes.i @@ -40,7 +40,7 @@ //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -class wxPseudoMetaFile { +class wxPseudoMetaFile : public wxObject { public: wxPseudoMetaFile(); ~wxPseudoMetaFile(); @@ -326,7 +326,7 @@ public: //--------------------------------------------------------------------------- -class wxOGLConstraint { +class wxOGLConstraint : public wxObject { public: //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained); %addmethods { diff --git a/wxPython/contrib/ogl/oglshapes.py b/wxPython/contrib/ogl/oglshapes.py index b739f733a7..239f140a93 100644 --- a/wxPython/contrib/ogl/oglshapes.py +++ b/wxPython/contrib/ogl/oglshapes.py @@ -43,7 +43,7 @@ from utils import * from oglbasic import * import wx -class wxPseudoMetaFilePtr : +class wxPseudoMetaFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -570,7 +570,6 @@ class wxPyDrawnShapePtr(wxPyRectangleShapePtr): return val def GetMetaFile(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDrawnShape_GetMetaFile,(self,) + _args, _kwargs) - if val: val = wxPseudoMetaFilePtr(val) return val def GetRotation(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDrawnShape_GetRotation,(self,) + _args, _kwargs) @@ -709,7 +708,7 @@ class wxPyDrawnShape(wxPyDrawnShapePtr): -class wxOGLConstraintPtr : +class wxOGLConstraintPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -744,15 +743,12 @@ class wxPyCompositeShapePtr(wxPyRectangleShapePtr): return val def AddConstraint(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_AddConstraint,(self,) + _args, _kwargs) - if val: val = wxOGLConstraintPtr(val) return val def AddConstrainedShapes(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_AddConstrainedShapes,(self,) + _args, _kwargs) - if val: val = wxOGLConstraintPtr(val) return val def AddSimpleConstraint(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_AddSimpleConstraint,(self,) + _args, _kwargs) - if val: val = wxOGLConstraintPtr(val) return val def CalculateSize(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_CalculateSize,(self,) + _args, _kwargs) @@ -768,7 +764,6 @@ class wxPyCompositeShapePtr(wxPyRectangleShapePtr): return val def FindContainerImage(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_FindContainerImage,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def GetConstraints(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyCompositeShape_GetConstraints,(self,) + _args, _kwargs) @@ -1021,14 +1016,12 @@ class wxPyDivisionShapePtr(wxPyCompositeShapePtr): return val def GetBottomSide(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetBottomSide,(self,) + _args, _kwargs) - if val: val = wxPyDivisionShapePtr(val) return val def GetHandleSide(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetHandleSide,(self,) + _args, _kwargs) return val def GetLeftSide(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetLeftSide,(self,) + _args, _kwargs) - if val: val = wxPyDivisionShapePtr(val) return val def GetLeftSideColour(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetLeftSideColour,(self,) + _args, _kwargs) @@ -1039,11 +1032,9 @@ class wxPyDivisionShapePtr(wxPyCompositeShapePtr): return val def GetRightSide(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetRightSide,(self,) + _args, _kwargs) - if val: val = wxPyDivisionShapePtr(val) return val def GetTopSide(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetTopSide,(self,) + _args, _kwargs) - if val: val = wxPyDivisionShapePtr(val) return val def GetTopSidePen(self, *_args, **_kwargs): val = apply(oglshapesc.wxPyDivisionShape_GetTopSidePen,(self,) + _args, _kwargs) diff --git a/wxPython/contrib/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp index f91aa94794..fd7c4c8a84 100644 --- a/wxPython/contrib/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -138,6 +138,14 @@ static void *SwigwxPyEllipseShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyEllipseShapeTowxObject(void *ptr) { + wxPyEllipseShape *src; + wxObject *dest; + src = (wxPyEllipseShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyEllipseShape(_swigarg0,_swigarg1) (new wxPyEllipseShape(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyEllipseShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1213,6 +1221,14 @@ static void *SwigwxPyCircleShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyCircleShapeTowxObject(void *ptr) { + wxPyCircleShape *src; + wxObject *dest; + src = (wxPyCircleShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyCircleShape(_swigarg0) (new wxPyCircleShape(_swigarg0)) static PyObject *_wrap_new_wxPyCircleShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2263,6 +2279,14 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEndSize(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxArrowHeadTowxObject(void *ptr) { + wxArrowHead *src; + wxObject *dest; + src = (wxArrowHead *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxArrowHead(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxArrowHead(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxArrowHead(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2615,7 +2639,6 @@ static PyObject *_wrap_wxArrowHead_GetMetaFile(PyObject *self, PyObject *args, P wxArrowHead * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxArrowHead_GetMetaFile",_kwnames,&_argo0)) @@ -2632,13 +2655,7 @@ static PyObject *_wrap_wxArrowHead_GetMetaFile(PyObject *self, PyObject *args, P _result = (wxPseudoMetaFile *)wxArrowHead_GetMetaFile(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPseudoMetaFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2795,6 +2812,14 @@ static void *SwigwxPyLineShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyLineShapeTowxObject(void *ptr) { + wxPyLineShape *src; + wxObject *dest; + src = (wxPyLineShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyLineShape() (new wxPyLineShape()) static PyObject *_wrap_new_wxPyLineShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3318,7 +3343,6 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHeadId(PyObject *self, PyObject *a long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","arrowId", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxPyLineShape_FindArrowHeadId",_kwnames,&_argo0,&_arg1)) @@ -3335,13 +3359,7 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHeadId(PyObject *self, PyObject *a _result = (wxArrowHead *)wxPyLineShape_FindArrowHeadId(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxArrowHead_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3355,7 +3373,6 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(PyObject *self, PyObject *arg PyObject * _argo0 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","position","name", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxPyLineShape_FindArrowHead",_kwnames,&_argo0,&_arg1,&_obj2)) @@ -3390,13 +3407,7 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(PyObject *self, PyObject *arg _result = (wxArrowHead *)wxPyLineShape_FindArrowHead(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxArrowHead_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -3714,7 +3725,6 @@ static PyObject *_wrap_wxPyLineShape_GetFrom(PyObject *self, PyObject *args, PyO wxPyLineShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyLineShape_GetFrom",_kwnames,&_argo0)) @@ -3731,13 +3741,7 @@ static PyObject *_wrap_wxPyLineShape_GetFrom(PyObject *self, PyObject *args, PyO _result = (wxPyShape *)wxPyLineShape_GetFrom(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3839,7 +3843,6 @@ static PyObject *_wrap_wxPyLineShape_GetTo(PyObject *self, PyObject *args, PyObj wxPyLineShape * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyLineShape_GetTo",_kwnames,&_argo0)) @@ -3856,13 +3859,7 @@ static PyObject *_wrap_wxPyLineShape_GetTo(PyObject *self, PyObject *args, PyObj _result = (wxPyShape *)wxPyLineShape_GetTo(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4020,6 +4017,38 @@ static PyObject *_wrap_wxPyLineShape_MakeLineControlPoints(PyObject *self, PyObj return _resultobj; } +static PyObject * wxPyLineShape_GetLineControlPoints(wxPyLineShape *self) { + wxList* list = self->GetLineControlPoints(); + return wxPy_ConvertList(list, "wxPyControlPoint"); + } +static PyObject *_wrap_wxPyLineShape_GetLineControlPoints(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyLineShape * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyLineShape_GetLineControlPoints",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyLineShape_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyLineShape_GetLineControlPoints. Expected _wxPyLineShape_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyLineShape_GetLineControlPoints(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + #define wxPyLineShape_SetAttachmentFrom(_swigobj,_swigarg0) (_swigobj->SetAttachmentFrom(_swigarg0)) static PyObject *_wrap_wxPyLineShape_SetAttachmentFrom(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5334,6 +5363,14 @@ static void *SwigwxPyPolygonShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyPolygonShapeTowxObject(void *ptr) { + wxPyPolygonShape *src; + wxObject *dest; + src = (wxPyPolygonShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyPolygonShape() (new wxPyPolygonShape()) static PyObject *_wrap_new_wxPyPolygonShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6591,6 +6628,14 @@ static void *SwigwxPyTextShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyTextShapeTowxObject(void *ptr) { + wxPyTextShape *src; + wxObject *dest; + src = (wxPyTextShape *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyTextShape(_swigarg0,_swigarg1) (new wxPyTextShape(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyTextShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7775,6 +7820,7 @@ static PyMethodDef oglshapes2cMethods[] = { { "wxPyLineShape_SetAttachmentTo", (PyCFunction) _wrap_wxPyLineShape_SetAttachmentTo, METH_VARARGS | METH_KEYWORDS }, { "wxPyLineShape_SetAttachments", (PyCFunction) _wrap_wxPyLineShape_SetAttachments, METH_VARARGS | METH_KEYWORDS }, { "wxPyLineShape_SetAttachmentFrom", (PyCFunction) _wrap_wxPyLineShape_SetAttachmentFrom, METH_VARARGS | METH_KEYWORDS }, + { "wxPyLineShape_GetLineControlPoints", (PyCFunction) _wrap_wxPyLineShape_GetLineControlPoints, METH_VARARGS | METH_KEYWORDS }, { "wxPyLineShape_MakeLineControlPoints", (PyCFunction) _wrap_wxPyLineShape_MakeLineControlPoints, METH_VARARGS | METH_KEYWORDS }, { "wxPyLineShape_IsSpline", (PyCFunction) _wrap_wxPyLineShape_IsSpline, METH_VARARGS | METH_KEYWORDS }, { "wxPyLineShape_IsEnd", (PyCFunction) _wrap_wxPyLineShape_IsEnd, METH_VARARGS | METH_KEYWORDS }, @@ -7983,6 +8029,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -7992,6 +8039,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxPyTextShape",SwigwxPyTextShapeTowxObject}, + { "_class_wxObject","_wxPyTextShape",SwigwxPyTextShapeTowxObject}, + { "_class_wxObject","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxObject}, + { "_class_wxObject","_wxPyPolygonShape",SwigwxPyPolygonShapeTowxObject}, + { "_class_wxObject","_class_wxPyLineShape",SwigwxPyLineShapeTowxObject}, + { "_class_wxObject","_wxPyLineShape",SwigwxPyLineShapeTowxObject}, + { "_class_wxObject","_class_wxArrowHead",SwigwxArrowHeadTowxObject}, + { "_class_wxObject","_wxArrowHead",SwigwxArrowHeadTowxObject}, + { "_class_wxObject","_class_wxPyCircleShape",SwigwxPyCircleShapeTowxObject}, + { "_class_wxObject","_wxPyCircleShape",SwigwxPyCircleShapeTowxObject}, + { "_class_wxObject","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxObject}, + { "_class_wxObject","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, @@ -8010,6 +8070,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShapeEvtHandler}, @@ -8029,7 +8090,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8096,6 +8156,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPenList","_class_wxPenList",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -8190,6 +8251,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8226,6 +8288,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -8234,6 +8297,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, + { "_wxObject","_class_wxPyTextShape",SwigwxPyTextShapeTowxObject}, + { "_wxObject","_wxPyTextShape",SwigwxPyTextShapeTowxObject}, + { "_wxObject","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxObject}, + { "_wxObject","_wxPyPolygonShape",SwigwxPyPolygonShapeTowxObject}, + { "_wxObject","_class_wxPyLineShape",SwigwxPyLineShapeTowxObject}, + { "_wxObject","_wxPyLineShape",SwigwxPyLineShapeTowxObject}, + { "_wxObject","_class_wxArrowHead",SwigwxArrowHeadTowxObject}, + { "_wxObject","_wxArrowHead",SwigwxArrowHeadTowxObject}, + { "_wxObject","_class_wxPyCircleShape",SwigwxPyCircleShapeTowxObject}, + { "_wxObject","_wxPyCircleShape",SwigwxPyCircleShapeTowxObject}, + { "_wxObject","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxObject}, + { "_wxObject","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -8243,6 +8319,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -8253,7 +8330,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8272,6 +8348,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8323,6 +8400,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -8364,6 +8442,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, @@ -8433,6 +8512,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxFontList","_wxFontList",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglshapes2.i b/wxPython/contrib/ogl/oglshapes2.i index a79ebca598..ebdb5090cf 100644 --- a/wxPython/contrib/ogl/oglshapes2.i +++ b/wxPython/contrib/ogl/oglshapes2.i @@ -125,7 +125,7 @@ public: }; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -class wxArrowHead { +class wxArrowHead : public wxObject { public: wxArrowHead(int type = 0, int end = 0, @@ -207,8 +207,13 @@ public: bool IsSpline(); void MakeLineControlPoints(int n); - // TODO: // inline wxList *GetLineControlPoints() { return m_lineControlPoints; } + %addmethods { + PyObject* GetLineControlPoints() { + wxList* list = self->GetLineControlPoints(); + return wxPy_ConvertList(list, "wxPyControlPoint"); + } + } void SetAttachmentFrom(int fromAttach); void SetAttachments(int fromAttach, int toAttach); diff --git a/wxPython/contrib/ogl/oglshapes2.py b/wxPython/contrib/ogl/oglshapes2.py index d534c2e986..5d1a7f6566 100644 --- a/wxPython/contrib/ogl/oglshapes2.py +++ b/wxPython/contrib/ogl/oglshapes2.py @@ -249,7 +249,7 @@ class wxPyCircleShape(wxPyCircleShapePtr): -class wxArrowHeadPtr : +class wxArrowHeadPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -288,7 +288,6 @@ class wxArrowHeadPtr : return val def GetMetaFile(self, *_args, **_kwargs): val = apply(oglshapes2c.wxArrowHead_GetMetaFile,(self,) + _args, _kwargs) - if val: val = wxPseudoMetaFilePtr(val) return val def GetId(self, *_args, **_kwargs): val = apply(oglshapes2c.wxArrowHead_GetId,(self,) + _args, _kwargs) @@ -357,11 +356,9 @@ class wxPyLineShapePtr(wxPyShapePtr): return val def FindArrowHeadId(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_FindArrowHeadId,(self,) + _args, _kwargs) - if val: val = wxArrowHeadPtr(val) return val def FindArrowHead(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_FindArrowHead,(self,) + _args, _kwargs) - if val: val = wxArrowHeadPtr(val) return val def FindLineEndPoints(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_FindLineEndPoints,(self,) + _args, _kwargs) @@ -386,7 +383,6 @@ class wxPyLineShapePtr(wxPyShapePtr): return val def GetFrom(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_GetFrom,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def GetLabelPosition(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_GetLabelPosition,(self,) + _args, _kwargs) @@ -397,7 +393,6 @@ class wxPyLineShapePtr(wxPyShapePtr): return val def GetTo(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def Initialise(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_Initialise,(self,) + _args, _kwargs) @@ -414,6 +409,9 @@ class wxPyLineShapePtr(wxPyShapePtr): def MakeLineControlPoints(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_MakeLineControlPoints,(self,) + _args, _kwargs) return val + def GetLineControlPoints(self, *_args, **_kwargs): + val = apply(oglshapes2c.wxPyLineShape_GetLineControlPoints,(self,) + _args, _kwargs) + return val def SetAttachmentFrom(self, *_args, **_kwargs): val = apply(oglshapes2c.wxPyLineShape_SetAttachmentFrom,(self,) + _args, _kwargs) return val diff --git a/wxPython/demo/GridHugeTable.py b/wxPython/demo/GridHugeTable.py index 69e3aed48b..6c450ec5d7 100644 --- a/wxPython/demo/GridHugeTable.py +++ b/wxPython/demo/GridHugeTable.py @@ -56,7 +56,7 @@ class TestFrame(wxFrame): wxFrame.__init__(self, parent, -1, "Huge (virtual) Table Demo", size=(640,480)) grid = HugeTableGrid(self, log) - + grid.SetReadOnly(5,5, true) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py index a45d1841c6..215eb58490 100644 --- a/wxPython/demo/GridSimple.py +++ b/wxPython/demo/GridSimple.py @@ -19,9 +19,12 @@ class SimpleGrid(wxGrid): self.SetCellValue(0, 0, "First cell") self.SetCellValue(1, 1, "Another cell") self.SetCellValue(2, 2, "Yet another cell") + self.SetCellValue(3, 3, "This cell is read-only") self.SetCellFont(0, 0, wxFont(12, wxROMAN, wxITALIC, wxNORMAL)) self.SetCellTextColour(1, 1, wxRED) self.SetCellBackgroundColour(2, 2, wxCYAN) + self.SetReadOnly(3, 3, true) + # attribute objects let you keep a set of formatting values # in one spot, and reuse them if needed diff --git a/wxPython/demo/GridStdEdRend.py b/wxPython/demo/GridStdEdRend.py index 5835a8227e..5ad7c752d5 100644 --- a/wxPython/demo/GridStdEdRend.py +++ b/wxPython/demo/GridStdEdRend.py @@ -142,6 +142,7 @@ Renderers used together. attr.SetReadOnly(true) attr.SetAlignment(wxRIGHT, -1) self.SetColAttr(renCol, attr) + attr.IncRef() self.SetColAttr(edCol, attr) # There is a bug in wxGTK for this method... diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index a18951f49f..d2119c1a41 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -23,7 +23,7 @@ import images _treeList = [ ('New since last release', ['ColourSelect', 'ImageBrowser', 'infoframe', - 'ColourDB', 'wxToggleButton', + 'ColourDB', 'wxToggleButton', 'OOR', ]), ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']), @@ -53,7 +53,7 @@ _treeList = [ 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', 'PythonEvents', 'Threads', 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', - 'wxDragImage', "wxProcess", "FancyText", + 'wxDragImage', "wxProcess", "FancyText", "OOR", ]), ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', diff --git a/wxPython/demo/OOR.py b/wxPython/demo/OOR.py new file mode 100644 index 0000000000..3ef0878d58 --- /dev/null +++ b/wxPython/demo/OOR.py @@ -0,0 +1,118 @@ + +from wxPython.wx import * +from wxPython.html import * + +#---------------------------------------------------------------------- + +BTN1 = wxNewId() +BTN2 = wxNewId() + + +class TestPanel(wxPanel): + def __init__(self, parent, log): + wxPanel.__init__(self, parent, -1) + self.log = log + + sizer = wxBoxSizer(wxVERTICAL) + html = wxHtmlWindow(self, -1) + html.SetPage(overview) + sizer.Add(html, 1, wxEXPAND|wxALL, 5) + + btns = wxBoxSizer(wxHORIZONTAL) + btns.Add(50, -1, 1, wxEXPAND) + btn1 = wxButton(self, BTN1, "Find My Alter-ego") # don't save a ref to this one + btns.Add(btn1) + btns.Add(50, -1, 1, wxEXPAND) + self.btn2 = wxButton(self, BTN2, "Find Myself") + btns.Add(self.btn2) + btns.Add(50, -1, 1, wxEXPAND) + + sizer.Add(btns, 0, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 5) + + self.SetSizer(sizer) + self.SetAutoLayout(true) + + EVT_BUTTON(self, BTN1, self.OnFindButton1) + EVT_BUTTON(self, BTN2, self.OnFindButton2) + + + def OnFindButton1(self, evt): + win = self.FindWindowById(BTN1) + if win is None: + self.log.write("***** OOPS! None returned...\n") + return + className = win.__class__.__name__ + if className in ["wxButton", "wxButtonPtr"]: + self.log.write("The types are the same! \n") + else: + self.log.write("Got %s, expected wxButton or wxButtonPtr\n" % className) + + + + def OnFindButton2(self, evt): + win = self.FindWindowById(BTN2) + if win is None: + self.log.write("***** OOPS! None returned...\n") + return + if win is self.btn2: + self.log.write("The objects are the same! \n") + else: + self.log.write("The objects are NOT the same! \n") + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + +#---------------------------------------------------------------------- + + +overview = """\ + +

Original Object Return

+ +

Several methods in wxWindows return pointers to base class objects, +when in fact the actual object pointed to is of a derived type. Since +SWIG isn't able to tell the actual type it just creates a new Python +shadow object of the base type to wrap around the base type pointer +and returns it. + +

In wxPython this can cause annoying issues. For example if you +call: + +

+
+        myText = someWindow.FindWindowById(txtID)
+
+ +expecting to get a wxTextCtrl you will actually get a wxWindow object +instead. If you then try to call SetValue on that object you'll get +an exception since there is no such method. This is the reason for +the wxPyTypeCast hack that has been in wxPython for so long. + +

Even with wxPyTypeCast there is the issue that the object returned +is not the same one that was created in Python originally, but a new +object of the same type that wraps the same C++ pointer. If the +programmer has set additional attributes of that original object they +will not exist in the new object. + +

For a long time now I have wanted to do away with wxPyTypeCast and +also find a way to return the original Python object from methods like +FindWindowById. This project naturally divides into two phases: + +

    + +
  1. Teach the wrapper methods how to return objects of the right type, +and be able to then turn wxPyTypeCast in to a no-op. + +
  2. Be able to return the original Python shadow object if it still exists. + +
+ +

The first button below shows the first of these phases (working) +and the second will show #2 (not yet working.) + + +""" diff --git a/wxPython/demo/data/grid.i b/wxPython/demo/data/grid.i index 37f0db23a5..649ccf7534 100644 --- a/wxPython/demo/data/grid.i +++ b/wxPython/demo/data/grid.i @@ -15,7 +15,7 @@ #ifndef OLD_GRID %{ -#include "helpers.h" +#include "export.h" #include %} @@ -43,27 +43,27 @@ %{ -#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ - wxGridCellAttr* CBNAME(int a, int b) { \ - wxGridCellAttr* rval = NULL; \ - bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ - PyObject* ro; \ - wxGridCellAttr* ptr; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", a, b)); \ - if (ro) { \ +#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iii)", a, b, c)); \ + if (ro) { \ if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ - rval = ptr; \ - Py_DECREF(ro); \ - } \ - } \ - else \ - rval = PCLASS::CBNAME(a, b); \ - wxPySaveThread(doSave); \ - return rval; \ - } \ - wxGridCellAttr *base_##CBNAME(int a, int b) { \ - return PCLASS::CBNAME(a, b); \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b, c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + return PCLASS::CBNAME(a, b, c); \ } @@ -71,11 +71,11 @@ #define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int a, int b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback( \ - Py_BuildValue("(Oii)", \ - wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ - a, b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(attr, a, b); \ wxPySaveThread(doSave); \ @@ -89,11 +89,11 @@ #define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int val) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback( \ - Py_BuildValue("(Oi)", \ - wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ - val)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(attr, val); \ wxPySaveThread(doSave); \ @@ -108,8 +108,8 @@ int CBNAME() { \ bool doSave = wxPyRestoreThread(); \ int rval = 0; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ wxPySaveThread(doSave); \ return rval; \ } @@ -120,8 +120,8 @@ bool CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ bool rval = 0; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ wxPySaveThread(doSave); \ return rval; \ } @@ -132,12 +132,13 @@ wxString CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ - rval = PyString_AsString(PyObject_Str(ro)); \ - Py_DECREF(ro); \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ } \ } \ wxPySaveThread(doSave); \ @@ -149,8 +150,8 @@ #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iis)",a,b,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \ wxPySaveThread(doSave); \ } @@ -159,12 +160,13 @@ wxString CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ - rval = PyString_AsString(PyObject_Str(ro)); \ - Py_DECREF(ro); \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ } \ } else \ rval = PCLASS::CBNAME(a, b); \ @@ -181,8 +183,8 @@ bool CBNAME(int a, int b, const wxString& c) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(iis)", a,b,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \ else \ rval = PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -199,8 +201,8 @@ long CBNAME(int a, int b) { \ long rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -216,8 +218,8 @@ bool CBNAME(int a, int b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -233,12 +235,13 @@ double CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ double rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ - rval = PyFloat_AsDouble(PyObject_Str(ro)); \ - Py_DECREF(ro); \ + PyObject* str = PyObject_Str(ro); \ + rval = PyFloat_AsDouble(str); \ + Py_DECREF(ro); Py_DECREF(str); \ } \ } else \ rval = PCLASS::CBNAME(a, b); \ @@ -254,8 +257,8 @@ #define PYCALLBACK__(PCLASS, CBNAME) \ void CBNAME() { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -271,8 +274,8 @@ bool CBNAME(size_t a, size_t b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -288,8 +291,8 @@ bool CBNAME(size_t a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(i)", a)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -305,12 +308,13 @@ wxString CBNAME(int a) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(i)",a)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \ if (ro) { \ - rval = PyString_AsString(PyObject_Str(ro)); \ - Py_DECREF(ro); \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ } \ } else \ rval = PCLASS::CBNAME(a); \ @@ -326,8 +330,8 @@ #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(is)", a,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \ else \ PCLASS::CBNAME(a,c); \ wxPySaveThread(doSave); \ @@ -343,8 +347,8 @@ bool CBNAME() { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ rval = PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -359,8 +363,8 @@ #define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ void CBNAME(size_t a, int b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -375,8 +379,8 @@ #define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ void CBNAME(int a, int b, long c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -391,8 +395,8 @@ #define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ void CBNAME(int a, int b, double c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iif)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -406,8 +410,8 @@ #define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ void CBNAME(int a, int b, bool c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -480,13 +484,13 @@ public: wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Draw")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Draw")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", - wxPyConstructObject((void*)&grid, "wxGrid"), - wxPyConstructObject((void*)&attr, "wxGridCellAttr"), - wxPyConstructObject((void*)&dc, "wxDC"), - wxPyConstructObject((void*)&rect, "wxRect"), + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + wxPyConstructObject((void*)&rect, "wxRect", 0), row, col, isSelected)); } wxPySaveThread(doSave); @@ -496,14 +500,14 @@ public: int row, int col) { wxSize rval; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetBestSize")) { + if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { PyObject* ro; wxSize* ptr; - ro = m_myInst.callCallbackObj( + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)", - wxPyConstructObject((void*)&grid, "wxGrid"), - wxPyConstructObject((void*)&attr, "wxGridCellAttr"), - wxPyConstructObject((void*)&dc, "wxDC"), + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), row, col)); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) @@ -519,10 +523,10 @@ public: wxGridCellRenderer *Clone() const { wxGridCellRenderer* rval = NULL; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Clone")) { + if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellRenderer* ptr; - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) rval = ptr; @@ -634,12 +638,12 @@ public: void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Create")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Create")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", - wxPyConstructObject((void*)parent, "wxWindow"), + wxPyConstructObject((void*)parent, "wxWindow", 0), id, - wxPyConstructObject((void*)evtHandler, "wxEvtHandler"))); + wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0))); } wxPySaveThread(doSave); } @@ -647,10 +651,10 @@ public: void BeginEdit(int row, int col, wxGrid* grid) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("BeginEdit")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, - wxPyConstructObject((void*)grid, "wxGrid"))); + wxPyConstructObject((void*)grid, "wxGrid", 0))); } wxPySaveThread(doSave); } @@ -659,23 +663,23 @@ public: bool EndEdit(int row, int col, wxGrid* grid) { bool rv = FALSE; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("EndEdit")) { - rv = m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { + rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, - wxPyConstructObject((void*)grid, "wxGrid"))); + wxPyConstructObject((void*)grid, "wxGrid", 0))); } wxPySaveThread(doSave); return rv; } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Clone")) { + if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellEditor* ptr; - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) rval = ptr; @@ -689,10 +693,10 @@ public: void Show(bool show, wxGridCellAttr *attr) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Show")) - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Show")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, - wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); else wxGridCellEditor::Show(show, attr); wxPySaveThread(doSave); @@ -704,11 +708,11 @@ public: void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("PaintBackground")) - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "PaintBackground")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", - wxPyConstructObject((void*)&rectCell, "wxRect"), - wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + wxPyConstructObject((void*)&rectCell, "wxRect", 0), + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); else wxGridCellEditor::PaintBackground(rectCell, attr); wxPySaveThread(doSave); @@ -753,6 +757,7 @@ public: void base_SetSize(const wxRect& rect); void base_Show(bool show, wxGridCellAttr *attr = NULL); void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + void base_IsAcceptedKey(wxKeyEvent& event); void base_StartingKey(wxKeyEvent& event); void base_StartingClick(); void base_HandleReturn(wxKeyEvent& event); @@ -796,23 +801,6 @@ public: wxGridCellChoiceEditor(int LCOUNT = 0, const wxString* choices = NULL, bool allowOthers = FALSE); -#ifdef PRE2115 - %addmethods { - wxGridCellChoiceEditor(PyObject* choices, - bool allowOthers = FALSE) { - - const char** temp = string_LIST_helper(choices); - if (temp) { - int count = PyList_Size(choices); - wxGridCellChoiceEditor* ret; - ret = new wxGridCellChoiceEditor(count, temp, allowOthers); - delete [] temp; - return ret; - } - return NULL; - } - } -#endif }; //--------------------------------------------------------------------------- @@ -821,9 +809,20 @@ public: class wxGridCellAttr { public: + enum wxAttrKind + { + Any, + Default, + Cell, + Row, + Col, + Merged + }; + wxGridCellAttr(); wxGridCellAttr *Clone() const; + void MergeWith(wxGridCellAttr *mergefrom); void IncRef(); void DecRef(); void SetTextColour(const wxColour& colText); @@ -834,6 +833,7 @@ public: void SetRenderer(wxGridCellRenderer *renderer); void SetEditor(wxGridCellEditor* editor); + void SetKind(wxAttrKind kind); bool HasTextColour() const; bool HasBackgroundColour() const; @@ -841,6 +841,7 @@ public: bool HasAlignment() const; bool HasRenderer() const; bool HasEditor() const; + bool HasReadWriteMode() const; const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; @@ -861,7 +862,8 @@ public: wxGridCellAttrProvider(); // ???? virtual ~wxGridCellAttrProvider(); - wxGridCellAttr *GetAttr(int row, int col) const; + wxGridCellAttr *GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind) const; void SetAttr(wxGridCellAttr *attr, int row, int col); void SetRowAttr(wxGridCellAttr *attr, int row); void SetColAttr(wxGridCellAttr *attr, int col); @@ -879,7 +881,7 @@ class wxPyGridCellAttrProvider : public wxGridCellAttrProvider public: wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; - PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridCellAttrProvider, GetAttr); PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); @@ -897,7 +899,8 @@ public: void _setSelf(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellAttrProvider)" - wxGridCellAttr *base_GetAttr(int row, int col); + wxGridCellAttr *base_GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind); void base_SetAttr(wxGridCellAttr *attr, int row, int col); void base_SetRowAttr(wxGridCellAttr *attr, int row); void base_SetColAttr(wxGridCellAttr *attr, int col); @@ -909,7 +912,7 @@ public: -class wxGridTableBase +class wxGridTableBase : public wxObject { public: // wxGridTableBase(); This is an ABC @@ -958,7 +961,8 @@ public: virtual bool CanHaveAttributes(); - virtual wxGridCellAttr *GetAttr( int row, int col ); + virtual wxGridCellAttr *GetAttr( int row, int col, + wxGridCellAttr::wxAttrKind kind); virtual void SetAttr(wxGridCellAttr* attr, int row, int col); virtual void SetRowAttr(wxGridCellAttr *attr, int row); virtual void SetColAttr(wxGridCellAttr *attr, int col); @@ -992,22 +996,23 @@ public: PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); - PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridTableBase, GetAttr); PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); - wxString GetValue(int row, int col) { bool doSave = wxPyRestoreThread(); wxString rval; - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",row,col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); if (ro) { - rval = PyString_AsString(PyObject_Str(ro)); + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); Py_DECREF(ro); + Py_DECREF(str); } } wxPySaveThread(doSave); @@ -1016,8 +1021,8 @@ public: void SetValue(int row, int col, const wxString& val) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) - m_myInst.callCallback(Py_BuildValue("(iis)",row,col,val.c_str())); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); wxPySaveThread(doSave); } @@ -1027,10 +1032,10 @@ public: long GetValueAsLong( int row, int col ) { long rval = 0; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); if (ro && PyNumber_Check(ro)) { num = PyNumber_Int(ro); if (num) { @@ -1047,10 +1052,10 @@ public: double GetValueAsDouble( int row, int col ) { double rval = 0.0; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); if (ro && PyNumber_Check(ro)) { num = PyNumber_Float(ro); if (num) { @@ -1070,16 +1075,16 @@ public: void SetValueAsLong( int row, int col, long value ) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) { - m_myInst.callCallback(Py_BuildValue("(iii)", row, col, value)); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); } wxPySaveThread(doSave); } void SetValueAsDouble( int row, int col, double value ) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) { - m_myInst.callCallback(Py_BuildValue("(iid)", row, col, value)); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); } wxPySaveThread(doSave); } @@ -1119,7 +1124,8 @@ public: void base_SetRowLabelValue( int row, const wxString& value ); void base_SetColLabelValue( int col, const wxString& value ); bool base_CanHaveAttributes(); - wxGridCellAttr *base_GetAttr( int row, int col ); + wxGridCellAttr *base_GetAttr( int row, int col, + wxGridCellAttr::wxAttrKind kind ); void base_SetAttr(wxGridCellAttr* attr, int row, int col); void base_SetRowAttr(wxGridCellAttr *attr, int row); void base_SetColAttr(wxGridCellAttr *attr, int col); @@ -1442,6 +1448,8 @@ public: wxString GetColLabelValue( int col ); wxColour GetGridLineColour(); wxColour GetCellHighlightColour(); + int GetCellHighlightPenWidth(); + int GetCellHighlightROPenWidth(); void SetRowLabelSize( int width ); void SetColLabelSize( int height ); @@ -1454,6 +1462,8 @@ public: void SetColLabelValue( int col, const wxString& ); void SetGridLineColour( const wxColour& ); void SetCellHighlightColour( const wxColour& ); + void SetCellHighlightPenWidth(int width); + void SetCellHighlightROPenWidth(int width); void EnableDragRowSize( bool enable = TRUE ); void DisableDragRowSize(); @@ -1606,6 +1616,15 @@ public: // grid may occupy more space than needed for its rows/columns, this // function allows to set how big this extra space is void SetMargins(int extraWidth, int extraHeight); + + + // Accessors for component windows + wxWindow* GetGridWindow(); + wxWindow* GetGridRowLabelWindow(); + wxWindow* GetGridColLabelWindow(); + wxWindow* GetGridCornerLabelWindow(); + + }; @@ -1744,6 +1763,13 @@ def EVT_GRID_EDITOR_HIDDEN(win, fn): //--------------------------------------------------------------------------- +%init %{ + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +%} + +//--------------------------------------------------------------------------- + %pragma(python) include="_gridextras.py"; //--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxListCtrl.py b/wxPython/demo/wxListCtrl.py index 6f10f7d7a9..e7eb1d3633 100644 --- a/wxPython/demo/wxListCtrl.py +++ b/wxPython/demo/wxListCtrl.py @@ -92,7 +92,7 @@ class TestListCtrlPanel(wxPanel): self.list.SetColumnWidth(1, wxLIST_AUTOSIZE) ##self.list.SetColumnWidth(2, wxLIST_AUTOSIZE) - self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) #self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) #self.list.EnsureVisible(25) @@ -132,10 +132,16 @@ class TestListCtrlPanel(wxPanel): def OnItemSelected(self, event): self.currentItem = event.m_itemIndex - self.log.WriteText("OnItemSelected: %s, %s, %s\n" % - (self.list.GetItemText(self.currentItem), + self.log.WriteText("OnItemSelected: %s, %s, %s, %s\n" % + (self.currentItem, + self.list.GetItemText(self.currentItem), self.getColumnText(self.currentItem, 1), self.getColumnText(self.currentItem, 2))) + if self.currentItem == 10: + self.log.WriteText("OnItemSelected: Veto'd selection\n") + #event.Veto() # doesn't work + # this does + self.list.SetItemState(10, 0, wxLIST_STATE_SELECTED) def OnItemActivated(self, event): diff --git a/wxPython/demo/wxTreeCtrl.py b/wxPython/demo/wxTreeCtrl.py index f16c48c6cf..7f10a1fbec 100644 --- a/wxPython/demo/wxTreeCtrl.py +++ b/wxPython/demo/wxTreeCtrl.py @@ -13,7 +13,7 @@ class MyTreeCtrl(wxTreeCtrl): def OnCompareItems(self, item1, item2): t1 = self.GetItemText(item1) t2 = self.GetItemText(item2) - self.log.WriteText('compare: ' + t1 + '<>' + t2 + '\n') + self.log.WriteText('compare: ' + t1 + ' <> ' + t2 + '\n') if t1 < t2: return -1 if t1 == t2: return 0 return 1 @@ -33,6 +33,7 @@ class TestTreeCtrlPanel(wxPanel): wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE , self.log) + #import images #il = wxImageList(16, 16) #idx1 = il.Add(images.getSmilesBitmap()) diff --git a/wxPython/demo/wxValidator.py b/wxPython/demo/wxValidator.py index 4217494c6b..4209150905 100644 --- a/wxPython/demo/wxValidator.py +++ b/wxPython/demo/wxValidator.py @@ -19,8 +19,7 @@ class MyValidator(wxPyValidator): return MyValidator(self.flag) def Validate(self, win): - print 'validate' - tc = wxPyTypeCast(win, "wxTextCtrl") + tc = self.GetWindow() val = tc.GetValue() if self.flag == ALPHA_ONLY: for x in val: @@ -81,11 +80,118 @@ class TestValidatorPanel(wxPanel): fgs.Add(label, 0, wxALIGN_RIGHT|wxCENTER) fgs.Add(wxTextCtrl(self, -1, "", validator = MyValidator(DIGIT_ONLY))) + fgs.Add(1,VSPACE); fgs.Add(1,VSPACE) + fgs.Add(1,VSPACE); fgs.Add(1,VSPACE) + fgs.Add(0,0) + b = wxButton(self, -1, "Test Dialog Validation") + EVT_BUTTON(self, b.GetId(), self.OnDoDialog) + fgs.Add(b) + border = wxBoxSizer() border.Add(fgs, 1, wxGROW|wxALL, 25) self.SetSizer(border) self.Layout() + def OnDoDialog(self, evt): + dlg = TestValidateDialog(self) + dlg.ShowModal() + dlg.Destroy() + + +#---------------------------------------------------------------------- + +class TextObjectValidator(wxPyValidator): + """ This validator is used to ensure that the user has entered something + into the text object editor dialog's text field. + """ + def __init__(self): + """ Standard constructor. + """ + wxPyValidator.__init__(self) + + + + def Clone(self): + """ Standard cloner. + + Note that every validator must implement the Clone() method. + """ + return TextObjectValidator() + + + def Validate(self, win): + """ Validate the contents of the given text control. + """ + textCtrl = self.GetWindow() + text = textCtrl.GetValue() + + if len(text) == 0: + wxMessageBox("A text object must contain some text!", "Error") + textCtrl.SetFocus() + return false + else: + return true + + + def TransferToWindow(self): + """ Transfer data from validator to window. + + The default implementation returns false, indicating that an error + occurred. We simply return true, as we don't do any data transfer. + """ + return true # Prevent wxDialog from complaining. + + + def TransferFromWindow(self): + """ Transfer data from window to validator. + + The default implementation returns false, indicating that an error + occurred. We simply return true, as we don't do any data transfer. + """ + return true # Prevent wxDialog from complaining. + +#---------------------------------------------------------------------- + +class TestValidateDialog(wxDialog): + def __init__(self, parent): + wxDialog.__init__(self, parent, -1, "Validated Dialog") + + self.SetAutoLayout(true) + VSPACE = 10 + + fgs = wxFlexGridSizer(0, 2) + + fgs.Add(1,1); + fgs.Add(wxStaticText(self, -1, + "These controls must have text entered into them. Each\n" + "one has a validator that is checked when the Okay\n" + "button is clicked.")) + + fgs.Add(1,VSPACE); fgs.Add(1,VSPACE) + + label = wxStaticText(self, -1, "First: ") + fgs.Add(label, 0, wxALIGN_RIGHT|wxCENTER) + + fgs.Add(wxTextCtrl(self, -1, "", validator = TextObjectValidator())) + + fgs.Add(1,VSPACE); fgs.Add(1,VSPACE) + + label = wxStaticText(self, -1, "Second: ") + fgs.Add(label, 0, wxALIGN_RIGHT|wxCENTER) + fgs.Add(wxTextCtrl(self, -1, "", validator = TextObjectValidator())) + + + buttons = wxBoxSizer(wxHORIZONTAL) + buttons.Add(wxButton(self, wxID_OK, "Okay"), 0, wxALL, 10) + buttons.Add(wxButton(self, wxID_CANCEL, "Cancel"), 0, wxALL, 10) + + border = wxBoxSizer(wxVERTICAL) + border.Add(fgs, 1, wxGROW|wxALL, 25) + border.Add(buttons) + self.SetSizer(border) + border.Fit(self) + self.Layout() + #---------------------------------------------------------------------- diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index f5c5c954b6..e0489610d9 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -937,6 +937,8 @@ enum wxEventType { wxEVT_MEASURE_ITEM, wxEVT_COMPARE_ITEM, wxEVT_INIT_DIALOG, + wxEVT_HELP, + wxEVT_DETAILED_HELP, wxEVT_IDLE, wxEVT_UPDATE_UI, diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 3296d7fad6..af2fa92d35 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -704,11 +704,14 @@ wxPyDefaultSize = wxDefaultSize def wxPyTypeCast(obj, typeStr): if obj is None: return None + theClass = globals()[typeStr+"Ptr"] + typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr) if hasattr(obj, "this"): + if obj.__class__ is theClass: # if already the right type then just return it + return obj newPtr = ptrcast(obj.this, typeStr+"_p") else: newPtr = ptrcast(obj, typeStr+"_p") - theClass = globals()[typeStr+"Ptr"] theObj = theClass(newPtr) if hasattr(obj, "this"): theObj.thisown = obj.thisown @@ -843,4 +846,6 @@ class __wxPyCleanup: self.cleanup() __cleanMeUp = __wxPyCleanup() + +#---------------------------------------------------------------------------- #---------------------------------------------------------------------------- diff --git a/wxPython/src/_htmlextras.py b/wxPython/src/_htmlextras.py index 88f8b12ba6..74c1754ce8 100644 --- a/wxPython/src/_htmlextras.py +++ b/wxPython/src/_htmlextras.py @@ -11,4 +11,3 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr - diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index 6c3b014c8f..0fb2200a31 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -363,7 +363,7 @@ public: //---------------------------------------------------------------------- //---------------------------------------------------------------------- -class wxClipboard { +class wxClipboard : public wxObject { public: wxClipboard(); @@ -629,7 +629,9 @@ public: %init %{ wxPyTheClipboard = wxTheClipboard; - + wxPyPtrTypeMap_Add("wxDropSource", "wxPyDropSource"); + wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget"); + wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget"); %} //---------------------------------------------------------------------- diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index 558576d46d..d2173f407e 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -36,7 +36,7 @@ //---------------------------------------------------------------------- -class wxColourData { +class wxColourData : public wxObject { public: wxColourData(); ~wxColourData(); @@ -191,7 +191,7 @@ public: //---------------------------------------------------------------------- -class wxFontData { +class wxFontData : public wxObject { public: wxFontData(); ~wxFontData(); diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 998a4650c9..bb24d59659 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -19,6 +19,7 @@ #endif #include #include +#include %} //---------------------------------------------------------------------- @@ -139,7 +140,7 @@ public: }; -class wxListItem { +class wxListItem : public wxObject { public: wxListItem(); ~wxListItem(); @@ -241,6 +242,7 @@ public: bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); void AssignImageList(wxImageList* imageList, int which); + %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" bool DeleteItem(long item); bool DeleteAllItems(); bool DeleteColumn(int col); @@ -464,7 +466,7 @@ public: -%name(wxTreeItemData) class wxPyTreeItemData { +%name(wxTreeItemData) class wxPyTreeItemData : public wxObject { public: wxPyTreeItemData(PyObject* obj = NULL); @@ -540,6 +542,7 @@ public: %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)" void AssignImageList(wxImageList* imageList); + %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" size_t GetCount(); unsigned int GetIndent(); void SetIndent(unsigned int indent); @@ -810,4 +813,11 @@ public: //---------------------------------------------------------------------- +%init %{ + wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); + wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl"); +%} + +//---------------------------------------------------------------------- + diff --git a/wxPython/src/events.i b/wxPython/src/events.i index 3cf5673359..47a7825ade 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -33,7 +33,7 @@ int wxNewEventType(); -class wxEvent { +class wxEvent : public wxObject { public: wxEvent(int id = 0); ~wxEvent(); diff --git a/wxPython/src/export.h b/wxPython/src/export.h index f7c2fd349d..29f38b7026 100644 --- a/wxPython/src/export.h +++ b/wxPython/src/export.h @@ -58,6 +58,10 @@ static void wxPyCoreAPI_IMPORT() { #define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b)) #define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a)) +#define wxPyClassExists(a) (wxPyCoreAPIPtr->p_wxPyClassExists(a)) +#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a)) +#define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b)) + // This one is special. It's the first function called in SWIG generated // modules, so we'll use it to also import the API. diff --git a/wxPython/src/filesys.i b/wxPython/src/filesys.i index 99df7c6049..60e5b93abe 100644 --- a/wxPython/src/filesys.i +++ b/wxPython/src/filesys.i @@ -87,7 +87,7 @@ -class wxFSFile { +class wxFSFile : public wxObject { public: wxFSFile(wxInputStream *stream, const wxString& loc, const wxString& mimetype, const wxString& anchor, @@ -151,8 +151,8 @@ IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext %} -%name(wxCPPFileSystemHandler)class wxFileSystemHandler { - wxFileSystemHandler(); +%name(wxCPPFileSystemHandler)class wxFileSystemHandler : public wxObject { + wxFileSystemHandler(); } %name(wxFileSystemHandler)class wxPyFileSystemHandler : public wxFileSystemHandler { @@ -176,7 +176,7 @@ public: //--------------------------------------------------------------------------- -class wxFileSystem { +class wxFileSystem : public wxObject { public: wxFileSystem(); @@ -273,4 +273,10 @@ def wxMemoryFSHandler_AddFile(filename, a, b=''): " +//--------------------------------------------------------------------------- + +%init %{ + wxPyPtrTypeMap_Add("wxFileSystemHandler", "wxPyFileSystemHandler"); +%} + //--------------------------------------------------------------------------- diff --git a/wxPython/src/frames.i b/wxPython/src/frames.i index 62e49013c8..27b589f068 100644 --- a/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -85,9 +85,7 @@ public: wxPoint GetClientAreaOrigin() const; bool Command(int id); bool ProcessCommand(int id); -#ifdef __WXMSW__ bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); -#endif }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index ccf31d5fd3..159bea062e 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -37,24 +37,21 @@ //--------------------------------------------------------------------------- -// class wxGDIImage { -// public: -// long GetHandle(); -// void SetHandle(long handle); -// bool Ok(); -// int GetWidth(); -// int GetHeight(); -// int GetDepth(); -// void SetWidth(int w); -// void SetHeight(int h); -// void SetDepth(int d); -// void SetSize(const wxSize& size); -// }; +class wxGDIObject : public wxObject { +public: + wxGDIObject(); + ~wxGDIObject(); + + bool GetVisible(); + void SetVisible( bool visible ); + + bool IsNull(); + +}; //--------------------------------------------------------------------------- -class wxBitmap -//: public wxGDIImage +class wxBitmap : public wxGDIObject { public: wxBitmap(const wxString& name, wxBitmapType type); @@ -174,7 +171,7 @@ public: //--------------------------------------------------------------------------- -class wxMask { +class wxMask : public wxObject { public: wxMask(const wxBitmap& bitmap); //~wxMask(); @@ -193,8 +190,7 @@ public: //--------------------------------------------------------------------------- -class wxIcon -//: public wxGDIImage +class wxIcon : public wxGDIObject { public: wxIcon(const wxString& name, long flags, @@ -255,8 +251,7 @@ public: //--------------------------------------------------------------------------- -class wxCursor -//: public wxGDIImage +class wxCursor : public wxGDIObject { public: #ifdef __WXMSW__ @@ -336,7 +331,7 @@ enum wxFontEncoding }; -class wxFont { +class wxFont : public wxGDIObject { public: wxFont( int pointSize, int family, int style, int weight, int underline=FALSE, char* faceName = "", @@ -377,7 +372,7 @@ public: %} -class wxFontList { +class wxFontList : public wxObject { public: void AddFont(wxFont* font); @@ -390,7 +385,7 @@ public: //---------------------------------------------------------------------- -class wxColour { +class wxColour : public wxObject { public: wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0); ~wxColour(); @@ -424,7 +419,7 @@ public: -class wxColourDatabase { +class wxColourDatabase : public wxObject { public: wxColour *FindColour(const wxString& colour); @@ -441,7 +436,7 @@ public: //---------------------------------------------------------------------- -class wxPen { +class wxPen : public wxGDIObject { public: wxPen(wxColour& colour, int width=1, int style=wxSOLID); ~wxPen(); @@ -470,7 +465,7 @@ public: }; -class wxPenList { +class wxPenList : public wxObject { public: void AddPen(wxPen* pen); @@ -482,7 +477,7 @@ public: //---------------------------------------------------------------------- -class wxBrush { +class wxBrush : public wxGDIObject { public: wxBrush(const wxColour& colour, int style=wxSOLID); ~wxBrush(); @@ -509,7 +504,7 @@ public: -class wxDC { +class wxDC : public wxObject { public: // wxDC(); **** abstract base class, can't instantiate. ~wxDC(); @@ -765,7 +760,7 @@ extern wxColourDatabase* wxTheColourDatabase; //--------------------------------------------------------------------------- -class wxPalette { +class wxPalette : public wxGDIObject { public: wxPalette(int LCOUNT, byte* choices, byte* choices, byte* choices); ~wxPalette(); @@ -787,7 +782,7 @@ enum { wxIMAGE_LIST_STATE }; -class wxImageList { +class wxImageList : public wxObject { public: wxImageList(int width, int height, int mask=TRUE, int initialCount=1); ~wxImageList(); @@ -813,5 +808,70 @@ public: }; +//--------------------------------------------------------------------------- +// Regions, etc. + +enum wxRegionContain { + wxOutRegion, wxPartRegion, wxInRegion +}; + + +class wxRegion : public wxGDIObject { +public: + wxRegion(long x=0, long y=0, long width=0, long height=0); + ~wxRegion(); + + void Clear(); + wxRegionContain Contains(long x, long y); + %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt); + %name(ContainsRect)wxRegionContain Contains(const wxRect& rect); + %name(ContainsRectDim)wxRegionContain Contains(long x, long y, long w, long h); + + wxRect GetBox(); + + bool Intersect(long x, long y, long width, long height); + %name(IntersectRect)bool Intersect(const wxRect& rect); + %name(IntersectRegion)bool Intersect(const wxRegion& region); + + bool IsEmpty(); + + bool Union(long x, long y, long width, long height); + %name(UnionRect)bool Union(const wxRect& rect); + %name(UnionRegion)bool Union(const wxRegion& region); + + bool Subtract(long x, long y, long width, long height); + %name(SubtractRect)bool Subtract(const wxRect& rect); + %name(SubtractRegion)bool Subtract(const wxRegion& region); + + bool Xor(long x, long y, long width, long height); + %name(XorRect)bool Xor(const wxRect& rect); + %name(XorRegion)bool Xor(const wxRegion& region); +}; + + + +class wxRegionIterator : public wxObject { +public: + wxRegionIterator(const wxRegion& region); + ~wxRegionIterator(); + + long GetX(); + long GetY(); + long GetW(); + long GetWidth(); + long GetH(); + long GetHeight(); + wxRect GetRect(); + bool HaveRects(); + void Reset(); + + %addmethods { + void Next() { + (*self) ++; + } + }; +}; + + //--------------------------------------------------------------------------- diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 09a02568f8..649ccf7534 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -43,27 +43,27 @@ %{ -#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ - wxGridCellAttr* CBNAME(int a, int b) { \ - wxGridCellAttr* rval = NULL; \ - bool doSave = wxPyRestoreThread(); \ - if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* ro; \ - wxGridCellAttr* ptr; \ - ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ - if (ro) { \ +#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iii)", a, b, c)); \ + if (ro) { \ if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ - rval = ptr; \ - Py_DECREF(ro); \ - } \ - } \ - else \ - rval = PCLASS::CBNAME(a, b); \ - wxPySaveThread(doSave); \ - return rval; \ - } \ - wxGridCellAttr *base_##CBNAME(int a, int b) { \ - return PCLASS::CBNAME(a, b); \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b, c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + return PCLASS::CBNAME(a, b, c); \ } @@ -809,9 +809,20 @@ public: class wxGridCellAttr { public: + enum wxAttrKind + { + Any, + Default, + Cell, + Row, + Col, + Merged + }; + wxGridCellAttr(); wxGridCellAttr *Clone() const; + void MergeWith(wxGridCellAttr *mergefrom); void IncRef(); void DecRef(); void SetTextColour(const wxColour& colText); @@ -822,6 +833,7 @@ public: void SetRenderer(wxGridCellRenderer *renderer); void SetEditor(wxGridCellEditor* editor); + void SetKind(wxAttrKind kind); bool HasTextColour() const; bool HasBackgroundColour() const; @@ -829,6 +841,7 @@ public: bool HasAlignment() const; bool HasRenderer() const; bool HasEditor() const; + bool HasReadWriteMode() const; const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; @@ -849,7 +862,8 @@ public: wxGridCellAttrProvider(); // ???? virtual ~wxGridCellAttrProvider(); - wxGridCellAttr *GetAttr(int row, int col) const; + wxGridCellAttr *GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind) const; void SetAttr(wxGridCellAttr *attr, int row, int col); void SetRowAttr(wxGridCellAttr *attr, int row); void SetColAttr(wxGridCellAttr *attr, int col); @@ -867,7 +881,7 @@ class wxPyGridCellAttrProvider : public wxGridCellAttrProvider public: wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; - PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridCellAttrProvider, GetAttr); PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); @@ -885,7 +899,8 @@ public: void _setSelf(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellAttrProvider)" - wxGridCellAttr *base_GetAttr(int row, int col); + wxGridCellAttr *base_GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind); void base_SetAttr(wxGridCellAttr *attr, int row, int col); void base_SetRowAttr(wxGridCellAttr *attr, int row); void base_SetColAttr(wxGridCellAttr *attr, int col); @@ -897,7 +912,7 @@ public: -class wxGridTableBase +class wxGridTableBase : public wxObject { public: // wxGridTableBase(); This is an ABC @@ -946,7 +961,8 @@ public: virtual bool CanHaveAttributes(); - virtual wxGridCellAttr *GetAttr( int row, int col ); + virtual wxGridCellAttr *GetAttr( int row, int col, + wxGridCellAttr::wxAttrKind kind); virtual void SetAttr(wxGridCellAttr* attr, int row, int col); virtual void SetRowAttr(wxGridCellAttr *attr, int row); virtual void SetColAttr(wxGridCellAttr *attr, int col); @@ -980,7 +996,7 @@ public: PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); - PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridTableBase, GetAttr); PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); @@ -1108,7 +1124,8 @@ public: void base_SetRowLabelValue( int row, const wxString& value ); void base_SetColLabelValue( int col, const wxString& value ); bool base_CanHaveAttributes(); - wxGridCellAttr *base_GetAttr( int row, int col ); + wxGridCellAttr *base_GetAttr( int row, int col, + wxGridCellAttr::wxAttrKind kind ); void base_SetAttr(wxGridCellAttr* attr, int row, int col); void base_SetRowAttr(wxGridCellAttr *attr, int row); void base_SetColAttr(wxGridCellAttr *attr, int col); @@ -1431,6 +1448,8 @@ public: wxString GetColLabelValue( int col ); wxColour GetGridLineColour(); wxColour GetCellHighlightColour(); + int GetCellHighlightPenWidth(); + int GetCellHighlightROPenWidth(); void SetRowLabelSize( int width ); void SetColLabelSize( int height ); @@ -1443,6 +1462,8 @@ public: void SetColLabelValue( int col, const wxString& ); void SetGridLineColour( const wxColour& ); void SetCellHighlightColour( const wxColour& ); + void SetCellHighlightPenWidth(int width); + void SetCellHighlightROPenWidth(int width); void EnableDragRowSize( bool enable = TRUE ); void DisableDragRowSize(); @@ -1595,6 +1616,15 @@ public: // grid may occupy more space than needed for its rows/columns, this // function allows to set how big this extra space is void SetMargins(int extraWidth, int extraHeight); + + + // Accessors for component windows + wxWindow* GetGridWindow(); + wxWindow* GetGridRowLabelWindow(); + wxWindow* GetGridColLabelWindow(); + wxWindow* GetGridCornerLabelWindow(); + + }; diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 9d12d8962a..7bf489e671 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -29,12 +29,6 @@ #include #include #include -//#include -//#include -//#include - -//extern GtkWidget *wxRootWindow; - #endif @@ -122,13 +116,8 @@ void __wxPreStart() #endif #ifdef WXP_WITH_THREAD -#if 0 // OLD THREAD STUFF - PyEval_InitThreads(); - wxPyEventThreadState = PyThreadState_Get(); -#else PyEval_InitThreads(); wxPyEventThreadState = PyThreadState_New(PyThreadState_Get()->interp); -#endif #endif // Bail out if there is already windows created. This means that the @@ -138,13 +127,17 @@ void __wxPreStart() return; + int argc = 0; + char** argv = NULL; PyObject* sysargv = PySys_GetObject("argv"); - int argc = PyList_Size(sysargv); - char** argv = new char*[argc+1]; - int x; - for(x=0; xargc = argc; wxPythonApp->argv = argv; @@ -215,7 +211,9 @@ void __wxCleanup() { -PyObject* wxPython_dict; +static PyObject* wxPython_dict = NULL; +static PyObject* wxPyPtrTypeMap = NULL; + PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) { @@ -226,6 +224,12 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) PyErr_SetString(PyExc_TypeError, "_wxSetDictionary must have dictionary object!"); return NULL; } + + if (! wxPyPtrTypeMap) + wxPyPtrTypeMap = PyDict_New(); + PyDict_SetItemString(wxPython_dict, "__wxPyPtrTypeMap", wxPyPtrTypeMap); + + #ifdef __WXMOTIF__ #define wxPlatform "__WXMOTIF__" #endif @@ -249,13 +253,103 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) } +//--------------------------------------------------------------------------- +// Stuff used by OOR to find the right wxPython class type to return and to +// build it. + + +// The pointer type map is used when the "pointer" type name generated by SWIG +// is not the same as the shadow class name, for example wxPyTreeCtrl +// vs. wxTreeCtrl. It needs to be referenced in Python as well as from C++, +// so we'll just make it a Python dictionary in the wx module's namespace. +void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName) { + if (! wxPyPtrTypeMap) + wxPyPtrTypeMap = PyDict_New(); + + PyDict_SetItemString(wxPyPtrTypeMap, + (char*)commonName, + PyString_FromString((char*)ptrName)); +} + + + +PyObject* wxPyClassExists(const char* className) { + + if (!className) + return NULL; + + char buff[64]; // should always be big enough... + + sprintf(buff, "%sPtr", className); + PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff); + + return classobj; // returns NULL if not found +} + + +PyObject* wxPyMake_wxObject(wxObject* source) { + PyObject* target; + + if (source) { + wxClassInfo* info = source->GetClassInfo(); + wxChar* name = (wxChar*)info->GetClassName(); + PyObject* klass = wxPyClassExists(name); + while (info && !klass) { + name = (wxChar*)info->GetBaseClassName1(); + info = wxClassInfo::FindClass(name); + klass = wxPyClassExists(name); + } + if (info) { + target = wxPyConstructObject(source, name, klass, FALSE); + } else { + wxString msg("wxPython class not found for "); + msg += source->GetClassInfo()->GetClassName(); + PyErr_SetString(PyExc_NameError, msg.c_str()); + return NULL; + } + } else { // source was NULL so return None. + Py_INCREF(Py_None); target = Py_None; + } + return target; +} + //--------------------------------------------------------------------------- PyObject* wxPyConstructObject(void* ptr, const char* className, + PyObject* klass, int setThisOwn) { + PyObject* obj; PyObject* arg; + PyObject* item; + char swigptr[64]; // should always be big enough... + char buff[64]; + + if ((item = PyDict_GetItemString(wxPyPtrTypeMap, (char*)className)) != NULL) { + className = PyString_AsString(item); + } + sprintf(buff, "_%s_p", className); + SWIG_MakePtr(swigptr, ptr, buff); + + arg = Py_BuildValue("(s)", swigptr); + obj = PyInstance_New(klass, arg, NULL); + Py_DECREF(arg); + + if (setThisOwn) { + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(obj, "thisown", one); + Py_DECREF(one); + } + + return obj; +} + + +PyObject* wxPyConstructObject(void* ptr, + const char* className, + int setThisOwn) { + PyObject* obj; if (!ptr) { Py_INCREF(Py_None); @@ -263,16 +357,10 @@ PyObject* wxPyConstructObject(void* ptr, } char buff[64]; // should always be big enough... - char swigptr[64]; - - sprintf(buff, "_%s_p", className); - SWIG_MakePtr(swigptr, ptr, buff); sprintf(buff, "%sPtr", className); PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff); if (! classobj) { - //Py_INCREF(Py_None); - //return Py_None; char temp[128]; sprintf(temp, "*** Unknown class name %s, tell Robin about it please ***", @@ -281,17 +369,7 @@ PyObject* wxPyConstructObject(void* ptr, return obj; } - arg = Py_BuildValue("(s)", swigptr); - obj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - if (setThisOwn) { - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString(obj, "thisown", one); - Py_DECREF(one); - } - - return obj; + return wxPyConstructObject(ptr, className, classobj, setThisOwn); } //--------------------------------------------------------------------------- @@ -313,19 +391,11 @@ bool wxPyRestoreThread() { // already have the lock. (I hope!) // #ifdef WXP_WITH_THREAD -#if 0 // OLD THREAD STUFF - if (wxPyEventThreadState != myPyThreadState_Get()) { - PyEval_RestoreThread(wxPyEventThreadState); - return TRUE; - } - else -#else if (wxPyEventThreadState != myPyThreadState_Get()) { PyEval_AcquireThread(wxPyEventThreadState); return TRUE; } else -#endif #endif return FALSE; } @@ -333,16 +403,10 @@ bool wxPyRestoreThread() { void wxPySaveThread(bool doSave) { #ifdef WXP_WITH_THREAD -#if 0 // OLD THREAD STUFF - if (doSave) { - wxPyEventThreadState = PyEval_SaveThread(); - } -#else if (doSave) { PyEval_ReleaseThread(wxPyEventThreadState); } #endif -#endif } //--------------------------------------------------------------------------- @@ -634,7 +698,7 @@ PyObject* wxPy_ConvertList(wxListBase* list, const char* className) { pyList = PyList_New(0); while (node) { wxObj = node->Data(); - pyObj = wxPyConstructObject(wxObj, className); + pyObj = wxPyMake_wxObject(wxObj); //wxPyConstructObject(wxObj, className); PyList_Append(pyList, pyObj); node = node->Next(); } diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index 8282d033b9..8258295e46 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -52,7 +52,7 @@ void __wxPreStart(); PyObject* __wxStart(PyObject*, PyObject* args); void __wxCleanup(); -extern PyObject* wxPython_dict; +//extern PyObject* wxPython_dict; PyObject* __wxSetDictionary(PyObject*, PyObject* args); void wxPyEventThunker(wxObject*, wxEvent& event); @@ -60,6 +60,14 @@ void wxPyEventThunker(wxObject*, wxEvent& event); PyObject* wxPyConstructObject(void* ptr, const char* className, int setThisOwn=0); +PyObject* wxPyConstructObject(void* ptr, + const char* className, + PyObject* klass, + int setThisOwn=0); +PyObject* wxPyClassExists(const char* className); +PyObject* wxPyMake_wxObject(wxObject* source); +void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName); + bool wxPyRestoreThread(); void wxPySaveThread(bool doSave); PyObject* wxPy_ConvertList(wxListBase* list, const char* className); @@ -247,6 +255,10 @@ struct wxPyCoreAPI { PyObject* (*p_wxPyCBH_callCallbackObj)(const wxPyCallbackHelper& cbh, PyObject* argTuple); void (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh); + PyObject* (*p_wxPyClassExists)(const char* className); + PyObject* (*p_wxPyMake_wxObject)(wxObject* source); + void (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName); + }; #ifdef wxPyUSE_EXPORT @@ -454,7 +466,7 @@ public: void CLASS::CBNAME(wxDC& a) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ Py_DECREF(obj); \ } \ @@ -479,7 +491,7 @@ public: void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ Py_DECREF(obj); \ } \ @@ -502,7 +514,7 @@ public: void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ Py_DECREF(obj); \ } \ @@ -566,7 +578,7 @@ public: void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f)); \ Py_DECREF(obj); \ } \ @@ -590,7 +602,7 @@ public: bool doSave = wxPyRestoreThread(); \ bool rval; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\ Py_DECREF(obj); \ } \ @@ -635,7 +647,7 @@ public: void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Odddd)", obj, b, c, d, e)); \ Py_DECREF(obj); \ } \ @@ -658,7 +670,7 @@ public: void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ Py_DECREF(obj); \ } \ @@ -682,7 +694,7 @@ public: int e, int f) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(a, "wxPyControlPoint", 0); \ + PyObject* obj = wxPyMake_wxObject(a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oiddii)", obj, (int)b, c, d, e, f));\ Py_DECREF(obj); \ } \ @@ -706,7 +718,7 @@ public: void CLASS::CBNAME(wxControlPoint* a, double b, double c, int d, int e) { \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject(a, "wxPyControlPoint", 0); \ + PyObject* obj = wxPyMake_wxObject(a); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddii)", obj, b, c, d, e)); \ Py_DECREF(obj); \ } \ @@ -947,7 +959,7 @@ public: bool rval = FALSE; \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject((void*)&a,"wxHtmlTag", 0); \ + PyObject* obj = wxPyConstructObject((void*)&a, "wxHtmlTag", 0); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ Py_DECREF(obj); \ } \ @@ -1005,7 +1017,7 @@ public: bool rval; \ bool doSave = wxPyRestoreThread(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* obj = wxPyConstructObject((void*)a,"wxWindow", 0);\ + PyObject* obj = wxPyMake_wxObject(a); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ Py_DECREF(obj); \ } \ @@ -1073,7 +1085,7 @@ public: wxFSFile* rval=0; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - PyObject* obj = wxPyConstructObject(&a, "wxFileSystem", 0); \ + PyObject* obj = wxPyMake_wxObject(&a); \ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(Os)", \ obj, b.c_str())); \ if (ro) { \ diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 91c2f78b70..6bc207ffbf 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -75,7 +75,7 @@ enum { //--------------------------------------------------------------------------- -class wxHtmlLinkInfo { +class wxHtmlLinkInfo : public wxObject { public: wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString); wxString GetHref(); @@ -89,7 +89,7 @@ public: //--------------------------------------------------------------------------- -class wxHtmlTag { +class wxHtmlTag : public wxObject { public: // Never need to create a new tag from Python... //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache); @@ -112,7 +112,7 @@ public: //--------------------------------------------------------------------------- -class wxHtmlParser { +class wxHtmlParser : public wxObject { public: // wxHtmlParser(); This is an abstract base class... @@ -189,6 +189,7 @@ public: %{ class wxPyHtmlTagHandler : public wxHtmlTagHandler { + DECLARE_DYNAMIC_CLASS(wxPyHtmlTagHandler); public: wxPyHtmlTagHandler() : wxHtmlTagHandler() {}; @@ -201,12 +202,14 @@ public: PYPRIVATE; }; +IMPLEMENT_DYNAMIC_CLASS(wxPyHtmlTagHandler, wxHtmlTagHandler); + IMP_PYCALLBACK_STRING__pure(wxPyHtmlTagHandler, wxHtmlTagHandler, GetSupportedTags); IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); %} -%name(wxHtmlTagHandler) class wxPyHtmlTagHandler { +%name(wxHtmlTagHandler) class wxPyHtmlTagHandler : public wxObject { public: wxPyHtmlTagHandler(); @@ -223,6 +226,7 @@ public: %{ class wxPyHtmlWinTagHandler : public wxHtmlWinTagHandler { + DECLARE_DYNAMIC_CLASS(wxPyHtmlWinTagHandler); public: wxPyHtmlWinTagHandler() : wxHtmlWinTagHandler() {}; @@ -236,6 +240,8 @@ public: PYPRIVATE; }; +IMPLEMENT_DYNAMIC_CLASS( wxPyHtmlWinTagHandler, wxHtmlWinTagHandler); + IMP_PYCALLBACK_STRING__pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, GetSupportedTags); IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleTag); %} @@ -321,7 +327,7 @@ private: //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -class wxHtmlCell { +class wxHtmlCell : public wxObject { public: wxHtmlCell(); @@ -348,6 +354,13 @@ public: }; +class wxHtmlWordCell : public wxHtmlCell +{ +public: + wxHtmlWordCell(const wxString& word, wxDC& dc); +}; + + class wxHtmlContainerCell : public wxHtmlCell { public: wxHtmlContainerCell(wxHtmlContainerCell *parent); @@ -378,6 +391,12 @@ public: }; +class wxHtmlFontCell : public wxHtmlCell +{ +public: + wxHtmlFontCell(wxFont *font); +}; + class wxHtmlWidgetCell : public wxHtmlCell { public: @@ -411,7 +430,7 @@ public: IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); - void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { +void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); @@ -492,7 +511,7 @@ public: //--------------------------------------------------------------------------- -class wxHtmlDCRenderer { +class wxHtmlDCRenderer : public wxObject { public: wxHtmlDCRenderer(); ~wxHtmlDCRenderer(); @@ -533,7 +552,7 @@ public: -class wxHtmlEasyPrinting { +class wxHtmlEasyPrinting : public wxObject { public: wxHtmlEasyPrinting(const char* name = "Printing", wxFrame *parent_frame = NULL); @@ -569,6 +588,10 @@ public: wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); + + wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler"); + wxPyPtrTypeMap_Add("wxHtmlWinTagHandler", "wxPyHtmlWinTagHandler"); + wxPyPtrTypeMap_Add("wxHtmlWindow", "wxPyHtmlWindow"); %} //---------------------------------------------------------------------- diff --git a/wxPython/src/image.i b/wxPython/src/image.i index f015bfa27e..37757eeb54 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -30,7 +30,7 @@ //--------------------------------------------------------------------------- -class wxImageHandler { +class wxImageHandler : public wxObject { public: // wxImageHandler(); Abstract Base Class wxString GetName(); @@ -90,7 +90,7 @@ public: //--------------------------------------------------------------------------- -class wxImage { +class wxImage : public wxObject { public: wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY ); ~wxImage(); diff --git a/wxPython/src/libpy.c b/wxPython/src/libpy.c index d8d22da4f4..450467bd13 100644 --- a/wxPython/src/libpy.c +++ b/wxPython/src/libpy.c @@ -362,7 +362,7 @@ SWIG_GetPtr(char *c, void **ptr, char *t) sp = &SwigPtrTable[start]; /* Try to find a match */ - while (start <= end) { + while (start < end) { /* was "<=" --robin */ if (strncmp(t,sp->name,sp->len) == 0) { name = sp->name; len = sp->len; diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 8486a08ce3..db74ff8614 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -35,6 +35,22 @@ //--------------------------------------------------------------------------- +class wxObject { +public: + + %addmethods { + const char* GetClassName() { + return self->GetClassInfo()->GetClassName(); + } + + void Destroy() { + delete self; + } + } +}; + +//--------------------------------------------------------------------------- + class wxSize { public: long x; @@ -369,7 +385,7 @@ enum wxRelationship { wxUnconstrained = 0, wxAbsolute }; -class wxIndividualLayoutConstraint { +class wxIndividualLayoutConstraint : public wxObject { public: // wxIndividualLayoutConstraint(); // ~wxIndividualLayoutConstraint(); @@ -387,7 +403,7 @@ public: }; -class wxLayoutConstraints { +class wxLayoutConstraints : public wxObject { public: wxLayoutConstraints(); @@ -404,71 +420,6 @@ public: } -//--------------------------------------------------------------------------- -// Regions, etc. - -enum wxRegionContain { - wxOutRegion, wxPartRegion, wxInRegion -}; - - -class wxRegion { -public: - wxRegion(long x=0, long y=0, long width=0, long height=0); - ~wxRegion(); - - void Clear(); - wxRegionContain Contains(long x, long y); - %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt); - %name(ContainsRect)wxRegionContain Contains(const wxRect& rect); - %name(ContainsRectDim)wxRegionContain Contains(long x, long y, long w, long h); - - wxRect GetBox(); - - bool Intersect(long x, long y, long width, long height); - %name(IntersectRect)bool Intersect(const wxRect& rect); - %name(IntersectRegion)bool Intersect(const wxRegion& region); - - bool IsEmpty(); - - bool Union(long x, long y, long width, long height); - %name(UnionRect)bool Union(const wxRect& rect); - %name(UnionRegion)bool Union(const wxRegion& region); - - bool Subtract(long x, long y, long width, long height); - %name(SubtractRect)bool Subtract(const wxRect& rect); - %name(SubtractRegion)bool Subtract(const wxRegion& region); - - bool Xor(long x, long y, long width, long height); - %name(XorRect)bool Xor(const wxRect& rect); - %name(XorRegion)bool Xor(const wxRegion& region); -}; - - - -class wxRegionIterator { -public: - wxRegionIterator(const wxRegion& region); - ~wxRegionIterator(); - - long GetX(); - long GetY(); - long GetW(); - long GetWidth(); - long GetH(); - long GetHeight(); - wxRect GetRect(); - bool HaveRects(); - void Reset(); - - %addmethods { - void Next() { - (*self) ++; - } - }; -}; - - //--------------------------------------------------------------------------- // Accelerator Entry and Table @@ -485,7 +436,7 @@ public: }; -class wxAcceleratorTable { +class wxAcceleratorTable : public wxObject { public: // Can also accept a list of 3-tuples wxAcceleratorTable(int LCOUNT, wxAcceleratorEntry* choices); @@ -508,7 +459,7 @@ extern wxAcceleratorTable wxNullAcceleratorTable; //--------------------------------------------------------------------------- -class wxBusyInfo { +class wxBusyInfo : public wxObject { public: wxBusyInfo(const wxString& message); ~wxBusyInfo(); diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index e7edccd4d6..d344b4eedd 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -264,7 +264,7 @@ enum { //--------------------------------------------------------------------------- // wxToolTip -class wxToolTip { +class wxToolTip : public wxObject { public: wxToolTip(const wxString &tip); @@ -464,7 +464,7 @@ bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup static wxPoint wxPyNullPoint; %} -%name (wxDragImage) class wxGenericDragImage +%name (wxDragImage) class wxGenericDragImage : public wxObject { public: @@ -532,7 +532,7 @@ wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { //---------------------------------------------------------------------- -class wxPyTimer { +class wxPyTimer : public wxObject { public: wxPyTimer(PyObject* notify); ~wxPyTimer(); @@ -722,7 +722,7 @@ long wxExecute(const wxString& command, //---------------------------------------------------------------------- #ifdef __WXMSW__ -class wxJoystick { +class wxJoystick : public wxObject { public: wxJoystick(int joystick = wxJOYSTICK1); wxPoint GetPosition(); @@ -774,5 +774,12 @@ public: #endif //---------------------------------------------------------------------- + +%init %{ + wxPyPtrTypeMap_Add("wxFontEnumerator", "wxPyFontEnumerator"); + wxPyPtrTypeMap_Add("wxDragImage", "wxGenericDragImage"); + wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess"); +%} + //---------------------------------------------------------------------- diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index 5c459652aa..bd528cb0f7 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -752,6 +752,14 @@ static void *SwigwxCalendarEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxCalendarEventTowxObject(void *ptr) { + wxCalendarEvent *src; + wxObject *dest; + src = (wxCalendarEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCalendarEvent(_swigarg0,_swigarg1) (new wxCalendarEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxCalendarEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -873,6 +881,14 @@ static void *SwigwxCalendarCtrlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxCalendarCtrlTowxObject(void *ptr) { + wxCalendarCtrl *src; + wxObject *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1722,8 +1738,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxObject}, + { "_class_wxObject","_wxCalendarCtrl",SwigwxCalendarCtrlTowxObject}, + { "_class_wxObject","_class_wxCalendarEvent",SwigwxCalendarEventTowxObject}, + { "_class_wxObject","_wxCalendarEvent",SwigwxCalendarEventTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -1872,6 +1894,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxObject}, + { "_wxObject","_wxCalendarCtrl",SwigwxCalendarCtrlTowxObject}, + { "_wxObject","_class_wxCalendarEvent",SwigwxCalendarEventTowxObject}, + { "_wxObject","_wxCalendarEvent",SwigwxCalendarEventTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -1929,6 +1956,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 4b931192c3..b16510d0cd 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -1960,6 +1960,14 @@ static PyObject *_wrap_wxCustomDataObject_GetData(PyObject *self, PyObject *args return _resultobj; } +static void *SwigwxClipboardTowxObject(void *ptr) { + wxClipboard *src; + wxObject *dest; + src = (wxClipboard *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxClipboard() (new wxClipboard()) static PyObject *_wrap_new_wxClipboard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3508,10 +3516,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_class_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, { "_class_wxBitmapDataObject","_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxClipboard",SwigwxClipboardTowxObject}, + { "_class_wxObject","_wxClipboard",SwigwxClipboardTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -3634,6 +3646,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxClipboard",SwigwxClipboardTowxObject}, + { "_wxObject","_wxClipboard",SwigwxClipboardTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -3671,6 +3686,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, @@ -3766,7 +3782,9 @@ SWIGEXPORT(void) initclip_dndc() { wxPyTheClipboard = wxTheClipboard; - + wxPyPtrTypeMap_Add("wxDropSource", "wxPyDropSource"); + wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget"); + wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget"); PyDict_SetItemString(d,"wxDataObject_Get", PyInt_FromLong((long) wxDataObject::Get)); PyDict_SetItemString(d,"wxDataObject_Set", PyInt_FromLong((long) wxDataObject::Set)); PyDict_SetItemString(d,"wxDataObject_Both", PyInt_FromLong((long) wxDataObject::Both)); diff --git a/wxPython/src/msw/clip_dnd.py b/wxPython/src/msw/clip_dnd.py index 8be9ceb3a4..ed7fa72ee4 100644 --- a/wxPython/src/msw/clip_dnd.py +++ b/wxPython/src/msw/clip_dnd.py @@ -258,7 +258,7 @@ class wxCustomDataObject(wxCustomDataObjectPtr): -class wxClipboardPtr : +class wxClipboardPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index a9c5cf54c2..e7b621742c 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -115,6 +115,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static void *SwigwxColourDataTowxObject(void *ptr) { + wxColourData *src; + wxObject *dest; + src = (wxColourData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxColourData() (new wxColourData()) static PyObject *_wrap_new_wxColourData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -390,6 +398,14 @@ static void *SwigwxColourDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxColourDialogTowxObject(void *ptr) { + wxColourDialog *src; + wxObject *dest; + src = (wxColourDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxColourDialog(_swigarg0,_swigarg1) (new wxColourDialog(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxColourDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -527,6 +543,14 @@ static void *SwigwxDirDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxDirDialogTowxObject(void *ptr) { + wxDirDialog *src; + wxObject *dest; + src = (wxDirDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -825,6 +849,14 @@ static void *SwigwxFileDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxFileDialogTowxObject(void *ptr) { + wxFileDialog *src; + wxObject *dest; + src = (wxFileDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1535,6 +1567,14 @@ static void *SwigwxSingleChoiceDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSingleChoiceDialogTowxObject(void *ptr) { + wxSingleChoiceDialog *src; + wxObject *dest; + src = (wxSingleChoiceDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static wxSingleChoiceDialog *new_wxSingleChoiceDialog(wxWindow *parent,wxString *message,wxString *caption,int LCOUNT,wxString *choices,long style,wxPoint *pos) { return new wxSingleChoiceDialog(parent, *message, *caption, LCOUNT, choices, NULL, style, *pos); @@ -1798,6 +1838,14 @@ static void *SwigwxTextEntryDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxTextEntryDialogTowxObject(void *ptr) { + wxTextEntryDialog *src; + wxObject *dest; + src = (wxTextEntryDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1955,6 +2003,14 @@ static PyObject *_wrap_wxTextEntryDialog_ShowModal(PyObject *self, PyObject *arg return _resultobj; } +static void *SwigwxFontDataTowxObject(void *ptr) { + wxFontData *src; + wxObject *dest; + src = (wxFontData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFontData() (new wxFontData()) static PyObject *_wrap_new_wxFontData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2439,6 +2495,14 @@ static void *SwigwxFontDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxFontDialogTowxObject(void *ptr) { + wxFontDialog *src; + wxObject *dest; + src = (wxFontDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFontDialog(_swigarg0,_swigarg1) (new wxFontDialog(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2576,6 +2640,14 @@ static void *SwigwxMessageDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMessageDialogTowxObject(void *ptr) { + wxMessageDialog *src; + wxObject *dest; + src = (wxMessageDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2673,6 +2745,14 @@ static void *SwigwxProgressDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxProgressDialogTowxObject(void *ptr) { + wxProgressDialog *src; + wxObject *dest; + src = (wxProgressDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxProgressDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxProgressDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2957,10 +3037,32 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, { "_wxProgressDialog","_class_wxProgressDialog",0}, + { "_class_wxObject","_class_wxProgressDialog",SwigwxProgressDialogTowxObject}, + { "_class_wxObject","_wxProgressDialog",SwigwxProgressDialogTowxObject}, + { "_class_wxObject","_class_wxMessageDialog",SwigwxMessageDialogTowxObject}, + { "_class_wxObject","_wxMessageDialog",SwigwxMessageDialogTowxObject}, + { "_class_wxObject","_class_wxFontDialog",SwigwxFontDialogTowxObject}, + { "_class_wxObject","_wxFontDialog",SwigwxFontDialogTowxObject}, + { "_class_wxObject","_class_wxFontData",SwigwxFontDataTowxObject}, + { "_class_wxObject","_wxFontData",SwigwxFontDataTowxObject}, + { "_class_wxObject","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxObject}, + { "_class_wxObject","_wxTextEntryDialog",SwigwxTextEntryDialogTowxObject}, + { "_class_wxObject","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxObject}, + { "_class_wxObject","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxObject}, + { "_class_wxObject","_class_wxFileDialog",SwigwxFileDialogTowxObject}, + { "_class_wxObject","_wxFileDialog",SwigwxFileDialogTowxObject}, + { "_class_wxObject","_class_wxDirDialog",SwigwxDirDialogTowxObject}, + { "_class_wxObject","_wxDirDialog",SwigwxDirDialogTowxObject}, + { "_class_wxObject","_class_wxColourDialog",SwigwxColourDialogTowxObject}, + { "_class_wxObject","_wxColourDialog",SwigwxColourDialogTowxObject}, + { "_class_wxObject","_class_wxColourData",SwigwxColourDataTowxObject}, + { "_class_wxObject","_wxColourData",SwigwxColourDataTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -3167,6 +3269,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxProgressDialog",SwigwxProgressDialogTowxObject}, + { "_wxObject","_wxProgressDialog",SwigwxProgressDialogTowxObject}, + { "_wxObject","_class_wxMessageDialog",SwigwxMessageDialogTowxObject}, + { "_wxObject","_wxMessageDialog",SwigwxMessageDialogTowxObject}, + { "_wxObject","_class_wxFontDialog",SwigwxFontDialogTowxObject}, + { "_wxObject","_wxFontDialog",SwigwxFontDialogTowxObject}, + { "_wxObject","_class_wxFontData",SwigwxFontDataTowxObject}, + { "_wxObject","_wxFontData",SwigwxFontDataTowxObject}, + { "_wxObject","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxObject}, + { "_wxObject","_wxTextEntryDialog",SwigwxTextEntryDialogTowxObject}, + { "_wxObject","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxObject}, + { "_wxObject","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxObject}, + { "_wxObject","_class_wxFileDialog",SwigwxFileDialogTowxObject}, + { "_wxObject","_wxFileDialog",SwigwxFileDialogTowxObject}, + { "_wxObject","_class_wxDirDialog",SwigwxDirDialogTowxObject}, + { "_wxObject","_wxDirDialog",SwigwxDirDialogTowxObject}, + { "_wxObject","_class_wxColourDialog",SwigwxColourDialogTowxObject}, + { "_wxObject","_wxColourDialog",SwigwxColourDialogTowxObject}, + { "_wxObject","_class_wxColourData",SwigwxColourDataTowxObject}, + { "_wxObject","_wxColourData",SwigwxColourDataTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -3238,6 +3361,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/cmndlgs.py b/wxPython/src/msw/cmndlgs.py index 0947274149..cbbb523526 100644 --- a/wxPython/src/msw/cmndlgs.py +++ b/wxPython/src/msw/cmndlgs.py @@ -17,7 +17,7 @@ from controls import * from events import * import wx -class wxColourDataPtr : +class wxColourDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -226,7 +226,7 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): -class wxFontDataPtr : +class wxFontDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 2b3f5b7712..f800f97d5f 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -182,6 +182,14 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxControlTowxObject(void *ptr) { + wxControl *src; + wxObject *dest; + src = (wxControl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxControl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxControl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -389,6 +397,14 @@ static void *SwigwxButtonTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxButtonTowxObject(void *ptr) { + wxButton *src; + wxObject *dest; + src = (wxButton *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -606,6 +622,14 @@ static void *SwigwxBitmapButtonTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxBitmapButtonTowxObject(void *ptr) { + wxBitmapButton *src; + wxObject *dest; + src = (wxBitmapButton *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1070,6 +1094,14 @@ static void *SwigwxCheckBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxCheckBoxTowxObject(void *ptr) { + wxCheckBox *src; + wxObject *dest; + src = (wxCheckBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1239,6 +1271,14 @@ static void *SwigwxChoiceTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxChoiceTowxObject(void *ptr) { + wxChoice *src; + wxObject *dest; + src = (wxChoice *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1738,6 +1778,14 @@ static void *SwigwxComboBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxComboBoxTowxObject(void *ptr) { + wxComboBox *src; + wxObject *dest; + src = (wxComboBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2536,6 +2584,14 @@ static void *SwigwxGaugeTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxGaugeTowxObject(void *ptr) { + wxGauge *src; + wxObject *dest; + src = (wxGauge *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2845,6 +2901,14 @@ static void *SwigwxStaticBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxStaticBoxTowxObject(void *ptr) { + wxStaticBox *src; + wxObject *dest; + src = (wxStaticBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2948,6 +3012,14 @@ static void *SwigwxStaticLineTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxStaticLineTowxObject(void *ptr) { + wxStaticLine *src; + wxObject *dest; + src = (wxStaticLine *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStaticLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxStaticLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3027,6 +3099,14 @@ static void *SwigwxStaticTextTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxStaticTextTowxObject(void *ptr) { + wxStaticText *src; + wxObject *dest; + src = (wxStaticText *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3213,6 +3293,14 @@ static void *SwigwxListBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxListBoxTowxObject(void *ptr) { + wxListBox *src; + wxObject *dest; + src = (wxListBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4011,6 +4099,14 @@ static void *SwigwxCheckListBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxCheckListBoxTowxObject(void *ptr) { + wxCheckListBox *src; + wxObject *dest; + src = (wxCheckListBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCheckListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxCheckListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4252,6 +4348,14 @@ static void *SwigwxTextCtrlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxTextCtrlTowxObject(void *ptr) { + wxTextCtrl *src; + wxObject *dest; + src = (wxTextCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5549,6 +5653,14 @@ static void *SwigwxScrollBarTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxScrollBarTowxObject(void *ptr) { + wxScrollBar *src; + wxObject *dest; + src = (wxScrollBar *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5807,6 +5919,14 @@ static void *SwigwxSpinButtonTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSpinButtonTowxObject(void *ptr) { + wxSpinButton *src; + wxObject *dest; + src = (wxSpinButton *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSpinButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSpinButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6024,6 +6144,14 @@ static void *SwigwxStaticBitmapTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxStaticBitmapTowxObject(void *ptr) { + wxStaticBitmap *src; + wxObject *dest; + src = (wxStaticBitmap *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6219,6 +6347,14 @@ static void *SwigwxRadioBoxTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxRadioBoxTowxObject(void *ptr) { + wxRadioBox *src; + wxObject *dest; + src = (wxRadioBox *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10) (new wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10)) static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6809,6 +6945,14 @@ static void *SwigwxRadioButtonTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxRadioButtonTowxObject(void *ptr) { + wxRadioButton *src; + wxObject *dest; + src = (wxRadioButton *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6978,6 +7122,14 @@ static void *SwigwxSliderTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSliderTowxObject(void *ptr) { + wxSlider *src; + wxObject *dest; + src = (wxSlider *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7601,6 +7753,14 @@ static void *SwigwxSpinCtrlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSpinCtrlTowxObject(void *ptr) { + wxSpinCtrl *src; + wxObject *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7822,6 +7982,14 @@ static void *SwigwxToggleButtonTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxToggleButtonTowxObject(void *ptr) { + wxToggleButton *src; + wxObject *dest; + src = (wxToggleButton *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxToggleButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxToggleButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8317,8 +8485,52 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxToggleButton",SwigwxToggleButtonTowxObject}, + { "_class_wxObject","_wxToggleButton",SwigwxToggleButtonTowxObject}, + { "_class_wxObject","_class_wxSpinCtrl",SwigwxSpinCtrlTowxObject}, + { "_class_wxObject","_wxSpinCtrl",SwigwxSpinCtrlTowxObject}, + { "_class_wxObject","_class_wxSlider",SwigwxSliderTowxObject}, + { "_class_wxObject","_wxSlider",SwigwxSliderTowxObject}, + { "_class_wxObject","_class_wxRadioButton",SwigwxRadioButtonTowxObject}, + { "_class_wxObject","_wxRadioButton",SwigwxRadioButtonTowxObject}, + { "_class_wxObject","_class_wxRadioBox",SwigwxRadioBoxTowxObject}, + { "_class_wxObject","_wxRadioBox",SwigwxRadioBoxTowxObject}, + { "_class_wxObject","_class_wxStaticBitmap",SwigwxStaticBitmapTowxObject}, + { "_class_wxObject","_wxStaticBitmap",SwigwxStaticBitmapTowxObject}, + { "_class_wxObject","_class_wxSpinButton",SwigwxSpinButtonTowxObject}, + { "_class_wxObject","_wxSpinButton",SwigwxSpinButtonTowxObject}, + { "_class_wxObject","_class_wxScrollBar",SwigwxScrollBarTowxObject}, + { "_class_wxObject","_wxScrollBar",SwigwxScrollBarTowxObject}, + { "_class_wxObject","_class_wxTextCtrl",SwigwxTextCtrlTowxObject}, + { "_class_wxObject","_wxTextCtrl",SwigwxTextCtrlTowxObject}, + { "_class_wxObject","_class_wxCheckListBox",SwigwxCheckListBoxTowxObject}, + { "_class_wxObject","_wxCheckListBox",SwigwxCheckListBoxTowxObject}, + { "_class_wxObject","_class_wxListBox",SwigwxListBoxTowxObject}, + { "_class_wxObject","_wxListBox",SwigwxListBoxTowxObject}, + { "_class_wxObject","_class_wxStaticText",SwigwxStaticTextTowxObject}, + { "_class_wxObject","_wxStaticText",SwigwxStaticTextTowxObject}, + { "_class_wxObject","_class_wxStaticLine",SwigwxStaticLineTowxObject}, + { "_class_wxObject","_wxStaticLine",SwigwxStaticLineTowxObject}, + { "_class_wxObject","_class_wxStaticBox",SwigwxStaticBoxTowxObject}, + { "_class_wxObject","_wxStaticBox",SwigwxStaticBoxTowxObject}, + { "_class_wxObject","_class_wxGauge",SwigwxGaugeTowxObject}, + { "_class_wxObject","_wxGauge",SwigwxGaugeTowxObject}, + { "_class_wxObject","_class_wxComboBox",SwigwxComboBoxTowxObject}, + { "_class_wxObject","_wxComboBox",SwigwxComboBoxTowxObject}, + { "_class_wxObject","_class_wxChoice",SwigwxChoiceTowxObject}, + { "_class_wxObject","_wxChoice",SwigwxChoiceTowxObject}, + { "_class_wxObject","_class_wxCheckBox",SwigwxCheckBoxTowxObject}, + { "_class_wxObject","_wxCheckBox",SwigwxCheckBoxTowxObject}, + { "_class_wxObject","_class_wxBitmapButton",SwigwxBitmapButtonTowxObject}, + { "_class_wxObject","_wxBitmapButton",SwigwxBitmapButtonTowxObject}, + { "_class_wxObject","_class_wxButton",SwigwxButtonTowxObject}, + { "_class_wxObject","_wxButton",SwigwxButtonTowxObject}, + { "_class_wxObject","_class_wxControl",SwigwxControlTowxObject}, + { "_class_wxObject","_wxControl",SwigwxControlTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -8501,6 +8713,49 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxToggleButton",SwigwxToggleButtonTowxObject}, + { "_wxObject","_wxToggleButton",SwigwxToggleButtonTowxObject}, + { "_wxObject","_class_wxSpinCtrl",SwigwxSpinCtrlTowxObject}, + { "_wxObject","_wxSpinCtrl",SwigwxSpinCtrlTowxObject}, + { "_wxObject","_class_wxSlider",SwigwxSliderTowxObject}, + { "_wxObject","_wxSlider",SwigwxSliderTowxObject}, + { "_wxObject","_class_wxRadioButton",SwigwxRadioButtonTowxObject}, + { "_wxObject","_wxRadioButton",SwigwxRadioButtonTowxObject}, + { "_wxObject","_class_wxRadioBox",SwigwxRadioBoxTowxObject}, + { "_wxObject","_wxRadioBox",SwigwxRadioBoxTowxObject}, + { "_wxObject","_class_wxStaticBitmap",SwigwxStaticBitmapTowxObject}, + { "_wxObject","_wxStaticBitmap",SwigwxStaticBitmapTowxObject}, + { "_wxObject","_class_wxSpinButton",SwigwxSpinButtonTowxObject}, + { "_wxObject","_wxSpinButton",SwigwxSpinButtonTowxObject}, + { "_wxObject","_class_wxScrollBar",SwigwxScrollBarTowxObject}, + { "_wxObject","_wxScrollBar",SwigwxScrollBarTowxObject}, + { "_wxObject","_class_wxTextCtrl",SwigwxTextCtrlTowxObject}, + { "_wxObject","_wxTextCtrl",SwigwxTextCtrlTowxObject}, + { "_wxObject","_class_wxCheckListBox",SwigwxCheckListBoxTowxObject}, + { "_wxObject","_wxCheckListBox",SwigwxCheckListBoxTowxObject}, + { "_wxObject","_class_wxListBox",SwigwxListBoxTowxObject}, + { "_wxObject","_wxListBox",SwigwxListBoxTowxObject}, + { "_wxObject","_class_wxStaticText",SwigwxStaticTextTowxObject}, + { "_wxObject","_wxStaticText",SwigwxStaticTextTowxObject}, + { "_wxObject","_class_wxStaticLine",SwigwxStaticLineTowxObject}, + { "_wxObject","_wxStaticLine",SwigwxStaticLineTowxObject}, + { "_wxObject","_class_wxStaticBox",SwigwxStaticBoxTowxObject}, + { "_wxObject","_wxStaticBox",SwigwxStaticBoxTowxObject}, + { "_wxObject","_class_wxGauge",SwigwxGaugeTowxObject}, + { "_wxObject","_wxGauge",SwigwxGaugeTowxObject}, + { "_wxObject","_class_wxComboBox",SwigwxComboBoxTowxObject}, + { "_wxObject","_wxComboBox",SwigwxComboBoxTowxObject}, + { "_wxObject","_class_wxChoice",SwigwxChoiceTowxObject}, + { "_wxObject","_wxChoice",SwigwxChoiceTowxObject}, + { "_wxObject","_class_wxCheckBox",SwigwxCheckBoxTowxObject}, + { "_wxObject","_wxCheckBox",SwigwxCheckBoxTowxObject}, + { "_wxObject","_class_wxBitmapButton",SwigwxBitmapButtonTowxObject}, + { "_wxObject","_wxBitmapButton",SwigwxBitmapButtonTowxObject}, + { "_wxObject","_class_wxButton",SwigwxButtonTowxObject}, + { "_wxObject","_wxButton",SwigwxButtonTowxObject}, + { "_wxObject","_class_wxControl",SwigwxControlTowxObject}, + { "_wxObject","_wxControl",SwigwxControlTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -8597,6 +8852,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 4cfdb3f11e..53dd942fcf 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -61,6 +61,7 @@ extern PyObject *SWIG_newvarlink(void); #endif #include #include +#include static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -513,6 +514,14 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxListItemTowxObject(void *ptr) { + wxListItem *src; + wxObject *dest; + src = (wxListItem *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxListItem() (new wxListItem()) static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2023,6 +2032,14 @@ static void *SwigwxListEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxListEventTowxObject(void *ptr) { + wxListEvent *src; + wxObject *dest; + src = (wxListEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxListEvent_m_code_set(_swigobj,_swigval) (_swigobj->m_code = _swigval,_swigval) static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2385,7 +2402,6 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","m_item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListEvent_m_item_set",_kwnames,&_argo0,&_argo1)) @@ -2409,13 +2425,7 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2426,7 +2436,6 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py wxListEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_m_item_get",_kwnames,&_argo0)) @@ -2443,13 +2452,7 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py _result = (wxListItem *)wxListEvent_m_item_get(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2792,7 +2795,6 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj wxListEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetItem",_kwnames,&_argo0)) @@ -2810,13 +2812,7 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj _result = (wxListItem *) &_result_ref; wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2844,6 +2840,14 @@ static void *SwigwxListCtrlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxListCtrlTowxObject(void *ptr) { + wxListCtrl *src; + wxObject *dest; + src = (wxListCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3118,7 +3122,6 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_EditLabel",_kwnames,&_argo0,&_arg1)) @@ -3135,13 +3138,7 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3182,7 +3179,6 @@ static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args, wxListCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListCtrl_GetEditControl",_kwnames,&_argo0)) @@ -3199,13 +3195,7 @@ static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args, _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3458,7 +3448,6 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","which", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_GetImageList",_kwnames,&_argo0,&_arg1)) @@ -3475,13 +3464,7 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3529,7 +3512,6 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje int _arg2 = (int ) 0; PyObject * _argo0 = 0; char *_kwnames[] = { "self","itemId","col", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxListCtrl_GetItem",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -3546,13 +3528,7 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje _result = (wxListItem *)wxListCtrl_GetItem(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4856,6 +4832,14 @@ static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void *SwigwxPyTreeItemDataTowxObject(void *ptr) { + wxPyTreeItemData *src; + wxObject *dest; + src = (wxPyTreeItemData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0)) static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5043,6 +5027,14 @@ static void *SwigwxTreeEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxTreeEventTowxObject(void *ptr) { + wxTreeEvent *src; + wxObject *dest; + src = (wxTreeEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxTreeEvent_GetItem(_swigobj) (_swigobj->GetItem()) static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5211,6 +5203,14 @@ static void *SwigwxPyTreeCtrlTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyTreeCtrlTowxObject(void *ptr) { + wxPyTreeCtrl *src; + wxObject *dest; + src = (wxPyTreeCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPyTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5437,7 +5437,6 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetImageList",_kwnames,&_argo0)) @@ -5454,13 +5453,7 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5471,7 +5464,6 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetStateImageList",_kwnames,&_argo0)) @@ -5488,13 +5480,7 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7527,7 +7513,6 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_EditLabel",_kwnames,&_argo0,&_argo1)) @@ -7551,13 +7536,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7568,7 +7547,6 @@ static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetEditControl",_kwnames,&_argo0)) @@ -7585,13 +7563,7 @@ static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8306,9 +8278,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_wxListEvent","_class_wxListEvent",0}, + { "_class_wxObject","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, + { "_class_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, + { "_class_wxObject","_class_wxTreeEvent",SwigwxTreeEventTowxObject}, + { "_class_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject}, + { "_class_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, + { "_class_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, + { "_class_wxObject","_class_wxListCtrl",SwigwxListCtrlTowxObject}, + { "_class_wxObject","_wxListCtrl",SwigwxListCtrlTowxObject}, + { "_class_wxObject","_class_wxListEvent",SwigwxListEventTowxObject}, + { "_class_wxObject","_wxListEvent",SwigwxListEventTowxObject}, + { "_class_wxObject","_class_wxListItem",SwigwxListItemTowxObject}, + { "_class_wxObject","_wxListItem",SwigwxListItemTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -8462,6 +8448,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_wxListCtrl","_class_wxListCtrl",0}, + { "_wxObject","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, + { "_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, + { "_wxObject","_class_wxTreeEvent",SwigwxTreeEventTowxObject}, + { "_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject}, + { "_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, + { "_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, + { "_wxObject","_class_wxListCtrl",SwigwxListCtrlTowxObject}, + { "_wxObject","_wxListCtrl",SwigwxListCtrlTowxObject}, + { "_wxObject","_class_wxListEvent",SwigwxListEventTowxObject}, + { "_wxObject","_wxListEvent",SwigwxListEventTowxObject}, + { "_wxObject","_class_wxListItem",SwigwxListItemTowxObject}, + { "_wxObject","_wxListItem",SwigwxListItemTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -8520,6 +8519,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, @@ -8734,6 +8734,9 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)); PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)); PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_DRAG)); + + wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); + wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index 1dd621cd73..497d0bd11f 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -57,7 +57,7 @@ class wxListItemAttr(wxListItemAttrPtr): -class wxListItemPtr : +class wxListItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -262,7 +262,6 @@ class wxListEventPtr(wxNotifyEventPtr): return val def GetItem(self, *_args, **_kwargs): val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs) - if val: val = wxListItemPtr(val) return val def __setattr__(self,name,value): if name == "m_code" : @@ -321,6 +320,7 @@ class wxListCtrlPtr(wxControlPtr): return val def AssignImageList(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_AssignImageList,(self,) + _args, _kwargs) + _args[0].thisown = 0 return val def DeleteItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_DeleteItem,(self,) + _args, _kwargs) @@ -339,14 +339,12 @@ class wxListCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) return val def EndEditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EndEditLabel,(self,) + _args, _kwargs) return val def GetEditControl(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) return val def EnsureVisible(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs) @@ -371,14 +369,12 @@ class wxListCtrlPtr(wxControlPtr): return val def GetImageList(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs) - if val: val = wxImageListPtr(val) return val def GetItemData(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItemData,(self,) + _args, _kwargs) return val def GetItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs) - if val: val = wxListItemPtr(val) ; val.thisown = 1 return val def GetItemPosition(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItemPosition,(self,) + _args, _kwargs) @@ -516,7 +512,7 @@ class wxTreeItemId(wxTreeItemIdPtr): -class wxTreeItemDataPtr : +class wxTreeItemDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -583,6 +579,7 @@ class wxTreeCtrlPtr(wxControlPtr): return val def AssignImageList(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_AssignImageList,(self,) + _args, _kwargs) + _args[0].thisown = 0 return val def GetCount(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs) @@ -595,11 +592,9 @@ class wxTreeCtrlPtr(wxControlPtr): return val def GetImageList(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetImageList,(self,) + _args, _kwargs) - if val: val = wxImageListPtr(val) return val def GetStateImageList(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetStateImageList,(self,) + _args, _kwargs) - if val: val = wxImageListPtr(val) return val def SetImageList(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SetImageList,(self,) + _args, _kwargs) @@ -765,11 +760,9 @@ class wxTreeCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) return val def GetEditControl(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) return val def EndEditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index 7b969c5acf..e5afd2a767 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -129,6 +129,14 @@ static PyObject *_wrap_wxNewEventType(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static void *SwigwxEventTowxObject(void *ptr) { + wxEvent *src; + wxObject *dest; + src = (wxEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxEvent(_swigarg0) (new wxEvent(_swigarg0)) static PyObject *_wrap_new_wxEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -189,7 +197,6 @@ static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args, Py wxEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_GetEventObject",_kwnames,&_argo0)) @@ -206,13 +213,7 @@ static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args, Py _result = (wxObject *)wxEvent_GetEventObject(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxObject_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -482,6 +483,14 @@ static void *SwigwxSizeEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxSizeEventTowxObject(void *ptr) { + wxSizeEvent *src; + wxObject *dest; + src = (wxSizeEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSizeEvent(_swigarg0,_swigarg1) (new wxSizeEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxSizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -553,6 +562,14 @@ static void *SwigwxCloseEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxCloseEventTowxObject(void *ptr) { + wxCloseEvent *src; + wxObject *dest; + src = (wxCloseEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCloseEvent(_swigarg0,_swigarg1) (new wxCloseEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxCloseEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -759,6 +776,14 @@ static void *SwigwxCommandEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxCommandEventTowxObject(void *ptr) { + wxCommandEvent *src; + wxObject *dest; + src = (wxCommandEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCommandEvent(_swigarg0,_swigarg1) (new wxCommandEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1076,6 +1101,14 @@ static void *SwigwxScrollEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxScrollEventTowxObject(void *ptr) { + wxScrollEvent *src; + wxObject *dest; + src = (wxScrollEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxScrollEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxScrollEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxScrollEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1167,6 +1200,14 @@ static void *SwigwxScrollWinEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxScrollWinEventTowxObject(void *ptr) { + wxScrollWinEvent *src; + wxObject *dest; + src = (wxScrollWinEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxScrollWinEvent(_swigarg0,_swigarg1,_swigarg2) (new wxScrollWinEvent(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxScrollWinEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1273,6 +1314,14 @@ static void *SwigwxSpinEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxSpinEventTowxObject(void *ptr) { + wxSpinEvent *src; + wxObject *dest; + src = (wxSpinEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSpinEvent(_swigarg0,_swigarg1) (new wxSpinEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxSpinEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1308,6 +1357,14 @@ static void *SwigwxMouseEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxMouseEventTowxObject(void *ptr) { + wxMouseEvent *src; + wxObject *dest; + src = (wxMouseEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMouseEvent(_swigarg0) (new wxMouseEvent(_swigarg0)) static PyObject *_wrap_new_wxMouseEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2972,6 +3029,14 @@ static void *SwigwxKeyEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxKeyEventTowxObject(void *ptr) { + wxKeyEvent *src; + wxObject *dest; + src = (wxKeyEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxKeyEvent(_swigarg0) (new wxKeyEvent(_swigarg0)) static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3775,6 +3840,14 @@ static void *SwigwxNavigationKeyEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxNavigationKeyEventTowxObject(void *ptr) { + wxNavigationKeyEvent *src; + wxObject *dest; + src = (wxNavigationKeyEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxNavigationKeyEvent() (new wxNavigationKeyEvent()) static PyObject *_wrap_new_wxNavigationKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3921,7 +3994,6 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetCurrentFocus(PyObject *self, PyOb wxNavigationKeyEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNavigationKeyEvent_GetCurrentFocus",_kwnames,&_argo0)) @@ -3938,13 +4010,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetCurrentFocus(PyObject *self, PyOb _result = (wxWindow *)wxNavigationKeyEvent_GetCurrentFocus(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3992,6 +4058,14 @@ static void *SwigwxMoveEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxMoveEventTowxObject(void *ptr) { + wxMoveEvent *src; + wxObject *dest; + src = (wxMoveEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMoveEvent(_swigarg0,_swigarg1) (new wxMoveEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMoveEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4063,6 +4137,14 @@ static void *SwigwxPaintEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxPaintEventTowxObject(void *ptr) { + wxPaintEvent *src; + wxObject *dest; + src = (wxPaintEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPaintEvent(_swigarg0) (new wxPaintEvent(_swigarg0)) static PyObject *_wrap_new_wxPaintEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4097,6 +4179,14 @@ static void *SwigwxEraseEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxEraseEventTowxObject(void *ptr) { + wxEraseEvent *src; + wxObject *dest; + src = (wxEraseEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxEraseEvent(_swigarg0,_swigarg1) (new wxEraseEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxEraseEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4139,7 +4229,6 @@ static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args, PyObje wxEraseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEraseEvent_GetDC",_kwnames,&_argo0)) @@ -4156,13 +4245,7 @@ static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args, PyObje _result = (wxDC *)wxEraseEvent_GetDC(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4174,6 +4257,14 @@ static void *SwigwxFocusEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxFocusEventTowxObject(void *ptr) { + wxFocusEvent *src; + wxObject *dest; + src = (wxFocusEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFocusEvent(_swigarg0,_swigarg1) (new wxFocusEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4209,6 +4300,14 @@ static void *SwigwxActivateEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxActivateEventTowxObject(void *ptr) { + wxActivateEvent *src; + wxObject *dest; + src = (wxActivateEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxActivateEvent(_swigarg0,_swigarg1,_swigarg2) (new wxActivateEvent(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxActivateEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4272,6 +4371,14 @@ static void *SwigwxInitDialogEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxInitDialogEventTowxObject(void *ptr) { + wxInitDialogEvent *src; + wxObject *dest; + src = (wxInitDialogEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxInitDialogEvent(_swigarg0) (new wxInitDialogEvent(_swigarg0)) static PyObject *_wrap_new_wxInitDialogEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4306,6 +4413,14 @@ static void *SwigwxMenuEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxMenuEventTowxObject(void *ptr) { + wxMenuEvent *src; + wxObject *dest; + src = (wxMenuEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMenuEvent(_swigarg0,_swigarg1) (new wxMenuEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMenuEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4368,6 +4483,14 @@ static void *SwigwxShowEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxShowEventTowxObject(void *ptr) { + wxShowEvent *src; + wxObject *dest; + src = (wxShowEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxShowEvent(_swigarg0,_swigarg1) (new wxShowEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxShowEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4460,6 +4583,14 @@ static void *SwigwxIconizeEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxIconizeEventTowxObject(void *ptr) { + wxIconizeEvent *src; + wxObject *dest; + src = (wxIconizeEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxIconizeEvent(_swigarg0) (new wxIconizeEvent(_swigarg0)) static PyObject *_wrap_new_wxIconizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4494,6 +4625,14 @@ static void *SwigwxMaximizeEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxMaximizeEventTowxObject(void *ptr) { + wxMaximizeEvent *src; + wxObject *dest; + src = (wxMaximizeEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMaximizeEvent(_swigarg0) (new wxMaximizeEvent(_swigarg0)) static PyObject *_wrap_new_wxMaximizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4528,6 +4667,14 @@ static void *SwigwxJoystickEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxJoystickEventTowxObject(void *ptr) { + wxJoystickEvent *src; + wxObject *dest; + src = (wxJoystickEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxJoystickEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxJoystickEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxJoystickEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5014,6 +5161,14 @@ static void *SwigwxDropFilesEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxDropFilesEventTowxObject(void *ptr) { + wxDropFilesEvent *src; + wxObject *dest; + src = (wxDropFilesEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxDropFilesEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) static PyObject *_wrap_wxDropFilesEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5121,6 +5276,14 @@ static void *SwigwxIdleEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxIdleEventTowxObject(void *ptr) { + wxIdleEvent *src; + wxObject *dest; + src = (wxIdleEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxIdleEvent() (new wxIdleEvent()) static PyObject *_wrap_new_wxIdleEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5211,6 +5374,14 @@ static void *SwigwxUpdateUIEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxUpdateUIEventTowxObject(void *ptr) { + wxUpdateUIEvent *src; + wxObject *dest; + src = (wxUpdateUIEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxUpdateUIEvent(_swigarg0) (new wxUpdateUIEvent(_swigarg0)) static PyObject *_wrap_new_wxUpdateUIEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5523,6 +5694,14 @@ static void *SwigwxSysColourChangedEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxSysColourChangedEventTowxObject(void *ptr) { + wxSysColourChangedEvent *src; + wxObject *dest; + src = (wxSysColourChangedEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSysColourChangedEvent() (new wxSysColourChangedEvent()) static PyObject *_wrap_new_wxSysColourChangedEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5564,6 +5743,14 @@ static void *SwigwxNotifyEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxNotifyEventTowxObject(void *ptr) { + wxNotifyEvent *src; + wxObject *dest; + src = (wxNotifyEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxNotifyEvent(_swigarg0,_swigarg1) (new wxNotifyEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxNotifyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5680,6 +5867,14 @@ static void *SwigwxPaletteChangedEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxPaletteChangedEventTowxObject(void *ptr) { + wxPaletteChangedEvent *src; + wxObject *dest; + src = (wxPaletteChangedEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPaletteChangedEvent(_swigarg0) (new wxPaletteChangedEvent(_swigarg0)) static PyObject *_wrap_new_wxPaletteChangedEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5749,7 +5944,6 @@ static PyObject *_wrap_wxPaletteChangedEvent_GetChangedWindow(PyObject *self, Py wxPaletteChangedEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPaletteChangedEvent_GetChangedWindow",_kwnames,&_argo0)) @@ -5766,13 +5960,7 @@ static PyObject *_wrap_wxPaletteChangedEvent_GetChangedWindow(PyObject *self, Py _result = (wxWindow *)wxPaletteChangedEvent_GetChangedWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5784,6 +5972,14 @@ static void *SwigwxQueryNewPaletteEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxQueryNewPaletteEventTowxObject(void *ptr) { + wxQueryNewPaletteEvent *src; + wxObject *dest; + src = (wxQueryNewPaletteEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxQueryNewPaletteEvent(_swigarg0) (new wxQueryNewPaletteEvent(_swigarg0)) static PyObject *_wrap_new_wxQueryNewPaletteEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5883,6 +6079,14 @@ static void *SwigwxWindowCreateEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxWindowCreateEventTowxObject(void *ptr) { + wxWindowCreateEvent *src; + wxObject *dest; + src = (wxWindowCreateEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxWindowCreateEvent(_swigarg0) (new wxWindowCreateEvent(_swigarg0)) static PyObject *_wrap_new_wxWindowCreateEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5924,7 +6128,6 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a wxWindowCreateEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindowCreateEvent_GetWindow",_kwnames,&_argo0)) @@ -5941,13 +6144,7 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a _result = (wxWindow *)wxWindowCreateEvent_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5967,6 +6164,14 @@ static void *SwigwxWindowDestroyEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxWindowDestroyEventTowxObject(void *ptr) { + wxWindowDestroyEvent *src; + wxObject *dest; + src = (wxWindowDestroyEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxWindowDestroyEvent(_swigarg0) (new wxWindowDestroyEvent(_swigarg0)) static PyObject *_wrap_new_wxWindowDestroyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6008,7 +6213,6 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * wxWindowDestroyEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindowDestroyEvent_GetWindow",_kwnames,&_argo0)) @@ -6025,13 +6229,7 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * _result = (wxWindow *)wxWindowDestroyEvent_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -6043,6 +6241,14 @@ static void *SwigwxTimerEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxTimerEventTowxObject(void *ptr) { + wxTimerEvent *src; + wxObject *dest; + src = (wxTimerEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTimerEvent(_swigarg0,_swigarg1) (new wxTimerEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxTimerEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6105,6 +6311,14 @@ static void *SwigwxPyEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxPyEventTowxObject(void *ptr) { + wxPyEvent *src; + wxObject *dest; + src = (wxPyEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyEvent(_swigarg0) (new wxPyEvent(_swigarg0)) static PyObject *_wrap_new_wxPyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6235,6 +6449,14 @@ static void *SwigwxPyCommandEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxPyCommandEventTowxObject(void *ptr) { + wxPyCommandEvent *src; + wxObject *dest; + src = (wxPyCommandEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyCommandEvent(_swigarg0,_swigarg1) (new wxPyCommandEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyCommandEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6662,7 +6884,75 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxImageList","_class_wxImageList",0}, { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, + { "_class_wxObject","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxObject}, + { "_class_wxObject","_wxPyCommandEvent",SwigwxPyCommandEventTowxObject}, + { "_class_wxObject","_class_wxPyEvent",SwigwxPyEventTowxObject}, + { "_class_wxObject","_wxPyEvent",SwigwxPyEventTowxObject}, + { "_class_wxObject","_class_wxTimerEvent",SwigwxTimerEventTowxObject}, + { "_class_wxObject","_wxTimerEvent",SwigwxTimerEventTowxObject}, + { "_class_wxObject","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject}, + { "_class_wxObject","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject}, + { "_class_wxObject","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject}, + { "_class_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject}, + { "_class_wxObject","_class_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject}, + { "_class_wxObject","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject}, + { "_class_wxObject","_class_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxObject}, + { "_class_wxObject","_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxObject}, + { "_class_wxObject","_class_wxNotifyEvent",SwigwxNotifyEventTowxObject}, + { "_class_wxObject","_wxNotifyEvent",SwigwxNotifyEventTowxObject}, + { "_class_wxObject","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxObject}, + { "_class_wxObject","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxObject}, + { "_class_wxObject","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxObject}, + { "_class_wxObject","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxObject}, + { "_class_wxObject","_class_wxIdleEvent",SwigwxIdleEventTowxObject}, + { "_class_wxObject","_wxIdleEvent",SwigwxIdleEventTowxObject}, + { "_class_wxObject","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxObject}, + { "_class_wxObject","_wxDropFilesEvent",SwigwxDropFilesEventTowxObject}, + { "_class_wxObject","_class_wxJoystickEvent",SwigwxJoystickEventTowxObject}, + { "_class_wxObject","_wxJoystickEvent",SwigwxJoystickEventTowxObject}, + { "_class_wxObject","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxObject}, + { "_class_wxObject","_wxMaximizeEvent",SwigwxMaximizeEventTowxObject}, + { "_class_wxObject","_class_wxIconizeEvent",SwigwxIconizeEventTowxObject}, + { "_class_wxObject","_wxIconizeEvent",SwigwxIconizeEventTowxObject}, + { "_class_wxObject","_class_wxShowEvent",SwigwxShowEventTowxObject}, + { "_class_wxObject","_wxShowEvent",SwigwxShowEventTowxObject}, + { "_class_wxObject","_class_wxMenuEvent",SwigwxMenuEventTowxObject}, + { "_class_wxObject","_wxMenuEvent",SwigwxMenuEventTowxObject}, + { "_class_wxObject","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, + { "_class_wxObject","_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, + { "_class_wxObject","_class_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_class_wxObject","_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_class_wxObject","_class_wxFocusEvent",SwigwxFocusEventTowxObject}, + { "_class_wxObject","_wxFocusEvent",SwigwxFocusEventTowxObject}, + { "_class_wxObject","_class_wxEraseEvent",SwigwxEraseEventTowxObject}, + { "_class_wxObject","_wxEraseEvent",SwigwxEraseEventTowxObject}, + { "_class_wxObject","_class_wxPaintEvent",SwigwxPaintEventTowxObject}, + { "_class_wxObject","_wxPaintEvent",SwigwxPaintEventTowxObject}, + { "_class_wxObject","_class_wxMoveEvent",SwigwxMoveEventTowxObject}, + { "_class_wxObject","_wxMoveEvent",SwigwxMoveEventTowxObject}, + { "_class_wxObject","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, + { "_class_wxObject","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, + { "_class_wxObject","_class_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_class_wxObject","_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_class_wxObject","_class_wxMouseEvent",SwigwxMouseEventTowxObject}, + { "_class_wxObject","_wxMouseEvent",SwigwxMouseEventTowxObject}, + { "_class_wxObject","_class_wxSpinEvent",SwigwxSpinEventTowxObject}, + { "_class_wxObject","_wxSpinEvent",SwigwxSpinEventTowxObject}, + { "_class_wxObject","_class_wxScrollWinEvent",SwigwxScrollWinEventTowxObject}, + { "_class_wxObject","_wxScrollWinEvent",SwigwxScrollWinEventTowxObject}, + { "_class_wxObject","_class_wxScrollEvent",SwigwxScrollEventTowxObject}, + { "_class_wxObject","_wxScrollEvent",SwigwxScrollEventTowxObject}, + { "_class_wxObject","_class_wxCommandEvent",SwigwxCommandEventTowxObject}, + { "_class_wxObject","_wxCommandEvent",SwigwxCommandEventTowxObject}, + { "_class_wxObject","_class_wxCloseEvent",SwigwxCloseEventTowxObject}, + { "_class_wxObject","_wxCloseEvent",SwigwxCloseEventTowxObject}, + { "_class_wxObject","_class_wxSizeEvent",SwigwxSizeEventTowxObject}, + { "_class_wxObject","_wxSizeEvent",SwigwxSizeEventTowxObject}, + { "_class_wxObject","_class_wxEvent",SwigwxEventTowxObject}, + { "_class_wxObject","_wxEvent",SwigwxEventTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -6832,6 +7122,73 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxObject}, + { "_wxObject","_wxPyCommandEvent",SwigwxPyCommandEventTowxObject}, + { "_wxObject","_class_wxPyEvent",SwigwxPyEventTowxObject}, + { "_wxObject","_wxPyEvent",SwigwxPyEventTowxObject}, + { "_wxObject","_class_wxTimerEvent",SwigwxTimerEventTowxObject}, + { "_wxObject","_wxTimerEvent",SwigwxTimerEventTowxObject}, + { "_wxObject","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject}, + { "_wxObject","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject}, + { "_wxObject","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject}, + { "_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject}, + { "_wxObject","_class_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject}, + { "_wxObject","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject}, + { "_wxObject","_class_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxObject}, + { "_wxObject","_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxObject}, + { "_wxObject","_class_wxNotifyEvent",SwigwxNotifyEventTowxObject}, + { "_wxObject","_wxNotifyEvent",SwigwxNotifyEventTowxObject}, + { "_wxObject","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxObject}, + { "_wxObject","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxObject}, + { "_wxObject","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxObject}, + { "_wxObject","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxObject}, + { "_wxObject","_class_wxIdleEvent",SwigwxIdleEventTowxObject}, + { "_wxObject","_wxIdleEvent",SwigwxIdleEventTowxObject}, + { "_wxObject","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxObject}, + { "_wxObject","_wxDropFilesEvent",SwigwxDropFilesEventTowxObject}, + { "_wxObject","_class_wxJoystickEvent",SwigwxJoystickEventTowxObject}, + { "_wxObject","_wxJoystickEvent",SwigwxJoystickEventTowxObject}, + { "_wxObject","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxObject}, + { "_wxObject","_wxMaximizeEvent",SwigwxMaximizeEventTowxObject}, + { "_wxObject","_class_wxIconizeEvent",SwigwxIconizeEventTowxObject}, + { "_wxObject","_wxIconizeEvent",SwigwxIconizeEventTowxObject}, + { "_wxObject","_class_wxShowEvent",SwigwxShowEventTowxObject}, + { "_wxObject","_wxShowEvent",SwigwxShowEventTowxObject}, + { "_wxObject","_class_wxMenuEvent",SwigwxMenuEventTowxObject}, + { "_wxObject","_wxMenuEvent",SwigwxMenuEventTowxObject}, + { "_wxObject","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, + { "_wxObject","_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, + { "_wxObject","_class_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_wxObject","_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_wxObject","_class_wxFocusEvent",SwigwxFocusEventTowxObject}, + { "_wxObject","_wxFocusEvent",SwigwxFocusEventTowxObject}, + { "_wxObject","_class_wxEraseEvent",SwigwxEraseEventTowxObject}, + { "_wxObject","_wxEraseEvent",SwigwxEraseEventTowxObject}, + { "_wxObject","_class_wxPaintEvent",SwigwxPaintEventTowxObject}, + { "_wxObject","_wxPaintEvent",SwigwxPaintEventTowxObject}, + { "_wxObject","_class_wxMoveEvent",SwigwxMoveEventTowxObject}, + { "_wxObject","_wxMoveEvent",SwigwxMoveEventTowxObject}, + { "_wxObject","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, + { "_wxObject","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, + { "_wxObject","_class_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_wxObject","_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_wxObject","_class_wxMouseEvent",SwigwxMouseEventTowxObject}, + { "_wxObject","_wxMouseEvent",SwigwxMouseEventTowxObject}, + { "_wxObject","_class_wxSpinEvent",SwigwxSpinEventTowxObject}, + { "_wxObject","_wxSpinEvent",SwigwxSpinEventTowxObject}, + { "_wxObject","_class_wxScrollWinEvent",SwigwxScrollWinEventTowxObject}, + { "_wxObject","_wxScrollWinEvent",SwigwxScrollWinEventTowxObject}, + { "_wxObject","_class_wxScrollEvent",SwigwxScrollEventTowxObject}, + { "_wxObject","_wxScrollEvent",SwigwxScrollEventTowxObject}, + { "_wxObject","_class_wxCommandEvent",SwigwxCommandEventTowxObject}, + { "_wxObject","_wxCommandEvent",SwigwxCommandEventTowxObject}, + { "_wxObject","_class_wxCloseEvent",SwigwxCloseEventTowxObject}, + { "_wxObject","_wxCloseEvent",SwigwxCloseEventTowxObject}, + { "_wxObject","_class_wxSizeEvent",SwigwxSizeEventTowxObject}, + { "_wxObject","_wxSizeEvent",SwigwxSizeEventTowxObject}, + { "_wxObject","_class_wxEvent",SwigwxEventTowxObject}, + { "_wxObject","_wxEvent",SwigwxEventTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -6872,6 +7229,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index f305171982..fafb968f4c 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/events.py @@ -4,7 +4,7 @@ import eventsc from misc import * from gdi import * -class wxEventPtr : +class wxEventPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -491,7 +491,6 @@ class wxNavigationKeyEventPtr(wxEventPtr): return val def GetCurrentFocus(self, *_args, **_kwargs): val = apply(eventsc.wxNavigationKeyEvent_GetCurrentFocus,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetCurrentFocus(self, *_args, **_kwargs): val = apply(eventsc.wxNavigationKeyEvent_SetCurrentFocus,(self,) + _args, _kwargs) @@ -544,7 +543,6 @@ class wxEraseEventPtr(wxEventPtr): self.thisown = 0 def GetDC(self, *_args, **_kwargs): val = apply(eventsc.wxEraseEvent_GetDC,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -859,7 +857,6 @@ class wxPaletteChangedEventPtr(wxEventPtr): return val def GetChangedWindow(self, *_args, **_kwargs): val = apply(eventsc.wxPaletteChangedEvent_GetChangedWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -897,7 +894,6 @@ class wxWindowCreateEventPtr(wxCommandEventPtr): self.thisown = 0 def GetWindow(self, *_args, **_kwargs): val = apply(eventsc.wxWindowCreateEvent_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -915,7 +911,6 @@ class wxWindowDestroyEventPtr(wxCommandEventPtr): self.thisown = 0 def GetWindow(self, *_args, **_kwargs): val = apply(eventsc.wxWindowDestroyEvent_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp index 775f5ce65e..cc7d596718 100644 --- a/wxPython/src/msw/filesys.cpp +++ b/wxPython/src/msw/filesys.cpp @@ -328,6 +328,14 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject return _resultobj; } +static void *SwigwxFSFileTowxObject(void *ptr) { + wxFSFile *src; + wxObject *dest; + src = (wxFSFile *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -478,28 +486,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje if (_result) { _ptr = new wxPyInputStream(_result); } - if (_ptr) { - char swigptr[64]; - SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - - PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); - if (! classobj) { - Py_INCREF(Py_None); - _resultobj = Py_None; - } else { - PyObject* arg = Py_BuildValue("(s)", swigptr); - _resultobj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - // set ThisOwn - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString(_resultobj, "thisown", one); - Py_DECREF(one); - } - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } + _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); } return _resultobj; } @@ -623,6 +610,14 @@ static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *ar return _resultobj; } +static void *SwigwxFileSystemHandlerTowxObject(void *ptr) { + wxFileSystemHandler *src; + wxObject *dest; + src = (wxFileSystemHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { wxPyFileSystemHandler *src; wxFileSystemHandler *dest; @@ -631,6 +626,14 @@ static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyFileSystemHandlerTowxObject(void *ptr) { + wxPyFileSystemHandler *src; + wxObject *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -755,7 +758,6 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -797,13 +799,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -1180,6 +1176,14 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py return _resultobj; } +static void *SwigwxFileSystemTowxObject(void *ptr) { + wxFileSystem *src; + wxObject *dest; + src = (wxFileSystem *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFileSystem() (new wxFileSystem()) static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1300,7 +1304,6 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) @@ -1335,13 +1338,7 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj1) delete _arg1; @@ -1489,6 +1486,14 @@ static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxInternetFSHandlerTowxObject(void *ptr) { + wxInternetFSHandler *src; + wxObject *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxInternetFSHandler() (new wxInternetFSHandler()) static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1576,7 +1581,6 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -1618,13 +1622,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -1640,6 +1638,14 @@ static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxZipFSHandlerTowxObject(void *ptr) { + wxZipFSHandler *src; + wxObject *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxZipFSHandler() (new wxZipFSHandler()) static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1727,7 +1733,6 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -1769,13 +1774,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -1880,6 +1879,14 @@ static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMemoryFSHandlerTowxObject(void *ptr) { + wxMemoryFSHandler *src; + wxObject *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2008,7 +2015,6 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -2050,13 +2056,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -2237,8 +2237,24 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxImageList","_class_wxImageList",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_class_wxObject","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_class_wxObject","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_class_wxObject","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_class_wxObject","_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_class_wxObject","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_class_wxObject","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_class_wxObject","_class_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_class_wxObject","_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_class_wxObject","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_class_wxObject","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_class_wxObject","_class_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_class_wxObject","_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_class_wxObject","_class_wxFSFile",SwigwxFSFileTowxObject}, + { "_class_wxObject","_wxFSFile",SwigwxFSFileTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -2315,6 +2331,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_wxObject","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_wxObject","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_wxObject","_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_wxObject","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_wxObject","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_wxObject","_class_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_wxObject","_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_wxObject","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_wxObject","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_wxObject","_class_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_wxObject","_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_wxObject","_class_wxFSFile",SwigwxFSFileTowxObject}, + { "_wxObject","_wxFSFile",SwigwxFSFileTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -2364,6 +2395,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, @@ -2442,6 +2474,8 @@ SWIGEXPORT(void) initfilesysc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("filesysc", filesyscMethods); d = PyModule_GetDict(m); + + wxPyPtrTypeMap_Add("wxFileSystemHandler", "wxPyFileSystemHandler"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/filesys.py b/wxPython/src/msw/filesys.py index b0f442faea..512b41100c 100644 --- a/wxPython/src/msw/filesys.py +++ b/wxPython/src/msw/filesys.py @@ -24,7 +24,7 @@ def wxMemoryFSHandler_AddFile(filename, a, b=''): __wxMemoryFSHandler_AddFile_Data(filename, a) else: raise TypeError, 'wxImage, wxBitmap or string expected' -class wxFSFilePtr : +class wxFSFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -54,7 +54,7 @@ class wxFSFile(wxFSFilePtr): -class wxCPPFileSystemHandlerPtr : +class wxCPPFileSystemHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -79,7 +79,6 @@ class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) @@ -113,7 +112,7 @@ class wxFileSystemHandler(wxFileSystemHandlerPtr): -class wxFileSystemPtr : +class wxFileSystemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -125,7 +124,6 @@ class wxFileSystemPtr : return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) @@ -152,7 +150,6 @@ class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def __repr__(self): return "" % (self.this,) @@ -173,7 +170,6 @@ class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) @@ -200,7 +196,6 @@ class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 15f357916d..1014c888c9 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -128,6 +128,14 @@ static void *SwigwxFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxFrameTowxObject(void *ptr) { + wxFrame *src; + wxObject *dest; + src = (wxFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -246,7 +254,6 @@ static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, P char * _arg4 = (char *) "statusBar"; PyObject * _argo0 = 0; char *_kwnames[] = { "self","number","style","id","name", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ilis:wxFrame_CreateStatusBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) @@ -263,13 +270,7 @@ static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, P _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -283,7 +284,6 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO char * _arg3 = (char *) "toolBar"; PyObject * _argo0 = 0; char *_kwnames[] = { "self","style","id","name", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|lis:wxFrame_CreateToolBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) @@ -300,13 +300,7 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -352,7 +346,6 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje wxFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetMenuBar",_kwnames,&_argo0)) @@ -369,13 +362,7 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -386,7 +373,6 @@ static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyOb wxFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetStatusBar",_kwnames,&_argo0)) @@ -403,13 +389,7 @@ static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyOb _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -452,7 +432,6 @@ static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObje wxFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetToolBar",_kwnames,&_argo0)) @@ -469,13 +448,7 @@ static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObje _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1121,6 +1094,14 @@ static void *SwigwxMiniFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMiniFrameTowxObject(void *ptr) { + wxMiniFrame *src; + wxObject *dest; + src = (wxMiniFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMiniFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMiniFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1290,8 +1271,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxMiniFrame",SwigwxMiniFrameTowxObject}, + { "_class_wxObject","_wxMiniFrame",SwigwxMiniFrameTowxObject}, + { "_class_wxObject","_class_wxFrame",SwigwxFrameTowxObject}, + { "_class_wxObject","_wxFrame",SwigwxFrameTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -1435,6 +1422,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxMiniFrame",SwigwxMiniFrameTowxObject}, + { "_wxObject","_wxMiniFrame",SwigwxMiniFrameTowxObject}, + { "_wxObject","_class_wxFrame",SwigwxFrameTowxObject}, + { "_wxObject","_wxFrame",SwigwxFrameTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -1491,6 +1483,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/frames.py b/wxPython/src/msw/frames.py index 48ba73936c..41bd817636 100644 --- a/wxPython/src/msw/frames.py +++ b/wxPython/src/msw/frames.py @@ -24,11 +24,9 @@ class wxFramePtr(wxWindowPtr): return val def CreateStatusBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_CreateStatusBar,(self,) + _args, _kwargs) - if val: val = wxStatusBarPtr(val) return val def CreateToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) - if val: val = wxToolBarPtr(val) return val def GetIcon(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetIcon,(self,) + _args, _kwargs) @@ -36,18 +34,15 @@ class wxFramePtr(wxWindowPtr): return val def GetMenuBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) - if val: val = wxMenuBarPtr(val) return val def GetStatusBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetStatusBar,(self,) + _args, _kwargs) - if val: val = wxStatusBarPtr(val) return val def GetTitle(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetTitle,(self,) + _args, _kwargs) return val def GetToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetToolBar,(self,) + _args, _kwargs) - if val: val = wxToolBarPtr(val) return val def Iconize(self, *_args, **_kwargs): val = apply(framesc.wxFrame_Iconize,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 99647881d8..3cdd197bdc 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -1309,6 +1309,166 @@ static PyObject *_wrap_wxTheColourDatabase_get() { return pyobj; } +static void *SwigwxGDIObjectTowxObject(void *ptr) { + wxGDIObject *src; + wxObject *dest; + src = (wxGDIObject *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxGDIObject() (new wxGDIObject()) +static PyObject *_wrap_new_wxGDIObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGDIObject * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGDIObject",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGDIObject *)new_wxGDIObject(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGDIObject_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGDIObject(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxGDIObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGDIObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGDIObject",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGDIObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGDIObject. Expected _wxGDIObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGDIObject(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGDIObject_GetVisible(_swigobj) (_swigobj->GetVisible()) +static PyObject *_wrap_wxGDIObject_GetVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGDIObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGDIObject_GetVisible",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGDIObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGDIObject_GetVisible. Expected _wxGDIObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGDIObject_GetVisible(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGDIObject_SetVisible(_swigobj,_swigarg0) (_swigobj->SetVisible(_swigarg0)) +static PyObject *_wrap_wxGDIObject_SetVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGDIObject * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","visible", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGDIObject_SetVisible",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGDIObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGDIObject_SetVisible. Expected _wxGDIObject_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGDIObject_SetVisible(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGDIObject_IsNull(_swigobj) (_swigobj->IsNull()) +static PyObject *_wrap_wxGDIObject_IsNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGDIObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGDIObject_IsNull",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGDIObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGDIObject_IsNull. Expected _wxGDIObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGDIObject_IsNull(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxBitmapTowxGDIObject(void *ptr) { + wxBitmap *src; + wxGDIObject *dest; + src = (wxBitmap *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxBitmapTowxObject(void *ptr) { + wxBitmap *src; + wxObject *dest; + src = (wxBitmap *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBitmap(_swigarg0,_swigarg1) (new wxBitmap(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2085,6 +2245,14 @@ static PyObject *_wrap_wxBitmap_SetQuality(PyObject *self, PyObject *args, PyObj return _resultobj; } +static void *SwigwxMaskTowxObject(void *ptr) { + wxMask *src; + wxObject *dest; + src = (wxMask *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2146,6 +2314,22 @@ static PyObject *_wrap_wxMask_Destroy(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static void *SwigwxIconTowxGDIObject(void *ptr) { + wxIcon *src; + wxGDIObject *dest; + src = (wxIcon *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxIconTowxObject(void *ptr) { + wxIcon *src; + wxObject *dest; + src = (wxIcon *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2595,6 +2779,22 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO return _resultobj; } +static void *SwigwxCursorTowxGDIObject(void *ptr) { + wxCursor *src; + wxGDIObject *dest; + src = (wxCursor *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxCursorTowxObject(void *ptr) { + wxCursor *src; + wxObject *dest; + src = (wxCursor *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2956,6 +3156,22 @@ static PyObject *_wrap_wxCursor_SetSize(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxFontTowxGDIObject(void *ptr) { + wxFont *src; + wxGDIObject *dest; + src = (wxFont *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxFontTowxObject(void *ptr) { + wxFont *src; + wxObject *dest; + src = (wxFont *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3580,6 +3796,14 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxFontListTowxObject(void *ptr) { + wxFontList *src; + wxObject *dest; + src = (wxFontList *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxFontList_AddFont(_swigobj,_swigarg0) (_swigobj->AddFont(_swigarg0)) static PyObject *_wrap_wxFontList_AddFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3695,6 +3919,14 @@ static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyO return _resultobj; } +static void *SwigwxColourTowxObject(void *ptr) { + wxColour *src; + wxObject *dest; + src = (wxColour *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3916,6 +4148,14 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static void *SwigwxColourDatabaseTowxObject(void *ptr) { + wxColourDatabase *src; + wxObject *dest; + src = (wxColourDatabase *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxColourDatabase_FindColour(_swigobj,_swigarg0) (_swigobj->FindColour(_swigarg0)) static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4070,6 +4310,22 @@ static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPenTowxGDIObject(void *ptr) { + wxPen *src; + wxGDIObject *dest; + src = (wxPen *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxPenTowxObject(void *ptr) { + wxPen *src; + wxObject *dest; + src = (wxPen *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPen(_swigarg0,_swigarg1,_swigarg2) (new wxPen(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4603,6 +4859,14 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxPenListTowxObject(void *ptr) { + wxPenList *src; + wxObject *dest; + src = (wxPenList *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxPenList_AddPen(_swigobj,_swigarg0) (_swigobj->AddPen(_swigarg0)) static PyObject *_wrap_wxPenList_AddPen(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4719,6 +4983,22 @@ static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObj return _resultobj; } +static void *SwigwxBrushTowxGDIObject(void *ptr) { + wxBrush *src; + wxGDIObject *dest; + src = (wxBrush *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxBrushTowxObject(void *ptr) { + wxBrush *src; + wxObject *dest; + src = (wxBrush *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBrush(_swigarg0,_swigarg1) (new wxBrush(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5117,6 +5397,14 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxDCTowxObject(void *ptr) { + wxDC *src; + wxObject *dest; + src = (wxDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define delete_wxDC(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8059,6 +8347,14 @@ static void *SwigwxMemoryDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxMemoryDCTowxObject(void *ptr) { + wxMemoryDC *src; + wxObject *dest; + src = (wxMemoryDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMemoryDC() (new wxMemoryDC()) static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8128,6 +8424,14 @@ static void *SwigwxScreenDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxScreenDCTowxObject(void *ptr) { + wxScreenDC *src; + wxObject *dest; + src = (wxScreenDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxScreenDC() (new wxScreenDC()) static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8260,6 +8564,14 @@ static void *SwigwxClientDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxClientDCTowxObject(void *ptr) { + wxClientDC *src; + wxObject *dest; + src = (wxClientDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxClientDC(_swigarg0) (new wxClientDC(_swigarg0)) static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8302,6 +8614,14 @@ static void *SwigwxPaintDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxPaintDCTowxObject(void *ptr) { + wxPaintDC *src; + wxObject *dest; + src = (wxPaintDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPaintDC(_swigarg0) (new wxPaintDC(_swigarg0)) static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8344,6 +8664,14 @@ static void *SwigwxWindowDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxWindowDCTowxObject(void *ptr) { + wxWindowDC *src; + wxObject *dest; + src = (wxWindowDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxWindowDC(_swigarg0) (new wxWindowDC(_swigarg0)) static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8386,6 +8714,14 @@ static void *SwigwxMetaFileDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxMetaFileDCTowxObject(void *ptr) { + wxMetaFileDC *src; + wxObject *dest; + src = (wxMetaFileDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0)) static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8470,6 +8806,22 @@ static PyObject *_wrap_wxMetaFileDC_Close(PyObject *self, PyObject *args, PyObje return _resultobj; } +static void *SwigwxPaletteTowxGDIObject(void *ptr) { + wxPalette *src; + wxGDIObject *dest; + src = (wxPalette *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxPaletteTowxObject(void *ptr) { + wxPalette *src; + wxObject *dest; + src = (wxPalette *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPalette(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxPalette(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxPalette(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8677,6 +9029,14 @@ static PyObject *_wrap_wxPalette_Ok(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static void *SwigwxImageListTowxObject(void *ptr) { + wxImageList *src; + wxObject *dest; + src = (wxImageList *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxImageList(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxImageList(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9077,7 +9437,1076 @@ static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObj return _resultobj; } +static void *SwigwxRegionTowxGDIObject(void *ptr) { + wxRegion *src; + wxGDIObject *dest; + src = (wxRegion *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxRegionTowxObject(void *ptr) { + wxRegion *src; + wxObject *dest; + src = (wxRegion *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegion * _result; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "x","y","width","height", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegion_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxRegion(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegion * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegion",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxRegion(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRegion_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegion * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Clear. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxRegion_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRegion_Contains(_swigobj,_swigarg0,_swigarg1) (_swigobj->Contains(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionContain _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxRegion_Contains",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Contains. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_ContainsPoint(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) +static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionContain _result; + wxRegion * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsPoint",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsPoint. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_ContainsRect(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) +static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionContain _result; + wxRegion * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRect. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_ContainsRectDim(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Contains(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionContain _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","w","h", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_ContainsRectDim",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRectDim. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_GetBox(_swigobj) (_swigobj->GetBox()) +static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxRegion * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_GetBox",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_GetBox. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxRegion_GetBox(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxRegion_Intersect(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Intersect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Intersect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Intersect. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_IntersectRect(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) +static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRect. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_IntersectRegion(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) +static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRegion * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","region", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRegion",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRegion. Expected _wxRegion_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_IntersectRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_IsEmpty(_swigobj) (_swigobj->IsEmpty()) +static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_IsEmpty",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IsEmpty. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_IsEmpty(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_Union(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Union(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Union",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Union. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_UnionRect(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) +static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRect. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_UnionRegion(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) +static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRegion * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","region", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRegion",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRegion. Expected _wxRegion_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_UnionRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_Subtract(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Subtract(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Subtract",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Subtract. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_SubtractRect(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRect. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_SubtractRegion(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRegion * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","region", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRegion",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRegion. Expected _wxRegion_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_SubtractRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_Xor(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Xor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Xor",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Xor. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_XorRect(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) +static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRect. Expected _wxRegion_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_XorRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegion_XorRegion(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) +static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRegion * _arg0; + wxRegion * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","region", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRegion",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRegion. Expected _wxRegion_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_XorRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxRegionIteratorTowxObject(void *ptr) { + wxRegionIterator *src; + wxObject *dest; + src = (wxRegionIterator *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxRegionIterator(_swigarg0) (new wxRegionIterator(_swigarg0)) +static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionIterator * _result; + wxRegion * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "region", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxRegionIterator",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRegionIterator. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegionIterator_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxRegionIterator(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegionIterator",_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 delete_wxRegionIterator. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxRegionIterator(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRegionIterator_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetX",_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_GetX. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetY",_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_GetY. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetW(_swigobj) (_swigobj->GetW()) +static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetW",_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_GetW. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetW(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetWidth",_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_GetWidth. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetH(_swigobj) (_swigobj->GetH()) +static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetH",_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_GetH. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetH(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetHeight(_swigobj) (_swigobj->GetHeight()) +static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetHeight",_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_GetHeight. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxRegionIterator_GetHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxRegionIterator_GetRect(_swigobj) (_swigobj->GetRect()) +static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetRect",_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_GetRect. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxRegionIterator_GetRect(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxRegionIterator_HaveRects(_swigobj) (_swigobj->HaveRects()) +static PyObject *_wrap_wxRegionIterator_HaveRects(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_HaveRects",_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_HaveRects. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRegionIterator_HaveRects(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRegionIterator_Reset(_swigobj) (_swigobj->Reset()) +static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Reset",_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_Reset. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxRegionIterator_Reset(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxRegionIterator_Next(wxRegionIterator *self) { + (*self) ++; + } +static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRegionIterator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Next",_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_Next. Expected _wxRegionIterator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxRegionIterator_Next(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef gdicMethods[] = { + { "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 }, + { "wxRegionIterator_GetRect", (PyCFunction) _wrap_wxRegionIterator_GetRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetHeight", (PyCFunction) _wrap_wxRegionIterator_GetHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetH", (PyCFunction) _wrap_wxRegionIterator_GetH, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetWidth", (PyCFunction) _wrap_wxRegionIterator_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetW", (PyCFunction) _wrap_wxRegionIterator_GetW, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetY", (PyCFunction) _wrap_wxRegionIterator_GetY, METH_VARARGS | METH_KEYWORDS }, + { "wxRegionIterator_GetX", (PyCFunction) _wrap_wxRegionIterator_GetX, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxRegionIterator", (PyCFunction) _wrap_delete_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, + { "new_wxRegionIterator", (PyCFunction) _wrap_new_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_XorRegion", (PyCFunction) _wrap_wxRegion_XorRegion, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_XorRect", (PyCFunction) _wrap_wxRegion_XorRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Xor", (PyCFunction) _wrap_wxRegion_Xor, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_SubtractRegion", (PyCFunction) _wrap_wxRegion_SubtractRegion, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_SubtractRect", (PyCFunction) _wrap_wxRegion_SubtractRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Subtract", (PyCFunction) _wrap_wxRegion_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_UnionRegion", (PyCFunction) _wrap_wxRegion_UnionRegion, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_UnionRect", (PyCFunction) _wrap_wxRegion_UnionRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Union", (PyCFunction) _wrap_wxRegion_Union, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_IsEmpty", (PyCFunction) _wrap_wxRegion_IsEmpty, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_IntersectRegion", (PyCFunction) _wrap_wxRegion_IntersectRegion, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_IntersectRect", (PyCFunction) _wrap_wxRegion_IntersectRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Intersect", (PyCFunction) _wrap_wxRegion_Intersect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_GetBox", (PyCFunction) _wrap_wxRegion_GetBox, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_ContainsRectDim", (PyCFunction) _wrap_wxRegion_ContainsRectDim, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_ContainsRect", (PyCFunction) _wrap_wxRegion_ContainsRect, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_ContainsPoint", (PyCFunction) _wrap_wxRegion_ContainsPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Contains", (PyCFunction) _wrap_wxRegion_Contains, METH_VARARGS | METH_KEYWORDS }, + { "wxRegion_Clear", (PyCFunction) _wrap_wxRegion_Clear, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxRegion", (PyCFunction) _wrap_delete_wxRegion, METH_VARARGS | METH_KEYWORDS }, + { "new_wxRegion", (PyCFunction) _wrap_new_wxRegion, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_GetSize", (PyCFunction) _wrap_wxImageList_GetSize, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_RemoveAll", (PyCFunction) _wrap_wxImageList_RemoveAll, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Remove", (PyCFunction) _wrap_wxImageList_Remove, METH_VARARGS | METH_KEYWORDS }, @@ -9308,6 +10737,11 @@ static PyMethodDef gdicMethods[] = { { "wxBitmap_GetPalette", (PyCFunction) _wrap_wxBitmap_GetPalette, METH_VARARGS | METH_KEYWORDS }, { "delete_wxBitmap", (PyCFunction) _wrap_delete_wxBitmap, METH_VARARGS | METH_KEYWORDS }, { "new_wxBitmap", (PyCFunction) _wrap_new_wxBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxGDIObject_IsNull", (PyCFunction) _wrap_wxGDIObject_IsNull, METH_VARARGS | METH_KEYWORDS }, + { "wxGDIObject_SetVisible", (PyCFunction) _wrap_wxGDIObject_SetVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxGDIObject_GetVisible", (PyCFunction) _wrap_wxGDIObject_GetVisible, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxGDIObject", (PyCFunction) _wrap_delete_wxGDIObject, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGDIObject", (PyCFunction) _wrap_new_wxGDIObject, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDCFromDC", (PyCFunction) _wrap_wxMemoryDCFromDC, METH_VARARGS | METH_KEYWORDS }, { "wxNamedColour", (PyCFunction) _wrap_wxNamedColour, METH_VARARGS | METH_KEYWORDS }, { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, @@ -9351,6 +10785,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxGDIObject","_class_wxRegion",SwigwxRegionTowxGDIObject}, + { "_wxGDIObject","_wxRegion",SwigwxRegionTowxGDIObject}, + { "_wxGDIObject","_class_wxPalette",SwigwxPaletteTowxGDIObject}, + { "_wxGDIObject","_wxPalette",SwigwxPaletteTowxGDIObject}, + { "_wxGDIObject","_class_wxBrush",SwigwxBrushTowxGDIObject}, + { "_wxGDIObject","_wxBrush",SwigwxBrushTowxGDIObject}, + { "_wxGDIObject","_class_wxPen",SwigwxPenTowxGDIObject}, + { "_wxGDIObject","_wxPen",SwigwxPenTowxGDIObject}, + { "_wxGDIObject","_class_wxFont",SwigwxFontTowxGDIObject}, + { "_wxGDIObject","_wxFont",SwigwxFontTowxGDIObject}, + { "_wxGDIObject","_class_wxCursor",SwigwxCursorTowxGDIObject}, + { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, + { "_wxGDIObject","_class_wxIcon",SwigwxIconTowxGDIObject}, + { "_wxGDIObject","_wxIcon",SwigwxIconTowxGDIObject}, + { "_wxGDIObject","_class_wxBitmap",SwigwxBitmapTowxGDIObject}, + { "_wxGDIObject","_wxBitmap",SwigwxBitmapTowxGDIObject}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, { "_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, { "_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC}, @@ -9364,6 +10815,53 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_wxDC","_class_wxDC",0}, + { "_class_wxObject","_class_wxRegionIterator",SwigwxRegionIteratorTowxObject}, + { "_class_wxObject","_wxRegionIterator",SwigwxRegionIteratorTowxObject}, + { "_class_wxObject","_class_wxRegion",SwigwxRegionTowxObject}, + { "_class_wxObject","_wxRegion",SwigwxRegionTowxObject}, + { "_class_wxObject","_class_wxImageList",SwigwxImageListTowxObject}, + { "_class_wxObject","_wxImageList",SwigwxImageListTowxObject}, + { "_class_wxObject","_class_wxPalette",SwigwxPaletteTowxObject}, + { "_class_wxObject","_wxPalette",SwigwxPaletteTowxObject}, + { "_class_wxObject","_class_wxMetaFileDC",SwigwxMetaFileDCTowxObject}, + { "_class_wxObject","_wxMetaFileDC",SwigwxMetaFileDCTowxObject}, + { "_class_wxObject","_class_wxWindowDC",SwigwxWindowDCTowxObject}, + { "_class_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, + { "_class_wxObject","_class_wxPaintDC",SwigwxPaintDCTowxObject}, + { "_class_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, + { "_class_wxObject","_class_wxClientDC",SwigwxClientDCTowxObject}, + { "_class_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, + { "_class_wxObject","_class_wxScreenDC",SwigwxScreenDCTowxObject}, + { "_class_wxObject","_wxScreenDC",SwigwxScreenDCTowxObject}, + { "_class_wxObject","_class_wxMemoryDC",SwigwxMemoryDCTowxObject}, + { "_class_wxObject","_wxMemoryDC",SwigwxMemoryDCTowxObject}, + { "_class_wxObject","_class_wxDC",SwigwxDCTowxObject}, + { "_class_wxObject","_wxDC",SwigwxDCTowxObject}, + { "_class_wxObject","_class_wxBrush",SwigwxBrushTowxObject}, + { "_class_wxObject","_wxBrush",SwigwxBrushTowxObject}, + { "_class_wxObject","_class_wxPenList",SwigwxPenListTowxObject}, + { "_class_wxObject","_wxPenList",SwigwxPenListTowxObject}, + { "_class_wxObject","_class_wxPen",SwigwxPenTowxObject}, + { "_class_wxObject","_wxPen",SwigwxPenTowxObject}, + { "_class_wxObject","_class_wxColourDatabase",SwigwxColourDatabaseTowxObject}, + { "_class_wxObject","_wxColourDatabase",SwigwxColourDatabaseTowxObject}, + { "_class_wxObject","_class_wxColour",SwigwxColourTowxObject}, + { "_class_wxObject","_wxColour",SwigwxColourTowxObject}, + { "_class_wxObject","_class_wxFontList",SwigwxFontListTowxObject}, + { "_class_wxObject","_wxFontList",SwigwxFontListTowxObject}, + { "_class_wxObject","_class_wxFont",SwigwxFontTowxObject}, + { "_class_wxObject","_wxFont",SwigwxFontTowxObject}, + { "_class_wxObject","_class_wxCursor",SwigwxCursorTowxObject}, + { "_class_wxObject","_wxCursor",SwigwxCursorTowxObject}, + { "_class_wxObject","_class_wxIcon",SwigwxIconTowxObject}, + { "_class_wxObject","_wxIcon",SwigwxIconTowxObject}, + { "_class_wxObject","_class_wxMask",SwigwxMaskTowxObject}, + { "_class_wxObject","_wxMask",SwigwxMaskTowxObject}, + { "_class_wxObject","_class_wxBitmap",SwigwxBitmapTowxObject}, + { "_class_wxObject","_wxBitmap",SwigwxBitmapTowxObject}, + { "_class_wxObject","_class_wxGDIObject",SwigwxGDIObjectTowxObject}, + { "_class_wxObject","_wxGDIObject",SwigwxGDIObjectTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -9434,6 +10932,53 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxRegionIterator",SwigwxRegionIteratorTowxObject}, + { "_wxObject","_wxRegionIterator",SwigwxRegionIteratorTowxObject}, + { "_wxObject","_class_wxRegion",SwigwxRegionTowxObject}, + { "_wxObject","_wxRegion",SwigwxRegionTowxObject}, + { "_wxObject","_class_wxImageList",SwigwxImageListTowxObject}, + { "_wxObject","_wxImageList",SwigwxImageListTowxObject}, + { "_wxObject","_class_wxPalette",SwigwxPaletteTowxObject}, + { "_wxObject","_wxPalette",SwigwxPaletteTowxObject}, + { "_wxObject","_class_wxMetaFileDC",SwigwxMetaFileDCTowxObject}, + { "_wxObject","_wxMetaFileDC",SwigwxMetaFileDCTowxObject}, + { "_wxObject","_class_wxWindowDC",SwigwxWindowDCTowxObject}, + { "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, + { "_wxObject","_class_wxPaintDC",SwigwxPaintDCTowxObject}, + { "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, + { "_wxObject","_class_wxClientDC",SwigwxClientDCTowxObject}, + { "_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, + { "_wxObject","_class_wxScreenDC",SwigwxScreenDCTowxObject}, + { "_wxObject","_wxScreenDC",SwigwxScreenDCTowxObject}, + { "_wxObject","_class_wxMemoryDC",SwigwxMemoryDCTowxObject}, + { "_wxObject","_wxMemoryDC",SwigwxMemoryDCTowxObject}, + { "_wxObject","_class_wxDC",SwigwxDCTowxObject}, + { "_wxObject","_wxDC",SwigwxDCTowxObject}, + { "_wxObject","_class_wxBrush",SwigwxBrushTowxObject}, + { "_wxObject","_wxBrush",SwigwxBrushTowxObject}, + { "_wxObject","_class_wxPenList",SwigwxPenListTowxObject}, + { "_wxObject","_wxPenList",SwigwxPenListTowxObject}, + { "_wxObject","_class_wxPen",SwigwxPenTowxObject}, + { "_wxObject","_wxPen",SwigwxPenTowxObject}, + { "_wxObject","_class_wxColourDatabase",SwigwxColourDatabaseTowxObject}, + { "_wxObject","_wxColourDatabase",SwigwxColourDatabaseTowxObject}, + { "_wxObject","_class_wxColour",SwigwxColourTowxObject}, + { "_wxObject","_wxColour",SwigwxColourTowxObject}, + { "_wxObject","_class_wxFontList",SwigwxFontListTowxObject}, + { "_wxObject","_wxFontList",SwigwxFontListTowxObject}, + { "_wxObject","_class_wxFont",SwigwxFontTowxObject}, + { "_wxObject","_wxFont",SwigwxFontTowxObject}, + { "_wxObject","_class_wxCursor",SwigwxCursorTowxObject}, + { "_wxObject","_wxCursor",SwigwxCursorTowxObject}, + { "_wxObject","_class_wxIcon",SwigwxIconTowxObject}, + { "_wxObject","_wxIcon",SwigwxIconTowxObject}, + { "_wxObject","_class_wxMask",SwigwxMaskTowxObject}, + { "_wxObject","_wxMask",SwigwxMaskTowxObject}, + { "_wxObject","_class_wxBitmap",SwigwxBitmapTowxObject}, + { "_wxObject","_wxBitmap",SwigwxBitmapTowxObject}, + { "_wxObject","_class_wxGDIObject",SwigwxGDIObjectTowxObject}, + { "_wxObject","_wxGDIObject",SwigwxGDIObjectTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -9467,6 +11012,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_class_wxRegion",SwigwxRegionTowxGDIObject}, + { "_class_wxGDIObject","_wxRegion",SwigwxRegionTowxGDIObject}, + { "_class_wxGDIObject","_class_wxPalette",SwigwxPaletteTowxGDIObject}, + { "_class_wxGDIObject","_wxPalette",SwigwxPaletteTowxGDIObject}, + { "_class_wxGDIObject","_class_wxBrush",SwigwxBrushTowxGDIObject}, + { "_class_wxGDIObject","_wxBrush",SwigwxBrushTowxGDIObject}, + { "_class_wxGDIObject","_class_wxPen",SwigwxPenTowxGDIObject}, + { "_class_wxGDIObject","_wxPen",SwigwxPenTowxGDIObject}, + { "_class_wxGDIObject","_class_wxFont",SwigwxFontTowxGDIObject}, + { "_class_wxGDIObject","_wxFont",SwigwxFontTowxGDIObject}, + { "_class_wxGDIObject","_class_wxCursor",SwigwxCursorTowxGDIObject}, + { "_class_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, + { "_class_wxGDIObject","_class_wxIcon",SwigwxIconTowxGDIObject}, + { "_class_wxGDIObject","_wxIcon",SwigwxIconTowxGDIObject}, + { "_class_wxGDIObject","_class_wxBitmap",SwigwxBitmapTowxGDIObject}, + { "_class_wxGDIObject","_wxBitmap",SwigwxBitmapTowxGDIObject}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, @@ -9603,6 +11165,9 @@ SWIGEXPORT(void) initgdic() { PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); + PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); + PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); + PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 4764d06170..6387dff88c 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -2,7 +2,33 @@ import gdic from misc import * -class wxBitmapPtr : +class wxGDIObjectPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxGDIObject(self) + def GetVisible(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_GetVisible,(self,) + _args, _kwargs) + return val + def SetVisible(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_SetVisible,(self,) + _args, _kwargs) + return val + def IsNull(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_IsNull,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGDIObject(wxGDIObjectPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxGDIObject,_args,_kwargs) + self.thisown = 1 + + + + +class wxBitmapPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -93,7 +119,7 @@ class wxBitmap(wxBitmapPtr): -class wxMaskPtr : +class wxMaskPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -110,7 +136,7 @@ class wxMask(wxMaskPtr): -class wxIconPtr : +class wxIconPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -171,7 +197,7 @@ class wxIcon(wxIconPtr): -class wxCursorPtr : +class wxCursorPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -218,7 +244,7 @@ class wxCursor(wxCursorPtr): -class wxFontPtr : +class wxFontPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -292,7 +318,7 @@ class wxFont(wxFontPtr): -class wxFontListPtr : +class wxFontListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -315,7 +341,7 @@ class wxFontList(wxFontListPtr): -class wxColourPtr : +class wxColourPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -353,7 +379,7 @@ class wxColour(wxColourPtr): -class wxColourDatabasePtr : +class wxColourDatabasePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -376,7 +402,7 @@ class wxColourDatabase(wxColourDatabasePtr): -class wxPenPtr : +class wxPenPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -440,7 +466,7 @@ class wxPen(wxPenPtr): -class wxPenListPtr : +class wxPenListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -463,7 +489,7 @@ class wxPenList(wxPenListPtr): -class wxBrushPtr : +class wxBrushPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -526,7 +552,7 @@ class wxBrushList(wxBrushListPtr): -class wxDCPtr : +class wxDCPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -903,7 +929,7 @@ class wxMetaFileDC(wxMetaFileDCPtr): -class wxPalettePtr : +class wxPalettePtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -929,7 +955,7 @@ class wxPalette(wxPalettePtr): -class wxImageListPtr : +class wxImageListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -973,6 +999,129 @@ class wxImageList(wxImageListPtr): +class wxRegionPtr(wxGDIObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxRegion(self) + def Clear(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Clear,(self,) + _args, _kwargs) + return val + def Contains(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Contains,(self,) + _args, _kwargs) + return val + def ContainsPoint(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsPoint,(self,) + _args, _kwargs) + return val + def ContainsRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsRect,(self,) + _args, _kwargs) + return val + def ContainsRectDim(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsRectDim,(self,) + _args, _kwargs) + return val + def GetBox(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_GetBox,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def Intersect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Intersect,(self,) + _args, _kwargs) + return val + def IntersectRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IntersectRect,(self,) + _args, _kwargs) + return val + def IntersectRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IntersectRegion,(self,) + _args, _kwargs) + return val + def IsEmpty(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IsEmpty,(self,) + _args, _kwargs) + return val + def Union(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Union,(self,) + _args, _kwargs) + return val + def UnionRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_UnionRect,(self,) + _args, _kwargs) + return val + def UnionRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_UnionRegion,(self,) + _args, _kwargs) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Subtract,(self,) + _args, _kwargs) + return val + def SubtractRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_SubtractRect,(self,) + _args, _kwargs) + return val + def SubtractRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_SubtractRegion,(self,) + _args, _kwargs) + return val + def Xor(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Xor,(self,) + _args, _kwargs) + return val + def XorRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_XorRect,(self,) + _args, _kwargs) + return val + def XorRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_XorRegion,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxRegion(wxRegionPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxRegion,_args,_kwargs) + self.thisown = 1 + + + + +class wxRegionIteratorPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxRegionIterator(self) + def GetX(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetX,(self,) + _args, _kwargs) + return val + def GetY(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetY,(self,) + _args, _kwargs) + return val + def GetW(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetW,(self,) + _args, _kwargs) + return val + def GetWidth(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetWidth,(self,) + _args, _kwargs) + return val + def GetH(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetH,(self,) + _args, _kwargs) + return val + def GetHeight(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetHeight,(self,) + _args, _kwargs) + return val + def GetRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def HaveRects(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_HaveRects,(self,) + _args, _kwargs) + return val + def Reset(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_Reset,(self,) + _args, _kwargs) + return val + def Next(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_Next,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxRegionIterator(wxRegionIteratorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxRegionIterator,_args,_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -1117,3 +1266,6 @@ wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE +wxOutRegion = gdic.wxOutRegion +wxPartRegion = gdic.wxPartRegion +wxInRegion = gdic.wxInRegion diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index aacc18c923..59289303b2 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -110,27 +110,27 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; #endif -#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ - wxGridCellAttr* CBNAME(int a, int b) { \ - wxGridCellAttr* rval = NULL; \ - bool doSave = wxPyRestoreThread(); \ - if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ - PyObject* ro; \ - wxGridCellAttr* ptr; \ - ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ - if (ro) { \ +#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iii)", a, b, c)); \ + if (ro) { \ if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ - rval = ptr; \ - Py_DECREF(ro); \ - } \ - } \ - else \ - rval = PCLASS::CBNAME(a, b); \ - wxPySaveThread(doSave); \ - return rval; \ - } \ - wxGridCellAttr *base_##CBNAME(int a, int b) { \ - return PCLASS::CBNAME(a, b); \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b, c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ + return PCLASS::CBNAME(a, b, c); \ } @@ -681,7 +681,7 @@ class wxPyGridCellAttrProvider : public wxGridCellAttrProvider public: wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; - PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridCellAttrProvider, GetAttr); PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); @@ -712,7 +712,7 @@ public: PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); - PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK_GCA_INTINTKIND(wxGridTableBase, GetAttr); PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); @@ -1549,7 +1549,6 @@ static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *arg wxGridCellEditor * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetControl",_kwnames,&_argo0)) @@ -1566,13 +1565,7 @@ static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *arg _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2847,6 +2840,42 @@ static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxGridCellAttr_MergeWith(_swigobj,_swigarg0) (_swigobj->MergeWith(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_MergeWith(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellAttr * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","mergefrom", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_MergeWith",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_MergeWith. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_MergeWith. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_MergeWith(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGridCellAttr_IncRef(_swigobj) (_swigobj->IncRef()) static PyObject *_wrap_wxGridCellAttr_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3138,6 +3167,34 @@ static PyObject *_wrap_wxGridCellAttr_SetEditor(PyObject *self, PyObject *args, return _resultobj; } +#define wxGridCellAttr_SetKind(_swigobj,_swigarg0) (_swigobj->SetKind(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetKind(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellAttr::wxAttrKind _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","kind", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellAttr_SetKind",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetKind. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetKind(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGridCellAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) static PyObject *_wrap_wxGridCellAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3300,6 +3357,33 @@ static PyObject *_wrap_wxGridCellAttr_HasEditor(PyObject *self, PyObject *args, return _resultobj; } +#define wxGridCellAttr_HasReadWriteMode(_swigobj) (_swigobj->HasReadWriteMode()) +static PyObject *_wrap_wxGridCellAttr_HasReadWriteMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasReadWriteMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasReadWriteMode. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasReadWriteMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGridCellAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3630,19 +3714,20 @@ static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args return _resultobj; } -#define wxGridCellAttrProvider_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +#define wxGridCellAttrProvider_GetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetAttr(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGridCellAttr * _result; wxGridCellAttrProvider * _arg0; int _arg1; int _arg2; + wxGridCellAttr::wxAttrKind _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; + char *_kwnames[] = { "self","row","col","kind", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridCellAttrProvider_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3653,7 +3738,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2); + _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -3906,19 +3991,20 @@ static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObjec return _resultobj; } -#define wxPyGridCellAttrProvider_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +#define wxPyGridCellAttrProvider_base_GetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_GetAttr(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGridCellAttr * _result; wxPyGridCellAttrProvider * _arg0; int _arg1; int _arg2; + wxGridCellAttr::wxAttrKind _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; + char *_kwnames[] = { "self","row","col","kind", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridCellAttrProvider_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxPyGridCellAttrProvider_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3929,7 +4015,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyO } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2); + _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4054,6 +4140,14 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetColAttr(PyObject *self, return _resultobj; } +static void *SwigwxGridTableBaseTowxObject(void *ptr) { + wxGridTableBase *src; + wxObject *dest; + src = (wxGridTableBase *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxGridTableBase_SetAttrProvider(_swigobj,_swigarg0) (_swigobj->SetAttrProvider(_swigarg0)) static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4167,7 +4261,6 @@ static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, P wxGridTableBase * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetView",_kwnames,&_argo0)) @@ -4184,13 +4277,7 @@ static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, P _result = (wxGrid *)wxGridTableBase_GetView(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5079,19 +5166,20 @@ static PyObject *_wrap_wxGridTableBase_CanHaveAttributes(PyObject *self, PyObjec return _resultobj; } -#define wxGridTableBase_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +#define wxGridTableBase_GetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetAttr(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGridCellAttr * _result; wxGridTableBase * _arg0; int _arg1; int _arg2; + wxGridCellAttr::wxAttrKind _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; + char *_kwnames[] = { "self","row","col","kind", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridTableBase_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5102,7 +5190,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, P } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2); + _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -5235,6 +5323,14 @@ static void *SwigwxPyGridTableBaseTowxGridTableBase(void *ptr) { return (void *) dest; } +static void *SwigwxPyGridTableBaseTowxObject(void *ptr) { + wxPyGridTableBase *src; + wxObject *dest; + src = (wxPyGridTableBase *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyGridTableBase() (new wxPyGridTableBase()) static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5860,19 +5956,20 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanHaveAttributes(PyObject *self, return _resultobj; } -#define wxPyGridTableBase_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +#define wxPyGridTableBase_base_GetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_GetAttr(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGridCellAttr * _result; wxPyGridTableBase * _arg0; int _arg1; int _arg2; + wxGridCellAttr::wxAttrKind _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; + char *_kwnames[] = { "self","row","col","kind", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridTableBase_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxPyGridTableBase_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5883,7 +5980,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2); + _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -6016,6 +6113,14 @@ static void *SwigwxGridStringTableTowxGridTableBase(void *ptr) { return (void *) dest; } +static void *SwigwxGridStringTableTowxObject(void *ptr) { + wxGridStringTable *src; + wxObject *dest; + src = (wxGridStringTable *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGridStringTable(_swigarg0,_swigarg1) (new wxGridStringTable(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxGridStringTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6150,7 +6255,6 @@ static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObjec wxGridTableMessage * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetTableObject",_kwnames,&_argo0)) @@ -6167,13 +6271,7 @@ static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObjec _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -6639,6 +6737,14 @@ static void *SwigwxGridTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxGridTowxObject(void *ptr) { + wxGrid *src; + wxObject *dest; + src = (wxGrid *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6849,7 +6955,6 @@ static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject wxGrid * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetTable",_kwnames,&_argo0)) @@ -6866,13 +6971,7 @@ static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8791,6 +8890,60 @@ static PyObject *_wrap_wxGrid_GetCellHighlightColour(PyObject *self, PyObject *a return _resultobj; } +#define wxGrid_GetCellHighlightPenWidth(_swigobj) (_swigobj->GetCellHighlightPenWidth()) +static PyObject *_wrap_wxGrid_GetCellHighlightPenWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCellHighlightPenWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellHighlightPenWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetCellHighlightPenWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetCellHighlightROPenWidth(_swigobj) (_swigobj->GetCellHighlightROPenWidth()) +static PyObject *_wrap_wxGrid_GetCellHighlightROPenWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCellHighlightROPenWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellHighlightROPenWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetCellHighlightROPenWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGrid_SetRowLabelSize(_swigobj,_swigarg0) (_swigobj->SetRowLabelSize(_swigarg0)) static PyObject *_wrap_wxGrid_SetRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9185,6 +9338,62 @@ static PyObject *_wrap_wxGrid_SetCellHighlightColour(PyObject *self, PyObject *a return _resultobj; } +#define wxGrid_SetCellHighlightPenWidth(_swigobj,_swigarg0) (_swigobj->SetCellHighlightPenWidth(_swigarg0)) +static PyObject *_wrap_wxGrid_SetCellHighlightPenWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetCellHighlightPenWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellHighlightPenWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellHighlightPenWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellHighlightROPenWidth(_swigobj,_swigarg0) (_swigobj->SetCellHighlightROPenWidth(_swigarg0)) +static PyObject *_wrap_wxGrid_SetCellHighlightROPenWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetCellHighlightROPenWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellHighlightROPenWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellHighlightROPenWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGrid_EnableDragRowSize(_swigobj,_swigarg0) (_swigobj->EnableDragRowSize(_swigarg0)) static PyObject *_wrap_wxGrid_EnableDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11794,6 +12003,114 @@ static PyObject *_wrap_wxGrid_SetMargins(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxGrid_GetGridWindow(_swigobj) (_swigobj->GetGridWindow()) +static PyObject *_wrap_wxGrid_GetGridWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridWindow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGrid_GetGridWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxGrid_GetGridRowLabelWindow(_swigobj) (_swigobj->GetGridRowLabelWindow()) +static PyObject *_wrap_wxGrid_GetGridRowLabelWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridRowLabelWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridRowLabelWindow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGrid_GetGridRowLabelWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxGrid_GetGridColLabelWindow(_swigobj) (_swigobj->GetGridColLabelWindow()) +static PyObject *_wrap_wxGrid_GetGridColLabelWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridColLabelWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridColLabelWindow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGrid_GetGridColLabelWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxGrid_GetGridCornerLabelWindow(_swigobj) (_swigobj->GetGridCornerLabelWindow()) +static PyObject *_wrap_wxGrid_GetGridCornerLabelWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridCornerLabelWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridCornerLabelWindow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGrid_GetGridCornerLabelWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static void *SwigwxGridEventTowxNotifyEvent(void *ptr) { wxGridEvent *src; wxNotifyEvent *dest; @@ -11818,6 +12135,14 @@ static void *SwigwxGridEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxGridEventTowxObject(void *ptr) { + wxGridEvent *src; + wxObject *dest; + src = (wxGridEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11) (new wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11)) static PyObject *_wrap_new_wxGridEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -12115,6 +12440,14 @@ static void *SwigwxGridSizeEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxGridSizeEventTowxObject(void *ptr) { + wxGridSizeEvent *src; + wxObject *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) static PyObject *_wrap_new_wxGridSizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -12354,6 +12687,14 @@ static void *SwigwxGridRangeSelectEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxGridRangeSelectEventTowxObject(void *ptr) { + wxGridRangeSelectEvent *src; + wxObject *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) static PyObject *_wrap_new_wxGridRangeSelectEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -12751,6 +13092,10 @@ static PyMethodDef gridcMethods[] = { { "wxGridEvent_GetCol", (PyCFunction) _wrap_wxGridEvent_GetCol, METH_VARARGS | METH_KEYWORDS }, { "wxGridEvent_GetRow", (PyCFunction) _wrap_wxGridEvent_GetRow, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridEvent", (PyCFunction) _wrap_new_wxGridEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridCornerLabelWindow", (PyCFunction) _wrap_wxGrid_GetGridCornerLabelWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridColLabelWindow", (PyCFunction) _wrap_wxGrid_GetGridColLabelWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridRowLabelWindow", (PyCFunction) _wrap_wxGrid_GetGridRowLabelWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridWindow", (PyCFunction) _wrap_wxGrid_GetGridWindow, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetMargins", (PyCFunction) _wrap_wxGrid_SetMargins, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetDefaultRendererForType", (PyCFunction) _wrap_wxGrid_GetDefaultRendererForType, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetDefaultEditorForType", (PyCFunction) _wrap_wxGrid_GetDefaultEditorForType, METH_VARARGS | METH_KEYWORDS }, @@ -12829,6 +13174,8 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_CanDragRowSize", (PyCFunction) _wrap_wxGrid_CanDragRowSize, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_DisableDragRowSize", (PyCFunction) _wrap_wxGrid_DisableDragRowSize, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_EnableDragRowSize", (PyCFunction) _wrap_wxGrid_EnableDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellHighlightROPenWidth", (PyCFunction) _wrap_wxGrid_SetCellHighlightROPenWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellHighlightPenWidth", (PyCFunction) _wrap_wxGrid_SetCellHighlightPenWidth, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetCellHighlightColour", (PyCFunction) _wrap_wxGrid_SetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetGridLineColour", (PyCFunction) _wrap_wxGrid_SetGridLineColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetColLabelValue", (PyCFunction) _wrap_wxGrid_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, @@ -12840,6 +13187,8 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_SetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_SetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetColLabelSize", (PyCFunction) _wrap_wxGrid_SetColLabelSize, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetRowLabelSize", (PyCFunction) _wrap_wxGrid_SetRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellHighlightROPenWidth", (PyCFunction) _wrap_wxGrid_GetCellHighlightROPenWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellHighlightPenWidth", (PyCFunction) _wrap_wxGrid_GetCellHighlightPenWidth, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetCellHighlightColour", (PyCFunction) _wrap_wxGrid_GetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetGridLineColour", (PyCFunction) _wrap_wxGrid_GetGridLineColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetColLabelValue", (PyCFunction) _wrap_wxGrid_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, @@ -13004,12 +13353,14 @@ static PyMethodDef gridcMethods[] = { { "wxGridCellAttr_GetFont", (PyCFunction) _wrap_wxGridCellAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_GetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_GetTextColour", (PyCFunction) _wrap_wxGridCellAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasReadWriteMode", (PyCFunction) _wrap_wxGridCellAttr_HasReadWriteMode, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasEditor", (PyCFunction) _wrap_wxGridCellAttr_HasEditor, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasRenderer", (PyCFunction) _wrap_wxGridCellAttr_HasRenderer, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasAlignment", (PyCFunction) _wrap_wxGridCellAttr_HasAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasFont", (PyCFunction) _wrap_wxGridCellAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasTextColour", (PyCFunction) _wrap_wxGridCellAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetKind", (PyCFunction) _wrap_wxGridCellAttr_SetKind, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_SetEditor", (PyCFunction) _wrap_wxGridCellAttr_SetEditor, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_SetRenderer", (PyCFunction) _wrap_wxGridCellAttr_SetRenderer, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_SetReadOnly", (PyCFunction) _wrap_wxGridCellAttr_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, @@ -13019,6 +13370,7 @@ static PyMethodDef gridcMethods[] = { { "wxGridCellAttr_SetTextColour", (PyCFunction) _wrap_wxGridCellAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_DecRef", (PyCFunction) _wrap_wxGridCellAttr_DecRef, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_IncRef", (PyCFunction) _wrap_wxGridCellAttr_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_MergeWith", (PyCFunction) _wrap_wxGridCellAttr_MergeWith, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_Clone", (PyCFunction) _wrap_wxGridCellAttr_Clone, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridCellAttr", (PyCFunction) _wrap_new_wxGridCellAttr, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridCellChoiceEditor", (PyCFunction) _wrap_new_wxGridCellChoiceEditor, METH_VARARGS | METH_KEYWORDS }, @@ -13163,10 +13515,26 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxGauge","_wxGauge",0}, { "_wxGridCellCoords","_class_wxGridCellCoords",0}, { "_wxGridCellNumberRenderer","_class_wxGridCellNumberRenderer",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxGridSizeEvent","_wxGridSizeEvent",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_class_wxGridCellBoolEditor","_wxGridCellBoolEditor",0}, + { "_class_wxObject","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxObject}, + { "_class_wxObject","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxObject}, + { "_class_wxObject","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxObject}, + { "_class_wxObject","_wxGridSizeEvent",SwigwxGridSizeEventTowxObject}, + { "_class_wxObject","_class_wxGridEvent",SwigwxGridEventTowxObject}, + { "_class_wxObject","_wxGridEvent",SwigwxGridEventTowxObject}, + { "_class_wxObject","_class_wxGrid",SwigwxGridTowxObject}, + { "_class_wxObject","_wxGrid",SwigwxGridTowxObject}, + { "_class_wxObject","_class_wxGridStringTable",SwigwxGridStringTableTowxObject}, + { "_class_wxObject","_wxGridStringTable",SwigwxGridStringTableTowxObject}, + { "_class_wxObject","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxObject}, + { "_class_wxObject","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxObject}, + { "_class_wxObject","_class_wxGridTableBase",SwigwxGridTableBaseTowxObject}, + { "_class_wxObject","_wxGridTableBase",SwigwxGridTableBaseTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_WXGRIDSELECTIONMODES",0}, { "_size_t","_wxCoord",0}, @@ -13395,6 +13763,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_wxGridCellBoolEditor","_class_wxGridCellBoolEditor",0}, + { "_wxObject","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxObject}, + { "_wxObject","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxObject}, + { "_wxObject","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxObject}, + { "_wxObject","_wxGridSizeEvent",SwigwxGridSizeEventTowxObject}, + { "_wxObject","_class_wxGridEvent",SwigwxGridEventTowxObject}, + { "_wxObject","_wxGridEvent",SwigwxGridEventTowxObject}, + { "_wxObject","_class_wxGrid",SwigwxGridTowxObject}, + { "_wxObject","_wxGrid",SwigwxGridTowxObject}, + { "_wxObject","_class_wxGridStringTable",SwigwxGridStringTableTowxObject}, + { "_wxObject","_wxGridStringTable",SwigwxGridStringTableTowxObject}, + { "_wxObject","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxObject}, + { "_wxObject","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxObject}, + { "_wxObject","_class_wxGridTableBase",SwigwxGridTableBaseTowxObject}, + { "_wxObject","_wxGridTableBase",SwigwxGridTableBaseTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -13454,6 +13837,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_WXGRIDSELECTIONMODES",0}, { "_int","_wxCoord",0}, @@ -13641,6 +14025,12 @@ SWIGEXPORT(void) initgridc() { wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); + PyDict_SetItemString(d,"wxGridCellAttr_Any", PyInt_FromLong((long) wxGridCellAttr::Any)); + PyDict_SetItemString(d,"wxGridCellAttr_Default", PyInt_FromLong((long) wxGridCellAttr::Default)); + PyDict_SetItemString(d,"wxGridCellAttr_Cell", PyInt_FromLong((long) wxGridCellAttr::Cell)); + PyDict_SetItemString(d,"wxGridCellAttr_Row", PyInt_FromLong((long) wxGridCellAttr::Row)); + PyDict_SetItemString(d,"wxGridCellAttr_Col", PyInt_FromLong((long) wxGridCellAttr::Col)); + PyDict_SetItemString(d,"wxGridCellAttr_Merged", PyInt_FromLong((long) wxGridCellAttr::Merged)); PyDict_SetItemString(d,"wxGrid_wxGridSelectCells", PyInt_FromLong((long) wxGrid::wxGridSelectCells)); PyDict_SetItemString(d,"wxGrid_wxGridSelectRows", PyInt_FromLong((long) wxGrid::wxGridSelectRows)); PyDict_SetItemString(d,"wxGrid_wxGridSelectColumns", PyInt_FromLong((long) wxGrid::wxGridSelectColumns)); diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 2ae95724da..761152947a 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -191,7 +191,6 @@ class wxGridCellEditorPtr : return val def GetControl(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_GetControl,(self,) + _args, _kwargs) - if val: val = wxControlPtr(val) return val def SetControl(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs) @@ -370,6 +369,12 @@ class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr): class wxGridCellAttrPtr : + Any = gridc.wxGridCellAttr_Any + Default = gridc.wxGridCellAttr_Default + Cell = gridc.wxGridCellAttr_Cell + Row = gridc.wxGridCellAttr_Row + Col = gridc.wxGridCellAttr_Col + Merged = gridc.wxGridCellAttr_Merged def __init__(self,this): self.this = this self.thisown = 0 @@ -377,6 +382,9 @@ class wxGridCellAttrPtr : val = apply(gridc.wxGridCellAttr_Clone,(self,) + _args, _kwargs) if val: val = wxGridCellAttrPtr(val) return val + def MergeWith(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_MergeWith,(self,) + _args, _kwargs) + return val def IncRef(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_IncRef,(self,) + _args, _kwargs) return val @@ -404,6 +412,9 @@ class wxGridCellAttrPtr : def SetEditor(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_SetEditor,(self,) + _args, _kwargs) return val + def SetKind(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetKind,(self,) + _args, _kwargs) + return val def HasTextColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_HasTextColour,(self,) + _args, _kwargs) return val @@ -422,6 +433,9 @@ class wxGridCellAttrPtr : def HasEditor(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_HasEditor,(self,) + _args, _kwargs) return val + def HasReadWriteMode(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasReadWriteMode,(self,) + _args, _kwargs) + return val def GetTextColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) @@ -525,7 +539,7 @@ class wxPyGridCellAttrProvider(wxPyGridCellAttrProviderPtr): -class wxGridTableBasePtr : +class wxGridTableBasePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -541,7 +555,6 @@ class wxGridTableBasePtr : return val def GetView(self, *_args, **_kwargs): val = apply(gridc.wxGridTableBase_GetView,(self,) + _args, _kwargs) - if val: val = wxGridPtr(val) return val def GetNumberRows(self, *_args, **_kwargs): val = apply(gridc.wxGridTableBase_GetNumberRows,(self,) + _args, _kwargs) @@ -748,7 +761,6 @@ class wxGridTableMessagePtr : return val def GetTableObject(self, *_args, **_kwargs): val = apply(gridc.wxGridTableMessage_GetTableObject,(self,) + _args, _kwargs) - if val: val = wxGridTableBasePtr(val) return val def SetId(self, *_args, **_kwargs): val = apply(gridc.wxGridTableMessage_SetId,(self,) + _args, _kwargs) @@ -842,7 +854,6 @@ class wxGridPtr(wxScrolledWindowPtr): return val def GetTable(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetTable,(self,) + _args, _kwargs) - if val: val = wxGridTableBasePtr(val) return val def SetTable(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetTable,(self,) + _args, _kwargs) @@ -1031,6 +1042,12 @@ class wxGridPtr(wxScrolledWindowPtr): val = apply(gridc.wxGrid_GetCellHighlightColour,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 return val + def GetCellHighlightPenWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellHighlightPenWidth,(self,) + _args, _kwargs) + return val + def GetCellHighlightROPenWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellHighlightROPenWidth,(self,) + _args, _kwargs) + return val def SetRowLabelSize(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetRowLabelSize,(self,) + _args, _kwargs) return val @@ -1064,6 +1081,12 @@ class wxGridPtr(wxScrolledWindowPtr): def SetCellHighlightColour(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetCellHighlightColour,(self,) + _args, _kwargs) return val + def SetCellHighlightPenWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellHighlightPenWidth,(self,) + _args, _kwargs) + return val + def SetCellHighlightROPenWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellHighlightROPenWidth,(self,) + _args, _kwargs) + return val def EnableDragRowSize(self, *_args, **_kwargs): val = apply(gridc.wxGrid_EnableDragRowSize,(self,) + _args, _kwargs) return val @@ -1315,6 +1338,18 @@ class wxGridPtr(wxScrolledWindowPtr): def SetMargins(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetMargins,(self,) + _args, _kwargs) return val + def GetGridWindow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridWindow,(self,) + _args, _kwargs) + return val + def GetGridRowLabelWindow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridRowLabelWindow,(self,) + _args, _kwargs) + return val + def GetGridColLabelWindow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridColLabelWindow,(self,) + _args, _kwargs) + return val + def GetGridCornerLabelWindow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridCornerLabelWindow,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGrid(wxGridPtr): diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index a31bf87815..2e6c8817b7 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -118,6 +118,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #endif class wxPyHtmlTagHandler : public wxHtmlTagHandler { + DECLARE_DYNAMIC_CLASS(wxPyHtmlTagHandler); public: wxPyHtmlTagHandler() : wxHtmlTagHandler() {}; @@ -130,10 +131,13 @@ public: PYPRIVATE; }; +IMPLEMENT_DYNAMIC_CLASS(wxPyHtmlTagHandler, wxHtmlTagHandler); + IMP_PYCALLBACK_STRING__pure(wxPyHtmlTagHandler, wxHtmlTagHandler, GetSupportedTags); IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); class wxPyHtmlWinTagHandler : public wxHtmlWinTagHandler { + DECLARE_DYNAMIC_CLASS(wxPyHtmlWinTagHandler); public: wxPyHtmlWinTagHandler() : wxHtmlWinTagHandler() {}; @@ -147,6 +151,8 @@ public: PYPRIVATE; }; +IMPLEMENT_DYNAMIC_CLASS( wxPyHtmlWinTagHandler, wxHtmlWinTagHandler); + IMP_PYCALLBACK_STRING__pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, GetSupportedTags); IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleTag); @@ -224,7 +230,7 @@ public: IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); - void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { +void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); @@ -295,6 +301,14 @@ static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxHtmlLinkInfoTowxObject(void *ptr) { + wxHtmlLinkInfo *src; + wxObject *dest; + src = (wxHtmlLinkInfo *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlLinkInfo(_swigarg0,_swigarg1) (new wxHtmlLinkInfo(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -440,7 +454,6 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetEvent(PyObject *self, PyObject *args, P wxHtmlLinkInfo * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlLinkInfo_GetEvent",_kwnames,&_argo0)) @@ -457,13 +470,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetEvent(PyObject *self, PyObject *args, P _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMouseEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -573,6 +580,14 @@ static PyObject *_wrap_wxHtmlLinkInfo_SetHtmlCell(PyObject *self, PyObject *args return _resultobj; } +static void *SwigwxHtmlTagTowxObject(void *ptr) { + wxHtmlTag *src; + wxObject *dest; + src = (wxHtmlTag *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxHtmlTag_GetName(_swigobj) (_swigobj->GetName()) static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -880,6 +895,14 @@ static PyObject *_wrap_wxHtmlTag_GetEndPos2(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void *SwigwxHtmlParserTowxObject(void *ptr) { + wxHtmlParser *src; + wxObject *dest; + src = (wxHtmlParser *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxHtmlParser_SetFS(_swigobj,_swigarg0) (_swigobj->SetFS(_swigarg0)) static PyObject *_wrap_wxHtmlParser_SetFS(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -923,7 +946,6 @@ static PyObject *_wrap_wxHtmlParser_GetFS(PyObject *self, PyObject *args, PyObje wxHtmlParser * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_GetFS",_kwnames,&_argo0)) @@ -940,13 +962,7 @@ static PyObject *_wrap_wxHtmlParser_GetFS(PyObject *self, PyObject *args, PyObje _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -959,7 +975,6 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","source", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_Parse",_kwnames,&_argo0,&_obj1)) @@ -994,13 +1009,7 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxObject_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj1) delete _arg1; @@ -1275,6 +1284,14 @@ static void *SwigwxHtmlWinParserTowxHtmlParser(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlWinParserTowxObject(void *ptr) { + wxHtmlWinParser *src; + wxObject *dest; + src = (wxHtmlWinParser *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlWinParser(_swigarg0) (new wxHtmlWinParser(_swigarg0)) static PyObject *_wrap_new_wxHtmlWinParser(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1352,7 +1369,6 @@ static PyObject *_wrap_wxHtmlWinParser_GetDC(PyObject *self, PyObject *args, PyO wxHtmlWinParser * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetDC",_kwnames,&_argo0)) @@ -1369,13 +1385,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetDC(PyObject *self, PyObject *args, PyO _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1440,7 +1450,6 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, wxHtmlWinParser * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetWindow",_kwnames,&_argo0)) @@ -1457,13 +1466,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, _result = (wxWindow *)wxHtmlWinParser_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2282,6 +2285,14 @@ static PyObject *_wrap_wxHtmlWinParser_GetLink(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPyHtmlTagHandlerTowxObject(void *ptr) { + wxPyHtmlTagHandler *src; + wxObject *dest; + src = (wxPyHtmlTagHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlTagHandler() (new wxPyHtmlTagHandler()) static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2458,6 +2469,14 @@ static void *SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyHtmlWinTagHandlerTowxObject(void *ptr) { + wxPyHtmlWinTagHandler *src; + wxObject *dest; + src = (wxPyHtmlWinTagHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlWinTagHandler() (new wxPyHtmlWinTagHandler()) static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2626,6 +2645,14 @@ static PyObject *_wrap_wxHtmlWinTagHandler_ParseInner(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxHtmlCellTowxObject(void *ptr) { + wxHtmlCell *src; + wxObject *dest; + src = (wxHtmlCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlCell() (new wxHtmlCell()) static PyObject *_wrap_new_wxHtmlCell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3243,6 +3270,80 @@ static PyObject *_wrap_wxHtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject return _resultobj; } +static void *SwigwxHtmlWordCellTowxHtmlCell(void *ptr) { + wxHtmlWordCell *src; + wxHtmlCell *dest; + src = (wxHtmlWordCell *) ptr; + dest = (wxHtmlCell *) src; + return (void *) dest; +} + +static void *SwigwxHtmlWordCellTowxObject(void *ptr) { + wxHtmlWordCell *src; + wxObject *dest; + src = (wxHtmlWordCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxHtmlWordCell(_swigarg0,_swigarg1) (new wxHtmlWordCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWordCell * _result; + wxString * _arg0; + wxDC * _arg1; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "word","dc", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxHtmlWordCell",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxHtmlWordCell. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlWordCell *)new_wxHtmlWordCell(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWordCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static void *SwigwxHtmlContainerCellTowxHtmlCell(void *ptr) { wxHtmlContainerCell *src; wxHtmlCell *dest; @@ -3251,6 +3352,14 @@ static void *SwigwxHtmlContainerCellTowxHtmlCell(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlContainerCellTowxObject(void *ptr) { + wxHtmlContainerCell *src; + wxObject *dest; + src = (wxHtmlContainerCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlContainerCell(_swigarg0) (new wxHtmlContainerCell(_swigarg0)) static PyObject *_wrap_new_wxHtmlContainerCell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3767,6 +3876,14 @@ static void *SwigwxHtmlColourCellTowxHtmlCell(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlColourCellTowxObject(void *ptr) { + wxHtmlColourCell *src; + wxObject *dest; + src = (wxHtmlColourCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlColourCell(_swigarg0,_swigarg1) (new wxHtmlColourCell(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3801,6 +3918,56 @@ static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void *SwigwxHtmlFontCellTowxHtmlCell(void *ptr) { + wxHtmlFontCell *src; + wxHtmlCell *dest; + src = (wxHtmlFontCell *) ptr; + dest = (wxHtmlCell *) src; + return (void *) dest; +} + +static void *SwigwxHtmlFontCellTowxObject(void *ptr) { + wxHtmlFontCell *src; + wxObject *dest; + src = (wxHtmlFontCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxHtmlFontCell(_swigarg0) (new wxHtmlFontCell(_swigarg0)) +static PyObject *_wrap_new_wxHtmlFontCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlFontCell * _result; + wxFont * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "font", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxHtmlFontCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlFontCell. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlFontCell *)new_wxHtmlFontCell(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlFontCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxHtmlWidgetCellTowxHtmlCell(void *ptr) { wxHtmlWidgetCell *src; wxHtmlCell *dest; @@ -3809,6 +3976,14 @@ static void *SwigwxHtmlWidgetCellTowxHtmlCell(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlWidgetCellTowxObject(void *ptr) { + wxHtmlWidgetCell *src; + wxObject *dest; + src = (wxHtmlWidgetCell *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlWidgetCell(_swigarg0,_swigarg1) (new wxHtmlWidgetCell(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3876,6 +4051,14 @@ static void *SwigwxPyHtmlWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyHtmlWindowTowxObject(void *ptr) { + wxPyHtmlWindow *src; + wxObject *dest; + src = (wxPyHtmlWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyHtmlWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4210,7 +4393,6 @@ static PyObject *_wrap_wxHtmlWindow_GetRelatedFrame(PyObject *self, PyObject *ar wxPyHtmlWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetRelatedFrame",_kwnames,&_argo0)) @@ -4227,13 +4409,7 @@ static PyObject *_wrap_wxHtmlWindow_GetRelatedFrame(PyObject *self, PyObject *ar _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4819,6 +4995,14 @@ static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *ar return _resultobj; } +static void *SwigwxHtmlDCRendererTowxObject(void *ptr) { + wxHtmlDCRenderer *src; + wxObject *dest; + src = (wxHtmlDCRenderer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlDCRenderer() (new wxHtmlDCRenderer()) static PyObject *_wrap_new_wxHtmlDCRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5082,6 +5266,14 @@ static void *SwigwxHtmlPrintoutTowxPyPrintout(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlPrintoutTowxObject(void *ptr) { + wxHtmlPrintout *src; + wxObject *dest; + src = (wxHtmlPrintout *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlPrintout(_swigarg0) (new wxHtmlPrintout(_swigarg0)) static PyObject *_wrap_new_wxHtmlPrintout(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5374,6 +5566,14 @@ static PyObject *_wrap_wxHtmlPrintout_SetMargins(PyObject *self, PyObject *args, return _resultobj; } +static void *SwigwxHtmlEasyPrintingTowxObject(void *ptr) { + wxHtmlEasyPrinting *src; + wxObject *dest; + src = (wxHtmlEasyPrinting *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlEasyPrinting(_swigarg0,_swigarg1) (new wxHtmlEasyPrinting(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5967,6 +6167,7 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow__setSelf", (PyCFunction) _wrap_wxHtmlWindow__setSelf, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlFontCell", (PyCFunction) _wrap_new_wxHtmlFontCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlColourCell", (PyCFunction) _wrap_new_wxHtmlColourCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_GetFirstCell", (PyCFunction) _wrap_wxHtmlContainerCell_GetFirstCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_SetBorder", (PyCFunction) _wrap_wxHtmlContainerCell_SetBorder, METH_VARARGS | METH_KEYWORDS }, @@ -5984,6 +6185,7 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlContainerCell_SetAlignHor", (PyCFunction) _wrap_wxHtmlContainerCell_SetAlignHor, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_InsertCell", (PyCFunction) _wrap_wxHtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlContainerCell", (PyCFunction) _wrap_new_wxHtmlContainerCell, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlWordCell", (PyCFunction) _wrap_new_wxHtmlWordCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_SetCanLiveOnPagebreak", (PyCFunction) _wrap_wxHtmlCell_SetCanLiveOnPagebreak, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_AdjustPagebreak", (PyCFunction) _wrap_wxHtmlCell_AdjustPagebreak, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_Find", (PyCFunction) _wrap_wxHtmlCell_Find, METH_VARARGS | METH_KEYWORDS }, @@ -6173,6 +6375,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -6182,6 +6385,39 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxHtmlEasyPrinting",SwigwxHtmlEasyPrintingTowxObject}, + { "_class_wxObject","_wxHtmlEasyPrinting",SwigwxHtmlEasyPrintingTowxObject}, + { "_class_wxObject","_class_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject}, + { "_class_wxObject","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject}, + { "_class_wxObject","_class_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject}, + { "_class_wxObject","_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject}, + { "_class_wxObject","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject}, + { "_class_wxObject","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject}, + { "_class_wxObject","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject}, + { "_class_wxObject","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject}, + { "_class_wxObject","_class_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject}, + { "_class_wxObject","_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject}, + { "_class_wxObject","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject}, + { "_class_wxObject","_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject}, + { "_class_wxObject","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxObject}, + { "_class_wxObject","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxObject}, + { "_class_wxObject","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxObject}, + { "_class_wxObject","_wxHtmlWordCell",SwigwxHtmlWordCellTowxObject}, + { "_class_wxObject","_class_wxHtmlCell",SwigwxHtmlCellTowxObject}, + { "_class_wxObject","_wxHtmlCell",SwigwxHtmlCellTowxObject}, + { "_class_wxObject","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxObject}, + { "_class_wxObject","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxObject}, + { "_class_wxObject","_class_wxPyHtmlTagHandler",SwigwxPyHtmlTagHandlerTowxObject}, + { "_class_wxObject","_wxPyHtmlTagHandler",SwigwxPyHtmlTagHandlerTowxObject}, + { "_class_wxObject","_class_wxHtmlWinParser",SwigwxHtmlWinParserTowxObject}, + { "_class_wxObject","_wxHtmlWinParser",SwigwxHtmlWinParserTowxObject}, + { "_class_wxObject","_class_wxHtmlParser",SwigwxHtmlParserTowxObject}, + { "_class_wxObject","_wxHtmlParser",SwigwxHtmlParserTowxObject}, + { "_class_wxObject","_class_wxHtmlTag",SwigwxHtmlTagTowxObject}, + { "_class_wxObject","_wxHtmlTag",SwigwxHtmlTagTowxObject}, + { "_class_wxObject","_class_wxHtmlLinkInfo",SwigwxHtmlLinkInfoTowxObject}, + { "_class_wxObject","_wxHtmlLinkInfo",SwigwxHtmlLinkInfoTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -6271,10 +6507,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_wxHtmlCell","_class_wxHtmlFontCell",SwigwxHtmlFontCellTowxHtmlCell}, + { "_wxHtmlCell","_wxHtmlFontCell",SwigwxHtmlFontCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_wxHtmlCell","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell}, + { "_wxHtmlCell","_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlCell",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, @@ -6382,6 +6622,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, { "_wxListBox","_class_wxListBox",0}, + { "_class_wxHtmlWordCell","_wxHtmlWordCell",0}, { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, @@ -6395,6 +6636,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCaret","_wxCaret",0}, { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxHtmlLinkInfo","_wxHtmlLinkInfo",0}, + { "_class_wxHtmlFontCell","_wxHtmlFontCell",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, { "_class_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, @@ -6427,6 +6669,39 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxHtmlEasyPrinting",SwigwxHtmlEasyPrintingTowxObject}, + { "_wxObject","_wxHtmlEasyPrinting",SwigwxHtmlEasyPrintingTowxObject}, + { "_wxObject","_class_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject}, + { "_wxObject","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject}, + { "_wxObject","_class_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject}, + { "_wxObject","_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject}, + { "_wxObject","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject}, + { "_wxObject","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject}, + { "_wxObject","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject}, + { "_wxObject","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject}, + { "_wxObject","_class_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject}, + { "_wxObject","_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject}, + { "_wxObject","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject}, + { "_wxObject","_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject}, + { "_wxObject","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxObject}, + { "_wxObject","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxObject}, + { "_wxObject","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxObject}, + { "_wxObject","_wxHtmlWordCell",SwigwxHtmlWordCellTowxObject}, + { "_wxObject","_class_wxHtmlCell",SwigwxHtmlCellTowxObject}, + { "_wxObject","_wxHtmlCell",SwigwxHtmlCellTowxObject}, + { "_wxObject","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxObject}, + { "_wxObject","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxObject}, + { "_wxObject","_class_wxPyHtmlTagHandler",SwigwxPyHtmlTagHandlerTowxObject}, + { "_wxObject","_wxPyHtmlTagHandler",SwigwxPyHtmlTagHandlerTowxObject}, + { "_wxObject","_class_wxHtmlWinParser",SwigwxHtmlWinParserTowxObject}, + { "_wxObject","_wxHtmlWinParser",SwigwxHtmlWinParserTowxObject}, + { "_wxObject","_class_wxHtmlParser",SwigwxHtmlParserTowxObject}, + { "_wxObject","_wxHtmlParser",SwigwxHtmlParserTowxObject}, + { "_wxObject","_class_wxHtmlTag",SwigwxHtmlTagTowxObject}, + { "_wxObject","_wxHtmlTag",SwigwxHtmlTagTowxObject}, + { "_wxObject","_class_wxHtmlLinkInfo",SwigwxHtmlLinkInfoTowxObject}, + { "_wxObject","_wxHtmlLinkInfo",SwigwxHtmlLinkInfoTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -6435,10 +6710,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlWinParser","_wxHtmlWinParser",0}, { "_class_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_class_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_class_wxHtmlCell","_class_wxHtmlFontCell",SwigwxHtmlFontCellTowxHtmlCell}, + { "_class_wxHtmlCell","_wxHtmlFontCell",SwigwxHtmlFontCellTowxHtmlCell}, { "_class_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, { "_class_wxHtmlCell","_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, { "_class_wxHtmlCell","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, { "_class_wxHtmlCell","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_class_wxHtmlCell","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell}, + { "_class_wxHtmlCell","_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell}, { "_class_wxHtmlCell","_wxHtmlCell",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, @@ -6516,6 +6795,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -6651,6 +6931,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_wxHtmlWordCell","_class_wxHtmlWordCell",0}, { "_wxHtmlEasyPrinting","_class_wxHtmlEasyPrinting",0}, { "_wxColourData","_class_wxColourData",0}, { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, @@ -6663,6 +6944,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, { "_wxHtmlLinkInfo","_class_wxHtmlLinkInfo",0}, + { "_wxHtmlFontCell","_class_wxHtmlFontCell",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_class_wxFontDialog","_wxFontDialog",0}, @@ -6713,6 +6995,10 @@ SWIGEXPORT(void) inithtmlc() { wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); + + wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler"); + wxPyPtrTypeMap_Add("wxHtmlWinTagHandler", "wxPyHtmlWinTagHandler"); + wxPyPtrTypeMap_Add("wxHtmlWindow", "wxPyHtmlWindow"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index de3a8c5792..360cba1a4d 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -41,7 +41,7 @@ from filesys import * from utils import * import wx -class wxHtmlLinkInfoPtr : +class wxHtmlLinkInfoPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -53,7 +53,6 @@ class wxHtmlLinkInfoPtr : return val def GetEvent(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlLinkInfo_GetEvent,(self,) + _args, _kwargs) - if val: val = wxMouseEventPtr(val) return val def GetHtmlCell(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlLinkInfo_GetHtmlCell,(self,) + _args, _kwargs) @@ -75,7 +74,7 @@ class wxHtmlLinkInfo(wxHtmlLinkInfoPtr): -class wxHtmlTagPtr : +class wxHtmlTagPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -115,7 +114,7 @@ class wxHtmlTag(wxHtmlTagPtr): -class wxHtmlParserPtr : +class wxHtmlParserPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -124,7 +123,6 @@ class wxHtmlParserPtr : return val def GetFS(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_GetFS,(self,) + _args, _kwargs) - if val: val = wxFileSystemPtr(val) return val def Parse(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_Parse,(self,) + _args, _kwargs) @@ -168,7 +166,6 @@ class wxHtmlWinParserPtr(wxHtmlParserPtr): return val def GetDC(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetDC,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) return val def GetCharHeight(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetCharHeight,(self,) + _args, _kwargs) @@ -178,7 +175,6 @@ class wxHtmlWinParserPtr(wxHtmlParserPtr): return val def GetWindow(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetFonts(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_SetFonts,(self,) + _args, _kwargs) @@ -270,7 +266,7 @@ class wxHtmlWinParser(wxHtmlWinParserPtr): -class wxHtmlTagHandlerPtr : +class wxHtmlTagHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -326,7 +322,7 @@ class wxHtmlWinTagHandler(wxHtmlWinTagHandlerPtr): -class wxHtmlCellPtr : +class wxHtmlCellPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -398,6 +394,20 @@ class wxHtmlCell(wxHtmlCellPtr): +class wxHtmlWordCellPtr(wxHtmlCellPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxHtmlWordCell(wxHtmlWordCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlWordCell,_args,_kwargs) + self.thisown = 1 + + + + class wxHtmlContainerCellPtr(wxHtmlCellPtr): def __init__(self,this): self.this = this @@ -472,6 +482,20 @@ class wxHtmlColourCell(wxHtmlColourCellPtr): +class wxHtmlFontCellPtr(wxHtmlCellPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxHtmlFontCell(wxHtmlFontCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlFontCell,_args,_kwargs) + self.thisown = 1 + + + + class wxHtmlWidgetCellPtr(wxHtmlCellPtr): def __init__(self,this): self.this = this @@ -513,7 +537,6 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): return val def GetRelatedFrame(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_GetRelatedFrame,(self,) + _args, _kwargs) - if val: val = wxFramePtr(val) return val def SetRelatedStatusBar(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_SetRelatedStatusBar,(self,) + _args, _kwargs) @@ -575,7 +598,7 @@ class wxHtmlWindow(wxHtmlWindowPtr): -class wxHtmlDCRendererPtr : +class wxHtmlDCRendererPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -636,7 +659,7 @@ class wxHtmlPrintout(wxHtmlPrintoutPtr): -class wxHtmlEasyPrintingPtr : +class wxHtmlEasyPrintingPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -736,4 +759,3 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr - diff --git a/wxPython/src/msw/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp index 2deb42701e..95eace4a7f 100644 --- a/wxPython/src/msw/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -1653,6 +1653,14 @@ static void *SwigwxHtmlHelpFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlHelpFrameTowxObject(void *ptr) { + wxHtmlHelpFrame *src; + wxObject *dest; + src = (wxHtmlHelpFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlHelpFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxHtmlHelpFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2183,6 +2191,14 @@ static void *SwigwxHtmlHelpControllerTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxHtmlHelpControllerTowxObject(void *ptr) { + wxHtmlHelpController *src; + wxObject *dest; + src = (wxHtmlHelpController *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxHtmlHelpController(_swigarg0) (new wxHtmlHelpController(_swigarg0)) static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2966,6 +2982,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -2975,6 +2992,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxObject}, + { "_class_wxObject","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxObject}, + { "_class_wxObject","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxObject}, + { "_class_wxObject","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -3163,6 +3185,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, { "_wxListBox","_class_wxListBox",0}, + { "_class_wxHtmlWordCell","_wxHtmlWordCell",0}, { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, @@ -3178,6 +3201,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCaret","_wxCaret",0}, { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxHtmlLinkInfo","_wxHtmlLinkInfo",0}, + { "_class_wxHtmlFontCell","_wxHtmlFontCell",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, { "_class_wxPyHtmlTagHandler","_wxPyHtmlTagHandler",0}, @@ -3208,6 +3232,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxObject}, + { "_wxObject","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxObject}, + { "_wxObject","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxObject}, + { "_wxObject","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -3296,6 +3325,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -3430,6 +3460,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_wxHtmlWordCell","_class_wxHtmlWordCell",0}, { "_wxHtmlEasyPrinting","_class_wxHtmlEasyPrinting",0}, { "_wxColourData","_class_wxColourData",0}, { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, @@ -3442,6 +3473,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, { "_wxHtmlLinkInfo","_class_wxHtmlLinkInfo",0}, + { "_wxHtmlFontCell","_class_wxHtmlFontCell",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_class_wxFontDialog","_wxFontDialog",0}, diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index ec14d9e611..a02af2534b 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -334,6 +334,14 @@ static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void *SwigwxImageHandlerTowxObject(void *ptr) { + wxImageHandler *src; + wxObject *dest; + src = (wxImageHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName()) static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -646,6 +654,14 @@ static void *SwigwxPNGHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPNGHandlerTowxObject(void *ptr) { + wxPNGHandler *src; + wxObject *dest; + src = (wxPNGHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPNGHandler() (new wxPNGHandler()) static PyObject *_wrap_new_wxPNGHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -679,6 +695,14 @@ static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxJPEGHandlerTowxObject(void *ptr) { + wxJPEGHandler *src; + wxObject *dest; + src = (wxJPEGHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxJPEGHandler() (new wxJPEGHandler()) static PyObject *_wrap_new_wxJPEGHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -712,6 +736,14 @@ static void *SwigwxBMPHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxBMPHandlerTowxObject(void *ptr) { + wxBMPHandler *src; + wxObject *dest; + src = (wxBMPHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBMPHandler() (new wxBMPHandler()) static PyObject *_wrap_new_wxBMPHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -745,6 +777,14 @@ static void *SwigwxGIFHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxGIFHandlerTowxObject(void *ptr) { + wxGIFHandler *src; + wxObject *dest; + src = (wxGIFHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGIFHandler() (new wxGIFHandler()) static PyObject *_wrap_new_wxGIFHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -778,6 +818,14 @@ static void *SwigwxPNMHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPNMHandlerTowxObject(void *ptr) { + wxPNMHandler *src; + wxObject *dest; + src = (wxPNMHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPNMHandler() (new wxPNMHandler()) static PyObject *_wrap_new_wxPNMHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -811,6 +859,14 @@ static void *SwigwxPCXHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPCXHandlerTowxObject(void *ptr) { + wxPCXHandler *src; + wxObject *dest; + src = (wxPCXHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPCXHandler() (new wxPCXHandler()) static PyObject *_wrap_new_wxPCXHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -844,6 +900,14 @@ static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr) { return (void *) dest; } +static void *SwigwxTIFFHandlerTowxObject(void *ptr) { + wxTIFFHandler *src; + wxObject *dest; + src = (wxTIFFHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTIFFHandler() (new wxTIFFHandler()) static PyObject *_wrap_new_wxTIFFHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -869,6 +933,14 @@ static PyObject *_wrap_new_wxTIFFHandler(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void *SwigwxImageTowxObject(void *ptr) { + wxImage *src; + wxObject *dest; + src = (wxImage *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxImage(_swigarg0,_swigarg1) (new wxImage(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2322,8 +2394,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxImageList","_class_wxImageList",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_class_wxObject","_class_wxImage",SwigwxImageTowxObject}, + { "_class_wxObject","_wxImage",SwigwxImageTowxObject}, + { "_class_wxObject","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxObject}, + { "_class_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject}, + { "_class_wxObject","_class_wxPCXHandler",SwigwxPCXHandlerTowxObject}, + { "_class_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject}, + { "_class_wxObject","_class_wxPNMHandler",SwigwxPNMHandlerTowxObject}, + { "_class_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject}, + { "_class_wxObject","_class_wxGIFHandler",SwigwxGIFHandlerTowxObject}, + { "_class_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject}, + { "_class_wxObject","_class_wxBMPHandler",SwigwxBMPHandlerTowxObject}, + { "_class_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject}, + { "_class_wxObject","_class_wxJPEGHandler",SwigwxJPEGHandlerTowxObject}, + { "_class_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject}, + { "_class_wxObject","_class_wxPNGHandler",SwigwxPNGHandlerTowxObject}, + { "_class_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject}, + { "_class_wxObject","_class_wxImageHandler",SwigwxImageHandlerTowxObject}, + { "_class_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -2387,6 +2479,25 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxImage",SwigwxImageTowxObject}, + { "_wxObject","_wxImage",SwigwxImageTowxObject}, + { "_wxObject","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxObject}, + { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject}, + { "_wxObject","_class_wxPCXHandler",SwigwxPCXHandlerTowxObject}, + { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject}, + { "_wxObject","_class_wxPNMHandler",SwigwxPNMHandlerTowxObject}, + { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject}, + { "_wxObject","_class_wxGIFHandler",SwigwxGIFHandlerTowxObject}, + { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject}, + { "_wxObject","_class_wxBMPHandler",SwigwxBMPHandlerTowxObject}, + { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject}, + { "_wxObject","_class_wxJPEGHandler",SwigwxJPEGHandlerTowxObject}, + { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject}, + { "_wxObject","_class_wxPNGHandler",SwigwxPNGHandlerTowxObject}, + { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject}, + { "_wxObject","_class_wxImageHandler",SwigwxImageHandlerTowxObject}, + { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -2437,6 +2548,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, diff --git a/wxPython/src/msw/image.py b/wxPython/src/msw/image.py index 7d0e7fe23d..865e18c0b8 100644 --- a/wxPython/src/msw/image.py +++ b/wxPython/src/msw/image.py @@ -4,7 +4,7 @@ import imagec from misc import * from gdi import * -class wxImageHandlerPtr : +class wxImageHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -139,7 +139,7 @@ class wxTIFFHandler(wxTIFFHandlerPtr): -class wxImagePtr : +class wxImagePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index 2f6b75c5b2..97016ebc9b 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -135,6 +135,14 @@ static void *SwigwxMDIParentFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMDIParentFrameTowxObject(void *ptr) { + wxMDIParentFrame *src; + wxObject *dest; + src = (wxMDIParentFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -329,7 +337,6 @@ static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject wxMDIParentFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetActiveChild",_kwnames,&_argo0)) @@ -346,13 +353,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -363,7 +364,6 @@ static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject wxMDIParentFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetClientWindow",_kwnames,&_argo0)) @@ -380,13 +380,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -397,7 +391,6 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg wxMDIParentFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetToolBar",_kwnames,&_argo0)) @@ -414,13 +407,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -431,7 +418,6 @@ static PyObject *_wrap_wxMDIParentFrame_GetWindowMenu(PyObject *self, PyObject * wxMDIParentFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetWindowMenu",_kwnames,&_argo0)) @@ -448,13 +434,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetWindowMenu(PyObject *self, PyObject * _result = (wxMenu *)wxMDIParentFrame_GetWindowMenu(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -581,6 +561,14 @@ static void *SwigwxMDIChildFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMDIChildFrameTowxObject(void *ptr) { + wxMDIChildFrame *src; + wxObject *dest; + src = (wxMDIChildFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -760,6 +748,14 @@ static void *SwigwxMDIClientWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMDIClientWindowTowxObject(void *ptr) { + wxMDIClientWindow *src; + wxObject *dest; + src = (wxMDIClientWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMDIClientWindow(_swigarg0,_swigarg1) (new wxMDIClientWindow(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -876,8 +872,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, + { "_class_wxObject","_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, + { "_class_wxObject","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, + { "_class_wxObject","_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, + { "_class_wxObject","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, + { "_class_wxObject","_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -1027,6 +1031,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, + { "_wxObject","_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, + { "_wxObject","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, + { "_wxObject","_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, + { "_wxObject","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, + { "_wxObject","_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -1085,6 +1096,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/mdi.py b/wxPython/src/msw/mdi.py index b42676e001..10d7074168 100644 --- a/wxPython/src/msw/mdi.py +++ b/wxPython/src/msw/mdi.py @@ -35,19 +35,15 @@ class wxMDIParentFramePtr(wxFramePtr): return val def GetActiveChild(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_GetActiveChild,(self,) + _args, _kwargs) - if val: val = wxMDIChildFramePtr(val) return val def GetClientWindow(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_GetClientWindow,(self,) + _args, _kwargs) - if val: val = wxMDIClientWindowPtr(val) return val def GetToolBar(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_GetToolBar,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetWindowMenu(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_GetWindowMenu,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def SetWindowMenu(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_SetWindowMenu,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 15cfa106e8..1d5157532f 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -889,6 +889,64 @@ static PyObject *_wrap_wxNullAcceleratorTable_get() { return pyobj; } +static const char * wxObject_GetClassName(wxObject *self) { + return self->GetClassInfo()->GetClassName(); + } +static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxObject_GetClassName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxObject_GetClassName. Expected _wxObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxObject_GetClassName(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static void wxObject_Destroy(wxObject *self) { + delete self; + } +static PyObject *_wrap_wxObject_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxObject_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxObject_Destroy. Expected _wxObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxObject_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2857,6 +2915,14 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static void *SwigwxIndividualLayoutConstraintTowxObject(void *ptr) { + wxIndividualLayoutConstraint *src; + wxObject *dest; + src = (wxIndividualLayoutConstraint *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3203,6 +3269,14 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject return _resultobj; } +static void *SwigwxLayoutConstraintsTowxObject(void *ptr) { + wxLayoutConstraints *src; + wxObject *dest; + src = (wxLayoutConstraints *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxLayoutConstraints() (new wxLayoutConstraints()) static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3500,27 +3574,26 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2) (new wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _result; - long _arg0 = (long ) 0; - long _arg1 = (long ) 0; - long _arg2 = (long ) 0; - long _arg3 = (long ) 0; - char *_kwnames[] = { "x","y","width","height", NULL }; + wxAcceleratorEntry * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "flags","keyCode","cmd", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxAcceleratorEntry",_kwnames,&_arg0,&_arg1,&_arg2)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegion_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -3529,26 +3602,26 @@ static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define delete_wxRegion(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxAcceleratorEntry(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _arg0; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegion",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorEntry",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRegion. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorEntry. Expected _wxAcceleratorEntry_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegion(_arg0); + delete_wxAcceleratorEntry(_arg0); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3556,26 +3629,29 @@ static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxRegion_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _arg0; + wxAcceleratorEntry * _arg0; + int _arg1; + int _arg2; + int _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","flags","keyCode","Cmd", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_Clear",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxAcceleratorEntry_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Clear. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_Set. Expected _wxAcceleratorEntry_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxRegion_Clear(_arg0); + wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3583,1172 +3659,174 @@ static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxRegion_Contains(_swigobj,_swigarg0,_swigarg1) (_swigobj->Contains(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetFlags(_swigobj) (_swigobj->GetFlags()) +static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - long _arg1; - long _arg2; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxRegion_Contains",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetFlags",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Contains. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetFlags. Expected _wxAcceleratorEntry_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + _result = (int )wxAcceleratorEntry_GetFlags(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsPoint(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) -static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - wxPoint * _arg1; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pt", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsPoint",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetKeyCode",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsPoint. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetKeyCode. Expected _wxAcceleratorEntry_p."); return NULL; } } -{ - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsRect(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) -static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetCommand(_swigobj) (_swigobj->GetCommand()) +static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - wxRect * _arg1; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsRect",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetCommand",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRect. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetCommand. Expected _wxAcceleratorEntry_p."); return NULL; } } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + _result = (int )wxAcceleratorEntry_GetCommand(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsRectDim(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Contains(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","w","h", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_ContainsRectDim",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRectDim. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; +static void *SwigwxAcceleratorTableTowxObject(void *ptr) { + wxAcceleratorTable *src; + wxObject *dest; + src = (wxAcceleratorTable *) ptr; + dest = (wxObject *) src; + return (void *) dest; } -#define wxRegion_GetBox(_swigobj) (_swigobj->GetBox()) -static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxAcceleratorTable(_swigarg0,_swigarg1) (new wxAcceleratorTable(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRect * _result; - wxRegion * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + wxAcceleratorTable * _result; + int _arg0; + wxAcceleratorEntry * _arg1; + PyObject * _obj1 = 0; + char *_kwnames[] = { "choices", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_GetBox",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_GetBox. Expected _wxRegion_p."); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxAcceleratorTable",_kwnames,&_obj1)) return NULL; - } - } + if (_obj1) { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegion_GetBox(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRegion_Intersect(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Intersect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Intersect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Intersect. Expected _wxRegion_p."); + _arg1 = wxAcceleratorEntry_LIST_helper(_obj1); + if (_arg1 == NULL) { return NULL; - } } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; } - -#define wxRegion_IntersectRect(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) -static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRect. Expected _wxRegion_p."); - return NULL; - } - } { - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; + if (_obj1) { + _arg0 = PyList_Size(_obj1); + } + else { + _arg0 = 0; + } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); + _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_IntersectRegion(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) -static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_IntersectRegion. Expected _wxRegion_p."); - return NULL; - } +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorTable_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); + delete [] _arg1; +} return _resultobj; } -#define wxRegion_IsEmpty(_swigobj) (_swigobj->IsEmpty()) -static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxAcceleratorTable(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxRegion * _arg0; + wxAcceleratorTable * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_IsEmpty",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorTable",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IsEmpty. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorTable. Expected _wxAcceleratorTable_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IsEmpty(_arg0); + delete_wxAcceleratorTable(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxRegion_Union(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Union(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Union",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Union. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_UnionRect(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) -static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_UnionRegion(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) -static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_UnionRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_Subtract(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Subtract(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Subtract",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Subtract. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_SubtractRect(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) -static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_SubtractRegion(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) -static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_SubtractRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_Xor(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Xor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Xor",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Xor. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_XorRect(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) -static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_XorRegion(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) -static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_XorRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxRegionIterator(_swigarg0) (new wxRegionIterator(_swigarg0)) -static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _result; - wxRegion * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "region", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxRegionIterator",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRegionIterator. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegionIterator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxRegionIterator(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegionIterator",_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 delete_wxRegionIterator. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegionIterator(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRegionIterator_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetX",_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_GetX. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetX(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetY",_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_GetY. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetY(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetW(_swigobj) (_swigobj->GetW()) -static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetW",_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_GetW. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetW(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetWidth",_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_GetWidth. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetWidth(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetH(_swigobj) (_swigobj->GetH()) -static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetH",_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_GetH. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetH(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetHeight",_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_GetHeight. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetHeight(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetRect(_swigobj) (_swigobj->GetRect()) -static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRect * _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetRect",_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_GetRect. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegionIterator_GetRect(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRegionIterator_HaveRects(_swigobj) (_swigobj->HaveRects()) -static PyObject *_wrap_wxRegionIterator_HaveRects(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_HaveRects",_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_HaveRects. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegionIterator_HaveRects(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegionIterator_Reset(_swigobj) (_swigobj->Reset()) -static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Reset",_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_Reset. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Reset(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxRegionIterator_Next(wxRegionIterator *self) { - (*self) ++; - } -static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Next",_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_Next. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Next(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2) (new wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _result; - int _arg0 = (int ) 0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 0; - char *_kwnames[] = { "flags","keyCode","cmd", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxAcceleratorEntry",_kwnames,&_arg0,&_arg1,&_arg2)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxAcceleratorEntry(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorEntry",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorEntry. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxAcceleratorEntry(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxAcceleratorEntry_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _arg0; - int _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","flags","keyCode","Cmd", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxAcceleratorEntry_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_Set. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxAcceleratorEntry_GetFlags(_swigobj) (_swigobj->GetFlags()) -static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetFlags",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetFlags. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetKeyCode",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetKeyCode. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetCommand(_swigobj) (_swigobj->GetCommand()) -static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetCommand",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetCommand. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxAcceleratorTable(_swigarg0,_swigarg1) (new wxAcceleratorTable(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorTable * _result; - int _arg0; - wxAcceleratorEntry * _arg1; - PyObject * _obj1 = 0; - char *_kwnames[] = { "choices", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxAcceleratorTable",_kwnames,&_obj1)) - return NULL; - if (_obj1) -{ - _arg1 = wxAcceleratorEntry_LIST_helper(_obj1); - if (_arg1 == NULL) { - return NULL; - } -} -{ - if (_obj1) { - _arg0 = PyList_Size(_obj1); - } - else { - _arg0 = 0; - } -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorTable_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - delete [] _arg1; -} - return _resultobj; -} - -#define delete_wxAcceleratorTable(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorTable * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorTable",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorTable. Expected _wxAcceleratorTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxAcceleratorTable(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; +static void *SwigwxBusyInfoTowxObject(void *ptr) { + wxBusyInfo *src; + wxObject *dest; + src = (wxBusyInfo *) ptr; + dest = (wxObject *) src; + return (void *) dest; } #define new_wxBusyInfo(_swigarg0) (new wxBusyInfo(_swigarg0)) @@ -4838,39 +3916,6 @@ static PyMethodDef misccMethods[] = { { "wxAcceleratorEntry_Set", (PyCFunction) _wrap_wxAcceleratorEntry_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxAcceleratorEntry", (PyCFunction) _wrap_delete_wxAcceleratorEntry, METH_VARARGS | METH_KEYWORDS }, { "new_wxAcceleratorEntry", (PyCFunction) _wrap_new_wxAcceleratorEntry, 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 }, - { "wxRegionIterator_GetRect", (PyCFunction) _wrap_wxRegionIterator_GetRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetHeight", (PyCFunction) _wrap_wxRegionIterator_GetHeight, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetH", (PyCFunction) _wrap_wxRegionIterator_GetH, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetWidth", (PyCFunction) _wrap_wxRegionIterator_GetWidth, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetW", (PyCFunction) _wrap_wxRegionIterator_GetW, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetY", (PyCFunction) _wrap_wxRegionIterator_GetY, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetX", (PyCFunction) _wrap_wxRegionIterator_GetX, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxRegionIterator", (PyCFunction) _wrap_delete_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, - { "new_wxRegionIterator", (PyCFunction) _wrap_new_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_XorRegion", (PyCFunction) _wrap_wxRegion_XorRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_XorRect", (PyCFunction) _wrap_wxRegion_XorRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Xor", (PyCFunction) _wrap_wxRegion_Xor, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_SubtractRegion", (PyCFunction) _wrap_wxRegion_SubtractRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_SubtractRect", (PyCFunction) _wrap_wxRegion_SubtractRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Subtract", (PyCFunction) _wrap_wxRegion_Subtract, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_UnionRegion", (PyCFunction) _wrap_wxRegion_UnionRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_UnionRect", (PyCFunction) _wrap_wxRegion_UnionRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Union", (PyCFunction) _wrap_wxRegion_Union, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IsEmpty", (PyCFunction) _wrap_wxRegion_IsEmpty, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IntersectRegion", (PyCFunction) _wrap_wxRegion_IntersectRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IntersectRect", (PyCFunction) _wrap_wxRegion_IntersectRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Intersect", (PyCFunction) _wrap_wxRegion_Intersect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_GetBox", (PyCFunction) _wrap_wxRegion_GetBox, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsRectDim", (PyCFunction) _wrap_wxRegion_ContainsRectDim, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsRect", (PyCFunction) _wrap_wxRegion_ContainsRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsPoint", (PyCFunction) _wrap_wxRegion_ContainsPoint, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Contains", (PyCFunction) _wrap_wxRegion_Contains, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Clear", (PyCFunction) _wrap_wxRegion_Clear, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxRegion", (PyCFunction) _wrap_delete_wxRegion, METH_VARARGS | METH_KEYWORDS }, - { "new_wxRegion", (PyCFunction) _wrap_new_wxRegion, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_width_get", (PyCFunction) _wrap_wxLayoutConstraints_width_get, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_top_get", (PyCFunction) _wrap_wxLayoutConstraints_top_get, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_right_get", (PyCFunction) _wrap_wxLayoutConstraints_right_get, METH_VARARGS | METH_KEYWORDS }, @@ -4963,6 +4008,8 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "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 }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, @@ -5014,12 +4061,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_class_wxObject","_class_wxBusyInfo",SwigwxBusyInfoTowxObject}, + { "_class_wxObject","_wxBusyInfo",SwigwxBusyInfoTowxObject}, + { "_class_wxObject","_class_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, + { "_class_wxObject","_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, + { "_class_wxObject","_class_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, + { "_class_wxObject","_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, + { "_class_wxObject","_class_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, + { "_class_wxObject","_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -5045,7 +4100,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, @@ -5061,6 +4115,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxObject","_class_wxBusyInfo",SwigwxBusyInfoTowxObject}, + { "_wxObject","_wxBusyInfo",SwigwxBusyInfoTowxObject}, + { "_wxObject","_class_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, + { "_wxObject","_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, + { "_wxObject","_class_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, + { "_wxObject","_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, + { "_wxObject","_class_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, + { "_wxObject","_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -5103,7 +4166,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_time_t","_uint",0}, { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, @@ -5114,7 +4176,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxSize","_wxSize",0}, {0,0,0}}; @@ -5147,9 +4208,6 @@ SWIGEXPORT(void) initmiscc() { PyDict_SetItemString(d,"wxRightOf", PyInt_FromLong((long) wxRightOf)); PyDict_SetItemString(d,"wxSameAs", PyInt_FromLong((long) wxSameAs)); PyDict_SetItemString(d,"wxAbsolute", PyInt_FromLong((long) wxAbsolute)); - PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); - PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); - PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxNullAcceleratorTable",_wrap_wxNullAcceleratorTable_get, _wrap_wxNullAcceleratorTable_set); { diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 0f1bb7c68a..de639e834b 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -1,5 +1,24 @@ # This file was created automatically by SWIG. import miscc +class wxObjectPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetClassName(self, *_args, **_kwargs): + val = apply(miscc.wxObject_GetClassName,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(miscc.wxObject_Destroy,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxObject(wxObjectPtr): + def __init__(self,this): + self.this = this + + + + class wxSizePtr : def __init__(self,this): self.this = this @@ -353,7 +372,7 @@ class wxRect(wxRectPtr): -class wxIndividualLayoutConstraintPtr : +class wxIndividualLayoutConstraintPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -396,7 +415,7 @@ class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr): -class wxLayoutConstraintsPtr : +class wxLayoutConstraintsPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -454,129 +473,6 @@ class wxLayoutConstraints(wxLayoutConstraintsPtr): -class wxRegionPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxRegion(self) - def Clear(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Clear,(self,) + _args, _kwargs) - return val - def Contains(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Contains,(self,) + _args, _kwargs) - return val - def ContainsPoint(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_ContainsPoint,(self,) + _args, _kwargs) - return val - def ContainsRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_ContainsRect,(self,) + _args, _kwargs) - return val - def ContainsRectDim(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_ContainsRectDim,(self,) + _args, _kwargs) - return val - def GetBox(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_GetBox,(self,) + _args, _kwargs) - if val: val = wxRectPtr(val) ; val.thisown = 1 - return val - def Intersect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Intersect,(self,) + _args, _kwargs) - return val - def IntersectRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_IntersectRect,(self,) + _args, _kwargs) - return val - def IntersectRegion(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_IntersectRegion,(self,) + _args, _kwargs) - return val - def IsEmpty(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_IsEmpty,(self,) + _args, _kwargs) - return val - def Union(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Union,(self,) + _args, _kwargs) - return val - def UnionRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_UnionRect,(self,) + _args, _kwargs) - return val - def UnionRegion(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_UnionRegion,(self,) + _args, _kwargs) - return val - def Subtract(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Subtract,(self,) + _args, _kwargs) - return val - def SubtractRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_SubtractRect,(self,) + _args, _kwargs) - return val - def SubtractRegion(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_SubtractRegion,(self,) + _args, _kwargs) - return val - def Xor(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Xor,(self,) + _args, _kwargs) - return val - def XorRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_XorRect,(self,) + _args, _kwargs) - return val - def XorRegion(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_XorRegion,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxRegion(wxRegionPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(miscc.new_wxRegion,_args,_kwargs) - self.thisown = 1 - - - - -class wxRegionIteratorPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxRegionIterator(self) - def GetX(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetX,(self,) + _args, _kwargs) - return val - def GetY(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetY,(self,) + _args, _kwargs) - return val - def GetW(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetW,(self,) + _args, _kwargs) - return val - def GetWidth(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetWidth,(self,) + _args, _kwargs) - return val - def GetH(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetH,(self,) + _args, _kwargs) - return val - def GetHeight(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetHeight,(self,) + _args, _kwargs) - return val - def GetRect(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_GetRect,(self,) + _args, _kwargs) - if val: val = wxRectPtr(val) ; val.thisown = 1 - return val - def HaveRects(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_HaveRects,(self,) + _args, _kwargs) - return val - def Reset(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_Reset,(self,) + _args, _kwargs) - return val - def Next(self, *_args, **_kwargs): - val = apply(miscc.wxRegionIterator_Next,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxRegionIterator(wxRegionIteratorPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(miscc.new_wxRegionIterator,_args,_kwargs) - self.thisown = 1 - - - - class wxAcceleratorEntryPtr : def __init__(self,this): self.this = this @@ -606,7 +502,7 @@ class wxAcceleratorEntry(wxAcceleratorEntryPtr): -class wxAcceleratorTablePtr : +class wxAcceleratorTablePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -623,7 +519,7 @@ class wxAcceleratorTable(wxAcceleratorTablePtr): -class wxBusyInfoPtr : +class wxBusyInfoPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -732,8 +628,5 @@ wxLeftOf = miscc.wxLeftOf wxRightOf = miscc.wxRightOf wxSameAs = miscc.wxSameAs wxAbsolute = miscc.wxAbsolute -wxOutRegion = miscc.wxOutRegion -wxPartRegion = miscc.wxPartRegion -wxInRegion = miscc.wxInRegion cvar = miscc.cvar wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable) diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index 305787d2bd..0c209a199b 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -1146,7 +1146,6 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj PyObject * _obj0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "label","parent", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) @@ -1181,13 +1180,7 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj0) delete _arg0; @@ -1203,7 +1196,6 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje PyObject * _obj0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "name","parent", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) @@ -1238,13 +1230,7 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj0) delete _arg0; @@ -1282,7 +1268,6 @@ static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxWindow * _result; char *_kwnames[] = { NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetActiveWindow",_kwnames)) @@ -1292,13 +1277,7 @@ static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObjec _result = (wxWindow *)wxGetActiveWindow(); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1383,7 +1362,6 @@ static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, P wxMenuBar * _result; char * _arg0; char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) @@ -1393,13 +1371,7 @@ static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, P _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2316,6 +2288,14 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg return _resultobj; } +static void *SwigwxToolTipTowxObject(void *ptr) { + wxToolTip *src; + wxObject *dest; + src = (wxToolTip *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2455,7 +2435,6 @@ static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObj wxToolTip * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetWindow",_kwnames,&_argo0)) @@ -2472,13 +2451,7 @@ static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObj _result = (wxWindow *)wxToolTip_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2764,7 +2737,6 @@ static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObjec wxCaret * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0)) @@ -2781,13 +2753,7 @@ static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObjec _result = (wxWindow *)wxCaret_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3486,6 +3452,14 @@ static PyObject *_wrap_new_wxPyTipProvider(PyObject *self, PyObject *args, PyObj return _resultobj; } +static void *SwigwxGenericDragImageTowxObject(void *ptr) { + wxGenericDragImage *src; + wxObject *dest; + src = (wxGenericDragImage *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxDragImage(_swigarg0,_swigarg1,_swigarg2) (new wxGenericDragImage(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3876,6 +3850,14 @@ static PyObject *_wrap_wxDragImage_RedrawImage(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPyTimerTowxObject(void *ptr) { + wxPyTimer *src; + wxObject *dest; + src = (wxPyTimer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4772,7 +4754,6 @@ static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyOb wxLogWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_GetFrame",_kwnames,&_argo0)) @@ -4789,13 +4770,7 @@ static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyOb _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4950,6 +4925,14 @@ static void *SwigwxProcessEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxProcessEventTowxObject(void *ptr) { + wxProcessEvent *src; + wxObject *dest; + src = (wxProcessEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxProcessEvent(_swigarg0,_swigarg1,_swigarg2) (new wxProcessEvent(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5150,6 +5133,14 @@ static void *SwigwxPyProcessTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyProcessTowxObject(void *ptr) { + wxPyProcess *src; + wxObject *dest; + src = (wxPyProcess *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxProcess(_swigarg0,_swigarg1) (new wxPyProcess(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5388,28 +5379,7 @@ static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, if (_result) { _ptr = new wxPyInputStream(_result); } - if (_ptr) { - char swigptr[64]; - SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - - PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); - if (! classobj) { - Py_INCREF(Py_None); - _resultobj = Py_None; - } else { - PyObject* arg = Py_BuildValue("(s)", swigptr); - _resultobj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - // set ThisOwn - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString(_resultobj, "thisown", one); - Py_DECREF(one); - } - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } + _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); } return _resultobj; } @@ -5443,28 +5413,7 @@ static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, if (_result) { _ptr = new wxPyInputStream(_result); } - if (_ptr) { - char swigptr[64]; - SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - - PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); - if (! classobj) { - Py_INCREF(Py_None); - _resultobj = Py_None; - } else { - PyObject* arg = Py_BuildValue("(s)", swigptr); - _resultobj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - // set ThisOwn - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString(_resultobj, "thisown", one); - Py_DECREF(one); - } - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } + _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); } return _resultobj; } @@ -5530,6 +5479,14 @@ static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyO return _resultobj; } +static void *SwigwxJoystickTowxObject(void *ptr) { + wxJoystick *src; + wxObject *dest; + src = (wxJoystick *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxJoystick(_swigarg0) (new wxJoystick(_swigarg0)) static PyObject *_wrap_new_wxJoystick(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6985,8 +6942,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxJoystick",SwigwxJoystickTowxObject}, + { "_class_wxObject","_wxJoystick",SwigwxJoystickTowxObject}, + { "_class_wxObject","_class_wxPyProcess",SwigwxPyProcessTowxObject}, + { "_class_wxObject","_wxPyProcess",SwigwxPyProcessTowxObject}, + { "_class_wxObject","_class_wxProcessEvent",SwigwxProcessEventTowxObject}, + { "_class_wxObject","_wxProcessEvent",SwigwxProcessEventTowxObject}, + { "_class_wxObject","_class_wxPyTimer",SwigwxPyTimerTowxObject}, + { "_class_wxObject","_wxPyTimer",SwigwxPyTimerTowxObject}, + { "_class_wxObject","_class_wxGenericDragImage",SwigwxGenericDragImageTowxObject}, + { "_class_wxObject","_wxGenericDragImage",SwigwxGenericDragImageTowxObject}, + { "_class_wxObject","_class_wxToolTip",SwigwxToolTipTowxObject}, + { "_class_wxObject","_wxToolTip",SwigwxToolTipTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -7123,6 +7094,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxGenericDragImage","_wxGenericDragImage",0}, + { "_wxObject","_class_wxJoystick",SwigwxJoystickTowxObject}, + { "_wxObject","_wxJoystick",SwigwxJoystickTowxObject}, + { "_wxObject","_class_wxPyProcess",SwigwxPyProcessTowxObject}, + { "_wxObject","_wxPyProcess",SwigwxPyProcessTowxObject}, + { "_wxObject","_class_wxProcessEvent",SwigwxProcessEventTowxObject}, + { "_wxObject","_wxProcessEvent",SwigwxProcessEventTowxObject}, + { "_wxObject","_class_wxPyTimer",SwigwxPyTimerTowxObject}, + { "_wxObject","_wxPyTimer",SwigwxPyTimerTowxObject}, + { "_wxObject","_class_wxGenericDragImage",SwigwxGenericDragImageTowxObject}, + { "_wxObject","_wxGenericDragImage",SwigwxGenericDragImageTowxObject}, + { "_wxObject","_class_wxToolTip",SwigwxToolTipTowxObject}, + { "_wxObject","_wxToolTip",SwigwxToolTipTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -7180,6 +7164,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, @@ -7379,6 +7364,10 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxLOG_Progress", PyInt_FromLong((long) wxLOG_Progress)); PyDict_SetItemString(d,"wxLOG_User", PyInt_FromLong((long) wxLOG_User)); PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); + + wxPyPtrTypeMap_Add("wxFontEnumerator", "wxPyFontEnumerator"); + wxPyPtrTypeMap_Add("wxDragImage", "wxGenericDragImage"); + wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 8260fac59c..b55c6c048a 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -12,7 +12,7 @@ from clip_dnd import * from events import * from streams import * -class wxToolTipPtr : +class wxToolTipPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -24,7 +24,6 @@ class wxToolTipPtr : return val def GetWindow(self, *_args, **_kwargs): val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -65,7 +64,6 @@ class wxCaretPtr : return val def GetWindow(self, *_args, **_kwargs): val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def MoveXY(self, *_args, **_kwargs): val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs) @@ -215,7 +213,7 @@ class wxPyTipProvider(wxPyTipProviderPtr): -class wxDragImagePtr : +class wxDragImagePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -257,7 +255,7 @@ class wxDragImage(wxDragImagePtr): -class wxPyTimerPtr : +class wxPyTimerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -369,7 +367,6 @@ class wxLogWindowPtr(wxLogPtr): return val def GetFrame(self, *_args, **_kwargs): val = apply(misc2c.wxLogWindow_GetFrame,(self,) + _args, _kwargs) - if val: val = wxFramePtr(val) return val def GetOldLog(self, *_args, **_kwargs): val = apply(misc2c.wxLogWindow_GetOldLog,(self,) + _args, _kwargs) @@ -488,7 +485,7 @@ class wxProcess(wxProcessPtr): -class wxJoystickPtr : +class wxJoystickPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -678,19 +675,16 @@ wxSetCursor = misc2c.wxSetCursor def wxFindWindowByLabel(*_args, **_kwargs): val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) - if val: val = wxWindowPtr(val) return val def wxFindWindowByName(*_args, **_kwargs): val = apply(misc2c.wxFindWindowByName,_args,_kwargs) - if val: val = wxWindowPtr(val) return val wxBeginBusyCursor = misc2c.wxBeginBusyCursor def wxGetActiveWindow(*_args, **_kwargs): val = apply(misc2c.wxGetActiveWindow,_args,_kwargs) - if val: val = wxWindowPtr(val) return val wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier @@ -709,7 +703,6 @@ def wxResourceCreateIcon(*_args, **_kwargs): def wxResourceCreateMenuBar(*_args, **_kwargs): val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) - if val: val = wxMenuBarPtr(val) return val wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index 760162925c..b4a0e9daa7 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -173,6 +173,14 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); #ifdef __cplusplus extern "C" { #endif +static void *SwigwxPrintDataTowxObject(void *ptr) { + wxPrintData *src; + wxObject *dest; + src = (wxPrintData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrintData() (new wxPrintData()) static PyObject *_wrap_new_wxPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1521,6 +1529,14 @@ static void *SwigwxPrinterDCTowxDC(void *ptr) { return (void *) dest; } +static void *SwigwxPrinterDCTowxObject(void *ptr) { + wxPrinterDC *src; + wxObject *dest; + src = (wxPrinterDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrinterDC(_swigarg0) (new wxPrinterDC(_swigarg0)) static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1656,6 +1672,14 @@ static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxPageSetupDialogDataTowxObject(void *ptr) { + wxPageSetupDialogData *src; + wxObject *dest; + src = (wxPageSetupDialogData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPageSetupDialogData() (new wxPageSetupDialogData()) static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2586,6 +2610,14 @@ static void *SwigwxPageSetupDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPageSetupDialogTowxObject(void *ptr) { + wxPageSetupDialog *src; + wxObject *dest; + src = (wxPageSetupDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPageSetupDialog(_swigarg0,_swigarg1) (new wxPageSetupDialog(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPageSetupDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2691,6 +2723,14 @@ static PyObject *_wrap_wxPageSetupDialog_ShowModal(PyObject *self, PyObject *arg return _resultobj; } +static void *SwigwxPrintDialogDataTowxObject(void *ptr) { + wxPrintDialogData *src; + wxObject *dest; + src = (wxPrintDialogData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrintDialogData() (new wxPrintDialogData()) static PyObject *_wrap_new_wxPrintDialogData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3413,6 +3453,14 @@ static void *SwigwxPrintDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPrintDialogTowxObject(void *ptr) { + wxPrintDialog *src; + wxObject *dest; + src = (wxPrintDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrintDialog(_swigarg0,_swigarg1) (new wxPrintDialog(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPrintDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3498,7 +3546,6 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args, wxPrintDialog * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintDialog_GetPrintDC",_kwnames,&_argo0)) @@ -3515,13 +3562,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args, _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3552,6 +3593,14 @@ static PyObject *_wrap_wxPrintDialog_ShowModal(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPyPrintoutTowxObject(void *ptr) { + wxPyPrintout *src; + wxObject *dest; + src = (wxPyPrintout *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrintout(_swigarg0) (new wxPyPrintout(_swigarg0)) static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3649,7 +3698,6 @@ static PyObject *_wrap_wxPrintout_GetDC(PyObject *self, PyObject *args, PyObject wxPyPrintout * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintout_GetDC",_kwnames,&_argo0)) @@ -3666,13 +3714,7 @@ static PyObject *_wrap_wxPrintout_GetDC(PyObject *self, PyObject *args, PyObject _result = (wxDC *)wxPrintout_GetDC(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4123,6 +4165,14 @@ static PyObject *_wrap_wxPrintout_base_HasPage(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxPrinterTowxObject(void *ptr) { + wxPrinter *src; + wxObject *dest; + src = (wxPrinter *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrinter(_swigarg0) (new wxPrinter(_swigarg0)) static PyObject *_wrap_new_wxPrinter(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4319,7 +4369,6 @@ static PyObject *_wrap_wxPrinter_PrintDialog(PyObject *self, PyObject *args, PyO PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","parent", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPrinter_PrintDialog",_kwnames,&_argo0,&_argo1)) @@ -4343,13 +4392,7 @@ static PyObject *_wrap_wxPrinter_PrintDialog(PyObject *self, PyObject *args, PyO _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4435,6 +4478,14 @@ static PyObject *_wrap_wxPrinter_Setup(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxPrintPreviewTowxObject(void *ptr) { + wxPrintPreview *src; + wxObject *dest; + src = (wxPrintPreview *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPrintPreview(_swigarg0,_swigarg1,_swigarg2) (new wxPrintPreview(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxPrintPreview(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4494,7 +4545,6 @@ static PyObject *_wrap_wxPrintPreview_GetCanvas(PyObject *self, PyObject *args, wxPrintPreview * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintPreview_GetCanvas",_kwnames,&_argo0)) @@ -4511,13 +4561,7 @@ static PyObject *_wrap_wxPrintPreview_GetCanvas(PyObject *self, PyObject *args, _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4555,7 +4599,6 @@ static PyObject *_wrap_wxPrintPreview_GetFrame(PyObject *self, PyObject *args, P wxPrintPreview * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintPreview_GetFrame",_kwnames,&_argo0)) @@ -4572,13 +4615,7 @@ static PyObject *_wrap_wxPrintPreview_GetFrame(PyObject *self, PyObject *args, P _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4678,7 +4715,6 @@ static PyObject *_wrap_wxPrintPreview_GetPrintout(PyObject *self, PyObject *args wxPrintPreview * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintPreview_GetPrintout",_kwnames,&_argo0)) @@ -4695,13 +4731,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintout(PyObject *self, PyObject *args _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPrintout_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4712,7 +4742,6 @@ static PyObject *_wrap_wxPrintPreview_GetPrintoutForPrinting(PyObject *self, PyO wxPrintPreview * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintPreview_GetPrintoutForPrinting",_kwnames,&_argo0)) @@ -4729,13 +4758,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintoutForPrinting(PyObject *self, PyO _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPrintout_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5011,6 +5034,14 @@ static void *SwigwxPreviewFrameTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPreviewFrameTowxObject(void *ptr) { + wxPreviewFrame *src; + wxObject *dest; + src = (wxPreviewFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPreviewFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPreviewFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5343,6 +5374,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_wxDC","_class_wxDC",0}, @@ -5350,6 +5382,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, { "_wxProgressDialog","_class_wxProgressDialog",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, + { "_class_wxObject","_class_wxPreviewFrame",SwigwxPreviewFrameTowxObject}, + { "_class_wxObject","_wxPreviewFrame",SwigwxPreviewFrameTowxObject}, + { "_class_wxObject","_class_wxPrintPreview",SwigwxPrintPreviewTowxObject}, + { "_class_wxObject","_wxPrintPreview",SwigwxPrintPreviewTowxObject}, + { "_class_wxObject","_class_wxPrinter",SwigwxPrinterTowxObject}, + { "_class_wxObject","_wxPrinter",SwigwxPrinterTowxObject}, + { "_class_wxObject","_class_wxPyPrintout",SwigwxPyPrintoutTowxObject}, + { "_class_wxObject","_wxPyPrintout",SwigwxPyPrintoutTowxObject}, + { "_class_wxObject","_class_wxPrintDialog",SwigwxPrintDialogTowxObject}, + { "_class_wxObject","_wxPrintDialog",SwigwxPrintDialogTowxObject}, + { "_class_wxObject","_class_wxPrintDialogData",SwigwxPrintDialogDataTowxObject}, + { "_class_wxObject","_wxPrintDialogData",SwigwxPrintDialogDataTowxObject}, + { "_class_wxObject","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxObject}, + { "_class_wxObject","_wxPageSetupDialog",SwigwxPageSetupDialogTowxObject}, + { "_class_wxObject","_class_wxPageSetupDialogData",SwigwxPageSetupDialogDataTowxObject}, + { "_class_wxObject","_wxPageSetupDialogData",SwigwxPageSetupDialogDataTowxObject}, + { "_class_wxObject","_class_wxPrinterDC",SwigwxPrinterDCTowxObject}, + { "_class_wxObject","_wxPrinterDC",SwigwxPrinterDCTowxObject}, + { "_class_wxObject","_class_wxPrintData",SwigwxPrintDataTowxObject}, + { "_class_wxObject","_wxPrintData",SwigwxPrintDataTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -5526,6 +5579,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxPreviewFrame",SwigwxPreviewFrameTowxObject}, + { "_wxObject","_wxPreviewFrame",SwigwxPreviewFrameTowxObject}, + { "_wxObject","_class_wxPrintPreview",SwigwxPrintPreviewTowxObject}, + { "_wxObject","_wxPrintPreview",SwigwxPrintPreviewTowxObject}, + { "_wxObject","_class_wxPrinter",SwigwxPrinterTowxObject}, + { "_wxObject","_wxPrinter",SwigwxPrinterTowxObject}, + { "_wxObject","_class_wxPyPrintout",SwigwxPyPrintoutTowxObject}, + { "_wxObject","_wxPyPrintout",SwigwxPyPrintoutTowxObject}, + { "_wxObject","_class_wxPrintDialog",SwigwxPrintDialogTowxObject}, + { "_wxObject","_wxPrintDialog",SwigwxPrintDialogTowxObject}, + { "_wxObject","_class_wxPrintDialogData",SwigwxPrintDialogDataTowxObject}, + { "_wxObject","_wxPrintDialogData",SwigwxPrintDialogDataTowxObject}, + { "_wxObject","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxObject}, + { "_wxObject","_wxPageSetupDialog",SwigwxPageSetupDialogTowxObject}, + { "_wxObject","_class_wxPageSetupDialogData",SwigwxPageSetupDialogDataTowxObject}, + { "_wxObject","_wxPageSetupDialogData",SwigwxPageSetupDialogDataTowxObject}, + { "_wxObject","_class_wxPrinterDC",SwigwxPrinterDCTowxObject}, + { "_wxObject","_wxPrinterDC",SwigwxPrinterDCTowxObject}, + { "_wxObject","_class_wxPrintData",SwigwxPrintDataTowxObject}, + { "_wxObject","_wxPrintData",SwigwxPrintDataTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -5588,6 +5662,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, @@ -5714,6 +5789,8 @@ SWIGEXPORT(void) initprintfwc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("printfwc", printfwcMethods); d = PyModule_GetDict(m); + + wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/printfw.py b/wxPython/src/msw/printfw.py index ec84101cd8..bafd68b021 100644 --- a/wxPython/src/msw/printfw.py +++ b/wxPython/src/msw/printfw.py @@ -19,7 +19,7 @@ from controls import * from events import * import wx -class wxPrintDataPtr : +class wxPrintDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -176,7 +176,7 @@ def wxPrinterDC2(*_args,**_kwargs): return val -class wxPageSetupDialogDataPtr : +class wxPageSetupDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -305,7 +305,7 @@ class wxPageSetupDialog(wxPageSetupDialogPtr): -class wxPrintDialogDataPtr : +class wxPrintDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -399,7 +399,6 @@ class wxPrintDialogPtr(wxDialogPtr): return val def GetPrintDC(self, *_args, **_kwargs): val = apply(printfwc.wxPrintDialog_GetPrintDC,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) ; val.thisown = 1 return val def ShowModal(self, *_args, **_kwargs): val = apply(printfwc.wxPrintDialog_ShowModal,(self,) + _args, _kwargs) @@ -415,7 +414,7 @@ class wxPrintDialog(wxPrintDialogPtr): -class wxPrintoutPtr : +class wxPrintoutPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -427,7 +426,6 @@ class wxPrintoutPtr : return val def GetDC(self, *_args, **_kwargs): val = apply(printfwc.wxPrintout_GetDC,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) return val def GetPageSizeMM(self, *_args, **_kwargs): val = apply(printfwc.wxPrintout_GetPageSizeMM,(self,) + _args, _kwargs) @@ -476,7 +474,7 @@ class wxPrintout(wxPrintoutPtr): -class wxPrinterPtr : +class wxPrinterPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -495,7 +493,6 @@ class wxPrinterPtr : return val def PrintDialog(self, *_args, **_kwargs): val = apply(printfwc.wxPrinter_PrintDialog,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) return val def ReportError(self, *_args, **_kwargs): val = apply(printfwc.wxPrinter_ReportError,(self,) + _args, _kwargs) @@ -513,20 +510,18 @@ class wxPrinter(wxPrinterPtr): -class wxPrintPreviewPtr : +class wxPrintPreviewPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 def GetCanvas(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetCanvas,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetCurrentPage(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetCurrentPage,(self,) + _args, _kwargs) return val def GetFrame(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetFrame,(self,) + _args, _kwargs) - if val: val = wxFramePtr(val) return val def GetMaxPage(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetMaxPage,(self,) + _args, _kwargs) @@ -540,11 +535,9 @@ class wxPrintPreviewPtr : return val def GetPrintout(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetPrintout,(self,) + _args, _kwargs) - if val: val = wxPrintoutPtr(val) return val def GetPrintoutForPrinting(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetPrintoutForPrinting,(self,) + _args, _kwargs) - if val: val = wxPrintoutPtr(val) return val def GetZoom(self, *_args, **_kwargs): val = apply(printfwc.wxPrintPreview_GetZoom,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index a61b0aa9c1..9f9eb2a89e 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -57,6 +57,8 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" +#include + static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; if (!target) { @@ -127,6 +129,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer); #ifdef __cplusplus extern "C" { #endif +static void *SwigwxSizerItemTowxObject(void *ptr) { + wxSizerItem *src; + wxObject *dest; + src = (wxSizerItem *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxSizerItem_GetSize(_swigobj) (_swigobj->GetSize()) static PyObject *_wrap_wxSizerItem_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -435,7 +445,6 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO wxSizerItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetWindow",_kwnames,&_argo0)) @@ -452,13 +461,7 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -505,7 +508,6 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb wxSizerItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetSizer",_kwnames,&_argo0)) @@ -522,13 +524,7 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -800,6 +796,14 @@ static PyObject *_wrap_wxSizerItem_GetUserData(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxSizerTowxObject(void *ptr) { + wxSizer *src; + wxObject *dest; + src = (wxSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static void wxSizer_Destroy(wxSizer *self) { delete self; } static PyObject *_wrap_wxSizer_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1748,6 +1752,14 @@ static void *SwigwxPySizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxPySizerTowxObject(void *ptr) { + wxPySizer *src; + wxObject *dest; + src = (wxPySizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPySizer() (new wxPySizer()) static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1818,6 +1830,14 @@ static void *SwigwxBoxSizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxBoxSizerTowxObject(void *ptr) { + wxBoxSizer *src; + wxObject *dest; + src = (wxBoxSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBoxSizer(_swigarg0) (new wxBoxSizer(_swigarg0)) static PyObject *_wrap_new_wxBoxSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1943,6 +1963,14 @@ static void *SwigwxStaticBoxSizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxStaticBoxSizerTowxObject(void *ptr) { + wxStaticBoxSizer *src; + wxObject *dest; + src = (wxStaticBoxSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStaticBoxSizer(_swigarg0,_swigarg1) (new wxStaticBoxSizer(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxStaticBoxSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1985,7 +2013,6 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a wxStaticBoxSizer * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStaticBoxSizer_GetStaticBox",_kwnames,&_argo0)) @@ -2002,13 +2029,7 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a _result = (wxStaticBox *)wxStaticBoxSizer_GetStaticBox(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2076,6 +2097,14 @@ static void *SwigwxNotebookSizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxNotebookSizerTowxObject(void *ptr) { + wxNotebookSizer *src; + wxObject *dest; + src = (wxNotebookSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxNotebookSizer(_swigarg0) (new wxNotebookSizer(_swigarg0)) static PyObject *_wrap_new_wxNotebookSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2173,7 +2202,6 @@ static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *arg wxNotebookSizer * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_GetNotebook",_kwnames,&_argo0)) @@ -2190,13 +2218,7 @@ static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *arg _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2208,6 +2230,14 @@ static void *SwigwxGridSizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxGridSizerTowxObject(void *ptr) { + wxGridSizer *src; + wxObject *dest; + src = (wxGridSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2529,6 +2559,14 @@ static void *SwigwxFlexGridSizerTowxSizer(void *ptr) { return (void *) dest; } +static void *SwigwxFlexGridSizerTowxObject(void *ptr) { + wxFlexGridSizer *src; + wxObject *dest; + src = (wxFlexGridSizer *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxFlexGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2882,10 +2920,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxObject}, + { "_class_wxObject","_wxFlexGridSizer",SwigwxFlexGridSizerTowxObject}, + { "_class_wxObject","_class_wxGridSizer",SwigwxGridSizerTowxObject}, + { "_class_wxObject","_wxGridSizer",SwigwxGridSizerTowxObject}, + { "_class_wxObject","_class_wxNotebookSizer",SwigwxNotebookSizerTowxObject}, + { "_class_wxObject","_wxNotebookSizer",SwigwxNotebookSizerTowxObject}, + { "_class_wxObject","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxObject}, + { "_class_wxObject","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxObject}, + { "_class_wxObject","_class_wxBoxSizer",SwigwxBoxSizerTowxObject}, + { "_class_wxObject","_wxBoxSizer",SwigwxBoxSizerTowxObject}, + { "_class_wxObject","_class_wxPySizer",SwigwxPySizerTowxObject}, + { "_class_wxObject","_wxPySizer",SwigwxPySizerTowxObject}, + { "_class_wxObject","_class_wxSizer",SwigwxSizerTowxObject}, + { "_class_wxObject","_wxSizer",SwigwxSizerTowxObject}, + { "_class_wxObject","_class_wxSizerItem",SwigwxSizerItemTowxObject}, + { "_class_wxObject","_wxSizerItem",SwigwxSizerItemTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -3022,6 +3078,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxObject}, + { "_wxObject","_wxFlexGridSizer",SwigwxFlexGridSizerTowxObject}, + { "_wxObject","_class_wxGridSizer",SwigwxGridSizerTowxObject}, + { "_wxObject","_wxGridSizer",SwigwxGridSizerTowxObject}, + { "_wxObject","_class_wxNotebookSizer",SwigwxNotebookSizerTowxObject}, + { "_wxObject","_wxNotebookSizer",SwigwxNotebookSizerTowxObject}, + { "_wxObject","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxObject}, + { "_wxObject","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxObject}, + { "_wxObject","_class_wxBoxSizer",SwigwxBoxSizerTowxObject}, + { "_wxObject","_wxBoxSizer",SwigwxBoxSizerTowxObject}, + { "_wxObject","_class_wxPySizer",SwigwxPySizerTowxObject}, + { "_wxObject","_wxPySizer",SwigwxPySizerTowxObject}, + { "_wxObject","_class_wxSizer",SwigwxSizerTowxObject}, + { "_wxObject","_wxSizer",SwigwxSizerTowxObject}, + { "_wxObject","_class_wxSizerItem",SwigwxSizerItemTowxObject}, + { "_wxObject","_wxSizerItem",SwigwxSizerItemTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -3080,6 +3153,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, diff --git a/wxPython/src/msw/sizers.py b/wxPython/src/msw/sizers.py index bfd80918ca..add97c33f2 100644 --- a/wxPython/src/msw/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -14,7 +14,7 @@ from controls import * from events import * import wx import string -class wxSizerItemPtr : +class wxSizerItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -52,14 +52,12 @@ class wxSizerItemPtr : return val def GetWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetWindow,(self,) + _args, _kwargs) return val def GetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) return val def SetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs) @@ -97,7 +95,7 @@ class wxSizerItem(wxSizerItemPtr): -class wxSizerPtr : +class wxSizerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -284,7 +282,6 @@ class wxStaticBoxSizerPtr(wxBoxSizerPtr): self.thisown = 0 def GetStaticBox(self, *_args, **_kwargs): val = apply(sizersc.wxStaticBoxSizer_GetStaticBox,(self,) + _args, _kwargs) - if val: val = wxStaticBoxPtr(val) return val def RecalcSizes(self, *_args, **_kwargs): val = apply(sizersc.wxStaticBoxSizer_RecalcSizes,(self,) + _args, _kwargs) @@ -316,7 +313,6 @@ class wxNotebookSizerPtr(wxSizerPtr): return val def GetNotebook(self, *_args, **_kwargs): val = apply(sizersc.wxNotebookSizer_GetNotebook,(self,) + _args, _kwargs) - if val: val = wxNotebookPtr(val) return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index cd2b60447e..5b1d57f2d2 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -131,6 +131,14 @@ static void *SwigwxStatusBarTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxStatusBarTowxObject(void *ptr) { + wxStatusBar *src; + wxObject *dest; + src = (wxStatusBar *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxStatusBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxStatusBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -495,6 +503,14 @@ static PyObject *_wrap_wxStatusBar_SetMinHeight(PyObject *self, PyObject *args, return _resultobj; } +static void *SwigwxToolBarToolBaseTowxObject(void *ptr) { + wxToolBarToolBase *src; + wxObject *dest; + src = (wxToolBarToolBase *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static void wxToolBarToolBase_Destroy(wxToolBarToolBase *self) { delete self; } static PyObject *_wrap_wxToolBarToolBase_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -556,7 +572,6 @@ static PyObject *_wrap_wxToolBarToolBase_GetControl(PyObject *self, PyObject *ar wxToolBarToolBase * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetControl",_kwnames,&_argo0)) @@ -573,13 +588,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetControl(PyObject *self, PyObject *ar _result = (wxControl *)wxToolBarToolBase_GetControl(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -590,7 +599,6 @@ static PyObject *_wrap_wxToolBarToolBase_GetToolBar(PyObject *self, PyObject *ar wxToolBarToolBase * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetToolBar",_kwnames,&_argo0)) @@ -607,13 +615,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetToolBar(PyObject *self, PyObject *ar _result = (wxToolBarBase *)wxToolBarToolBase_GetToolBar(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1398,6 +1400,14 @@ static void *SwigwxToolBarBaseTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxToolBarBaseTowxObject(void *ptr) { + wxToolBarBase *src; + wxObject *dest; + src = (wxToolBarBase *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) @@ -1423,7 +1433,6 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO PyObject * _obj6 = 0; PyObject * _obj7 = 0; char *_kwnames[] = { "self","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OiOOO:wxToolBarBase_AddTool",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3,&_arg4,&_obj5,&_obj6,&_obj7)) @@ -1496,13 +1505,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO _result = (wxToolBarToolBase *)wxToolBarBase_AddTool(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,*_arg6,*_arg7); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj6) delete _arg6; @@ -1532,7 +1535,6 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg PyObject * _obj3 = 0; PyObject * _obj4 = 0; char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOi:wxToolBarBase_AddSimpleTool",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5)) @@ -1594,13 +1596,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg _result = (wxToolBarToolBase *)wxToolBarBase_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj3) delete _arg3; @@ -1638,7 +1634,6 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject * _obj7 = 0; PyObject * _obj8 = 0; char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO|OiOOO:wxToolBarBase_InsertTool",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_argo4,&_arg5,&_obj6,&_obj7,&_obj8)) @@ -1711,13 +1706,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj7) delete _arg7; @@ -1748,7 +1737,6 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * PyObject * _obj4 = 0; PyObject * _obj5 = 0; char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO|OOi:wxToolBarBase_InsertSimpleTool",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6)) @@ -1810,13 +1798,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * _result = (wxToolBarToolBase *)wxToolBarBase_InsertSimpleTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj4) delete _arg4; @@ -1837,7 +1819,6 @@ static PyObject *_wrap_wxToolBarBase_AddControl(PyObject *self, PyObject *args, PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","control", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarBase_AddControl",_kwnames,&_argo0,&_argo1)) @@ -1861,13 +1842,7 @@ static PyObject *_wrap_wxToolBarBase_AddControl(PyObject *self, PyObject *args, _result = (wxToolBarToolBase *)wxToolBarBase_AddControl(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1881,7 +1856,6 @@ static PyObject *_wrap_wxToolBarBase_InsertControl(PyObject *self, PyObject *arg PyObject * _argo0 = 0; PyObject * _argo2 = 0; char *_kwnames[] = { "self","pos","control", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxToolBarBase_InsertControl",_kwnames,&_argo0,&_arg1,&_argo2)) @@ -1905,13 +1879,7 @@ static PyObject *_wrap_wxToolBarBase_InsertControl(PyObject *self, PyObject *arg _result = (wxToolBarToolBase *)wxToolBarBase_InsertControl(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1922,7 +1890,6 @@ static PyObject *_wrap_wxToolBarBase_AddSeparator(PyObject *self, PyObject *args wxToolBarBase * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarBase_AddSeparator",_kwnames,&_argo0)) @@ -1939,13 +1906,7 @@ static PyObject *_wrap_wxToolBarBase_AddSeparator(PyObject *self, PyObject *args _result = (wxToolBarToolBase *)wxToolBarBase_AddSeparator(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1957,7 +1918,6 @@ static PyObject *_wrap_wxToolBarBase_InsertSeparator(PyObject *self, PyObject *a size_t _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","pos", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxToolBarBase_InsertSeparator",_kwnames,&_argo0,&_arg1)) @@ -1974,13 +1934,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSeparator(PyObject *self, PyObject *a _result = (wxToolBarToolBase *)wxToolBarBase_InsertSeparator(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1992,7 +1946,6 @@ static PyObject *_wrap_wxToolBarBase_RemoveTool(PyObject *self, PyObject *args, int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxToolBarBase_RemoveTool",_kwnames,&_argo0,&_arg1)) @@ -2009,13 +1962,7 @@ static PyObject *_wrap_wxToolBarBase_RemoveTool(PyObject *self, PyObject *args, _result = (wxToolBarToolBase *)wxToolBarBase_RemoveTool(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2990,6 +2937,14 @@ static void *SwigwxToolBarTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxToolBarTowxObject(void *ptr) { + wxToolBar *src; + wxObject *dest; + src = (wxToolBar *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxToolBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxToolBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3054,7 +3009,6 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBar_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -3071,13 +3025,7 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a _result = (wxToolBarToolBase *)wxToolBar_FindToolForPosition(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3113,6 +3061,14 @@ static void *SwigwxToolBarSimpleTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxToolBarSimpleTowxObject(void *ptr) { + wxToolBarSimple *src; + wxObject *dest; + src = (wxToolBarSimple *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxToolBarSimple(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxToolBarSimple(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3177,7 +3133,6 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBarSimple_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -3194,13 +3149,7 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj _result = (wxToolBarToolBase *)wxToolBarSimple_FindToolForPosition(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarToolBase_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3354,8 +3303,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxObject}, + { "_class_wxObject","_wxToolBarSimple",SwigwxToolBarSimpleTowxObject}, + { "_class_wxObject","_class_wxToolBar",SwigwxToolBarTowxObject}, + { "_class_wxObject","_wxToolBar",SwigwxToolBarTowxObject}, + { "_class_wxObject","_class_wxToolBarBase",SwigwxToolBarBaseTowxObject}, + { "_class_wxObject","_wxToolBarBase",SwigwxToolBarBaseTowxObject}, + { "_class_wxObject","_class_wxToolBarToolBase",SwigwxToolBarToolBaseTowxObject}, + { "_class_wxObject","_wxToolBarToolBase",SwigwxToolBarToolBaseTowxObject}, + { "_class_wxObject","_class_wxStatusBar",SwigwxStatusBarTowxObject}, + { "_class_wxObject","_wxStatusBar",SwigwxStatusBarTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -3502,6 +3463,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxObject}, + { "_wxObject","_wxToolBarSimple",SwigwxToolBarSimpleTowxObject}, + { "_wxObject","_class_wxToolBar",SwigwxToolBarTowxObject}, + { "_wxObject","_wxToolBar",SwigwxToolBarTowxObject}, + { "_wxObject","_class_wxToolBarBase",SwigwxToolBarBaseTowxObject}, + { "_wxObject","_wxToolBarBase",SwigwxToolBarBaseTowxObject}, + { "_wxObject","_class_wxToolBarToolBase",SwigwxToolBarToolBaseTowxObject}, + { "_wxObject","_wxToolBarToolBase",SwigwxToolBarToolBaseTowxObject}, + { "_wxObject","_class_wxStatusBar",SwigwxStatusBarTowxObject}, + { "_wxObject","_wxStatusBar",SwigwxStatusBarTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -3561,6 +3533,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/stattool.py b/wxPython/src/msw/stattool.py index 2e212ebc8c..6f15993044 100644 --- a/wxPython/src/msw/stattool.py +++ b/wxPython/src/msw/stattool.py @@ -56,7 +56,7 @@ class wxStatusBar(wxStatusBarPtr): -class wxToolBarToolBasePtr : +class wxToolBarToolBasePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -68,11 +68,9 @@ class wxToolBarToolBasePtr : return val def GetControl(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetControl,(self,) + _args, _kwargs) - if val: val = wxControlPtr(val) return val def GetToolBar(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetToolBar,(self,) + _args, _kwargs) - if val: val = wxToolBarBasePtr(val) return val def IsButton(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_IsButton,(self,) + _args, _kwargs) @@ -161,39 +159,30 @@ class wxToolBarBasePtr(wxControlPtr): self.thisown = 0 def AddTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_AddTool,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def AddSimpleTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_AddSimpleTool,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def InsertTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_InsertTool,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def InsertSimpleTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_InsertSimpleTool,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def AddControl(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_AddControl,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def InsertControl(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_InsertControl,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def AddSeparator(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_AddSeparator,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def InsertSeparator(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_InsertSeparator,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def RemoveTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_RemoveTool,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def DeleteToolByPos(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_DeleteToolByPos,(self,) + _args, _kwargs) @@ -304,7 +293,6 @@ class wxToolBarPtr(wxToolBarBasePtr): self.thisown = 0 def FindToolForPosition(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBar_FindToolForPosition,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def __repr__(self): return "" % (self.this,) @@ -323,7 +311,6 @@ class wxToolBarSimplePtr(wxToolBarBasePtr): self.thisown = 0 def FindToolForPosition(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarSimple_FindToolForPosition,(self,) + _args, _kwargs) - if val: val = wxToolBarToolBasePtr(val) return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp index cbe4f57642..2d3dc7b669 100644 --- a/wxPython/src/msw/streams.cpp +++ b/wxPython/src/msw/streams.cpp @@ -432,6 +432,7 @@ static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObjec PyObject * _arg0; PyObject * _obj0 = 0; char *_kwnames[] = { "p", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0)) @@ -442,15 +443,13 @@ static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObjec { _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); -}{ - char _ptemp[128]; - if (_result) { +} if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p"); _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; } - else - _resultobj=0; -} return _resultobj; } @@ -865,6 +864,8 @@ SWIGEXPORT(void) initstreamsc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("streamsc", streamscMethods); d = PyModule_GetDict(m); + + wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 5f3784f7fa..c5086df957 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include +#include static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -112,20 +113,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static wxString wxPyEmptyStr(""); - bool wxValidator_IsSilent() { - return wxValidator::IsSilent(); - } - - void wxValidator_SetBellOnError(int doIt = TRUE) { - wxValidator::SetBellOnError(doIt); - } - class wxPyValidator : public wxValidator { DECLARE_DYNAMIC_CLASS(wxPyValidator); public: wxPyValidator() { } -// wxPyValidator(const wxPyValidator& other); ~wxPyValidator() { } @@ -153,12 +145,12 @@ public: return ptr; } + DEC_PYCALLBACK_BOOL_WXWIN(Validate); DEC_PYCALLBACK_BOOL_(TransferToWindow); DEC_PYCALLBACK_BOOL_(TransferFromWindow); PYPRIVATE; -// PyObject* m_data; }; IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate); @@ -191,46 +183,10 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { #ifdef __cplusplus extern "C" { #endif -static PyObject *_wrap_wxValidator_IsSilent(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxValidator_IsSilent",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxValidator_IsSilent(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _arg0 = (int ) TRUE; - char *_kwnames[] = { "doIt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxValidator_SetBellOnError",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxValidator_SetBellOnError(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxWindow * _result; char *_kwnames[] = { NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) @@ -240,13 +196,7 @@ static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObje _result = (wxWindow *)wxWindow_FindFocus(); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -255,7 +205,6 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec wxWindow * _result; unsigned long _arg0; char *_kwnames[] = { "hWnd", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxWindow_FromHWND",_kwnames,&_arg0)) @@ -265,13 +214,7 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec _result = (wxWindow *)wxWindow_FromHWND(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -328,6 +271,14 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxEvtHandlerTowxObject(void *ptr) { + wxEvtHandler *src; + wxObject *dest; + src = (wxEvtHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxEvtHandler() (new wxEvtHandler()) static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -489,7 +440,6 @@ static PyObject *_wrap_wxEvtHandler_GetNextHandler(PyObject *self, PyObject *arg wxEvtHandler * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvtHandler_GetNextHandler",_kwnames,&_argo0)) @@ -506,13 +456,7 @@ static PyObject *_wrap_wxEvtHandler_GetNextHandler(PyObject *self, PyObject *arg _result = (wxEvtHandler *)wxEvtHandler_GetNextHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -523,7 +467,6 @@ static PyObject *_wrap_wxEvtHandler_GetPreviousHandler(PyObject *self, PyObject wxEvtHandler * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvtHandler_GetPreviousHandler",_kwnames,&_argo0)) @@ -540,13 +483,7 @@ static PyObject *_wrap_wxEvtHandler_GetPreviousHandler(PyObject *self, PyObject _result = (wxEvtHandler *)wxEvtHandler_GetPreviousHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -697,35 +634,6 @@ static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, P return _resultobj; } -static const char * wxEvtHandler_GetClassName(wxEvtHandler *self) { - return self->GetClassInfo()->GetClassName(); - } -static PyObject *_wrap_wxEvtHandler_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char * _result; - wxEvtHandler * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvtHandler_GetClassName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_GetClassName. Expected _wxEvtHandler_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (char *)wxEvtHandler_GetClassName(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - static void *SwigwxValidatorTowxEvtHandler(void *ptr) { wxValidator *src; wxEvtHandler *dest; @@ -734,6 +642,14 @@ static void *SwigwxValidatorTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxValidatorTowxObject(void *ptr) { + wxValidator *src; + wxObject *dest; + src = (wxValidator *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxValidator() (new wxValidator()) static PyObject *_wrap_new_wxValidator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -766,7 +682,6 @@ static PyObject *_wrap_wxValidator_Clone(PyObject *self, PyObject *args, PyObjec wxValidator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxValidator_Clone",_kwnames,&_argo0)) @@ -783,13 +698,7 @@ static PyObject *_wrap_wxValidator_Clone(PyObject *self, PyObject *args, PyObjec _result = (wxValidator *)wxValidator_Clone(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxValidator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -800,7 +709,6 @@ static PyObject *_wrap_wxValidator_GetWindow(PyObject *self, PyObject *args, PyO wxValidator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxValidator_GetWindow",_kwnames,&_argo0)) @@ -817,13 +725,7 @@ static PyObject *_wrap_wxValidator_GetWindow(PyObject *self, PyObject *args, PyO _result = (wxWindow *)wxValidator_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -863,6 +765,41 @@ static PyObject *_wrap_wxValidator_SetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } +static PyObject *_wrap_wxValidator_IsSilent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxValidator_IsSilent",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxValidator::IsSilent(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _arg0 = (int ) TRUE; + char *_kwnames[] = { "doIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxValidator_SetBellOnError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxValidator::SetBellOnError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxPyValidatorTowxValidator(void *ptr) { wxPyValidator *src; wxValidator *dest; @@ -879,6 +816,14 @@ static void *SwigwxPyValidatorTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyValidatorTowxObject(void *ptr) { + wxPyValidator *src; + wxObject *dest; + src = (wxPyValidator *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPyValidator() (new wxPyValidator()) static PyObject *_wrap_new_wxPyValidator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -904,33 +849,6 @@ static PyObject *_wrap_new_wxPyValidator(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static void wxPyValidator_Destroy(wxPyValidator *self) { delete self; } -static PyObject *_wrap_wxPyValidator_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyValidator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyValidator_Destroy",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyValidator_Destroy. Expected _wxPyValidator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyValidator_Destroy(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -977,6 +895,14 @@ static void *SwigwxWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxWindowTowxObject(void *ptr) { + wxWindow *src; + wxObject *dest; + src = (wxWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1465,7 +1391,6 @@ static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, P long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_FindWindowById",_kwnames,&_argo0,&_arg1)) @@ -1482,13 +1407,7 @@ static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, P _result = (wxWindow *)wxWindow_FindWindowById(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1501,7 +1420,6 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","name", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_FindWindowByName",_kwnames,&_argo0,&_obj1)) @@ -1536,13 +1454,7 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj1) delete _arg1; @@ -1809,7 +1721,6 @@ static PyObject *_wrap_wxWindow_GetEventHandler(PyObject *self, PyObject *args, wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetEventHandler",_kwnames,&_argo0)) @@ -1826,13 +1737,7 @@ static PyObject *_wrap_wxWindow_GetEventHandler(PyObject *self, PyObject *args, _result = (wxEvtHandler *)wxWindow_GetEventHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1907,7 +1812,6 @@ static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args, P wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetGrandParent",_kwnames,&_argo0)) @@ -1924,13 +1828,7 @@ static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args, P _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -2112,7 +2010,6 @@ static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetParent",_kwnames,&_argo0)) @@ -2129,13 +2026,7 @@ static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args, PyObje _result = (wxWindow *)wxWindow_GetParent(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -3208,7 +3099,6 @@ static PyObject *_wrap_wxWindow_PopEventHandler(PyObject *self, PyObject *args, PyObject * _argo0 = 0; int tempbool1 = (int) FALSE; char *_kwnames[] = { "self","deleteHandler", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_PopEventHandler",_kwnames,&_argo0,&tempbool1)) @@ -3226,13 +3116,7 @@ static PyObject *_wrap_wxWindow_PopEventHandler(PyObject *self, PyObject *args, _result = (wxEvtHandler *)wxWindow_PopEventHandler(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4887,7 +4771,6 @@ static PyObject *_wrap_wxWindow_GetToolTip(PyObject *self, PyObject *args, PyObj wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetToolTip",_kwnames,&_argo0)) @@ -4904,13 +4787,7 @@ static PyObject *_wrap_wxWindow_GetToolTip(PyObject *self, PyObject *args, PyObj _result = (wxToolTip *)wxWindow_GetToolTip(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4957,7 +4834,6 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetSizer",_kwnames,&_argo0)) @@ -4974,13 +4850,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec _result = (wxSizer *)wxWindow_GetSizer(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -4991,7 +4861,6 @@ static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyO wxWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetValidator",_kwnames,&_argo0)) @@ -5008,13 +4877,7 @@ static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyO _result = (wxValidator *)wxWindow_GetValidator(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxValidator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5239,6 +5102,14 @@ static void *SwigwxPanelTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPanelTowxObject(void *ptr) { + wxPanel *src; + wxObject *dest; + src = (wxPanel *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5328,7 +5199,6 @@ static PyObject *_wrap_wxPanel_GetDefaultItem(PyObject *self, PyObject *args, Py wxPanel * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPanel_GetDefaultItem",_kwnames,&_argo0)) @@ -5345,13 +5215,7 @@ static PyObject *_wrap_wxPanel_GetDefaultItem(PyObject *self, PyObject *args, Py _result = (wxButton *)wxPanel_GetDefaultItem(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5415,6 +5279,14 @@ static void *SwigwxDialogTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxDialogTowxObject(void *ptr) { + wxDialog *src; + wxObject *dest; + src = (wxDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5868,7 +5740,6 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","message", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDialog_CreateTextSizer",_kwnames,&_argo0,&_obj1)) @@ -5903,13 +5774,7 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj1) delete _arg1; @@ -5925,7 +5790,6 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","flags", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDialog_CreateButtonSizer",_kwnames,&_argo0,&_arg1)) @@ -5942,13 +5806,7 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -5976,6 +5834,14 @@ static void *SwigwxScrolledWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxScrolledWindowTowxObject(void *ptr) { + wxScrolledWindow *src; + wxObject *dest; + src = (wxScrolledWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6146,7 +6012,6 @@ static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject wxScrolledWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrolledWindow_GetTargetWindow",_kwnames,&_argo0)) @@ -6163,13 +6028,7 @@ static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject _result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -6721,6 +6580,14 @@ static void *SwigwxMenuTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMenuTowxObject(void *ptr) { + wxMenu *src; + wxObject *dest; + src = (wxMenu *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMenu(_swigarg0,_swigarg1) (new wxMenu(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7203,7 +7070,6 @@ static PyObject *_wrap_wxMenu_FindItemById(PyObject *self, PyObject *args, PyObj int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenu_FindItemById",_kwnames,&_argo0,&_arg1)) @@ -7220,13 +7086,7 @@ static PyObject *_wrap_wxMenu_FindItemById(PyObject *self, PyObject *args, PyObj _result = (wxMenuItem *)wxMenu_FindItemById(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7628,7 +7488,6 @@ static PyObject *_wrap_wxMenu_Remove(PyObject *self, PyObject *args, PyObject *k int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenu_Remove",_kwnames,&_argo0,&_arg1)) @@ -7645,13 +7504,7 @@ static PyObject *_wrap_wxMenu_Remove(PyObject *self, PyObject *args, PyObject *k _result = (wxMenuItem *)wxMenu_Remove(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7664,7 +7517,6 @@ static PyObject *_wrap_wxMenu_RemoveItem(PyObject *self, PyObject *args, PyObjec PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenu_RemoveItem",_kwnames,&_argo0,&_argo1)) @@ -7688,13 +7540,7 @@ static PyObject *_wrap_wxMenu_RemoveItem(PyObject *self, PyObject *args, PyObjec _result = (wxMenuItem *)wxMenu_RemoveItem(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7891,7 +7737,6 @@ static PyObject *_wrap_wxMenu_GetEventHandler(PyObject *self, PyObject *args, Py wxMenu * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenu_GetEventHandler",_kwnames,&_argo0)) @@ -7908,13 +7753,7 @@ static PyObject *_wrap_wxMenu_GetEventHandler(PyObject *self, PyObject *args, Py _result = (wxEvtHandler *)wxMenu_GetEventHandler(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -7961,7 +7800,6 @@ static PyObject *_wrap_wxMenu_GetInvokingWindow(PyObject *self, PyObject *args, wxMenu * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenu_GetInvokingWindow",_kwnames,&_argo0)) @@ -7978,13 +7816,7 @@ static PyObject *_wrap_wxMenu_GetInvokingWindow(PyObject *self, PyObject *args, _result = (wxWindow *)wxMenu_GetInvokingWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8085,7 +7917,6 @@ static PyObject *_wrap_wxMenu_GetParent(PyObject *self, PyObject *args, PyObject wxMenu * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenu_GetParent",_kwnames,&_argo0)) @@ -8102,13 +7933,7 @@ static PyObject *_wrap_wxMenu_GetParent(PyObject *self, PyObject *args, PyObject _result = (wxMenu *)wxMenu_GetParent(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8128,6 +7953,14 @@ static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMenuBarTowxObject(void *ptr) { + wxMenuBar *src; + wxObject *dest; + src = (wxMenuBar *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMenuBar(_swigarg0) (new wxMenuBar(_swigarg0)) static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8310,7 +8143,6 @@ static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args, PyObjec size_t _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","pos", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_GetMenu",_kwnames,&_argo0,&_arg1)) @@ -8327,13 +8159,7 @@ static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args, PyObjec _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8349,7 +8175,6 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec PyObject * _argo2 = 0; PyObject * _obj3 = 0; char *_kwnames[] = { "self","pos","menu","title", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxMenuBar_Replace",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3)) @@ -8391,13 +8216,7 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj3) delete _arg3; @@ -8413,7 +8232,6 @@ static PyObject *_wrap_wxMenuBar_Remove(PyObject *self, PyObject *args, PyObject size_t _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","pos", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_Remove",_kwnames,&_argo0,&_arg1)) @@ -8430,13 +8248,7 @@ static PyObject *_wrap_wxMenuBar_Remove(PyObject *self, PyObject *args, PyObject _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8639,7 +8451,6 @@ static PyObject *_wrap_wxMenuBar_FindItemById(PyObject *self, PyObject *args, Py int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","id", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_FindItemById",_kwnames,&_argo0,&_arg1)) @@ -8656,13 +8467,7 @@ static PyObject *_wrap_wxMenuBar_FindItemById(PyObject *self, PyObject *args, Py _result = (wxMenuItem *)wxMenuBar_FindItemById(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -8954,6 +8759,14 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxMenuItemTowxObject(void *ptr) { + wxMenuItem *src; + wxObject *dest; + src = (wxMenuItem *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMenuItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxMenuItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9058,7 +8871,6 @@ static PyObject *_wrap_wxMenuItem_GetMenu(PyObject *self, PyObject *args, PyObje wxMenuItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetMenu",_kwnames,&_argo0)) @@ -9075,13 +8887,7 @@ static PyObject *_wrap_wxMenuItem_GetMenu(PyObject *self, PyObject *args, PyObje _result = (wxMenu *)wxMenuItem_GetMenu(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -9407,7 +9213,6 @@ static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyO wxMenuItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetSubMenu",_kwnames,&_argo0)) @@ -9424,13 +9229,7 @@ static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyO _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -10488,13 +10287,13 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_CaptureMouse", (PyCFunction) _wrap_wxWindow_CaptureMouse, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindow", (PyCFunction) _wrap_new_wxWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyValidator__setSelf", (PyCFunction) _wrap_wxPyValidator__setSelf, METH_VARARGS | METH_KEYWORDS }, - { "wxPyValidator_Destroy", (PyCFunction) _wrap_wxPyValidator_Destroy, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyValidator", (PyCFunction) _wrap_new_wxPyValidator, METH_VARARGS | METH_KEYWORDS }, + { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, + { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetWindow", (PyCFunction) _wrap_wxValidator_SetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_GetWindow", (PyCFunction) _wrap_wxValidator_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_Clone", (PyCFunction) _wrap_wxValidator_Clone, METH_VARARGS | METH_KEYWORDS }, { "new_wxValidator", (PyCFunction) _wrap_new_wxValidator, METH_VARARGS | METH_KEYWORDS }, - { "wxEvtHandler_GetClassName", (PyCFunction) _wrap_wxEvtHandler_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_Disconnect", (PyCFunction) _wrap_wxEvtHandler_Disconnect, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_Connect", (PyCFunction) _wrap_wxEvtHandler_Connect, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS }, @@ -10511,8 +10310,6 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, - { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, - { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus @@ -10571,8 +10368,30 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxMenuItem",SwigwxMenuItemTowxObject}, + { "_class_wxObject","_wxMenuItem",SwigwxMenuItemTowxObject}, + { "_class_wxObject","_class_wxMenuBar",SwigwxMenuBarTowxObject}, + { "_class_wxObject","_wxMenuBar",SwigwxMenuBarTowxObject}, + { "_class_wxObject","_class_wxMenu",SwigwxMenuTowxObject}, + { "_class_wxObject","_wxMenu",SwigwxMenuTowxObject}, + { "_class_wxObject","_class_wxScrolledWindow",SwigwxScrolledWindowTowxObject}, + { "_class_wxObject","_wxScrolledWindow",SwigwxScrolledWindowTowxObject}, + { "_class_wxObject","_class_wxDialog",SwigwxDialogTowxObject}, + { "_class_wxObject","_wxDialog",SwigwxDialogTowxObject}, + { "_class_wxObject","_class_wxPanel",SwigwxPanelTowxObject}, + { "_class_wxObject","_wxPanel",SwigwxPanelTowxObject}, + { "_class_wxObject","_class_wxWindow",SwigwxWindowTowxObject}, + { "_class_wxObject","_wxWindow",SwigwxWindowTowxObject}, + { "_class_wxObject","_class_wxPyValidator",SwigwxPyValidatorTowxObject}, + { "_class_wxObject","_wxPyValidator",SwigwxPyValidatorTowxObject}, + { "_class_wxObject","_class_wxValidator",SwigwxValidatorTowxObject}, + { "_class_wxObject","_wxValidator",SwigwxValidatorTowxObject}, + { "_class_wxObject","_class_wxEvtHandler",SwigwxEvtHandlerTowxObject}, + { "_class_wxObject","_wxEvtHandler",SwigwxEvtHandlerTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -10670,6 +10489,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFontList","_class_wxFontList",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxMenuItem",SwigwxMenuItemTowxObject}, + { "_wxObject","_wxMenuItem",SwigwxMenuItemTowxObject}, + { "_wxObject","_class_wxMenuBar",SwigwxMenuBarTowxObject}, + { "_wxObject","_wxMenuBar",SwigwxMenuBarTowxObject}, + { "_wxObject","_class_wxMenu",SwigwxMenuTowxObject}, + { "_wxObject","_wxMenu",SwigwxMenuTowxObject}, + { "_wxObject","_class_wxScrolledWindow",SwigwxScrolledWindowTowxObject}, + { "_wxObject","_wxScrolledWindow",SwigwxScrolledWindowTowxObject}, + { "_wxObject","_class_wxDialog",SwigwxDialogTowxObject}, + { "_wxObject","_wxDialog",SwigwxDialogTowxObject}, + { "_wxObject","_class_wxPanel",SwigwxPanelTowxObject}, + { "_wxObject","_wxPanel",SwigwxPanelTowxObject}, + { "_wxObject","_class_wxWindow",SwigwxWindowTowxObject}, + { "_wxObject","_wxWindow",SwigwxWindowTowxObject}, + { "_wxObject","_class_wxPyValidator",SwigwxPyValidatorTowxObject}, + { "_wxObject","_wxPyValidator",SwigwxPyValidatorTowxObject}, + { "_wxObject","_class_wxValidator",SwigwxValidatorTowxObject}, + { "_wxObject","_wxValidator",SwigwxValidatorTowxObject}, + { "_wxObject","_class_wxEvtHandler",SwigwxEvtHandlerTowxObject}, + { "_wxObject","_wxEvtHandler",SwigwxEvtHandlerTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, @@ -10710,6 +10550,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index bb7a321ced..df27f40d05 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -20,7 +20,7 @@ def wxDLG_SZE(win, size_width, height=None): else: return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) -class wxEvtHandlerPtr : +class wxEvtHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -38,11 +38,9 @@ class wxEvtHandlerPtr : return val def GetNextHandler(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_GetNextHandler,(self,) + _args, _kwargs) - if val: val = wxEvtHandlerPtr(val) return val def GetPreviousHandler(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_GetPreviousHandler,(self,) + _args, _kwargs) - if val: val = wxEvtHandlerPtr(val) return val def SetNextHandler(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_SetNextHandler,(self,) + _args, _kwargs) @@ -56,9 +54,6 @@ class wxEvtHandlerPtr : def Disconnect(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_Disconnect,(self,) + _args, _kwargs) return val - def GetClassName(self, *_args, **_kwargs): - val = apply(windowsc.wxEvtHandler_GetClassName,(self,) + _args, _kwargs) - return val def __repr__(self): return "" % (self.this,) class wxEvtHandler(wxEvtHandlerPtr): @@ -75,11 +70,9 @@ class wxValidatorPtr(wxEvtHandlerPtr): self.thisown = 0 def Clone(self, *_args, **_kwargs): val = apply(windowsc.wxValidator_Clone,(self,) + _args, _kwargs) - if val: val = wxValidatorPtr(val) return val def GetWindow(self, *_args, **_kwargs): val = apply(windowsc.wxValidator_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetWindow(self, *_args, **_kwargs): val = apply(windowsc.wxValidator_SetWindow,(self,) + _args, _kwargs) @@ -98,9 +91,6 @@ class wxPyValidatorPtr(wxValidatorPtr): def __init__(self,this): self.this = this self.thisown = 0 - def Destroy(self, *_args, **_kwargs): - val = apply(windowsc.wxPyValidator_Destroy,(self,) + _args, _kwargs) - return val def _setSelf(self, *_args, **_kwargs): val = apply(windowsc.wxPyValidator__setSelf,(self,) + _args, _kwargs) return val @@ -110,7 +100,7 @@ class wxPyValidator(wxPyValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPyValidator,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyValidator, 0) + self._setSelf(self, wxPyValidator, 1) @@ -164,11 +154,9 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def FindWindowById(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_FindWindowById,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def FindWindowByName(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_FindWindowByName,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def Fit(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Fit,(self,) + _args, _kwargs) @@ -199,7 +187,6 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetEventHandler,(self,) + _args, _kwargs) - if val: val = wxEvtHandlerPtr(val) return val def GetFont(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetFont,(self,) + _args, _kwargs) @@ -211,7 +198,6 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetGrandParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetGrandParent,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetHandle(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetHandle,(self,) + _args, _kwargs) @@ -230,7 +216,6 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetParent,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetPositionTuple(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetPositionTuple,(self,) + _args, _kwargs) @@ -328,7 +313,6 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def PopEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PopEventHandler,(self,) + _args, _kwargs) - if val: val = wxEvtHandlerPtr(val) return val def PushEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PushEventHandler,(self,) + _args, _kwargs) @@ -486,18 +470,15 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetToolTip(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) - if val: val = wxToolTipPtr(val) return val def SetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizer,(self,) + _args, _kwargs) return val def GetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) return val def GetValidator(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetValidator,(self,) + _args, _kwargs) - if val: val = wxValidatorPtr(val) return val def SetValidator(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetValidator,(self,) + _args, _kwargs) @@ -523,24 +504,12 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow methods + # replaces broken shadow method def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - - def GetSizer(self, *_args, **_kwargs): - from sizers import wxSizerPtr - val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) - return val - - def GetToolTip(self, *_args, **_kwargs): - from misc2 import wxToolTipPtr - val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) - if val: val = wxToolTipPtr(val) - return val class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): @@ -560,20 +529,12 @@ class wxPanelPtr(wxWindowPtr): return val def GetDefaultItem(self, *_args, **_kwargs): val = apply(windowsc.wxPanel_GetDefaultItem,(self,) + _args, _kwargs) - if val: val = wxButtonPtr(val) return val def SetDefaultItem(self, *_args, **_kwargs): val = apply(windowsc.wxPanel_SetDefaultItem,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) - - def GetDefaultItem(self): - import controls - val = windowsc.wxPanel_GetDefaultItem(self.this) - val = controls.wxButtonPtr(val) - return val - class wxPanel(wxPanelPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPanel,_args,_kwargs) @@ -625,27 +586,12 @@ class wxDialogPtr(wxPanelPtr): return val def CreateTextSizer(self, *_args, **_kwargs): val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) return val def CreateButtonSizer(self, *_args, **_kwargs): val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) return val def __repr__(self): return "" % (self.this,) - - # replace swig generated shadow methods to resolve import issues - def CreateTextSizer(self, *_args, **_kwargs): - import sizers - val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs) - if val: val = sizers.wxSizerPtr(val) - return val - def CreateButtonSizer(self, *_args, **_kwargs): - import sizers - val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs) - if val: val = sizers.wxSizerPtr(val) - return val - class wxDialog(wxDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxDialog,_args,_kwargs) @@ -670,7 +616,6 @@ class wxScrolledWindowPtr(wxPanelPtr): return val def GetTargetWindow(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_GetTargetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetVirtualSize(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_GetVirtualSize,(self,) + _args, _kwargs) @@ -765,7 +710,6 @@ class wxMenuPtr(wxEvtHandlerPtr): return val def FindItemById(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_FindItemById,(self,) + _args, _kwargs) - if val: val = wxMenuItemPtr(val) return val def GetTitle(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_GetTitle,(self,) + _args, _kwargs) @@ -799,11 +743,9 @@ class wxMenuPtr(wxEvtHandlerPtr): return val def Remove(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_Remove,(self,) + _args, _kwargs) - if val: val = wxMenuItemPtr(val) return val def RemoveItem(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_RemoveItem,(self,) + _args, _kwargs) - if val: val = wxMenuItemPtr(val) return val def Destroy(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_Destroy,(self,) + _args, _kwargs) @@ -825,14 +767,12 @@ class wxMenuPtr(wxEvtHandlerPtr): return val def GetEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_GetEventHandler,(self,) + _args, _kwargs) - if val: val = wxEvtHandlerPtr(val) return val def SetInvokingWindow(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_SetInvokingWindow,(self,) + _args, _kwargs) return val def GetInvokingWindow(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_GetInvokingWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetStyle(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_GetStyle,(self,) + _args, _kwargs) @@ -845,7 +785,6 @@ class wxMenuPtr(wxEvtHandlerPtr): return val def GetParent(self, *_args, **_kwargs): val = apply(windowsc.wxMenu_GetParent,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -872,15 +811,12 @@ class wxMenuBarPtr(wxWindowPtr): return val def GetMenu(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_GetMenu,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def Replace(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_Replace,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def Remove(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_Remove,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def EnableTop(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_EnableTop,(self,) + _args, _kwargs) @@ -896,7 +832,6 @@ class wxMenuBarPtr(wxWindowPtr): return val def FindItemById(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_FindItemById,(self,) + _args, _kwargs) - if val: val = wxMenuItemPtr(val) return val def Enable(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_Enable,(self,) + _args, _kwargs) @@ -932,13 +867,12 @@ class wxMenuBar(wxMenuBarPtr): -class wxMenuItemPtr : +class wxMenuItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 def GetMenu(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_GetMenu,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def SetId(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_SetId,(self,) + _args, _kwargs) @@ -972,7 +906,6 @@ class wxMenuItemPtr : return val def GetSubMenu(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_GetSubMenu,(self,) + _args, _kwargs) - if val: val = wxMenuPtr(val) return val def Enable(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_Enable,(self,) + _args, _kwargs) @@ -1059,18 +992,12 @@ class wxMenuItem(wxMenuItemPtr): #-------------- FUNCTION WRAPPERS ------------------ -wxValidator_IsSilent = windowsc.wxValidator_IsSilent - -wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError - def wxWindow_FindFocus(*_args, **_kwargs): val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) - if val: val = wxWindowPtr(val) return val def wxWindow_FromHWND(*_args, **_kwargs): val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs) - if val: val = wxWindowPtr(val) return val wxWindow_NewControlId = windowsc.wxWindow_NewControlId @@ -1079,6 +1006,10 @@ wxWindow_NextControlId = windowsc.wxWindow_NextControlId wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId +wxValidator_IsSilent = windowsc.wxValidator_IsSilent + +wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError + wxMenuItem_GetLabelFromText = windowsc.wxMenuItem_GetLabelFromText wxMenuItem_GetDefaultMarginWidth = windowsc.wxMenuItem_GetDefaultMarginWidth diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index 05281e7c2a..6e3da7c8ee 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -61,6 +61,7 @@ extern PyObject *SWIG_newvarlink(void); #endif #include #include +#include #ifdef __WXMSW__ #include #endif @@ -143,6 +144,14 @@ static void *SwigwxNotebookEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxNotebookEventTowxObject(void *ptr) { + wxNotebookEvent *src; + wxObject *dest; + src = (wxNotebookEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -277,6 +286,14 @@ static void *SwigwxNotebookTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxNotebookTowxObject(void *ptr) { + wxNotebook *src; + wxObject *dest; + src = (wxNotebook *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -572,7 +589,6 @@ static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, P wxNotebook * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetImageList",_kwnames,&_argo0)) @@ -589,13 +605,7 @@ static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, P _result = (wxImageList *)wxNotebook_GetImageList(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -971,7 +981,6 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","nPage", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1)) @@ -988,13 +997,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1044,6 +1047,14 @@ static void *SwigwxSplitterEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxSplitterEventTowxObject(void *ptr) { + wxSplitterEvent *src; + wxObject *dest; + src = (wxSplitterEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxSplitterEvent_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1132,7 +1143,6 @@ static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyO wxSplitterEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetWindowBeingRemoved",_kwnames,&_argo0)) @@ -1149,13 +1159,7 @@ static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyO _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1203,6 +1207,14 @@ static void *SwigwxSplitterWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSplitterWindowTowxObject(void *ptr) { + wxSplitterWindow *src; + wxObject *dest; + src = (wxSplitterWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1400,7 +1412,6 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *arg wxSplitterWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow1",_kwnames,&_argo0)) @@ -1417,13 +1428,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *arg _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1434,7 +1439,6 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *arg wxSplitterWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow2",_kwnames,&_argo0)) @@ -1451,13 +1455,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *arg _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1846,6 +1844,14 @@ static void *SwigwxTaskBarIconTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxTaskBarIconTowxObject(void *ptr) { + wxTaskBarIcon *src; + wxObject *dest; + src = (wxTaskBarIcon *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxTaskBarIcon() (new wxTaskBarIcon()) static PyObject *_wrap_new_wxTaskBarIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2178,8 +2184,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxTaskBarIcon",SwigwxTaskBarIconTowxObject}, + { "_class_wxObject","_wxTaskBarIcon",SwigwxTaskBarIconTowxObject}, + { "_class_wxObject","_class_wxSplitterWindow",SwigwxSplitterWindowTowxObject}, + { "_class_wxObject","_wxSplitterWindow",SwigwxSplitterWindowTowxObject}, + { "_class_wxObject","_class_wxSplitterEvent",SwigwxSplitterEventTowxObject}, + { "_class_wxObject","_wxSplitterEvent",SwigwxSplitterEventTowxObject}, + { "_class_wxObject","_class_wxNotebook",SwigwxNotebookTowxObject}, + { "_class_wxObject","_wxNotebook",SwigwxNotebookTowxObject}, + { "_class_wxObject","_class_wxNotebookEvent",SwigwxNotebookEventTowxObject}, + { "_class_wxObject","_wxNotebookEvent",SwigwxNotebookEventTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -2332,6 +2350,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxTaskBarIcon",SwigwxTaskBarIconTowxObject}, + { "_wxObject","_wxTaskBarIcon",SwigwxTaskBarIconTowxObject}, + { "_wxObject","_class_wxSplitterWindow",SwigwxSplitterWindowTowxObject}, + { "_wxObject","_wxSplitterWindow",SwigwxSplitterWindowTowxObject}, + { "_wxObject","_class_wxSplitterEvent",SwigwxSplitterEventTowxObject}, + { "_wxObject","_wxSplitterEvent",SwigwxSplitterEventTowxObject}, + { "_wxObject","_class_wxNotebook",SwigwxNotebookTowxObject}, + { "_wxObject","_wxNotebook",SwigwxNotebookTowxObject}, + { "_wxObject","_class_wxNotebookEvent",SwigwxNotebookEventTowxObject}, + { "_wxObject","_wxNotebookEvent",SwigwxNotebookEventTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -2388,6 +2417,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index 293782f021..5c036b69ee 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -65,7 +65,6 @@ class wxNotebookPtr(wxControlPtr): return val def GetImageList(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetImageList,(self,) + _args, _kwargs) - if val: val = wxImageListPtr(val) return val def GetPageImage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetPageImage,(self,) + _args, _kwargs) @@ -99,7 +98,6 @@ class wxNotebookPtr(wxControlPtr): return val def GetPage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetPage,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def ResizeChildren(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_ResizeChildren,(self,) + _args, _kwargs) @@ -130,7 +128,6 @@ class wxSplitterEventPtr(wxCommandEventPtr): return val def GetWindowBeingRemoved(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterEvent_GetWindowBeingRemoved,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetSashPosition(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterEvent_SetSashPosition,(self,) + _args, _kwargs) @@ -165,11 +162,9 @@ class wxSplitterWindowPtr(wxWindowPtr): return val def GetWindow1(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_GetWindow1,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetWindow2(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_GetWindow2,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def Initialize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index 16ce77dd90..e571daa3ad 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -129,6 +129,14 @@ static void *SwigwxSashEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxSashEventTowxObject(void *ptr) { + wxSashEvent *src; + wxObject *dest; + src = (wxSashEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxSashEvent_SetEdge(_swigobj,_swigarg0) (_swigobj->SetEdge(_swigarg0)) static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -319,6 +327,14 @@ static void *SwigwxSashWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSashWindowTowxObject(void *ptr) { + wxSashWindow *src; + wxObject *dest; + src = (wxSashWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSashWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSashWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -858,6 +874,14 @@ static void *SwigwxQueryLayoutInfoEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxQueryLayoutInfoEventTowxObject(void *ptr) { + wxQueryLayoutInfoEvent *src; + wxObject *dest; + src = (wxQueryLayoutInfoEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxQueryLayoutInfoEvent_SetRequestedLength(_swigobj,_swigarg0) (_swigobj->SetRequestedLength(_swigarg0)) static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1150,6 +1174,14 @@ static void *SwigwxCalculateLayoutEventTowxEvent(void *ptr) { return (void *) dest; } +static void *SwigwxCalculateLayoutEventTowxObject(void *ptr) { + wxCalculateLayoutEvent *src; + wxObject *dest; + src = (wxCalculateLayoutEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxCalculateLayoutEvent_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0)) static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1293,6 +1325,14 @@ static void *SwigwxSashLayoutWindowTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxSashLayoutWindowTowxObject(void *ptr) { + wxSashLayoutWindow *src; + wxObject *dest; + src = (wxSashLayoutWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxSashLayoutWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSashLayoutWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1493,6 +1533,14 @@ static PyObject *_wrap_wxSashLayoutWindow_SetOrientation(PyObject *self, PyObjec return _resultobj; } +static void *SwigwxLayoutAlgorithmTowxObject(void *ptr) { + wxLayoutAlgorithm *src; + wxObject *dest; + src = (wxLayoutAlgorithm *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxLayoutAlgorithm() (new wxLayoutAlgorithm()) static PyObject *_wrap_new_wxLayoutAlgorithm(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1802,8 +1850,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxObject","_class_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, + { "_class_wxObject","_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, + { "_class_wxObject","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, + { "_class_wxObject","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, + { "_class_wxObject","_class_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxObject}, + { "_class_wxObject","_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxObject}, + { "_class_wxObject","_class_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxObject}, + { "_class_wxObject","_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxObject}, + { "_class_wxObject","_class_wxSashWindow",SwigwxSashWindowTowxObject}, + { "_class_wxObject","_wxSashWindow",SwigwxSashWindowTowxObject}, + { "_class_wxObject","_class_wxSashEvent",SwigwxSashEventTowxObject}, + { "_class_wxObject","_wxSashEvent",SwigwxSashEventTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -1973,6 +2035,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxObject","_class_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, + { "_wxObject","_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, + { "_wxObject","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, + { "_wxObject","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, + { "_wxObject","_class_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxObject}, + { "_wxObject","_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxObject}, + { "_wxObject","_class_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxObject}, + { "_wxObject","_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxObject}, + { "_wxObject","_class_wxSashWindow",SwigwxSashWindowTowxObject}, + { "_wxObject","_wxSashWindow",SwigwxSashWindowTowxObject}, + { "_wxObject","_class_wxSashEvent",SwigwxSashEventTowxObject}, + { "_wxObject","_wxSashEvent",SwigwxSashEventTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, @@ -2032,6 +2107,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/windows3.py b/wxPython/src/msw/windows3.py index 7a6fd3ac16..dca7c48405 100644 --- a/wxPython/src/msw/windows3.py +++ b/wxPython/src/msw/windows3.py @@ -221,7 +221,7 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr): -class wxLayoutAlgorithmPtr : +class wxLayoutAlgorithmPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 20c5cc2b37..5cbda48fa6 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -687,8 +687,13 @@ static wxPyCoreAPI API = { wxPyCBH_callCallback, wxPyCBH_callCallbackObj, wxPyCBH_delete, + + wxPyClassExists, + wxPyMake_wxObject, + wxPyPtrTypeMap_Add, }; + #ifdef __cplusplus extern "C" { #endif @@ -948,6 +953,14 @@ static void *SwigwxPyAppTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyAppTowxObject(void *ptr) { + wxPyApp *src; + wxObject *dest; + src = (wxPyApp *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static wxPyApp *new_wxPyApp() { wxPythonApp = new wxPyApp(); return wxPythonApp; @@ -1156,7 +1169,6 @@ static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args, PyOb wxPyApp * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyApp_GetTopWindow",_kwnames,&_argo0)) @@ -1173,13 +1185,7 @@ static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args, PyOb _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1871,6 +1877,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -1880,6 +1887,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxPyApp",SwigwxPyAppTowxObject}, + { "_class_wxObject","_wxPyApp",SwigwxPyAppTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -2096,6 +2106,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, + { "_wxObject","_class_wxPyApp",SwigwxPyAppTowxObject}, + { "_wxObject","_wxPyApp",SwigwxPyAppTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -2172,6 +2185,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index b651c3792a..7a135d91c7 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -64,7 +64,6 @@ class wxPyAppPtr(wxEvtHandlerPtr): return val def GetTopWindow(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetTopWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def GetVendorName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetVendorName,(self,) + _args, _kwargs) @@ -1544,11 +1543,14 @@ wxPyDefaultSize = wxDefaultSize def wxPyTypeCast(obj, typeStr): if obj is None: return None + theClass = globals()[typeStr+"Ptr"] + typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr) if hasattr(obj, "this"): + if obj.__class__ is theClass: # if already the right type then just return it + return obj newPtr = ptrcast(obj.this, typeStr+"_p") else: newPtr = ptrcast(obj, typeStr+"_p") - theClass = globals()[typeStr+"Ptr"] theObj = theClass(newPtr) if hasattr(obj, "this"): theObj.thisown = obj.thisown @@ -1683,4 +1685,6 @@ class __wxPyCleanup: self.cleanup() __cleanMeUp = __wxPyCleanup() + +#---------------------------------------------------------------------------- #---------------------------------------------------------------------------- diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index 99df23b9e7..140215972a 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -288,6 +288,55 @@ $target = t_output_helper($target, o); } +//--------------------------------------------------------------------------- +// Typemaps to convert return values that are base class pointers +// to the real derived type, if possible. See wxPyMake_wxObject in +// helpers.cpp + + +%typemap(python, out) wxButton* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxControl* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxDC* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxEvtHandler* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxFSFile* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxFileSystem* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxFrame* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxGrid* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxGridTableBase* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxImageList* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxListItem* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMDIChildFrame* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMDIClientWindow* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMenu* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMenuBar* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMenuItem* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxMouseEvent* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxNotebook* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxObject* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPyPrintout* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxSizer* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxSizer* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxStaticBox* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxStatusBar* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxTextCtrl* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxToolBar* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxToolBarBase* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxToolBarToolBase* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxToolTip* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxValidator* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxWindow* { $target = wxPyMake_wxObject($source); } + + +//%typemap(python, out) wxHtmlCell* { $target = wxPyMake_wxObject($source); } +//%typemap(python, out) wxHtmlContainerCell* { $target = wxPyMake_wxObject($source); } +//%typemap(python, out) wxHtmlParser* { $target = wxPyMake_wxObject($source); } +//%typemap(python, out) wxHtmlWinParser* { $target = wxPyMake_wxObject($source); } + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- + + + + + diff --git a/wxPython/src/printfw.i b/wxPython/src/printfw.i index 2ca9a23f41..d1cb54d6eb 100644 --- a/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -41,7 +41,7 @@ -class wxPrintData { +class wxPrintData : public wxObject { public: wxPrintData(); ~wxPrintData(); @@ -112,7 +112,7 @@ public: //--------------------------------------------------------------------------- -class wxPageSetupDialogData { +class wxPageSetupDialogData : public wxObject { public: wxPageSetupDialogData(); ~wxPageSetupDialogData(); @@ -165,7 +165,7 @@ public: //---------------------------------------------------------------------- -class wxPrintDialogData { +class wxPrintDialogData : public wxObject { public: wxPrintDialogData(); ~wxPrintDialogData(); @@ -275,7 +275,7 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); // Now define the custom class for SWIGging -%name(wxPrintout) class wxPyPrintout { +%name(wxPrintout) class wxPyPrintout : public wxObject { public: wxPyPrintout(const char* title = "Printout"); @@ -304,7 +304,7 @@ public: //---------------------------------------------------------------------- -class wxPrinter { +class wxPrinter : public wxObject { public: wxPrinter(wxPrintDialogData* data = NULL); ~wxPrinter(); @@ -320,7 +320,7 @@ public: //---------------------------------------------------------------------- -class wxPrintPreview { +class wxPrintPreview : public wxObject { public: wxPrintPreview(wxPyPrintout* printout, wxPyPrintout* printoutForPrinting, wxPrintData* data=NULL); // ~wxPrintPreview(); **** ???? @@ -364,6 +364,11 @@ public: }; //---------------------------------------------------------------------- + +%init %{ + wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout"); +%} + //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/wxPython/src/sizers.i b/wxPython/src/sizers.i index 1c025d3f92..5721368051 100644 --- a/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -14,6 +14,8 @@ %{ #include "helpers.h" + +#include %} //---------------------------------------------------------------------- @@ -33,7 +35,7 @@ //--------------------------------------------------------------------------- -class wxSizerItem { +class wxSizerItem : public wxObject { public: // No need to ever create one directly in Python... @@ -85,7 +87,7 @@ public: //--------------------------------------------------------------------------- -class wxSizer { +class wxSizer : public wxObject { public: // wxSizer(); **** abstract, can't instantiate // ~wxSizer(); diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index 567022cea3..03a28cfb5e 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -85,7 +85,7 @@ enum wxToolBarToolStyle -class wxToolBarToolBase { +class wxToolBarToolBase : public wxObject { public: // wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL, // int id = wxID_SEPARATOR, @@ -307,120 +307,5 @@ public: }; //--------------------------------------------------------------------------- - - - -#ifdef THE_OLD_ONE - -class wxToolBarTool { -public: - wxToolBarTool(); - ~wxToolBarTool(); - void SetSize( long w, long h ) - long GetWidth (); - long GetHeight (); - wxControl *GetControl(); - -public: - int m_toolStyle; - wxObject * m_clientData; - int m_index; - long m_x; - long m_y; - long m_width; - long m_height; - bool m_toggleState; - bool m_isToggle; - bool m_deleteSecondBitmap; - bool m_enabled; - wxBitmap m_bitmap1; - wxBitmap m_bitmap2; - bool m_isMenuCommand; - wxString m_shortHelpString; - wxString m_longHelpString; -}; - - - -// class wxToolBarBase : public wxControl { -// public: - -class wxToolBar : public wxControl { -public: - wxToolBar(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTB_HORIZONTAL | wxNO_BORDER, - char* name = "toolBar"); - - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" - - - bool AddControl(wxControl * control); - void AddSeparator(); - void ClearTools(); - - // Ignoge the clientData for now... - %addmethods { - wxToolBarTool* AddTool(int toolIndex, - const wxBitmap& bitmap1, - const wxBitmap& bitmap2 = wxNullBitmap, - int isToggle = FALSE, - long xPos = -1, - long yPos = -1, - //wxObject* clientData = NULL, - const wxString& shortHelpString = wxPyEmptyStr, - const wxString& longHelpString = wxPyEmptyStr) { - return self->AddTool(toolIndex, bitmap1, bitmap2, - isToggle, xPos, yPos, NULL, - shortHelpString, longHelpString); - } - - wxToolBarTool* AddSimpleTool(int toolIndex, - const wxBitmap& bitmap, - const wxString& shortHelpString = wxPyEmptyStr, - const wxString& longHelpString = wxPyEmptyStr) { - return self->AddTool(toolIndex, bitmap, wxNullBitmap, - FALSE, -1, -1, NULL, - shortHelpString, longHelpString); - } - } - - - void EnableTool(int toolIndex, bool enable); -#ifdef __WXMSW__ - wxToolBarTool* FindToolForPosition(long x, long y); - wxSize GetToolSize(); - wxSize GetToolBitmapSize(); - void SetToolBitmapSize(const wxSize& size); - wxSize GetMaxSize(); -#endif - wxSize GetToolMargins(); -// wxObject* GetToolClientData(int toolIndex); - bool GetToolEnabled(int toolIndex); - wxString GetToolLongHelp(int toolIndex); - int GetToolPacking(); - int GetToolSeparation(); - wxString GetToolShortHelp(int toolIndex); - bool GetToolState(int toolIndex); - - - bool Realize(); - - void SetToolLongHelp(int toolIndex, const wxString& helpString); - void SetToolShortHelp(int toolIndex, const wxString& helpString); - void SetMargins(const wxSize& size); - void SetToolPacking(int packing); - void SetToolSeparation(int separation); - void ToggleTool(int toolIndex, const bool toggle); - void SetToggle(int toolIndex, bool toggle); - void SetMaxRowsCols(int rows, int cols); - int GetMaxRows(); - int GetMaxCols(); -}; - - -#endif - //--------------------------------------------------------------------------- diff --git a/wxPython/src/streams.i b/wxPython/src/streams.i index 84020cb393..57daa51833 100644 --- a/wxPython/src/streams.i +++ b/wxPython/src/streams.i @@ -53,28 +53,7 @@ if ($source) { _ptr = new wxPyInputStream($source); } - if (_ptr) { - char swigptr[64]; - SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - - PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); - if (! classobj) { - Py_INCREF(Py_None); - $target = Py_None; - } else { - PyObject* arg = Py_BuildValue("(s)", swigptr); - $target = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - // set ThisOwn - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString($target, "thisown", one); - Py_DECREF(one); - } - } else { - Py_INCREF(Py_None); - $target = Py_None; - } + $target = wxPyConstructObject(_ptr, "wxInputStream", TRUE); } //---------------------------------------------------------------------- @@ -505,3 +484,10 @@ public: } +//---------------------------------------------------------------------- + +%init %{ + wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream"); +%} + +//---------------------------------------------------------------------- diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 91d186aeea..8bd88ab478 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -16,6 +16,7 @@ %{ #include "helpers.h" #include +#include %} //---------------------------------------------------------------------- @@ -38,7 +39,7 @@ //--------------------------------------------------------------------------- -class wxEvtHandler { +class wxEvtHandler : public wxObject { public: wxEvtHandler(); @@ -70,12 +71,6 @@ public: (wxObjectEventFunction) &wxPyCallback::EventThunker); } - - // This really belongs in the wxObject base class. It's probably - // time to actually add it... - const char* GetClassName() { - return self->GetClassInfo()->GetClassName(); - } } // %pragma(python) addtoclass = " @@ -116,6 +111,9 @@ public: wxWindow* GetWindow(); void SetWindow(wxWindow* window); + static bool IsSilent(); + static void SetBellOnError(int doIt = TRUE); + // // Properties list // %pragma(python) addtoclass = " // _prop_list_ = { @@ -125,15 +123,6 @@ public: // " }; -%inline %{ - bool wxValidator_IsSilent() { - return wxValidator::IsSilent(); - } - - void wxValidator_SetBellOnError(int doIt = TRUE) { - wxValidator::SetBellOnError(doIt); - } -%} //---------------------------------------------------------------------- %{ @@ -142,7 +131,6 @@ class wxPyValidator : public wxValidator { public: wxPyValidator() { } -// wxPyValidator(const wxPyValidator& other); ~wxPyValidator() { } @@ -170,12 +158,12 @@ public: return ptr; } + DEC_PYCALLBACK_BOOL_WXWIN(Validate); DEC_PYCALLBACK_BOOL_(TransferToWindow); DEC_PYCALLBACK_BOOL_(TransferFromWindow); PYPRIVATE; -// PyObject* m_data; }; IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate); @@ -189,12 +177,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); class wxPyValidator : public wxValidator { public: wxPyValidator(); -// ~wxPyValidator(); - - %addmethods { void Destroy() { delete self; } } void _setSelf(PyObject* self, PyObject* _class, int incref=TRUE); - %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyValidator, 0)" + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyValidator, 1)" }; @@ -387,24 +372,12 @@ public: void SetCaret(wxCaret *caret); wxCaret *GetCaret(); - %pragma(python) addtoclass = "# replaces broken shadow methods + %pragma(python) addtoclass = "# replaces broken shadow method def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - - def GetSizer(self, *_args, **_kwargs): - from sizers import wxSizerPtr - val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) - return val - - def GetToolTip(self, *_args, **_kwargs): - from misc2 import wxToolTipPtr - val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) - if val: val = wxToolTipPtr(val) - return val " @@ -507,14 +480,6 @@ public: wxButton* GetDefaultItem(); void SetDefaultItem(wxButton *btn); - // fix some SWIG trouble... - %pragma(python) addtoclass = " - def GetDefaultItem(self): - import controls - val = windowsc.wxPanel_GetDefaultItem(self.this) - val = controls.wxButtonPtr(val) - return val -" }; //--------------------------------------------------------------------------- @@ -548,20 +513,6 @@ public: wxSizer* CreateTextSizer( const wxString &message ); wxSizer* CreateButtonSizer( long flags ); - %pragma(python) addtoclass = " - # replace swig generated shadow methods to resolve import issues - def CreateTextSizer(self, *_args, **_kwargs): - import sizers - val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs) - if val: val = sizers.wxSizerPtr(val) - return val - def CreateButtonSizer(self, *_args, **_kwargs): - import sizers - val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs) - if val: val = sizers.wxSizerPtr(val) - return val -" - }; //--------------------------------------------------------------------------- @@ -707,7 +658,7 @@ public: //---------------------------------------------------------------------- -class wxMenuItem { +class wxMenuItem : public wxObject { public: wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_SEPARATOR, const wxString& text = wxPyEmptyStr, diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 8be7dabf60..581c663807 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -19,6 +19,7 @@ #endif #include #include +#include #ifdef __WXMSW__ #include #endif diff --git a/wxPython/src/windows3.i b/wxPython/src/windows3.i index 1bd4260499..58c9c0c76a 100644 --- a/wxPython/src/windows3.i +++ b/wxPython/src/windows3.i @@ -172,7 +172,7 @@ public: //--------------------------------------------------------------------------- -class wxLayoutAlgorithm { +class wxLayoutAlgorithm : public wxObject { public: wxLayoutAlgorithm(); ~wxLayoutAlgorithm(); diff --git a/wxPython/src/wx.i b/wxPython/src/wx.i index 0f7cd3012e..30dcfe2d2b 100644 --- a/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -186,8 +186,13 @@ static wxPyCoreAPI API = { wxPyCBH_callCallback, wxPyCBH_callCallbackObj, wxPyCBH_delete, + + wxPyClassExists, + wxPyMake_wxObject, + wxPyPtrTypeMap_Add, }; + %} -- 2.45.2