]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/gdi.cpp
rewrite to avoid unnecessary redraws
[wxWidgets.git] / wxPython / src / msw / gdi.cpp
index f247558b63e23c8f7dcfca7910bf730df470b303..618c1929c31c960716fc128c464d720f53f55d61 100644 (file)
@@ -4523,18 +4523,12 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args, PyObject
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxPen_GetColour(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxPen_GetColour(_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;
 }
 
@@ -5187,18 +5181,12 @@ static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObjec
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxBrush_GetColour(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxBrush_GetColour(_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;
 }
 
@@ -7063,18 +7051,12 @@ static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args, Py
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxDC_GetTextBackground(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxDC_GetTextBackground(_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;
 }
 
@@ -7272,18 +7254,12 @@ static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, Py
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxDC_GetTextForeground(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxDC_GetTextForeground(_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;
 }