]> git.saurik.com Git - wxWidgets.git/commitdiff
Updated to SWIG 1.3.24 (plus a patch that corrects a bug and adds back
authorRobin Dunn <robin@alldunn.com>
Thu, 23 Dec 2004 20:44:09 +0000 (20:44 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 23 Dec 2004 20:44:09 +0000 (20:44 +0000)
some things that were changed/removed from my patch I submitted to
them.)

Since it is now possible easily and simply share the SWIG type tables
across modules I reverted to always using the stock SWIG runtime
instead of my slightly hacked up version of it exported via the
wxPython C API.

The %name directive is now deprecated so replaced most uses of it with
a custom %Rename macro that uses %rename internally.  These will
evetually need to be replaced with a DocDecl macro when docstrings are
added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

77 files changed:
wxPython/config.py
wxPython/contrib/gizmos/gizmos.i
wxPython/contrib/glcanvas/glcanvas.i
wxPython/contrib/iewin/iewin.i
wxPython/contrib/ogl/_oglshapes.i
wxPython/contrib/ogl/_oglshapes2.i
wxPython/include/wx/wxPython/wxPython.h
wxPython/include/wx/wxPython/wxPython_int.h
wxPython/setup.py
wxPython/src/_artprov.i
wxPython/src/_bitmap.i
wxPython/src/_core_api.i
wxPython/src/_cursor.i
wxPython/src/_datetime.i
wxPython/src/_dc.i
wxPython/src/_defs.i
wxPython/src/_dirctrl.i
wxPython/src/_dnd.i
wxPython/src/_dragimg.i
wxPython/src/_filesys.i
wxPython/src/_font.i
wxPython/src/_gauge.i
wxPython/src/_gbsizer.i
wxPython/src/_gdicmn.i
wxPython/src/_icon.i
wxPython/src/_image.i
wxPython/src/_imaglist.i
wxPython/src/_listbox.i
wxPython/src/_listctrl.i
wxPython/src/_log.i
wxPython/src/_mdi.i
wxPython/src/_menu.i
wxPython/src/_mimetype.i
wxPython/src/_misc.i
wxPython/src/_notebook.i
wxPython/src/_panel.i
wxPython/src/_popupwin.i
wxPython/src/_printfw.i
wxPython/src/_process.i
wxPython/src/_pycontrol.i
wxPython/src/_pywindows.i
wxPython/src/_radio.i
wxPython/src/_region.i
wxPython/src/_sashwin.i
wxPython/src/_scrolbar.i
wxPython/src/_settings.i
wxPython/src/_sizers.i
wxPython/src/_slider.i
wxPython/src/_sound.i
wxPython/src/_spin.i
wxPython/src/_statctrls.i
wxPython/src/_statusbar.i
wxPython/src/_streams.i
wxPython/src/_taskbar.i
wxPython/src/_textctrl.i
wxPython/src/_tglbtn.i
wxPython/src/_timer.i
wxPython/src/_toolbar.i
wxPython/src/_toplvl.i
wxPython/src/_treectrl.i
wxPython/src/_vscroll.i
wxPython/src/_window.i
wxPython/src/_xml.i
wxPython/src/_xmlhandler.i
wxPython/src/_xmlres.i
wxPython/src/_xmlsub.i
wxPython/src/common.swg [deleted file]
wxPython/src/grid.i
wxPython/src/html.i
wxPython/src/libpy.c [deleted file]
wxPython/src/media.i
wxPython/src/my_fragments.i [deleted file]
wxPython/src/pyfragments.swg [new file with mode: 0644]
wxPython/src/pyrun.swg [deleted file]
wxPython/src/python.swg [deleted file]
wxPython/src/webkit.i
wxPython/src/wizard.i

index 94e9e9c76aa2316c3d4bcff0e33f65f6ee549fa1..158d6e79a331b3952cc618ff4e0b47ef926ff1b2 100644 (file)
@@ -644,7 +644,7 @@ if os.name == 'nt':
                 (WXPLAT, None),
                 ('WXUSINGDLL', '1'),
 
-                ('SWIG_GLOBAL', None),
+                ('SWIG_TYPE_TABLE', 'wxPython_type_table'),
                 ('WXP_USE_THREAD', '1'),
                 ]
 
@@ -698,7 +698,7 @@ if os.name == 'nt':
 elif os.name == 'posix':
     WXDIR = '..'
     includes = ['include', 'src']
-    defines = [('SWIG_GLOBAL', None),
+    defines = [('SWIG_TYPE_TABLE', 'wxPython_type_table'),
                ('HAVE_CONFIG_H', None),
                ('WXP_USE_THREAD', '1'),
                ]
@@ -813,7 +813,6 @@ swig_args = ['-c++',
 
              '-I' + opj(WXPY_SRC, 'src'),
              '-D'+WXPLAT,
-             '-noruntime'
              ]
 if UNICODE:
     swig_args.append('-DwxUSE_UNICODE')
@@ -823,10 +822,7 @@ if FULL_DOCS:
     
 
 swig_deps = [ opj(WXPY_SRC, 'src/my_typemaps.i'),
-              opj(WXPY_SRC, 'src/my_fragments.i'),
-              opj(WXPY_SRC, 'src/common.swg'),
-              opj(WXPY_SRC, 'src/pyrun.swg'),
-              opj(WXPY_SRC, 'src/python.swg'),
+              opj(WXPY_SRC, 'src/pyfragments.swg'),
               ]
 
 depends = [ #'include/wx/wxPython/wxPython.h',
index e0496bd699f03f7b476f10acbf5a5d752ba1206a..bb20287ecd154d405a41eb52cae7bdc623c6e6da 100644 (file)
@@ -150,7 +150,7 @@ public:
                         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
                         long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
                         const wxString& name = wxPyDynamicSashNameStr);
-    %name(PreDynamicSashWindow)wxDynamicSashWindow();
+    %RenameCtor(PreDynamicSashWindow, wxDynamicSashWindow());
 
     bool Create(wxWindow *parent, wxWindowID id=-1,
                 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
@@ -305,7 +305,8 @@ public:
 
 MustHaveApp(wxPyTreeCompanionWindow);
 
-%name(TreeCompanionWindow) class wxPyTreeCompanionWindow: public wxWindow
+%rename(TreeCompanionWindow) wxPyTreeCompanionWindow;
+class wxPyTreeCompanionWindow: public wxWindow
 {
 public:
     %pythonAppend wxPyTreeCompanionWindow         "self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow)"
@@ -398,7 +399,7 @@ public:
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style =  wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
-    %name(PreLEDNumberCtrl) wxLEDNumberCtrl();
+    %RenameCtor(PreLEDNumberCtrl,  wxLEDNumberCtrl());
 
     bool Create(wxWindow *parent, wxWindowID id = -1,
                     const wxPoint& pos = wxDefaultPosition,
@@ -521,7 +522,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeListCtrl, wxTreeListCtrl)
 
 MustHaveApp(wxPyTreeListCtrl);
 
-%name(TreeListCtrl) class wxPyTreeListCtrl : public wxControl
+%rename(TreeListCtrl) wxPyTreeListCtrl;
+class wxPyTreeListCtrl : public wxControl
 {
 public:
     %pythonAppend wxPyTreeListCtrl         "self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl)"
@@ -533,7 +535,7 @@ public:
                    long style = wxTR_DEFAULT_STYLE,
                    const wxValidator &validator = wxDefaultValidator,
                    const wxString& name = wxPyTreeListCtrlNameStr );
-    %name(PreTreeListCtrl)wxPyTreeListCtrl();
+    %RenameCtor(PreTreeListCtrl, wxPyTreeListCtrl());
 
     bool Create(wxWindow *parent, wxWindowID id = -1,
                 const wxPoint& pos = wxDefaultPosition,
@@ -590,11 +592,11 @@ public:
 //     void AddColumn(const wxString& text,
 //                    size_t width,
 //                    wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
-    %name(AddColumnInfo) void AddColumn(const wxTreeListColumnInfo& col);
+    %Rename(AddColumnInfo,  void,  AddColumn(const wxTreeListColumnInfo& col));
 
     // inserts a column before the given one
     void InsertColumn(size_t before, const wxString& text);
-    %name(InsertColumnInfo) void InsertColumn(size_t before, const wxTreeListColumnInfo& col);
+    %Rename(InsertColumnInfo,  void,  InsertColumn(size_t before, const wxTreeListColumnInfo& col));
 
     // deletes the given column - does not delete the corresponding column
     // of each item
@@ -861,12 +863,12 @@ public:
                             wxPyTreeItemData *data = NULL);
 
     // insert a new item before the one with the given index
-    %name(InsertItemBefore)
-        wxTreeItemId InsertItem(const wxTreeItemId& parent,
+    %Rename(InsertItemBefore, 
+        wxTreeItemId InsertItem(const wxTreeItemId& parent,
                                 size_t index,
                                 const wxString& text,
                                 int image = -1, int selectedImage = -1,
-                                wxPyTreeItemData *data = NULL);
+                                wxPyTreeItemData *data = NULL));
 
     // insert a new item in as the last child of the parent
     wxTreeItemId AppendItem(const wxTreeItemId& parent,
index 5c44932c06d48f492c57bdec95e1129b0f27f5a4..a8f7da4d85531854aa9046cd27f8ab476608b2a0 100644 (file)
@@ -134,7 +134,7 @@ public:
                const wxPalette& palette = wxNullPalette);
 
     %pythonAppend wxGLCanvas   "val._setOORInfo(val)"
-    %name(GLCanvasWithContext)
+    %RenameCtor(GLCanvasWithContext, 
         wxGLCanvas( wxWindow *parent,
                     const wxGLContext *shared = NULL,
                     wxWindowID id = -1,
@@ -143,7 +143,7 @@ public:
                     long style = 0,
                     const wxString& name = wxPyGLCanvasNameStr,
                     int *attribList = NULL,
-                    const wxPalette& palette = wxNullPalette );
+                    const wxPalette& palette = wxNullPalette ));
 
 
     void SetCurrent();
index d232b5a42b8329070699d99bb8547635e6b5ec7e..f55d9260a4db6a5c96e7b92449b1c5ea1d5da504 100644 (file)
@@ -107,7 +107,7 @@ public:
     bool GoForward();
     bool GoHome();
     bool GoSearch();
-    %name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
+    %Rename(RefreshPage, bool,  Refresh(wxIEHtmlRefreshLevel level));
     bool Stop();
 
 };
index 891828c550118c746b175283f8452aaedf347724..10ed873632039787e53e5a6e3441ac48763ce13f 100644 (file)
@@ -412,9 +412,9 @@ public:
         }
     }
 
-    %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
+    %Rename(AddSimpleConstraint, wxOGLConstraint*,  AddConstraint(int type,
                                                              wxPyShape *constraining,
-                                                             wxPyShape *constrained);
+                                                             wxPyShape *constrained));
 
     void CalculateSize();
     bool ContainsDivision(wxPyDivisionShape *division);
index 7dce30b7bdaae5d3e7ce45a431e6bec2cd5de116..bd2fcdd66124d2b4295480dbbffb4b9a65335a2c 100644 (file)
@@ -163,13 +163,13 @@ public:
     bool ClearArrow(const wxString& name);
     void ClearArrowsAtPosition(int position = -1);
     void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset);
-    %name(DeleteArrowHeadId)bool DeleteArrowHead(long arrowId);
+    %Rename(DeleteArrowHeadId, bool,  DeleteArrowHead(long arrowId));
     bool DeleteArrowHead(int position, const wxString& name);
     bool DeleteLineControlPoint();
     void DrawArrows(wxDC& dc);
     void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
     void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
-    %name(FindArrowHeadId)wxArrowHead * FindArrowHead(long arrowId);
+    %Rename(FindArrowHeadId, wxArrowHead *,  FindArrowHead(long arrowId));
     wxArrowHead * FindArrowHead(int position, const wxString& name);
     void FindLineEndPoints(double *OUTPUT, double *OUTPUT,
                            double *OUTPUT, double *OUTPUT);
index dda85883aab218ffbf642fe98c3a826e9f76fc3c..f95a1cb3eb4ff93c489b1cb0f1d63a76eb15aa5c 100644 (file)
@@ -46,7 +46,7 @@ static bool wxPyCoreAPI_IMPORT()
 inline wxPyCoreAPI* wxPyGetCoreAPIPtr()
 {
     if (wxPyCoreAPIPtr == NULL) wxPyCoreAPI_IMPORT();
-    // wxASSERT_MSW(wxPyCoreAPIPtr != NULL, wxT("wxPyCoreAPIPtr is NULL!!!"));  // uncomment when needed for debugging
+    // wxASSERT_MSG(wxPyCoreAPIPtr != NULL, wxT("wxPyCoreAPIPtr is NULL!!!"));  // uncomment when needed for debugging
     return wxPyCoreAPIPtr;
 }
 
@@ -55,24 +55,6 @@ inline wxPyCoreAPI* wxPyGetCoreAPIPtr()
 // via the API pointer retrieved above.  TODO: Should these be made into
 // inline fucntions?
 
-#define SWIG_Python_TypeRegister(a)             (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeRegister(a))
-#define SWIG_Python_TypeCheck(a,b)              (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeCheck(a,b))
-#define SWIG_Python_TypeCast(a,b)               (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeCast(a,b))
-#define SWIG_Python_TypeDynamicCast(a,b)        (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeDynamicCast(a,b))
-#define SWIG_Python_TypeName(a)                 (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeName(a))
-#define SWIG_Python_TypeQuery(a)                (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeQuery(a))
-#define SWIG_Python_TypeClientData(a,b)         (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeClientData(a,b))
-#define SWIG_Python_newvarlink()                (wxPyGetCoreAPIPtr()->p_SWIG_Python_newvarlink())
-#define SWIG_Python_addvarlink(a,b,c,d)         (wxPyGetCoreAPIPtr()->p_SWIG_Python_addvarlink(a,b,c,d))
-#define SWIG_Python_ConvertPtr(a,b,c,d)         (wxPyGetCoreAPIPtr()->p_SWIG_Python_ConvertPtr(a,b,c,d))
-#define SWIG_Python_ConvertPacked(a,b,c,d,e)    (wxPyGetCoreAPIPtr()->p_SWIG_Python_ConvertPacked(a,b,c,d,e))
-#define SWIG_Python_PackData(a,b,c)             (wxPyGetCoreAPIPtr()->p_SWIG_Python_PackData(a,b,c))
-#define SWIG_Python_UnpackData(a,b,c)           (wxPyGetCoreAPIPtr()->p_SWIG_Python_UnpackData(a,b,c))
-#define SWIG_Python_NewPointerObj(a,b,c)        (wxPyGetCoreAPIPtr()->p_SWIG_Python_NewPointerObj(a,b,c))
-#define SWIG_Python_NewPackedObj(a,b,c)         (wxPyGetCoreAPIPtr()->p_SWIG_Python_NewPackedObj(a,b,c))
-#define SWIG_Python_InstallConstants(a,b)       (wxPyGetCoreAPIPtr()->p_SWIG_Python_InstallConstants(a,b))
-#define SWIG_Python_MustGetPtr(a,b,c,d)         (wxPyGetCoreAPIPtr()->p_SWIG_Python_MustGetPtr(a,b,c,d))
-
 #define wxPyCheckSwigType(a)                    (wxPyGetCoreAPIPtr()->p_wxPyCheckSwigType(a))
 #define wxPyConstructObject(a,b,c)              (wxPyGetCoreAPIPtr()->p_wxPyConstructObject(a,b,c))
 #define wxPyConvertSwigPtr(a,b,c)               (wxPyGetCoreAPIPtr()->p_wxPyConvertSwigPtr(a,b,c))
index 336c20c33e8bc40bb1d5555337d42496cba04404..3e815983489d1d19de3f32a689bcb41afb5c7449 100644 (file)
@@ -328,51 +328,9 @@ wxPyCBInputStream* wxPyCBInputStream_create(PyObject *py, bool block);
 // in another shared library.
 
 class wxPyCallbackHelper;
-struct swig_type_info;
-struct swig_const_info;
-
-// Make SunCC happy and make typedef's for these that are extern "C"
-typedef swig_type_info* (*p_SWIG_Python_TypeRegister_t)(swig_type_info *);
-typedef swig_type_info* (*p_SWIG_Python_TypeCheck_t)(char *c, swig_type_info *);
-typedef void*           (*p_SWIG_Python_TypeCast_t)(swig_type_info *, void *);
-typedef swig_type_info* (*p_SWIG_Python_TypeDynamicCast_t)(swig_type_info *, void **);
-typedef const char*     (*p_SWIG_Python_TypeName_t)(const swig_type_info *);
-typedef const char *    (*p_SWIG_Python_TypePrettyName_t)(const swig_type_info *);
-typedef swig_type_info* (*p_SWIG_Python_TypeQuery_t)(const char *);
-typedef void            (*p_SWIG_Python_TypeClientData_t)(swig_type_info *, void *);
-typedef PyObject*       (*p_SWIG_Python_newvarlink_t)(void);
-typedef void            (*p_SWIG_Python_addvarlink_t)(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-typedef int             (*p_SWIG_Python_ConvertPtr_t)(PyObject *, void **, swig_type_info *, int);
-typedef int             (*p_SWIG_Python_ConvertPacked_t)(PyObject *, void *, int sz, swig_type_info *, int);
-typedef char*           (*p_SWIG_Python_PackData_t)(char *c, void *, int);
-typedef char*           (*p_SWIG_Python_UnpackData_t)(char *c, void *, int);
-typedef PyObject*       (*p_SWIG_Python_NewPointerObj_t)(void *, swig_type_info *,int own);
-typedef PyObject*       (*p_SWIG_Python_NewPackedObj_t)(void *, int sz, swig_type_info *);
-typedef void            (*p_SWIG_Python_InstallConstants_t)(PyObject *d, swig_const_info constants[]);
-typedef void*           (*p_SWIG_Python_MustGetPtr_t)(PyObject *, swig_type_info *, int, int);
-
 
 struct wxPyCoreAPI {
 
-    p_SWIG_Python_TypeRegister_t       p_SWIG_Python_TypeRegister;
-    p_SWIG_Python_TypeCheck_t          p_SWIG_Python_TypeCheck;
-    p_SWIG_Python_TypeCast_t           p_SWIG_Python_TypeCast;
-    p_SWIG_Python_TypeDynamicCast_t    p_SWIG_Python_TypeDynamicCast;
-    p_SWIG_Python_TypeName_t           p_SWIG_Python_TypeName;
-    p_SWIG_Python_TypePrettyName_t     p_SWIG_Python_TypePrettyName; 
-    p_SWIG_Python_TypeQuery_t          p_SWIG_Python_TypeQuery;
-    p_SWIG_Python_TypeClientData_t     p_SWIG_Python_TypeClientData;
-    p_SWIG_Python_newvarlink_t         p_SWIG_Python_newvarlink;
-    p_SWIG_Python_addvarlink_t         p_SWIG_Python_addvarlink;
-    p_SWIG_Python_ConvertPtr_t         p_SWIG_Python_ConvertPtr;
-    p_SWIG_Python_ConvertPacked_t      p_SWIG_Python_ConvertPacked;
-    p_SWIG_Python_PackData_t           p_SWIG_Python_PackData;
-    p_SWIG_Python_UnpackData_t         p_SWIG_Python_UnpackData;
-    p_SWIG_Python_NewPointerObj_t      p_SWIG_Python_NewPointerObj;
-    p_SWIG_Python_NewPackedObj_t       p_SWIG_Python_NewPackedObj;
-    p_SWIG_Python_InstallConstants_t   p_SWIG_Python_InstallConstants;
-    p_SWIG_Python_MustGetPtr_t         p_SWIG_Python_MustGetPtr;
-    
     bool                (*p_wxPyCheckSwigType)(const wxChar* className);
     PyObject*           (*p_wxPyConstructObject)(void* ptr, const wxChar* className, int setThisOwn);
     bool                (*p_wxPyConvertSwigPtr)(PyObject* obj, void **ptr, const wxChar* className);
index e02a1a4ea153ea9d449b07b023a78b110d16ef38..c10120bbda5b7afca6d9c3b79e58b291cf339bb7 100755 (executable)
@@ -137,7 +137,6 @@ else:
 
 
 ext = Extension('_core_', ['src/helpers.cpp',
-                           'src/libpy.c',
                            ] + rc_file + swig_sources,
 
                 include_dirs = includes,
index 59337dd7a55d9161c3c5e8b69e529e6113b44727..dba08791f32a2d72d8581575a7bd8e0747756035 100644 (file)
@@ -210,7 +210,8 @@ MustHaveApp(wxPyArtProvider);
 MustHaveApp(wxPyArtProvider::GetBitmap);
 MustHaveApp(wxPyArtProvider::GetIcon);
 
-%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/
+%rename(ArtProvider) wxPyArtProvider;
+class wxPyArtProvider /*: public wxObject*/
 {
 public:
 
index a4c3236c9df9ed4e3eb0a803f74376184f2466a0..ce142978dd8057f6a0d286362d120c2894e86938 100644 (file)
@@ -128,7 +128,9 @@ that a colour reduction may have to take place.", "",
     %extend {
         DocStr(wxBitmap(PyObject* listOfStrings),
                "Construct a Bitmap from a list of strings formatted as XPM data.", "");
-        %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) {
+        
+        %RenameCtor(BitmapFromXPMData, wxBitmap(PyObject* listOfStrings))
+        {
             char**    cArray = NULL;
             wxBitmap* bmp;
 
@@ -145,7 +147,9 @@ that a colour reduction may have to take place.", "",
 function for monochrome bitmaps (depth 1) in portable programs: in
 this case the bits parameter should contain an XBM image.  For other
 bit depths, the behaviour is platform dependent.", "");
-        %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) {
+        
+        %RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 ))
+        {
             char* buf;
             int   length;
             PyString_AsStringAndSize(bits, &buf, &length);
index 41387580000499e2ee768ff69a7c69b9dab83277..8bfd2a5b0323d1824f6eee6ccec4b186d20f2de3 100644 (file)
@@ -42,7 +42,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
     if (! swigType) {
         // it wasn't in the cache, so look it up from SWIG
         name.Append(wxT(" *"));
-        swigType = SWIG_Python_TypeQuery(name.mb_str());
+        swigType = SWIG_TypeQuery(name.mb_str());
         
         // if it still wasn't found, try looking for a mapped name
         if (!swigType) {
@@ -53,7 +53,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
                                (char*)(const char*)name.mbc_str())) != NULL) {
                 name = wxString(PyString_AsString(item), *wxConvCurrent);
                 name.Append(wxT(" *"));
-                swigType = SWIG_Python_TypeQuery(name.mb_str());
+                swigType = SWIG_TypeQuery(name.mb_str());
             }
         }
         if (swigType) {
@@ -109,16 +109,13 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
     wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyConvertSwigPtr"));
 
 #ifdef SWIG_COBJECT_TYPES
-    robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) swigType->name, NULL);
+    robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name);
 #else
     {
         char result[1024];
-        char *r = result;
-        *(r++) = '_';
-        r = SWIG_Python_PackData(r, &ptr, sizeof(void *));
-        strcpy(r, swigType->name);
-        robj = PyString_FromString(result);
-    }     
+        robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ?
+            PyString_FromString(result) : 0;
+    }
 #endif
 
     return robj;
