From 0220cbc1695d01a55964f31987f2fe78cf212ca1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 13 Oct 2001 00:41:21 +0000 Subject: [PATCH 1/1] Second phase of OOR completed. (Original python object return for wxEvtHandler and derived classes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/SWIG/pycpp.cxx.patch | 14 +- wxPython/contrib/glcanvas/glcanvas.i | 20 +- wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 138 ++- wxPython/contrib/glcanvas/gtk/glcanvas.py | 8 +- wxPython/demo/b | 4 + wxPython/src/gtk/calendar.cpp | 45 +- wxPython/src/gtk/calendar.py | 2 + wxPython/src/gtk/clip_dnd.cpp | 129 +-- wxPython/src/gtk/clip_dnd.py | 42 +- wxPython/src/gtk/cmndlgs.cpp | 991 ++++++++++++++++++++- wxPython/src/gtk/cmndlgs.py | 144 ++- wxPython/src/gtk/controls.cpp | 45 +- wxPython/src/gtk/controls.py | 42 + wxPython/src/gtk/controls2.cpp | 69 +- wxPython/src/gtk/controls2.py | 18 +- wxPython/src/gtk/events.cpp | 45 +- wxPython/src/gtk/filesys.cpp | 57 +- wxPython/src/gtk/filesys.py | 6 +- wxPython/src/gtk/frames.cpp | 45 +- wxPython/src/gtk/frames.py | 8 + wxPython/src/gtk/gdi.cpp | 45 +- wxPython/src/gtk/grid.cpp | 93 +- wxPython/src/gtk/grid.py | 25 +- wxPython/src/gtk/help.cpp | 45 +- wxPython/src/gtk/help.py | 1 + wxPython/src/gtk/html.cpp | 176 +++- wxPython/src/gtk/html.py | 27 +- wxPython/src/gtk/htmlhelp.cpp | 45 +- wxPython/src/gtk/htmlhelp.py | 2 + wxPython/src/gtk/image.cpp | 45 +- wxPython/src/gtk/mdi.cpp | 45 +- wxPython/src/gtk/mdi.py | 10 +- wxPython/src/gtk/misc.cpp | 45 +- wxPython/src/gtk/misc2.cpp | 471 +++++++++- wxPython/src/gtk/misc2.py | 69 +- wxPython/src/gtk/printfw.cpp | 57 +- wxPython/src/gtk/printfw.py | 12 +- wxPython/src/gtk/sizers.cpp | 57 +- wxPython/src/gtk/sizers.py | 6 +- wxPython/src/gtk/stattool.cpp | 45 +- wxPython/src/gtk/stattool.py | 9 +- wxPython/src/gtk/streams.cpp | 45 +- wxPython/src/gtk/utils.cpp | 45 +- wxPython/src/gtk/windows.cpp | 93 +- wxPython/src/gtk/windows.py | 18 +- wxPython/src/gtk/windows2.cpp | 45 +- wxPython/src/gtk/windows2.py | 4 + wxPython/src/gtk/windows3.cpp | 462 +++++++++- wxPython/src/gtk/windows3.py | 62 ++ wxPython/src/gtk/wx.cpp | 50 +- wxPython/src/gtk/wx.py | 3 + 51 files changed, 3423 insertions(+), 606 deletions(-) create mode 100755 wxPython/demo/b diff --git a/wxPython/SWIG/pycpp.cxx.patch b/wxPython/SWIG/pycpp.cxx.patch index bcb3a4fac8..54301e6a6c 100644 --- a/wxPython/SWIG/pycpp.cxx.patch +++ b/wxPython/SWIG/pycpp.cxx.patch @@ -1,18 +1,20 @@ -*** Modules\pycpp.cxx.orig Mon Oct 08 16:27:42 2001 ---- Modules\pycpp.cxx Mon Oct 08 16:28:10 2001 +*** Modules/pycpp.cxx.orig Fri Oct 12 16:37:36 2001 +--- Modules/pycpp.cxx Fri Oct 12 16:38:20 2001 *************** -*** 229,235 **** +*** 228,235 **** + *additional << "def " << realname << "(*_args,**_kwargs):\n"; *additional << tab4 << "val = " << class_name << "Ptr(apply(" << module << "." << name_construct(realname) << ",_args,_kwargs))\n" - << tab4 << "val.thisown = 1\n"; +! << tab4 << "val.thisown = 1\n" ! << tab4 << "return val\n\n"; } // Patch up the documentation entry if (doc_entry) { ---- 229,236 ---- +--- 228,236 ---- + *additional << "def " << realname << "(*_args,**_kwargs):\n"; *additional << tab4 << "val = " << class_name << "Ptr(apply(" << module << "." << name_construct(realname) << ",_args,_kwargs))\n" - << tab4 << "val.thisown = 1\n"; +! << tab4 << "val.thisown = 1\n"; ! emitAddPragmas(*additional, realname, tab4); ! *additional << tab4 << "return val\n\n"; } diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index ad76d3cf13..ebb39d526a 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -15,7 +15,12 @@ %{ #include "export.h" +#ifdef __WXMSW__ #include "myglcanvas.h" +#else +#include +#endif + %} //--------------------------------------------------------------------------- @@ -109,8 +114,8 @@ public: int *attribList = NULL, const wxPalette& palette = wxNullPalette ); - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, long style, const wxString& name); +// bool Create(wxWindow *parent, wxWindowID id, +// const wxPoint& pos, const wxSize& size, long style, const wxString& name); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxGLCanvasWithContext:val._setOORInfo(self)" @@ -121,11 +126,12 @@ public: wxGLContext* GetContext(); - void SetupPixelFormat(int *attribList = NULL); - void SetupPalette(const wxPalette& palette); - wxPalette CreateDefaultPalette(); - - wxPalette* GetPalette(); +#ifdef __WXMSW__ + void SetupPixelFormat(int *attribList = NULL); + void SetupPalette(const wxPalette& palette); + wxPalette CreateDefaultPalette(); + wxPalette* GetPalette(); +#endif }; diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index 4285634e2d..a03a8a72b7 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -63,28 +61,47 @@ extern PyObject *SWIG_newvarlink(void); #endif +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -93,7 +110,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { @@ -537,6 +554,98 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGLCanvas * _result; + wxWindow * _arg0; + wxGLContext * _arg1 = (wxGLContext *) NULL; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) 0; + char * _arg6 = (char *) "GLCanvas"; + int * _arg7 = (int *) NULL; + wxPalette * _arg8 = (wxPalette *) &wxNullPalette; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + int * temp1; + PyObject * _obj7 = 0; + PyObject * _argo8 = 0; + char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj7) +{ + int i; + if (PySequence_Check(_obj7)) { + int size = PyObject_Length(_obj7); + temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i)); + } + temp1[size] = 0; + _arg7 = temp1; + } +} + if (_argo8) { + if (_argo8 == Py_None) { _arg8 = NULL; } + else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + delete [] _arg7; +} + return _resultobj; +} + #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent()) static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -658,6 +767,7 @@ static PyMethodDef glcanvascMethods[] = { { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS }, { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS }, { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS }, { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxGLContext_GetPalette", (PyCFunction) _wrap_wxGLContext_GetPalette, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.py b/wxPython/contrib/glcanvas/gtk/glcanvas.py index 03c139fd2b..485a032df1 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.py +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.py @@ -107,10 +107,16 @@ class wxGLCanvas(wxGLCanvasPtr): def __init__(self,*_args,**_kwargs): self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) + self._setOORInfo(self) +def wxGLCanvasWithContext(*_args,**_kwargs): + val = wxGLCanvasPtr(apply(glcanvasc.new_wxGLCanvasWithContext,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(self) + return val + diff --git a/wxPython/demo/b b/wxPython/demo/b new file mode 100755 index 0000000000..2ab601f122 --- /dev/null +++ b/wxPython/demo/b @@ -0,0 +1,4 @@ +#!/bin/bash +cd .. +. b $* +cd - diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index 837e84d2bb..b7d9abc37b 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/calendar.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,28 +56,47 @@ extern PyObject *SWIG_newvarlink(void); #include "export.h" #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -88,7 +105,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index 5f722a0675..2eb6ec364a 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -208,12 +208,14 @@ class wxCalendarCtrl(wxCalendarCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(calendarc.new_wxCalendarCtrl,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreCalendarCtrl(*_args,**_kwargs): val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp index bc0ea30299..efb14aaad4 100644 --- a/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/clip_dnd.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,28 +58,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -90,7 +107,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif // An alternate constructor... wxDataFormat* wxCustomDataFormat(const wxString &id) { @@ -1049,8 +1066,8 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyDataObjectSimple__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyDataObjectSimple__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyDataObjectSimple__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDataObjectSimple * _arg0; PyObject * _arg1; @@ -1061,12 +1078,12 @@ static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *a char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDataObjectSimple__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDataObjectSimple__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDataObjectSimple_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDataObjectSimple__setSelf. Expected _wxPyDataObjectSimple_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDataObjectSimple__setCallbackInfo. Expected _wxPyDataObjectSimple_p."); return NULL; } } @@ -1078,7 +1095,7 @@ static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxPyDataObjectSimple__setSelf(_arg0,_arg1,_arg2); + wxPyDataObjectSimple__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1414,8 +1431,8 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyTextDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyTextDataObject__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyTextDataObject__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDataObject * _arg0; PyObject * _arg1; @@ -1426,12 +1443,12 @@ static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *arg char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyTextDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyTextDataObject__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTextDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTextDataObject__setSelf. Expected _wxPyTextDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTextDataObject__setCallbackInfo. Expected _wxPyTextDataObject_p."); return NULL; } } @@ -1443,7 +1460,7 @@ static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *arg } { wxPy_BEGIN_ALLOW_THREADS; - wxPyTextDataObject__setSelf(_arg0,_arg1,_arg2); + wxPyTextDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1629,8 +1646,8 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyBitmapDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyBitmapDataObject__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyBitmapDataObject__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyBitmapDataObject * _arg0; PyObject * _arg1; @@ -1641,12 +1658,12 @@ static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *a char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapDataObject__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyBitmapDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyBitmapDataObject__setSelf. Expected _wxPyBitmapDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyBitmapDataObject__setCallbackInfo. Expected _wxPyBitmapDataObject_p."); return NULL; } } @@ -1658,7 +1675,7 @@ static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxPyBitmapDataObject__setSelf(_arg0,_arg1,_arg2); + wxPyBitmapDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2326,8 +2343,8 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxDropSource__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDropSource__setCallbackInfo(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDropSource__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropSource * _arg0; PyObject * _arg1; @@ -2339,12 +2356,12 @@ static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyO char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOi:wxDropSource__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOi:wxDropSource__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDropSource_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropSource__setSelf. Expected _wxPyDropSource_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropSource__setCallbackInfo. Expected _wxPyDropSource_p."); return NULL; } } @@ -2356,7 +2373,7 @@ static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyO } { wxPy_BEGIN_ALLOW_THREADS; - wxDropSource__setSelf(_arg0,_arg1,_arg2,_arg3); + wxDropSource__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2604,8 +2621,8 @@ static PyObject *_wrap_new_wxPyDropTarget(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxPyDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyDropTarget__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyDropTarget__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropTarget * _arg0; PyObject * _arg1; @@ -2616,12 +2633,12 @@ static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, P char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDropTarget__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDropTarget_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDropTarget__setSelf. Expected _wxPyDropTarget_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDropTarget__setCallbackInfo. Expected _wxPyDropTarget_p."); return NULL; } } @@ -2633,7 +2650,7 @@ static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, P } { wxPy_BEGIN_ALLOW_THREADS; - wxPyDropTarget__setSelf(_arg0,_arg1,_arg2); + wxPyDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2932,8 +2949,8 @@ static PyObject *_wrap_new_wxTextDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxTextDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextDropTarget__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextDropTarget__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDropTarget * _arg0; PyObject * _arg1; @@ -2944,12 +2961,12 @@ static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextDropTarget__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTextDropTarget_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextDropTarget__setSelf. Expected _wxPyTextDropTarget_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextDropTarget__setCallbackInfo. Expected _wxPyTextDropTarget_p."); return NULL; } } @@ -2961,7 +2978,7 @@ static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - wxTextDropTarget__setSelf(_arg0,_arg1,_arg2); + wxTextDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -3163,8 +3180,8 @@ static PyObject *_wrap_new_wxFileDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxFileDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDropTarget__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileDropTarget__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyFileDropTarget * _arg0; PyObject * _arg1; @@ -3175,12 +3192,12 @@ static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileDropTarget__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileDropTarget_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDropTarget__setSelf. Expected _wxPyFileDropTarget_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDropTarget__setCallbackInfo. Expected _wxPyFileDropTarget_p."); return NULL; } } @@ -3192,7 +3209,7 @@ static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - wxFileDropTarget__setSelf(_arg0,_arg1,_arg2); + wxFileDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -3358,14 +3375,14 @@ static PyMethodDef clip_dndcMethods[] = { { "wxFileDropTarget_base_OnLeave", (PyCFunction) _wrap_wxFileDropTarget_base_OnLeave, METH_VARARGS | METH_KEYWORDS }, { "wxFileDropTarget_base_OnDragOver", (PyCFunction) _wrap_wxFileDropTarget_base_OnDragOver, METH_VARARGS | METH_KEYWORDS }, { "wxFileDropTarget_base_OnEnter", (PyCFunction) _wrap_wxFileDropTarget_base_OnEnter, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDropTarget__setSelf", (PyCFunction) _wrap_wxFileDropTarget__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDropTarget__setCallbackInfo", (PyCFunction) _wrap_wxFileDropTarget__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDropTarget", (PyCFunction) _wrap_new_wxFileDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxTextDropTarget_base_OnData", (PyCFunction) _wrap_wxTextDropTarget_base_OnData, METH_VARARGS | METH_KEYWORDS }, { "wxTextDropTarget_base_OnDrop", (PyCFunction) _wrap_wxTextDropTarget_base_OnDrop, METH_VARARGS | METH_KEYWORDS }, { "wxTextDropTarget_base_OnLeave", (PyCFunction) _wrap_wxTextDropTarget_base_OnLeave, METH_VARARGS | METH_KEYWORDS }, { "wxTextDropTarget_base_OnDragOver", (PyCFunction) _wrap_wxTextDropTarget_base_OnDragOver, METH_VARARGS | METH_KEYWORDS }, { "wxTextDropTarget_base_OnEnter", (PyCFunction) _wrap_wxTextDropTarget_base_OnEnter, METH_VARARGS | METH_KEYWORDS }, - { "wxTextDropTarget__setSelf", (PyCFunction) _wrap_wxTextDropTarget__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxTextDropTarget__setCallbackInfo", (PyCFunction) _wrap_wxTextDropTarget__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextDropTarget", (PyCFunction) _wrap_new_wxTextDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxPyDropTarget_GetData", (PyCFunction) _wrap_wxPyDropTarget_GetData, METH_VARARGS | METH_KEYWORDS }, { "wxPyDropTarget_base_OnDrop", (PyCFunction) _wrap_wxPyDropTarget_base_OnDrop, METH_VARARGS | METH_KEYWORDS }, @@ -3375,7 +3392,7 @@ static PyMethodDef clip_dndcMethods[] = { { "wxPyDropTarget_SetDataObject", (PyCFunction) _wrap_wxPyDropTarget_SetDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxPyDropTarget_GetDataObject", (PyCFunction) _wrap_wxPyDropTarget_GetDataObject, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPyDropTarget", (PyCFunction) _wrap_delete_wxPyDropTarget, METH_VARARGS | METH_KEYWORDS }, - { "wxPyDropTarget__setSelf", (PyCFunction) _wrap_wxPyDropTarget__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyDropTarget__setCallbackInfo", (PyCFunction) _wrap_wxPyDropTarget__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyDropTarget", (PyCFunction) _wrap_new_wxPyDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxDropSource_base_GiveFeedback", (PyCFunction) _wrap_wxDropSource_base_GiveFeedback, METH_VARARGS | METH_KEYWORDS }, { "wxDropSource_DoDragDrop", (PyCFunction) _wrap_wxDropSource_DoDragDrop, METH_VARARGS | METH_KEYWORDS }, @@ -3383,7 +3400,7 @@ static PyMethodDef clip_dndcMethods[] = { { "wxDropSource_GetDataObject", (PyCFunction) _wrap_wxDropSource_GetDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxDropSource_SetData", (PyCFunction) _wrap_wxDropSource_SetData, METH_VARARGS | METH_KEYWORDS }, { "delete_wxDropSource", (PyCFunction) _wrap_delete_wxDropSource, METH_VARARGS | METH_KEYWORDS }, - { "wxDropSource__setSelf", (PyCFunction) _wrap_wxDropSource__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxDropSource__setCallbackInfo", (PyCFunction) _wrap_wxDropSource__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxDropSource", (PyCFunction) _wrap_new_wxDropSource, METH_VARARGS | METH_KEYWORDS }, { "wxClipboard_UsePrimarySelection", (PyCFunction) _wrap_wxClipboard_UsePrimarySelection, METH_VARARGS | METH_KEYWORDS }, { "wxClipboard_Flush", (PyCFunction) _wrap_wxClipboard_Flush, METH_VARARGS | METH_KEYWORDS }, @@ -3403,12 +3420,12 @@ static PyMethodDef clip_dndcMethods[] = { { "new_wxCustomDataObject", (PyCFunction) _wrap_new_wxCustomDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxFileDataObject_GetFilenames", (PyCFunction) _wrap_wxFileDataObject_GetFilenames, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDataObject", (PyCFunction) _wrap_new_wxFileDataObject, METH_VARARGS | METH_KEYWORDS }, - { "wxPyBitmapDataObject__setSelf", (PyCFunction) _wrap_wxPyBitmapDataObject__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyBitmapDataObject__setCallbackInfo", (PyCFunction) _wrap_wxPyBitmapDataObject__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyBitmapDataObject", (PyCFunction) _wrap_new_wxPyBitmapDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapDataObject_SetBitmap", (PyCFunction) _wrap_wxBitmapDataObject_SetBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapDataObject_GetBitmap", (PyCFunction) _wrap_wxBitmapDataObject_GetBitmap, METH_VARARGS | METH_KEYWORDS }, { "new_wxBitmapDataObject", (PyCFunction) _wrap_new_wxBitmapDataObject, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTextDataObject__setSelf", (PyCFunction) _wrap_wxPyTextDataObject__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTextDataObject__setCallbackInfo", (PyCFunction) _wrap_wxPyTextDataObject__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyTextDataObject", (PyCFunction) _wrap_new_wxPyTextDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxTextDataObject_SetText", (PyCFunction) _wrap_wxTextDataObject_SetText, METH_VARARGS | METH_KEYWORDS }, { "wxTextDataObject_GetText", (PyCFunction) _wrap_wxTextDataObject_GetText, METH_VARARGS | METH_KEYWORDS }, @@ -3416,7 +3433,7 @@ static PyMethodDef clip_dndcMethods[] = { { "new_wxTextDataObject", (PyCFunction) _wrap_new_wxTextDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxDataObjectComposite_Add", (PyCFunction) _wrap_wxDataObjectComposite_Add, METH_VARARGS | METH_KEYWORDS }, { "new_wxDataObjectComposite", (PyCFunction) _wrap_new_wxDataObjectComposite, METH_VARARGS | METH_KEYWORDS }, - { "wxPyDataObjectSimple__setSelf", (PyCFunction) _wrap_wxPyDataObjectSimple__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyDataObjectSimple__setCallbackInfo", (PyCFunction) _wrap_wxPyDataObjectSimple__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyDataObjectSimple", (PyCFunction) _wrap_new_wxPyDataObjectSimple, METH_VARARGS | METH_KEYWORDS }, { "wxDataObjectSimple_SetFormat", (PyCFunction) _wrap_wxDataObjectSimple_SetFormat, METH_VARARGS | METH_KEYWORDS }, { "wxDataObjectSimple_GetFormat", (PyCFunction) _wrap_wxDataObjectSimple_GetFormat, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/clip_dnd.py b/wxPython/src/gtk/clip_dnd.py index fc43b06bd9..66d138741f 100644 --- a/wxPython/src/gtk/clip_dnd.py +++ b/wxPython/src/gtk/clip_dnd.py @@ -100,8 +100,8 @@ class wxPyDataObjectSimplePtr(wxDataObjectSimplePtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxPyDataObjectSimple__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxPyDataObjectSimple__setCallbackInfo,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -109,7 +109,7 @@ class wxPyDataObjectSimple(wxPyDataObjectSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyDataObjectSimple,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyDataObjectSimple) + self._setCallbackInfo(self, wxPyDataObjectSimple) @@ -159,8 +159,8 @@ class wxPyTextDataObjectPtr(wxTextDataObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxPyTextDataObject__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxPyTextDataObject__setCallbackInfo,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -168,7 +168,7 @@ class wxPyTextDataObject(wxPyTextDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyTextDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyTextDataObject) + self._setCallbackInfo(self, wxPyTextDataObject) @@ -198,8 +198,8 @@ class wxPyBitmapDataObjectPtr(wxBitmapDataObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxPyBitmapDataObject__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxPyBitmapDataObject__setCallbackInfo,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -207,7 +207,7 @@ class wxPyBitmapDataObject(wxPyBitmapDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyBitmapDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyBitmapDataObject) + self._setCallbackInfo(self, wxPyBitmapDataObject) @@ -305,8 +305,8 @@ class wxDropSourcePtr : def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxDropSource__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxDropSource__setCallbackInfo,(self,) + _args, _kwargs) return val def __del__(self,clip_dndc=clip_dndc): if self.thisown == 1 : @@ -333,7 +333,7 @@ class wxDropSource(wxDropSourcePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxDropSource,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxDropSource, 0) + self._setCallbackInfo(self, wxDropSource, 0) @@ -355,8 +355,8 @@ class wxPyDropTargetPtr(wxDropTargetPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxPyDropTarget__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxPyDropTarget__setCallbackInfo,(self,) + _args, _kwargs) return val def __del__(self,clip_dndc=clip_dndc): if self.thisown == 1 : @@ -391,7 +391,7 @@ class wxPyDropTarget(wxPyDropTargetPtr): self.this = apply(clip_dndc.new_wxPyDropTarget,_args,_kwargs) self.thisown = 1 if _args:_args[0].thisown = 0 - self._setSelf(self, wxPyDropTarget) + self._setCallbackInfo(self, wxPyDropTarget) @@ -400,8 +400,8 @@ class wxTextDropTargetPtr(wxPyDropTargetPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxTextDropTarget__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxTextDropTarget__setCallbackInfo,(self,) + _args, _kwargs) return val def base_OnEnter(self, *_args, **_kwargs): val = apply(clip_dndc.wxTextDropTarget_base_OnEnter,(self,) + _args, _kwargs) @@ -424,7 +424,7 @@ class wxTextDropTarget(wxTextDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxTextDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxTextDropTarget) + self._setCallbackInfo(self, wxTextDropTarget) @@ -433,8 +433,8 @@ class wxFileDropTargetPtr(wxPyDropTargetPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(clip_dndc.wxFileDropTarget__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(clip_dndc.wxFileDropTarget__setCallbackInfo,(self,) + _args, _kwargs) return val def base_OnEnter(self, *_args, **_kwargs): val = apply(clip_dndc.wxFileDropTarget_base_OnEnter,(self,) + _args, _kwargs) @@ -457,7 +457,7 @@ class wxFileDropTarget(wxFileDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxFileDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxFileDropTarget) + self._setCallbackInfo(self, wxFileDropTarget) diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index c76b75813c..cc148c941d 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,29 +58,49 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -91,7 +109,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { @@ -2938,7 +2956,904 @@ static PyObject *_wrap_wxProgressDialog_Resume(PyObject *self, PyObject *args, P return _resultobj; } +static void *SwigwxFindDialogEventTowxCommandEvent(void *ptr) { + wxFindDialogEvent *src; + wxCommandEvent *dest; + src = (wxFindDialogEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxFindDialogEventTowxEvent(void *ptr) { + wxFindDialogEvent *src; + wxEvent *dest; + src = (wxFindDialogEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +static void *SwigwxFindDialogEventTowxObject(void *ptr) { + wxFindDialogEvent *src; + wxObject *dest; + src = (wxFindDialogEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxFindDialogEvent(_swigarg0,_swigarg1) (new wxFindDialogEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxFindDialogEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindDialogEvent * _result; + wxEventType _arg0 = (wxEventType ) wxEVT_NULL; + int _arg1 = (int ) 0; + char *_kwnames[] = { "commandType","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxFindDialogEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindDialogEvent *)new_wxFindDialogEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindDialogEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFindDialogEvent_GetFlags(_swigobj) (_swigobj->GetFlags()) +static PyObject *_wrap_wxFindDialogEvent_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFindDialogEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindDialogEvent_GetFlags",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_GetFlags. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFindDialogEvent_GetFlags(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFindDialogEvent_GetFindString(_swigobj) (_swigobj->GetFindString()) +static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFindDialogEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindDialogEvent_GetFindString",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_GetFindString. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFindDialogEvent_GetFindString(_arg0)); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFindDialogEvent_GetReplaceString(_swigobj) (_swigobj->GetReplaceString()) +static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFindDialogEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindDialogEvent_GetReplaceString",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_GetReplaceString. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFindDialogEvent_GetReplaceString(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFindDialogEvent_GetDialog(_swigobj) (_swigobj->GetDialog()) +static PyObject *_wrap_wxFindDialogEvent_GetDialog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceDialog * _result; + wxFindDialogEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindDialogEvent_GetDialog",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_GetDialog. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindReplaceDialog *)wxFindDialogEvent_GetDialog(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindReplaceDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFindDialogEvent_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0)) +static PyObject *_wrap_wxFindDialogEvent_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindDialogEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFindDialogEvent_SetFlags",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_SetFlags. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindDialogEvent_SetFlags(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFindDialogEvent_SetFindString(_swigobj,_swigarg0) (_swigobj->SetFindString(_swigarg0)) +static PyObject *_wrap_wxFindDialogEvent_SetFindString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindDialogEvent * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFindDialogEvent_SetFindString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_SetFindString. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindDialogEvent_SetFindString(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFindDialogEvent_SetReplaceString(_swigobj,_swigarg0) (_swigobj->SetReplaceString(_swigarg0)) +static PyObject *_wrap_wxFindDialogEvent_SetReplaceString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindDialogEvent * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFindDialogEvent_SetReplaceString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindDialogEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindDialogEvent_SetReplaceString. Expected _wxFindDialogEvent_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindDialogEvent_SetReplaceString(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxFindReplaceDataTowxObject(void *ptr) { + wxFindReplaceData *src; + wxObject *dest; + src = (wxFindReplaceData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxFindReplaceData(_swigarg0) (new wxFindReplaceData(_swigarg0)) +static PyObject *_wrap_new_wxFindReplaceData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _result; + int _arg0 = (int ) 0; + char *_kwnames[] = { "flags", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxFindReplaceData",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindReplaceData *)new_wxFindReplaceData(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindReplaceData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxFindReplaceData(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFindReplaceData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFindReplaceData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFindReplaceData. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxFindReplaceData(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFindReplaceData_GetFindString(_swigobj) (_swigobj->GetFindString()) +static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFindReplaceData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindReplaceData_GetFindString",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_GetFindString. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFindReplaceData_GetFindString(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFindReplaceData_GetReplaceString(_swigobj) (_swigobj->GetReplaceString()) +static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFindReplaceData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindReplaceData_GetReplaceString",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_GetReplaceString. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFindReplaceData_GetReplaceString(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFindReplaceData_GetFlags(_swigobj) (_swigobj->GetFlags()) +static PyObject *_wrap_wxFindReplaceData_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFindReplaceData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindReplaceData_GetFlags",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_GetFlags. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFindReplaceData_GetFlags(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFindReplaceData_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0)) +static PyObject *_wrap_wxFindReplaceData_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFindReplaceData_SetFlags",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_SetFlags. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindReplaceData_SetFlags(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFindReplaceData_SetFindString(_swigobj,_swigarg0) (_swigobj->SetFindString(_swigarg0)) +static PyObject *_wrap_wxFindReplaceData_SetFindString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFindReplaceData_SetFindString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_SetFindString. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindReplaceData_SetFindString(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFindReplaceData_SetReplaceString(_swigobj,_swigarg0) (_swigobj->SetReplaceString(_swigarg0)) +static PyObject *_wrap_wxFindReplaceData_SetReplaceString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFindReplaceData_SetReplaceString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceData_SetReplaceString. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindReplaceData_SetReplaceString(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxFindReplaceDialogTowxDialog(void *ptr) { + wxFindReplaceDialog *src; + wxDialog *dest; + src = (wxFindReplaceDialog *) ptr; + dest = (wxDialog *) src; + return (void *) dest; +} + +static void *SwigwxFindReplaceDialogTowxTopLevelWindow(void *ptr) { + wxFindReplaceDialog *src; + wxTopLevelWindow *dest; + src = (wxFindReplaceDialog *) ptr; + dest = (wxTopLevelWindow *) src; + return (void *) dest; +} + +static void *SwigwxFindReplaceDialogTowxWindow(void *ptr) { + wxFindReplaceDialog *src; + wxWindow *dest; + src = (wxFindReplaceDialog *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxFindReplaceDialogTowxEvtHandler(void *ptr) { + wxFindReplaceDialog *src; + wxEvtHandler *dest; + src = (wxFindReplaceDialog *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxFindReplaceDialogTowxObject(void *ptr) { + wxFindReplaceDialog *src; + wxObject *dest; + src = (wxFindReplaceDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxFindReplaceDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxFindReplaceDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxFindReplaceDialog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceDialog * _result; + wxWindow * _arg0; + wxFindReplaceData * _arg1; + wxString * _arg2; + int _arg3 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "parent","data","title","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:new_wxFindReplaceDialog",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFindReplaceDialog. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFindReplaceDialog. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindReplaceDialog *)new_wxFindReplaceDialog(_arg0,_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindReplaceDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define new_wxPreFindReplaceDialog() (new wxFindReplaceDialog()) +static PyObject *_wrap_new_wxPreFindReplaceDialog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceDialog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreFindReplaceDialog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindReplaceDialog *)new_wxPreFindReplaceDialog(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindReplaceDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFindReplaceDialog_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxFindReplaceDialog_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFindReplaceDialog * _arg0; + wxWindow * _arg1; + wxFindReplaceData * _arg2; + wxString * _arg3; + int _arg4 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","parent","data","title","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|i:wxFindReplaceDialog_Create",_kwnames,&_argo0,&_argo1,&_argo2,&_obj3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceDialog_Create. Expected _wxFindReplaceDialog_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindReplaceDialog_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxFindReplaceDialog_Create. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFindReplaceDialog_Create(_arg0,_arg1,_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFindReplaceDialog_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxFindReplaceDialog_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceData * _result; + wxFindReplaceDialog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFindReplaceDialog_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceDialog_GetData. Expected _wxFindReplaceDialog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFindReplaceData *)wxFindReplaceDialog_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFindReplaceData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFindReplaceDialog_SetData(_swigobj,_swigarg0) (_swigobj->SetData(_swigarg0)) +static PyObject *_wrap_wxFindReplaceDialog_SetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFindReplaceDialog * _arg0; + wxFindReplaceData * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFindReplaceDialog_SetData",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFindReplaceDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFindReplaceDialog_SetData. Expected _wxFindReplaceDialog_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFindReplaceData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindReplaceDialog_SetData. Expected _wxFindReplaceData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFindReplaceDialog_SetData(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef cmndlgscMethods[] = { + { "wxFindReplaceDialog_SetData", (PyCFunction) _wrap_wxFindReplaceDialog_SetData, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceDialog_GetData", (PyCFunction) _wrap_wxFindReplaceDialog_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceDialog_Create", (PyCFunction) _wrap_wxFindReplaceDialog_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreFindReplaceDialog", (PyCFunction) _wrap_new_wxPreFindReplaceDialog, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFindReplaceDialog", (PyCFunction) _wrap_new_wxFindReplaceDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_SetReplaceString", (PyCFunction) _wrap_wxFindReplaceData_SetReplaceString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_SetFindString", (PyCFunction) _wrap_wxFindReplaceData_SetFindString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_SetFlags", (PyCFunction) _wrap_wxFindReplaceData_SetFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_GetFlags", (PyCFunction) _wrap_wxFindReplaceData_GetFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_GetReplaceString", (PyCFunction) _wrap_wxFindReplaceData_GetReplaceString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindReplaceData_GetFindString", (PyCFunction) _wrap_wxFindReplaceData_GetFindString, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFindReplaceData", (PyCFunction) _wrap_delete_wxFindReplaceData, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFindReplaceData", (PyCFunction) _wrap_new_wxFindReplaceData, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_SetReplaceString", (PyCFunction) _wrap_wxFindDialogEvent_SetReplaceString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_SetFindString", (PyCFunction) _wrap_wxFindDialogEvent_SetFindString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_SetFlags", (PyCFunction) _wrap_wxFindDialogEvent_SetFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_GetDialog", (PyCFunction) _wrap_wxFindDialogEvent_GetDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_GetReplaceString", (PyCFunction) _wrap_wxFindDialogEvent_GetReplaceString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_GetFindString", (PyCFunction) _wrap_wxFindDialogEvent_GetFindString, METH_VARARGS | METH_KEYWORDS }, + { "wxFindDialogEvent_GetFlags", (PyCFunction) _wrap_wxFindDialogEvent_GetFlags, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFindDialogEvent", (PyCFunction) _wrap_new_wxFindDialogEvent, METH_VARARGS | METH_KEYWORDS }, { "wxProgressDialog_Resume", (PyCFunction) _wrap_wxProgressDialog_Resume, METH_VARARGS | METH_KEYWORDS }, { "wxProgressDialog_Update", (PyCFunction) _wrap_wxProgressDialog_Update, METH_VARARGS | METH_KEYWORDS }, { "new_wxProgressDialog", (PyCFunction) _wrap_new_wxProgressDialog, METH_VARARGS | METH_KEYWORDS }, @@ -3016,6 +3931,8 @@ static PyMethodDef cmndlgscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxEvent}, + { "_wxEvent","_wxFindDialogEvent",SwigwxFindDialogEventTowxEvent}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -3026,6 +3943,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxEvtHandler}, + { "_class_wxEvtHandler","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_class_wxEvtHandler","_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler}, @@ -3045,6 +3964,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, + { "_class_wxObject","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxObject}, + { "_class_wxObject","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxObject}, + { "_class_wxObject","_class_wxFindReplaceData",SwigwxFindReplaceDataTowxObject}, + { "_class_wxObject","_wxFindReplaceData",SwigwxFindReplaceDataTowxObject}, + { "_class_wxObject","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxObject}, + { "_class_wxObject","_wxFindDialogEvent",SwigwxFindDialogEventTowxObject}, { "_class_wxObject","_class_wxProgressDialog",SwigwxProgressDialogTowxObject}, { "_class_wxObject","_wxProgressDialog",SwigwxProgressDialogTowxObject}, { "_class_wxObject","_class_wxMessageDialog",SwigwxMessageDialogTowxObject}, @@ -3072,6 +3997,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, + { "_wxTopLevelWindow","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxTopLevelWindow}, + { "_wxTopLevelWindow","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxProgressDialog",SwigwxProgressDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxTopLevelWindow}, @@ -3088,6 +4015,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxTopLevelWindow","_wxDirDialog",SwigwxDirDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_class_wxColourDialog",SwigwxColourDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxColourDialog",SwigwxColourDialogTowxTopLevelWindow}, + { "_class_wxDialog","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxDialog}, + { "_class_wxDialog","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxDialog}, { "_class_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_class_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_class_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog}, @@ -3110,6 +4039,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxEvent}, + { "_class_wxEvent","_wxFindDialogEvent",SwigwxFindDialogEventTowxEvent}, + { "_wxCommandEvent","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxCommandEvent}, + { "_wxCommandEvent","_wxFindDialogEvent",SwigwxFindDialogEventTowxCommandEvent}, { "_char","_wxChar",0}, { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0}, { "_EBool","_wxCoord",0}, @@ -3124,6 +4057,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, + { "_class_wxTopLevelWindow","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxTopLevelWindow}, + { "_class_wxTopLevelWindow","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxTopLevelWindow}, { "_class_wxTopLevelWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxTopLevelWindow}, { "_class_wxTopLevelWindow","_wxProgressDialog",SwigwxProgressDialogTowxTopLevelWindow}, { "_class_wxTopLevelWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxTopLevelWindow}, @@ -3145,6 +4080,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxWindow}, + { "_class_wxWindow","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxWindow}, { "_class_wxWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_class_wxWindow","_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_class_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow}, @@ -3161,6 +4098,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxDirDialog",SwigwxDirDialogTowxWindow}, { "_class_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow}, { "_class_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow}, + { "_wxObject","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxObject}, + { "_wxObject","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxObject}, + { "_wxObject","_class_wxFindReplaceData",SwigwxFindReplaceDataTowxObject}, + { "_wxObject","_wxFindReplaceData",SwigwxFindReplaceDataTowxObject}, + { "_wxObject","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxObject}, + { "_wxObject","_wxFindDialogEvent",SwigwxFindDialogEventTowxObject}, { "_wxObject","_class_wxProgressDialog",SwigwxProgressDialogTowxObject}, { "_wxObject","_wxProgressDialog",SwigwxProgressDialogTowxObject}, { "_wxObject","_class_wxMessageDialog",SwigwxMessageDialogTowxObject}, @@ -3191,6 +4134,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, + { "_wxDialog","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxDialog}, + { "_wxDialog","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxDialog}, { "_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog}, @@ -3244,6 +4189,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxCommandEvent","_class_wxFindDialogEvent",SwigwxFindDialogEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxFindDialogEvent",SwigwxFindDialogEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxEvtHandler}, + { "_wxEvtHandler","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_wxEvtHandler","_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler}, @@ -3260,6 +4209,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxDirDialog",SwigwxDirDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, { "_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, + { "_wxWindow","_class_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxWindow}, + { "_wxWindow","_wxFindReplaceDialog",SwigwxFindReplaceDialogTowxWindow}, { "_wxWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_wxWindow","_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow}, @@ -3289,6 +4240,18 @@ SWIGEXPORT(void) initcmndlgsc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("cmndlgsc", cmndlgscMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxFR_DOWN", PyInt_FromLong((long) wxFR_DOWN)); + PyDict_SetItemString(d,"wxFR_WHOLEWORD", PyInt_FromLong((long) wxFR_WHOLEWORD)); + PyDict_SetItemString(d,"wxFR_MATCHCASE", PyInt_FromLong((long) wxFR_MATCHCASE)); + PyDict_SetItemString(d,"wxFR_REPLACEDIALOG", PyInt_FromLong((long) wxFR_REPLACEDIALOG)); + PyDict_SetItemString(d,"wxFR_NOUPDOWN", PyInt_FromLong((long) wxFR_NOUPDOWN)); + PyDict_SetItemString(d,"wxFR_NOMATCHCASE", PyInt_FromLong((long) wxFR_NOMATCHCASE)); + PyDict_SetItemString(d,"wxFR_NOWHOLEWORD", PyInt_FromLong((long) wxFR_NOWHOLEWORD)); + PyDict_SetItemString(d,"wxEVT_COMMAND_FIND", PyInt_FromLong((long) wxEVT_COMMAND_FIND)); + PyDict_SetItemString(d,"wxEVT_COMMAND_FIND_NEXT", PyInt_FromLong((long) wxEVT_COMMAND_FIND_NEXT)); + PyDict_SetItemString(d,"wxEVT_COMMAND_FIND_REPLACE", PyInt_FromLong((long) wxEVT_COMMAND_FIND_REPLACE)); + PyDict_SetItemString(d,"wxEVT_COMMAND_FIND_REPLACE_ALL", PyInt_FromLong((long) wxEVT_COMMAND_FIND_REPLACE_ALL)); + PyDict_SetItemString(d,"wxEVT_COMMAND_FIND_CLOSE", PyInt_FromLong((long) wxEVT_COMMAND_FIND_CLOSE)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/cmndlgs.py b/wxPython/src/gtk/cmndlgs.py index 02d1e711d8..b5ef576255 100644 --- a/wxPython/src/gtk/cmndlgs.py +++ b/wxPython/src/gtk/cmndlgs.py @@ -9,14 +9,32 @@ from windows import * from clip_dnd import * +from events import * + from frames import * from stattool import * from controls import * - -from events import * import wx + + +def EVT_COMMAND_FIND(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_FIND, func) + +def EVT_COMMAND_FIND_NEXT(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_FIND_NEXT, func) + +def EVT_COMMAND_FIND_REPLACE(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_FIND_REPLACE, func) + +def EVT_COMMAND_FIND_REPLACE_ALL(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_FIND_REPLACE_ALL, func) + +def EVT_COMMAND_FIND_CLOSE(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_FIND_CLOSE, func) + + class wxColourDataPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -71,6 +89,7 @@ class wxColourDialog(wxColourDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxColourDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -103,6 +122,7 @@ class wxDirDialog(wxDirDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxDirDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -168,6 +188,7 @@ class wxFileDialog(wxFileDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFileDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -194,6 +215,7 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -217,6 +239,7 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxTextEntryDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -297,6 +320,7 @@ class wxFontDialog(wxFontDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFontDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -314,6 +338,7 @@ class wxMessageDialog(wxMessageDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxMessageDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -334,8 +359,111 @@ class wxProgressDialog(wxProgressDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxProgressDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) + + + + +class wxFindDialogEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetFlags(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_GetFlags,(self,) + _args, _kwargs) + return val + def GetFindString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_GetFindString,(self,) + _args, _kwargs) + return val + def GetReplaceString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_GetReplaceString,(self,) + _args, _kwargs) + return val + def GetDialog(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_GetDialog,(self,) + _args, _kwargs) + if val: val = wxFindReplaceDialogPtr(val) + return val + def SetFlags(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_SetFlags,(self,) + _args, _kwargs) + return val + def SetFindString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_SetFindString,(self,) + _args, _kwargs) + return val + def SetReplaceString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindDialogEvent_SetReplaceString,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFindDialogEvent(wxFindDialogEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(cmndlgsc.new_wxFindDialogEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxFindReplaceDataPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,cmndlgsc=cmndlgsc): + if self.thisown == 1 : + cmndlgsc.delete_wxFindReplaceData(self) + def GetFindString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_GetFindString,(self,) + _args, _kwargs) + return val + def GetReplaceString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_GetReplaceString,(self,) + _args, _kwargs) + return val + def GetFlags(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_GetFlags,(self,) + _args, _kwargs) + return val + def SetFlags(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_SetFlags,(self,) + _args, _kwargs) + return val + def SetFindString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_SetFindString,(self,) + _args, _kwargs) + return val + def SetReplaceString(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceData_SetReplaceString,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFindReplaceData(wxFindReplaceDataPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(cmndlgsc.new_wxFindReplaceData,_args,_kwargs) + self.thisown = 1 + + + + +class wxFindReplaceDialogPtr(wxDialogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceDialog_Create,(self,) + _args, _kwargs) + return val + def GetData(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceDialog_GetData,(self,) + _args, _kwargs) + if val: val = wxFindReplaceDataPtr(val) + return val + def SetData(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFindReplaceDialog_SetData,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFindReplaceDialog(wxFindReplaceDialogPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(cmndlgsc.new_wxFindReplaceDialog,_args,_kwargs) + self.thisown = 1 + self._setOORInfo(self) + +def wxPreFindReplaceDialog(*_args,**_kwargs): + val = wxFindReplaceDialogPtr(apply(cmndlgsc.new_wxPreFindReplaceDialog,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(self) + return val @@ -346,3 +474,15 @@ class wxProgressDialog(wxProgressDialogPtr): #-------------- VARIABLE WRAPPERS ------------------ +wxFR_DOWN = cmndlgsc.wxFR_DOWN +wxFR_WHOLEWORD = cmndlgsc.wxFR_WHOLEWORD +wxFR_MATCHCASE = cmndlgsc.wxFR_MATCHCASE +wxFR_REPLACEDIALOG = cmndlgsc.wxFR_REPLACEDIALOG +wxFR_NOUPDOWN = cmndlgsc.wxFR_NOUPDOWN +wxFR_NOMATCHCASE = cmndlgsc.wxFR_NOMATCHCASE +wxFR_NOWHOLEWORD = cmndlgsc.wxFR_NOWHOLEWORD +wxEVT_COMMAND_FIND = cmndlgsc.wxEVT_COMMAND_FIND +wxEVT_COMMAND_FIND_NEXT = cmndlgsc.wxEVT_COMMAND_FIND_NEXT +wxEVT_COMMAND_FIND_REPLACE = cmndlgsc.wxEVT_COMMAND_FIND_REPLACE +wxEVT_COMMAND_FIND_REPLACE_ALL = cmndlgsc.wxEVT_COMMAND_FIND_REPLACE_ALL +wxEVT_COMMAND_FIND_CLOSE = cmndlgsc.wxEVT_COMMAND_FIND_CLOSE diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index 17e50e0377..10550eda0b 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -74,28 +72,47 @@ extern PyObject *SWIG_newvarlink(void); #endif +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -104,7 +121,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index 1e1d9f8457..645e86913e 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -33,12 +33,14 @@ class wxControl(wxControlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxControl,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreControl(*_args,**_kwargs): val = wxControlPtr(apply(controlsc.new_wxPreControl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -111,12 +113,14 @@ class wxButton(wxButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreButton(*_args,**_kwargs): val = wxButtonPtr(apply(controlsc.new_wxPreButton,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -170,12 +174,14 @@ class wxBitmapButton(wxBitmapButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxBitmapButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreBitmapButton(*_args,**_kwargs): val = wxBitmapButtonPtr(apply(controlsc.new_wxPreBitmapButton,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -198,12 +204,14 @@ class wxCheckBox(wxCheckBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreCheckBox(*_args,**_kwargs): val = wxCheckBoxPtr(apply(controlsc.new_wxPreCheckBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -241,12 +249,14 @@ class wxChoice(wxChoicePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxChoice,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreChoice(*_args,**_kwargs): val = wxChoicePtr(apply(controlsc.new_wxPreChoice,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -305,12 +315,14 @@ class wxComboBox(wxComboBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxComboBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreComboBox(*_args,**_kwargs): val = wxComboBoxPtr(apply(controlsc.new_wxPreComboBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -351,12 +363,14 @@ class wxGauge(wxGaugePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxGauge,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreGauge(*_args,**_kwargs): val = wxGaugePtr(apply(controlsc.new_wxPreGauge,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -373,12 +387,14 @@ class wxStaticBox(wxStaticBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreStaticBox(*_args,**_kwargs): val = wxStaticBoxPtr(apply(controlsc.new_wxPreStaticBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -395,12 +411,14 @@ class wxStaticLine(wxStaticLinePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticLine,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreStaticLine(*_args,**_kwargs): val = wxStaticLinePtr(apply(controlsc.new_wxPreStaticLine,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -423,12 +441,14 @@ class wxStaticText(wxStaticTextPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticText,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreStaticText(*_args,**_kwargs): val = wxStaticTextPtr(apply(controlsc.new_wxPreStaticText,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -481,12 +501,14 @@ class wxListBox(wxListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxListBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreListBox(*_args,**_kwargs): val = wxListBoxPtr(apply(controlsc.new_wxPreListBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -515,12 +537,14 @@ class wxCheckListBox(wxCheckListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckListBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreCheckListBox(*_args,**_kwargs): val = wxCheckListBoxPtr(apply(controlsc.new_wxPreCheckListBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -705,12 +729,14 @@ class wxTextCtrl(wxTextCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxTextCtrl,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreTextCtrl(*_args,**_kwargs): val = wxTextCtrlPtr(apply(controlsc.new_wxPreTextCtrl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -748,12 +774,14 @@ class wxScrollBar(wxScrollBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxScrollBar,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreScrollBar(*_args,**_kwargs): val = wxScrollBarPtr(apply(controlsc.new_wxPreScrollBar,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -785,12 +813,14 @@ class wxSpinButton(wxSpinButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSpinButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSpinButton(*_args,**_kwargs): val = wxSpinButtonPtr(apply(controlsc.new_wxPreSpinButton,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -817,12 +847,14 @@ class wxStaticBitmap(wxStaticBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticBitmap,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreStaticBitmap(*_args,**_kwargs): val = wxStaticBitmapPtr(apply(controlsc.new_wxPreStaticBitmap,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -879,12 +911,14 @@ class wxRadioBox(wxRadioBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioBox,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreRadioBox(*_args,**_kwargs): val = wxRadioBoxPtr(apply(controlsc.new_wxPreRadioBox,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -907,12 +941,14 @@ class wxRadioButton(wxRadioButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreRadioButton(*_args,**_kwargs): val = wxRadioButtonPtr(apply(controlsc.new_wxPreRadioButton,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -986,12 +1022,14 @@ class wxSlider(wxSliderPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSlider,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSlider(*_args,**_kwargs): val = wxSliderPtr(apply(controlsc.new_wxPreSlider,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -1023,12 +1061,14 @@ class wxSpinCtrl(wxSpinCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSpinCtrl,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSpinCtrl(*_args,**_kwargs): val = wxSpinCtrlPtr(apply(controlsc.new_wxPreSpinCtrl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -1054,12 +1094,14 @@ class wxToggleButton(wxToggleButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxToggleButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreToggleButton(*_args,**_kwargs): val = wxToggleButtonPtr(apply(controlsc.new_wxPreToggleButton,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index fab27ffc3b..083f0fd264 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -63,28 +61,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -93,7 +110,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif // C++ Version of a Python aware class class wxPyListCtrl : public wxListCtrl { @@ -3232,8 +3249,8 @@ static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxListCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxListCtrl__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyListCtrl * _arg0; PyObject * _arg1; @@ -3244,12 +3261,12 @@ static PyObject *_wrap_wxListCtrl__setSelf(PyObject *self, PyObject *args, PyObj char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxListCtrl__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxListCtrl__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl__setSelf. Expected _wxPyListCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl__setCallbackInfo. Expected _wxPyListCtrl_p."); return NULL; } } @@ -3261,7 +3278,7 @@ static PyObject *_wrap_wxListCtrl__setSelf(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - wxListCtrl__setSelf(_arg0,_arg1,_arg2); + wxListCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -6783,8 +6800,8 @@ static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxTreeCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeCtrl__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeCtrl * _arg0; PyObject * _arg1; @@ -6795,12 +6812,12 @@ static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObj char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl__setSelf. Expected _wxPyTreeCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl__setCallbackInfo. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -6812,7 +6829,7 @@ static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl__setSelf(_arg0,_arg1,_arg2); + wxTreeCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -9503,7 +9520,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_SetIndent", (PyCFunction) _wrap_wxTreeCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetIndent", (PyCFunction) _wrap_wxTreeCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetCount", (PyCFunction) _wrap_wxTreeCtrl_GetCount, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeCtrl__setSelf", (PyCFunction) _wrap_wxTreeCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl__setCallbackInfo", (PyCFunction) _wrap_wxTreeCtrl__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_Create", (PyCFunction) _wrap_wxTreeCtrl_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreTreeCtrl", (PyCFunction) _wrap_new_wxPreTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, @@ -9600,7 +9617,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_GetColumn", (PyCFunction) _wrap_wxListCtrl_GetColumn, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SetBackgroundColour", (PyCFunction) _wrap_wxListCtrl_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SetForegroundColour", (PyCFunction) _wrap_wxListCtrl_SetForegroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl__setSelf", (PyCFunction) _wrap_wxListCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl__setCallbackInfo", (PyCFunction) _wrap_wxListCtrl__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_Create", (PyCFunction) _wrap_wxListCtrl_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreListCtrl", (PyCFunction) _wrap_new_wxPreListCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index 95536cf2a0..88862bbc05 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -445,8 +445,8 @@ class wxListCtrlPtr(wxControlPtr): def Create(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_Create,(self,) + _args, _kwargs) return val - def _setSelf(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl__setCallbackInfo,(self,) + _args, _kwargs) return val def SetForegroundColour(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_SetForegroundColour,(self,) + _args, _kwargs) @@ -663,13 +663,15 @@ class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxListCtrl) + self._setCallbackInfo(self, wxListCtrl) + self._setOORInfo(self) def wxPreListCtrl(*_args,**_kwargs): val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -710,12 +712,14 @@ class wxListView(wxListViewPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListView,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreListView(*_args,**_kwargs): val = wxListViewPtr(apply(controls2c.new_wxPreListView,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -856,8 +860,8 @@ class wxTreeCtrlPtr(wxControlPtr): def Create(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_Create,(self,) + _args, _kwargs) return val - def _setSelf(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl__setCallbackInfo,(self,) + _args, _kwargs) return val def GetCount(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs) @@ -1092,13 +1096,15 @@ class wxTreeCtrl(wxTreeCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxTreeCtrl) + self._setCallbackInfo(self, wxTreeCtrl) + self._setOORInfo(self) def wxPreTreeCtrl(*_args,**_kwargs): val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index 218e566e1d..858cb1166a 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,28 +56,47 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -88,7 +105,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp index 9b9e4def3d..03736590c2 100644 --- a/wxPython/src/gtk/filesys.cpp +++ b/wxPython/src/gtk/filesys.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,28 +59,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -91,7 +108,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif // wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling @@ -640,8 +657,8 @@ static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, P return _resultobj; } -#define wxFileSystemHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileSystemHandler__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyFileSystemHandler * _arg0; PyObject * _arg1; @@ -652,12 +669,12 @@ static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *ar char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setSelf. Expected _wxPyFileSystemHandler_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setCallbackInfo. Expected _wxPyFileSystemHandler_p."); return NULL; } } @@ -669,7 +686,7 @@ static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - wxFileSystemHandler__setSelf(_arg0,_arg1,_arg2); + wxFileSystemHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2166,7 +2183,7 @@ static PyMethodDef filesyscMethods[] = { { "wxFileSystemHandler_FindFirst", (PyCFunction) _wrap_wxFileSystemHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, { "wxFileSystemHandler_OpenFile", (PyCFunction) _wrap_wxFileSystemHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, { "wxFileSystemHandler_CanOpen", (PyCFunction) _wrap_wxFileSystemHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, - { "wxFileSystemHandler__setSelf", (PyCFunction) _wrap_wxFileSystemHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler__setCallbackInfo", (PyCFunction) _wrap_wxFileSystemHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileSystemHandler", (PyCFunction) _wrap_new_wxFileSystemHandler, METH_VARARGS | METH_KEYWORDS }, { "wxFSFile_GetModificationTime", (PyCFunction) _wrap_wxFSFile_GetModificationTime, METH_VARARGS | METH_KEYWORDS }, { "wxFSFile_GetAnchor", (PyCFunction) _wrap_wxFSFile_GetAnchor, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/filesys.py b/wxPython/src/gtk/filesys.py index 512b41100c..aa62469411 100644 --- a/wxPython/src/gtk/filesys.py +++ b/wxPython/src/gtk/filesys.py @@ -71,8 +71,8 @@ class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setCallbackInfo,(self,) + _args, _kwargs) return val def CanOpen(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) @@ -107,7 +107,7 @@ class wxFileSystemHandler(wxFileSystemHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxFileSystemHandler) + self._setCallbackInfo(self, wxFileSystemHandler) diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index d3abc56931..b95c3bd079 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/frames.py b/wxPython/src/gtk/frames.py index 7116073502..c662bef744 100644 --- a/wxPython/src/gtk/frames.py +++ b/wxPython/src/gtk/frames.py @@ -62,6 +62,7 @@ class wxTopLevelWindow(wxTopLevelWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxTopLevelWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -124,12 +125,14 @@ class wxFrame(wxFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxFrame,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreFrame(*_args,**_kwargs): val = wxFramePtr(apply(framesc.new_wxPreFrame,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -173,12 +176,14 @@ class wxDialog(wxDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxDialog,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreDialog(*_args,**_kwargs): val = wxDialogPtr(apply(framesc.new_wxPreDialog,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -195,12 +200,14 @@ class wxMiniFrame(wxMiniFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxMiniFrame,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreMiniFrame(*_args,**_kwargs): val = wxMiniFramePtr(apply(framesc.new_wxPreMiniFrame,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -214,6 +221,7 @@ class wxTipWindow(wxTipWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxTipWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index ac5c0ef667..bc68332332 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -66,28 +64,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -96,7 +113,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index b32d7a19db..3b35438d0e 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ @@ -1179,8 +1196,8 @@ static PyObject *_wrap_new_wxPyGridCellRenderer(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyGridCellRenderer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyGridCellRenderer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyGridCellRenderer__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellRenderer__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyGridCellRenderer * _arg0; PyObject * _arg1; @@ -1191,12 +1208,12 @@ static PyObject *_wrap_wxPyGridCellRenderer__setSelf(PyObject *self, PyObject *a char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellRenderer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellRenderer__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellRenderer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer__setSelf. Expected _wxPyGridCellRenderer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer__setCallbackInfo. Expected _wxPyGridCellRenderer_p."); return NULL; } } @@ -1208,7 +1225,7 @@ static PyObject *_wrap_wxPyGridCellRenderer__setSelf(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxPyGridCellRenderer__setSelf(_arg0,_arg1,_arg2); + wxPyGridCellRenderer__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2436,8 +2453,8 @@ static PyObject *_wrap_new_wxPyGridCellEditor(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyGridCellEditor__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyGridCellEditor__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyGridCellEditor__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyGridCellEditor * _arg0; PyObject * _arg1; @@ -2448,12 +2465,12 @@ static PyObject *_wrap_wxPyGridCellEditor__setSelf(PyObject *self, PyObject *arg char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor__setSelf. Expected _wxPyGridCellEditor_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor__setCallbackInfo. Expected _wxPyGridCellEditor_p."); return NULL; } } @@ -2465,7 +2482,7 @@ static PyObject *_wrap_wxPyGridCellEditor__setSelf(PyObject *self, PyObject *arg } { wxPy_BEGIN_ALLOW_THREADS; - wxPyGridCellEditor__setSelf(_arg0,_arg1,_arg2); + wxPyGridCellEditor__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -4331,8 +4348,8 @@ static PyObject *_wrap_new_wxPyGridCellAttrProvider(PyObject *self, PyObject *ar return _resultobj; } -#define wxPyGridCellAttrProvider__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyGridCellAttrProvider__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyGridCellAttrProvider * _arg0; PyObject * _arg1; @@ -4343,12 +4360,12 @@ static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObjec char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellAttrProvider__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellAttrProvider__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider__setSelf. Expected _wxPyGridCellAttrProvider_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider__setCallbackInfo. Expected _wxPyGridCellAttrProvider_p."); return NULL; } } @@ -4360,7 +4377,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - wxPyGridCellAttrProvider__setSelf(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -5773,8 +5790,8 @@ static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxPyGridTableBase__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyGridTableBase__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyGridTableBase__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyGridTableBase * _arg0; PyObject * _arg1; @@ -5785,12 +5802,12 @@ static PyObject *_wrap_wxPyGridTableBase__setSelf(PyObject *self, PyObject *args char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridTableBase__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridTableBase__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase__setSelf. Expected _wxPyGridTableBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase__setCallbackInfo. Expected _wxPyGridTableBase_p."); return NULL; } } @@ -5802,7 +5819,7 @@ static PyObject *_wrap_wxPyGridTableBase__setSelf(PyObject *self, PyObject *args } { wxPy_BEGIN_ALLOW_THREADS; - wxPyGridTableBase__setSelf(_arg0,_arg1,_arg2); + wxPyGridTableBase__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -14233,7 +14250,7 @@ static PyMethodDef gridcMethods[] = { { "wxPyGridTableBase_base_CanGetValueAs", (PyCFunction) _wrap_wxPyGridTableBase_base_CanGetValueAs, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridTableBase_base_GetTypeName", (PyCFunction) _wrap_wxPyGridTableBase_base_GetTypeName, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridTableBase_Destroy", (PyCFunction) _wrap_wxPyGridTableBase_Destroy, METH_VARARGS | METH_KEYWORDS }, - { "wxPyGridTableBase__setSelf", (PyCFunction) _wrap_wxPyGridTableBase__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase__setCallbackInfo", (PyCFunction) _wrap_wxPyGridTableBase__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyGridTableBase", (PyCFunction) _wrap_new_wxPyGridTableBase, METH_VARARGS | METH_KEYWORDS }, { "wxGridTableBase_SetColAttr", (PyCFunction) _wrap_wxGridTableBase_SetColAttr, METH_VARARGS | METH_KEYWORDS }, { "wxGridTableBase_SetRowAttr", (PyCFunction) _wrap_wxGridTableBase_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, @@ -14273,7 +14290,7 @@ static PyMethodDef gridcMethods[] = { { "wxPyGridCellAttrProvider_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellAttrProvider_base_SetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetAttr, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellAttrProvider_base_GetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_GetAttr, METH_VARARGS | METH_KEYWORDS }, - { "wxPyGridCellAttrProvider__setSelf", (PyCFunction) _wrap_wxPyGridCellAttrProvider__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider__setCallbackInfo", (PyCFunction) _wrap_wxPyGridCellAttrProvider__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyGridCellAttrProvider", (PyCFunction) _wrap_new_wxPyGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttrProvider_UpdateAttrCols", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrCols, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttrProvider_UpdateAttrRows", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrRows, METH_VARARGS | METH_KEYWORDS }, @@ -14326,7 +14343,7 @@ static PyMethodDef gridcMethods[] = { { "wxPyGridCellEditor_base_PaintBackground", (PyCFunction) _wrap_wxPyGridCellEditor_base_PaintBackground, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor_base_Show", (PyCFunction) _wrap_wxPyGridCellEditor_base_Show, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor_base_SetSize", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxPyGridCellEditor__setSelf", (PyCFunction) _wrap_wxPyGridCellEditor__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor__setCallbackInfo", (PyCFunction) _wrap_wxPyGridCellEditor__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyGridCellEditor", (PyCFunction) _wrap_new_wxPyGridCellEditor, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_Destroy", (PyCFunction) _wrap_wxGridCellEditor_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_HandleReturn", (PyCFunction) _wrap_wxGridCellEditor_HandleReturn, METH_VARARGS | METH_KEYWORDS }, @@ -14359,7 +14376,7 @@ static PyMethodDef gridcMethods[] = { { "new_wxGridCellNumberRenderer", (PyCFunction) _wrap_new_wxGridCellNumberRenderer, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridCellStringRenderer", (PyCFunction) _wrap_new_wxGridCellStringRenderer, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellRenderer_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellRenderer_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, - { "wxPyGridCellRenderer__setSelf", (PyCFunction) _wrap_wxPyGridCellRenderer__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellRenderer__setCallbackInfo", (PyCFunction) _wrap_wxPyGridCellRenderer__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyGridCellRenderer", (PyCFunction) _wrap_new_wxPyGridCellRenderer, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellRenderer_Clone", (PyCFunction) _wrap_wxGridCellRenderer_Clone, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellRenderer_GetBestSize", (PyCFunction) _wrap_wxGridCellRenderer_GetBestSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 69fa227da9..4cf0ef1691 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -100,8 +100,8 @@ class wxPyGridCellRendererPtr(wxGridCellRendererPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(gridc.wxPyGridCellRenderer__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellRenderer__setCallbackInfo,(self,) + _args, _kwargs) return val def base_SetParameters(self, *_args, **_kwargs): val = apply(gridc.wxPyGridCellRenderer_base_SetParameters,(self,) + _args, _kwargs) @@ -112,7 +112,7 @@ class wxPyGridCellRenderer(wxPyGridCellRendererPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxPyGridCellRenderer,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyGridCellRenderer) + self._setCallbackInfo(self, wxPyGridCellRenderer) @@ -302,8 +302,8 @@ class wxPyGridCellEditorPtr(wxGridCellEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(gridc.wxPyGridCellEditor__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor__setCallbackInfo,(self,) + _args, _kwargs) return val def base_SetSize(self, *_args, **_kwargs): val = apply(gridc.wxPyGridCellEditor_base_SetSize,(self,) + _args, _kwargs) @@ -338,7 +338,7 @@ class wxPyGridCellEditor(wxPyGridCellEditorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxPyGridCellEditor,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyGridCellEditor) + self._setCallbackInfo(self, wxPyGridCellEditor) @@ -585,8 +585,8 @@ class wxPyGridCellAttrProviderPtr(wxGridCellAttrProviderPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(gridc.wxPyGridCellAttrProvider__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider__setCallbackInfo,(self,) + _args, _kwargs) return val def base_GetAttr(self, *_args, **_kwargs): val = apply(gridc.wxPyGridCellAttrProvider_base_GetAttr,(self,) + _args, _kwargs) @@ -607,7 +607,7 @@ class wxPyGridCellAttrProvider(wxPyGridCellAttrProviderPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxPyGridCellAttrProvider,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyGridCellAttrProvider) + self._setCallbackInfo(self, wxPyGridCellAttrProvider) @@ -733,8 +733,8 @@ class wxPyGridTableBasePtr(wxGridTableBasePtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(gridc.wxPyGridTableBase__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase__setCallbackInfo,(self,) + _args, _kwargs) return val def Destroy(self, *_args, **_kwargs): val = apply(gridc.wxPyGridTableBase_Destroy,(self,) + _args, _kwargs) @@ -803,7 +803,7 @@ class wxPyGridTableBase(wxPyGridTableBasePtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyGridTableBase) + self._setCallbackInfo(self, wxPyGridTableBase) @@ -1432,6 +1432,7 @@ class wxGrid(wxGridPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxGrid,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) diff --git a/wxPython/src/gtk/help.cpp b/wxPython/src/gtk/help.cpp index 3ff2894dee..7d53dc3cc1 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/help.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,28 +56,47 @@ extern PyObject *SWIG_newvarlink(void); #include "export.h" #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -88,7 +105,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/help.py b/wxPython/src/gtk/help.py index 7f7f764c04..9da1a4e532 100644 --- a/wxPython/src/gtk/help.py +++ b/wxPython/src/gtk/help.py @@ -116,6 +116,7 @@ class wxContextHelpButton(wxContextHelpButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(helpc.new_wxContextHelpButton,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 052944c555..db74c73a63 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,28 +63,47 @@ extern PyObject *SWIG_newvarlink(void); #include "printfw.h" +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -95,7 +112,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif class wxPyHtmlTagHandler : public wxHtmlTagHandler { @@ -206,16 +223,21 @@ public: void base_OnLinkClicked(const wxHtmlLinkInfo& link); DEC_PYCALLBACK__STRING(OnSetTitle); + DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover); + DEC_PYCALLBACK__CELLINTINTME(OnCellClicked); PYPRIVATE; }; IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow ); IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); +IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover); +IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked); + void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool found; wxPyTState* state = wxPyBeginBlockThreads(); - if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked)"))) { + if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked"))) { PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); Py_DECREF(obj); @@ -228,6 +250,7 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { wxHtmlWindow::OnLinkClicked(link); } + void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) { wxHtmlWindow::AddFilter(filter); } @@ -2274,8 +2297,8 @@ static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxHtmlTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxHtmlTagHandler__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlTagHandler__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlTagHandler * _arg0; PyObject * _arg1; @@ -2286,12 +2309,12 @@ static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlTagHandler__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlTagHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler__setSelf. Expected _wxPyHtmlTagHandler_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler__setCallbackInfo. Expected _wxPyHtmlTagHandler_p."); return NULL; } } @@ -2303,7 +2326,7 @@ static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlTagHandler__setSelf(_arg0,_arg1,_arg2); + wxHtmlTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2458,8 +2481,8 @@ static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, P return _resultobj; } -#define wxHtmlWinTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxHtmlWinTagHandler__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWinTagHandler__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWinTagHandler * _arg0; PyObject * _arg1; @@ -2470,12 +2493,12 @@ static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *ar char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWinTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWinTagHandler__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWinTagHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler__setSelf. Expected _wxPyHtmlWinTagHandler_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler__setCallbackInfo. Expected _wxPyHtmlWinTagHandler_p."); return NULL; } } @@ -2487,7 +2510,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWinTagHandler__setSelf(_arg0,_arg1,_arg2); + wxHtmlWinTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4070,8 +4093,8 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxHtmlWindow__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxHtmlWindow__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWindow * _arg0; PyObject * _arg1; @@ -4082,12 +4105,12 @@ static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyO char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWindow__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWindow__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow__setSelf. Expected _wxPyHtmlWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow__setCallbackInfo. Expected _wxPyHtmlWindow_p."); return NULL; } } @@ -4099,7 +4122,7 @@ static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyO } { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow__setSelf(_arg0,_arg1,_arg2); + wxHtmlWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4951,6 +4974,91 @@ static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *ar return _resultobj; } +#define wxHtmlWindow_base_OnCellMouseHover(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_OnCellMouseHover(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlWindow_base_OnCellMouseHover(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxHtmlCell * _arg1; + wxCoord _arg2; + wxCoord _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cell","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxHtmlWindow_base_OnCellMouseHover",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_base_OnCellMouseHover. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_base_OnCellMouseHover. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_base_OnCellMouseHover(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_base_OnCellClicked(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->base_OnCellClicked(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxHtmlWindow_base_OnCellClicked(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxHtmlCell * _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxMouseEvent * _arg4; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "self","cell","x","y","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiiO:wxHtmlWindow_base_OnCellClicked",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_argo4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_base_OnCellClicked. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_base_OnCellClicked. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxHtmlWindow_base_OnCellClicked. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_base_OnCellClicked(_arg0,_arg1,_arg2,_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxHtmlDCRendererTowxObject(void *ptr) { wxHtmlDCRenderer *src; wxObject *dest; @@ -6098,6 +6206,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlDCRenderer_SetDC", (PyCFunction) _wrap_wxHtmlDCRenderer_SetDC, METH_VARARGS | METH_KEYWORDS }, { "delete_wxHtmlDCRenderer", (PyCFunction) _wrap_delete_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlDCRenderer", (PyCFunction) _wrap_new_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_base_OnCellClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnCellClicked, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_base_OnCellMouseHover", (PyCFunction) _wrap_wxHtmlWindow_base_OnCellMouseHover, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnSetTitle", (PyCFunction) _wrap_wxHtmlWindow_base_OnSetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnLinkClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnLinkClicked, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, @@ -6120,7 +6230,7 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_GetOpenedPage", (PyCFunction) _wrap_wxHtmlWindow_GetOpenedPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlWindow__setSelf", (PyCFunction) _wrap_wxHtmlWindow__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow__setCallbackInfo", (PyCFunction) _wrap_wxHtmlWindow__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlFontCell", (PyCFunction) _wrap_new_wxHtmlFontCell, METH_VARARGS | METH_KEYWORDS }, @@ -6164,12 +6274,12 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWinTagHandler_ParseInner", (PyCFunction) _wrap_wxHtmlWinTagHandler_ParseInner, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinTagHandler_GetParser", (PyCFunction) _wrap_wxHtmlWinTagHandler_GetParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinTagHandler_SetParser", (PyCFunction) _wrap_wxHtmlWinTagHandler_SetParser, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlWinTagHandler__setSelf", (PyCFunction) _wrap_wxHtmlWinTagHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinTagHandler__setCallbackInfo", (PyCFunction) _wrap_wxHtmlWinTagHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWinTagHandler", (PyCFunction) _wrap_new_wxHtmlWinTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlTagHandler_ParseInner", (PyCFunction) _wrap_wxHtmlTagHandler_ParseInner, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlTagHandler_GetParser", (PyCFunction) _wrap_wxHtmlTagHandler_GetParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlTagHandler_SetParser", (PyCFunction) _wrap_wxHtmlTagHandler_SetParser, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlTagHandler__setSelf", (PyCFunction) _wrap_wxHtmlTagHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTagHandler__setCallbackInfo", (PyCFunction) _wrap_wxHtmlTagHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlTagHandler", (PyCFunction) _wrap_new_wxHtmlTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinParser_GetLink", (PyCFunction) _wrap_wxHtmlWinParser_GetLink, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinParser_CreateCurrentFont", (PyCFunction) _wrap_wxHtmlWinParser_CreateCurrentFont, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index 9f06c597e8..77afb80d45 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -267,8 +267,8 @@ class wxHtmlTagHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(htmlc.wxHtmlTagHandler__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTagHandler__setCallbackInfo,(self,) + _args, _kwargs) return val def SetParser(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlTagHandler_SetParser,(self,) + _args, _kwargs) @@ -286,7 +286,7 @@ class wxHtmlTagHandler(wxHtmlTagHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlTagHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxHtmlTagHandler) + self._setCallbackInfo(self, wxHtmlTagHandler) @@ -295,8 +295,8 @@ class wxHtmlWinTagHandlerPtr(wxHtmlTagHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(htmlc.wxHtmlWinTagHandler__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinTagHandler__setCallbackInfo,(self,) + _args, _kwargs) return val def SetParser(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinTagHandler_SetParser,(self,) + _args, _kwargs) @@ -314,7 +314,7 @@ class wxHtmlWinTagHandler(wxHtmlWinTagHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlWinTagHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxHtmlWinTagHandler) + self._setCallbackInfo(self, wxHtmlWinTagHandler) @@ -511,8 +511,8 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(htmlc.wxHtmlWindow__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow__setCallbackInfo,(self,) + _args, _kwargs) return val def SetPage(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_SetPage,(self,) + _args, _kwargs) @@ -582,15 +582,20 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def base_OnSetTitle(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_base_OnSetTitle,(self,) + _args, _kwargs) return val + def base_OnCellMouseHover(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_base_OnCellMouseHover,(self,) + _args, _kwargs) + return val + def base_OnCellClicked(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_base_OnCellClicked,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxHtmlWindow(wxHtmlWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlWindow,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxHtmlWindow) - #wx._StdWindowCallbacks(self) - #wx._StdOnScrollCallbacks(self) + self._setCallbackInfo(self, wxHtmlWindow) + self._setOORInfo(self) diff --git a/wxPython/src/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp index 372b9744ae..58237236ba 100644 --- a/wxPython/src/gtk/htmlhelp.cpp +++ b/wxPython/src/gtk/htmlhelp.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -63,28 +61,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -93,7 +110,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/htmlhelp.py b/wxPython/src/gtk/htmlhelp.py index 912a0dca35..b7c5e95d9c 100644 --- a/wxPython/src/gtk/htmlhelp.py +++ b/wxPython/src/gtk/htmlhelp.py @@ -233,6 +233,7 @@ class wxHtmlHelpFrame(wxHtmlHelpFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlhelpc.new_wxHtmlHelpFrame,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -287,6 +288,7 @@ class wxHtmlHelpController(wxHtmlHelpControllerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlhelpc.new_wxHtmlHelpController,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) diff --git a/wxPython/src/gtk/image.cpp b/wxPython/src/gtk/image.cpp index c0d209fadb..b77efd75c1 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,28 +56,47 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -88,7 +105,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif wxImage* wxEmptyImage(int width=0, int height=0) { diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index f34e58c452..d6d8f56ebb 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,28 +55,47 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -87,7 +104,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/mdi.py b/wxPython/src/gtk/mdi.py index 51c9ba0a5e..d61ed1a618 100644 --- a/wxPython/src/gtk/mdi.py +++ b/wxPython/src/gtk/mdi.py @@ -54,12 +54,14 @@ class wxMDIParentFrame(wxMDIParentFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIParentFrame,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreMDIParentFrame(*_args,**_kwargs): val = wxMDIParentFramePtr(apply(mdic.new_wxPreMDIParentFrame,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -85,12 +87,14 @@ class wxMDIChildFrame(wxMDIChildFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIChildFrame,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreMDIChildFrame(*_args,**_kwargs): val = wxMDIChildFramePtr(apply(mdic.new_wxPreMDIChildFrame,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -107,16 +111,14 @@ class wxMDIClientWindow(wxMDIClientWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIClientWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) - #wx._StdOnScrollCallbacks(self) - #wx._StdWindowCallbacks(self) - #wx._StdOnScrollCallbacks(self) + self._setOORInfo(self) def wxPreMDIClientWindow(*_args,**_kwargs): val = wxMDIClientWindowPtr(apply(mdic.new_wxPreMDIClientWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index db54d16b16..abefb81588 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,28 +58,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -90,7 +107,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index b0553ab9c9..acece44966 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -71,28 +69,47 @@ extern PyObject *SWIG_newvarlink(void); #include #endif +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -101,7 +118,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); @@ -160,6 +177,34 @@ IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip); #include + +// A Log class that can be derived from in wxPython +class wxPyLog : public wxLog { +public: + wxPyLog() : wxLog() {} + + virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t) { + bool found; + wxPyTState* state = wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); + wxPyEndBlockThreads(state); + if (! found) + wxLog::DoLog(level, szString, t); + } + + virtual void DoLogString(const wxChar *szString, time_t t) { + bool found; + wxPyTState* state = wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); + wxPyEndBlockThreads(state); + if (! found) + wxLog::DoLogString(szString, t); + } + + PYPRIVATE; +}; // C++ version of wxProcess derived class class wxPyProcess : public wxProcess { @@ -2921,8 +2966,8 @@ static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, P return _resultobj; } -#define wxFontEnumerator__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontEnumerator__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontEnumerator__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyFontEnumerator * _arg0; PyObject * _arg1; @@ -2933,12 +2978,12 @@ static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFontEnumerator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFontEnumerator__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setSelf. Expected _wxPyFontEnumerator_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setCallbackInfo. Expected _wxPyFontEnumerator_p."); return NULL; } } @@ -2950,7 +2995,7 @@ static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - wxFontEnumerator__setSelf(_arg0,_arg1,_arg2); + wxFontEnumerator__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4631,6 +4676,58 @@ static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyO return _resultobj; } +static PyObject *_wrap_wxLog_ClearTraceMasks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_ClearTraceMasks",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::ClearTraceMasks(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_SetTimestamp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChar * _arg0; + char *_kwnames[] = { "ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLog_SetTimestamp",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::SetTimestamp(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetTimestamp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChar * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetTimestamp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxChar *)wxLog::GetTimestamp(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + #define wxLog_GetVerbose(_swigobj) (_swigobj->GetVerbose()) static PyObject *_wrap_wxLog_GetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4695,6 +4792,42 @@ static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, return _resultobj; } +static wxString wxLog_TimeStamp(wxLog *self) { + wxString msg; + wxLog::TimeStamp(&msg); + return msg; + } +static PyObject *_wrap_wxLog_TimeStamp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_TimeStamp",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_TimeStamp. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxLog_TimeStamp(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static void *SwigwxLogStderrTowxLog(void *ptr) { wxLogStderr *src; wxLog *dest; @@ -5052,6 +5185,272 @@ static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxLogChainTowxLog(void *ptr) { + wxLogChain *src; + wxLog *dest; + src = (wxLogChain *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogChain(_swigarg0) (new wxLogChain(_swigarg0)) +static PyObject *_wrap_new_wxLogChain(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogChain * _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "logger", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxLogChain",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLogChain. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogChain *)new_wxLogChain(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogChain_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogChain_SetLog(_swigobj,_swigarg0) (_swigobj->SetLog(_swigarg0)) +static PyObject *_wrap_wxLogChain_SetLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogChain * _arg0; + wxLog * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","logger", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxLogChain_SetLog",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogChain_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogChain_SetLog. Expected _wxLogChain_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxLogChain_SetLog. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogChain_SetLog(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLogChain_PassMessages(_swigobj,_swigarg0) (_swigobj->PassMessages(_swigarg0)) +static PyObject *_wrap_wxLogChain_PassMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogChain * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","bDoPass", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxLogChain_PassMessages",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogChain_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogChain_PassMessages. Expected _wxLogChain_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogChain_PassMessages(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLogChain_IsPassingMessages(_swigobj) (_swigobj->IsPassingMessages()) +static PyObject *_wrap_wxLogChain_IsPassingMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLogChain * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogChain_IsPassingMessages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogChain_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogChain_IsPassingMessages. Expected _wxLogChain_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLogChain_IsPassingMessages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxLogChain_GetOldLog(_swigobj) (_swigobj->GetOldLog()) +static PyObject *_wrap_wxLogChain_GetOldLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + wxLogChain * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogChain_GetOldLog",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogChain_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogChain_GetOldLog. Expected _wxLogChain_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLogChain_GetOldLog(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxPyLogTowxLog(void *ptr) { + wxPyLog *src; + wxLog *dest; + src = (wxPyLog *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxPyLog() (new wxPyLog()) +static PyObject *_wrap_new_wxPyLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyLog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyLog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyLog *)new_wxPyLog(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyLog__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyLog__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyLog * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyLog__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyLog__setCallbackInfo. Expected _wxPyLog_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyLog__setCallbackInfo(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxPyLog_Destroy(wxPyLog *self) { delete self; } +static PyObject *_wrap_wxPyLog_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyLog_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyLog_Destroy. Expected _wxPyLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyLog_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxProcessEventTowxEvent(void *ptr) { wxProcessEvent *src; wxEvent *dest; @@ -5338,8 +5737,8 @@ static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxProcess__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxProcess__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyProcess * _arg0; PyObject * _arg1; @@ -5350,12 +5749,12 @@ static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObje char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setSelf. Expected _wxPyProcess_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setCallbackInfo. Expected _wxPyProcess_p."); return NULL; } } @@ -5367,7 +5766,7 @@ static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - wxProcess__setSelf(_arg0,_arg1,_arg2); + wxProcess__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -7031,7 +7430,7 @@ static PyMethodDef misc2cMethods[] = { { "wxProcess_IsRedirected", (PyCFunction) _wrap_wxProcess_IsRedirected, METH_VARARGS | METH_KEYWORDS }, { "wxProcess_Redirect", (PyCFunction) _wrap_wxProcess_Redirect, METH_VARARGS | METH_KEYWORDS }, { "wxProcess_base_OnTerminate", (PyCFunction) _wrap_wxProcess_base_OnTerminate, METH_VARARGS | METH_KEYWORDS }, - { "wxProcess__setSelf", (PyCFunction) _wrap_wxProcess__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess__setCallbackInfo", (PyCFunction) _wrap_wxProcess__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "wxProcess_Destroy", (PyCFunction) _wrap_wxProcess_Destroy, METH_VARARGS | METH_KEYWORDS }, { "new_wxProcess", (PyCFunction) _wrap_new_wxProcess, METH_VARARGS | METH_KEYWORDS }, { "wxProcessEvent_m_exitcode_get", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_get, METH_VARARGS | METH_KEYWORDS }, @@ -7041,6 +7440,14 @@ static PyMethodDef misc2cMethods[] = { { "wxProcessEvent_GetExitCode", (PyCFunction) _wrap_wxProcessEvent_GetExitCode, METH_VARARGS | METH_KEYWORDS }, { "wxProcessEvent_GetPid", (PyCFunction) _wrap_wxProcessEvent_GetPid, METH_VARARGS | METH_KEYWORDS }, { "new_wxProcessEvent", (PyCFunction) _wrap_new_wxProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxPyLog_Destroy", (PyCFunction) _wrap_wxPyLog_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxPyLog__setCallbackInfo", (PyCFunction) _wrap_wxPyLog__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyLog", (PyCFunction) _wrap_new_wxPyLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLogChain_GetOldLog", (PyCFunction) _wrap_wxLogChain_GetOldLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLogChain_IsPassingMessages", (PyCFunction) _wrap_wxLogChain_IsPassingMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogChain_PassMessages", (PyCFunction) _wrap_wxLogChain_PassMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogChain_SetLog", (PyCFunction) _wrap_wxLogChain_SetLog, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogChain", (PyCFunction) _wrap_new_wxLogChain, METH_VARARGS | METH_KEYWORDS }, { "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS }, @@ -7052,9 +7459,13 @@ static PyMethodDef misc2cMethods[] = { { "new_wxLogGui", (PyCFunction) _wrap_new_wxLogGui, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogTextCtrl", (PyCFunction) _wrap_new_wxLogTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogStderr", (PyCFunction) _wrap_new_wxLogStderr, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_TimeStamp", (PyCFunction) _wrap_wxLog_TimeStamp, METH_VARARGS | METH_KEYWORDS }, { "wxLog_IsAllowedTraceMask", (PyCFunction) _wrap_wxLog_IsAllowedTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_GetTraceMask", (PyCFunction) _wrap_wxLog_GetTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_GetVerbose", (PyCFunction) _wrap_wxLog_GetVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetTimestamp", (PyCFunction) _wrap_wxLog_GetTimestamp, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetTimestamp", (PyCFunction) _wrap_wxLog_SetTimestamp, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_ClearTraceMasks", (PyCFunction) _wrap_wxLog_ClearTraceMasks, METH_VARARGS | METH_KEYWORDS }, { "wxLog_RemoveTraceMask", (PyCFunction) _wrap_wxLog_RemoveTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_AddTraceMask", (PyCFunction) _wrap_wxLog_AddTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_SetTraceMask", (PyCFunction) _wrap_wxLog_SetTraceMask, METH_VARARGS | METH_KEYWORDS }, @@ -7108,7 +7519,7 @@ static PyMethodDef misc2cMethods[] = { { "wxFontEnumerator_GetEncodings", (PyCFunction) _wrap_wxFontEnumerator_GetEncodings, METH_VARARGS | METH_KEYWORDS }, { "wxFontEnumerator_EnumerateEncodings", (PyCFunction) _wrap_wxFontEnumerator_EnumerateEncodings, METH_VARARGS | METH_KEYWORDS }, { "wxFontEnumerator_EnumerateFacenames", (PyCFunction) _wrap_wxFontEnumerator_EnumerateFacenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator__setCallbackInfo", (PyCFunction) _wrap_wxFontEnumerator__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, { "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS }, @@ -7213,6 +7624,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, { "_class_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxLog","_class_wxPyLog",SwigwxPyLogTowxLog}, + { "_wxLog","_wxPyLog",SwigwxPyLogTowxLog}, + { "_wxLog","_class_wxLogChain",SwigwxLogChainTowxLog}, + { "_wxLog","_wxLogChain",SwigwxLogChainTowxLog}, { "_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, @@ -7292,6 +7707,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxToolTip",SwigwxToolTipTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_class_wxLog","_class_wxPyLog",SwigwxPyLogTowxLog}, + { "_class_wxLog","_wxPyLog",SwigwxPyLogTowxLog}, + { "_class_wxLog","_class_wxLogChain",SwigwxLogChainTowxLog}, + { "_class_wxLog","_wxLogChain",SwigwxLogChainTowxLog}, { "_class_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_class_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, { "_class_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index 0d80f8658f..358a25ac3c 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -100,8 +100,8 @@ class wxFontEnumeratorPtr : def __del__(self,misc2c=misc2c): if self.thisown == 1 : misc2c.delete_wxFontEnumerator(self) - def _setSelf(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator__setCallbackInfo,(self,) + _args, _kwargs) return val def EnumerateFacenames(self, *_args, **_kwargs): val = apply(misc2c.wxFontEnumerator_EnumerateFacenames,(self,) + _args, _kwargs) @@ -121,7 +121,7 @@ class wxFontEnumerator(wxFontEnumeratorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxFontEnumerator) + self._setCallbackInfo(self, wxFontEnumerator) @@ -329,6 +329,9 @@ class wxLogPtr : def GetVerbose(self, *_args, **_kwargs): val = apply(misc2c.wxLog_GetVerbose,(self,) + _args, _kwargs) return val + def TimeStamp(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_TimeStamp,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxLog(wxLogPtr): @@ -428,6 +431,54 @@ class wxLogNull(wxLogNullPtr): +class wxLogChainPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetLog(self, *_args, **_kwargs): + val = apply(misc2c.wxLogChain_SetLog,(self,) + _args, _kwargs) + return val + def PassMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogChain_PassMessages,(self,) + _args, _kwargs) + return val + def IsPassingMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogChain_IsPassingMessages,(self,) + _args, _kwargs) + return val + def GetOldLog(self, *_args, **_kwargs): + val = apply(misc2c.wxLogChain_GetOldLog,(self,) + _args, _kwargs) + if val: val = wxLogPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxLogChain(wxLogChainPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogChain,_args,_kwargs) + self.thisown = 1 + + + + +class wxPyLogPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(misc2c.wxPyLog__setCallbackInfo,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(misc2c.wxPyLog_Destroy,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyLog(wxPyLogPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxPyLog,_args,_kwargs) + self.thisown = 1 + self._setCallbackInfo(self, wxPyLog) + + + + class wxProcessEventPtr(wxEventPtr): def __init__(self,this): self.this = this @@ -469,8 +520,8 @@ class wxProcessPtr(wxEvtHandlerPtr): def Destroy(self, *_args, **_kwargs): val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs) return val - def _setSelf(self, *_args, **_kwargs): - val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess__setCallbackInfo,(self,) + _args, _kwargs) return val def base_OnTerminate(self, *_args, **_kwargs): val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs) @@ -503,7 +554,7 @@ class wxProcess(wxProcessPtr): def __init__(self,*_args,**_kwargs): self.this = apply(misc2c.new_wxProcess,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxProcess) + self._setCallbackInfo(self, wxProcess) @@ -868,6 +919,12 @@ wxLog_AddTraceMask = misc2c.wxLog_AddTraceMask wxLog_RemoveTraceMask = misc2c.wxLog_RemoveTraceMask +wxLog_ClearTraceMasks = misc2c.wxLog_ClearTraceMasks + +wxLog_SetTimestamp = misc2c.wxLog_SetTimestamp + +wxLog_GetTimestamp = misc2c.wxLog_GetTimestamp + wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index 59bf2bf229..dbd3a3d37a 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,28 +59,47 @@ extern PyObject *SWIG_newvarlink(void); #include "printfw.h" +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -91,7 +108,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif @@ -3561,8 +3578,8 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxPrintout__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPrintout__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPrintout__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyPrintout * _arg0; PyObject * _arg1; @@ -3573,12 +3590,12 @@ static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObj char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPrintout__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPrintout__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPrintout_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintout__setSelf. Expected _wxPyPrintout_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintout__setCallbackInfo. Expected _wxPyPrintout_p."); return NULL; } } @@ -3590,7 +3607,7 @@ static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - wxPrintout__setSelf(_arg0,_arg1,_arg2); + wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -5182,7 +5199,7 @@ static PyMethodDef printfwcMethods[] = { { "wxPrintout_GetPageSizeMM", (PyCFunction) _wrap_wxPrintout_GetPageSizeMM, METH_VARARGS | METH_KEYWORDS }, { "wxPrintout_GetDC", (PyCFunction) _wrap_wxPrintout_GetDC, METH_VARARGS | METH_KEYWORDS }, { "wxPrintout_Destroy", (PyCFunction) _wrap_wxPrintout_Destroy, METH_VARARGS | METH_KEYWORDS }, - { "wxPrintout__setSelf", (PyCFunction) _wrap_wxPrintout__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPrintout__setCallbackInfo", (PyCFunction) _wrap_wxPrintout__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPrintout", (PyCFunction) _wrap_new_wxPrintout, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialog_ShowModal", (PyCFunction) _wrap_wxPrintDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialog_GetPrintDC", (PyCFunction) _wrap_wxPrintDialog_GetPrintDC, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/printfw.py b/wxPython/src/gtk/printfw.py index 59f20116df..f808d8ce14 100644 --- a/wxPython/src/gtk/printfw.py +++ b/wxPython/src/gtk/printfw.py @@ -11,13 +11,13 @@ from clip_dnd import * from cmndlgs import * +from events import * + from frames import * from stattool import * from controls import * - -from events import * import wx class wxPrintDataPtr(wxObjectPtr): def __init__(self,this): @@ -399,8 +399,8 @@ class wxPrintoutPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(printfwc.wxPrintout__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(printfwc.wxPrintout__setCallbackInfo,(self,) + _args, _kwargs) return val def Destroy(self, *_args, **_kwargs): val = apply(printfwc.wxPrintout_Destroy,(self,) + _args, _kwargs) @@ -450,7 +450,7 @@ class wxPrintout(wxPrintoutPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPrintout,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPrintout) + self._setCallbackInfo(self, wxPrintout) @@ -567,7 +567,7 @@ class wxPreviewFrame(wxPreviewFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPreviewFrame,_args,_kwargs) self.thisown = 1 - #wx._StdFrameCallbacks(self) + self._setOORInfo(self) diff --git a/wxPython/src/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp index c50cbc2989..959e7a355e 100644 --- a/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/sizers.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif class wxPySizer : public wxSizer { @@ -1844,8 +1861,8 @@ static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define wxPySizer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPySizer__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPySizer__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPySizer * _arg0; PyObject * _arg1; @@ -1856,12 +1873,12 @@ static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObje char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPySizer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPySizer__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPySizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPySizer__setSelf. Expected _wxPySizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPySizer__setCallbackInfo. Expected _wxPySizer_p."); return NULL; } } @@ -1873,7 +1890,7 @@ static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - wxPySizer__setSelf(_arg0,_arg1,_arg2); + wxPySizer__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2885,7 +2902,7 @@ static PyMethodDef sizerscMethods[] = { { "wxBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_GetOrientation", (PyCFunction) _wrap_wxBoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "new_wxBoxSizer", (PyCFunction) _wrap_new_wxBoxSizer, METH_VARARGS | METH_KEYWORDS }, - { "wxPySizer__setSelf", (PyCFunction) _wrap_wxPySizer__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPySizer__setCallbackInfo", (PyCFunction) _wrap_wxPySizer__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPySizer", (PyCFunction) _wrap_new_wxPySizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetChildren", (PyCFunction) _wrap_wxSizer_GetChildren, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetSizeHints", (PyCFunction) _wrap_wxSizer_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 16cd952a4b..e0105a3495 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -242,8 +242,8 @@ class wxPySizerPtr(wxSizerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(sizersc.wxPySizer__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(sizersc.wxPySizer__setCallbackInfo,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -251,7 +251,7 @@ class wxPySizer(wxPySizerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(sizersc.new_wxPySizer,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPySizer) + self._setCallbackInfo(self, wxPySizer) diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index cfc6f690f4..2ccb8f17b6 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); diff --git a/wxPython/src/gtk/stattool.py b/wxPython/src/gtk/stattool.py index d691c4579a..b16541246c 100644 --- a/wxPython/src/gtk/stattool.py +++ b/wxPython/src/gtk/stattool.py @@ -54,13 +54,14 @@ class wxStatusBar(wxStatusBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxStatusBar,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) + self._setOORInfo(self) def wxPreStatusBar(*_args,**_kwargs): val = wxStatusBarPtr(apply(stattoolc.new_wxPreStatusBar,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -311,13 +312,14 @@ class wxToolBar(wxToolBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBar,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) + self._setOORInfo(self) def wxPreToolBar(*_args,**_kwargs): val = wxToolBarPtr(apply(stattoolc.new_wxPreToolBar,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -337,13 +339,14 @@ class wxToolBarSimple(wxToolBarSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBarSimple,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) + self._setOORInfo(self) def wxPreToolBarSimple(*_args,**_kwargs): val = wxToolBarSimplePtr(apply(stattoolc.new_wxPreToolBarSimple,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/streams.cpp b/wxPython/src/gtk/streams.cpp index da63611e8a..1d20a2ebe5 100644 --- a/wxPython/src/gtk/streams.cpp +++ b/wxPython/src/gtk/streams.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif // C++ // definitions of wxStringPtrList and wxPyInputStream diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index c01af66cd9..1777df58c6 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,28 +58,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -90,7 +107,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 9c8bd1639e..d94baee7bf 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,28 +57,47 @@ extern PyObject *SWIG_newvarlink(void); #include #include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,7 +106,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); @@ -517,6 +534,41 @@ static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, P return _resultobj; } +static void wxEvtHandler__setOORInfo(wxEvtHandler *self,PyObject * _self) { + self->SetClientObject(new wxPyClientData(_self)); + } +static PyObject *_wrap_wxEvtHandler__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _arg0; + PyObject * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","_self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxEvtHandler__setOORInfo",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler__setOORInfo. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxEvtHandler__setOORInfo(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxValidatorTowxEvtHandler(void *ptr) { wxValidator *src; wxEvtHandler *dest; @@ -739,8 +791,8 @@ static PyObject *_wrap_new_wxPyValidator(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyValidator__setCallbackInfo(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyValidator__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyValidator * _arg0; PyObject * _arg1; @@ -752,12 +804,12 @@ static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxPyValidator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxPyValidator__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyValidator__setSelf. Expected _wxPyValidator_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyValidator__setCallbackInfo. Expected _wxPyValidator_p."); return NULL; } } @@ -769,7 +821,7 @@ static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxPyValidator__setSelf(_arg0,_arg1,_arg2,_arg3); + wxPyValidator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -10153,7 +10205,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Create", (PyCFunction) _wrap_wxWindow_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreWindow", (PyCFunction) _wrap_new_wxPreWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindow", (PyCFunction) _wrap_new_wxWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxPyValidator__setSelf", (PyCFunction) _wrap_wxPyValidator__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyValidator__setCallbackInfo", (PyCFunction) _wrap_wxPyValidator__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyValidator", (PyCFunction) _wrap_new_wxPyValidator, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, @@ -10161,6 +10213,7 @@ static PyMethodDef windowscMethods[] = { { "wxValidator_GetWindow", (PyCFunction) _wrap_wxValidator_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_Clone", (PyCFunction) _wrap_wxValidator_Clone, METH_VARARGS | METH_KEYWORDS }, { "new_wxValidator", (PyCFunction) _wrap_new_wxValidator, METH_VARARGS | METH_KEYWORDS }, + { "wxEvtHandler__setOORInfo", (PyCFunction) _wrap_wxEvtHandler__setOORInfo, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_Disconnect", (PyCFunction) _wrap_wxEvtHandler_Disconnect, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_Connect", (PyCFunction) _wrap_wxEvtHandler_Connect, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 3baf0c4dc7..595ac63fe1 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -54,6 +54,9 @@ class wxEvtHandlerPtr(wxObjectPtr): def Disconnect(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_Disconnect,(self,) + _args, _kwargs) return val + def _setOORInfo(self, *_args, **_kwargs): + val = apply(windowsc.wxEvtHandler__setOORInfo,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxEvtHandler(wxEvtHandlerPtr): @@ -83,6 +86,7 @@ class wxValidator(wxValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxValidator,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -91,8 +95,8 @@ class wxPyValidatorPtr(wxValidatorPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(windowsc.wxPyValidator__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(windowsc.wxPyValidator__setCallbackInfo,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -100,7 +104,8 @@ class wxPyValidator(wxPyValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPyValidator,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxPyValidator, 1) + self._setCallbackInfo(self, wxPyValidator, 1) + self._setOORInfo(self) @@ -561,12 +566,14 @@ class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreWindow(*_args,**_kwargs): val = wxWindowPtr(apply(windowsc.new_wxPreWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -592,6 +599,7 @@ class wxPanel(wxPanelPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPanel,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -669,12 +677,14 @@ class wxScrolledWindow(wxScrolledWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxScrolledWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreScrolledWindow(*_args,**_kwargs): val = wxScrolledWindowPtr(apply(windowsc.new_wxPreScrolledWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -796,6 +806,7 @@ class wxMenu(wxMenuPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxMenu,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) @@ -870,6 +881,7 @@ class wxMenuBar(wxMenuBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxMenuBar,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 01af15bc9f..9f91eecc59 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -66,28 +64,47 @@ extern PyObject *SWIG_newvarlink(void); #include #endif +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -96,7 +113,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif #ifdef __cplusplus extern "C" { diff --git a/wxPython/src/gtk/windows2.py b/wxPython/src/gtk/windows2.py index 4753124d69..769264ac64 100644 --- a/wxPython/src/gtk/windows2.py +++ b/wxPython/src/gtk/windows2.py @@ -116,12 +116,14 @@ class wxNotebook(wxNotebookPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxNotebook,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreNotebook(*_args,**_kwargs): val = wxNotebookPtr(apply(windows2c.new_wxPreNotebook,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -221,12 +223,14 @@ class wxSplitterWindow(wxSplitterWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSplitterWindow(*_args,**_kwargs): val = wxSplitterWindowPtr(apply(windows2c.new_wxPreSplitterWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val diff --git a/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index 937d1dc3cf..a6bde0b65e 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,29 +56,49 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include #include +#include +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -89,8 +107,22 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif + +class wxPyPopupTransientWindow : public wxPopupTransientWindow +{ +public: + wxPyPopupTransientWindow() : wxPopupTransientWindow() {} + wxPyPopupTransientWindow(wxWindow* parent, int style = wxBORDER_NONE) + : wxPopupTransientWindow(parent, style) {} + + DEC_PYCALLBACK_BOOL_ME(ProcessLeftDown); + PYPRIVATE; +}; + +IMP_PYCALLBACK_BOOL_ME(wxPyPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown); + #ifdef __cplusplus extern "C" { #endif @@ -2008,7 +2040,381 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutWindow(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxPopupWindowTowxWindow(void *ptr) { + wxPopupWindow *src; + wxWindow *dest; + src = (wxPopupWindow *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxPopupWindowTowxEvtHandler(void *ptr) { + wxPopupWindow *src; + wxEvtHandler *dest; + src = (wxPopupWindow *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxPopupWindowTowxObject(void *ptr) { + wxPopupWindow *src; + wxObject *dest; + src = (wxPopupWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxPopupWindow(_swigarg0,_swigarg1) (new wxPopupWindow(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxPopupWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPopupWindow * _result; + wxWindow * _arg0; + int _arg1 = (int ) wxBORDER_NONE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","flags", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxPopupWindow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPopupWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPopupWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPrePopupWindow() (new wxPopupWindow()) +static PyObject *_wrap_new_wxPrePopupWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPopupWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPrePopupWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPopupWindow *)new_wxPrePopupWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPopupWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPopupWindow_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPopupWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPopupWindow * _arg0; + wxWindow * _arg1; + int _arg2 = (int ) wxBORDER_NONE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parent","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPopupWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPopupWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPopupWindow_Create. Expected _wxPopupWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPopupWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPopupWindow_Position(_swigobj,_swigarg0,_swigarg1) (_swigobj->Position(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPopupWindow_Position(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPopupWindow * _arg0; + wxPoint * _arg1; + wxSize * _arg2; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + wxSize temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","ptOrigin","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPopupWindow_Position",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPopupWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPopupWindow_Position. Expected _wxPopupWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxSize_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPopupWindow_Position(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyPopupTransientWindowTowxPopupWindow(void *ptr) { + wxPyPopupTransientWindow *src; + wxPopupWindow *dest; + src = (wxPyPopupTransientWindow *) ptr; + dest = (wxPopupWindow *) src; + return (void *) dest; +} + +static void *SwigwxPyPopupTransientWindowTowxWindow(void *ptr) { + wxPyPopupTransientWindow *src; + wxWindow *dest; + src = (wxPyPopupTransientWindow *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxPyPopupTransientWindowTowxEvtHandler(void *ptr) { + wxPyPopupTransientWindow *src; + wxEvtHandler *dest; + src = (wxPyPopupTransientWindow *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxPyPopupTransientWindowTowxObject(void *ptr) { + wxPyPopupTransientWindow *src; + wxObject *dest; + src = (wxPyPopupTransientWindow *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxPopupTransientWindow(_swigarg0,_swigarg1) (new wxPyPopupTransientWindow(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxPopupTransientWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPopupTransientWindow * _result; + wxWindow * _arg0; + int _arg1 = (int ) wxBORDER_NONE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxPopupTransientWindow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPopupTransientWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPopupTransientWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPrePopupTransientWindow() (new wxPyPopupTransientWindow()) +static PyObject *_wrap_new_wxPrePopupTransientWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPopupTransientWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPrePopupTransientWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPopupTransientWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPopupTransientWindow__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPopupTransientWindow__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPopupTransientWindow * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPopupTransientWindow__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPopupTransientWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPopupTransientWindow__setCallbackInfo. Expected _wxPyPopupTransientWindow_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPopupTransientWindow_Popup(_swigobj,_swigarg0) (_swigobj->Popup(_swigarg0)) +static PyObject *_wrap_wxPopupTransientWindow_Popup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPopupTransientWindow * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","focus", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxPopupTransientWindow_Popup",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPopupTransientWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPopupTransientWindow_Popup. Expected _wxPyPopupTransientWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPopupTransientWindow_Popup. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPopupTransientWindow_Popup(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPopupTransientWindow_Dismiss(_swigobj) (_swigobj->Dismiss()) +static PyObject *_wrap_wxPopupTransientWindow_Dismiss(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPopupTransientWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPopupTransientWindow_Dismiss",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPopupTransientWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPopupTransientWindow_Dismiss. Expected _wxPyPopupTransientWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPopupTransientWindow_Dismiss(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef windows3cMethods[] = { + { "wxPopupTransientWindow_Dismiss", (PyCFunction) _wrap_wxPopupTransientWindow_Dismiss, METH_VARARGS | METH_KEYWORDS }, + { "wxPopupTransientWindow_Popup", (PyCFunction) _wrap_wxPopupTransientWindow_Popup, METH_VARARGS | METH_KEYWORDS }, + { "wxPopupTransientWindow__setCallbackInfo", (PyCFunction) _wrap_wxPopupTransientWindow__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPrePopupTransientWindow", (PyCFunction) _wrap_new_wxPrePopupTransientWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPopupTransientWindow", (PyCFunction) _wrap_new_wxPopupTransientWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxPopupWindow_Position", (PyCFunction) _wrap_wxPopupWindow_Position, METH_VARARGS | METH_KEYWORDS }, + { "wxPopupWindow_Create", (PyCFunction) _wrap_wxPopupWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPrePopupWindow", (PyCFunction) _wrap_new_wxPrePopupWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPopupWindow", (PyCFunction) _wrap_new_wxPopupWindow, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutAlgorithm_LayoutWindow", (PyCFunction) _wrap_wxLayoutAlgorithm_LayoutWindow, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutAlgorithm_LayoutFrame", (PyCFunction) _wrap_wxLayoutAlgorithm_LayoutFrame, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutAlgorithm_LayoutMDIFrame", (PyCFunction) _wrap_wxLayoutAlgorithm_LayoutMDIFrame, METH_VARARGS | METH_KEYWORDS }, @@ -2090,6 +2496,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_class_wxPopupWindow",SwigwxPopupWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPopupWindow",SwigwxPopupWindowTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_class_wxEvtHandler","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, @@ -2099,6 +2509,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_long","_signed_long",0}, { "_wxSashWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, { "_wxSashWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, + { "_class_wxObject","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxObject}, + { "_class_wxObject","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxObject}, + { "_class_wxObject","_class_wxPopupWindow",SwigwxPopupWindowTowxObject}, + { "_class_wxObject","_wxPopupWindow",SwigwxPopupWindowTowxObject}, { "_class_wxObject","_class_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, { "_class_wxObject","_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, { "_class_wxObject","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, @@ -2118,6 +2532,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, + { "_wxPopupWindow","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxPopupWindow}, + { "_wxPopupWindow","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxPopupWindow}, { "_class_wxSashWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, { "_class_wxSashWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, { "_uint","_wxCoord",0}, @@ -2145,6 +2561,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_EBool","_wxWindowID",0}, { "_unsigned_long","_long",0}, { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0}, + { "_class_wxPopupWindow","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxPopupWindow}, + { "_class_wxPopupWindow","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxPopupWindow}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, @@ -2155,10 +2573,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxWindow}, + { "_class_wxWindow","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxWindow}, + { "_class_wxWindow","_class_wxPopupWindow",SwigwxPopupWindowTowxWindow}, + { "_class_wxWindow","_wxPopupWindow",SwigwxPopupWindowTowxWindow}, { "_class_wxWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_class_wxWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_class_wxWindow","_class_wxSashWindow",SwigwxSashWindowTowxWindow}, { "_class_wxWindow","_wxSashWindow",SwigwxSashWindowTowxWindow}, + { "_wxObject","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxObject}, + { "_wxObject","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxObject}, + { "_wxObject","_class_wxPopupWindow",SwigwxPopupWindowTowxObject}, + { "_wxObject","_wxPopupWindow",SwigwxPopupWindowTowxObject}, { "_wxObject","_class_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, { "_wxObject","_wxLayoutAlgorithm",SwigwxLayoutAlgorithmTowxObject}, { "_wxObject","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxObject}, @@ -2220,10 +2646,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_wxPrintQuality",0}, { "_class_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxEvtHandler}, + { "_wxEvtHandler","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxEvtHandler}, + { "_wxEvtHandler","_class_wxPopupWindow",SwigwxPopupWindowTowxEvtHandler}, + { "_wxEvtHandler","_wxPopupWindow",SwigwxPopupWindowTowxEvtHandler}, { "_wxEvtHandler","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_wxEvtHandler","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_wxEvtHandler","_class_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, { "_wxEvtHandler","_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, + { "_wxWindow","_class_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxWindow}, + { "_wxWindow","_wxPyPopupTransientWindow",SwigwxPyPopupTransientWindowTowxWindow}, + { "_wxWindow","_class_wxPopupWindow",SwigwxPopupWindowTowxWindow}, + { "_wxWindow","_wxPopupWindow",SwigwxPopupWindowTowxWindow}, { "_wxWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_wxWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_wxWindow","_class_wxSashWindow",SwigwxSashWindowTowxWindow}, diff --git a/wxPython/src/gtk/windows3.py b/wxPython/src/gtk/windows3.py index 5a5bec634e..9674a3cb2e 100644 --- a/wxPython/src/gtk/windows3.py +++ b/wxPython/src/gtk/windows3.py @@ -118,12 +118,14 @@ class wxSashWindow(wxSashWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSashWindow(*_args,**_kwargs): val = wxSashWindowPtr(apply(windows3c.new_wxPreSashWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -227,12 +229,14 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashLayoutWindow,_args,_kwargs) self.thisown = 1 + self._setOORInfo(self) def wxPreSashLayoutWindow(*_args,**_kwargs): val = wxSashLayoutWindowPtr(apply(windows3c.new_wxPreSashLayoutWindow,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(self) return val @@ -262,6 +266,64 @@ class wxLayoutAlgorithm(wxLayoutAlgorithmPtr): +class wxPopupWindowPtr(wxWindowPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windows3c.wxPopupWindow_Create,(self,) + _args, _kwargs) + return val + def Position(self, *_args, **_kwargs): + val = apply(windows3c.wxPopupWindow_Position,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPopupWindow(wxPopupWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(windows3c.new_wxPopupWindow,_args,_kwargs) + self.thisown = 1 + self._setOORInfo(self) + + + +def wxPrePopupWindow(*_args,**_kwargs): + val = wxPopupWindowPtr(apply(windows3c.new_wxPrePopupWindow,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(self) + return val + + +class wxPopupTransientWindowPtr(wxPopupWindowPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(windows3c.wxPopupTransientWindow__setCallbackInfo,(self,) + _args, _kwargs) + return val + def Popup(self, *_args, **_kwargs): + val = apply(windows3c.wxPopupTransientWindow_Popup,(self,) + _args, _kwargs) + return val + def Dismiss(self, *_args, **_kwargs): + val = apply(windows3c.wxPopupTransientWindow_Dismiss,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPopupTransientWindow(wxPopupTransientWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(windows3c.new_wxPopupTransientWindow,_args,_kwargs) + self.thisown = 1 + self._setCallbackInfo(self, wxPopupTransientWindow) + self._setOORInfo(self) + + + +def wxPrePopupTransientWindow(*_args,**_kwargs): + val = wxPopupTransientWindowPtr(apply(windows3c.new_wxPrePopupTransientWindow,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(self) + return val + + #-------------- FUNCTION WRAPPERS ------------------ diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 582d40aa17..b8e3ee4c3a 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -27,21 +27,19 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - +#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,28 +55,47 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -87,7 +104,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif @@ -664,7 +681,7 @@ static wxPyCoreAPI API = { wxRect_helper, wxColour_helper, - wxPyCBH_setSelf, + wxPyCBH_setCallbackInfo, wxPyCBH_findCallback, wxPyCBH_callCallback, wxPyCBH_callCallbackObj, @@ -1855,12 +1872,14 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxBORDER", PyInt_FromLong((long) wxBORDER)); PyDict_SetItemString(d,"wxSIMPLE_BORDER", PyInt_FromLong((long) wxSIMPLE_BORDER)); PyDict_SetItemString(d,"wxSTATIC_BORDER", PyInt_FromLong((long) wxSTATIC_BORDER)); + PyDict_SetItemString(d,"wxBORDER_MASK", PyInt_FromLong((long) wxBORDER_MASK)); PyDict_SetItemString(d,"wxTRANSPARENT_WINDOW", PyInt_FromLong((long) wxTRANSPARENT_WINDOW)); PyDict_SetItemString(d,"wxNO_BORDER", PyInt_FromLong((long) wxNO_BORDER)); PyDict_SetItemString(d,"wxUSER_COLOURS", PyInt_FromLong((long) wxUSER_COLOURS)); PyDict_SetItemString(d,"wxNO_3D", PyInt_FromLong((long) wxNO_3D)); PyDict_SetItemString(d,"wxTAB_TRAVERSAL", PyInt_FromLong((long) wxTAB_TRAVERSAL)); PyDict_SetItemString(d,"wxWANTS_CHARS", PyInt_FromLong((long) wxWANTS_CHARS)); + PyDict_SetItemString(d,"wxPOPUP_WINDOW", PyInt_FromLong((long) wxPOPUP_WINDOW)); PyDict_SetItemString(d,"wxHORIZONTAL", PyInt_FromLong((long) wxHORIZONTAL)); PyDict_SetItemString(d,"wxVERTICAL", PyInt_FromLong((long) wxVERTICAL)); PyDict_SetItemString(d,"wxBOTH", PyInt_FromLong((long) wxBOTH)); @@ -2116,6 +2135,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxJOY_BUTTON4", PyInt_FromLong((long) wxJOY_BUTTON4)); PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY)); + PyDict_SetItemString(d,"wxWS_EX_BLOCK_EVENTS", PyInt_FromLong((long) wxWS_EX_BLOCK_EVENTS)); PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT)); PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC)); PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index f2d1fc0077..924518183f 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -167,12 +167,14 @@ wxRAISED_BORDER = wxc.wxRAISED_BORDER wxBORDER = wxc.wxBORDER wxSIMPLE_BORDER = wxc.wxSIMPLE_BORDER wxSTATIC_BORDER = wxc.wxSTATIC_BORDER +wxBORDER_MASK = wxc.wxBORDER_MASK wxTRANSPARENT_WINDOW = wxc.wxTRANSPARENT_WINDOW wxNO_BORDER = wxc.wxNO_BORDER wxUSER_COLOURS = wxc.wxUSER_COLOURS wxNO_3D = wxc.wxNO_3D wxTAB_TRAVERSAL = wxc.wxTAB_TRAVERSAL wxWANTS_CHARS = wxc.wxWANTS_CHARS +wxPOPUP_WINDOW = wxc.wxPOPUP_WINDOW wxHORIZONTAL = wxc.wxHORIZONTAL wxVERTICAL = wxc.wxVERTICAL wxBOTH = wxc.wxBOTH @@ -428,6 +430,7 @@ wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3 wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY +wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS wxMM_TEXT = wxc.wxMM_TEXT wxMM_LOMETRIC = wxc.wxMM_LOMETRIC wxMM_HIMETRIC = wxc.wxMM_HIMETRIC -- 2.45.2