From 2ea09579141e90ae6bad13f50c6e0f34958eda74 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 21 Dec 1998 19:59:03 +0000 Subject: [PATCH] Now compiles with /GX- on MSW. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/src/makefile.nt | 5 + utils/wxPython/src/msw/gdi.cpp | 244 ++++++++++++++--------------- utils/wxPython/src/msw/gdi.py | 26 +-- utils/wxPython/src/msw/windows.cpp | 2 - utils/wxPython/src/msw/wx.cpp | 8 +- utils/wxPython/src/msw/wx.py | 6 +- 6 files changed, 144 insertions(+), 147 deletions(-) diff --git a/utils/wxPython/src/makefile.nt b/utils/wxPython/src/makefile.nt index 3cc0bffa5d..5bdbf2fb7f 100644 --- a/utils/wxPython/src/makefile.nt +++ b/utils/wxPython/src/makefile.nt @@ -40,6 +40,8 @@ THISDIR=$(WXDIR)\utils\wxPython EXTRALIBS=$(PYTHONDIR)\libs\python15.lib EXTRAINC=-I$(PYTHONDIR)\include -I. EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H +OVERRIDEFLAGS=/GX- + SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ GENCODEDIR=msw @@ -239,6 +241,9 @@ $(TARGETDIR)\__init__.py : __init__.py #------------------------------------------------------------------------ # # $Log$ +# Revision 1.8 1998/12/21 19:58:06 RD +# Now compiles with /GX- on MSW. +# # Revision 1.7 1998/12/15 20:41:20 RD # Changed the import semantics from "from wxPython import *" to "from # wxPython.wx import *" This is for people who are worried about diff --git a/utils/wxPython/src/msw/gdi.cpp b/utils/wxPython/src/msw/gdi.cpp index c636f9321e..0d9db6b569 100644 --- a/utils/wxPython/src/msw/gdi.cpp +++ b/utils/wxPython/src/msw/gdi.cpp @@ -2292,58 +2292,6 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args) { return _resultobj; } -#define wxPen_GetDashes(_swigobj,_swigarg0) (_swigobj->GetDashes(_swigarg0)) -static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - wxDash ** _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_GetDashes",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDash_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); - return NULL; - } - } - _result = (int )wxPen_GetDashes(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetStipple(_swigobj) (_swigobj->GetStipple()) -static PyObject *_wrap_wxPen_GetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxPen * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetStipple",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStipple. Expected _wxPen_p."); - return NULL; - } - } - _result = (wxBitmap *)wxPen_GetStipple(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - #define wxPen_GetJoin(_swigobj) (_swigobj->GetJoin()) static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2479,72 +2427,6 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args) { return _resultobj; } -#define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - wxDash * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPen_SetDashes",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = (unsigned long*)long_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxPen_SetDashes(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxPen_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) -static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_SetStipple",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStipple. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetStipple. Expected _wxBitmap_p."); - return NULL; - } - } - wxPen_SetStipple(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxPen_SetJoin(_swigobj,_swigarg0) (_swigobj->SetJoin(_swigarg0)) static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2611,6 +2493,124 @@ static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args) { return _resultobj; } +#define wxPen_GetDashes(_swigobj,_swigarg0) (_swigobj->GetDashes(_swigarg0)) +static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + wxDash ** _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxPen_GetDashes",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDash_pp")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); + return NULL; + } + } + _result = (int )wxPen_GetDashes(_arg0,_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_GetStipple(_swigobj) (_swigobj->GetStipple()) +static PyObject *_wrap_wxPen_GetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + wxPen * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetStipple",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStipple. Expected _wxPen_p."); + return NULL; + } + } + _result = (wxBitmap *)wxPen_GetStipple(_arg0); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + wxDash * _arg2; + char * _argc0 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxPen_SetDashes",&_argc0,&_obj2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetDashes. Expected _wxPen_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = (unsigned long*)long_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + _arg1 = PyList_Size(_obj2); +} + wxPen_SetDashes(_arg0,_arg1,_arg2); + Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxPen_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) +static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + wxBitmap * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxPen_SetStipple",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStipple. Expected _wxPen_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetStipple. Expected _wxBitmap_p."); + return NULL; + } + } + wxPen_SetStipple(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static wxBrush *new_wxBrush(wxColour *colour,int style) { return wxTheBrushList->FindOrCreateBrush(*colour, style); } @@ -5234,19 +5234,19 @@ static PyMethodDef gdicMethods[] = { { "wxBrush_GetStipple", _wrap_wxBrush_GetStipple, 1 }, { "wxBrush_GetColour", _wrap_wxBrush_GetColour, 1 }, { "new_wxBrush", _wrap_new_wxBrush, 1 }, + { "wxPen_SetStipple", _wrap_wxPen_SetStipple, 1 }, + { "wxPen_SetDashes", _wrap_wxPen_SetDashes, 1 }, + { "wxPen_GetStipple", _wrap_wxPen_GetStipple, 1 }, + { "wxPen_GetDashes", _wrap_wxPen_GetDashes, 1 }, { "wxPen_SetWidth", _wrap_wxPen_SetWidth, 1 }, { "wxPen_SetStyle", _wrap_wxPen_SetStyle, 1 }, { "wxPen_SetJoin", _wrap_wxPen_SetJoin, 1 }, - { "wxPen_SetStipple", _wrap_wxPen_SetStipple, 1 }, - { "wxPen_SetDashes", _wrap_wxPen_SetDashes, 1 }, { "wxPen_SetColour", _wrap_wxPen_SetColour, 1 }, { "wxPen_SetCap", _wrap_wxPen_SetCap, 1 }, { "wxPen_Ok", _wrap_wxPen_Ok, 1 }, { "wxPen_GetWidth", _wrap_wxPen_GetWidth, 1 }, { "wxPen_GetStyle", _wrap_wxPen_GetStyle, 1 }, { "wxPen_GetJoin", _wrap_wxPen_GetJoin, 1 }, - { "wxPen_GetStipple", _wrap_wxPen_GetStipple, 1 }, - { "wxPen_GetDashes", _wrap_wxPen_GetDashes, 1 }, { "wxPen_GetColour", _wrap_wxPen_GetColour, 1 }, { "wxPen_GetCap", _wrap_wxPen_GetCap, 1 }, { "new_wxPen", _wrap_new_wxPen, 1 }, diff --git a/utils/wxPython/src/msw/gdi.py b/utils/wxPython/src/msw/gdi.py index 3f2305b969..868a287116 100644 --- a/utils/wxPython/src/msw/gdi.py +++ b/utils/wxPython/src/msw/gdi.py @@ -244,13 +244,6 @@ class wxPenPtr : val = gdic.wxPen_GetColour(self.this) val = wxColourPtr(val) return val - def GetDashes(self,arg0): - val = gdic.wxPen_GetDashes(self.this,arg0) - return val - def GetStipple(self): - val = gdic.wxPen_GetStipple(self.this) - val = wxBitmapPtr(val) - return val def GetJoin(self): val = gdic.wxPen_GetJoin(self.this) return val @@ -269,12 +262,6 @@ class wxPenPtr : def SetColour(self,arg0): val = gdic.wxPen_SetColour(self.this,arg0.this) return val - def SetDashes(self,arg0,*args): - val = apply(gdic.wxPen_SetDashes,(self.this,arg0,)+args) - return val - def SetStipple(self,arg0): - val = gdic.wxPen_SetStipple(self.this,arg0.this) - return val def SetJoin(self,arg0): val = gdic.wxPen_SetJoin(self.this,arg0) return val @@ -284,6 +271,19 @@ class wxPenPtr : def SetWidth(self,arg0): val = gdic.wxPen_SetWidth(self.this,arg0) return val + def GetDashes(self,arg0): + val = gdic.wxPen_GetDashes(self.this,arg0) + return val + def GetStipple(self): + val = gdic.wxPen_GetStipple(self.this) + val = wxBitmapPtr(val) + return val + def SetDashes(self,arg0,*args): + val = apply(gdic.wxPen_SetDashes,(self.this,arg0,)+args) + return val + def SetStipple(self,arg0): + val = gdic.wxPen_SetStipple(self.this,arg0.this) + return val def __repr__(self): return "" class wxPen(wxPenPtr): diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp index 7b28e68d5c..a1538c3e01 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/utils/wxPython/src/msw/windows.cpp @@ -4688,7 +4688,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); SWIG_RegisterMapping("_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); SWIG_RegisterMapping("_wxPanel","_wxDialog",SwigwxDialogTowxPanel); SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); @@ -4752,7 +4751,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxWindowDC","_wxWindowDC",0); SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); diff --git a/utils/wxPython/src/msw/wx.cpp b/utils/wxPython/src/msw/wx.cpp index 99687defe9..1232da33f7 100644 --- a/utils/wxPython/src/msw/wx.cpp +++ b/utils/wxPython/src/msw/wx.cpp @@ -33,10 +33,8 @@ * and things like that. * * $Log$ - * Revision 1.2 1998/12/17 18:07:12 RD - * wxPython 0.5.2 - * Minor fixes and SWIG code generation for RR's changes. MSW and GTK - * versions are much closer now! + * Revision 1.3 1998/12/21 19:59:01 RD + * Now compiles with /GX- on MSW. * ************************************************************************/ @@ -1800,7 +1798,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); SWIG_RegisterMapping("_class_wxStatusBar","_wxStatusBar",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); @@ -1926,7 +1923,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxToolBarTool","_wxToolBarTool",0); SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_wxTreeItemId","_class_wxTreeItemId",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); diff --git a/utils/wxPython/src/msw/wx.py b/utils/wxPython/src/msw/wx.py index bd0f3b3f70..30c6bf5830 100644 --- a/utils/wxPython/src/msw/wx.py +++ b/utils/wxPython/src/msw/wx.py @@ -1189,10 +1189,8 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # # $Log$ -# Revision 1.2 1998/12/17 18:07:15 RD -# wxPython 0.5.2 -# Minor fixes and SWIG code generation for RR's changes. MSW and GTK -# versions are much closer now! +# Revision 1.3 1998/12/21 19:59:03 RD +# Now compiles with /GX- on MSW. # # Revision 1.7 1998/11/25 08:45:21 RD #