@@ -132,25 +129,6 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
 // even if they are located in another shared library.
 static wxPyCoreAPI API = {
 
-    (p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,
-    (p_SWIG_Python_TypeCheck_t)SWIG_Python_TypeCheck,
-    (p_SWIG_Python_TypeCast_t)SWIG_Python_TypeCast,
-    (p_SWIG_Python_TypeDynamicCast_t)SWIG_Python_TypeDynamicCast,
-    (p_SWIG_Python_TypeName_t)SWIG_Python_TypeName,
-    (p_SWIG_Python_TypePrettyName_t)SWIG_Python_TypePrettyName,
-    (p_SWIG_Python_TypeQuery_t)SWIG_Python_TypeQuery,
-    (p_SWIG_Python_TypeClientData_t)SWIG_Python_TypeClientData,
-    (p_SWIG_Python_newvarlink_t)SWIG_Python_newvarlink,
-    (p_SWIG_Python_addvarlink_t)SWIG_Python_addvarlink,
-    (p_SWIG_Python_ConvertPtr_t)SWIG_Python_ConvertPtr,
-    (p_SWIG_Python_ConvertPacked_t)SWIG_Python_ConvertPacked,
-    (p_SWIG_Python_PackData_t)SWIG_Python_PackData,
-    (p_SWIG_Python_UnpackData_t)SWIG_Python_UnpackData,
-    (p_SWIG_Python_NewPointerObj_t)SWIG_Python_NewPointerObj,
-    (p_SWIG_Python_NewPackedObj_t)SWIG_Python_NewPackedObj,
-    (p_SWIG_Python_InstallConstants_t)SWIG_Python_InstallConstants,
-    (p_SWIG_Python_MustGetPtr_t)SWIG_Python_MustGetPtr,
-
     wxPyCheckSwigType,
     wxPyConstructObject,
     wxPyConvertSwigPtr,
index 81fe4c90a9cc69365e5f25508f34d414ebdee6a9..9d7e87851b135f0aee3f13f74a0e48c41edac711 100644 (file)
@@ -115,9 +115,10 @@ black/white (mask respected).",
 //     %extend {
 //         DocStr(wxCursor,
 //                "");
-//         %name(CursorFromBits) wxCursor(PyObject* bits, int width, int  height,
+//         %RenameCtor(CursorFromBits,  wxCursor(PyObject* bits, int width, int  height,
 //                                          int hotSpotX=-1, int hotSpotY=-1,
-//                                          PyObject* maskBits=NULL) {
+//                                          PyObject* maskBits=NULL))
+//         {
 //             char* bitsbuf;
 //             char* maskbuf = NULL;
 //             int   length;
index 8db212c167a322d877d0e8457a57dacef03b00fe..d932869e94656486db23e3135b12678340fb5012 100644 (file)
@@ -343,15 +343,15 @@ public:
 
         // returns the number of days in this year (356 or 355 for Gregorian
         // calendar usually :-)
-    %name(GetNumberOfDaysinYear)
-        static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian);
+    %Rename(GetNumberOfDaysinYear, 
+        static wxDateTime_t, GetNumberOfDays(int year, Calendar cal = Gregorian));
 
         // get the number of the days in the given month (default value for
         // the year means the current one)
-    %name(GetNumberOfDaysInMonth)
-        static wxDateTime_t GetNumberOfDays(Month month,
+    %Rename(GetNumberOfDaysInMonth, 
+        static wxDateTime_t, GetNumberOfDays(Month month,
                                             int year = Inv_Year,
-                                            Calendar cal = Gregorian);
+                                            Calendar cal = Gregorian));
 
         // get the full (default) or abbreviated month name in the current
         // locale, returns empty string on error
@@ -400,19 +400,19 @@ public:
     // constructors
 
     wxDateTime();
-    %name(DateTimeFromTimeT)wxDateTime(time_t timet);
-    %name(DateTimeFromJDN)wxDateTime(double jdn);
-    %name(DateTimeFromHMS)wxDateTime(wxDateTime_t hour,
+    %RenameCtor(DateTimeFromTimeT, wxDateTime(time_t timet));
+    %RenameCtor(DateTimeFromJDN, wxDateTime(double jdn));
+    %RenameCtor(DateTimeFromHMS, wxDateTime(wxDateTime_t hour,
                                      wxDateTime_t minute = 0,
                                      wxDateTime_t second = 0,
-                                     wxDateTime_t millisec = 0);
-    %name(DateTimeFromDMY)wxDateTime(wxDateTime_t day,
+                                     wxDateTime_t millisec = 0));
+    %RenameCtor(DateTimeFromDMY, wxDateTime(wxDateTime_t day,
                                      Month        month = Inv_Month,
                                      int          year = Inv_Year,
                                      wxDateTime_t hour = 0,
                                      wxDateTime_t minute = 0,
                                      wxDateTime_t second = 0,
-                                     wxDateTime_t millisec = 0);
+                                     wxDateTime_t millisec = 0));
             
     ~wxDateTime();
 
@@ -422,16 +422,16 @@ public:
     wxDateTime& SetToCurrent();
 
         // set to given time_t value
-    %name(SetTimeT)wxDateTime& Set(time_t timet);
+    %Rename(SetTimeT, wxDateTime&, Set(time_t timet));
 
         // set to given JDN (beware of rounding errors)
-    %name(SetJDN)wxDateTime& Set(double jdn);
+    %Rename(SetJDN, wxDateTime&, Set(double jdn));
 
         // set to given time, date = today
-    %name(SetHMS)wxDateTime& Set(wxDateTime_t hour,
+    %Rename(SetHMS, wxDateTime&, Set(wxDateTime_t hour,
                     wxDateTime_t minute = 0,
                     wxDateTime_t second = 0,
-                    wxDateTime_t millisec = 0);
+                    wxDateTime_t millisec = 0));
 
         // from separate values for each component with explicit date
         // (defaults for month and year are the current values)
@@ -681,15 +681,15 @@ public:
     // arithmetics with dates (see also below for more operators)
 
         // add a time span (positive or negative)
-    %name(AddTS) wxDateTime& Add(const wxTimeSpan& diff);
+    %Rename(AddTS,  wxDateTime&, Add(const wxTimeSpan& diff));
         // add a date span (positive or negative)
-    %name(AddDS) wxDateTime& Add(const wxDateSpan& diff);
+    %Rename(AddDS,  wxDateTime&, Add(const wxDateSpan& diff));
 
         // subtract a time span (positive or negative)
-    %name(SubtractTS) wxDateTime& Subtract(const wxTimeSpan& diff);
+    %Rename(SubtractTS,  wxDateTime&, Subtract(const wxTimeSpan& diff));
 
         // subtract a date span (positive or negative)
-    %name(SubtractDS) wxDateTime& Subtract(const wxDateSpan& diff);
+    %Rename(SubtractDS,  wxDateTime&, Subtract(const wxDateSpan& diff));
 
         // return the difference between two dates
     wxTimeSpan Subtract(const wxDateTime& dt) const;
index 8d906f3d483e4e55687c9cba52b84d85fce1d886..c69ad8067504495e1bcf82549109c1b87c28d6b0 100644 (file)
@@ -95,7 +95,7 @@ Note: The present implementation for non-Windows platforms may fail to
 find colour borders if the pixels do not match the colour
 exactly. However the function will still return true.", "");
     bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
-    %name(FloodFillPoint) bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE);
+    %Rename(FloodFillPoint, bool, FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE));
 
     
     DocStr(
@@ -122,7 +122,7 @@ used for drawing the line. Note that the second point is *not* part of
 the line and is not drawn by this function (this is consistent with
 the behaviour of many other toolkits).", "");
     void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
-    %name(DrawLinePoint) void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
+    %Rename(DrawLinePoint, void, DrawLine(const wxPoint& pt1, const wxPoint& pt2));
 
 
     DocStr(
@@ -131,7 +131,7 @@ the behaviour of many other toolkits).", "");
 horizontal line the height and width of the window, centred on the
 given point.", "");
     void CrossHair(wxCoord x, wxCoord y);
-    %name(CrossHairPoint) void CrossHair(const wxPoint& pt);
+    %Rename(CrossHairPoint, void, CrossHair(const wxPoint& pt));
 
 
     DocStr(
@@ -143,14 +143,14 @@ and the current brush for filling the shape.
 The arc is drawn in an anticlockwise direction from the start point to
 the end point.", "");
     void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
-    %name(DrawArcPoint) void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center);
+    %Rename(DrawArcPoint, void, DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center));
 
 
     DocStr(
         DrawCheckMark,
         "Draws a check mark inside the given rectangle.", "");
     void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(DrawCheckMarkRect) void DrawCheckMark(const wxRect& rect);
+    %Rename(DrawCheckMarkRect, void, DrawCheckMark(const wxRect& rect));
 
     DocStr(
         DrawEllipticArc,
@@ -164,14 +164,14 @@ rectangle. Angles are specified in degrees (360 is a complete
 circle). Positive values mean counter-clockwise motion. If start is
 equal to end, a complete ellipse will be drawn.", "");
     void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double start, double end);
-    %name(DrawEllipticArcPointSize) void DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end);
+    %Rename(DrawEllipticArcPointSize, void, DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end));
 
 
     DocStr(
         DrawPoint,
         "Draws a point using the current pen.", "");
     void DrawPoint(wxCoord x, wxCoord y);
-    %name(DrawPointPoint) void DrawPoint(const wxPoint& pt);
+    %Rename(DrawPointPoint, void, DrawPoint(const wxPoint& pt));
 
 
     DocStr(
@@ -180,8 +180,8 @@ equal to end, a complete ellipse will be drawn.", "");
 size. The current pen is used for the outline and the current brush
 for filling the shape.", "");
     void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(DrawRectangleRect)void DrawRectangle(const wxRect& rect);
-    %name(DrawRectanglePointSize) void DrawRectangle(const wxPoint& pt, const wxSize& sz);
+    %Rename(DrawRectangleRect,void, DrawRectangle(const wxRect& rect));
+    %Rename(DrawRectanglePointSize, void, DrawRectangle(const wxPoint& pt, const wxSize& sz));
 
 
     DocStr(
@@ -198,8 +198,8 @@ means that the corner can be a sensible size relative to the size of
 the rectangle, and also avoids the strange effects X produces when the
 corners are too big for the rectangle.", "");
     void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
-    %name(DrawRoundedRectangleRect) void DrawRoundedRectangle(const wxRect& r, double radius);
-    %name(DrawRoundedRectanglePointSize) void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius);
+    %Rename(DrawRoundedRectangleRect, void, DrawRoundedRectangle(const wxRect& r, double radius));
+    %Rename(DrawRoundedRectanglePointSize, void, DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius));
 
 
     DocStr(
@@ -210,7 +210,7 @@ shape.", "
 
 :see: `DrawEllipse`");
     void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
-    %name(DrawCirclePoint) void DrawCircle(const wxPoint& pt, wxCoord radius);
+    %Rename(DrawCirclePoint, void, DrawCircle(const wxPoint& pt, wxCoord radius));
 
 
     DocStr(
@@ -220,8 +220,8 @@ is used for the outline and the current brush for filling the shape.", "
 
 :see: `DrawCircle`");
     void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(DrawEllipseRect) void DrawEllipse(const wxRect& rect);
-    %name(DrawEllipsePointSize) void DrawEllipse(const wxPoint& pt, const wxSize& sz);
+    %Rename(DrawEllipseRect, void, DrawEllipse(const wxRect& rect));
+    %Rename(DrawEllipsePointSize, void, DrawEllipse(const wxPoint& pt, const wxSize& sz));
 
 
     DocStr(
@@ -230,7 +230,7 @@ is used for the outline and the current brush for filling the shape.", "
 PostScript). This can be the simplest way of drawing bitmaps on a
 window.", "");
     void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
-    %name(DrawIconPoint) void DrawIcon(const wxIcon& icon, const wxPoint& pt);
+    %Rename(DrawIconPoint, void, DrawIcon(const wxIcon& icon, const wxPoint& pt));
 
 
     DocStr(
@@ -247,7 +247,7 @@ current text background colour to draw the background (all bits set to
 
 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
     void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false);
-    %name(DrawBitmapPoint) void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false);
+    %Rename(DrawBitmapPoint, void, DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false));
 
 
     DocStr(
@@ -265,7 +265,7 @@ logical functions with this function in portable programs.", "
 
 :see: `DrawRotatedText`");
     void DrawText(const wxString& text, wxCoord x, wxCoord y);
-    %name(DrawTextPoint) void DrawText(const wxString& text, const wxPoint& pt);
+    %Rename(DrawTextPoint, void, DrawText(const wxString& text, const wxPoint& pt));
 
 
     DocStr(
@@ -279,7 +279,7 @@ font. ``wx.SWISS_FONT`` is an example of a font which is.","
 
 :see: `DrawText`");
     void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
-    %name(DrawRotatedTextPoint) void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle);
+    %Rename(DrawRotatedTextPoint, void, DrawRotatedText(const wxString& text, const wxPoint& pt, double angle));
 
 
     DocDeclStr(
@@ -347,9 +347,9 @@ screen is damaged.", "
 
 :see: `DestroyClippingRegion`, `wx.Region`");
     void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(SetClippingRegionPointSize) void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
-    %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
-    %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
+    %Rename(SetClippingRegionPointSize, void, SetClippingRegion(const wxPoint& pt, const wxSize& sz));
+    %Rename(SetClippingRegionAsRegion, void, SetClippingRegion(const wxRegion& region));
+    %Rename(SetClippingRect, void, SetClippingRegion(const wxRect& rect));
 
 
     
@@ -1243,6 +1243,7 @@ class wxBufferedDC : public wxMemoryDC
 public:
     %pythonAppend wxBufferedDC
         "self.__dc = args[0] # save a ref so the other dc will not be deleted before self";
+    
     %nokwargs wxBufferedDC;
 
     DocStr(
@@ -1272,7 +1273,7 @@ public:
 //     // TODO: Keep this one too?
 //     %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
 //         "val.__dc = args[0] # save a ref so the other dc will not be deleted before self";
-//     %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area );
+//     %RenameCtor(BufferedDCInternalBuffer,  wxBufferedDC( wxDC *dc, const wxSize &area ));
 
     
     // The buffer is blit to the real DC when the BufferedDC is destroyed.
@@ -1590,11 +1591,6 @@ MustHaveApp(wxPrinterDC);
 class  wxPrinterDC : public wxDC {
 public:
     wxPrinterDC(const wxPrintData& printData);
-//     %name(PrinterDC2) wxPrinterDC(const wxString& driver,
-//                                     const wxString& device,
-//                                     const wxString& output,
-//                                     bool interactive = true,
-//                                     int orientation = wxPORTRAIT);
 };
 
 #else
@@ -1604,19 +1600,12 @@ public:
     wxPrinterDC(const wxPrintData&)
         { wxPyRaiseNotImplemented(); }
 
-//     wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
-//         { wxPyRaiseNotImplemented(); }
 };
 %}
 
 class  wxPrinterDC : public wxDC {
 public:
     wxPrinterDC(const wxPrintData& printData);
-//     %name(PrinterDC2) wxPrinterDC(const wxString& driver,
-//                                     const wxString& device,
-//                                     const wxString& output,
-//                                     bool interactive = true,
-//                                     int orientation = wxPORTRAIT);
 };
 #endif
 
index 207b8eaf9c9e9faeb8d305f94bcbfb51ef9629bb..6412f4c4fd9beef60984eef610094c1443e0e3f1 100644 (file)
@@ -82,14 +82,16 @@ typedef unsigned long   wxUIntPtr;
 %define MAKE_CONST_WXSTRING(strname)
     %{ static const wxString wxPy##strname(wx##strname); %}
     %immutable;
-    %name(strname) const wxString wxPy##strname;
+    %rename(strname) wxPy##strname;
+    const wxString wxPy##strname;
     %mutable;
 %enddef
 
 %define MAKE_CONST_WXSTRING2(strname, val)
     %{ static const wxString wxPy##strname(val); %}
     %immutable;
-    %name(strname) const wxString wxPy##strname;
+    %rename(strname) wxPy##strname;
+    const wxString wxPy##strname;
     %mutable;
 %enddef
 
@@ -163,12 +165,14 @@ typedef unsigned long   wxUIntPtr;
 #ifdef _DO_FULL_DOCS
     %define DocDeclStrName(type, decl, docstr, details, newname)
         %feature("docstring") decl docstr details;
-        %name(newname) type decl
+        %rename(newname) decl;
+        type decl
     %enddef
 #else
     %define DocDeclStrName(type, decl, docstr, details, newname)
         %feature("docstring") decl docstr;
-        %name(newname) type decl
+        %rename(newname) decl;
+        type decl
     %enddef
 #endif
         
@@ -183,7 +187,8 @@ typedef unsigned long   wxUIntPtr;
 // As above, but also give the decl a new %name    
 %define DocDeclAName(type, decl, astr, newname)
     %feature("autodoc") decl astr;
-    %name(newname) type decl
+    %rename(newname) decl;
+    type decl
 %enddef
 
 
@@ -210,13 +215,15 @@ typedef unsigned long   wxUIntPtr;
     %define DocDeclAStrName(type, decl, astr, docstr, details, newname)
         %feature("autodoc") decl astr;
         %feature("docstring") decl docstr details;
-        %name(newname) type decl
+        %rename(newname) decl;
+        type decl
     %enddef
 #else
     %define DocDeclAStrName(type, decl, astr, docstr, details, newname)
         %feature("autodoc") decl astr;
         %feature("docstring") decl docstr;
-        %name(newname) type decl
+        %rename(newname) decl;
+        type decl
     %enddef
 #endif
 
@@ -241,12 +248,14 @@ typedef unsigned long   wxUIntPtr;
 #ifdef _DO_FULL_DOCS
     %define DocCtorStrName(decl, docstr, details, newname)
         %feature("docstring") decl docstr details;
-        %name(newname) decl
+        %rename(newname) decl;
+        decl
     %enddef
 #else
     %define DocCtorStrName(decl, docstr, details, newname)
         %feature("docstring") decl docstr;
-        %name(newname) decl
+        %rename(newname) decl;
+        decl
     %enddef
 #endif
 
@@ -262,7 +271,8 @@ typedef unsigned long   wxUIntPtr;
 // As above, but also give the decl a new %name    
 %define DocCtorAName(decl, astr, newname)
     %feature("autodoc") decl astr;
-    %name(newname) decl
+    %rename(newname) decl;
+    decl
 %enddef
 
 
@@ -290,13 +300,15 @@ typedef unsigned long   wxUIntPtr;
     %define DocCtorAStrName(decl, astr, docstr, details, newname)
         %feature("autodoc") decl astr;
         %feature("docstring") decl docstr details;
-        %name(newname) decl
+        %rename(newname) decl;
+        decl
     %enddef
 #else
     %define DocCtorAStrName(decl, astr, docstr, details, newname)
         %feature("autodoc") decl astr;
         %feature("docstring") decl docstr;
-        %name(newname) decl
+        %rename(newname) decl;
+        decl
     %enddef
 #endif
 
@@ -308,6 +320,20 @@ typedef unsigned long   wxUIntPtr;
 }
 %enddef
 
+
+// A set of macros to make using %rename easier, since %name has been
+// deprecated...
+%define %Rename(newname, type, decl)
+    %rename(newname) decl;
+    type decl
+%enddef
+
+%define %RenameCtor(newname, decl)
+    %rename(newname) decl;
+    decl
+%enddef
+
+
 //---------------------------------------------------------------------------
 // Forward declarations and %renames for some classes, so the autodoc strings
 // will be able to use the right types even when the real class declaration is
index b33d7014429ff2dd2efdbbce9dcf5b0d93a83aa3..79a2d72a2af9e651ebfba0a3ec66405b1ba43a09 100644 (file)
@@ -70,7 +70,7 @@ public:
                      const wxString& filter = wxPyEmptyString,
                      int defaultFilter = 0,
                      const wxString& name = wxPyTreeCtrlNameStr);
-    %name(PreGenericDirCtrl)wxGenericDirCtrl();
+    %RenameCtor(PreGenericDirCtrl, wxGenericDirCtrl());
 
 
     bool Create(wxWindow *parent, const wxWindowID id = -1,
@@ -150,7 +150,7 @@ public:
                         const wxPoint& pos = wxDefaultPosition,
                         const wxSize& size = wxDefaultSize,
                         long style = 0);
-    %name(PreDirFilterListCtrl)wxDirFilterListCtrl();
+    %RenameCtor(PreDirFilterListCtrl, wxDirFilterListCtrl());
 
     bool Create(wxGenericDirCtrl* parent, const wxWindowID id = -1,
               const wxPoint& pos = wxDefaultPosition,
index dfa264c4ae7e86f602801e60ec059b963f1ebcb0..a7f5e4ab3bfbef365e4d4901c9ce1c351d61af4c 100644 (file)
@@ -55,7 +55,8 @@ IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
 %}
 
 
-%name(DropSource) class wxPyDropSource {
+%rename(DropSource) wxPyDropSource;
+class wxPyDropSource {
 public:
     %pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)"
 #ifndef __WXGTK__
@@ -115,7 +116,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
 %}
 
 
-%name(DropTarget) class wxPyDropTarget // : public wxDropTarget
+%rename(DropTarget) wxPyDropTarget;
+class wxPyDropTarget // : public wxDropTarget
 {
 public:
     %pythonAppend wxPyDropTarget
@@ -178,7 +180,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop);
 
 %}
 
-%name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget {
+%rename(TextDropTarget) wxPyTextDropTarget;
+class wxPyTextDropTarget : public wxPyDropTarget {
 public:
     %pythonAppend wxPyTextDropTarget   "self._setCallbackInfo(self, TextDropTarget)"
 
@@ -238,7 +241,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop);
 %}
 
 
-%name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget
+%rename(FileDropTarget) wxPyFileDropTarget;
+class wxPyFileDropTarget : public wxPyDropTarget
 {
 public:
     %pythonAppend wxPyFileDropTarget   "self._setCallbackInfo(self, FileDropTarget)"
index a0f1d2cc09408b69bbc269c51e7e4c39d1f85fb9..d0d6eca9e7b263e9420e8a210e1d7592cb9aa01b 100644 (file)
 
 MustHaveApp(wxGenericDragImage);
 
-%name (DragImage) class wxGenericDragImage : public wxObject
+%rename (DragImage) wxGenericDragImage;
+class wxGenericDragImage : public wxObject
 {
 public:
 
     wxGenericDragImage(const wxBitmap& image,
                        const wxCursor& cursor = wxNullCursor);
     
-    %name(DragIcon)wxGenericDragImage(const wxIcon& image,
-                                        const wxCursor& cursor = wxNullCursor);
+    %RenameCtor(DragIcon, wxGenericDragImage(const wxIcon& image,
+                                        const wxCursor& cursor = wxNullCursor));
 
-    %name(DragString)wxGenericDragImage(const wxString& str,
-                                          const wxCursor& cursor = wxNullCursor);
+    %RenameCtor(DragString, wxGenericDragImage(const wxString& str,
+                                          const wxCursor& cursor = wxNullCursor));
 
-    %name(DragTreeItem)wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id);
+    %RenameCtor(DragTreeItem, wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id));
 
-    %name(DragListItem)wxGenericDragImage(const wxPyListCtrl& listCtrl, long id);
+    %RenameCtor(DragListItem, wxGenericDragImage(const wxPyListCtrl& listCtrl, long id));
 
     ~wxGenericDragImage();
 
@@ -57,8 +58,8 @@ public:
     // Begin drag. hotspot is the location of the drag position relative to the upper-left
     // corner of the image. This is full screen only. fullScreenRect gives the
     // position of the window on the screen, to restrict the drag to.
-    %name(BeginDragBounded) bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
-                                           wxWindow* boundingWindow);
+    %Rename(BeginDragBounded,  bool, BeginDrag(const wxPoint& hotspot, wxWindow* window,
+                                           wxWindow* boundingWindow));
 
 
     // End drag
