]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_gdi_wrap.cpp
reSWIGged
[wxWidgets.git] / wxPython / src / mac / _gdi_wrap.cpp
index f419ee7e8cbe5072112efdd560c55c45920f12e1..d35850b95c02f715cc05204e6afa42c6e05f0d68 100644 (file)
@@ -23084,15 +23084,33 @@ SWIGINTERN PyObject *DC_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *a
   return SWIG_Py_Void();
 }
 
   return SWIG_Py_Void();
 }
 
-SWIGINTERN PyObject *_wrap_new_MemoryDC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_MemoryDC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   PyObject *resultobj = 0;
+  wxBitmap const &arg1_defvalue = wxNullBitmap ;
+  wxBitmap *arg1 = (wxBitmap *) &arg1_defvalue ;
   wxMemoryDC *result = 0 ;
   wxMemoryDC *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *  kwnames[] = {
+    (char *) "bitmap", NULL 
+  };
   
   
-  if (!SWIG_Python_UnpackTuple(args,"new_MemoryDC",0,0,0)) SWIG_fail;
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_MemoryDC",kwnames,&obj0)) SWIG_fail;
+  if (obj0) {
+    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_wxBitmap,  0  | 0);
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MemoryDC" "', expected argument " "1"" of type '" "wxBitmap const &""'"); 
+    }
+    if (!argp1) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MemoryDC" "', expected argument " "1"" of type '" "wxBitmap const &""'"); 
+    }
+    arg1 = reinterpret_cast< wxBitmap * >(argp1);
+  }
   {
     if (!wxPyCheckForApp()) SWIG_fail;
     PyThreadState* __tstate = wxPyBeginAllowThreads();
   {
     if (!wxPyCheckForApp()) SWIG_fail;
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    result = (wxMemoryDC *)new wxMemoryDC();
+    result = (wxMemoryDC *)new wxMemoryDC((wxBitmap const &)*arg1);
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) SWIG_fail;
   }
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) SWIG_fail;
   }
@@ -23280,121 +23298,28 @@ fail:
 }
 
 
 }
 
 
-SWIGINTERN PyObject *_wrap_new_BufferedDC__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  wxWindow *arg1 = (wxWindow *) 0 ;
-  wxDC *arg2 = (wxDC *) 0 ;
-  wxSize *arg3 = 0 ;
-  int arg4 = (int) wxBUFFER_CLIENT_AREA ;
-  wxBufferedDC *result = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  wxSize temp3 ;
-  int val4 ;
-  int ecode4 = 0 ;
-  
-  if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BufferedDC" "', expected argument " "1"" of type '" "wxWindow *""'"); 
-  }
-  arg1 = reinterpret_cast< wxWindow * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_wxDC, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BufferedDC" "', expected argument " "2"" of type '" "wxDC *""'"); 
-  }
-  arg2 = reinterpret_cast< wxDC * >(argp2);
-  {
-    arg3 = &temp3;
-    if ( ! wxSize_helper(swig_obj[2], &arg3)) SWIG_fail;
-  }
-  if (swig_obj[3]) {
-    ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
-    if (!SWIG_IsOK(ecode4)) {
-      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BufferedDC" "', expected argument " "4"" of type '" "int""'");
-    } 
-    arg4 = static_cast< int >(val4);
-  }
-  {
-    if (!wxPyCheckForApp()) SWIG_fail;
-    PyThreadState* __tstate = wxPyBeginAllowThreads();
-    result = (wxBufferedDC *)new wxBufferedDC(arg1,arg2,(wxSize const &)*arg3,arg4);
-    wxPyEndAllowThreads(__tstate);
-    if (PyErr_Occurred()) SWIG_fail;
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxBufferedDC, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_new_BufferedDC(PyObject *self, PyObject *args) {
   int argc;
 SWIGINTERN PyObject *_wrap_new_BufferedDC(PyObject *self, PyObject *args) {
   int argc;
-  PyObject *argv[5];
+  PyObject *argv[4];
   
   
-  if (!(argc = SWIG_Python_UnpackTuple(args,"new_BufferedDC",0,4,argv))) SWIG_fail;
+  if (!(argc = SWIG_Python_UnpackTuple(args,"new_BufferedDC",0,3,argv))) SWIG_fail;
   --argc;
   if ((argc >= 1) && (argc <= 3)) {
     int _v = 0;
   --argc;
   if ((argc >= 1) && (argc <= 3)) {
     int _v = 0;
-    {
-      void *vptr = 0;
-      int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_wxDC, 0);
-      _v = SWIG_CheckState(res);
-    }
-    if (!_v) goto check_1;
     if (argc > 1) {
       {
         int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_wxBitmap, 0);
         _v = SWIG_CheckState(res);
       }
       if (!_v) goto check_1;
     if (argc > 1) {
       {
         int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_wxBitmap, 0);
         _v = SWIG_CheckState(res);
       }
       if (!_v) goto check_1;
-      if (argc > 2) {
-        {
-          {
-            int res = SWIG_AsVal_int(argv[2], NULL);
-            _v = SWIG_CheckState(res);
-          }
-        }
-        if (!_v) goto check_1;
-      }
     }
     return _wrap_new_BufferedDC__SWIG_0(self, argc, argv);
   }
 check_1:
   
   if ((argc >= 2) && (argc <= 3)) {
     }
     return _wrap_new_BufferedDC__SWIG_0(self, argc, argv);
   }
 check_1:
   
   if ((argc >= 2) && (argc <= 3)) {
-    int _v = 0;
-    {
-      void *vptr = 0;
-      int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_wxDC, 0);
-      _v = SWIG_CheckState(res);
-    }
-    if (!_v) goto check_2;
-    {
-      {
-        _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2);
-      }
-    }
-    if (!_v) goto check_2;
-    if (argc > 2) {
-      {
-        {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
-        }
-      }
-      if (!_v) goto check_2;
-    }
     return _wrap_new_BufferedDC__SWIG_1(self, argc, argv);
   }
     return _wrap_new_BufferedDC__SWIG_1(self, argc, argv);
   }
