]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/printfw.cpp
Copied/merged from the 2.2 branch.
[wxWidgets.git] / wxPython / src / msw / printfw.cpp
index b13dbf8765c3c9a4fd32c5cae011dc41071cdd10..c224ea72a8b7bc651f45419d66866952b312f7bc 100644 (file)
@@ -761,6 +761,149 @@ static PyObject *_wrap_wxPrintData_SetQuality(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
+static void *SwigwxPrinterDCTowxDC(void *ptr) {
+    wxPrinterDC *src;
+    wxDC *dest;
+    src = (wxPrinterDC *) ptr;
+    dest = (wxDC *) src;
+    return (void *) dest;
+}
+
+#define new_wxPrinterDC(_swigarg0) (new wxPrinterDC(_swigarg0))
+static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPrinterDC * _result;
+    wxPrintData * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "printData", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPrinterDC",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPrinterDC. Expected _wxPrintData_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+}    if (_result) {
+        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p");
+        _resultobj = Py_BuildValue("s",_ptemp);
+    } else {
+        Py_INCREF(Py_None);
+        _resultobj = Py_None;
+    }
+    return _resultobj;
+}
+
+#define new_wxPrinterDC2(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
+static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPrinterDC * _result;
+    wxString * _arg0;
+    wxString * _arg1;
+    wxString * _arg2;
+    bool  _arg3 = (bool ) TRUE;
+    int  _arg4 = (int ) wxPORTRAIT;
+    PyObject * _obj0 = 0;
+    PyObject * _obj1 = 0;
+    PyObject * _obj2 = 0;
+    int tempbool3 = (int) TRUE;
+    char *_kwnames[] = { "driver","device","output","interactive","orientation", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:new_wxPrinterDC2",_kwnames,&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) 
+        return NULL;
+{
+#if PYTHON_API_VERSION >= 1009
+    char* tmpPtr; int tmpSize;
+    if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        return NULL;
+    }
+    if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+        return NULL;
+    _arg0 = new wxString(tmpPtr, tmpSize);
+#else
+    if (!PyString_Check(_obj0)) {
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+        return NULL;
+    }
+    _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
+}
+{
+#if PYTHON_API_VERSION >= 1009
+    char* tmpPtr; int tmpSize;
+    if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        return NULL;
+    }
+    if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+        return NULL;
+    _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+    if (!PyString_Check(_obj1)) {
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+        return NULL;
+    }
+    _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+{
+#if PYTHON_API_VERSION >= 1009
+    char* tmpPtr; int tmpSize;
+    if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        return NULL;
+    }
+    if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+        return NULL;
+    _arg2 = new wxString(tmpPtr, tmpSize);
+#else
+    if (!PyString_Check(_obj2)) {
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+        return NULL;
+    }
+    _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
+}
+    _arg3 = (bool ) tempbool3;
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxPrinterDC *)new_wxPrinterDC2(*_arg0,*_arg1,*_arg2,_arg3,_arg4);
+
+    wxPy_END_ALLOW_THREADS;
+}    if (_result) {
+        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p");
+        _resultobj = Py_BuildValue("s",_ptemp);
+    } else {
+        Py_INCREF(Py_None);
+        _resultobj = Py_None;
+    }
+{
+    if (_obj0)
+        delete _arg0;
+}
+{
+    if (_obj1)
+        delete _arg1;
+}
+{
+    if (_obj2)
+        delete _arg2;
+}
+    return _resultobj;
+}
+
 #define new_wxPageSetupDialogData() (new wxPageSetupDialogData())
 static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -4335,6 +4478,8 @@ static PyMethodDef printfwcMethods[] = {
         { "wxPageSetupDialogData_EnableHelp", (PyCFunction) _wrap_wxPageSetupDialogData_EnableHelp, METH_VARARGS | METH_KEYWORDS },
         { "delete_wxPageSetupDialogData", (PyCFunction) _wrap_delete_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPageSetupDialogData", (PyCFunction) _wrap_new_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS },
+        { "new_wxPrinterDC2", (PyCFunction) _wrap_new_wxPrinterDC2, METH_VARARGS | METH_KEYWORDS },
+        { "new_wxPrinterDC", (PyCFunction) _wrap_new_wxPrinterDC, METH_VARARGS | METH_KEYWORDS },
         { "wxPrintData_SetQuality", (PyCFunction) _wrap_wxPrintData_SetQuality, METH_VARARGS | METH_KEYWORDS },
         { "wxPrintData_SetPaperSize", (PyCFunction) _wrap_wxPrintData_SetPaperSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPrintData_SetPaperId", (PyCFunction) _wrap_wxPrintData_SetPaperId, METH_VARARGS | METH_KEYWORDS },
@@ -4423,6 +4568,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
     { "_class_wxClipboard","_wxClipboard",0},
     { "_class_wxGauge","_wxGauge",0},
+    { "_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC},
+    { "_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC},
     { "_wxDC","_class_wxDC",0},
     { "_class_wxBitmapDataObject","_wxBitmapDataObject",0},
     { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0},
@@ -4438,8 +4585,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_size_t","_uint",0},
     { "_class_wxRealPoint","_wxRealPoint",0},
     { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
-    { "_wxPrinterDC","_class_wxPrinterDC",0},
     { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
+    { "_wxPrinterDC","_class_wxPrinterDC",0},
     { "_class_wxMenuItem","_wxMenuItem",0},
     { "_class_wxPaintEvent","_wxPaintEvent",0},
     { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
@@ -4534,6 +4681,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxCloseEvent","_class_wxCloseEvent",0},
     { "_unsigned_long","_long",0},
     { "_class_wxRect","_wxRect",0},
+    { "_class_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC},
+    { "_class_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC},
     { "_class_wxDC","_wxDC",0},
     { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
     { "_class_wxProgressDialog","_wxProgressDialog",0},
@@ -4684,8 +4833,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxButton","_class_wxButton",0},
     { "_wxSize","_class_wxSize",0},
     { "_wxRegionIterator","_class_wxRegionIterator",0},
-    { "_class_wxPrinterDC","_wxPrinterDC",0},
     { "_class_wxPyTextDataObject","_wxPyTextDataObject",0},
+    { "_class_wxPrinterDC","_wxPrinterDC",0},
     { "_class_wxPaintDC","_wxPaintDC",0},
     { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0},
     { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0},