From 3e2125031b52b7ef6f809154fb20afced9e828f7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 30 Nov 2001 05:08:46 +0000 Subject: [PATCH] SWIGged code update for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/stc/gtk/stc_.cpp | 19 ++--- wxPython/src/gtk/calendar.cpp | 120 ++++++++---------------------- wxPython/src/gtk/calendar.py | 20 ++--- wxPython/src/gtk/controls.cpp | 96 ++++++------------------ wxPython/src/gtk/controls.py | 16 ++-- wxPython/src/gtk/controls2.cpp | 72 +++++------------- wxPython/src/gtk/controls2.py | 12 +-- wxPython/src/gtk/events.cpp | 92 +++++++++++++++++++++++ wxPython/src/gtk/events.py | 17 +++++ wxPython/src/gtk/frames.cpp | 12 +-- wxPython/src/gtk/frames.py | 2 +- wxPython/src/gtk/gdi.cpp | 68 ++++++----------- wxPython/src/gtk/gdi.py | 28 +++---- wxPython/src/gtk/grid.cpp | 36 +++------ wxPython/src/gtk/grid.py | 6 +- wxPython/src/gtk/html.cpp | 109 ++++++++++++++++++++++----- wxPython/src/gtk/html.py | 13 +++- wxPython/src/gtk/stattool.cpp | 36 +++------ wxPython/src/gtk/stattool.py | 6 +- wxPython/src/gtk/windows.cpp | 18 ++--- wxPython/src/gtk/windows.py | 3 +- wxPython/src/gtk/wx.cpp | 2 + wxPython/src/gtk/wx.py | 5 +- 23 files changed, 391 insertions(+), 417 deletions(-) diff --git a/wxPython/contrib/stc/gtk/stc_.cpp b/wxPython/contrib/stc/gtk/stc_.cpp index cfa5043708..2cbb9d93c9 100644 --- a/wxPython/contrib/stc/gtk/stc_.cpp +++ b/wxPython/contrib/stc/gtk/stc_.cpp @@ -8757,28 +8757,21 @@ static void *SwigwxStyledTextEventTowxObject(void *ptr) { return (void *) dest; } -#define new_wxStyledTextEvent(_swigarg0) (new wxStyledTextEvent(_swigarg0)) +#define new_wxStyledTextEvent(_swigarg0,_swigarg1) (new wxStyledTextEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxStyledTextEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxStyledTextEvent * _result; - wxStyledTextEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "event", NULL }; + wxEventType _arg0 = (wxEventType ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "commandType","id", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxStyledTextEvent",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStyledTextEvent. Expected _wxStyledTextEvent_p."); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxStyledTextEvent",_kwnames,&_arg0,&_arg1)) return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStyledTextEvent *)new_wxStyledTextEvent(*_arg0); + _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } if (_result) { diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index d8431b7712..eadb9792d3 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/calendar.cpp @@ -585,18 +585,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -621,18 +615,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -657,18 +645,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetBorderColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -693,18 +675,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxCalendarDateAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1473,18 +1449,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1509,18 +1479,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1589,18 +1553,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1625,18 +1583,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1705,18 +1657,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1741,18 +1687,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index ab9fa83fb3..8821a2a7a9 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -77,19 +77,19 @@ class wxCalendarDateAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBorderColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBorderColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetBorder(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBorder,(self,) + _args, _kwargs) @@ -175,33 +175,33 @@ class wxCalendarCtrlPtr(wxControlPtr): return val def GetHeaderColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHeaderColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetHighlightColours(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs) return val def GetHighlightColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHighlightColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetHolidayColours(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs) return val def GetHolidayColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHolidayColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetAttr(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index 96b4159708..fd322b6178 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -1482,18 +1482,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapLabel(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1518,18 +1512,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapDisabled(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1554,18 +1542,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapFocus(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1590,18 +1572,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapSelected(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6166,18 +6142,12 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6202,18 +6172,12 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6238,18 +6202,12 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxTextAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxTextAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -8924,18 +8882,12 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxStaticBitmap_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index d67702d8fb..23817922c2 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -133,19 +133,19 @@ class wxBitmapButtonPtr(wxButtonPtr): return val def GetBitmapLabel(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapLabel,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapDisabled(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapDisabled,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapFocus(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapFocus,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapSelected(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapSelected,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def SetBitmapDisabled(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_SetBitmapDisabled,(self,) + _args, _kwargs) @@ -607,15 +607,15 @@ class wxTextAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def IsDefault(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_IsDefault,(self,) + _args, _kwargs) @@ -880,7 +880,7 @@ class wxStaticBitmapPtr(wxControlPtr): return val def GetBitmap(self, *_args, **_kwargs): val = apply(controlsc.wxStaticBitmap_GetBitmap,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def SetBitmap(self, *_args, **_kwargs): val = apply(controlsc.wxStaticBitmap_SetBitmap,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index e86c58c41c..62535e36fa 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -491,18 +491,12 @@ static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxListItemAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -527,18 +521,12 @@ static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxListItemAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -563,18 +551,12 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxListItemAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxListItemAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5820,18 +5802,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTreeItemAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5856,18 +5832,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTreeItemAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5892,18 +5862,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxTreeItemAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index 43ba4f8914..37b1a5860d 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -160,15 +160,15 @@ class wxListItemAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def __repr__(self): return "" % (self.this,) @@ -736,15 +736,15 @@ class wxTreeItemAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index 751d0ee9a3..d559165a62 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -4459,6 +4459,93 @@ static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxChildFocusEventTowxCommandEvent(void *ptr) { + wxChildFocusEvent *src; + wxCommandEvent *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxChildFocusEventTowxEvent(void *ptr) { + wxChildFocusEvent *src; + wxEvent *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +static void *SwigwxChildFocusEventTowxObject(void *ptr) { + wxChildFocusEvent *src; + wxObject *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxChildFocusEvent(_swigarg0) (new wxChildFocusEvent(_swigarg0)) +static PyObject *_wrap_new_wxChildFocusEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChildFocusEvent * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxChildFocusEvent",_kwnames,&_argo0)) + 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_wxChildFocusEvent. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxChildFocusEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxChildFocusEvent_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxChildFocusEvent_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxChildFocusEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxChildFocusEvent_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxChildFocusEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChildFocusEvent_GetWindow. Expected _wxChildFocusEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static void *SwigwxActivateEventTowxEvent(void *ptr) { wxActivateEvent *src; wxEvent *dest; @@ -7059,6 +7146,8 @@ static PyMethodDef eventscMethods[] = { { "new_wxInitDialogEvent", (PyCFunction) _wrap_new_wxInitDialogEvent, METH_VARARGS | METH_KEYWORDS }, { "wxActivateEvent_GetActive", (PyCFunction) _wrap_wxActivateEvent_GetActive, METH_VARARGS | METH_KEYWORDS }, { "new_wxActivateEvent", (PyCFunction) _wrap_new_wxActivateEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxChildFocusEvent_GetWindow", (PyCFunction) _wrap_wxChildFocusEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxChildFocusEvent", (PyCFunction) _wrap_new_wxChildFocusEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxFocusEvent", (PyCFunction) _wrap_new_wxFocusEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEraseEvent_GetDC", (PyCFunction) _wrap_wxEraseEvent_GetDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxEraseEvent", (PyCFunction) _wrap_new_wxEraseEvent, METH_VARARGS | METH_KEYWORDS }, @@ -7229,6 +7318,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent}, { "_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent}, { "_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent}, + { "_wxEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxEvent}, { "_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent}, { "_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent}, { "_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent}, @@ -7275,6 +7365,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, + { "_wxCommandEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxCommandEvent}, { "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_char","_wxChar",0}, @@ -7317,6 +7408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxMenuEvent",SwigwxMenuEventTowxObject}, { "_wxObject","_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, { "_wxObject","_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_wxObject","_wxChildFocusEvent",SwigwxChildFocusEventTowxObject}, { "_wxObject","_wxFocusEvent",SwigwxFocusEventTowxObject}, { "_wxObject","_wxEraseEvent",SwigwxEraseEventTowxObject}, { "_wxObject","_wxPaintEvent",SwigwxPaintEventTowxObject}, diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index a50e4f988c..03051a0702 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -574,6 +574,23 @@ class wxFocusEvent(wxFocusEventPtr): +class wxChildFocusEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetWindow(self, *_args, **_kwargs): + val = apply(eventsc.wxChildFocusEvent_GetWindow,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxChildFocusEvent(wxChildFocusEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxChildFocusEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxActivateEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index 1f60067710..49699b724d 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -473,18 +473,12 @@ static PyObject *_wrap_wxTopLevelWindow_GetIcon(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxIcon & _result_ref = wxTopLevelWindow_GetIcon(_arg0); - _result = (wxIcon *) &_result_ref; + _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/frames.py b/wxPython/src/gtk/frames.py index f3d8317ae1..085ba55dda 100644 --- a/wxPython/src/gtk/frames.py +++ b/wxPython/src/gtk/frames.py @@ -39,7 +39,7 @@ class wxTopLevelWindowPtr(wxWindowPtr): return val def GetIcon(self, *_args, **_kwargs): val = apply(framesc.wxTopLevelWindow_GetIcon,(self,) + _args, _kwargs) - if val: val = wxIconPtr(val) + if val: val = wxIconPtr(val) ; val.thisown = 1 return val def SetIcon(self, *_args, **_kwargs): val = apply(framesc.wxTopLevelWindow_SetIcon,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index 55254b04c7..9ce2d7b5ed 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -6683,18 +6683,12 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBackground(_arg0); - _result = (wxBrush *) &_result_ref; + _result = new wxBrush (wxDC_GetBackground(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6719,18 +6713,12 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k } { wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBrush(_arg0); - _result = (wxBrush *) &_result_ref; + _result = new wxBrush (wxDC_GetBrush(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6879,18 +6867,12 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args, PyObject *kw } { wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxDC_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxDC_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -7047,18 +7029,12 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa } { wxPy_BEGIN_ALLOW_THREADS; - wxPen & _result_ref = wxDC_GetPen(_arg0); - _result = (wxPen *) &_result_ref; + _result = new wxPen (wxDC_GetPen(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -11596,6 +11572,16 @@ SWIGEXPORT(void) initgdic() { PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8)); PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE)); PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); + PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); + PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); + PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); + PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); @@ -11643,16 +11629,6 @@ SWIGEXPORT(void) initgdic() { SWIG_addvarlink(SWIG_globals,"wxThePenList",_wrap_wxThePenList_get, _wrap_wxThePenList_set); SWIG_addvarlink(SWIG_globals,"wxTheBrushList",_wrap_wxTheBrushList_get, _wrap_wxTheBrushList_set); SWIG_addvarlink(SWIG_globals,"wxTheColourDatabase",_wrap_wxTheColourDatabase_get, _wrap_wxTheColourDatabase_set); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); - PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); - PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); - PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); - PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index ec7a0ab9fd..292e3e7a57 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -672,11 +672,11 @@ class wxDCPtr(wxObjectPtr): return val def GetBackground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetBackground,(self,) + _args, _kwargs) - if val: val = wxBrushPtr(val) + if val: val = wxBrushPtr(val) ; val.thisown = 1 return val def GetBrush(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetBrush,(self,) + _args, _kwargs) - if val: val = wxBrushPtr(val) + if val: val = wxBrushPtr(val) ; val.thisown = 1 return val def GetCharHeight(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetCharHeight,(self,) + _args, _kwargs) @@ -689,7 +689,7 @@ class wxDCPtr(wxObjectPtr): return val def GetFont(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetLogicalFunction(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetLogicalFunction,(self,) + _args, _kwargs) @@ -705,7 +705,7 @@ class wxDCPtr(wxObjectPtr): return val def GetPen(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetPen,(self,) + _args, _kwargs) - if val: val = wxPenPtr(val) + if val: val = wxPenPtr(val) ; val.thisown = 1 return val def GetPixel(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetPixel,(self,) + _args, _kwargs) @@ -1294,6 +1294,16 @@ wxFONTENCODING_UTF7 = gdic.wxFONTENCODING_UTF7 wxFONTENCODING_UTF8 = gdic.wxFONTENCODING_UTF8 wxFONTENCODING_UNICODE = gdic.wxFONTENCODING_UNICODE wxFONTENCODING_MAX = gdic.wxFONTENCODING_MAX +wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL +wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT +wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED +wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED +wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL +wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL +wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE +wxOutRegion = gdic.wxOutRegion +wxPartRegion = gdic.wxPartRegion +wxInRegion = gdic.wxInRegion cvar = gdic.cvar wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT) wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT) @@ -1341,13 +1351,3 @@ wxTheFontList = wxFontListPtr(gdic.cvar.wxTheFontList) wxThePenList = wxPenListPtr(gdic.cvar.wxThePenList) wxTheBrushList = wxBrushListPtr(gdic.cvar.wxTheBrushList) wxTheColourDatabase = wxColourDatabasePtr(gdic.cvar.wxTheColourDatabase) -wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL -wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT -wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED -wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED -wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL -wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL -wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE -wxOutRegion = gdic.wxOutRegion -wxPartRegion = gdic.wxPartRegion -wxInRegion = gdic.wxInRegion diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index 839385006e..ff5dbb1c40 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -3766,18 +3766,12 @@ static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxGridCellAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -3802,18 +3796,12 @@ static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxGridCellAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -3838,18 +3826,12 @@ static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxGridCellAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index d8bb23db26..a2a653b730 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -511,15 +511,15 @@ class wxGridCellAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index f996b096e5..298ba88820 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -201,6 +201,7 @@ public: long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") : wxHtmlWindow(parent, id, pos, size, style, name) {}; + wxPyHtmlWindow() : wxHtmlWindow() {}; void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); @@ -2014,17 +2015,11 @@ static PyObject *_wrap_wxHtmlWinParser_GetLinkColor(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxHtmlWinParser_GetLinkColor(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -2084,17 +2079,11 @@ static PyObject *_wrap_wxHtmlWinParser_GetActualColor(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxHtmlWinParser_GetActualColor(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -4076,6 +4065,88 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreHtmlWindow() (new wxPyHtmlWindow()) +static PyObject *_wrap_new_wxPreHtmlWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreHtmlWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + wxWindow * _arg1; + int _arg2 = (int ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + int _arg5 = (int ) wxHW_SCROLLBAR_AUTO; + char * _arg6 = (char *) "htmlWindow"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","flags","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOis:wxHtmlWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + 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_Create. Expected _wxPyHtmlWindow_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 wxHtmlWindow_Create. Expected _wxWindow_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; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxHtmlWindow__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6266,6 +6337,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow__setCallbackInfo", (PyCFunction) _wrap_wxHtmlWindow__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_Create", (PyCFunction) _wrap_wxHtmlWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreHtmlWindow", (PyCFunction) _wrap_new_wxPreHtmlWindow, 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 }, diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index b2db058c73..c4103cd6e1 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -230,14 +230,14 @@ class wxHtmlWinParserPtr(wxHtmlParserPtr): return val def GetLinkColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetLinkColor,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetLinkColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_SetLinkColor,(self,) + _args, _kwargs) return val def GetActualColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetActualColor,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetActualColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_SetActualColor,(self,) + _args, _kwargs) @@ -511,6 +511,9 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_Create,(self,) + _args, _kwargs) + return val def _setCallbackInfo(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow__setCallbackInfo,(self,) + _args, _kwargs) return val @@ -602,6 +605,12 @@ class wxHtmlWindow(wxHtmlWindowPtr): +def wxPreHtmlWindow(*_args,**_kwargs): + val = wxHtmlWindowPtr(apply(htmlc.new_wxPreHtmlWindow,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(val) + return val + class wxHtmlDCRendererPtr(wxObjectPtr): def __init__(self,this): diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index 407ec36437..6605bba9cb 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -879,18 +879,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap1(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap1(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap1(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -915,18 +909,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap2(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap2(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap2(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -951,18 +939,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap(PyObject *self, PyObject *arg } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/gtk/stattool.py b/wxPython/src/gtk/stattool.py index 72b3d89da0..59f27eec6b 100644 --- a/wxPython/src/gtk/stattool.py +++ b/wxPython/src/gtk/stattool.py @@ -104,15 +104,15 @@ class wxToolBarToolBasePtr(wxObjectPtr): return val def GetBitmap1(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap1,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmap2(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap2,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmap(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetShortHelp(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetShortHelp,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index fd49e2bc63..0d1bd05917 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -1831,18 +1831,12 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxWindow_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxWindow_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -4538,13 +4532,13 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; bool _result; wxWindow * _arg0; - bool _arg1; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - int tempbool1; + int tempbool1 = (int) TRUE; char *_kwnames[] = { "self","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 1193917ff2..1f63024e86 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -201,7 +201,7 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetFont(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetForegroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetForegroundColour,(self,) + _args, _kwargs) @@ -606,6 +606,7 @@ class wxPanel(wxPanelPtr): def wxPrePanel(*_args,**_kwargs): val = wxPanelPtr(apply(windowsc.new_wxPrePanel,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(val) return val diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index fcf5367522..17367d190f 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -674,6 +674,7 @@ static wxPyCoreAPI API = { wxPyMake_wxObject, wxPyMake_wxSizer, wxPyPtrTypeMap_Add, + wxArrayString2PyList_helper }; @@ -2448,6 +2449,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); + PyDict_SetItemString(d,"wxEVT_CHILD_FOCUS", PyInt_FromLong((long) wxEVT_CHILD_FOCUS)); PyDict_SetItemString(d,"wxEVT_MOUSEWHEEL", PyInt_FromLong((long) wxEVT_MOUSEWHEEL)); PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 18ad0927df..7a60992430 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -765,6 +765,7 @@ wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS +wxEVT_CHILD_FOCUS = wxc.wxEVT_CHILD_FOCUS wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP @@ -872,7 +873,6 @@ wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) # Author: Robin Dunn # # Created: 6/30/97 -# RCS-ID: $Id$ # Copyright: (c) 1998 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------------- @@ -941,6 +941,9 @@ def EVT_SET_FOCUS(win, func): def EVT_KILL_FOCUS(win, func): win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) +def EVT_CHILD_FOCUS(win, func): + win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func) + def EVT_ACTIVATE(win, func): win.Connect(-1, -1, wxEVT_ACTIVATE, func) -- 2.45.2