-check_2:
-  
-  if ((argc >= 3) && (argc <= 4)) {
-    return _wrap_new_BufferedDC__SWIG_2(self, argc, argv);
-  }
   
 fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'new_BufferedDC'");
   
 fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'new_BufferedDC'");
@@ -23806,6 +23731,38 @@ SWIGINTERN PyObject *PaintDC_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *
   return SWIG_Python_InitShadowInstance(args);
 }
 
   return SWIG_Python_InitShadowInstance(args);
 }
 
+SWIGINTERN PyObject *_wrap_AutoBufferedPaintDCFactory(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  wxWindow *arg1 = (wxWindow *) 0 ;
+  wxDC *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *  kwnames[] = {
+    (char *) "window", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:AutoBufferedPaintDCFactory",kwnames,&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoBufferedPaintDCFactory" "', expected argument " "1"" of type '" "wxWindow *""'"); 
+  }
+  arg1 = reinterpret_cast< wxWindow * >(argp1);
+  {
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    result = (wxDC *)wxAutoBufferedPaintDCFactory(arg1);
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) SWIG_fail;
+  }
+  {
+    resultobj = wxPyMake_wxObject(result, (bool)SWIG_POINTER_OWN); 
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_new_MirrorDC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   wxDC *arg1 = 0 ;
 SWIGINTERN PyObject *_wrap_new_MirrorDC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   wxDC *arg1 = 0 ;
@@ -34920,7 +34877,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"DC__DrawPolygonList", (PyCFunction) _wrap_DC__DrawPolygonList, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"DC__DrawTextList", (PyCFunction) _wrap_DC__DrawTextList, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"DC_swigregister", DC_swigregister, METH_VARARGS, NULL},
         { (char *)"DC__DrawPolygonList", (PyCFunction) _wrap_DC__DrawPolygonList, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"DC__DrawTextList", (PyCFunction) _wrap_DC__DrawTextList, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"DC_swigregister", DC_swigregister, METH_VARARGS, NULL},
