From: Robin Dunn Date: Sat, 23 Oct 1999 03:35:37 +0000 (+0000) Subject: generated source updates X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f078d013aed3cb805dbfa2a10f2e300e35f2455a?ds=sidebyside generated source updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/src/gtk/image.cpp b/utils/wxPython/src/gtk/image.cpp index daa4bc887d..65aa94fad4 100644 --- a/utils/wxPython/src/gtk/image.cpp +++ b/utils/wxPython/src/gtk/image.cpp @@ -1371,6 +1371,43 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0)) +static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_GetSubImage",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static PyObject * wxImage_GetData(wxImage *self) { unsigned char* data = self->GetData(); int len = self->GetWidth() * self->GetHeight() * 3; @@ -1411,7 +1448,10 @@ static void wxImage_SetData(wxImage *self,PyObject * data) { PyErr_SetString(PyExc_TypeError, "Expected string object"); return /* NULL */ ; } - dataPtr = (unsigned char*)PyString_AsString(data); + + size_t len = self->GetWidth() * self->GetHeight() * 3; + dataPtr = new unsigned char[len]; + memcpy(dataPtr, PyString_AsString(data), len); self->SetData(dataPtr); } static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1622,6 +1662,7 @@ static PyMethodDef imagecMethods[] = { { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxImage_Ok", (PyCFunction) _wrap_wxImage_Ok, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/src/gtk/image.py b/utils/wxPython/src/gtk/image.py index e76564c391..1f0924638d 100644 --- a/utils/wxPython/src/gtk/image.py +++ b/utils/wxPython/src/gtk/image.py @@ -182,6 +182,10 @@ class wxImagePtr : def GetHeight(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetHeight,(self,) + _args, _kwargs) return val + def GetSubImage(self, *_args, **_kwargs): + val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val diff --git a/utils/wxPython/src/gtk/windows.cpp b/utils/wxPython/src/gtk/windows.cpp index ffdf56455f..8f9be9a537 100644 --- a/utils/wxPython/src/gtk/windows.cpp +++ b/utils/wxPython/src/gtk/windows.cpp @@ -5293,6 +5293,104 @@ static PyObject *_wrap_wxScrolledWindow_ViewStart(PyObject *self, PyObject *args return _resultobj; } +#define wxScrolledWindow_CalcScrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcScrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxScrolledWindow_CalcScrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxScrolledWindow * _arg0; + int _arg1; + int _arg2; + int * _arg3; + int temp; + int * _arg4; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; +{ + _arg3 = &temp; +} +{ + _arg4 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcScrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcScrolledPosition. Expected _wxScrolledWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxScrolledWindow_CalcUnscrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcUnscrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxScrolledWindow_CalcUnscrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxScrolledWindow * _arg0; + int _arg1; + int _arg2; + int * _arg3; + int temp; + int * _arg4; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; +{ + _arg3 = &temp; +} +{ + _arg4 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcUnscrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcUnscrolledPosition. Expected _wxScrolledWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + static void *SwigwxMenuTowxEvtHandler(void *ptr) { wxMenu *src; wxEvtHandler *dest; @@ -7109,6 +7207,8 @@ static PyMethodDef windowscMethods[] = { { "wxMenu_AppendMenu", (PyCFunction) _wrap_wxMenu_AppendMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_Append", (PyCFunction) _wrap_wxMenu_Append, METH_VARARGS | METH_KEYWORDS }, { "new_wxMenu", (PyCFunction) _wrap_new_wxMenu, METH_VARARGS | METH_KEYWORDS }, + { "wxScrolledWindow_CalcUnscrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcUnscrolledPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxScrolledWindow_CalcScrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcScrolledPosition, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_ViewStart", (PyCFunction) _wrap_wxScrolledWindow_ViewStart, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_SetScrollbars", (PyCFunction) _wrap_wxScrolledWindow_SetScrollbars, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_Scroll", (PyCFunction) _wrap_wxScrolledWindow_Scroll, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/src/gtk/windows.py b/utils/wxPython/src/gtk/windows.py index d9933c5fe5..e496e1ce4a 100644 --- a/utils/wxPython/src/gtk/windows.py +++ b/utils/wxPython/src/gtk/windows.py @@ -572,6 +572,12 @@ class wxScrolledWindowPtr(wxPanelPtr): def ViewStart(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_ViewStart,(self,) + _args, _kwargs) return val + def CalcScrolledPosition(self, *_args, **_kwargs): + val = apply(windowsc.wxScrolledWindow_CalcScrolledPosition,(self,) + _args, _kwargs) + return val + def CalcUnscrolledPosition(self, *_args, **_kwargs): + val = apply(windowsc.wxScrolledWindow_CalcUnscrolledPosition,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxScrolledWindow(wxScrolledWindowPtr): diff --git a/utils/wxPython/src/gtk/windows2.cpp b/utils/wxPython/src/gtk/windows2.cpp index a289086e40..0dc6b4ffdd 100644 --- a/utils/wxPython/src/gtk/windows2.cpp +++ b/utils/wxPython/src/gtk/windows2.cpp @@ -4684,6 +4684,51 @@ static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, return _resultobj; } +#define wxSplitterWindow_ReplaceWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReplaceWindow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindow * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","winOld","winNew", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSplitterWindow_ReplaceWindow",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_ReplaceWindow. Expected _wxSplitterWindow_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 wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0)) static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4962,6 +5007,7 @@ static PyMethodDef windows2cMethods[] = { { "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/src/gtk/windows2.py b/utils/wxPython/src/gtk/windows2.py index 41f6c2f894..8ee853f654 100644 --- a/utils/wxPython/src/gtk/windows2.py +++ b/utils/wxPython/src/gtk/windows2.py @@ -538,6 +538,9 @@ class wxSplitterWindowPtr(wxWindowPtr): def IsSplit(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs) return val + def ReplaceWindow(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs) + return val def SetBorderSize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs) return val diff --git a/utils/wxPython/src/gtk/wx.cpp b/utils/wxPython/src/gtk/wx.cpp index aca76bf33e..bc30e05587 100644 --- a/utils/wxPython/src/gtk/wx.cpp +++ b/utils/wxPython/src/gtk/wx.cpp @@ -2134,6 +2134,8 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); + PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE)); + PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT)); PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE)); PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER)); PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE)); diff --git a/utils/wxPython/src/gtk/wx.py b/utils/wxPython/src/gtk/wx.py index b218d9bb5f..09e308771f 100644 --- a/utils/wxPython/src/gtk/wx.py +++ b/utils/wxPython/src/gtk/wx.py @@ -290,6 +290,8 @@ wxSP_WRAP = wxc.wxSP_WRAP wxSP_NOBORDER = wxc.wxSP_NOBORDER wxSP_3D = wxc.wxSP_3D wxSP_BORDER = wxc.wxSP_BORDER +wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE +wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE wxFLOOD_BORDER = wxc.wxFLOOD_BORDER wxODDEVEN_RULE = wxc.wxODDEVEN_RULE