reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-02-12 01:39:33 +00:00
parent 927d7cfa70
commit db91459553
22 changed files with 1037 additions and 147 deletions

View File

@@ -654,6 +654,11 @@ wxRect wxDC_GetClippingRect(wxDC *self){
self->GetClippingBox(rect);
return rect;
}
wxArrayInt wxDC_GetPartialTextExtents(wxDC *self,wxString const &text){
wxArrayInt widths;
self->GetPartialTextExtents(text, widths);
return widths;
}
PyObject *wxDC__DrawPointList(wxDC *self,PyObject *pyCoords,PyObject *pyPens,PyObject *pyBrushes){
return wxPyDrawXXXList(*self, wxPyDrawXXXPoint, pyCoords, pyPens, pyBrushes);
}
@@ -1899,6 +1904,37 @@ static PyObject *_wrap_Pen_GetDashes(PyObject *self, PyObject *args, PyObject *k
}
static PyObject *_wrap_Pen___eq__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPen *arg1 = (wxPen *) 0 ;
wxPen *arg2 = 0 ;
bool result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "pen", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Pen___eq__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxPen const *)arg1)->operator ==((wxPen const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Pen_GetDashCount(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPen *arg1 = (wxPen *) 0 ;
@@ -13239,6 +13275,55 @@ static PyObject *_wrap_DC_GetMultiLineTextExtent(PyObject *self, PyObject *args,
}
static PyObject *_wrap_DC_GetPartialTextExtents(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxDC *arg1 = (wxDC *) 0 ;
wxString *arg2 = 0 ;
wxArrayInt result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "text", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_GetPartialTextExtents",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = wxDC_GetPartialTextExtents(arg1,(wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = PyList_New(0);
size_t idx;
for (idx = 0; idx < (&result)->GetCount(); idx += 1) {
PyObject* val = PyInt_FromLong( (&result)->Item(idx) );
PyList_Append(resultobj, val);
Py_DECREF(val);
}
}
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_DC_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxDC *arg1 = (wxDC *) 0 ;
@@ -15070,18 +15155,15 @@ static PyObject * MemoryDC_swigregister(PyObject *self, PyObject *args) {
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_BufferedDC(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_new_BufferedDC__SWIG_0(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxDC *arg1 = (wxDC *) 0 ;
wxBitmap *arg2 = 0 ;
wxBufferedDC *result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "dc",(char *) "buffer", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_BufferedDC",kwnames,&obj0,&obj1)) goto fail;
if(!PyArg_ParseTuple(args,(char *)"OO:new_BufferedDC",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxBitmap,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
@@ -15101,27 +15183,144 @@ static PyObject *_wrap_new_BufferedDC(PyObject *self, PyObject *args, PyObject *
}
static PyObject *_wrap_new_BufferedDCInternalBuffer(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_new_BufferedDC__SWIG_1(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxDC *arg1 = (wxDC *) 0 ;
wxSize *arg2 = 0 ;
int arg3 = (int) wxBUFFER_DC_DEFAULT ;
wxBufferedDC *result;
wxSize temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "dc",(char *) "area", NULL
};
PyObject * obj2 = 0 ;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_BufferedDCInternalBuffer",kwnames,&obj0,&obj1)) goto fail;
if(!PyArg_ParseTuple(args,(char *)"OO|O:new_BufferedDC",&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
}
if (obj2) {
{
arg3 = (int) SWIG_PyObj_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxSize const &)*arg2);
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxSize const &)*arg2,arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxBufferedDC, 1);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_new_BufferedDC(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[4];
int ii;
argc = PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 3); ii++) {
argv[ii] = PyTuple_GetItem(args,ii);
}
if (argc == 2) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxDC, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
{
void *ptr;
if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_wxBitmap, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_BufferedDC__SWIG_0(self,args);
}
}
}
if ((argc >= 2) && (argc <= 3)) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxDC, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
{
_v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2);
}
if (_v) {
if (argc <= 2) {
return _wrap_new_BufferedDC__SWIG_1(self,args);
}
{
SWIG_PyObj_AsInt(argv[2]);
if (PyErr_Occurred()) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_BufferedDC__SWIG_1(self,args);
}
}
}
}
PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_BufferedDC'");
return NULL;
}
static PyObject *_wrap_new_BufferedDCInternalBuffer(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxDC *arg1 = (wxDC *) 0 ;
wxSize *arg2 = 0 ;
int arg3 = (int) wxBUFFER_DC_DEFAULT ;
wxBufferedDC *result;
wxSize temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"OO|O:new_BufferedDCInternalBuffer",&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
}
if (obj2) {
{
arg3 = (int) SWIG_PyObj_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxSize const &)*arg2,arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
@@ -15164,25 +15363,19 @@ static PyObject * BufferedDC_swigregister(PyObject *self, PyObject *args) {
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_BufferedPaintDC(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_new_BufferedPaintDC__SWIG_0(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
wxBitmap const &arg2_defvalue = wxNullBitmap ;
wxBitmap *arg2 = (wxBitmap *) &arg2_defvalue ;
wxBitmap *arg2 = 0 ;
wxBufferedPaintDC *result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "window",(char *) "buffer", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_BufferedPaintDC",kwnames,&obj0,&obj1)) goto fail;
if(!PyArg_ParseTuple(args,(char *)"OO:new_BufferedPaintDC",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (obj1) {
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxBitmap,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
}
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxBitmap,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15198,6 +15391,106 @@ static PyObject *_wrap_new_BufferedPaintDC(PyObject *self, PyObject *args, PyObj
}
static PyObject *_wrap_new_BufferedPaintDC__SWIG_1(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
int arg2 = (int) wxBUFFER_DC_DEFAULT ;
wxBufferedPaintDC *result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O|O:new_BufferedPaintDC",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (obj1) {
{
arg2 = (int) SWIG_PyObj_AsInt(obj1);
if (PyErr_Occurred()) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedPaintDC *)new wxBufferedPaintDC(arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxBufferedPaintDC, 1);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_new_BufferedPaintDC(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3];
int ii;
argc = PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GetItem(args,ii);
}
if ((argc >= 1) && (argc <= 2)) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxWindow, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
if (argc <= 1) {
return _wrap_new_BufferedPaintDC__SWIG_1(self,args);
}
{
SWIG_PyObj_AsInt(argv[1]);
if (PyErr_Occurred()) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_BufferedPaintDC__SWIG_1(self,args);
}
}
}
if (argc == 2) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxWindow, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
{
void *ptr;
if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_wxBitmap, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_BufferedPaintDC__SWIG_0(self,args);
}
}
}
PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_BufferedPaintDC'");
return NULL;
}
static PyObject * BufferedPaintDC_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -18247,6 +18540,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Pen_SetWidth", (PyCFunction) _wrap_Pen_SetWidth, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen_SetDashes", (PyCFunction) _wrap_Pen_SetDashes, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen_GetDashes", (PyCFunction) _wrap_Pen_GetDashes, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen___eq__", (PyCFunction) _wrap_Pen___eq__, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen_GetDashCount", (PyCFunction) _wrap_Pen_GetDashCount, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen_GetStipple", (PyCFunction) _wrap_Pen_GetStipple, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Pen_SetStipple", (PyCFunction) _wrap_Pen_SetStipple, METH_VARARGS | METH_KEYWORDS },
@@ -18593,6 +18887,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"DC_GetTextExtent", (PyCFunction) _wrap_DC_GetTextExtent, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetFullTextExtent", (PyCFunction) _wrap_DC_GetFullTextExtent, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetMultiLineTextExtent", (PyCFunction) _wrap_DC_GetMultiLineTextExtent, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetPartialTextExtents", (PyCFunction) _wrap_DC_GetPartialTextExtents, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetSize", (PyCFunction) _wrap_DC_GetSize, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetSizeTuple", (PyCFunction) _wrap_DC_GetSizeTuple, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DC_GetSizeMM", (PyCFunction) _wrap_DC_GetSizeMM, METH_VARARGS | METH_KEYWORDS },
@@ -18654,11 +18949,11 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"new_MemoryDCFromDC", (PyCFunction) _wrap_new_MemoryDCFromDC, METH_VARARGS | METH_KEYWORDS },
{ (char *)"MemoryDC_SelectObject", (PyCFunction) _wrap_MemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS },
{ (char *)"MemoryDC_swigregister", MemoryDC_swigregister, METH_VARARGS },
{ (char *)"new_BufferedDC", (PyCFunction) _wrap_new_BufferedDC, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_BufferedDCInternalBuffer", (PyCFunction) _wrap_new_BufferedDCInternalBuffer, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_BufferedDC", _wrap_new_BufferedDC, METH_VARARGS },
{ (char *)"new_BufferedDCInternalBuffer", _wrap_new_BufferedDCInternalBuffer, METH_VARARGS },
{ (char *)"BufferedDC_UnMask", (PyCFunction) _wrap_BufferedDC_UnMask, METH_VARARGS | METH_KEYWORDS },
{ (char *)"BufferedDC_swigregister", BufferedDC_swigregister, METH_VARARGS },
{ (char *)"new_BufferedPaintDC", (PyCFunction) _wrap_new_BufferedPaintDC, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_BufferedPaintDC", _wrap_new_BufferedPaintDC, METH_VARARGS },
{ (char *)"BufferedPaintDC_swigregister", BufferedPaintDC_swigregister, METH_VARARGS },
{ (char *)"new_ScreenDC", (PyCFunction) _wrap_new_ScreenDC, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ScreenDC_StartDrawingOnTopWin", (PyCFunction) _wrap_ScreenDC_StartDrawingOnTopWin, METH_VARARGS | METH_KEYWORDS },
@@ -19669,6 +19964,9 @@ SWIGEXPORT(void) SWIG_init(void) {
PyDict_SetItemString(d,"PLATFORM_WINDOWS", SWIG_PyObj_FromInt((int)wxPLATFORM_WINDOWS));
PyDict_SetItemString(d,"PLATFORM_OS2", SWIG_PyObj_FromInt((int)wxPLATFORM_OS2));
PyDict_SetItemString(d,"PLATFORM_MAC", SWIG_PyObj_FromInt((int)wxPLATFORM_MAC));
PyDict_SetItemString(d,"BUFFER_DC_OVERWRITE_BG", SWIG_PyObj_FromInt((int)wxBUFFER_DC_OVERWRITE_BG));
PyDict_SetItemString(d,"BUFFER_DC_PRESERVE_BG", SWIG_PyObj_FromInt((int)wxBUFFER_DC_PRESERVE_BG));
PyDict_SetItemString(d,"BUFFER_DC_DEFAULT", SWIG_PyObj_FromInt((int)wxBUFFER_DC_DEFAULT));
PyDict_SetItemString(d,"IMAGELIST_DRAW_NORMAL", SWIG_PyObj_FromInt((int)wxIMAGELIST_DRAW_NORMAL));
PyDict_SetItemString(d,"IMAGELIST_DRAW_TRANSPARENT", SWIG_PyObj_FromInt((int)wxIMAGELIST_DRAW_TRANSPARENT));
PyDict_SetItemString(d,"IMAGELIST_DRAW_SELECTED", SWIG_PyObj_FromInt((int)wxIMAGELIST_DRAW_SELECTED));