-        { (char *)"new_MemoryDC", (PyCFunction)_wrap_new_MemoryDC, METH_NOARGS, NULL},
+        { (char *)"new_MemoryDC", (PyCFunction) _wrap_new_MemoryDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"new_MemoryDCFromDC", (PyCFunction) _wrap_new_MemoryDCFromDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MemoryDC_SelectObject", (PyCFunction) _wrap_MemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MemoryDC_swigregister", MemoryDC_swigregister, METH_VARARGS, NULL},
         { (char *)"new_MemoryDCFromDC", (PyCFunction) _wrap_new_MemoryDCFromDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MemoryDC_SelectObject", (PyCFunction) _wrap_MemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MemoryDC_swigregister", MemoryDC_swigregister, METH_VARARGS, NULL},
@@ -34948,6 +34905,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"new_PaintDC", (PyCFunction) _wrap_new_PaintDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PaintDC_swigregister", PaintDC_swigregister, METH_VARARGS, NULL},
         { (char *)"PaintDC_swiginit", PaintDC_swiginit, METH_VARARGS, NULL},
         { (char *)"new_PaintDC", (PyCFunction) _wrap_new_PaintDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PaintDC_swigregister", PaintDC_swigregister, METH_VARARGS, NULL},
         { (char *)"PaintDC_swiginit", PaintDC_swiginit, METH_VARARGS, NULL},
+        { (char *)"AutoBufferedPaintDCFactory", (PyCFunction) _wrap_AutoBufferedPaintDCFactory, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"new_MirrorDC", (PyCFunction) _wrap_new_MirrorDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MirrorDC_swigregister", MirrorDC_swigregister, METH_VARARGS, NULL},
         { (char *)"MirrorDC_swiginit", MirrorDC_swiginit, METH_VARARGS, NULL},
         { (char *)"new_MirrorDC", (PyCFunction) _wrap_new_MirrorDC, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"MirrorDC_swigregister", MirrorDC_swigregister, METH_VARARGS, NULL},
         { (char *)"MirrorDC_swiginit", MirrorDC_swiginit, METH_VARARGS, NULL},
@@ -35232,6 +35190,12 @@ static PyMethodDef SwigMethods[] = {
 static void *_p_wxPaintDCTo_p_wxClientDC(void *x) {
     return (void *)((wxClientDC *)  ((wxPaintDC *) x));
 }
 static void *_p_wxPaintDCTo_p_wxClientDC(void *x) {
     return (void *)((wxClientDC *)  ((wxPaintDC *) x));
 }
+static void *_p_wxBufferedDCTo_p_wxMemoryDC(void *x) {
+    return (void *)((wxMemoryDC *)  ((wxBufferedDC *) x));
+}
+static void *_p_wxBufferedPaintDCTo_p_wxMemoryDC(void *x) {
+    return (void *)((wxMemoryDC *) (wxBufferedDC *) ((wxBufferedPaintDC *) x));
+}
 static void *_p_wxClientDCTo_p_wxWindowDC(void *x) {
     return (void *)((wxWindowDC *)  ((wxClientDC *) x));
 }
 static void *_p_wxClientDCTo_p_wxWindowDC(void *x) {
     return (void *)((wxWindowDC *)  ((wxClientDC *) x));
 }
@@ -35269,7 +35233,7 @@ static void *_p_wxGCDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxGCDC *) x));
 }
 static void *_p_wxBufferedDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxGCDC *) x));
 }
 static void *_p_wxBufferedDCTo_p_wxDC(void *x) {
-    return (void *)((wxDC *)  ((wxBufferedDC *) x));
+    return (void *)((wxDC *) (wxMemoryDC *) ((wxBufferedDC *) x));
 }
 static void *_p_wxScreenDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxScreenDC *) x));
 }
 static void *_p_wxScreenDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxScreenDC *) x));