index fe7be734e8ffb5970369a2d65ac1a7a68ec199e6..a8addb513abbfa8c7487cdc82e6bcf61004ad5b3 100644 (file)
@@ -88,7 +88,8 @@ IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext
 
 
 
-%name(CPPFileSystemHandler) class wxFileSystemHandler //: public wxObject
+%rename(CPPFileSystemHandler) wxFileSystemHandler;
+class wxFileSystemHandler //: public wxObject
 {
 public:
     //wxFileSystemHandler();
@@ -96,7 +97,8 @@ public:
 
 
 
-%name(FileSystemHandler) class wxPyFileSystemHandler : public wxFileSystemHandler
+%rename(FileSystemHandler) wxPyFileSystemHandler;
+class wxPyFileSystemHandler : public wxFileSystemHandler
 {
 public:
     %pythonAppend    wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)";
index 51a138b0c535f7dff08b20e64940d8ac3e3c021d..7ee9fd9540423d0742b7c5017bf268fbae58db46 100644 (file)
@@ -449,19 +449,21 @@ public:
             wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
     ~wxFont();
 
-    %name(FontFromNativeInfo) wxFont(const wxNativeFontInfo& info);
+    %RenameCtor(FontFromNativeInfo,  wxFont(const wxNativeFontInfo& info));
     %extend {
-        %name(FontFromNativeInfoString) wxFont(const wxString& info) {
+        %RenameCtor(FontFromNativeInfoString, wxFont(const wxString& info))
+        {
             wxNativeFontInfo nfi;
             nfi.FromString(info);
             return new wxFont(nfi);
         }
 
-        %name(Font2) wxFont(int pointSize,
-                            wxFontFamily family,
-                            int flags = wxFONTFLAG_DEFAULT,
-                            const wxString& face = wxPyEmptyString,
-                            wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
+        %RenameCtor(Font2,  wxFont(int pointSize,
+                                   wxFontFamily family,
+                                   int flags = wxFONTFLAG_DEFAULT,
+                                   const wxString& face = wxPyEmptyString,
+                                   wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
+        {
             return wxFont::New(pointSize, family, flags, face, encoding);
         }
     }
@@ -469,13 +471,14 @@ public:
     // There is a real ctor for this on wxMSW, but not the others, so just use
     // the factory funciton in all cases.
     %extend {
-        %name(FontFromPixelSize) wxFont(const wxSize& pixelSize,
-                                        int family,
-                                        int style,
-                                        int weight,
-                                        bool underlined = false,
-                                        const wxString& face = wxEmptyString,
-                                        wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
+        %RenameCtor(FontFromPixelSize, wxFont(const wxSize& pixelSize,
+                                              int family,
+                                              int style,
+                                              int weight,
+                                              bool underlined = false,
+                                              const wxString& face = wxEmptyString,
+                                              wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
+        {
             return wxFontBase::New(pixelSize, family,
                                    style, weight, underlined,
                                    face, encoding);
@@ -521,7 +524,7 @@ public:
     virtual void SetUnderlined( bool underlined );
     virtual void SetEncoding(wxFontEncoding encoding);
     void SetNativeFontInfo(const wxNativeFontInfo& info);
-    %name(SetNativeFontInfoFromString) void SetNativeFontInfo(const wxString& info);
+    %Rename(SetNativeFontInfoFromString, void, SetNativeFontInfo(const wxString& info));
     void SetNativeFontInfoUserDesc(const wxString& info);
 
     // translate the fonts into human-readable string (i.e. GetStyleString()
@@ -565,7 +568,8 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc
 
 MustHaveApp(wxPyFontEnumerator);
 
-%name(FontEnumerator) class wxPyFontEnumerator {
+%rename(FontEnumerator) wxPyFontEnumerator;
+class wxPyFontEnumerator {
 public:
     %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)"
 
index 21f1472d7abbfdce92292e1c0c96692029d86ab6..97759d64b0d454c425bff710d0096aeb23a5d3cc 100644 (file)
@@ -42,7 +42,7 @@ public:
             long style = wxGA_HORIZONTAL,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxPyGaugeNameStr);
-    %name(PreGauge)wxGauge();
+    %RenameCtor(PreGauge, wxGauge());
 
     bool Create(wxWindow* parent, wxWindowID id=-1, int range=100,
             const wxPoint& pos = wxDefaultPosition,
index 9d375953a867851378378cc333e686031b7504d5..483c92f4412676111ec8102d7831f3d9f1d2c94a 100644 (file)
@@ -221,12 +221,13 @@ are created automatically when the sizer's Add method is called.", "");
     %extend {
         DocStr(wxGBSizerItem( wxWindow *window, const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
                "Construct a `wx.GBSizerItem` for a window.", "");
-        %name(GBSizerItemWindow) wxGBSizerItem( wxWindow *window,
-                                                const wxGBPosition& pos,
-                                                const wxGBSpan& span,
-                                                int flag,
-                                                int border,
-                                                PyObject* userData=NULL )
+        
+        %RenameCtor(GBSizerItemWindow, wxGBSizerItem( wxWindow *window,
+                                                      const wxGBPosition& pos,
+                                                      const wxGBSpan& span,
+                                                      int flag,
+                                                      int border,
+                                                      PyObject* userData=NULL ))
             {
                 wxPyUserData* data = NULL;
                 if ( userData ) {
@@ -240,12 +241,12 @@ are created automatically when the sizer's Add method is called.", "");
 
         DocStr(wxGBSizerItem( wxSizer *sizer,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
                "Construct a `wx.GBSizerItem` for a sizer", "");
-        %name(GBSizerItemSizer) wxGBSizerItem( wxSizer *sizer,
-                                               const wxGBPosition& pos,
-                                               const wxGBSpan& span,
-                                               int flag,
-                                               int border,
-                                               PyObject* userData=NULL )
+        %RenameCtor(GBSizerItemSizer, wxGBSizerItem( wxSizer *sizer,
+                                                     const wxGBPosition& pos,
+                                                     const wxGBSpan& span,
+                                                     int flag,
+                                                     int border,
+                                                     PyObject* userData=NULL ))
             {
                 wxPyUserData* data = NULL;
                 if ( userData ) {
@@ -259,13 +260,13 @@ are created automatically when the sizer's Add method is called.", "");
              
         DocStr(wxGBSizerItem( int width,int height,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL),
                "Construct a `wx.GBSizerItem` for a spacer.", "");
-        %name(GBSizerItemSpacer) wxGBSizerItem( int width,
-                                                int height,
-                                                const wxGBPosition& pos,
-                                                const wxGBSpan& span,
-                                                int flag,
-                                                int border,
-                                                PyObject* userData=NULL)
+        %RenameCtor(GBSizerItemSpacer, wxGBSizerItem( int width,
+                                                      int height,
+                                                      const wxGBPosition& pos,
+                                                      const wxGBSpan& span,
+                                                      int flag,
+                                                      int border,
+                                                      PyObject* userData=NULL))
             {
                 wxPyUserData* data = NULL;
                 if ( userData ) {
index a80f17890fdf9c3701f638e4eee032120786fc15..5b62dd38d22b943b18de31c090dc128cc914ac90 100644 (file)
@@ -113,15 +113,15 @@ enum wxStockCursor
 
 DocStr( wxSize,
 "wx.Size is a useful data structure used to represent the size of
-something.  It simply contians integer width and height proprtites.
-In most places in wxPython where a wx.Size is expected a
-(width,height) tuple can be used instead.", "");
+something.  It simply contians integer width and height
+proprtites.  In most places in wxPython where a wx.Size is
+expected a (width, height) tuple can be used instead.", "");
 
 class wxSize
 {
 public:
-    %name(width) int x;
-    %name(height)int y;
+    %Rename(width, int,  x);
+    %Rename(height,int,  y);
     %pythoncode { x = width; y = height }
     
     DocCtorStr(
@@ -532,7 +532,7 @@ bottom, otherwise it is moved to the left or top respectively.", "",
 
     
     DocStr( Inside, "Return True if the point is (not strcitly) inside the rect.", "");
-    %name(InsideXY)bool Inside(int x, int y) const;
+    %Rename(InsideXY, bool, Inside(int x, int y) const);
     bool Inside(const wxPoint& pt) const;
 
     DocDeclStr(    
@@ -626,8 +626,8 @@ class wxPoint2D
 public:
     DocStr(wxPoint2D, "Create a w.Point2D object.", "");
     wxPoint2D( double x=0.0 , double y=0.0 );
-    %name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
-    %name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
+    %RenameCtor(Point2DCopy, wxPoint2D( const wxPoint2D &pt ));
+    %RenameCtor(Point2DFromPoint, wxPoint2D( const wxPoint &pt ));
 
     DocDeclAStr(
         void, GetFloor( int *OUTPUT , int *OUTPUT ) const,
@@ -677,8 +677,8 @@ public:
         bool, operator!=(const wxPoint2D& pt) const,
         "Test for inequality", "");
 
-    %name(x)double m_x;
-    %name(y)double m_y;
+    %Rename(x, double,  m_x);
+    %Rename(y, double,  m_y);
 
     %extend {
         void Set( double x=0 , double y=0 ) {
index f43e09910bfe4636800405b50c94ef606ecdde25..d117a99ff6abbc57c5e1cc58b476129978e9b309 100644 (file)
@@ -30,15 +30,17 @@ public:
     ~wxIcon();
 
     // alternate constructors
-    %name(EmptyIcon) wxIcon();
-    %name(IconFromLocation) wxIcon(const wxIconLocation& loc);
+    %RenameCtor(EmptyIcon, wxIcon());
+    %RenameCtor(IconFromLocation,  wxIcon(const wxIconLocation& loc));
     %extend {
-        %name(IconFromBitmap) wxIcon(const wxBitmap& bmp) {
+        %RenameCtor(IconFromBitmap, wxIcon(const wxBitmap& bmp))
+        {
             wxIcon* icon = new wxIcon();
             icon->CopyFromBitmap(bmp);
             return icon;
         }
-        %name(IconFromXPMData) wxIcon(PyObject* listOfStrings) {
+        %RenameCtor(IconFromXPMData, wxIcon(PyObject* listOfStrings))
+        {
             char**  cArray = NULL;
             wxIcon* icon;
 
@@ -136,10 +138,10 @@ public:
     wxIconBundle();
 
     // initializes the bundle with the icon(s) found in the file
-    %name(IconBundleFromFile) wxIconBundle( const wxString& file, long type );
+    %RenameCtor(IconBundleFromFile, wxIconBundle( const wxString& file, long type ));
 
     // initializes the bundle with a single icon
-    %name(IconBundleFromIcon)wxIconBundle( const wxIcon& icon );
+    %RenameCtor(IconBundleFromIcon, wxIconBundle( const wxIcon& icon ));
 
     ~wxIconBundle();
 
@@ -151,7 +153,7 @@ public:
     // adds all the icons contained in the file to the collection,
     // if the collection already contains icons with the same
     // width and height, they are replaced
-    %name(AddIconFromFile)void AddIcon( const wxString& file, long type );
+    %Rename(AddIconFromFile,void, AddIcon( const wxString& file, long type ));
 
     // returns the icon with the given size; if no such icon exists,
     // returns the icon with size wxSYS_ICON_[XY]; if no such icon exists,
index ea4cca9f1000ff7473102c9519f58840b511b1d4..4309d556b6dd24158ec21bdc82315b8868b92df1 100644 (file)
@@ -76,15 +76,32 @@ success flag and rgb values.", "");
 
 class wxImage : public wxObject {
 public:
-    wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
+    DocCtorStr(
+        wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ),
+        "", "");
+    
     ~wxImage();
 
     // Alternate constructors
-    %name(ImageFromMime) wxImage(const wxString& name, const wxString& mimetype, int index = -1);
-    %name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
-    %name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
+    DocCtorStrName(
+        wxImage(const wxString& name, const wxString& mimetype, int index = -1),
+        "", "",
+        ImageFromMime);
+    
+    DocCtorStrName(
+        wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1),
+        "", "",
+        ImageFromStream);
+    
+    DocCtorStrName(
+        wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 ),
+        "", "",
+        ImageFromStreamMime);
+    
     %extend {
-        %name(EmptyImage) wxImage(int width=0, int height=0, bool clear = true) {
+        %rename(EmptyImage) wxImage(int width=0, int height=0, bool clear = true);
+        wxImage(int width=0, int height=0, bool clear = true)
+        {
             if (width > 0 && height > 0)
                 return new wxImage(width, height, clear);
             else
@@ -92,11 +109,15 @@ public:
         }
 
         MustHaveApp(wxImage(const wxBitmap &bitmap));
-        %name(ImageFromBitmap) wxImage(const wxBitmap &bitmap) {
+        %rename(ImageFromBitmap) wxImage(const wxBitmap &bitmap);
+        wxImage(const wxBitmap &bitmap)
+        {
             return new wxImage(bitmap.ConvertToImage());
         }
 
-        %name(ImageFromData) wxImage(int width, int height, unsigned char* data) {
+        %rename(ImageFromData) wxImage(int width, int height, unsigned char* data);
+        wxImage(int width, int height, unsigned char* data)
+        {
             // Copy the source data so the wxImage can clean it up later
             unsigned char* copy = (unsigned char*)malloc(width*height*3);
             if (copy == NULL) {
@@ -106,8 +127,11 @@ public:
             memcpy(copy, data, width*height*3);
             return new wxImage(width, height, copy, false);
         }
-        %name(ImageFromDataWithAlpha) wxImage(int width, int height,
-                                              unsigned char* data, unsigned char* alpha) {
+
+        
+        %rename(ImageFromDataWithAlpha) wxImage(int width, int height, unsigned char* data, unsigned char* alpha);
+        wxImage(int width, int height, unsigned char* data, unsigned char* alpha)
+        {
             // Copy the source data so the wxImage can clean it up later
             unsigned char* dcopy = (unsigned char*)malloc(width*height*3);
             if (dcopy == NULL) {
@@ -190,14 +214,14 @@ The method will then fill up the whole image with the colour given.", "");
     static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY );
 
     bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
-    %name(LoadMimeFile)bool LoadFile( const wxString& name, const wxString& mimetype, int index = -1 );
+    %Rename(LoadMimeFile, bool,  LoadFile( const wxString& name, const wxString& mimetype, int index = -1 ));
 
     bool SaveFile( const wxString& name, int type );
-    %name(SaveMimeFile)bool SaveFile( const wxString& name, const wxString& mimetype );
+    %Rename(SaveMimeFile, bool,  SaveFile( const wxString& name, const wxString& mimetype ));
 
-    %name(CanReadStream) static bool CanRead( wxInputStream& stream );
-    %name(LoadStream) bool LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 );
-    %name(LoadMimeStream) bool LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 );
+    %Rename(CanReadStream, static bool,  CanRead( wxInputStream& stream ));
+    %Rename(LoadStream, bool,  LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 ));
+    %Rename(LoadMimeStream, bool,  LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 ));
 
     bool Ok();
     int GetWidth();
@@ -341,7 +365,7 @@ The method will then fill up the whole image with the colour given.", "");
     wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const;
 
     void SetOption(const wxString& name, const wxString& value);
-    %name(SetOptionInt)void SetOption(const wxString& name, int value);
+    %Rename(SetOptionInt, void,  SetOption(const wxString& name, int value));
     wxString GetOption(const wxString& name) const;
     int GetOptionInt(const wxString& name) const;
     bool HasOption(const wxString& name) const;
index b5df300010bb2d00c529eccfc4c56be7709803f6..f2b32ab3fe8eb14238dd6a0b8b3c9cba473fa911 100644 (file)
@@ -47,12 +47,12 @@ public:
     ~wxImageList();
 
     int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
-    %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
-    %name(AddIcon)int Add(const wxIcon& icon);
+    %Rename(AddWithColourMask,int, Add(const wxBitmap& bitmap, const wxColour& maskColour));
+    %Rename(AddIcon,int, Add(const wxIcon& icon));
 #ifdef __WXMSW__
     bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
 #else
-//      %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
+//      %Rename(ReplaceIcon,bool, Replace(int index, const wxIcon& icon));
 //      int Add(const wxBitmap& bitmap);
     bool Replace(int index, const wxBitmap& bitmap);
 #endif
index 63f0324ac17b7b3da82df1c99b0281ec354ebc8d..41fdd0eb02288351116d41d7515dc1ee5143aa7e 100644 (file)
@@ -42,7 +42,7 @@ public:
               long style = 0,
               const wxValidator& validator = wxDefaultValidator,
               const wxString& name = wxPyListBoxNameStr);
-    %name(PreListBox)wxListBox();
+    %RenameCtor(PreListBox, wxListBox());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                 const wxPoint& pos = wxDefaultPosition,
@@ -95,7 +95,7 @@ public:
     // set the specified item at the first visible item or scroll to max
     // range.
     void SetFirstItem(int n);
-    %name(SetFirstItemStr) void SetFirstItem(const wxString& s);
+    %Rename(SetFirstItemStr,  void, SetFirstItem(const wxString& s));
 
     // ensures that the given item is visible scrolling the listbox if
     // necessary
@@ -156,7 +156,7 @@ public:
                    long style = 0,
                    const wxValidator& validator = wxDefaultValidator,
                    const wxString& name = wxPyListBoxNameStr);
-    %name(PreCheckListBox)wxCheckListBox();
+    %RenameCtor(PreCheckListBox, wxCheckListBox());
 
     bool Create(wxWindow *parent, wxWindowID id=-1,
                 const wxPoint& pos = wxDefaultPosition,
@@ -176,7 +176,7 @@ public:
 
     // return the index of the item at this position or wxNOT_FOUND
     int HitTest(const wxPoint& pt) const;
-    %name(HitTestXY)int HitTest(wxCoord x, wxCoord y) const;
+    %Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
 };
 
 //---------------------------------------------------------------------------
index c342e9517f6e21fbee62efb1aeb321db6d672105..0d3269c53f8f180020e5ffd8a676860fc0185d77 100644 (file)
@@ -406,7 +406,8 @@ IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage);
 
 MustHaveApp(wxPyListCtrl);
 
-%name(ListCtrl)class wxPyListCtrl : public wxControl {
+%rename(ListCtrl) wxPyListCtrl;
+class wxPyListCtrl : public wxControl {
 public:
 
     %pythonAppend wxPyListCtrl         "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)"
@@ -418,7 +419,7 @@ public:
                  long style = wxLC_ICON,
                  const wxValidator& validator = wxDefaultValidator,
                  const wxString& name = wxPyListCtrlNameStr);
-    %name(PreListCtrl)wxPyListCtrl();
+    %RenameCtor(PreListCtrl, wxPyListCtrl());
 
     bool Create(wxWindow* parent, wxWindowID id = -1,
                  const wxPoint& pos = wxDefaultPosition,
@@ -494,7 +495,7 @@ public:
     bool SetItem(wxListItem& info) ;
 
     // Sets a string field at a particular column
-    %name(SetStringItem)long SetItem(long index, int col, const wxString& label, int imageId = -1);
+    %Rename(SetStringItem, long, SetItem(long index, int col, const wxString& label, int imageId = -1));
 
     // Gets the item state
     int  GetItemState(long item, long stateMask) const ;
@@ -637,11 +638,11 @@ public:
 
     // Find an item whose data matches this data, starting from the item after 'start'
     // or the beginning if 'start' is -1.
-    %name(FindItemData) long FindItem(long start, long data);
+    %Rename(FindItemData,  long, FindItem(long start, long data));
 
     // Find an item nearest this position in the specified direction, starting from
     // the item after 'start' or the beginning if 'start' is -1.
-    %name(FindItemAtPos) long FindItem(long start, const wxPoint& pt, int direction);
+    %Rename(FindItemAtPos,  long, FindItem(long start, const wxPoint& pt, int direction));
 
 
     DocDeclAStr(
@@ -655,16 +656,16 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", "");
     long InsertItem(wxListItem& info);
 
     // Insert a string item
-    %name(InsertStringItem) long InsertItem(long index, const wxString& label);
+    %Rename(InsertStringItem,  long, InsertItem(long index, const wxString& label));
 
     // Insert an image item
-    %name(InsertImageItem) long InsertItem(long index, int imageIndex);
+    %Rename(InsertImageItem,  long, InsertItem(long index, int imageIndex));
 
     // Insert an image/string item
-    %name(InsertImageStringItem) long InsertItem(long index, const wxString& label, int imageIndex);
+    %Rename(InsertImageStringItem,  long, InsertItem(long index, const wxString& label, int imageIndex));
 
     // For list view mode (only), inserts a column.
-    %name(InsertColumnInfo) long InsertColumn(long col, wxListItem& info);
+    %Rename(InsertColumnInfo,  long, InsertColumn(long col, wxListItem& info));
 
     long InsertColumn(long col,
                       const wxString& heading,
@@ -802,7 +803,7 @@ public:
                 long style = wxLC_REPORT,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxPyListCtrlNameStr);
-    %name(PreListView)wxListView();
+    %RenameCtor(PreListView, wxListView());
 
     bool Create( wxWindow *parent,
                 wxWindowID id = -1,
index 17a737e292273c024ac4f7cbdd07b2bd02f20c60..101005967250c5766ad537d22df3e093bc011d93 100644 (file)
@@ -302,22 +302,22 @@ const wxString wxSysErrorMsg(unsigned long nErrCode = 0);
     
 %}
 
-%name(LogFatalError) void wxPyLogFatalError(const wxString& msg);
-%name(LogError) void wxPyLogError(const wxString& msg);
-%name(LogWarning) void wxPyLogWarning(const wxString& msg);
-%name(LogMessage) void wxPyLogMessage(const wxString& msg);
-%name(LogInfo) void wxPyLogInfo(const wxString& msg);
-%name(LogDebug) void wxPyLogDebug(const wxString& msg);
-%name(LogVerbose) void wxPyLogVerbose(const wxString& msg);
-%name(LogStatus) void wxPyLogStatus(const wxString& msg);
-%name(LogStatusFrame) void wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg);
-%name(LogSysError) void wxPyLogSysError(const wxString& msg);
-
-%name(LogGeneric) void wxPyLogGeneric(unsigned long level, const wxString& msg);
+%Rename(LogFatalError,  void, wxPyLogFatalError(const wxString& msg));
+%Rename(LogError,  void, wxPyLogError(const wxString& msg));
+%Rename(LogWarning,  void, wxPyLogWarning(const wxString& msg));
+%Rename(LogMessage,  void, wxPyLogMessage(const wxString& msg));
+%Rename(LogInfo,  void, wxPyLogInfo(const wxString& msg));
+%Rename(LogDebug,  void, wxPyLogDebug(const wxString& msg));
+%Rename(LogVerbose,  void, wxPyLogVerbose(const wxString& msg));
+%Rename(LogStatus,  void, wxPyLogStatus(const wxString& msg));
+%Rename(LogStatusFrame,  void, wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg));
+%Rename(LogSysError,  void, wxPyLogSysError(const wxString& msg));
+
+%Rename(LogGeneric,  void, wxPyLogGeneric(unsigned long level, const wxString& msg));
 
 %nokwargs wxPyLogTrace;
-%name(LogTrace) void wxPyLogTrace(unsigned long mask, const wxString& msg);
-%name(LogTrace) void wxPyLogTrace(const wxString& mask, const wxString& msg);
+%Rename(LogTrace,  void, wxPyLogTrace(unsigned long mask, const wxString& msg));
+%Rename(LogTrace,  void, wxPyLogTrace(const wxString& mask, const wxString& msg));
 
 
 // wxLogFatalError helper: show the (fatal) error to the user in a safe way,
index ae3d1f9fbb06d5a684b18c64793dc6347f7f2843..1ad5530ff766c3d806971e1d04d0152099aaaab6 100644 (file)
@@ -47,7 +47,7 @@ public:
                      const wxSize& size = wxDefaultSize,
                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
                      const wxString& name = wxPyFrameNameStr);
-    %name(PreMDIParentFrame)wxMDIParentFrame();
+    %RenameCtor(PreMDIParentFrame, wxMDIParentFrame());
 
     bool Create(wxWindow *parent,
                      const wxWindowID id=-1,
@@ -95,7 +95,7 @@ public:
                     const wxSize& size = wxDefaultSize,
                     long style = wxDEFAULT_FRAME_STYLE,
                     const wxString& name = wxPyFrameNameStr);
-    %name(PreMDIChildFrame)wxMDIChildFrame();
+    %RenameCtor(PreMDIChildFrame, wxMDIChildFrame());
 
     // Turn it back on again
     %typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
@@ -126,7 +126,7 @@ public:
     %typemap(out) wxMDIClientWindow*;    // turn off this typemap
 
     wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
-    %name(PreMDIClientWindow)wxMDIClientWindow();
+    %RenameCtor(PreMDIClientWindow, wxMDIClientWindow());
 
     // Turn it back on again
     %typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
index e1407bad00fcb1a20283e5fa4202d9327d123103..9e9d7e7f4b901e5881cdec28df54c5495d1be939 100644 (file)
@@ -50,20 +50,20 @@ public:
                                 const wxString& text,
                                 const wxString& help = wxPyEmptyString);
     // append a submenu
-    %name(AppendMenu) wxMenuItem* Append(int id,
-                                         const wxString& text,
-                                         wxMenu *submenu,
-                                         const wxString& help = wxPyEmptyString);
+    %Rename(AppendMenu, wxMenuItem*, Append(int id,
+                                           const wxString& text,
+                                           wxMenu *submenu,
+                                           const wxString& help = wxPyEmptyString));
 
     // the most generic form of Append() - append anything
-    %name(AppendItem) wxMenuItem* Append(wxMenuItem *item);
+    %Rename(AppendItem, wxMenuItem*, Append(wxMenuItem *item));
 
     // insert a break in the menu (only works when appending the items, not
     // inserting them)
     virtual void Break();
 
     // insert an item before given position
-    %name(InsertItem) wxMenuItem* Insert(size_t pos, wxMenuItem *item);
+    %Rename(InsertItem, wxMenuItem*, Insert(size_t pos, wxMenuItem *item));
 
     // insert an item before given position
     wxMenuItem* Insert(size_t pos,
@@ -88,14 +88,14 @@ public:
                                 const wxString& help = wxPyEmptyString);
 
     // insert a submenu
-    %name(InsertMenu) wxMenuItem* Insert(size_t pos,
+    %Rename(InsertMenu, wxMenuItem*, Insert(size_t pos,
                                          int id,
                                          const wxString& text,
                                          wxMenu *submenu,
-                                         const wxString& help = wxPyEmptyString);
+                                         const wxString& help = wxPyEmptyString));
 
     // prepend an item to the menu
-    %name(PrependItem) wxMenuItem* Prepend(wxMenuItem *item);
+    %Rename(PrependItem,  wxMenuItem*, Prepend(wxMenuItem *item));
 
     // prepend any item to the menu
     wxMenuItem* Prepend(int id,
@@ -117,26 +117,26 @@ public:
                                   const wxString& help = wxPyEmptyString);
 
     // prepend a submenu
-    %name(PrependMenu) wxMenuItem* Prepend(int id,
+    %Rename(PrependMenu,  wxMenuItem*, Prepend(int id,
                                            const wxString& text,
                                            wxMenu *submenu,
-                                           const wxString& help = wxPyEmptyString);
+                                           const wxString& help = wxPyEmptyString));
 
     // detach an item from the menu, but don't delete it so that it can be
     // added back later (but if it's not, the caller is responsible for
     // deleting it!)
     wxMenuItem *Remove(int id);
-    %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
+    %Rename(RemoveItem,  wxMenuItem*, Remove(wxMenuItem *item));
 
     // delete an item from the menu (submenus are not destroyed by this
     // function, see Destroy)
     bool Delete(int id);
-    %name(DeleteItem) bool Delete(wxMenuItem *item);
+    %Rename(DeleteItem,  bool, Delete(wxMenuItem *item));
 
     // delete the item from menu and destroy it (if it's a submenu)
     %extend { void Destroy() { delete self; } }
-    %name(DestroyId) bool Destroy(int id);
-    %name(DestroyItem) bool Destroy(wxMenuItem *item);
+    %Rename(DestroyId,  bool, Destroy(int id));
+    %Rename(DestroyItem,  bool, Destroy(wxMenuItem *item));
 
 
     // get the items
@@ -150,7 +150,7 @@ public:
 
     // search
     int FindItem(const wxString& item) const;
-    %name(FindItemById) wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
+    %Rename(FindItemById, wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
 
     // find by position
     wxMenuItem* FindItemByPosition(size_t position) const;
@@ -263,7 +263,7 @@ public:
     // find item by id (in any menu), returns NULL if not found
     //
     // if menu is !NULL, it will be filled with wxMenu this item belongs to
-    %name(FindItemById) virtual wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
+    %Rename(FindItemById, virtual wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
 
     // find menu by its caption, return wxNOT_FOUND on failure
     int FindMenu(const wxString& title) const;
index 36098c8f7adf6f9a290044d3b78bb1a3f8a77b27..5935b7dd310f83c8ee4dc6e5c564ecf6dabf64ed 100644 (file)
@@ -48,11 +48,11 @@ public:
 
     // the array elements correspond to the parameters of the ctor above in
     // the same order
-    %name(FileTypeInfoSequence)wxFileTypeInfo(const wxArrayString& sArray);
+    %Rename(FileTypeInfoSequence,, wxFileTypeInfo(const wxArrayString& sArray));
 
     // invalid item - use this to terminate the array passed to
     // wxMimeTypesManager::AddFallbacks
-    %name(NullFileTypeInfo)wxFileTypeInfo();
+    %Rename(NullFileTypeInfo,, wxFileTypeInfo());
 
 
     // test if this object can be used
index 3390427f944f95ec158c56bb846dbb80b2e6568a..15d4c69340cbeac570d0e1acca65d0d21ae82141 100644 (file)
@@ -62,9 +62,9 @@ public:
     
 
     wxWindow *GetWindow();
-    %name(MoveXY)void Move(int x, int y);
+    %Rename(MoveXY, void, Move(int x, int y));
     void Move(const wxPoint& pt);
-    %name(SetSizeWH) void SetSize(int width, int height);
+    %Rename(SetSizeWH,  void, SetSize(int width, int height));
     void SetSize(const wxSize& size);
     void Show(int show = true);
     void Hide();
@@ -159,7 +159,7 @@ public:
     void Save(wxConfigBase& config);
 
     void AddFilesToMenu();
-    %name(AddFilesToThisMenu)void AddFilesToMenu(wxMenu* menu);
+    %Rename(AddFilesToThisMenu, void, AddFilesToMenu(wxMenu* menu));
 
     // Accessors
     wxString GetHistoryFile(int i) const;
@@ -184,7 +184,7 @@ public:
                             const wxString& path = wxPyEmptyString);
 
     // default ctor, use Create() after it
-    %name(PreSingleInstanceChecker) wxSingleInstanceChecker();
+    %RenameCtor(PreSingleInstanceChecker,  wxSingleInstanceChecker());
 
     ~wxSingleInstanceChecker();
 
index e0dfafc31faf6ff43117957e1c43b29fcdc5c4e8..aa897f22203cd90e19ae6a6f785b2ff24e1c8367 100644 (file)
@@ -36,7 +36,7 @@ public:
 //                const wxSize& size = wxDefaultSize,
 //                long style = 0,
 //                const wxString& name = wxPyEmptyString);
-//     %name(PreBookCtrlBase)wxBookCtrlBase();
+//     %RenameCtor(PreBookCtrlBase, wxBookCtrlBase());
 //     bool Create(wxWindow *parent,
 //                 wxWindowID id,
 //                 const wxPoint& pos = wxDefaultPosition,
@@ -179,7 +179,7 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxString& name = wxPyNOTEBOOK_NAME);
-    %name(PreNotebook)wxNotebook();
+    %RenameCtor(PreNotebook, wxNotebook());
 
     // Turn it back on again
     %typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
@@ -307,7 +307,7 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxString& name = wxPyEmptyString);
-    %name(PreListbook)wxListbook();
+    %RenameCtor(PreListbook, wxListbook());
 
     bool Create(wxWindow *parent,
                 wxWindowID id=-1,
@@ -371,7 +371,7 @@ public:
                  const wxSize& size = wxDefaultSize,
                  long style = 0,
                  const wxString& name = wxPyEmptyString);
-    %name(PreChoicebook)wxChoicebook();
+    %RenameCtor(PreChoicebook, wxChoicebook());
 
     // quasi ctor
     bool Create(wxWindow *parent,
index 1a32e3cc0ca8d76bfe0c753cb1e403bc844ce5ab..881ceefcec622608e58cba80c72f3fef679c118a 100644 (file)
@@ -37,7 +37,7 @@ public:
             const wxSize& size = wxDefaultSize,
             long style = wxTAB_TRAVERSAL | wxNO_BORDER,
             const wxString& name = wxPyPanelNameStr);
-    %name(PrePanel)wxPanel();
+    %RenameCtor(PrePanel, wxPanel());
 
     // Turn it back on again
     %typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
@@ -96,7 +96,7 @@ public:
                      const wxSize& size = wxDefaultSize,
                      long style = wxHSCROLL | wxVSCROLL,
                      const wxString& name = wxPyPanelNameStr);
-    %name(PreScrolledWindow)wxScrolledWindow();
+    %RenameCtor(PreScrolledWindow, wxScrolledWindow());
 
     // Turn it back on again
     %typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
index 706fbccab0b9f3b44b14dc42938bbd4c25bd995f..ec47753500c81541f75628b95d55d04dae72057f 100644 (file)
@@ -35,7 +35,7 @@ public:
     %pythonAppend wxPopupWindow()       ""
     
     wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
-    %name(PrePopupWindow)wxPopupWindow();
+    %RenameCtor(PrePopupWindow, wxPopupWindow());
 
     bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
 
@@ -81,14 +81,15 @@ MustHaveApp(wxPyPopupTransientWindow);
 // wxPopupTransientWindow: a wxPopupWindow which disappears automatically
 // when the user clicks mouse outside it or if it loses focus in any other way
 
-%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
+%rename(PopupTransientWindow) wxPyPopupTransientWindow;
+class wxPyPopupTransientWindow : public wxPopupWindow
 {
 public:
     %pythonAppend wxPyPopupTransientWindow         "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)"
     %pythonAppend wxPyPopupTransientWindow()       ""
     
     wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
-    %name(PrePopupTransientWindow)wxPyPopupTransientWindow();
+    %RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
@@ -124,14 +125,15 @@ public:
 class wxPopupWindow : public wxWindow {
 public:
     wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
-    %name(PrePopupWindow)wxPopupWindow();
+    %RenameCtor(PrePopupWindow, wxPopupWindow());
 };
 
-%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
+%rename(PopupTransientWindow) wxPyPopupTransientWindow;
+class wxPyPopupTransientWindow : public wxPopupWindow
 {
 public:
     wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
-    %name(PrePopupTransientWindow)wxPyPopupTransientWindow();
+    %RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
 };
 
 
index 6bc971b70e9015be80eac92789ad29221043d769..115834daf27eb06a81cc19c62f54b1d0eb631057 100644 (file)
@@ -376,7 +376,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage);
 MustHaveApp(wxPyPrintout);
 
 // Now define the custom class for SWIGging
-%name(Printout) class wxPyPrintout  : public wxObject {
+%rename(Printout) wxPyPrintout;
+class wxPyPrintout  : public wxObject {
 public:
     %pythonAppend wxPyPrintout   "self._setCallbackInfo(self, Printout)"
 
index 5474130544f00b2bcbc79f130e3c49084ab523bd..bada7e7ac43dc7e7486e50174d51cac9038ae094 100644 (file)
@@ -78,7 +78,8 @@ IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate);
 %}
 
 
-%name(Process)class wxPyProcess : public wxEvtHandler {
+%rename(Process) wxPyProcess;
+class wxPyProcess : public wxEvtHandler {
 public:
     // kill the process with the given PID
     static wxKillError Kill(int pid,
index dc1e8047b9ec5c2753d270774f79aba88af19125..e4e18dcd5850b4c54f21812a5057f398f796e7fb 100644 (file)
@@ -113,7 +113,7 @@ public:
                 const wxValidator& validator=wxDefaultValidator,
                 const wxString& name = wxPyControlNameStr);
 
-    %name(PrePyControl) wxPyControl();
+    %RenameCtor(PrePyControl,  wxPyControl());
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
index 8edd2a3f37fb869e70cc49f07ad0aed354977929..5bce9652526aadd30cf069fe5350fddf53b90bd2 100644 (file)
@@ -142,7 +142,7 @@ public:
                long style = 0,
                const wxString& name = wxPyPanelNameStr);
 
-    %name(PrePyWindow) wxPyWindow();
+    %RenameCtor(PrePyWindow, wxPyWindow());
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
@@ -287,7 +287,7 @@ public:
                long style = 0,
                const wxString& name = wxPyPanelNameStr);
 
-    %name(PrePyPanel) wxPyPanel();
+    %RenameCtor(PrePyPanel,  wxPyPanel());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
@@ -424,7 +424,7 @@ public:
                long style = 0,
                const wxString& name = wxPyPanelNameStr);
 
-    %name(PrePyScrolledWindow) wxPyScrolledWindow();
+    %RenameCtor(PrePyScrolledWindow,  wxPyScrolledWindow());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
index 93a78b647db6c89f39649f0525d63464552e0b3f..d71462cc008766627d913eb19762d88cc9146b66 100644 (file)
@@ -41,7 +41,7 @@ public:
                long style = wxRA_HORIZONTAL,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyRadioBoxNameStr);
-    %name(PreRadioBox)wxRadioBox();
+    %RenameCtor(PreRadioBox, wxRadioBox());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                 const wxString& label = wxPyEmptyString,
@@ -70,8 +70,8 @@ public:
     %pythoncode { SetItemLabel = SetString };
 
     // change the individual radio button state
-    %name(EnableItem) virtual void Enable(int n, bool enable = true);
-    %name(ShowItem) virtual void Show(int n, bool show = true);
+    %Rename(EnableItem,  virtual void, Enable(int n, bool enable = true));
+    %Rename(ShowItem,  virtual void, Show(int n, bool show = true));
 
 #ifndef __WXGTK__
     // layout parameters
@@ -111,7 +111,7 @@ public:
                   long style = 0,
                   const wxValidator& validator = wxDefaultValidator,
                   const wxString& name = wxPyRadioButtonNameStr);
-    %name(PreRadioButton)wxRadioButton();
+    %RenameCtor(PreRadioButton, wxRadioButton());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                   const wxString& label = wxPyEmptyString,
index c26cbe99a16468ae6fc7f517d7f9866684d8a70c..e7d68c73518a298c25a77a60c02ad2b265731afb 100644 (file)
@@ -46,12 +46,12 @@ MustHaveApp(wxRegion);
 class wxRegion : public wxGDIObject {
 public:
     wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
-    %name(RegionFromBitmap)wxRegion(const wxBitmap& bmp);
-    %name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp,
-                                          const wxColour& transColour,
-                                          int   tolerance = 0);
-    %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
-                                      int fillStyle = wxWINDING_RULE);
+    %RenameCtor(RegionFromBitmap, wxRegion(const wxBitmap& bmp));
+    %RenameCtor(RegionFromBitmapColour, wxRegion(const wxBitmap& bmp,
+                                                 const wxColour& transColour,
+                                                 int   tolerance = 0));
+    %RenameCtor(RegionFromPoints, wxRegion(int points, wxPoint* points_array,
+                                           int fillStyle = wxWINDING_RULE));
 
     ~wxRegion();
 
@@ -60,29 +60,29 @@ public:
     bool Offset(wxCoord x, wxCoord y);
 
     wxRegionContain Contains(wxCoord x, wxCoord y);
-    %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
-    %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
-    %name(ContainsRectDim)wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
+    %Rename(ContainsPoint, wxRegionContain, Contains(const wxPoint& pt));
+    %Rename(ContainsRect, wxRegionContain, Contains(const wxRect& rect));
+    %Rename(ContainsRectDim, wxRegionContain, Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h));
 
     wxRect GetBox();
 
     bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(IntersectRect)bool Intersect(const wxRect& rect);
-    %name(IntersectRegion)bool Intersect(const wxRegion& region);
+    %Rename(IntersectRect, bool, Intersect(const wxRect& rect));
+    %Rename(IntersectRegion, bool, Intersect(const wxRegion& region));
 
     bool IsEmpty();
 
     bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(UnionRect)bool Union(const wxRect& rect);
-    %name(UnionRegion)bool Union(const wxRegion& region);
+    %Rename(UnionRect, bool, Union(const wxRect& rect));
+    %Rename(UnionRegion, bool, Union(const wxRegion& region));
 
     bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(SubtractRect)bool Subtract(const wxRect& rect);
-    %name(SubtractRegion)bool Subtract(const wxRegion& region);
+    %Rename(SubtractRect, bool, Subtract(const wxRect& rect));
+    %Rename(SubtractRegion, bool, Subtract(const wxRegion& region));
 
     bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    %name(XorRect)bool Xor(const wxRect& rect);
-    %name(XorRegion)bool Xor(const wxRegion& region);
+    %Rename(XorRect, bool, Xor(const wxRect& rect));
+    %Rename(XorRegion, bool, Xor(const wxRegion& region));
 
     // Convert the region to a B&W bitmap with the white pixels being inside
     // the region.
@@ -92,10 +92,10 @@ public:
     // with this region.  If the bitmap has a mask then it will be used,
     // otherwise the colour to be treated as transparent may be specified,
     // along with an optional tolerance value.
-    %name(UnionBitmap)bool Union(const wxBitmap& bmp);
-    %name(UnionBitmapColour)bool Union(const wxBitmap& bmp,
-                                       const wxColour& transColour,
-                                       int   tolerance = 0);
+    %Rename(UnionBitmap, bool, Union(const wxBitmap& bmp));
+    %Rename(UnionBitmapColour, bool, Union(const wxBitmap& bmp,
+                                           const wxColour& transColour,
+                                           int   tolerance = 0));
 };
 
 
index 63ab46c33b62b91c2c9f8e5acf8b34fab23d1a16..2ae31351a8ce82d049791755e94832b5db844461 100644 (file)
@@ -61,7 +61,7 @@ public:
                  const wxSize& size = wxDefaultSize,
                  long style = wxCLIP_CHILDREN | wxSW_3D,
                  const wxString& name = wxPySashNameStr);
-    %name(PreSashWindow)wxSashWindow();
+    %RenameCtor(PreSashWindow, wxSashWindow());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                  const wxPoint& pos = wxDefaultPosition,
@@ -249,7 +249,7 @@ public:
                        const wxSize& size = wxDefaultSize,
                        long style = wxCLIP_CHILDREN | wxSW_3D,
                        const wxString& name = wxPySashLayoutNameStr);
-    %name(PreSashLayoutWindow)wxSashLayoutWindow();
+    %RenameCtor(PreSashLayoutWindow, wxSashLayoutWindow());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                 const wxPoint& pos = wxDefaultPosition,
index cb87fb1013a72c048ed5dd1822d1d64b3a14e90c..eef02eb2f5280719335acb529a4f58e2280a3c70 100644 (file)
@@ -33,7 +33,7 @@ public:
                 long style = wxSB_HORIZONTAL,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxPyScrollBarNameStr);
-    %name(PreScrollBar)wxScrollBar();
+    %RenameCtor(PreScrollBar, wxScrollBar());
 
     bool Create(wxWindow* parent, wxWindowID id = -1,
                 const wxPoint& pos = wxDefaultPosition,
index 2cf16843c32cc172ebec75a7c00fde063fd84288..b4bc618260cb6060abcd62ab7357f9281908caa6 100644 (file)
@@ -195,7 +195,7 @@ public:
     // to implement SetSystemColour/Font/Metric
 
     static void SetOption(const wxString& name, const wxString& value);
-    %name(SetOptionInt) static void SetOption(const wxString& name, int value);
+    %Rename(SetOptionInt,  static void, SetOption(const wxString& name, int value));
     static wxString GetOption(const wxString& name) ;
     static int GetOptionInt(const wxString& name) ;
     static bool HasOption(const wxString& name) ;
index 0a1f5101b9eb741e736af11070d3ab6aad5ccd51..bba510b197c9a12556506851fed6733ba1f86496 100644 (file)
@@ -51,8 +51,9 @@ methods are called.
                          int border, PyObject* userData=NULL ),
             "Constructs a `wx.SizerItem` for tracking a window.", ""); 
     
-        %name(SizerItemWindow) wxSizerItem( wxWindow *window, int proportion, int flag,
-                                            int border, PyObject* userData=NULL ) {
+        %RenameCtor(SizerItemWindow, wxSizerItem( wxWindow *window, int proportion, int flag,
+                                                  int border, PyObject* userData=NULL ))
+        {
             wxPyUserData* data = NULL;
             if ( userData ) {
                 bool blocked = wxPyBeginBlockThreads();
@@ -67,8 +68,10 @@ methods are called.
             wxSizerItem( int width, int height, int proportion, int flag,
                          int border, PyObject* userData=NULL),
             "Constructs a `wx.SizerItem` for tracking a spacer.", "");
-        %name(SizerItemSpacer) wxSizerItem( int width, int height, int proportion, int flag,
-                                            int border, PyObject* userData=NULL) {
+        
+        %RenameCtor(SizerItemSpacer,  wxSizerItem( int width, int height, int proportion, int flag,
+                                                   int border, PyObject* userData=NULL))
+        {
             wxPyUserData* data = NULL;
             if ( userData ) {
                 bool blocked = wxPyBeginBlockThreads();
@@ -81,9 +84,11 @@ methods are called.
         DocStr(
             wxSizerItem( wxSizer *sizer, int proportion, int flag,
                          int border, PyObject* userData=NULL ),
-            "Constructs a `wx.SizerItem` for tracking a subsizer", ""); 
-        %name(SizerItemSizer)  wxSizerItem( wxSizer *sizer, int proportion, int flag,
-                                            int border, PyObject* userData=NULL ) {
+            "Constructs a `wx.SizerItem` for tracking a subsizer", "");
+        
+        %RenameCtor(SizerItemSizer,  wxSizerItem( wxSizer *sizer, int proportion, int flag,
+                                                  int border, PyObject* userData=NULL ))
+        {
             wxPyUserData* data = NULL;
             if ( userData ) {
                 bool blocked = wxPyBeginBlockThreads();
@@ -139,8 +144,8 @@ added, if needed.", "");
 
     DocStr(SetRatio,
            "Set the ratio item attribute.", "");
-    %name(SetRatioWH) void SetRatio( int width, int height );
-    %name(SetRatioSize) void SetRatio( wxSize size );
+    %Rename(SetRatioWH, void, SetRatio( int width, int height ));
+    %Rename(SetRatioSize, void, SetRatio( wxSize size ));
     void SetRatio( float ratio );
     
     DocDeclStr(
index 6ecb209afe0bbc020f1f6f0c4aa41b9076b6b281..106c3aaf7d77e188ecd8f277314c5577c46a0015 100644 (file)
@@ -41,7 +41,7 @@ public:
              long style = wxSL_HORIZONTAL,
              const wxValidator& validator = wxDefaultValidator,
              const wxString& name = wxPySliderNameStr);
-    %name(PreSlider)wxSlider();
+    %RenameCtor(PreSlider, wxSlider());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
              int value=0, int minValue=0, int maxValue=100,
index 9ddc7901c7a9b895f99478740fa5b743d36d6a89..5569a08bfec3d25741897809a762e5d7389feba8 100644 (file)
@@ -85,7 +85,8 @@ public:
             else
                 return new wxSound(fileName);
         }
-        %name(SoundFromData) wxSound(PyObject* data) {
+        %RenameCtor(SoundFromData,  wxSound(PyObject* data))
+        {
             unsigned char* buffer; int size;
             wxSound *sound = NULL;
 
@@ -135,7 +136,7 @@ public:
     bool Play(unsigned flags = wxSOUND_ASYNC) const;
 
     // Plays sound from filename:
-    %name(PlaySound) static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
+    %Rename(PlaySound,  static bool, Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC));
 
 #ifndef __WXMAC__
     static void Stop();
index 7f9f33a1dacce682cff629dd9a239457c69024c7..dd8283985c42b953fab94dce3d7632b957dfdcc1 100644 (file)
@@ -50,7 +50,7 @@ public:
                  const wxSize& size = wxDefaultSize,
                  long style = wxSP_HORIZONTAL,
                  const wxString& name = wxPySPIN_BUTTON_NAME);
-    %name(PreSpinButton)wxSpinButton();
+    %RenameCtor(PreSpinButton, wxSpinButton());
 
     bool Create(wxWindow* parent, wxWindowID id = -1,
                  const wxPoint& pos = wxDefaultPosition,
@@ -97,7 +97,7 @@ public:
                long style = wxSP_ARROW_KEYS,
                int min = 0, int max = 100, int initial = 0,
                const wxString& name = wxPySpinCtrlNameStr);
-    %name(PreSpinCtrl)wxSpinCtrl();
+    %RenameCtor(PreSpinCtrl, wxSpinCtrl());
 
     bool Create(wxWindow *parent,
                wxWindowID id = -1,
@@ -110,7 +110,7 @@ public:
 
     virtual int GetValue() const;
     virtual void SetValue( int value );
-    %name(SetValueString) void SetValue(const wxString& text);
+    %Rename(SetValueString,  void, SetValue(const wxString& text));
 
     virtual void SetRange( int minVal, int maxVal );
     virtual int GetMin() const;
index 9c2df37ac931eb70fa420144a811f454fcf4083b..a22abfe080a3904543ac01b8842782584b0ba773 100644 (file)
@@ -37,7 +37,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxString& name = wxPyStaticBoxNameStr);
-    %name(PreStaticBox)wxStaticBox();
+    %RenameCtor(PreStaticBox, wxStaticBox());
 
     // Turn it back on again
     %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
@@ -70,7 +70,7 @@ public:
                   const wxSize &size = wxDefaultSize,
                   long style = wxLI_HORIZONTAL,
                   const wxString& name = wxPyStaticTextNameStr);
-    %name(PreStaticLine)wxStaticLine();
+    %RenameCtor(PreStaticLine, wxStaticLine());
 
     bool Create( wxWindow *parent, wxWindowID id=-1,
                   const wxPoint &pos = wxDefaultPosition,
@@ -105,7 +105,7 @@ public:
                  const wxSize& size = wxDefaultSize,
                  long style = 0,
                  const wxString& name = wxPyStaticTextNameStr);
-    %name(PreStaticText)wxStaticText();
+    %RenameCtor(PreStaticText, wxStaticText());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                 const wxString& label = wxPyEmptyString,
@@ -134,7 +134,7 @@ public:
                    const wxSize& size = wxDefaultSize,
                    long style = 0,
                    const wxString& name = wxPyStaticBitmapNameStr);
-    %name(PreStaticBitmap)wxStaticBitmap();
+    %RenameCtor(PreStaticBitmap, wxStaticBitmap());
 
     bool Create(wxWindow* parent, wxWindowID id=-1,
                    const wxBitmap& bitmap = wxNullBitmap,
index 14fa24cb934ccc0788c6cf048d1c62aae624a1b7..6988a190a5191f10f9124bb7e8e9b10be4cfaec0 100644 (file)
@@ -43,7 +43,7 @@ public:
     wxStatusBar(wxWindow* parent, wxWindowID id = -1,
                 long style = wxDEFAULT_STATUSBAR_STYLE,
                 const wxString& name = wxPyStatusLineNameStr);
-    %name(PreStatusBar)wxStatusBar();
+    %RenameCtor(PreStatusBar, wxStatusBar());
 
     // Turn it back on again
     %typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }
index d8d9f26094f814d95f3d25e77fedb5c98eaeea89..5d89908a078659f2790135033e60a066b2ebb222 100644 (file)
@@ -68,7 +68,9 @@ enum wxSeekMode
 };
 
 
-%name(InputStream) class wxPyInputStream {
+%rename(InputStream) wxPyInputStream;
+class wxPyInputStream
+{
 public:
     %extend {
         wxPyInputStream(PyObject* p) {
index 88fd35bae9fc6627be682f038d23d5c61a94cabc..71b22bf22f776b29bae0a5273fc9865e7304897a 100644 (file)
@@ -97,7 +97,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTaskBarIcon, wxTaskBarIcon);
 
 MustHaveApp(wxPyTaskBarIcon);
 
-%name(TaskBarIcon)class wxPyTaskBarIcon : public wxEvtHandler
+%rename(TaskBarIcon) wxPyTaskBarIcon;
+class wxPyTaskBarIcon : public wxEvtHandler
 {
 public:
     %pythonAppend wxPyTaskBarIcon   "self._setCallbackInfo(self, TaskBarIcon, 0)"
index 9a5cca80ea07929519bd5eeb653453bb63e4cdf7..034bdcedc3d43b9cc5a1a53bedf8c06c745f5151 100644 (file)
@@ -174,7 +174,7 @@ public:
                long style = 0,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyTextCtrlNameStr);
-    %name(PreTextCtrl)wxTextCtrl();
+    %RenameCtor(PreTextCtrl, wxTextCtrl());
 
     // Turn it back on again
     %typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
index 3241807ee64b4a508b4089c412561df4606fdb7e..4b6e6eef247520f01c8529db664e77f94949c56d 100644 (file)
@@ -66,7 +66,7 @@ public:
                    long style = 0,
                    const wxValidator& validator = wxDefaultValidator,
                    const wxString& name = wxPyToggleButtonNameStr);
-    %name(PreToggleButton)wxToggleButton();
+    %RenameCtor(PreToggleButton, wxToggleButton());
 
     bool Create(wxWindow *parent,
                    wxWindowID id=-1,
index 910a3864cad50475c662ded96c665c76c7cc67ed..c4bd285dbe5991678e53a7890af55dd252d823fb 100644 (file)
@@ -62,7 +62,8 @@ void wxPyTimer::base_Notify() {
 
 MustHaveApp(wxPyTimer);
 
-%name(Timer) class wxPyTimer : public wxEvtHandler
+%rename(Timer) wxPyTimer;
+class wxPyTimer : public wxEvtHandler
 {
 public:
     // Don't let the OOR or callback info hold references to the object so
index f3d0bb52f23709a37a7d2c38eb38b57a786b7a58..bb0a76de5df3543ee170f8eaebf40e5d9e449c0a 100644 (file)
@@ -303,8 +303,8 @@ public:
                               shortHelp, longHelp, clientData)
     }
 
-    %name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
-    %name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
+    %Rename(AddToolItem,  wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool));
+    %Rename(InsertToolItem,  wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool));
 
     wxToolBarToolBase *AddControl(wxControl *control);
     wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
@@ -353,7 +353,7 @@ public:
     void SetToolLongHelp(int id, const wxString& helpString);
     wxString GetToolLongHelp(int id);
 
-    %name(SetMarginsXY) void SetMargins(int x, int y);
+    %Rename(SetMarginsXY,  void, SetMargins(int x, int y));
     void SetMargins(const wxSize& size);
     void SetToolPacking(int packing);
     void SetToolSeparation(int separation);
@@ -399,7 +399,7 @@ public:
               const wxSize& size = wxDefaultSize,
               long style = wxNO_BORDER | wxTB_HORIZONTAL,
               const wxString& name = wxPyToolBarNameStr);
-    %name(PreToolBar)wxToolBar();
+    %RenameCtor(PreToolBar, wxToolBar());
 
     // Turn it back on again
     %typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
index dea3353a376c7c9285e27e3b6af9c77016cdac29..f6d8e172a19ef709f3254b49c5b5d67d0d4fc733 100644 (file)
@@ -168,7 +168,7 @@ public:
             const wxSize& size = wxDefaultSize,
             long style = wxDEFAULT_FRAME_STYLE,
             const wxString& name = wxPyFrameNameStr);
-    %name(PreFrame)wxFrame();
+    %RenameCtor(PreFrame, wxFrame());
 
     // Turn it back on again
     %typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
@@ -287,7 +287,7 @@ public:
              const wxSize& size = wxDefaultSize,
              long style = wxDEFAULT_DIALOG_STYLE,
              const wxString& name = wxPyDialogNameStr);
-    %name(PreDialog)wxDialog();
+    %RenameCtor(PreDialog, wxDialog());
 
     // Turn it back on again
     %typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
@@ -352,7 +352,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = wxDEFAULT_FRAME_STYLE,
                 const wxString& name = wxPyFrameNameStr);
-    %name(PreMiniFrame)wxMiniFrame();
+    %RenameCtor(PreMiniFrame, wxMiniFrame());
 
     bool Create(wxWindow* parent, const wxWindowID id=-1,
                 const wxString& title = wxPyEmptyString,
index 50830f0e57ae67ce2e15cd79de51f2e3c0132bc9..94cdc1b4042d22fb290bfd3927d5bebde286b3bb 100644 (file)
@@ -117,7 +117,8 @@ public:
 // Python code should rarely be neccessary.  Just use the GetItemPyData and
 // SetItemPyData tree methods instead of the GetItemData and SetItemData
 // methods.
-%name(TreeItemData) class wxPyTreeItemData {
+%rename(TreeItemData) wxPyTreeItemData;
+class wxPyTreeItemData {
 public:
     wxPyTreeItemData(PyObject* obj = NULL);
 
@@ -311,7 +312,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
  
 MustHaveApp(wxPyTreeCtrl);
 
-%name(TreeCtrl)class wxPyTreeCtrl : public wxControl {
+%rename(TreeCtrl) wxPyTreeCtrl;
+class wxPyTreeCtrl : public wxControl {
 public:
     %pythonAppend wxPyTreeCtrl         "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
     %pythonAppend wxPyTreeCtrl()       ""
@@ -323,7 +325,7 @@ public:
                  long style = wxTR_DEFAULT_STYLE,
                  const wxValidator& validator = wxDefaultValidator,
                  const wxString& name = wxPyTreeCtrlNameStr);
-    %name(PreTreeCtrl)wxPyTreeCtrl();
+    %RenameCtor(PreTreeCtrl, wxPyTreeCtrl());
 
     // Turn it back on again
     %typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
@@ -601,12 +603,12 @@ public:
                             wxPyTreeItemData *data = NULL);
 
     // insert a new item before the one with the given index
-    %name(InsertItemBefore)
-    wxTreeItemId InsertItem(const wxTreeItemId& parent,
+    %Rename(InsertItemBefore, 
+    wxTreeItemId, InsertItem(const wxTreeItemId& parent,
                             size_t index,
                             const wxString& text,
                             int image = -1, int selectedImage = -1,
-                            wxPyTreeItemData *data = NULL);
+                            wxPyTreeItemData *data = NULL));
 
         // insert a new item in as the last child of the parent
     wxTreeItemId AppendItem(const wxTreeItemId& parent,
index 7a9b32dba616892f5b17f1b69c7eb8f50333876e..db0f28cee9baf3b3084294d2a6d3d88eaf5b0444 100644 (file)
@@ -127,7 +127,8 @@ IMP_PYCALLBACK_COORD_const          (wxPyVScrolledWindow, wxVScrolledWindow, Est
 
 MustHaveApp(wxPyVScrolledWindow);
 
-%name(VScrolledWindow) class wxPyVScrolledWindow : public wxPanel
+%rename(VScrolledWindow) wxPyVScrolledWindow;
+class wxPyVScrolledWindow : public wxPanel
 {
 public:
     %pythonAppend wxPyVScrolledWindow         "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)"
@@ -141,7 +142,7 @@ public:
                         long style = 0,
                         const wxString& name = wxPyPanelNameStr);
 
-    %name(PreVScrolledWindow)wxPyVScrolledWindow();
+    %RenameCtor(PreVScrolledWindow, wxPyVScrolledWindow());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
@@ -176,7 +177,7 @@ public:
 
     // return the item at the specified (in physical coordinates) position or
     // wxNOT_FOUND if none, i.e. if it is below the last item
-    %name(HitTestXY) int HitTest(wxCoord x, wxCoord y) const;
+    %Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
     int HitTest(const wxPoint& pt) const;
 
     // recalculate all our parameters and redisplay all lines
@@ -286,7 +287,8 @@ IMP_PYCALLBACK__DCRECTSIZET_const    (wxPyVListBox, wxVListBox, OnDrawBackground
  */
 MustHaveApp(wxPyVListBox);
 
-%name(VListBox) class wxPyVListBox : public wxPyVScrolledWindow
+%rename(VListBox) wxPyVListBox;
+class wxPyVListBox : public wxPyVScrolledWindow
 {
 public:
     %pythonAppend wxPyVListBox         "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)"
@@ -300,7 +302,7 @@ public:
                  long style = 0,
                  const wxString& name = wxPyVListBoxNameStr);
 
-    %name(PreVListBox) wxPyVListBox();
+    %RenameCtor(PreVListBox,  wxPyVListBox());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
@@ -431,7 +433,7 @@ public:
     //
     // by default both margins are 0
     void SetMargins(const wxPoint& pt);
-    %name(SetMarginsXY) void SetMargins(wxCoord x, wxCoord y);
+    %Rename(SetMarginsXY, void, SetMargins(wxCoord x, wxCoord y));
 
     // change the background colour of the selected cells
     void SetSelectionBackground(const wxColour& col);
@@ -505,7 +507,8 @@ IMP_PYCALLBACK_STRING_SIZET     (wxPyHtmlListBox, wxHtmlListBox, OnGetItemMarkup
 
 // wxHtmlListBox is a listbox whose items are wxHtmlCells
 MustHaveApp(wxPyHtmlListBox);
-%name(HtmlListBox) class wxPyHtmlListBox : public wxPyVListBox
+%rename(HtmlListBox) wxPyHtmlListBox;
+class wxPyHtmlListBox : public wxPyVListBox
 {
 public:
     %pythonAppend wxPyHtmlListBox         "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)"
@@ -520,7 +523,7 @@ public:
                     long style = 0,
                     const wxString& name = wxPyVListBoxNameStr);
 
-    %name(PreHtmlListBox) wxPyHtmlListBox();
+    %RenameCtor(PreHtmlListBox,  wxPyHtmlListBox());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
index 1800efb1d8ea6e578c7d537460565fc45fe16dd0..7386f5e087de5841b81d072e8f3b9eeeb68bc91a 100644 (file)
@@ -448,8 +448,8 @@ wx.Window.SetSize, since the application need not worry about what
 dimensions the border or title bar have when trying to fit the window
 around panel items, for example.", "");
     void SetClientSize( const wxSize& size );
-    %name(SetClientSizeWH) void SetClientSize( int width, int height );
-    %name(SetClientRect) void SetClientSize(const wxRect& rect);
+    %Rename(SetClientSizeWH, void,  SetClientSize( int width, int height ));
+    %Rename(SetClientRect,  void,  SetClientSize(const wxRect& rect));
 
 
     DocStr(GetPosition,   // sets the docstring for both
@@ -603,9 +603,9 @@ The resizing increments are only significant under Motif or Xt.", "
     virtual void SetSizeHints( int minW, int minH,
                                int maxW = -1, int maxH = -1,
                                int incW = -1, int incH = -1 );
-    %name(SetSizeHintsSz) void SetSizeHints( const wxSize& minSize,
-                                             const wxSize& maxSize=wxDefaultSize,
-                                             const wxSize& incSize=wxDefaultSize);
+    %Rename(SetSizeHintsSz, void,  SetSizeHints( const wxSize& minSize,
+                                                 const wxSize& maxSize=wxDefaultSize,
+                                                 const wxSize& incSize=wxDefaultSize));
 
     
     DocStr(SetVirtualSizeHints,
@@ -615,8 +615,8 @@ used.  If this function is called, the user will not be able to size
 the virtual area of the window outside the given bounds.", "");
     virtual void SetVirtualSizeHints( int minW, int minH,
                                       int maxW = -1, int maxH = -1 );
-    %name(SetVirtualSizeHintsSz)void SetVirtualSizeHints(
-        const wxSize& minSize, const wxSize& maxSize=wxDefaultSize);
+    %Rename(SetVirtualSizeHintsSz, void,  SetVirtualSizeHints(
+                const wxSize& minSize, const wxSize& maxSize=wxDefaultSize));
 
 
     
@@ -663,7 +663,7 @@ max size.", "");
 is just the client area of the window, but for some like scrolled
 windows it is more or less independent of the screen window size.", "");
     void SetVirtualSize(const wxSize& size );
-    %name(SetVirtualSizeWH) void SetVirtualSize( int w, int h );
+    %Rename(SetVirtualSizeWH, void,  SetVirtualSize( int w, int h ));
 
     
     DocStr(GetVirtualSize,
@@ -1138,10 +1138,10 @@ changes. For the x dimension, the dialog units are multiplied by the
 average character width and then divided by 4. For the y dimension,
 the dialog units are multiplied by the average character height and
 then divided by 8.", "");
-    %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
-    %name(ConvertDialogSizeToPixels)  wxSize  ConvertDialogToPixels(const wxSize& sz);
-    %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
-    %name(DLG_SZE) wxSize  ConvertDialogToPixels(const wxSize& sz);
+    %Rename(ConvertDialogPointToPixels, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+    %Rename(ConvertDialogSizeToPixels,  wxSize,  ConvertDialogToPixels(const wxSize& sz));
+    %Rename(DLG_PNT, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+    %Rename(DLG_SZE, wxSize,  ConvertDialogToPixels(const wxSize& sz));
 
 
     DocStr(ConvertPixelPointToDialog,
@@ -1151,8 +1151,8 @@ changes. For the x dimension, the dialog units are multiplied by the
 average character width and then divided by 4. For the y dimension,
 the dialog units are multiplied by the average character height and
 then divided by 8.", "");
-    %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
-    %name(ConvertPixelSizeToDialog)  wxSize  ConvertPixelsToDialog(const wxSize& sz);
+    %Rename(ConvertPixelPointToDialog, wxPoint, ConvertPixelsToDialog(const wxPoint& pt));
+    %Rename(ConvertPixelSizeToDialog,  wxSize,  ConvertPixelsToDialog(const wxSize& sz));
 
 
 
@@ -1277,8 +1277,8 @@ since the last repaint. Call this in an paint event handler to
 optimize redrawing by only redrawing those areas, which have been
 exposed.", "");
     bool IsExposed( int x, int y, int w=1, int h=1 ) const;
-    %name(IsExposedPoint) bool IsExposed( const wxPoint& pt ) const;
-    %name(IsExposedRect)  bool IsExposed( const wxRect& rect ) const;
+    %Rename(IsExposedPoint, bool, IsExposed( const wxPoint& pt ) const);
+    %Rename(IsExposedRect,  bool, IsExposed( const wxRect& rect ) const);
 
 
 
@@ -1564,7 +1564,7 @@ and returns control when the user has dismissed the menu. If a menu item is
 selected, the corresponding menu event is generated and will be processed as
 usual.  If the default position is given then the current position of the
 mouse cursor will be used.", "");
-    %name(PopupMenuXY) bool PopupMenu(wxMenu *menu, int x=-1, int y=-1);
+    %Rename(PopupMenuXY,  bool, PopupMenu(wxMenu *menu, int x=-1, int y=-1));
     bool PopupMenu(wxMenu *menu, const wxPoint& pos=wxDefaultPosition);
 
 
@@ -1736,7 +1736,7 @@ wxHelpProvider implementation, and not in the window object itself.", "");
 
     DocStr(SetToolTip,
            "Attach a tooltip to the window.", "");
-    %name(SetToolTipString) void SetToolTip( const wxString &tip );
+    %Rename(SetToolTipString, void,  SetToolTip( const wxString &tip ));
     void SetToolTip( wxToolTip *tip );
 
     DocDeclStr(
index 067e69b8dcbef887037299cad891c2f2aa7c9125..a7d08fcda822486f90108b0f4977eb9643948609 100644 (file)
@@ -85,14 +85,14 @@ public:
 
 
     // user-friendly creation:
-    %name(XmlNodeEasy) wxXmlNode(wxXmlNodeType type, const wxString& name,
-                                  const wxString& content = wxPyEmptyString);
+    %RenameCtor(XmlNodeEasy,  wxXmlNode(wxXmlNodeType type, const wxString& name,
+                                  const wxString& content = wxPyEmptyString));
 
     void AddChild(wxXmlNode *child);
     void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
     bool RemoveChild(wxXmlNode *child);
     void AddProperty(wxXmlProperty *prop);
-    %name(AddPropertyName) void AddProperty(const wxString& name, const wxString& value);
+    %Rename(AddPropertyName,  void,  AddProperty(const wxString& name, const wxString& value));
     bool DeleteProperty(const wxString& name);
 
     // access methods:
@@ -128,9 +128,9 @@ class wxXmlDocument : public wxObject
 public:
     wxXmlDocument(const wxString& filename,
                   const wxString& encoding = wxPyUTF8String);
-    %name(XmlDocumentFromStream) wxXmlDocument(wxInputStream& stream,
-                                                const wxString& encoding = wxPyUTF8String);
-    %name(EmptyXmlDocument) wxXmlDocument();
+    %RenameCtor(XmlDocumentFromStream,  wxXmlDocument(wxInputStream& stream,
+                                                const wxString& encoding = wxPyUTF8String));
+    %RenameCtor(EmptyXmlDocument,  wxXmlDocument());
 
     ~wxXmlDocument();
 
@@ -139,12 +139,12 @@ public:
     // otherwise.
     bool Load(const wxString& filename,
               const wxString& encoding = wxPyUTF8String);
-    %name(LoadFromStream)bool Load(wxInputStream& stream,
-                                   const wxString& encoding = wxPyUTF8String);
+    %Rename(LoadFromStream, bool,  Load(wxInputStream& stream,
+                                   const wxString& encoding = wxPyUTF8String));
 
     // Saves document as .xml file.
     bool Save(const wxString& filename) const;
-    %name(SaveToStream)bool Save(wxOutputStream& stream) const;
+    %Rename(SaveToStream, bool,  Save(wxOutputStream& stream) const);
 
     bool IsOk() const;
 
index ba007253a127d3bf3df8c2d9b6f1262b8ff72959..fc1d0f11c39e14de56e973a222fa8fccefeb57c8 100644 (file)
@@ -138,7 +138,8 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH
 // Now the version that will be SWIGged.
 
 
-%name(XmlResourceHandler) class wxPyXmlResourceHandler : public wxObject {
+%rename(XmlResourceHandler) wxPyXmlResourceHandler;
+class wxPyXmlResourceHandler : public wxObject {
 public:
     %pythonAppend wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)"
     wxPyXmlResourceHandler() : wxXmlResourceHandler() {}
index cc8ac270c7d1ed41d949d227b9c689ce0809abe8..79ffbc711ae3b6db190abc07f7bf1140b4eae762 100644 (file)
@@ -55,7 +55,7 @@ public:
     //              subclass property of object nodes will be ignored
     //              (useful for previews in XRC editors)
     wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE);
-    %name(EmptyXmlResource) wxXmlResource(int flags = wxXRC_USE_LOCALE);
+    %RenameCtor(EmptyXmlResource,  wxXmlResource(int flags = wxXRC_USE_LOCALE));
     ~wxXmlResource();
 
 
@@ -118,7 +118,7 @@ public:
 
     // Loads menubar from resource. Returns NULL on failure.
     wxMenuBar *LoadMenuBar(const wxString& name);
-    %name(LoadMenuBarOnFrame) wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name);
+    %Rename(LoadMenuBarOnFrame,  wxMenuBar* , LoadMenuBar(wxWindow *parent, const wxString& name));
 
 
     // Loads toolbar
@@ -132,16 +132,16 @@ public:
     //      wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
     //      dlg->ShowModal();
     wxDialog *LoadDialog(wxWindow *parent, const wxString& name);
-    %name(LoadOnDialog)bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name);
+    %Rename(LoadOnDialog, bool,  LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name));
 
     // Loads panel. panel points to parent window (if any). Second form
     // is used to finish creation of already existing instance.
     wxPanel *LoadPanel(wxWindow *parent, const wxString& name);
-    %name(LoadOnPanel)bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name);
+    %Rename(LoadOnPanel, bool,  LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name));
 
     // Load a frame's contents from a resource
     wxFrame *LoadFrame(wxWindow* parent, const wxString& name);
-    %name(LoadOnFrame)bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name);
+    %Rename(LoadOnFrame, bool,  LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name));
 
     // Load an object from the resource specifying both the resource name and
     // the classname.  This lets you load nonstandard container windows.
@@ -151,8 +151,8 @@ public:
     // Load an object from the resource specifying both the resource name and
     // the classname.  This form lets you finish the creation of an existing
     // instance.
-    %name(LoadOnObject)bool LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
-                                       const wxString& classname);
+    %Rename(LoadOnObject, bool,  LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
+                                       const wxString& classname));
 
     // Loads a bitmap resource from a file.
     wxBitmap LoadBitmap(const wxString& name);
index 2722305c27f77e34ca6fd9846385288ff091daa4..2d3721de70c52a0e65c7cc3c0c5765ef3f844426 100644 (file)
@@ -32,7 +32,8 @@ IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory,
 
 
 
-%name(XmlSubclassFactory)class wxPyXmlSubclassFactory {
+%rename(XmlSubclassFactory) wxPyXmlSubclassFactory;
+class wxPyXmlSubclassFactory {
 public:
     %pythonAppend wxPyXmlSubclassFactory "self._setCallbackInfo(self, XmlSubclassFactory)"
     wxPyXmlSubclassFactory();
diff --git a/wxPython/src/common.swg b/wxPython/src/common.swg
deleted file mode 100644 (file)
index afdaf0b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/***********************************************************************
- * common.swg for wxPython
- *
- * Include only the function prototypes and such from SWIG's common.swg,
- * but not the runtime functions themselves.  This helps keep the
- * wrapper files clean of unnecessary stuff that is in the libpy.c file
- * anyway.
- *
- ************************************************************************/
-
-#include <string.h>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#  if defined(_MSC_VER) || defined(__GNUC__)
-#    if defined(STATIC_LINKED)
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) extern a
-#    else
-#      define SWIGEXPORT(a) __declspec(dllexport) a
-#      define SWIGIMPORT(a) extern a
-#    endif
-#  else
-#    if defined(__BORLANDC__)
-#      define SWIGEXPORT(a) a _export
-#      define SWIGIMPORT(a) a _export
-#    else
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) a
-#    endif
-#  endif
-#else
-#  define SWIGEXPORT(a) a
-#  define SWIGIMPORT(a) a
-#endif
-
-#ifdef SWIG_GLOBAL
-#  define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-#  define SWIGRUNTIME(a) static a
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-typedef struct swig_type_info {
-  const char             *name;
-  swig_converter_func     converter;
-  const char             *str;
-  void                   *clientdata;
-  swig_dycast_func        dcast;
-  struct swig_type_info  *next;
-  struct swig_type_info  *prev;
-} swig_type_info;
-
-
-SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
-SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
-SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
-SWIGIMPORT(const char *)     SWIG_TypePrettyName(const swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
-SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);
-SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int);
-SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
-
-
-#ifdef __cplusplus
-}
-#endif
-
index 6c07dec0200b9f7b89cb6c78b13f17b672dea16b..741c4c0915b3a1ed80bbe2e4bd33555afe923b39 100644 (file)
@@ -1603,7 +1603,7 @@ public:
             long style = wxWANTS_CHARS,
             const wxString& name = wxPyPanelNameStr);
 
-    %name(PreGrid) wxGrid();
+    %RenameCtor(PreGrid,  wxGrid());
 
     
     // Turn it back on again
index 8450f856f3754c05f5dc14ddce7112a9b2ac0858..278b302de191b2db3bf752f91aba0e8bd7ce198e 100644 (file)
@@ -258,7 +258,8 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag);
 %}
 
 
-%name(HtmlTagHandler) class wxPyHtmlTagHandler : public wxObject {
+%rename(HtmlTagHandler) wxPyHtmlTagHandler;
+class wxPyHtmlTagHandler : public wxObject {
 public:
     %pythonAppend wxPyHtmlTagHandler   "self._setCallbackInfo(self, HtmlTagHandler)"    
     wxPyHtmlTagHandler();
@@ -296,7 +297,8 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleT
 %}
 
 
-%name(HtmlWinTagHandler) class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler {
+%rename(HtmlWinTagHandler) wxPyHtmlWinTagHandler;
+class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler {
 public:
     %pythonAppend wxPyHtmlWinTagHandler    "self._setCallbackInfo(self, HtmlWinTagHandler)"
     wxPyHtmlWinTagHandler();
@@ -391,7 +393,7 @@ public:
 
     void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell,
              const wxPoint& toPos, const wxHtmlCell *toCell);
-    %name(SetCells)void Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell);
+    %Rename(SetCells, void, Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell));
 
     const wxHtmlCell *GetFromCell() const;
     const wxHtmlCell *GetToCell() const;
@@ -591,7 +593,7 @@ public:
     int GetIndentUnits(int ind);
     void SetAlign(const wxHtmlTag& tag);
     void SetWidthFloat(int w, int units);
-    %name(SetWidthFloatFromTag)void SetWidthFloat(const wxHtmlTag& tag);
+    %Rename(SetWidthFloatFromTag, void,  SetWidthFloat(const wxHtmlTag& tag));
     void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
     void SetBackgroundColour(const wxColour& clr);
     wxColour GetBackgroundColour();
@@ -681,7 +683,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter);
 
 // And now the version seen by SWIG
 
-%name(HtmlFilter) class wxPyHtmlFilter : public wxObject {
+%rename(HtmlFilter) wxPyHtmlFilter;
+class wxPyHtmlFilter : public wxObject {
 public:
     %pythonAppend wxPyHtmlFilter   "self._setCallbackInfo(self, HtmlFilter)"
     wxPyHtmlFilter();
@@ -794,7 +797,8 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
 
 MustHaveApp(wxPyHtmlWindow);
 
-%name(HtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow {
+%rename(HtmlWindow) wxPyHtmlWindow;
+class wxPyHtmlWindow : public wxScrolledWindow {
 public:
     %pythonAppend wxPyHtmlWindow      "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)"
     %pythonAppend wxPyHtmlWindow()    ""
@@ -805,7 +809,7 @@ public:
                  const wxSize& size = wxDefaultSize,
                  int style=wxHW_DEFAULT_STYLE,
                  const wxString& name = wxPyHtmlWindowNameStr);
-    %name(PreHtmlWindow)wxPyHtmlWindow();
+    %RenameCtor(PreHtmlWindow, wxPyHtmlWindow());
 
     // Turn it back on again
     %typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
@@ -1167,7 +1171,7 @@ public:
     wxHtmlHelpData* GetData();
     void SetTitleFormat(const wxString& format);
     void Display(const wxString& x);
-    %name(DisplayID) void Display(int id);
+    %Rename(DisplayID,  void,  Display(int id));
     void DisplayContents();
     void DisplayIndex();
     bool KeywordSearch(const wxString& keyword);
@@ -1207,7 +1211,7 @@ public:
     void SetTempDir(const wxString& path);
     bool AddBook(const wxString& book, int show_wait_msg = false);
     void Display(const wxString& x);
-    %name(DisplayID) void Display(int id);
+    %Rename(DisplayID,  void,  Display(int id));
     void DisplayContents();
     void DisplayIndex();
     bool KeywordSearch(const wxString& keyword);
diff --git a/wxPython/src/libpy.c b/wxPython/src/libpy.c
deleted file mode 100644 (file)
index 48680c9..0000000
+++ /dev/null
@@ -1,911 +0,0 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.22
- * 
- * This file is not intended to be easily readable and contains a number of 
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGPYTHON
-
-#define SWIG_GLOBAL 1
-
-
-#include "Python.h"
-
-/*************************************************************** -*- c -*-
- * python/precommon.swg
- *
- * Rename all exported symbols from common.swg, to avoid symbol
- * clashes if multiple interpreters are included
- *
- ************************************************************************/
-
-#define SWIG_TypeRegister    SWIG_Python_TypeRegister
-#define SWIG_TypeCheck       SWIG_Python_TypeCheck
-#define SWIG_TypeCast        SWIG_Python_TypeCast
-#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
-#define SWIG_TypeName        SWIG_Python_TypeName
-#define SWIG_TypePrettyName  SWIG_Python_TypePrettyName
-#define SWIG_TypeQuery       SWIG_Python_TypeQuery
-#define SWIG_TypeClientData  SWIG_Python_TypeClientData
-#define SWIG_PackData        SWIG_Python_PackData 
-#define SWIG_UnpackData      SWIG_Python_UnpackData 
-
-
-/***********************************************************************
- * common.swg
- *
- *     This file contains generic SWIG runtime support for pointer
- *     type checking as well as a few commonly used macros to control
- *     external linkage.
- *
- * Author : David Beazley (beazley@cs.uchicago.edu)
- *
- * Copyright (c) 1999-2000, The University of Chicago
- * 
- * This file may be freely redistributed without license or fee provided
- * this copyright message remains intact.
- ************************************************************************/
-
-#include <string.h>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#  if defined(_MSC_VER) || defined(__GNUC__)
-#    if defined(STATIC_LINKED)
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) extern a
-#    else
-#      define SWIGEXPORT(a) __declspec(dllexport) a
-#      define SWIGIMPORT(a) extern a
-#    endif
-#  else
-#    if defined(__BORLANDC__)
-#      define SWIGEXPORT(a) a _export
-#      define SWIGIMPORT(a) a _export
-#    else
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) a
-#    endif
-#  endif
-#else
-#  define SWIGEXPORT(a) a
-#  define SWIGIMPORT(a) a
-#endif
-
-#ifdef SWIG_GLOBAL
-#  define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-#  define SWIGRUNTIME(a) static a
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-typedef struct swig_type_info {
-  const char             *name;
-  swig_converter_func     converter;
-  const char             *str;
-  void                   *clientdata;
-  swig_dycast_func        dcast;
-  struct swig_type_info  *next;
-  struct swig_type_info  *prev;
-} swig_type_info;
-
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
-SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
-SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
-SWIGIMPORT(const char *)     SWIG_TypePrettyName(const swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
-SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);
-SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int);
-SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
-
-#else
-
-static swig_type_info *swig_type_list = 0;
-static swig_type_info **swig_type_list_handle = &swig_type_list;
-
-/* Register a type mapping with the type-checking */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeRegister(swig_type_info *ti) {
-  swig_type_info *tc, *head, *ret, *next;
-  /* Check to see if this type has already been registered */
-  tc = *swig_type_list_handle;
-  while (tc) {
-    if (strcmp(tc->name, ti->name) == 0) {
-      /* Already exists in the table.  Just add additional types to the list */
-      if (tc->clientdata) ti->clientdata = tc->clientdata;
-      head = tc;
-      next = tc->next;
-      goto l1;
-    }
-    tc = tc->prev;
-  }
-  head = ti;
-  next = 0;
-
-  /* Place in list */
-  ti->prev = *swig_type_list_handle;
-  *swig_type_list_handle = ti;
-
-  /* Build linked lists */
-  l1:
-  ret = head;
-  tc = ti + 1;
-  /* Patch up the rest of the links */
-  while (tc->name) {
-    head->next = tc;
-    tc->prev = head;
-    head = tc;
-    tc++;
-  }
-  if (next) next->prev = head;
-  head->next = next;
-  return ret;
-}
-
-/* Check the typename */
-SWIGRUNTIME(swig_type_info *) 
-SWIG_TypeCheck(char *c, swig_type_info *ty) {
-  swig_type_info *s;
-  if (!ty) return 0;        /* Void pointer */
-  s = ty->next;             /* First element always just a name */
-  do {
-    if (strcmp(s->name,c) == 0) {
-      if (s == ty->next) return s;
-      /* Move s to the top of the linked list */
-      s->prev->next = s->next;
-      if (s->next) {
-        s->next->prev = s->prev;
-      }
-      /* Insert s as second element in the list */
-      s->next = ty->next;
-      if (ty->next) ty->next->prev = s;
-      ty->next = s;
-      s->prev = ty;
-      return s;
-    }
-    s = s->next;
-  } while (s && (s != ty->next));
-  return 0;
-}
-
-/* Cast a pointer up an inheritance hierarchy */
-SWIGRUNTIME(void *) 
-SWIG_TypeCast(swig_type_info *ty, void *ptr) {
-  if ((!ty) || (!ty->converter)) return ptr;
-  return (*ty->converter)(ptr);
-}
-
-/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGRUNTIME(swig_type_info *) 
-SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
-  swig_type_info *lastty = ty;
-  if (!ty || !ty->dcast) return ty;
-  while (ty && (ty->dcast)) {
-    ty = (*ty->dcast)(ptr);
-    if (ty) lastty = ty;
-  }
-  return lastty;
-}
-
-/* Return the name associated with this type */
-SWIGRUNTIME(const char *)
-SWIG_TypeName(const swig_type_info *ty) {
-  return ty->name;
-}
-
-/* Return the pretty name associated with this type,
-   that is an unmangled type name in a form presentable to the user.
-*/
-SWIGRUNTIME(const char *)
-SWIG_TypePrettyName(const swig_type_info *type) {
-  /* The "str" field contains the equivalent pretty names of the
-     type, separated by vertical-bar characters.  We choose
-     to print the last name, as it is often (?) the most
-     specific. */
-  if (type->str != NULL) {
-    const char *last_name = type->str;
-    const char *s;
-    for (s = type->str; *s; s++)
-      if (*s == '|') last_name = s+1;
-    return last_name;
-  }
-  else
-    return type->name;
-}
-
-/* 
-   Compare two type names skipping the space characters, therefore
-   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
-
-   Return 0 when the two name types are equivalent, as in
-   strncmp, but skipping ' '.
-*/
-static int
-SWIG_TypeNameComp(const char *f1, const char *l1,
-                 const char *f2, const char *l2) {
-  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
-    while ((*f1 == ' ') && (f1 != l1)) ++f1;
-    while ((*f2 == ' ') && (f2 != l2)) ++f2;
-    if (*f1 != *f2) return *f1 - *f2;
-  }
-  return (l1 - f1) - (l2 - f2);
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-*/
-static int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv && *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-  
-
-/* Search for a swig_type_info structure */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeQuery(const char *name) {
-  swig_type_info *ty = *swig_type_list_handle;
-  while (ty) {
-    if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
-    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
-    ty = ty->prev;
-  }
-  return 0;
-}
-
-/* Set the clientdata field for a type */
-SWIGRUNTIME(void)
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
-  swig_type_info *tc, *equiv;
-  if (ti->clientdata == clientdata) return;
-  ti->clientdata = clientdata;
-  equiv = ti->next;
-  while (equiv) {
-    if (!equiv->converter) {
-      tc = *swig_type_list_handle;
-      while (tc) {
-        if ((strcmp(tc->name, equiv->name) == 0))
-          SWIG_TypeClientData(tc,clientdata);
-        tc = tc->prev;
-      }
-    }
-    equiv = equiv->next;
-  }
-}
-
-/* Pack binary data into a string */
-SWIGRUNTIME(char *)
-SWIG_PackData(char *c, void *ptr, int sz) {
-  static char hex[17] = "0123456789abcdef";
-  unsigned char *u = (unsigned char *) ptr;
-  const unsigned char *eu =  u + sz;
-  register unsigned char uu;
-  for (; u != eu; ++u) {
-    uu = *u;
-    *(c++) = hex[(uu & 0xf0) >> 4];
-    *(c++) = hex[uu & 0xf];
-  }
-  return c;
-}
-
-/* Unpack binary data from a string */
-SWIGRUNTIME(char *)
-SWIG_UnpackData(char *c, void *ptr, int sz) {
-  register unsigned char uu = 0;
-  register int d;
-  unsigned char *u = (unsigned char *) ptr;
-  const unsigned char *eu =  u + sz;
-  for (; u != eu; ++u) {
-    d = *(c++);
-    if ((d >= '0') && (d <= '9'))
-      uu = ((d - '0') << 4);
-    else if ((d >= 'a') && (d <= 'f'))
-      uu = ((d - ('a'-10)) << 4);
-    d = *(c++);
-    if ((d >= '0') && (d <= '9'))
-      uu |= (d - '0');
-    else if ((d >= 'a') && (d <= 'f'))
-      uu |= (d - ('a'-10));
-    *u = uu;
-  }
-  return c;
-}
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/***********************************************************************
- * pyrun.swg
- *
- *     This file contains the runtime support for Python modules
- *     and includes code for managing global variables and pointer
- *     type checking.
- *
- * Author : David Beazley (beazley@cs.uchicago.edu)
- ************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SWIG_PY_INT     1
-#define SWIG_PY_FLOAT   2
-#define SWIG_PY_STRING  3
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY  5
-
-/* Flags for pointer conversion */
-
-#define SWIG_POINTER_EXCEPTION     0x1
-#define SWIG_POINTER_DISOWN        0x2
-
-/* Exception handling in wrappers */
-#define SWIG_fail   goto fail
-
-/* Constant information structure */
-typedef struct swig_const_info {
-    int type;
-    char *name;
-    long lvalue;
-    double dvalue;
-    void   *pvalue;
-    swig_type_info **ptype;
-} swig_const_info;
-
-/* Common SWIG API */
-#define SWIG_ConvertPtr(obj, pp, type, flags) \
-  SWIG_Python_ConvertPtr(obj, pp, type, flags)
-#define SWIG_NewPointerObj(p, type, flags) \
-  SWIG_Python_NewPointerObj(p, type, flags)
-#define SWIG_MustGetPtr(p, type, argnum, flags) \
-  SWIG_Python_MustGetPtr(p, type, argnum, flags)
-/* Python-specific SWIG API */
-#define SWIG_newvarlink() \
-  SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr) \
-  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
-  SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type) \
-  SWIG_Python_NewPackedObj(ptr, sz, type)
-#define SWIG_InstallConstants(d, constants) \
-  SWIG_Python_InstallConstants(d, constants)
-
-typedef double (*py_objasdbl_conv)(PyObject *obj);
-
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(int)               SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
-SWIGIMPORT(void *)            SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_newvarlink(void);
-SWIGIMPORT(void)              SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-SWIGIMPORT(int)               SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
-SWIGIMPORT(void)              SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
-
-
-#else
-
-
-/* -----------------------------------------------------------------------------
- * global variable support code.
- * ----------------------------------------------------------------------------- */
-
-typedef struct swig_globalvar {   
-  char       *name;                  /* Name of global variable */
-  PyObject *(*get_attr)(void);       /* Return the current value */
-  int       (*set_attr)(PyObject *); /* Set the value */
-  struct swig_globalvar *next;
-} swig_globalvar;
-
-typedef struct swig_varlinkobject {
-  PyObject_HEAD
-  swig_globalvar *vars;
-} swig_varlinkobject;
-
-static PyObject *
-swig_varlink_repr(swig_varlinkobject *v) {
-  v = v;
-  return PyString_FromString("<Global variables>");
-}
-
-static int
-swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
-  swig_globalvar  *var;
-  flags = flags;
-  fprintf(fp,"Global variables { ");
-  for (var = v->vars; var; var=var->next) {
-    fprintf(fp,"%s", var->name);
-    if (var->next) fprintf(fp,", ");
-  }
-  fprintf(fp," }\n");
-  return 0;
-}
-
-static PyObject *
-swig_varlink_getattr(swig_varlinkobject *v, char *n) {
-  swig_globalvar *var = v->vars;
-  while (var) {
-    if (strcmp(var->name,n) == 0) {
-      return (*var->get_attr)();
-    }
-    var = var->next;
-  }
-  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-  return NULL;
-}
-
-static int
-swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
-  swig_globalvar *var = v->vars;
-  while (var) {
-    if (strcmp(var->name,n) == 0) {
-      return (*var->set_attr)(p);
-    }
-    var = var->next;
-  }
-  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-  return 1;
-}
-
-statichere PyTypeObject varlinktype = {
-  PyObject_HEAD_INIT(0)              
-  0,                                  /* Number of items in variable part (ob_size) */
-  (char *)"swigvarlink",              /* Type name (tp_name) */
-  sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-  0,                                  /* Itemsize (tp_itemsize) */
-  0,                                  /* Deallocator (tp_dealloc) */ 
-  (printfunc) swig_varlink_print,     /* Print (tp_print) */
-  (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-  (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
-  0,                                  /* tp_compare */
-  (reprfunc) swig_varlink_repr,       /* tp_repr */
-  0,                                  /* tp_as_number */
-  0,                                  /* tp_as_sequence */
-  0,                                  /* tp_as_mapping */
-  0,                                  /* tp_hash */
-  0,                                  /* tp_call */
-  0,                                  /* tp_str */
-  0,                                  /* tp_getattro */
-  0,                                  /* tp_setattro */
-  0,                                  /* tp_as_buffer */
-  0,                                  /* tp_flags */
-  0,                                  /* tp_doc */
-  0,                                  /* tp_traverse */
-  0,                                  /* tp_clear */
-  0,                                  /* tp_richcompare */
-  0,                                  /* tp_weaklistoffset */
-#if PY_VERSION_HEX >= 0x02020000
-  0,                                  /* tp_iter */
-  0,                                  /* tp_iternext */
-  0,                                  /* tp_methods */
-  0,                                  /* tp_members */
-  0,                                  /* tp_getset */
-  0,                                  /* tp_base */
-  0,                                  /* tp_dict */
-  0,                                  /* tp_descr_get */
-  0,                                  /* tp_descr_set */
-  0,                                  /* tp_dictoffset */
-  0,                                  /* tp_init */
-  0,                                  /* tp_alloc */
-  0,                                  /* tp_new */
-  0,                                  /* tp_free */
-  0,                                  /* tp_is_gc */
-  0,                                  /* tp_bases */
-  0,                                  /* tp_mro */
-  0,                                  /* tp_cache */
-  0,                                  /* tp_subclasses */
-  0,                                  /* tp_weaklist */
-#endif
-#if PY_VERSION_HEX >= 0x02030200
-  0,                                  /* tp_del */
-#endif
-#ifdef COUNT_ALLOCS
-  /* these must be last */
-  0,                                  /* tp_alloc */
-  0,                                  /* tp_free */
-  0,                                  /* tp_maxalloc */
-  0,                                  /*  tp_next */
-#endif
-};
-
-/* Create a variable linking object for use later */
-SWIGRUNTIME(PyObject *)
-SWIG_Python_newvarlink(void) {
-  swig_varlinkobject *result = 0;
-  result = PyMem_NEW(swig_varlinkobject,1);
-  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
-  result->ob_type = &varlinktype;
-  result->vars = 0;
-  result->ob_refcnt = 0;
-  Py_XINCREF((PyObject *) result);
-  return ((PyObject*) result);
-}
-
-SWIGRUNTIME(void)
-SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
-  swig_varlinkobject *v;
-  swig_globalvar *gv;
-  v= (swig_varlinkobject *) p;
-  gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
-  gv->name = (char *) malloc(strlen(name)+1);
-  strcpy(gv->name,name);
-  gv->get_attr = get_attr;
-  gv->set_attr = set_attr;
-  gv->next = v->vars;
-  v->vars = gv;
-}
-
-/* Convert a pointer value */
-SWIGRUNTIME(int)
-SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
-  swig_type_info *tc;
-  char  *c = 0;
-  static PyObject *SWIG_this = 0;
-  int    newref = 0;
-  PyObject  *pyobj = 0;
-
-  if (!obj) return 0;
-  if (obj == Py_None) {
-    *ptr = 0;
-    return 0;
-  }
-#ifdef SWIG_COBJECT_TYPES
-  if (!(PyCObject_Check(obj))) {
-    if (!SWIG_this)
-      SWIG_this = PyString_FromString("this");
-    pyobj = obj;
-    obj = PyObject_GetAttr(obj,SWIG_this);
-    newref = 1;
-    if (!obj) goto type_error;
-    if (!PyCObject_Check(obj)) {
-      Py_DECREF(obj);
-      goto type_error;
-    }
-  }  
-  *ptr = PyCObject_AsVoidPtr(obj);
-  c = (char *) PyCObject_GetDesc(obj);
-  if (newref) Py_DECREF(obj);
-  goto cobject;
-#else
-  if (!(PyString_Check(obj))) {
-    if (!SWIG_this)
-      SWIG_this = PyString_FromString("this");
-    pyobj = obj;
-    obj = PyObject_GetAttr(obj,SWIG_this);
-    newref = 1;
-    if (!obj) goto type_error;
-    if (!PyString_Check(obj)) {
-      Py_DECREF(obj);
-      goto type_error;
-    }
-  } 
-  c = PyString_AS_STRING(obj);
-  /* Pointer values must start with leading underscore */
-  if (*c != '_') {
-    *ptr = (void *) 0;
-    if (strcmp(c,"NULL") == 0) {
-      if (newref) { Py_DECREF(obj); }
-      return 0;
-    } else {
-      if (newref) { Py_DECREF(obj); }
-      goto type_error;
-    }
-  }
-  c++;
-  c = SWIG_UnpackData(c,ptr,sizeof(void *));
-  if (newref) { Py_DECREF(obj); }
-#endif
-
-#ifdef SWIG_COBJECT_TYPES
-cobject:
-#endif
-
-  if (ty) {
-    tc = SWIG_TypeCheck(c,ty);
-    if (!tc) goto type_error;
-    *ptr = SWIG_TypeCast(tc,(void*) *ptr);
-  }
-
-  if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
-    PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
-  }
-  return 0;
-
-type_error:
-  PyErr_Clear();
-  if (flags & SWIG_POINTER_EXCEPTION) {
-    if (ty && c) {
-      PyErr_Format(PyExc_TypeError, 
-                  "Type error. Got %s, expected %s",
-                  c, ty->name);
-    } else {
-      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
-    }
-  }
-  return -1;
-}
-
-/* Convert a pointer value, signal an exception on a type mismatch */
-SWIGRUNTIME(void *)
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
-  void *result;
-  SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
-  return result;
-}
-
-/* Convert a packed value value */
-SWIGRUNTIME(int)
-SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
-  swig_type_info *tc;
-  char  *c = 0;
-
-  if ((!obj) || (!PyString_Check(obj))) goto type_error;
-  c = PyString_AS_STRING(obj);
-  /* Pointer values must start with leading underscore */
-  if (*c != '_') goto type_error;
-  c++;
-  c = SWIG_UnpackData(c,ptr,sz);
-  if (ty) {
-    tc = SWIG_TypeCheck(c,ty);
-    if (!tc) goto type_error;
-  }
-  return 0;
-
-type_error:
-
-  if (flags) {
-    if (ty && c) {
-      PyErr_Format(PyExc_TypeError, 
-                  "Type error. Got %s, expected %s",
-                  c, ty->name);
-    } else {
-      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
-    }
-  }
-  return -1;
-}
-
-/* Create a new pointer object */
-SWIGRUNTIME(PyObject *)
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
-  PyObject *robj;
-  if (!ptr) {
-    Py_INCREF(Py_None);
-    return Py_None;
-  }
-#ifdef SWIG_COBJECT_TYPES
-  robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
-#else
-  {
-    char result[1024];
-    char *r = result;
-    *(r++) = '_';
-    r = SWIG_PackData(r,&ptr,sizeof(void *));
-    strcpy(r,type->name);
-    robj = PyString_FromString(result);
-  }
-#endif
-  if (!robj || (robj == Py_None)) return robj;
-  if (type->clientdata) {
-    PyObject *inst;
-    PyObject *args = Py_BuildValue((char*)"(O)", robj);
-    Py_DECREF(robj);
-    inst = PyObject_CallObject((PyObject *) type->clientdata, args);
-    Py_DECREF(args);
-    if (inst) {
-      if (own) {
-        PyObject_SetAttrString(inst,(char*)"thisown",Py_True);
-      }
-      robj = inst;
-    }
-  }
-  return robj;
-}
-
-SWIGRUNTIME(PyObject *)
-SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
-  char result[1024];
-  char *r = result;
-  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,ptr,sz);
-  strcpy(r,type->name);
-  return PyString_FromString(result);
-}
-
-/* Install Constants */
-SWIGRUNTIME(void)
-SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
-  int i;
-  PyObject *obj;
-  for (i = 0; constants[i].type; i++) {
-    switch(constants[i].type) {
-    case SWIG_PY_INT:
-      obj = PyInt_FromLong(constants[i].lvalue);
-      break;
-    case SWIG_PY_FLOAT:
-      obj = PyFloat_FromDouble(constants[i].dvalue);
-      break;
-    case SWIG_PY_STRING:
-      if (constants[i].pvalue) {
-       obj = PyString_FromString((char *) constants[i].pvalue);
-      } else {
-       Py_INCREF(Py_None);
-       obj = Py_None;
-      }
-      break;
-    case SWIG_PY_POINTER:
-      obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
-      break;
-    case SWIG_PY_BINARY:
-      obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
-      break;
-    default:
-      obj = 0;
-      break;
-    }
-    if (obj) {
-      PyDict_SetItemString(d,constants[i].name,obj);
-      Py_DECREF(obj);
-    }
-  }
-}
-
-#endif
-
-/* Contract support */
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* -------- TYPES TABLE (BEGIN) -------- */
-
-#define  SWIGTYPE_p_char swig_types[0] 
-static swig_type_info *swig_types[2];
-
-/* -------- TYPES TABLE (END) -------- */
-
-#define SWIG_init    initswigrun
-
-#define SWIG_name    "swigrun"
-
-/* Auxiliar swig  macros that appear in the header */
-
-#define SWIG_OLDOBJ  1
-#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
-#define SWIG_PYSTR   SWIG_NEWOBJ + 1
-
-#ifdef __cplusplus
-#define SWIGSTATICINLINE(a) static inline a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) (new Type[(size)])
-#define swig_delete(cptr) delete cptr
-#define swig_delete_array(cptr) delete[] cptr
-#define swig_const_cast(a,Type) const_cast<Type >(a)
-#define swig_static_cast(a,Type) static_cast<Type >(a)
-#define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
-#define swig_new_copy(ptr,Type) (new Type(*ptr))
-#define swig_numeric_cast(a,Type) static_cast<Type >(a)
-
-#else /* C case */
-
-#define SWIGSTATICINLINE(a) static a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
-#define swig_delete(cptr) free((char*)cptr)
-#define swig_delete_array(cptr) free((char*)cptr)
-#define swig_const_cast(a,Type) (Type)(a)
-#define swig_static_cast(a,Type) (Type)(a)
-#define swig_reinterpret_cast(a,Type) (Type)(a)
-#define swig_numeric_cast(a,Type) (Type)(a)
-#define swig_new_copy(ptr,Type)  ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
-
-#endif /* __cplusplus */
-
-
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_signed_SS_char PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_char PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_short PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_short PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_int PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_long PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_float PyFloat_FromDouble
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_double PyFloat_FromDouble
-/*@@*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-static PyMethodDef SwigMethods[] = {
-        { NULL, NULL, 0, NULL }
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-
-static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
-
-static swig_type_info *swig_types_initial[] = {
-_swigt__p_char, 
-0
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
-
-static swig_const_info swig_const_table[] = {
-{0, 0, 0, 0.0, 0, 0}};
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-extern "C"
-#endif
-SWIGEXPORT(void) SWIG_init(void) {
-    static PyObject *SWIG_globals = 0; 
-    static int       typeinit = 0;
-    PyObject *m, *d;
-    int       i;
-    if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
-    m = Py_InitModule((char *) SWIG_name, SwigMethods);
-    d = PyModule_GetDict(m);
-    
-    if (!typeinit) {
-        for (i = 0; swig_types_initial[i]; i++) {
-            swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
-        }
-        typeinit = 1;
-    }
-    SWIG_InstallConstants(d,swig_const_table);
-    
-}
-
index 642663b2ae0bcee12c673be6fad378d847ac8465..d5a210f47adb0bc89894190726657fad60d30e0f 100644 (file)
@@ -183,10 +183,10 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxPyMediaCtrlNameStr);
     
-    %name(PreMediaCtrl) wxMediaCtrl();
+    %RenameCtor(PreMediaCtrl,  wxMediaCtrl());
 
 //     %extend {
-//         %name(MediaCtrlFromURI)
+//         %RenameCtor(MediaCtrlFromURI, 
 //              wxMediaCtrl(wxWindow* parent,
 //                          wxWindowID id=-1,
 //                          const wxString& location=wxPyEmptyString,
@@ -195,7 +195,7 @@ public:
 //                          long style = 0,
 //                          const wxString& szBackend = wxPyEmptyString,
 //                          const wxValidator& validator = wxDefaultValidator,
-//                          const wxString& name = wxPyMediaCtrlNameStr)
+//                          const wxString& name = wxPyMediaCtrlNameStr))
 //         {
 //             return new wxMediaCtrl(parent, id, wxURI(location),
 //                                    pos, size, style, szBackend, validator, name);
diff --git a/wxPython/src/my_fragments.i b/wxPython/src/my_fragments.i
deleted file mode 100644 (file)
index 7bf107d..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// There is a bug in the standard t_output_helper, this one will replace it
-// until it is fixed.
-
-
-%fragment("t_output_helper","header") %{
-  static PyObject* t_output_helper(PyObject* target, PyObject* o) {
-    PyObject*   o2;
-    PyObject*   o3;
-    
-    if (!target) {                   
-        target = o;
-    } else if (target == Py_None) {  
-        Py_DECREF(Py_None);
-        target = o;
-    } else {
-        if (!PyTuple_Check(target)) {
-            o2 = target;
-            target = PyTuple_New(1);
-            PyTuple_SetItem(target, 0, o2);
-        }            
-        o3 = PyTuple_New(1);            
-        PyTuple_SetItem(o3, 0, o);      
-
-        o2 = target;
-        target = PySequence_Concat(o2, o3); 
-        Py_DECREF(o2);                      
-        Py_DECREF(o3);
-    }
-    return target;
-  }
-%}
-
-
-
-// These fragments are inserted in modules that need to convert PyObjects to
-// integer values, my versions allow any numeric type to be used, as long as
-// it can be converted to a PyInt.  (Specifically, I allow floats where the
-// default SWIG_AsVal_long would just raise an exception.
-//
-// NOTE: This file has to be %included very early in the SWIGging process as
-// it no longer allows existing fragments to be replaced with one of the same
-// name.  So to make this work I had to bring a copy of python.swg into this
-// project and do the %include there before most other of the standard swiglib
-// files are %included.  This may change in 1.3.23, so adjust accordingly then.
-
-
-
-%fragment(SWIG_AsVal_frag(long), "header") {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(long)(PyObject* obj, long* val)
-{
-    if (PyNumber_Check(obj)) {
-        if (val) *val = PyInt_AsLong(obj);
-        return 1;
-    }
-    else {
-        PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
-                                               obj->ob_type->tp_name);
-        PyErr_SetObject(PyExc_TypeError, errmsg);
-        Py_DECREF(errmsg);
-    }
-    return 0;
-}
-}
-
-
-%fragment(SWIG_AsVal_frag(unsigned long), "header",
-          fragment=SWIG_AsVal_frag(long)) {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(unsigned long)(PyObject* obj, unsigned long* val)
-{
-    long v = 0;
-    if (SWIG_AsVal_long(obj, &v) && v < 0) {
-        PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
-        return 0;
-    }
-    else if (val)
-        *val = (unsigned long)v;
-    return 1;
-}
-}
-
-
-%fragment(SWIG_AsVal_frag(double), "header") {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(double)(PyObject *obj, double* val)
-{
-    if (PyNumber_Check(obj)) {
-        if (val) *val = PyFloat_AsDouble(obj);
-        return 1;
-    }
-    else {
-        PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
-                                               obj->ob_type->tp_name);
-        PyErr_SetObject(PyExc_TypeError, errmsg);
-        Py_DECREF(errmsg);
-    }
-    return 0;
-}
-}
diff --git a/wxPython/src/pyfragments.swg b/wxPython/src/pyfragments.swg
new file mode 100644 (file)
index 0000000..84fc9a7
--- /dev/null
@@ -0,0 +1,89 @@
+
+
+// There standard t_output_helper has been changed to return a list rather
+// than a tuple, we'll replace it with the old implementation here.
+
+
+%fragment("t_output_helper","header") %{
+  static PyObject* t_output_helper(PyObject* target, PyObject* o) {
+    PyObject*   o2;
+    PyObject*   o3;
+    
+    if (!target) {                   
+        target = o;
+    } else if (target == Py_None) {  
+        Py_DECREF(Py_None);
+        target = o;
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
+        o3 = PyTuple_New(1);            
+        PyTuple_SetItem(o3, 0, o);      
+
+        o2 = target;
+        target = PySequence_Concat(o2, o3); 
+        Py_DECREF(o2);                      
+        Py_DECREF(o3);
+    }
+    return target;
+  }
+%}
+
+
+
+// These fragments are inserted in modules that need to convert PyObjects to
+// integer values, my versions allow any numeric type to be used, as long as
+// it can be converted to a PyInt.  (Specifically, I allow floats where the
+// default SWIG_AsVal_long would just raise an exception.
+//
+
+
+%fragment(SWIG_AsVal_frag(long), "header") {
+SWIGINTERN int
+SWIG_AsVal(long)(PyObject* obj, long* val)
+{
+    if (PyNumber_Check(obj)) {
+        if (val) *val = PyInt_AsLong(obj);
+        return 1;
+    }
+    else {
+        SWIG_type_error("number", obj);
+    }
+    return 0;
+}
+}
+
+
+%fragment(SWIG_AsVal_frag(unsigned long), "header",
+          fragment=SWIG_AsVal_frag(long)) {
+SWIGINTERN int 
+SWIG_AsVal(unsigned long)(PyObject* obj, unsigned long* val)
+{
+    long v = 0;
+    if (SWIG_AsVal_long(obj, &v) && v < 0) {
+        SWIG_type_error("unsigned number", obj);
+    }
+    else if (val)
+        *val = (unsigned long)v;
+    return 1;
+}
+}
+
+
+%fragment(SWIG_AsVal_frag(double), "header") {
+SWIGINTERN int
+SWIG_AsVal(double)(PyObject *obj, double* val)
+{
+    if (PyNumber_Check(obj)) {
+        if (val) *val = PyFloat_AsDouble(obj);
+        return 1;
+    }
+    else {
+        SWIG_type_error("number", obj);
+    }
+    return 0;
+}
+}
diff --git a/wxPython/src/pyrun.swg b/wxPython/src/pyrun.swg
deleted file mode 100644 (file)
index a8dffa8..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/***********************************************************************
- * pyrun.swg for wxPython
- *
- * Include only the function prototypes and such from SWIG's pyrun.swg,
- * but not the runtime functions themselves.  This helps keep the
- * wrapper files clean of unnecessary stuff that is in the libpy.c file
- * anyway.
- *
- ************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SWIG_PY_INT     1
-#define SWIG_PY_FLOAT   2
-#define SWIG_PY_STRING  3
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY  5
-
-/* Flags for pointer conversion */
-
-#define SWIG_POINTER_EXCEPTION     0x1
-#define SWIG_POINTER_DISOWN        0x2
-
-/* Exception handling in wrappers */
-#define SWIG_fail   goto fail
-
-/* Constant information structure */
-typedef struct swig_const_info {
-    int type;
-    char *name;
-    long lvalue;
-    double dvalue;
-    void   *pvalue;
-    swig_type_info **ptype;
-} swig_const_info;
-
-/* Common SWIG API */
-#define SWIG_ConvertPtr(obj, pp, type, flags) \
-  SWIG_Python_ConvertPtr(obj, pp, type, flags)
-#define SWIG_NewPointerObj(p, type, flags) \
-  SWIG_Python_NewPointerObj(p, type, flags)
-#define SWIG_MustGetPtr(p, type, argnum, flags) \
-  SWIG_Python_MustGetPtr(p, type, argnum, flags)
-/* Python-specific SWIG API */
-#define SWIG_newvarlink() \
-  SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr) \
-  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
-  SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type) \
-  SWIG_Python_NewPackedObj(ptr, sz, type)
-#define SWIG_InstallConstants(d, constants) \
-  SWIG_Python_InstallConstants(d, constants)
-
-typedef double (*py_objasdbl_conv)(PyObject *obj);
-
-SWIGIMPORT(int)               SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
-SWIGIMPORT(void *)            SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_newvarlink(void);
-SWIGIMPORT(void)              SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-SWIGIMPORT(int)               SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
-SWIGIMPORT(void)              SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
-
-
-/* Contract support */
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
-
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/wxPython/src/python.swg b/wxPython/src/python.swg
deleted file mode 100644 (file)
index 0b0da26..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -----------------------------------------------------------------------------
- * python.swg
- *
- * Python configuration module.
- * ----------------------------------------------------------------------------- */
-
-/* Python.h has to appear first */
-
-%insert(runtime) %{
-#include "Python.h"
-%}
-
-%insert(runtime) "precommon.swg";
-%insert(runtime) "common.swg";          /* Common type-checking code */
-%insert(runtime) "pyrun.swg";           /* Python run-time code */
-
-/* Special directive for shadow code */
-
-#define %shadow      %insert("shadow")
-#define %pythoncode  %insert("python")
-
-%include "pymacros.swg"
-
-
-/* -----------------------------------------------------------------------------
- *  SWIGTYPE typemaps
- * ----------------------------------------------------------------------------- */
-
-%include "pyswigtype.swg"
-
-
-/* -----------------------------------------------------------------------------
- *  Check for local fragment defintions
- * ----------------------------------------------------------------------------- */
-
-%include "my_fragments.i"
-
-
-/* -----------------------------------------------------------------------------
- *  Typemap specializations
- * ----------------------------------------------------------------------------- */
-
-%include "pyinout.swg"
-%include "pyvoid.swg"
-%include "pyobject.swg"
-%include "pystrbase.swg"
-%include "pystrings.swg"
-%include "pyvaltypes.swg"
-%include "pyptrtypes.swg"
-%include "pyprimtypes.swg"
-%include "pymisctypes.swg"
-%include "pyenum.swg"
-
-/* ------------------------------------------------------------
- *  Overloaded operator support
- * ------------------------------------------------------------ */
-%include "pyopers.swg"
-
-/* ------------------------------------------------------------
- * Warnings for Python keywords 
- * ------------------------------------------------------------ */
-%include "pythonkw.swg"
-
-/* ------------------------------------------------------------
- * The start of the Python initialization function 
- * ------------------------------------------------------------ */
-
-%init %{
-#ifdef __cplusplus
-extern "C"
-#endif
-SWIGEXPORT(void) SWIG_init(void) {
-  static PyObject *SWIG_globals = 0; 
-  static int       typeinit = 0;
-  PyObject *m, *d;
-  int       i;
-  if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
-  m = Py_InitModule((char *) SWIG_name, SwigMethods);
-  d = PyModule_GetDict(m);
-
-  if (!typeinit) {
-     for (i = 0; swig_types_initial[i]; i++) {
-        swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
-     }
-     typeinit = 1;
-  }
-  SWIG_InstallConstants(d,swig_const_table);
-%}
-
-
index 3b5aadf64387dc02c8ed47835662b741a38b839c..33fa36f09eb092fba52a3dba88e94b58db8d67b1 100644 (file)
@@ -134,7 +134,7 @@ public:
                     const wxValidator& validator = wxDefaultValidator,
                     const wxString& name = wxPyWebKitNameStr);
 
