From c25f90f60ceb17d33900f6a94f7f4ff2a009c584 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 14 Nov 2006 22:03:54 +0000 Subject: [PATCH] Use a swig macro for generating the call to the _setCallbackInfo function so it's easy to fiddle with, if needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/_treelist.i | 2 +- wxPython/contrib/gizmos/gizmos.i | 2 +- wxPython/contrib/gizmos/gtk/gizmos.py | 4 ++-- wxPython/contrib/gizmos/mac/gizmos.py | 4 ++-- wxPython/contrib/gizmos/msw/gizmos.py | 4 ++-- wxPython/src/_app.i | 6 ++---- wxPython/src/_artprov.i | 2 +- wxPython/src/_dataobj.i | 6 +++--- wxPython/src/_defs.i | 6 ++++++ wxPython/src/_dnd.i | 11 +++++------ wxPython/src/_filesys.i | 2 +- wxPython/src/_font.i | 4 ++-- wxPython/src/_intl.i | 2 +- wxPython/src/_listctrl.i | 18 ++++++++--------- wxPython/src/_log.i | 2 +- wxPython/src/_popupwin.i | 2 +- wxPython/src/_printfw.i | 8 ++++---- wxPython/src/_process.i | 2 +- wxPython/src/_pycontrol.i | 2 +- wxPython/src/_pywindows.i | 6 +++--- wxPython/src/_sizers.i | 2 +- wxPython/src/_taskbar.i | 4 ++-- wxPython/src/_timer.i | 4 ++-- wxPython/src/_tipdlg.i | 2 +- wxPython/src/_treectrl.i | 2 +- wxPython/src/_validator.i | 7 +++---- wxPython/src/_vscroll.i | 6 +++--- wxPython/src/_window.i | 2 +- wxPython/src/_xmlhandler.i | 2 +- wxPython/src/_xmlsub.i | 2 +- wxPython/src/aui.i | 4 ++-- wxPython/src/grid.i | 8 ++++---- wxPython/src/gtk/_controls.py | 6 +++--- wxPython/src/gtk/_controls_wrap.cpp | 2 +- wxPython/src/gtk/_core.py | 17 +++++++--------- wxPython/src/gtk/_core_wrap.cpp | 18 +++++++++-------- wxPython/src/gtk/_gdi.py | 6 +++--- wxPython/src/gtk/_gdi_wrap.cpp | 18 +++++++++-------- wxPython/src/gtk/_misc.py | 28 +++++++++++++-------------- wxPython/src/gtk/_misc_wrap.cpp | 18 +++++++++-------- wxPython/src/gtk/_windows.py | 26 ++++++++++++------------- wxPython/src/gtk/_windows_wrap.cpp | 16 ++++++++------- wxPython/src/gtk/grid.py | 8 ++++---- wxPython/src/gtk/html.py | 8 ++++---- wxPython/src/gtk/wizard.py | 2 +- wxPython/src/gtk/xrc.py | 4 ++-- wxPython/src/html.i | 8 ++++---- wxPython/src/mac/_controls.py | 6 +++--- wxPython/src/mac/_controls_wrap.cpp | 2 +- wxPython/src/mac/_core.py | 17 +++++++--------- wxPython/src/mac/_core_wrap.cpp | 18 +++++++++-------- wxPython/src/mac/_gdi.py | 6 +++--- wxPython/src/mac/_gdi_wrap.cpp | 18 +++++++++-------- wxPython/src/mac/_misc.py | 28 +++++++++++++-------------- wxPython/src/mac/_misc_wrap.cpp | 18 +++++++++-------- wxPython/src/mac/_windows.py | 24 +++++++++++------------ wxPython/src/mac/_windows_wrap.cpp | 16 ++++++++------- wxPython/src/mac/grid.py | 8 ++++---- wxPython/src/mac/html.py | 8 ++++---- wxPython/src/mac/wizard.py | 2 +- wxPython/src/mac/xrc.py | 4 ++-- wxPython/src/msw/_controls.py | 6 +++--- wxPython/src/msw/_controls_wrap.cpp | 2 +- wxPython/src/msw/_core.py | 17 +++++++--------- wxPython/src/msw/_core_wrap.cpp | 18 +++++++++-------- wxPython/src/msw/_gdi.py | 6 +++--- wxPython/src/msw/_gdi_wrap.cpp | 18 +++++++++-------- wxPython/src/msw/_misc.py | 28 +++++++++++++-------------- wxPython/src/msw/_misc_wrap.cpp | 18 +++++++++-------- wxPython/src/msw/_windows.py | 26 ++++++++++++------------- wxPython/src/msw/_windows_wrap.cpp | 16 ++++++++------- wxPython/src/msw/grid.py | 8 ++++---- wxPython/src/msw/html.py | 8 ++++---- wxPython/src/msw/wizard.py | 2 +- wxPython/src/msw/xrc.py | 4 ++-- wxPython/src/wizard.i | 2 +- 76 files changed, 348 insertions(+), 331 deletions(-) diff --git a/wxPython/contrib/gizmos/_treelist.i b/wxPython/contrib/gizmos/_treelist.i index 42e43cd050..8083499775 100644 --- a/wxPython/contrib/gizmos/_treelist.i +++ b/wxPython/contrib/gizmos/_treelist.i @@ -199,7 +199,7 @@ MustHaveApp(wxPyTreeListCtrl); class wxPyTreeListCtrl : public wxControl { public: - %pythonAppend wxPyTreeListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl)" + %pythonAppend wxPyTreeListCtrl "self._setOORInfo(self);" setCallbackInfo(TreeListCtrl) %pythonAppend wxPyTreeListCtrl() "" wxPyTreeListCtrl(wxWindow *parent, wxWindowID id = -1, diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index 7522e3d549..485613b385 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -320,7 +320,7 @@ MustHaveApp(wxPyTreeCompanionWindow); class wxPyTreeCompanionWindow: public wxWindow { public: - %pythonAppend wxPyTreeCompanionWindow "self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow)" + %pythonAppend wxPyTreeCompanionWindow "self._setOORInfo(self);" setCallbackInfo(TreeCompanionWindow) %pythonAppend wxPyTreeCompanionWindow() "" wxPyTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1, diff --git a/wxPython/contrib/gizmos/gtk/gizmos.py b/wxPython/contrib/gizmos/gtk/gizmos.py index 5ebfc2316a..57654fdeb8 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos.py +++ b/wxPython/contrib/gizmos/gtk/gizmos.py @@ -234,7 +234,7 @@ class TreeCompanionWindow(_core.Window): Size size=DefaultSize, long style=0) -> TreeCompanionWindow """ _gizmos.TreeCompanionWindow_swiginit(self,_gizmos.new_TreeCompanionWindow(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow) + self._setOORInfo(self);TreeCompanionWindow._setCallbackInfo(self, self, TreeCompanionWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -465,7 +465,7 @@ class TreeListCtrl(_core.Control): String name=TreeListCtrlNameStr) -> TreeListCtrl """ _gizmos.TreeListCtrl_swiginit(self,_gizmos.new_TreeListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl) + self._setOORInfo(self);TreeListCtrl._setCallbackInfo(self, self, TreeListCtrl) def Create(*args, **kwargs): """ diff --git a/wxPython/contrib/gizmos/mac/gizmos.py b/wxPython/contrib/gizmos/mac/gizmos.py index 5ebfc2316a..57654fdeb8 100644 --- a/wxPython/contrib/gizmos/mac/gizmos.py +++ b/wxPython/contrib/gizmos/mac/gizmos.py @@ -234,7 +234,7 @@ class TreeCompanionWindow(_core.Window): Size size=DefaultSize, long style=0) -> TreeCompanionWindow """ _gizmos.TreeCompanionWindow_swiginit(self,_gizmos.new_TreeCompanionWindow(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow) + self._setOORInfo(self);TreeCompanionWindow._setCallbackInfo(self, self, TreeCompanionWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -465,7 +465,7 @@ class TreeListCtrl(_core.Control): String name=TreeListCtrlNameStr) -> TreeListCtrl """ _gizmos.TreeListCtrl_swiginit(self,_gizmos.new_TreeListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl) + self._setOORInfo(self);TreeListCtrl._setCallbackInfo(self, self, TreeListCtrl) def Create(*args, **kwargs): """ diff --git a/wxPython/contrib/gizmos/msw/gizmos.py b/wxPython/contrib/gizmos/msw/gizmos.py index 5ebfc2316a..57654fdeb8 100644 --- a/wxPython/contrib/gizmos/msw/gizmos.py +++ b/wxPython/contrib/gizmos/msw/gizmos.py @@ -234,7 +234,7 @@ class TreeCompanionWindow(_core.Window): Size size=DefaultSize, long style=0) -> TreeCompanionWindow """ _gizmos.TreeCompanionWindow_swiginit(self,_gizmos.new_TreeCompanionWindow(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow) + self._setOORInfo(self);TreeCompanionWindow._setCallbackInfo(self, self, TreeCompanionWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -465,7 +465,7 @@ class TreeListCtrl(_core.Control): String name=TreeListCtrlNameStr) -> TreeListCtrl """ _gizmos.TreeListCtrl_swiginit(self,_gizmos.new_TreeListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl) + self._setOORInfo(self);TreeListCtrl._setCallbackInfo(self, self, TreeListCtrl) def Create(*args, **kwargs): """ diff --git a/wxPython/src/_app.i b/wxPython/src/_app.i index 4c7ff5f139..91d1a8fb8b 100644 --- a/wxPython/src/_app.i +++ b/wxPython/src/_app.i @@ -47,9 +47,7 @@ DocStr(wxPyApp, class wxPyApp : public wxEvtHandler { public: - %pythonAppend wxPyApp - "self._setCallbackInfo(self, PyApp, False) - self._setOORInfo(self, False)"; + %pythonAppend wxPyApp "self._setOORInfo(self, False);" setCallbackInfo(PyApp) %typemap(out) wxPyApp*; // turn off this typemap DocStr(wxPyApp, @@ -67,7 +65,7 @@ public: %typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1, $owner); } - void _setCallbackInfo(PyObject* self, PyObject* _class, bool incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, bool incref=false); DocDeclStr( diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index 3e1444579d..3213543a55 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -243,7 +243,7 @@ class wxPyArtProvider /*: public wxObject*/ { public: - %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" + %pythonAppend wxPyArtProvider setCallbackInfo(ArtProvider); wxPyArtProvider(); ~wxPyArtProvider(); diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index a0c3428c20..996469245c 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -497,7 +497,7 @@ data structures. "); class wxPyDataObjectSimple : public wxDataObjectSimple { public: - %pythonAppend wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" + %pythonAppend wxPyDataObjectSimple setCallbackInfo(PyDataObjectSimple) wxPyDataObjectSimple(const wxDataFormat& format = wxFormatInvalid); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -625,7 +625,7 @@ into the data object.", ""); class wxPyTextDataObject : public wxTextDataObject { public: - %pythonAppend wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" + %pythonAppend wxPyTextDataObject setCallbackInfo(PyTextDataObject) wxPyTextDataObject(const wxString& text = wxPyEmptyString); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -718,7 +718,7 @@ data on demand derive from this class and overload `GetBitmap`.", ""); class wxPyBitmapDataObject : public wxBitmapDataObject { public: - %pythonAppend wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" + %pythonAppend wxPyBitmapDataObject setCallbackInfo(PyBitmapDataObject) wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 1aa7ff32b0..7723185846 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -162,6 +162,12 @@ typedef unsigned long wxUIntPtr; %pythoncode { NAME = property(STUFF) } %enddef + +%define setCallbackInfo(klass) + "klass._setCallbackInfo(self, self, klass)" +%enddef + + //---------------------------------------------------------------------- // Macros for the docstring and autodoc features of SWIG. These will // help make the code look more readable, and pretty, as well as help diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 9ed73d03ad..7552e0a1c1 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -58,7 +58,7 @@ IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback); %rename(DropSource) wxPyDropSource; class wxPyDropSource { public: - %pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)" + %pythonAppend wxPyDropSource setCallbackInfo(DropSource) #ifndef __WXGTK__ wxPyDropSource(wxWindow *win, const wxCursor © = wxNullCursor, @@ -71,7 +71,7 @@ public: const wxIcon& none = wxNullIcon); #endif - void _setCallbackInfo(PyObject* self, PyObject* _class, int incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0); ~wxPyDropSource(); // set the data which is transfered by drag and drop @@ -138,8 +138,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop); class wxPyDropTarget // : public wxDropTarget { public: - %pythonAppend wxPyDropTarget - "self._setCallbackInfo(self, DropTarget)" + %pythonAppend wxPyDropTarget setCallbackInfo(DropTarget) %disownarg( wxDataObject *dataObject ); @@ -220,7 +219,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %rename(TextDropTarget) wxPyTextDropTarget; class wxPyTextDropTarget : public wxPyDropTarget { public: - %pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" + %pythonAppend wxPyTextDropTarget setCallbackInfo(TextDropTarget) wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -289,7 +288,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); class wxPyFileDropTarget : public wxPyDropTarget { public: - %pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" + %pythonAppend wxPyFileDropTarget setCallbackInfo(FileDropTarget) wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_filesys.i b/wxPython/src/_filesys.i index 8975133d3d..fa76da3e68 100644 --- a/wxPython/src/_filesys.i +++ b/wxPython/src/_filesys.i @@ -113,7 +113,7 @@ public: class wxPyFileSystemHandler : public wxFileSystemHandler { public: - %pythonAppend wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)"; + %pythonAppend wxPyFileSystemHandler setCallbackInfo(FileSystemHandler) wxPyFileSystemHandler(); diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index dcfe53b952..ac507526bc 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -861,11 +861,11 @@ MustHaveApp(wxPyFontEnumerator); %rename(FontEnumerator) wxPyFontEnumerator; class wxPyFontEnumerator { public: - %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" + %pythonAppend wxPyFontEnumerator setCallbackInfo(FontEnumerator) wxPyFontEnumerator(); ~wxPyFontEnumerator(); - void _setCallbackInfo(PyObject* self, PyObject* _class, bool incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0); bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all diff --git a/wxPython/src/_intl.i b/wxPython/src/_intl.i index 18e7f9db0b..d401c72de2 100644 --- a/wxPython/src/_intl.i +++ b/wxPython/src/_intl.i @@ -595,7 +595,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString, class wxPyLocale : public wxLocale { public: - %pythonAppend wxPyLocale "self._setCallbackInfo(self, PyLocale)" + %pythonAppend wxPyLocale setCallbackInfo(PyLocale) // ctor & dtor // ----------- diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index af9def88fa..262ddbc462 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -85,7 +85,7 @@ enum { wxLIST_HITTEST_TORIGHT, wxLIST_HITTEST_ONITEM, -// GetSubItemRect constants +// GetSubItemRect constants wxLIST_GETSUBITEMRECT_WHOLEITEM, }; @@ -193,8 +193,8 @@ public: class wxListItem : public wxObject { public: // turn off this typemap - %typemap(out) wxListItem*; - + %typemap(out) wxListItem*; + wxListItem(); ~wxListItem(); @@ -321,7 +321,7 @@ public: %property(Mask, GetMask, doc="See `GetMask`"); %property(Point, GetPoint, doc="See `GetPoint`"); %property(Text, GetText, doc="See `GetText`"); - + }; /* List control event types */ @@ -446,7 +446,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); -IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); +IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); %} @@ -462,9 +462,9 @@ MustHaveApp(wxPyListCtrl); class wxPyListCtrl : public wxControl { public: // turn off this typemap - %typemap(out) wxPyListCtrl*; + %typemap(out) wxPyListCtrl*; - %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" + %pythonAppend wxPyListCtrl "self._setOORInfo(self);" setCallbackInfo(ListCtrl) %pythonAppend wxPyListCtrl() "" wxPyListCtrl(wxWindow* parent, wxWindowID id = -1, @@ -592,7 +592,7 @@ public: return rect; } -// MSW only so far... +// MSW only so far... // wxRect GetSubItemRect(long item, long subItem, int code = wxLIST_RECT_BOUNDS) { // wxRect rect; // self->GetSubItemRect(item, subItem, rect, code); @@ -722,7 +722,7 @@ the second return value (see wx.LIST_HITTEST flags) and also the subItem, if any.", "", HitTestSubItem); - + // Inserts an item, returning the index of the new item if successful, // -1 otherwise. long InsertItem(wxListItem& info); diff --git a/wxPython/src/_log.i b/wxPython/src/_log.i index 48fd12b62b..b9204ea80e 100644 --- a/wxPython/src/_log.i +++ b/wxPython/src/_log.i @@ -411,7 +411,7 @@ IMP_PYCALLBACK_VOID_(wxPyLog, wxLog, Flush); // Now tell SWIG about it class wxPyLog : public wxLog { public: - %pythonAppend wxPyLog "self._setCallbackInfo(self, PyLog)" + %pythonAppend wxPyLog setCallbackInfo(PyLog) wxPyLog(); diff --git a/wxPython/src/_popupwin.i b/wxPython/src/_popupwin.i index ec47753500..43fcd6c511 100644 --- a/wxPython/src/_popupwin.i +++ b/wxPython/src/_popupwin.i @@ -85,7 +85,7 @@ MustHaveApp(wxPyPopupTransientWindow); class wxPyPopupTransientWindow : public wxPopupWindow { public: - %pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)" + %pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);" setCallbackInfo(PopupTransientWindow) %pythonAppend wxPyPopupTransientWindow() "" wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE); diff --git a/wxPython/src/_printfw.i b/wxPython/src/_printfw.i index fb39a02297..a70f85a6c6 100644 --- a/wxPython/src/_printfw.i +++ b/wxPython/src/_printfw.i @@ -483,7 +483,7 @@ MustHaveApp(wxPyPrintout); %rename(Printout) wxPyPrintout; class wxPyPrintout : public wxObject { public: - %pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)" + %pythonAppend wxPyPrintout setCallbackInfo(Printout) %typemap(out) wxPyPrintout*; // turn off this typemap wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr); @@ -824,7 +824,7 @@ class wxPyPrintPreview : public wxPrintPreview public: %disownarg(wxPyPrintout*); - %pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)" + %pythonAppend wxPyPrintPreview setCallbackInfo(PyPrintPreview) %nokwargs wxPyPrintPreview; wxPyPrintPreview(wxPyPrintout* printout, wxPyPrintout* printoutForPrinting, @@ -895,7 +895,7 @@ class wxPyPreviewFrame : public wxPreviewFrame { public: %disownarg(wxPrintPreview*); - %pythonAppend wxPyPreviewFrame "self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self)" + %pythonAppend wxPyPreviewFrame "self._setOORInfo(self);" setCallbackInfo(PyPreviewFrame) wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title, @@ -955,7 +955,7 @@ MustHaveApp(wxPyPreviewControlBar); class wxPyPreviewControlBar : public wxPreviewControlBar { public: - %pythonAppend wxPyPreviewControlBar "self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self)" + %pythonAppend wxPyPreviewControlBar "self._setOORInfo(self);" setCallbackInfo(PyPreviewControlBar) wxPyPreviewControlBar(wxPrintPreview *preview, long buttons, diff --git a/wxPython/src/_process.i b/wxPython/src/_process.i index 756302cb84..7a9b5759f4 100644 --- a/wxPython/src/_process.i +++ b/wxPython/src/_process.i @@ -99,7 +99,7 @@ public: static wxPyProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC); - %pythonAppend wxPyProcess "self._setCallbackInfo(self, Process); self.this.own(False)" + %pythonAppend wxPyProcess setCallbackInfo(Process) "; self.this.own(False)" wxPyProcess(wxEvtHandler *parent = NULL, int id = -1); ~wxPyProcess(); diff --git a/wxPython/src/_pycontrol.i b/wxPython/src/_pycontrol.i index 8658b597f6..eb4a0acf0d 100644 --- a/wxPython/src/_pycontrol.i +++ b/wxPython/src/_pycontrol.i @@ -118,7 +118,7 @@ MustHaveApp(wxPyControl); class wxPyControl : public wxControl { public: - %pythonAppend wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)" + %pythonAppend wxPyControl "self._setOORInfo(self);" setCallbackInfo(PyControl) %pythonAppend wxPyControl() "" wxPyControl(wxWindow* parent, const wxWindowID id=-1, diff --git a/wxPython/src/_pywindows.i b/wxPython/src/_pywindows.i index 50f0e39a59..3dfc58acab 100644 --- a/wxPython/src/_pywindows.i +++ b/wxPython/src/_pywindows.i @@ -146,7 +146,7 @@ MustHaveApp(wxPyWindow); class wxPyWindow : public wxWindow { public: - %pythonAppend wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" + %pythonAppend wxPyWindow "self._setOORInfo(self);" setCallbackInfo(PyWindow) %pythonAppend wxPyWindow() "" wxPyWindow(wxWindow* parent, const wxWindowID id=-1, @@ -328,7 +328,7 @@ MustHaveApp(wxPyPanel); class wxPyPanel : public wxPanel { public: - %pythonAppend wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" + %pythonAppend wxPyPanel "self._setOORInfo(self);" setCallbackInfo(PyPanel) %pythonAppend wxPyPanel() "" wxPyPanel(wxWindow* parent, const wxWindowID id=-1, @@ -502,7 +502,7 @@ MustHaveApp(wxPyScrolledWindow); class wxPyScrolledWindow : public wxScrolledWindow { public: - %pythonAppend wxPyScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyScrolledWindow)" + %pythonAppend wxPyScrolledWindow "self._setOORInfo(self);" setCallbackInfo(PyScrolledWindow) %pythonAppend wxPyScrolledWindow() "" wxPyScrolledWindow(wxWindow* parent, const wxWindowID id=-1, diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index fed0baca61..2b1e26a76c 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -1126,7 +1126,7 @@ When `Layout` is called it first calls `CalcMin` followed by ", ""); class wxPySizer : public wxSizer { public: - %pythonAppend wxPySizer "self._setCallbackInfo(self, PySizer);self._setOORInfo(self)" + %pythonAppend wxPySizer "self._setOORInfo(self);" setCallbackInfo(PySizer) DocCtorStr( wxPySizer(), diff --git a/wxPython/src/_taskbar.i b/wxPython/src/_taskbar.i index 9ae6d12250..f0f110698f 100644 --- a/wxPython/src/_taskbar.i +++ b/wxPython/src/_taskbar.i @@ -101,12 +101,12 @@ MustHaveApp(wxPyTaskBarIcon); class wxPyTaskBarIcon : public wxEvtHandler { public: - %pythonAppend wxPyTaskBarIcon "self._setCallbackInfo(self, TaskBarIcon, 0)" + %pythonAppend wxPyTaskBarIcon setCallbackInfo(TaskBarIcon) wxPyTaskBarIcon(); ~wxPyTaskBarIcon(); - void _setCallbackInfo(PyObject* self, PyObject* _class, int incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0); %pythonPrepend Destroy "args[0].this.own(False)"; %extend { diff --git a/wxPython/src/_timer.i b/wxPython/src/_timer.i index a883c73b66..70dc914acf 100644 --- a/wxPython/src/_timer.i +++ b/wxPython/src/_timer.i @@ -55,7 +55,7 @@ public: // there won't be a reference cycle and it can clean itself up via normal // Python refcounting %pythonAppend wxPyTimer - "self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0)" + "self._setOORInfo(self, 0);" setCallbackInfo(Timer); // if you don't call SetOwner() or provide an owner in the ctor // then you must override Notify() in order to receive the timer @@ -66,7 +66,7 @@ public: // Destructor. virtual ~wxPyTimer(); - void _setCallbackInfo(PyObject* self, PyObject* _class, int incref = 1); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref = 0); // Set the owner instance that will receive the EVT_TIMER events // using the given id. diff --git a/wxPython/src/_tipdlg.i b/wxPython/src/_tipdlg.i index 37ac6959b2..c7582c1e00 100644 --- a/wxPython/src/_tipdlg.i +++ b/wxPython/src/_tipdlg.i @@ -69,7 +69,7 @@ IMP_PYCALLBACK_STRING_STRING(wxPyTipProvider, wxTipProvider, PreprocessTip); // Now let SWIG know about it class wxPyTipProvider : public wxTipProvider { public: - %pythonAppend wxPyTipProvider "self._setCallbackInfo(self, PyTipProvider)" + %pythonAppend wxPyTipProvider setCallbackInfo(PyTipProvider) wxPyTipProvider(size_t currentTip); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index adcac9458b..b50cb86f8c 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -344,7 +344,7 @@ MustHaveApp(wxPyTreeCtrl); %rename(TreeCtrl) wxPyTreeCtrl; class wxPyTreeCtrl : public wxControl { public: - %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" + %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);" setCallbackInfo(TreeCtrl) %pythonAppend wxPyTreeCtrl() "" %typemap(out) wxPyTreeCtrl*; // turn off this typemap diff --git a/wxPython/src/_validator.i b/wxPython/src/_validator.i index 4c72e8b05a..8d4377ab74 100644 --- a/wxPython/src/_validator.i +++ b/wxPython/src/_validator.i @@ -79,12 +79,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); class wxPyValidator : public wxValidator { public: - %pythonAppend wxPyValidator " - self._setCallbackInfo(self, PyValidator, 1) - self._setOORInfo(self)" + %pythonAppend wxPyValidator "self._setOORInfo(self);" setCallbackInfo(PyValidator) + wxPyValidator(); - void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=true); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=1); }; diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index e784e19bc3..546c0db92b 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -136,7 +136,7 @@ MustHaveApp(wxPyVScrolledWindow); class wxPyVScrolledWindow : public wxPanel { public: - %pythonAppend wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)" + %pythonAppend wxPyVScrolledWindow "self._setOORInfo(self);" setCallbackInfo(VScrolledWindow) %pythonAppend wxPyVScrolledWindow() "" @@ -322,7 +322,7 @@ MustHaveApp(wxPyVListBox); class wxPyVListBox : public wxPyVScrolledWindow { public: - %pythonAppend wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)" + %pythonAppend wxPyVListBox "self._setOORInfo(self);" setCallbackInfo(VListBox) %pythonAppend wxPyVListBox() "" @@ -577,7 +577,7 @@ MustHaveApp(wxPyHtmlListBox); class wxPyHtmlListBox : public wxPyVListBox { public: - %pythonAppend wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)" + %pythonAppend wxPyHtmlListBox "self._setOORInfo(self);" setCallbackInfo(HtmlListBox) %pythonAppend wxPyHtmlListBox() "" diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index f4c883a59e..e705a0351b 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -2063,7 +2063,7 @@ opaque.", ""); if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) } %pythoncode { diff --git a/wxPython/src/_xmlhandler.i b/wxPython/src/_xmlhandler.i index b791fa185e..bf0a5d970b 100644 --- a/wxPython/src/_xmlhandler.i +++ b/wxPython/src/_xmlhandler.i @@ -143,7 +143,7 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH %rename(XmlResourceHandler) wxPyXmlResourceHandler; class wxPyXmlResourceHandler : public wxObject { public: - %pythonAppend wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)" + %pythonAppend wxPyXmlResourceHandler setCallbackInfo(XmlResourceHandler) wxPyXmlResourceHandler() : wxXmlResourceHandler() {} ~wxPyXmlResourceHandler(); diff --git a/wxPython/src/_xmlsub.i b/wxPython/src/_xmlsub.i index 2d3721de70..69dd800e94 100644 --- a/wxPython/src/_xmlsub.i +++ b/wxPython/src/_xmlsub.i @@ -35,7 +35,7 @@ IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory, %rename(XmlSubclassFactory) wxPyXmlSubclassFactory; class wxPyXmlSubclassFactory { public: - %pythonAppend wxPyXmlSubclassFactory "self._setCallbackInfo(self, XmlSubclassFactory)" + %pythonAppend wxPyXmlSubclassFactory setCallbackInfo(XmlSubclassFactory) wxPyXmlSubclassFactory(); void _setCallbackInfo(PyObject* self, PyObject* _class); }; diff --git a/wxPython/src/aui.i b/wxPython/src/aui.i index 49120ed5ac..c27d5a8b14 100755 --- a/wxPython/src/aui.i +++ b/wxPython/src/aui.i @@ -443,7 +443,7 @@ methods to the Python methods implemented in the derived class.", ""); class wxPyAuiDockArt : public wxAuiDefaultDockArt { - %pythonAppend wxPyAuiDockArt "self._setCallbackInfo(self, PyAuiDockArt)" + %pythonAppend wxPyAuiDockArt setCallbackInfo(PyAuiDockArt) wxPyAuiDocArt(); }; @@ -703,7 +703,7 @@ methods to the Python methods implemented in the derived class.", ""); class wxPyAuiTabArt : public wxAuiDefaultTabArt { - %pythonAppend wxPyAuiTabArt "self._setCallbackInfo(self, PyAuiTabArt)" + %pythonAppend wxPyAuiTabArt setCallbackInfo(PyAuiTabArt) wxPyAuiTabArt(); }; diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 9b01265c22..225f899087 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -643,7 +643,7 @@ IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters) // Let SWIG know about it so it can create the Python version class wxPyGridCellRenderer : public wxGridCellRenderer { public: - %pythonAppend wxPyGridCellRenderer "self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)" + %pythonAppend wxPyGridCellRenderer "self._setOORInfo(self);" setCallbackInfo(PyGridCellRenderer); wxPyGridCellRenderer(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -883,7 +883,7 @@ IMP_PYCALLBACK_STRING__constpure(wxPyGridCellEditor, wxGridCellEditor, GetValue) // Let SWIG know about it so it can create the Python version class wxPyGridCellEditor : public wxGridCellEditor { public: - %pythonAppend wxPyGridCellEditor "self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)" + %pythonAppend wxPyGridCellEditor "self._setOORInfo(self);" setCallbackInfo(PyGridCellEditor) wxPyGridCellEditor(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1123,7 +1123,7 @@ public: class wxPyGridCellAttrProvider : public wxGridCellAttrProvider { public: - %pythonAppend wxPyGridCellAttrProvider "self._setCallbackInfo(self, PyGridCellAttrProvider)" + %pythonAppend wxPyGridCellAttrProvider setCallbackInfo(PyGridCellAttrProvider) wxPyGridCellAttrProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1352,7 +1352,7 @@ public: class wxPyGridTableBase : public wxGridTableBase { public: - %pythonAppend wxPyGridTableBase "self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)" + %pythonAppend wxPyGridTableBase "self._setOORInfo(self);" setCallbackInfo(PyGridTableBase) wxPyGridTableBase(); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 35be486959..b6ec11b207 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -4455,7 +4455,7 @@ class ListCtrl(_core.Control): Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl """ _controls_.ListCtrl_swiginit(self,_controls_.new_ListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl) + self._setOORInfo(self);ListCtrl._setCallbackInfo(self, self, ListCtrl) def Create(*args, **kwargs): """ @@ -5178,7 +5178,7 @@ class TreeCtrl(_core.Control): String name=TreeCtrlNameStr) -> TreeCtrl """ _controls_.TreeCtrl_swiginit(self,_controls_.new_TreeCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl) + self._setOORInfo(self);TreeCtrl._setCallbackInfo(self, self, TreeCtrl) def Create(*args, **kwargs): """ @@ -5740,7 +5740,7 @@ class PyControl(_core.Control): String name=ControlNameStr) -> PyControl """ _controls_.PyControl_swiginit(self,_controls_.new_PyControl(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyControl) + self._setOORInfo(self);PyControl._setCallbackInfo(self, self, PyControl) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 2f90d14607..288fb7d2c6 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -3067,7 +3067,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); -IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); +IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); SWIGINTERN wxListItem *wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col){ diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 6bee06db91..27f94c41b5 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -2070,7 +2070,7 @@ class FileSystemHandler(CPPFileSystemHandler): def __init__(self, *args, **kwargs): """__init__(self) -> FileSystemHandler""" _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) - self._setCallbackInfo(self, FileSystemHandler) + FileSystemHandler._setCallbackInfo(self, self, FileSystemHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -7007,13 +7007,12 @@ class PyApp(EvtHandler): Create a new application object, starting the bootstrap process. """ _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) - self._setCallbackInfo(self, PyApp, False) - self._setOORInfo(self, False) + self._setOORInfo(self, False);PyApp._setCallbackInfo(self, self, PyApp) __swig_destroy__ = _core_.delete_PyApp __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref=False)""" return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): @@ -10332,7 +10331,7 @@ class Window(EvtHandler): if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) def SendSizeEvent(self): self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1))) @@ -10601,12 +10600,10 @@ class PyValidator(Validator): def __init__(self, *args, **kwargs): """__init__(self) -> PyValidator""" _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) - - self._setCallbackInfo(self, PyValidator, 1) - self._setOORInfo(self) + self._setOORInfo(self);PyValidator._setCallbackInfo(self, self, PyValidator) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" return _core_.PyValidator__setCallbackInfo(*args, **kwargs) _core_.PyValidator_swigregister(PyValidator) @@ -12432,7 +12429,7 @@ class PySizer(Sizer): class. """ _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) - self._setCallbackInfo(self, PySizer);self._setOORInfo(self) + self._setOORInfo(self);PySizer._setCallbackInfo(self, self, PySizer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 9a4049177d..823987d30d 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -29956,7 +29956,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyApp *arg1 = (wxPyApp *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + bool arg4 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; bool val4 ; @@ -29969,7 +29969,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyApp, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyApp__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyApp *""'"); @@ -29977,11 +29977,13 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxPyApp * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); @@ -41524,7 +41526,7 @@ SWIGINTERN PyObject *_wrap_PyValidator__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyValidator *arg1 = (wxPyValidator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) true ; + int arg4 = (int) 1 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index 685cb75907..fb4a3d9259 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -2317,12 +2317,12 @@ class FontEnumerator(object): def __init__(self, *args, **kwargs): """__init__(self) -> FontEnumerator""" _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs)) - self._setCallbackInfo(self, FontEnumerator, 0) + FontEnumerator._setCallbackInfo(self, self, FontEnumerator) __swig_destroy__ = _gdi_.delete_FontEnumerator __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs) def EnumerateFacenames(*args, **kwargs): @@ -2784,7 +2784,7 @@ class PyLocale(Locale): def __init__(self, *args, **kwargs): """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale""" _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs)) - self._setCallbackInfo(self, PyLocale) + PyLocale._setCallbackInfo(self, self, PyLocale) __swig_destroy__ = _gdi_.delete_PyLocale __del__ = lambda self : None; diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index e082109e85..993429eb95 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -15460,10 +15460,10 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP wxPyFontEnumerator *arg1 = (wxPyFontEnumerator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -15473,7 +15473,7 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyFontEnumerator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyFontEnumerator *""'"); @@ -15481,11 +15481,13 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP arg1 = reinterpret_cast< wxPyFontEnumerator * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index 67c4ae644f..0cdfb2634e 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -1249,7 +1249,7 @@ class PyTipProvider(TipProvider): def __init__(self, *args, **kwargs): """__init__(self, size_t currentTip) -> PyTipProvider""" _misc_.PyTipProvider_swiginit(self,_misc_.new_PyTipProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyTipProvider) + PyTipProvider._setCallbackInfo(self, self, PyTipProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1277,12 +1277,12 @@ class Timer(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler owner=None, int id=ID_ANY) -> Timer""" _misc_.Timer_swiginit(self,_misc_.new_Timer(*args, **kwargs)) - self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) + self._setOORInfo(self, 0);Timer._setCallbackInfo(self, self, Timer) __swig_destroy__ = _misc_.delete_Timer __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.Timer__setCallbackInfo(*args, **kwargs) def SetOwner(*args, **kwargs): @@ -1823,7 +1823,7 @@ class PyLog(Log): def __init__(self, *args, **kwargs): """__init__(self) -> PyLog""" _misc_.PyLog_swiginit(self,_misc_.new_PyLog(*args, **kwargs)) - self._setCallbackInfo(self, PyLog) + PyLog._setCallbackInfo(self, self, PyLog) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1881,7 +1881,7 @@ class Process(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler parent=None, int id=-1) -> Process""" _misc_.Process_swiginit(self,_misc_.new_Process(*args, **kwargs)) - self._setCallbackInfo(self, Process); self.this.own(False) + Process._setCallbackInfo(self, self, Process); self.this.own(False) __swig_destroy__ = _misc_.delete_Process __del__ = lambda self : None; @@ -2650,7 +2650,7 @@ class ArtProvider(object): """ _misc_.ArtProvider_swiginit(self,_misc_.new_ArtProvider(*args, **kwargs)) - self._setCallbackInfo(self, ArtProvider) + ArtProvider._setCallbackInfo(self, self, ArtProvider) __swig_destroy__ = _misc_.delete_ArtProvider __del__ = lambda self : None; @@ -4899,7 +4899,7 @@ class PyDataObjectSimple(DataObjectSimple): """ _misc_.PyDataObjectSimple_swiginit(self,_misc_.new_PyDataObjectSimple(*args, **kwargs)) - self._setCallbackInfo(self, PyDataObjectSimple) + PyDataObjectSimple._setCallbackInfo(self, self, PyDataObjectSimple) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5048,7 +5048,7 @@ class PyTextDataObject(TextDataObject): into the data object. """ _misc_.PyTextDataObject_swiginit(self,_misc_.new_PyTextDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyTextDataObject) + PyTextDataObject._setCallbackInfo(self, self, PyTextDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5117,7 +5117,7 @@ class PyBitmapDataObject(BitmapDataObject): data on demand derive from this class and overload `GetBitmap`. """ _misc_.PyBitmapDataObject_swiginit(self,_misc_.new_PyBitmapDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyBitmapDataObject) + PyBitmapDataObject._setCallbackInfo(self, self, PyBitmapDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5278,10 +5278,10 @@ class DropSource(object): Icon none=wxNullIcon) -> DropSource """ _misc_.DropSource_swiginit(self,_misc_.new_DropSource(*args, **kwargs)) - self._setCallbackInfo(self, DropSource, 0) + DropSource._setCallbackInfo(self, self, DropSource) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.DropSource__setCallbackInfo(*args, **kwargs) __swig_destroy__ = _misc_.delete_DropSource @@ -5333,7 +5333,7 @@ class DropTarget(object): def __init__(self, *args, **kwargs): """__init__(self, DataObject dataObject=None) -> DropTarget""" _misc_.DropTarget_swiginit(self,_misc_.new_DropTarget(*args, **kwargs)) - self._setCallbackInfo(self, DropTarget) + DropTarget._setCallbackInfo(self, self, DropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5409,7 +5409,7 @@ class TextDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> TextDropTarget""" _misc_.TextDropTarget_swiginit(self,_misc_.new_TextDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, TextDropTarget) + TextDropTarget._setCallbackInfo(self, self, TextDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5478,7 +5478,7 @@ class FileDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> FileDropTarget""" _misc_.FileDropTarget_swiginit(self,_misc_.new_FileDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, FileDropTarget) + FileDropTarget._setCallbackInfo(self, self, FileDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index c7077a0039..840aee2d08 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -11540,7 +11540,7 @@ SWIGINTERN PyObject *_wrap_Timer__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyTimer *arg1 = (wxPyTimer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) 1 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33783,7 +33783,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( wxPyDropSource *arg1 = (wxPyDropSource *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33796,7 +33796,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyDropSource, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DropSource__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyDropSource *""'"); @@ -33804,11 +33804,13 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( arg1 = reinterpret_cast< wxPyDropSource * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index 44676387ff..0a8042fbd7 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -1750,7 +1750,7 @@ class PopupTransientWindow(PopupWindow): def __init__(self, *args, **kwargs): """__init__(self, Window parent, int style=BORDER_NONE) -> PopupTransientWindow""" _windows_.PopupTransientWindow_swiginit(self,_windows_.new_PopupTransientWindow(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow) + self._setOORInfo(self);PopupTransientWindow._setCallbackInfo(self, self, PopupTransientWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1811,7 +1811,7 @@ class VScrolledWindow(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> VScrolledWindow """ _windows_.VScrolledWindow_swiginit(self,_windows_.new_VScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow) + self._setOORInfo(self);VScrolledWindow._setCallbackInfo(self, self, VScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1914,7 +1914,7 @@ class VListBox(VScrolledWindow): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> VListBox """ _windows_.VListBox_swiginit(self,_windows_.new_VListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, VListBox) + self._setOORInfo(self);VListBox._setCallbackInfo(self, self, VListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2043,7 +2043,7 @@ class HtmlListBox(VListBox): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> HtmlListBox """ _windows_.HtmlListBox_swiginit(self,_windows_.new_HtmlListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox) + self._setOORInfo(self);HtmlListBox._setCallbackInfo(self, self, HtmlListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2120,12 +2120,12 @@ class TaskBarIcon(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self) -> TaskBarIcon""" _windows_.TaskBarIcon_swiginit(self,_windows_.new_TaskBarIcon(*args, **kwargs)) - self._setCallbackInfo(self, TaskBarIcon, 0) + TaskBarIcon._setCallbackInfo(self, self, TaskBarIcon) __swig_destroy__ = _windows_.delete_TaskBarIcon __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _windows_.TaskBarIcon__setCallbackInfo(*args, **kwargs) def Destroy(*args, **kwargs): @@ -3318,7 +3318,7 @@ class PyWindow(_core.Window): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ _windows_.PyWindow_swiginit(self,_windows_.new_PyWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyWindow) + self._setOORInfo(self);PyWindow._setCallbackInfo(self, self, PyWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3495,7 +3495,7 @@ class PyPanel(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ _windows_.PyPanel_swiginit(self,_windows_.new_PyPanel(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyPanel) + self._setOORInfo(self);PyPanel._setCallbackInfo(self, self, PyPanel) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3672,7 +3672,7 @@ class PyScrolledWindow(ScrolledWindow): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ _windows_.PyScrolledWindow_swiginit(self,_windows_.new_PyScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyScrolledWindow) + self._setOORInfo(self);PyScrolledWindow._setCallbackInfo(self, self, PyScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4426,7 +4426,7 @@ class Printout(_core.Object): def __init__(self, *args, **kwargs): """__init__(self, String title=PrintoutTitleStr) -> Printout""" _windows_.Printout_swiginit(self,_windows_.new_Printout(*args, **kwargs)) - self._setCallbackInfo(self, Printout) + Printout._setCallbackInfo(self, self, Printout) __swig_destroy__ = _windows_.delete_Printout __del__ = lambda self : None; @@ -4843,7 +4843,7 @@ class PyPrintPreview(PrintPreview): __init__(self, Printout printout, Printout printoutForPrinting, PrintData data) -> PyPrintPreview """ _windows_.PyPrintPreview_swiginit(self,_windows_.new_PyPrintPreview(*args)) - self._setCallbackInfo(self, PyPrintPreview) + PyPrintPreview._setCallbackInfo(self, self, PyPrintPreview) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4897,7 +4897,7 @@ class PyPreviewFrame(PreviewFrame): long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> PyPreviewFrame """ _windows_.PyPreviewFrame_swiginit(self,_windows_.new_PyPreviewFrame(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewFrame._setCallbackInfo(self, self, PyPreviewFrame) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4951,7 +4951,7 @@ class PyPreviewControlBar(PreviewControlBar): long style=0, String name=PanelNameStr) -> PyPreviewControlBar """ _windows_.PyPreviewControlBar_swiginit(self,_windows_.new_PyPreviewControlBar(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewControlBar._setCallbackInfo(self, self, PyPreviewControlBar) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index 0722e4f099..3f281a6a88 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -16319,7 +16319,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyTaskBarIcon *arg1 = (wxPyTaskBarIcon *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -16332,7 +16332,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTaskBarIcon, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyTaskBarIcon *""'"); @@ -16340,11 +16340,13 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM arg1 = reinterpret_cast< wxPyTaskBarIcon * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 258f4b14a4..4c0838bf04 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -135,7 +135,7 @@ class PyGridCellRenderer(GridCellRenderer): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellRenderer""" _grid.PyGridCellRenderer_swiginit(self,_grid.new_PyGridCellRenderer(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellRenderer._setCallbackInfo(self, self, PyGridCellRenderer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -336,7 +336,7 @@ class PyGridCellEditor(GridCellEditor): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellEditor""" _grid.PyGridCellEditor_swiginit(self,_grid.new_PyGridCellEditor(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellEditor._setCallbackInfo(self, self, PyGridCellEditor) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -702,7 +702,7 @@ class PyGridCellAttrProvider(GridCellAttrProvider): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellAttrProvider""" _grid.PyGridCellAttrProvider_swiginit(self,_grid.new_PyGridCellAttrProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellAttrProvider) + PyGridCellAttrProvider._setCallbackInfo(self, self, PyGridCellAttrProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -906,7 +906,7 @@ class PyGridTableBase(GridTableBase): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridTableBase""" _grid.PyGridTableBase_swiginit(self,_grid.new_PyGridTableBase(*args, **kwargs)) - self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self) + self._setOORInfo(self);PyGridTableBase._setCallbackInfo(self, self, PyGridTableBase) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index f237461920..d7fbfda36b 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -391,7 +391,7 @@ class HtmlTagHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlTagHandler""" _html.HtmlTagHandler_swiginit(self,_html.new_HtmlTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlTagHandler) + HtmlTagHandler._setCallbackInfo(self, self, HtmlTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -419,7 +419,7 @@ class HtmlWinTagHandler(HtmlTagHandler): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlWinTagHandler""" _html.HtmlWinTagHandler_swiginit(self,_html.new_HtmlWinTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWinTagHandler) + HtmlWinTagHandler._setCallbackInfo(self, self, HtmlWinTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -920,7 +920,7 @@ class HtmlFilter(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlFilter""" _html.HtmlFilter_swiginit(self,_html.new_HtmlFilter(*args, **kwargs)) - self._setCallbackInfo(self, HtmlFilter) + HtmlFilter._setCallbackInfo(self, self, HtmlFilter) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -983,7 +983,7 @@ class HtmlWindow(_windows.ScrolledWindow): String name=HtmlWindowNameStr) -> HtmlWindow """ _html.HtmlWindow_swiginit(self,_html.new_HtmlWindow(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self) + self._setOORInfo(self);HtmlWindow._setCallbackInfo(self, self, HtmlWindow) def Create(*args, **kwargs): """ diff --git a/wxPython/src/gtk/wizard.py b/wxPython/src/gtk/wizard.py index f2972ae91a..e9f8e55957 100644 --- a/wxPython/src/gtk/wizard.py +++ b/wxPython/src/gtk/wizard.py @@ -127,7 +127,7 @@ class PyWizardPage(WizardPage): def __init__(self, *args, **kwargs): """__init__(self, Wizard parent, Bitmap bitmap=&wxNullBitmap, String resource=&wxPyEmptyString) -> PyWizardPage""" _wizard.PyWizardPage_swiginit(self,_wizard.new_PyWizardPage(*args, **kwargs)) - self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self) + self._setOORInfo(self);PyWizardPage._setCallbackInfo(self, self, PyWizardPage) def Create(*args, **kwargs): """Create(self, Wizard parent, Bitmap bitmap=wxNullBitmap, String resource=EmptyString) -> bool""" diff --git a/wxPython/src/gtk/xrc.py b/wxPython/src/gtk/xrc.py index 5bbd09e39e..6bee8d35af 100644 --- a/wxPython/src/gtk/xrc.py +++ b/wxPython/src/gtk/xrc.py @@ -262,7 +262,7 @@ class XmlSubclassFactory(object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlSubclassFactory""" _xrc.XmlSubclassFactory_swiginit(self,_xrc.new_XmlSubclassFactory(*args, **kwargs)) - self._setCallbackInfo(self, XmlSubclassFactory) + XmlSubclassFactory._setCallbackInfo(self, self, XmlSubclassFactory) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -535,7 +535,7 @@ class XmlResourceHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlResourceHandler""" _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs)) - self._setCallbackInfo(self, XmlResourceHandler) + XmlResourceHandler._setCallbackInfo(self, self, XmlResourceHandler) __swig_destroy__ = _xrc.delete_XmlResourceHandler __del__ = lambda self : None; diff --git a/wxPython/src/html.i b/wxPython/src/html.i index ba3f6c8d6d..28afc3d5fb 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -293,7 +293,7 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); %rename(HtmlTagHandler) wxPyHtmlTagHandler; class wxPyHtmlTagHandler : public wxObject { public: - %pythonAppend wxPyHtmlTagHandler "self._setCallbackInfo(self, HtmlTagHandler)" + %pythonAppend wxPyHtmlTagHandler setCallbackInfo(HtmlTagHandler) wxPyHtmlTagHandler(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -334,7 +334,7 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleT %rename(HtmlWinTagHandler) wxPyHtmlWinTagHandler; class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler { public: - %pythonAppend wxPyHtmlWinTagHandler "self._setCallbackInfo(self, HtmlWinTagHandler)" + %pythonAppend wxPyHtmlWinTagHandler setCallbackInfo(HtmlWinTagHandler) wxPyHtmlWinTagHandler(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -798,7 +798,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter); %rename(HtmlFilter) wxPyHtmlFilter; class wxPyHtmlFilter : public wxObject { public: - %pythonAppend wxPyHtmlFilter "self._setCallbackInfo(self, HtmlFilter)" + %pythonAppend wxPyHtmlFilter setCallbackInfo(HtmlFilter) wxPyHtmlFilter(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -996,7 +996,7 @@ class wxPyHtmlWindow : public wxScrolledWindow //, // public wxHtmlWindowMouseHelper { public: - %pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)" + %pythonAppend wxPyHtmlWindow "self._setOORInfo(self);" setCallbackInfo(HtmlWindow) %pythonAppend wxPyHtmlWindow() "" %typemap(out) wxPyHtmlWindow*; // turn off this typemap diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 40cff78a71..0cf4029560 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -4448,7 +4448,7 @@ class ListCtrl(_core.Control): Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl """ _controls_.ListCtrl_swiginit(self,_controls_.new_ListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl) + self._setOORInfo(self);ListCtrl._setCallbackInfo(self, self, ListCtrl) def Create(*args, **kwargs): """ @@ -5171,7 +5171,7 @@ class TreeCtrl(_core.Control): String name=TreeCtrlNameStr) -> TreeCtrl """ _controls_.TreeCtrl_swiginit(self,_controls_.new_TreeCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl) + self._setOORInfo(self);TreeCtrl._setCallbackInfo(self, self, TreeCtrl) def Create(*args, **kwargs): """ @@ -5733,7 +5733,7 @@ class PyControl(_core.Control): String name=ControlNameStr) -> PyControl """ _controls_.PyControl_swiginit(self,_controls_.new_PyControl(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyControl) + self._setOORInfo(self);PyControl._setCallbackInfo(self, self, PyControl) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 69a2d040b3..10dfdcf105 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -3067,7 +3067,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); -IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); +IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); SWIGINTERN wxListItem *wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col){ diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 6bee06db91..27f94c41b5 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -2070,7 +2070,7 @@ class FileSystemHandler(CPPFileSystemHandler): def __init__(self, *args, **kwargs): """__init__(self) -> FileSystemHandler""" _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) - self._setCallbackInfo(self, FileSystemHandler) + FileSystemHandler._setCallbackInfo(self, self, FileSystemHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -7007,13 +7007,12 @@ class PyApp(EvtHandler): Create a new application object, starting the bootstrap process. """ _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) - self._setCallbackInfo(self, PyApp, False) - self._setOORInfo(self, False) + self._setOORInfo(self, False);PyApp._setCallbackInfo(self, self, PyApp) __swig_destroy__ = _core_.delete_PyApp __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref=False)""" return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): @@ -10332,7 +10331,7 @@ class Window(EvtHandler): if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) def SendSizeEvent(self): self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1))) @@ -10601,12 +10600,10 @@ class PyValidator(Validator): def __init__(self, *args, **kwargs): """__init__(self) -> PyValidator""" _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) - - self._setCallbackInfo(self, PyValidator, 1) - self._setOORInfo(self) + self._setOORInfo(self);PyValidator._setCallbackInfo(self, self, PyValidator) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" return _core_.PyValidator__setCallbackInfo(*args, **kwargs) _core_.PyValidator_swigregister(PyValidator) @@ -12432,7 +12429,7 @@ class PySizer(Sizer): class. """ _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) - self._setCallbackInfo(self, PySizer);self._setOORInfo(self) + self._setOORInfo(self);PySizer._setCallbackInfo(self, self, PySizer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 4a19fb8e84..cd66e31019 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -29955,7 +29955,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyApp *arg1 = (wxPyApp *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + bool arg4 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; bool val4 ; @@ -29968,7 +29968,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyApp, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyApp__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyApp *""'"); @@ -29976,11 +29976,13 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxPyApp * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); @@ -41523,7 +41525,7 @@ SWIGINTERN PyObject *_wrap_PyValidator__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyValidator *arg1 = (wxPyValidator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) true ; + int arg4 = (int) 1 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index fb70ed338f..b6b3a2fcfe 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -2316,12 +2316,12 @@ class FontEnumerator(object): def __init__(self, *args, **kwargs): """__init__(self) -> FontEnumerator""" _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs)) - self._setCallbackInfo(self, FontEnumerator, 0) + FontEnumerator._setCallbackInfo(self, self, FontEnumerator) __swig_destroy__ = _gdi_.delete_FontEnumerator __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs) def EnumerateFacenames(*args, **kwargs): @@ -2783,7 +2783,7 @@ class PyLocale(Locale): def __init__(self, *args, **kwargs): """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale""" _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs)) - self._setCallbackInfo(self, PyLocale) + PyLocale._setCallbackInfo(self, self, PyLocale) __swig_destroy__ = _gdi_.delete_PyLocale __del__ = lambda self : None; diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 61ee0f5e74..dc336d5b32 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -15445,10 +15445,10 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP wxPyFontEnumerator *arg1 = (wxPyFontEnumerator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -15458,7 +15458,7 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyFontEnumerator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyFontEnumerator *""'"); @@ -15466,11 +15466,13 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP arg1 = reinterpret_cast< wxPyFontEnumerator * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index a708414fbc..e2d49cd281 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -1249,7 +1249,7 @@ class PyTipProvider(TipProvider): def __init__(self, *args, **kwargs): """__init__(self, size_t currentTip) -> PyTipProvider""" _misc_.PyTipProvider_swiginit(self,_misc_.new_PyTipProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyTipProvider) + PyTipProvider._setCallbackInfo(self, self, PyTipProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1277,12 +1277,12 @@ class Timer(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler owner=None, int id=ID_ANY) -> Timer""" _misc_.Timer_swiginit(self,_misc_.new_Timer(*args, **kwargs)) - self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) + self._setOORInfo(self, 0);Timer._setCallbackInfo(self, self, Timer) __swig_destroy__ = _misc_.delete_Timer __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.Timer__setCallbackInfo(*args, **kwargs) def SetOwner(*args, **kwargs): @@ -1823,7 +1823,7 @@ class PyLog(Log): def __init__(self, *args, **kwargs): """__init__(self) -> PyLog""" _misc_.PyLog_swiginit(self,_misc_.new_PyLog(*args, **kwargs)) - self._setCallbackInfo(self, PyLog) + PyLog._setCallbackInfo(self, self, PyLog) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1881,7 +1881,7 @@ class Process(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler parent=None, int id=-1) -> Process""" _misc_.Process_swiginit(self,_misc_.new_Process(*args, **kwargs)) - self._setCallbackInfo(self, Process); self.this.own(False) + Process._setCallbackInfo(self, self, Process); self.this.own(False) __swig_destroy__ = _misc_.delete_Process __del__ = lambda self : None; @@ -2650,7 +2650,7 @@ class ArtProvider(object): """ _misc_.ArtProvider_swiginit(self,_misc_.new_ArtProvider(*args, **kwargs)) - self._setCallbackInfo(self, ArtProvider) + ArtProvider._setCallbackInfo(self, self, ArtProvider) __swig_destroy__ = _misc_.delete_ArtProvider __del__ = lambda self : None; @@ -4899,7 +4899,7 @@ class PyDataObjectSimple(DataObjectSimple): """ _misc_.PyDataObjectSimple_swiginit(self,_misc_.new_PyDataObjectSimple(*args, **kwargs)) - self._setCallbackInfo(self, PyDataObjectSimple) + PyDataObjectSimple._setCallbackInfo(self, self, PyDataObjectSimple) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5048,7 +5048,7 @@ class PyTextDataObject(TextDataObject): into the data object. """ _misc_.PyTextDataObject_swiginit(self,_misc_.new_PyTextDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyTextDataObject) + PyTextDataObject._setCallbackInfo(self, self, PyTextDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5117,7 +5117,7 @@ class PyBitmapDataObject(BitmapDataObject): data on demand derive from this class and overload `GetBitmap`. """ _misc_.PyBitmapDataObject_swiginit(self,_misc_.new_PyBitmapDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyBitmapDataObject) + PyBitmapDataObject._setCallbackInfo(self, self, PyBitmapDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5286,10 +5286,10 @@ class DropSource(object): Cursor none=wxNullCursor) -> DropSource """ _misc_.DropSource_swiginit(self,_misc_.new_DropSource(*args, **kwargs)) - self._setCallbackInfo(self, DropSource, 0) + DropSource._setCallbackInfo(self, self, DropSource) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.DropSource__setCallbackInfo(*args, **kwargs) __swig_destroy__ = _misc_.delete_DropSource @@ -5341,7 +5341,7 @@ class DropTarget(object): def __init__(self, *args, **kwargs): """__init__(self, DataObject dataObject=None) -> DropTarget""" _misc_.DropTarget_swiginit(self,_misc_.new_DropTarget(*args, **kwargs)) - self._setCallbackInfo(self, DropTarget) + DropTarget._setCallbackInfo(self, self, DropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5417,7 +5417,7 @@ class TextDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> TextDropTarget""" _misc_.TextDropTarget_swiginit(self,_misc_.new_TextDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, TextDropTarget) + TextDropTarget._setCallbackInfo(self, self, TextDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5486,7 +5486,7 @@ class FileDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> FileDropTarget""" _misc_.FileDropTarget_swiginit(self,_misc_.new_FileDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, FileDropTarget) + FileDropTarget._setCallbackInfo(self, self, FileDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index aa5c1d1952..2d9d8c8f7b 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -11532,7 +11532,7 @@ SWIGINTERN PyObject *_wrap_Timer__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyTimer *arg1 = (wxPyTimer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) 1 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33844,7 +33844,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( wxPyDropSource *arg1 = (wxPyDropSource *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33857,7 +33857,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyDropSource, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DropSource__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyDropSource *""'"); @@ -33865,11 +33865,13 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( arg1 = reinterpret_cast< wxPyDropSource * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index c93e92f519..6889b3be2a 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -1791,7 +1791,7 @@ class VScrolledWindow(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> VScrolledWindow """ _windows_.VScrolledWindow_swiginit(self,_windows_.new_VScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow) + self._setOORInfo(self);VScrolledWindow._setCallbackInfo(self, self, VScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1894,7 +1894,7 @@ class VListBox(VScrolledWindow): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> VListBox """ _windows_.VListBox_swiginit(self,_windows_.new_VListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, VListBox) + self._setOORInfo(self);VListBox._setCallbackInfo(self, self, VListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2023,7 +2023,7 @@ class HtmlListBox(VListBox): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> HtmlListBox """ _windows_.HtmlListBox_swiginit(self,_windows_.new_HtmlListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox) + self._setOORInfo(self);HtmlListBox._setCallbackInfo(self, self, HtmlListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2100,12 +2100,12 @@ class TaskBarIcon(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self) -> TaskBarIcon""" _windows_.TaskBarIcon_swiginit(self,_windows_.new_TaskBarIcon(*args, **kwargs)) - self._setCallbackInfo(self, TaskBarIcon, 0) + TaskBarIcon._setCallbackInfo(self, self, TaskBarIcon) __swig_destroy__ = _windows_.delete_TaskBarIcon __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _windows_.TaskBarIcon__setCallbackInfo(*args, **kwargs) def Destroy(*args, **kwargs): @@ -3298,7 +3298,7 @@ class PyWindow(_core.Window): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ _windows_.PyWindow_swiginit(self,_windows_.new_PyWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyWindow) + self._setOORInfo(self);PyWindow._setCallbackInfo(self, self, PyWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3475,7 +3475,7 @@ class PyPanel(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ _windows_.PyPanel_swiginit(self,_windows_.new_PyPanel(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyPanel) + self._setOORInfo(self);PyPanel._setCallbackInfo(self, self, PyPanel) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3652,7 +3652,7 @@ class PyScrolledWindow(ScrolledWindow): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ _windows_.PyScrolledWindow_swiginit(self,_windows_.new_PyScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyScrolledWindow) + self._setOORInfo(self);PyScrolledWindow._setCallbackInfo(self, self, PyScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4406,7 +4406,7 @@ class Printout(_core.Object): def __init__(self, *args, **kwargs): """__init__(self, String title=PrintoutTitleStr) -> Printout""" _windows_.Printout_swiginit(self,_windows_.new_Printout(*args, **kwargs)) - self._setCallbackInfo(self, Printout) + Printout._setCallbackInfo(self, self, Printout) __swig_destroy__ = _windows_.delete_Printout __del__ = lambda self : None; @@ -4823,7 +4823,7 @@ class PyPrintPreview(PrintPreview): __init__(self, Printout printout, Printout printoutForPrinting, PrintData data) -> PyPrintPreview """ _windows_.PyPrintPreview_swiginit(self,_windows_.new_PyPrintPreview(*args)) - self._setCallbackInfo(self, PyPrintPreview) + PyPrintPreview._setCallbackInfo(self, self, PyPrintPreview) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4877,7 +4877,7 @@ class PyPreviewFrame(PreviewFrame): long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> PyPreviewFrame """ _windows_.PyPreviewFrame_swiginit(self,_windows_.new_PyPreviewFrame(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewFrame._setCallbackInfo(self, self, PyPreviewFrame) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4931,7 +4931,7 @@ class PyPreviewControlBar(PreviewControlBar): long style=0, String name=PanelNameStr) -> PyPreviewControlBar """ _windows_.PyPreviewControlBar_swiginit(self,_windows_.new_PyPreviewControlBar(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewControlBar._setCallbackInfo(self, self, PyPreviewControlBar) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index a92913ca5d..66ddcffbb4 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -16183,7 +16183,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyTaskBarIcon *arg1 = (wxPyTaskBarIcon *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -16196,7 +16196,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTaskBarIcon, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyTaskBarIcon *""'"); @@ -16204,11 +16204,13 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM arg1 = reinterpret_cast< wxPyTaskBarIcon * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 258f4b14a4..4c0838bf04 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -135,7 +135,7 @@ class PyGridCellRenderer(GridCellRenderer): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellRenderer""" _grid.PyGridCellRenderer_swiginit(self,_grid.new_PyGridCellRenderer(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellRenderer._setCallbackInfo(self, self, PyGridCellRenderer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -336,7 +336,7 @@ class PyGridCellEditor(GridCellEditor): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellEditor""" _grid.PyGridCellEditor_swiginit(self,_grid.new_PyGridCellEditor(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellEditor._setCallbackInfo(self, self, PyGridCellEditor) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -702,7 +702,7 @@ class PyGridCellAttrProvider(GridCellAttrProvider): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellAttrProvider""" _grid.PyGridCellAttrProvider_swiginit(self,_grid.new_PyGridCellAttrProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellAttrProvider) + PyGridCellAttrProvider._setCallbackInfo(self, self, PyGridCellAttrProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -906,7 +906,7 @@ class PyGridTableBase(GridTableBase): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridTableBase""" _grid.PyGridTableBase_swiginit(self,_grid.new_PyGridTableBase(*args, **kwargs)) - self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self) + self._setOORInfo(self);PyGridTableBase._setCallbackInfo(self, self, PyGridTableBase) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/mac/html.py b/wxPython/src/mac/html.py index f237461920..d7fbfda36b 100644 --- a/wxPython/src/mac/html.py +++ b/wxPython/src/mac/html.py @@ -391,7 +391,7 @@ class HtmlTagHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlTagHandler""" _html.HtmlTagHandler_swiginit(self,_html.new_HtmlTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlTagHandler) + HtmlTagHandler._setCallbackInfo(self, self, HtmlTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -419,7 +419,7 @@ class HtmlWinTagHandler(HtmlTagHandler): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlWinTagHandler""" _html.HtmlWinTagHandler_swiginit(self,_html.new_HtmlWinTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWinTagHandler) + HtmlWinTagHandler._setCallbackInfo(self, self, HtmlWinTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -920,7 +920,7 @@ class HtmlFilter(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlFilter""" _html.HtmlFilter_swiginit(self,_html.new_HtmlFilter(*args, **kwargs)) - self._setCallbackInfo(self, HtmlFilter) + HtmlFilter._setCallbackInfo(self, self, HtmlFilter) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -983,7 +983,7 @@ class HtmlWindow(_windows.ScrolledWindow): String name=HtmlWindowNameStr) -> HtmlWindow """ _html.HtmlWindow_swiginit(self,_html.new_HtmlWindow(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self) + self._setOORInfo(self);HtmlWindow._setCallbackInfo(self, self, HtmlWindow) def Create(*args, **kwargs): """ diff --git a/wxPython/src/mac/wizard.py b/wxPython/src/mac/wizard.py index f2972ae91a..e9f8e55957 100644 --- a/wxPython/src/mac/wizard.py +++ b/wxPython/src/mac/wizard.py @@ -127,7 +127,7 @@ class PyWizardPage(WizardPage): def __init__(self, *args, **kwargs): """__init__(self, Wizard parent, Bitmap bitmap=&wxNullBitmap, String resource=&wxPyEmptyString) -> PyWizardPage""" _wizard.PyWizardPage_swiginit(self,_wizard.new_PyWizardPage(*args, **kwargs)) - self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self) + self._setOORInfo(self);PyWizardPage._setCallbackInfo(self, self, PyWizardPage) def Create(*args, **kwargs): """Create(self, Wizard parent, Bitmap bitmap=wxNullBitmap, String resource=EmptyString) -> bool""" diff --git a/wxPython/src/mac/xrc.py b/wxPython/src/mac/xrc.py index 5bbd09e39e..6bee8d35af 100644 --- a/wxPython/src/mac/xrc.py +++ b/wxPython/src/mac/xrc.py @@ -262,7 +262,7 @@ class XmlSubclassFactory(object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlSubclassFactory""" _xrc.XmlSubclassFactory_swiginit(self,_xrc.new_XmlSubclassFactory(*args, **kwargs)) - self._setCallbackInfo(self, XmlSubclassFactory) + XmlSubclassFactory._setCallbackInfo(self, self, XmlSubclassFactory) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -535,7 +535,7 @@ class XmlResourceHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlResourceHandler""" _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs)) - self._setCallbackInfo(self, XmlResourceHandler) + XmlResourceHandler._setCallbackInfo(self, self, XmlResourceHandler) __swig_destroy__ = _xrc.delete_XmlResourceHandler __del__ = lambda self : None; diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 139f436059..6e57913de9 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -4463,7 +4463,7 @@ class ListCtrl(_core.Control): Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl """ _controls_.ListCtrl_swiginit(self,_controls_.new_ListCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl) + self._setOORInfo(self);ListCtrl._setCallbackInfo(self, self, ListCtrl) def Create(*args, **kwargs): """ @@ -5185,7 +5185,7 @@ class TreeCtrl(_core.Control): String name=TreeCtrlNameStr) -> TreeCtrl """ _controls_.TreeCtrl_swiginit(self,_controls_.new_TreeCtrl(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl) + self._setOORInfo(self);TreeCtrl._setCallbackInfo(self, self, TreeCtrl) def Create(*args, **kwargs): """ @@ -5759,7 +5759,7 @@ class PyControl(_core.Control): String name=ControlNameStr) -> PyControl """ _controls_.PyControl_swiginit(self,_controls_.new_PyControl(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyControl) + self._setOORInfo(self);PyControl._setCallbackInfo(self, self, PyControl) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 68a17b1d67..ddb9bb08eb 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -3067,7 +3067,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); -IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); +IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); SWIGINTERN wxListItem *wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col){ diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 6b80b9fb50..216fc30986 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -2070,7 +2070,7 @@ class FileSystemHandler(CPPFileSystemHandler): def __init__(self, *args, **kwargs): """__init__(self) -> FileSystemHandler""" _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) - self._setCallbackInfo(self, FileSystemHandler) + FileSystemHandler._setCallbackInfo(self, self, FileSystemHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -7007,13 +7007,12 @@ class PyApp(EvtHandler): Create a new application object, starting the bootstrap process. """ _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) - self._setCallbackInfo(self, PyApp, False) - self._setOORInfo(self, False) + self._setOORInfo(self, False);PyApp._setCallbackInfo(self, self, PyApp) __swig_destroy__ = _core_.delete_PyApp __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref=False)""" return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): @@ -10336,7 +10335,7 @@ class Window(EvtHandler): if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) def SendSizeEvent(self): self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1))) @@ -10605,12 +10604,10 @@ class PyValidator(Validator): def __init__(self, *args, **kwargs): """__init__(self) -> PyValidator""" _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) - - self._setCallbackInfo(self, PyValidator, 1) - self._setOORInfo(self) + self._setOORInfo(self);PyValidator._setCallbackInfo(self, self, PyValidator) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" return _core_.PyValidator__setCallbackInfo(*args, **kwargs) _core_.PyValidator_swigregister(PyValidator) @@ -12436,7 +12433,7 @@ class PySizer(Sizer): class. """ _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) - self._setCallbackInfo(self, PySizer);self._setOORInfo(self) + self._setOORInfo(self);PySizer._setCallbackInfo(self, self, PySizer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 48593244f2..e9d9d3256d 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -29940,7 +29940,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyApp *arg1 = (wxPyApp *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + bool arg4 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; bool val4 ; @@ -29953,7 +29953,7 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:PyApp__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyApp, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyApp__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyApp *""'"); @@ -29961,11 +29961,13 @@ SWIGINTERN PyObject *_wrap_PyApp__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxPyApp * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PyApp__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); @@ -41549,7 +41551,7 @@ SWIGINTERN PyObject *_wrap_PyValidator__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyValidator *arg1 = (wxPyValidator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) true ; + int arg4 = (int) 1 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index aa6ca27e52..d46b6526a1 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -2406,12 +2406,12 @@ class FontEnumerator(object): def __init__(self, *args, **kwargs): """__init__(self) -> FontEnumerator""" _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs)) - self._setCallbackInfo(self, FontEnumerator, 0) + FontEnumerator._setCallbackInfo(self, self, FontEnumerator) __swig_destroy__ = _gdi_.delete_FontEnumerator __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs) def EnumerateFacenames(*args, **kwargs): @@ -2873,7 +2873,7 @@ class PyLocale(Locale): def __init__(self, *args, **kwargs): """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale""" _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs)) - self._setCallbackInfo(self, PyLocale) + PyLocale._setCallbackInfo(self, self, PyLocale) __swig_destroy__ = _gdi_.delete_PyLocale __del__ = lambda self : None; diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index 717bad2de6..4cd3c8315a 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -16120,10 +16120,10 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP wxPyFontEnumerator *arg1 = (wxPyFontEnumerator *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - bool arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -16133,7 +16133,7 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:FontEnumerator__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyFontEnumerator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyFontEnumerator *""'"); @@ -16141,11 +16141,13 @@ SWIGINTERN PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *SWIGUNUSEDP arg1 = reinterpret_cast< wxPyFontEnumerator * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FontEnumerator__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index a708414fbc..e2d49cd281 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -1249,7 +1249,7 @@ class PyTipProvider(TipProvider): def __init__(self, *args, **kwargs): """__init__(self, size_t currentTip) -> PyTipProvider""" _misc_.PyTipProvider_swiginit(self,_misc_.new_PyTipProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyTipProvider) + PyTipProvider._setCallbackInfo(self, self, PyTipProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1277,12 +1277,12 @@ class Timer(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler owner=None, int id=ID_ANY) -> Timer""" _misc_.Timer_swiginit(self,_misc_.new_Timer(*args, **kwargs)) - self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) + self._setOORInfo(self, 0);Timer._setCallbackInfo(self, self, Timer) __swig_destroy__ = _misc_.delete_Timer __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.Timer__setCallbackInfo(*args, **kwargs) def SetOwner(*args, **kwargs): @@ -1823,7 +1823,7 @@ class PyLog(Log): def __init__(self, *args, **kwargs): """__init__(self) -> PyLog""" _misc_.PyLog_swiginit(self,_misc_.new_PyLog(*args, **kwargs)) - self._setCallbackInfo(self, PyLog) + PyLog._setCallbackInfo(self, self, PyLog) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1881,7 +1881,7 @@ class Process(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler parent=None, int id=-1) -> Process""" _misc_.Process_swiginit(self,_misc_.new_Process(*args, **kwargs)) - self._setCallbackInfo(self, Process); self.this.own(False) + Process._setCallbackInfo(self, self, Process); self.this.own(False) __swig_destroy__ = _misc_.delete_Process __del__ = lambda self : None; @@ -2650,7 +2650,7 @@ class ArtProvider(object): """ _misc_.ArtProvider_swiginit(self,_misc_.new_ArtProvider(*args, **kwargs)) - self._setCallbackInfo(self, ArtProvider) + ArtProvider._setCallbackInfo(self, self, ArtProvider) __swig_destroy__ = _misc_.delete_ArtProvider __del__ = lambda self : None; @@ -4899,7 +4899,7 @@ class PyDataObjectSimple(DataObjectSimple): """ _misc_.PyDataObjectSimple_swiginit(self,_misc_.new_PyDataObjectSimple(*args, **kwargs)) - self._setCallbackInfo(self, PyDataObjectSimple) + PyDataObjectSimple._setCallbackInfo(self, self, PyDataObjectSimple) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5048,7 +5048,7 @@ class PyTextDataObject(TextDataObject): into the data object. """ _misc_.PyTextDataObject_swiginit(self,_misc_.new_PyTextDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyTextDataObject) + PyTextDataObject._setCallbackInfo(self, self, PyTextDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5117,7 +5117,7 @@ class PyBitmapDataObject(BitmapDataObject): data on demand derive from this class and overload `GetBitmap`. """ _misc_.PyBitmapDataObject_swiginit(self,_misc_.new_PyBitmapDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyBitmapDataObject) + PyBitmapDataObject._setCallbackInfo(self, self, PyBitmapDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5286,10 +5286,10 @@ class DropSource(object): Cursor none=wxNullCursor) -> DropSource """ _misc_.DropSource_swiginit(self,_misc_.new_DropSource(*args, **kwargs)) - self._setCallbackInfo(self, DropSource, 0) + DropSource._setCallbackInfo(self, self, DropSource) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.DropSource__setCallbackInfo(*args, **kwargs) __swig_destroy__ = _misc_.delete_DropSource @@ -5341,7 +5341,7 @@ class DropTarget(object): def __init__(self, *args, **kwargs): """__init__(self, DataObject dataObject=None) -> DropTarget""" _misc_.DropTarget_swiginit(self,_misc_.new_DropTarget(*args, **kwargs)) - self._setCallbackInfo(self, DropTarget) + DropTarget._setCallbackInfo(self, self, DropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5417,7 +5417,7 @@ class TextDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> TextDropTarget""" _misc_.TextDropTarget_swiginit(self,_misc_.new_TextDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, TextDropTarget) + TextDropTarget._setCallbackInfo(self, self, TextDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5486,7 +5486,7 @@ class FileDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> FileDropTarget""" _misc_.FileDropTarget_swiginit(self,_misc_.new_FileDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, FileDropTarget) + FileDropTarget._setCallbackInfo(self, self, FileDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 0f157ff359..2ff4fe6de9 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -11532,7 +11532,7 @@ SWIGINTERN PyObject *_wrap_Timer__setCallbackInfo(PyObject *SWIGUNUSEDPARM(self) wxPyTimer *arg1 = (wxPyTimer *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 = (int) 1 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33844,7 +33844,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( wxPyDropSource *arg1 = (wxPyDropSource *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -33857,7 +33857,7 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DropSource__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyDropSource, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DropSource__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyDropSource *""'"); @@ -33865,11 +33865,13 @@ SWIGINTERN PyObject *_wrap_DropSource__setCallbackInfo(PyObject *SWIGUNUSEDPARM( arg1 = reinterpret_cast< wxPyDropSource * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DropSource__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index b63226efe3..83fd5b92c7 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -1758,7 +1758,7 @@ class PopupTransientWindow(PopupWindow): def __init__(self, *args, **kwargs): """__init__(self, Window parent, int style=BORDER_NONE) -> PopupTransientWindow""" _windows_.PopupTransientWindow_swiginit(self,_windows_.new_PopupTransientWindow(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow) + self._setOORInfo(self);PopupTransientWindow._setCallbackInfo(self, self, PopupTransientWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1819,7 +1819,7 @@ class VScrolledWindow(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> VScrolledWindow """ _windows_.VScrolledWindow_swiginit(self,_windows_.new_VScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow) + self._setOORInfo(self);VScrolledWindow._setCallbackInfo(self, self, VScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1922,7 +1922,7 @@ class VListBox(VScrolledWindow): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> VListBox """ _windows_.VListBox_swiginit(self,_windows_.new_VListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, VListBox) + self._setOORInfo(self);VListBox._setCallbackInfo(self, self, VListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2051,7 +2051,7 @@ class HtmlListBox(VListBox): Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> HtmlListBox """ _windows_.HtmlListBox_swiginit(self,_windows_.new_HtmlListBox(*args, **kwargs)) - self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox) + self._setOORInfo(self);HtmlListBox._setCallbackInfo(self, self, HtmlListBox) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -2128,12 +2128,12 @@ class TaskBarIcon(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self) -> TaskBarIcon""" _windows_.TaskBarIcon_swiginit(self,_windows_.new_TaskBarIcon(*args, **kwargs)) - self._setCallbackInfo(self, TaskBarIcon, 0) + TaskBarIcon._setCallbackInfo(self, self, TaskBarIcon) __swig_destroy__ = _windows_.delete_TaskBarIcon __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _windows_.TaskBarIcon__setCallbackInfo(*args, **kwargs) def Destroy(*args, **kwargs): @@ -3334,7 +3334,7 @@ class PyWindow(_core.Window): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ _windows_.PyWindow_swiginit(self,_windows_.new_PyWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyWindow) + self._setOORInfo(self);PyWindow._setCallbackInfo(self, self, PyWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3511,7 +3511,7 @@ class PyPanel(Panel): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ _windows_.PyPanel_swiginit(self,_windows_.new_PyPanel(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyPanel) + self._setOORInfo(self);PyPanel._setCallbackInfo(self, self, PyPanel) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3688,7 +3688,7 @@ class PyScrolledWindow(ScrolledWindow): Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ _windows_.PyScrolledWindow_swiginit(self,_windows_.new_PyScrolledWindow(*args, **kwargs)) - self._setOORInfo(self); self._setCallbackInfo(self, PyScrolledWindow) + self._setOORInfo(self);PyScrolledWindow._setCallbackInfo(self, self, PyScrolledWindow) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4442,7 +4442,7 @@ class Printout(_core.Object): def __init__(self, *args, **kwargs): """__init__(self, String title=PrintoutTitleStr) -> Printout""" _windows_.Printout_swiginit(self,_windows_.new_Printout(*args, **kwargs)) - self._setCallbackInfo(self, Printout) + Printout._setCallbackInfo(self, self, Printout) __swig_destroy__ = _windows_.delete_Printout __del__ = lambda self : None; @@ -4859,7 +4859,7 @@ class PyPrintPreview(PrintPreview): __init__(self, Printout printout, Printout printoutForPrinting, PrintData data) -> PyPrintPreview """ _windows_.PyPrintPreview_swiginit(self,_windows_.new_PyPrintPreview(*args)) - self._setCallbackInfo(self, PyPrintPreview) + PyPrintPreview._setCallbackInfo(self, self, PyPrintPreview) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4913,7 +4913,7 @@ class PyPreviewFrame(PreviewFrame): long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> PyPreviewFrame """ _windows_.PyPreviewFrame_swiginit(self,_windows_.new_PyPreviewFrame(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewFrame._setCallbackInfo(self, self, PyPreviewFrame) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -4967,7 +4967,7 @@ class PyPreviewControlBar(PreviewControlBar): long style=0, String name=PanelNameStr) -> PyPreviewControlBar """ _windows_.PyPreviewControlBar_swiginit(self,_windows_.new_PyPreviewControlBar(*args, **kwargs)) - self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self) + self._setOORInfo(self);PyPreviewControlBar._setCallbackInfo(self, self, PyPreviewControlBar) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index 05c1fa2c62..4fc3c48678 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -16383,7 +16383,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM wxPyTaskBarIcon *arg1 = (wxPyTaskBarIcon *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + int arg4 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -16396,7 +16396,7 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM (char *) "self",(char *) "self",(char *) "_class",(char *) "incref", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:TaskBarIcon__setCallbackInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTaskBarIcon, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "1"" of type '" "wxPyTaskBarIcon *""'"); @@ -16404,11 +16404,13 @@ SWIGINTERN PyObject *_wrap_TaskBarIcon__setCallbackInfo(PyObject *SWIGUNUSEDPARM arg1 = reinterpret_cast< wxPyTaskBarIcon * >(argp1); arg2 = obj1; arg3 = obj2; - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TaskBarIcon__setCallbackInfo" "', expected argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 258f4b14a4..4c0838bf04 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -135,7 +135,7 @@ class PyGridCellRenderer(GridCellRenderer): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellRenderer""" _grid.PyGridCellRenderer_swiginit(self,_grid.new_PyGridCellRenderer(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellRenderer._setCallbackInfo(self, self, PyGridCellRenderer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -336,7 +336,7 @@ class PyGridCellEditor(GridCellEditor): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellEditor""" _grid.PyGridCellEditor_swiginit(self,_grid.new_PyGridCellEditor(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellEditor._setCallbackInfo(self, self, PyGridCellEditor) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -702,7 +702,7 @@ class PyGridCellAttrProvider(GridCellAttrProvider): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellAttrProvider""" _grid.PyGridCellAttrProvider_swiginit(self,_grid.new_PyGridCellAttrProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellAttrProvider) + PyGridCellAttrProvider._setCallbackInfo(self, self, PyGridCellAttrProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -906,7 +906,7 @@ class PyGridTableBase(GridTableBase): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridTableBase""" _grid.PyGridTableBase_swiginit(self,_grid.new_PyGridTableBase(*args, **kwargs)) - self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self) + self._setOORInfo(self);PyGridTableBase._setCallbackInfo(self, self, PyGridTableBase) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index f237461920..d7fbfda36b 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -391,7 +391,7 @@ class HtmlTagHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlTagHandler""" _html.HtmlTagHandler_swiginit(self,_html.new_HtmlTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlTagHandler) + HtmlTagHandler._setCallbackInfo(self, self, HtmlTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -419,7 +419,7 @@ class HtmlWinTagHandler(HtmlTagHandler): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlWinTagHandler""" _html.HtmlWinTagHandler_swiginit(self,_html.new_HtmlWinTagHandler(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWinTagHandler) + HtmlWinTagHandler._setCallbackInfo(self, self, HtmlWinTagHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -920,7 +920,7 @@ class HtmlFilter(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> HtmlFilter""" _html.HtmlFilter_swiginit(self,_html.new_HtmlFilter(*args, **kwargs)) - self._setCallbackInfo(self, HtmlFilter) + HtmlFilter._setCallbackInfo(self, self, HtmlFilter) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -983,7 +983,7 @@ class HtmlWindow(_windows.ScrolledWindow): String name=HtmlWindowNameStr) -> HtmlWindow """ _html.HtmlWindow_swiginit(self,_html.new_HtmlWindow(*args, **kwargs)) - self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self) + self._setOORInfo(self);HtmlWindow._setCallbackInfo(self, self, HtmlWindow) def Create(*args, **kwargs): """ diff --git a/wxPython/src/msw/wizard.py b/wxPython/src/msw/wizard.py index f2972ae91a..e9f8e55957 100644 --- a/wxPython/src/msw/wizard.py +++ b/wxPython/src/msw/wizard.py @@ -127,7 +127,7 @@ class PyWizardPage(WizardPage): def __init__(self, *args, **kwargs): """__init__(self, Wizard parent, Bitmap bitmap=&wxNullBitmap, String resource=&wxPyEmptyString) -> PyWizardPage""" _wizard.PyWizardPage_swiginit(self,_wizard.new_PyWizardPage(*args, **kwargs)) - self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self) + self._setOORInfo(self);PyWizardPage._setCallbackInfo(self, self, PyWizardPage) def Create(*args, **kwargs): """Create(self, Wizard parent, Bitmap bitmap=wxNullBitmap, String resource=EmptyString) -> bool""" diff --git a/wxPython/src/msw/xrc.py b/wxPython/src/msw/xrc.py index 5bbd09e39e..6bee8d35af 100644 --- a/wxPython/src/msw/xrc.py +++ b/wxPython/src/msw/xrc.py @@ -262,7 +262,7 @@ class XmlSubclassFactory(object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlSubclassFactory""" _xrc.XmlSubclassFactory_swiginit(self,_xrc.new_XmlSubclassFactory(*args, **kwargs)) - self._setCallbackInfo(self, XmlSubclassFactory) + XmlSubclassFactory._setCallbackInfo(self, self, XmlSubclassFactory) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -535,7 +535,7 @@ class XmlResourceHandler(_core.Object): def __init__(self, *args, **kwargs): """__init__(self) -> XmlResourceHandler""" _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs)) - self._setCallbackInfo(self, XmlResourceHandler) + XmlResourceHandler._setCallbackInfo(self, self, XmlResourceHandler) __swig_destroy__ = _xrc.delete_XmlResourceHandler __del__ = lambda self : None; diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index 18677ef176..c69c484873 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -210,7 +210,7 @@ MustHaveApp(wxPyWizardPage); class wxPyWizardPage : public wxWizardPage { public: - %pythonAppend wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)" + %pythonAppend wxPyWizardPage "self._setOORInfo(self);" setCallbackInfo(PyWizardPage) %pythonAppend wxPyWizardPage() "" %typemap(out) wxPyWizardPage*; // turn off this typemap -- 2.45.2