@@ -35287,7 +35251,7 @@ static void *_p_wxMetaFileDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxMetaFileDC *) x));
 }
 static void *_p_wxBufferedPaintDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *)  ((wxMetaFileDC *) x));
 }
 static void *_p_wxBufferedPaintDCTo_p_wxDC(void *x) {
-    return (void *)((wxDC *) (wxBufferedDC *) ((wxBufferedPaintDC *) x));
+    return (void *)((wxDC *) (wxMemoryDC *)(wxBufferedDC *) ((wxBufferedPaintDC *) x));
 }
 static void *_p_wxClientDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *) (wxWindowDC *) ((wxClientDC *) x));
 }
 static void *_p_wxClientDCTo_p_wxDC(void *x) {
     return (void *)((wxDC *) (wxWindowDC *) ((wxClientDC *) x));
@@ -35509,7 +35473,7 @@ static void *_p_wxMouseCaptureLostEventTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxEvent *) ((wxMouseCaptureLostEvent *) x));
 }
 static void *_p_wxBufferedPaintDCTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxEvent *) ((wxMouseCaptureLostEvent *) x));
 }
 static void *_p_wxBufferedPaintDCTo_p_wxObject(void *x) {
-    return (void *)((wxObject *) (wxDC *)(wxBufferedDC *) ((wxBufferedPaintDC *) x));
+    return (void *)((wxObject *) (wxDC *)(wxMemoryDC *)(wxBufferedDC *) ((wxBufferedPaintDC *) x));
 }
 static void *_p_wxPaintDCTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxDC *)(wxWindowDC *)(wxClientDC *) ((wxPaintDC *) x));
 }
 static void *_p_wxPaintDCTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxDC *)(wxWindowDC *)(wxClientDC *) ((wxPaintDC *) x));
@@ -35536,7 +35500,7 @@ static void *_p_wxPaletteTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxGDIObject *) ((wxPalette *) x));
 }
 static void *_p_wxBufferedDCTo_p_wxObject(void *x) {
     return (void *)((wxObject *) (wxGDIObject *) ((wxPalette *) x));
 }
 static void *_p_wxBufferedDCTo_p_wxObject(void *x) {
-    return (void *)((wxObject *) (wxDC *) ((wxBufferedDC *) x));
+    return (void *)((wxObject *) (wxDC *)(wxMemoryDC *) ((wxBufferedDC *) x));
 }
 static void *_p_wxImageListTo_p_wxObject(void *x) {
     return (void *)((wxObject *)  ((wxImageList *) x));
 }
 static void *_p_wxImageListTo_p_wxObject(void *x) {
     return (void *)((wxObject *)  ((wxImageList *) x));
@@ -36012,7 +35976,7 @@ static swig_cast_info _swigc__p_wxImageList[] = {  {&_swigt__p_wxImageList, 0, 0
 static swig_cast_info _swigc__p_wxLanguageInfo[] = {  {&_swigt__p_wxLanguageInfo, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxLocale[] = {  {&_swigt__p_wxPyLocale, _p_wxPyLocaleTo_p_wxLocale, 0, 0},  {&_swigt__p_wxLocale, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMask[] = {  {&_swigt__p_wxMask, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxLanguageInfo[] = {  {&_swigt__p_wxLanguageInfo, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxLocale[] = {  {&_swigt__p_wxPyLocale, _p_wxPyLocaleTo_p_wxLocale, 0, 0},  {&_swigt__p_wxLocale, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMask[] = {  {&_swigt__p_wxMask, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_wxMemoryDC[] = {  {&_swigt__p_wxMemoryDC, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_wxMemoryDC[] = {  {&_swigt__p_wxBufferedDC, _p_wxBufferedDCTo_p_wxMemoryDC, 0, 0},  {&_swigt__p_wxMemoryDC, 0, 0, 0},  {&_swigt__p_wxBufferedPaintDC, _p_wxBufferedPaintDCTo_p_wxMemoryDC, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMetaFile[] = {  {&_swigt__p_wxMetaFile, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMetaFileDC[] = {  {&_swigt__p_wxMetaFileDC, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMirrorDC[] = {  {&_swigt__p_wxMirrorDC, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMetaFile[] = {  {&_swigt__p_wxMetaFile, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMetaFileDC[] = {  {&_swigt__p_wxMetaFileDC, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_wxMirrorDC[] = {  {&_swigt__p_wxMirrorDC, 0, 0, 0},{0, 0, 0, 0}};