-    %name(PreWebKitCtrl)wxWebKitCtrl();
+    %RenameCtor(PreWebKitCtrl, wxWebKitCtrl());
 
     
     bool Create(wxWindow *parent,
index 32c7b7cd9a795a88fd1e2cc9cb406c6a57f73e61..e2add09da95280f19542a020307a0d9dafa51b98 100644 (file)
@@ -96,7 +96,7 @@ public:
 //     wxWizardPage(wxWizard *parent,
 //                  const wxBitmap& bitmap = wxNullBitmap,
 //                  const char* resource = NULL);
-//     %name(PreWizardPage)wxWizardPage();
+//     %RenameCtor(PreWizardPage, wxWizardPage());
 
     %extend {
         bool Create(wxWizard *parent,
@@ -224,7 +224,7 @@ public:
         }
     }
 
-    %name(PrePyWizardPage)wxPyWizardPage();
+    %RenameCtor(PrePyWizardPage, wxPyWizardPage());
 
     // Turn it back on again
     %typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
@@ -297,7 +297,7 @@ public:
                        wxWizardPage *next = NULL,
                        const wxBitmap& bitmap = wxNullBitmap,
                        const wxChar* resource = NULL);
-    %name(PreWizardPageSimple)wxWizardPageSimple();
+    %RenameCtor(PreWizardPageSimple, wxWizardPageSimple());
 
     bool Create(wxWizard *parent = NULL,
                 wxWizardPage *prev = NULL,
@@ -331,7 +331,7 @@ public:
              const wxBitmap& bitmap = wxNullBitmap,
              const wxPoint& pos = wxDefaultPosition,
              long style = wxDEFAULT_DIALOG_STYLE);
-    %name(PreWizard)wxWizard();
+    %RenameCtor(PreWizard, wxWizard());
 
     bool Create(wxWindow *parent,
              int id = -1,