#define SWIG_name "gdic"
#include "helpers.h"
-#include <wx/metafile.h>
#include <wx/imaglist.h>
-#ifndef __WXMSW__
-#include <wx/dcps.h>
-#endif
#include <wx/fontmap.h>
#include <wx/fontenc.h>
#include <wx/fontmap.h>
return new wxMemoryDC(oldDC);
}
+#include <wx/metafile.h>
+
#if 0
extern wxFont * wxNORMAL_FONT;
extern wxFont * wxSMALL_FONT;
PyObject * _resultobj;
wxBitmap * _result;
wxString * _arg0;
- wxBitmapType _arg1;
+ wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_BMP;
PyObject * _obj0 = 0;
char *_kwnames[] = { "name","type", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:new_wxBitmap",_kwnames,&_obj0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBitmap",_kwnames,&_obj0,&_arg1))
return NULL;
{
#if PYTHON_API_VERSION >= 1009
bool _result;
wxBitmap * _arg0;
wxString * _arg1;
- long _arg2;
+ wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_BMP;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","name","flags", NULL };
+ char *_kwnames[] = { "self","name","type", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxBitmap_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxBitmap_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
bool _result;
wxBitmap * _arg0;
wxString * _arg1;
- int _arg2;
+ wxBitmapType _arg2;
wxPalette * _arg3 = (wxPalette *) NULL;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
obj = PySequence_GetItem(pyPens, i);
}
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
+ if (!isFastPens)
+ Py_DECREF(obj);
goto err1;
}
obj = PySequence_GetItem(pyPoints, i);
}
if (! _2int_seq_helper(obj, &x1, &y1)) {
- Py_DECREF(obj);
+ if (!isFastPens)
+ Py_DECREF(obj);
goto err0;
}
obj = PySequence_GetItem(pyPens, i);
}
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
+ if (!isFastPens)
+ Py_DECREF(obj);
goto err1;
}
obj = PySequence_GetItem(pyLines, i);
}
if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) {
- Py_DECREF(obj);
+ if (!isFastPens)
+ Py_DECREF(obj);
goto err0;
}
return _resultobj;
}
+static void *SwigwxMetaFileTowxObject(void *ptr) {
+ wxMetaFile *src;
+ wxObject *dest;
+ src = (wxMetaFile *) ptr;
+ dest = (wxObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxMetaFile(_swigarg0) (new wxMetaFile(_swigarg0))
+static PyObject *_wrap_new_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMetaFile * _result;
+ wxString * _arg0 = (wxString *) &wxPyEmptyStr;
+ PyObject * _obj0 = 0;
+ char *_kwnames[] = { "filename", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFile",_kwnames,&_obj0))
+ return NULL;
+ if (_obj0)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ 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
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxMetaFile *)new_wxMetaFile(*_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFile_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj0)
+ delete _arg0;
+}
+ return _resultobj;
+}
+
+#define delete_wxMetaFile(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxMetaFile",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMetaFile. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxMetaFile(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxMetaFile_Ok(_swigobj) (_swigobj->Ok())
+static PyObject *_wrap_wxMetaFile_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_Ok",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_Ok. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxMetaFile_Ok(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxMetaFile_SetClipboard(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClipboard(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxMetaFile_SetClipboard(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxMetaFile * _arg0;
+ int _arg1 = (int ) 0;
+ int _arg2 = (int ) 0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","width","height", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxMetaFile_SetClipboard",_kwnames,&_argo0,&_arg1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_SetClipboard. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxMetaFile_SetClipboard(_arg0,_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxMetaFile_GetSize(_swigobj) (_swigobj->GetSize())
+static PyObject *_wrap_wxMetaFile_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxSize * _result;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetSize",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetSize. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxSize (wxMetaFile_GetSize(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
+#define wxMetaFile_GetWidth(_swigobj) (_swigobj->GetWidth())
+static PyObject *_wrap_wxMetaFile_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetWidth",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetWidth. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxMetaFile_GetWidth(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxMetaFile_GetHeight(_swigobj) (_swigobj->GetHeight())
+static PyObject *_wrap_wxMetaFile_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetHeight",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetHeight. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxMetaFile_GetHeight(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxMetaFile_GetFileName(_swigobj) (_swigobj->GetFileName())
+static PyObject *_wrap_wxMetaFile_GetFileName(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxMetaFile * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetFileName",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetFileName. Expected _wxMetaFile_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ const wxString & _result_ref = wxMetaFile_GetFileName(_arg0);
+ _result = (wxString *) &_result_ref;
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+ return _resultobj;
+}
+
static void *SwigwxMetaFileDCTowxDC(void *ptr) {
wxMetaFileDC *src;
wxDC *dest;
return (void *) dest;
}
-#define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0))
+#define new_wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMetaFileDC * _result;
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
+ int _arg1 = (int ) 0;
+ int _arg2 = (int ) 0;
+ wxString * _arg3 = (wxString *) &wxPyEmptyStr;
PyObject * _obj0 = 0;
- char *_kwnames[] = { "filename", NULL };
+ PyObject * _obj3 = 0;
+ char *_kwnames[] = { "filename","width","height","description", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFileDC",_kwnames,&_obj0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OiiO:new_wxMetaFileDC",_kwnames,&_obj0,&_arg1,&_arg2,&_obj3))
return NULL;
if (_obj0)
{
}
_arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
#endif
+}
+ if (_obj3)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg3 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj3)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0);
+ _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0,_arg1,_arg2,*_arg3);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
{
if (_obj0)
delete _arg0;
+}
+{
+ if (_obj3)
+ delete _arg3;
}
return _resultobj;
}
{ "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxMetaFileDC_Close", (PyCFunction) _wrap_wxMetaFileDC_Close, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMetaFileDC", (PyCFunction) _wrap_new_wxMetaFileDC, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_GetFileName", (PyCFunction) _wrap_wxMetaFile_GetFileName, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_GetHeight", (PyCFunction) _wrap_wxMetaFile_GetHeight, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_GetWidth", (PyCFunction) _wrap_wxMetaFile_GetWidth, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_GetSize", (PyCFunction) _wrap_wxMetaFile_GetSize, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_SetClipboard", (PyCFunction) _wrap_wxMetaFile_SetClipboard, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetaFile_Ok", (PyCFunction) _wrap_wxMetaFile_Ok, METH_VARARGS | METH_KEYWORDS },
+ { "delete_wxMetaFile", (PyCFunction) _wrap_delete_wxMetaFile, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxMetaFile", (PyCFunction) _wrap_new_wxMetaFile, METH_VARARGS | METH_KEYWORDS },
{ "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS },
{ "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS },
{ "_wxObject","_wxImageList",SwigwxImageListTowxObject},
{ "_wxObject","_wxPalette",SwigwxPaletteTowxObject},
{ "_wxObject","_wxMetaFileDC",SwigwxMetaFileDCTowxObject},
+ { "_wxObject","_wxMetaFile",SwigwxMetaFileTowxObject},
{ "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject},
{ "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject},
{ "_wxObject","_wxClientDC",SwigwxClientDCTowxObject},
PyDict_SetItemString(d,"wxFONTENCODING_CP855", PyInt_FromLong((long) wxFONTENCODING_CP855));
PyDict_SetItemString(d,"wxFONTENCODING_CP866", PyInt_FromLong((long) wxFONTENCODING_CP866));
PyDict_SetItemString(d,"wxFONTENCODING_CP874", PyInt_FromLong((long) wxFONTENCODING_CP874));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP932", PyInt_FromLong((long) wxFONTENCODING_CP932));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP936", PyInt_FromLong((long) wxFONTENCODING_CP936));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP949", PyInt_FromLong((long) wxFONTENCODING_CP949));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP950", PyInt_FromLong((long) wxFONTENCODING_CP950));
PyDict_SetItemString(d,"wxFONTENCODING_CP1250", PyInt_FromLong((long) wxFONTENCODING_CP1250));
PyDict_SetItemString(d,"wxFONTENCODING_CP1251", PyInt_FromLong((long) wxFONTENCODING_CP1251));
PyDict_SetItemString(d,"wxFONTENCODING_CP1252", PyInt_FromLong((long) wxFONTENCODING_CP1252));