SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7806,91 +7806,8 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject * pyPens) {
|
||||
wxPyBeginBlockThreads();
|
||||
|
||||
bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
|
||||
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
|
||||
int numObjs = 0;
|
||||
int numPens = 0;
|
||||
wxPen* pen;
|
||||
PyObject* obj;
|
||||
int x1, y1;
|
||||
int i = 0;
|
||||
PyObject* retval;
|
||||
|
||||
if (!PySequence_Check(pyPoints)) {
|
||||
goto err0;
|
||||
}
|
||||
if (!PySequence_Check(pyPens)) {
|
||||
goto err1;
|
||||
}
|
||||
numObjs = PySequence_Length(pyPoints);
|
||||
numPens = PySequence_Length(pyPens);
|
||||
|
||||
for (i = 0; i < numObjs; i++) {
|
||||
// Use a new pen?
|
||||
if (i < numPens) {
|
||||
if (isFastPens) {
|
||||
obj = PySequence_Fast_GET_ITEM(pyPens, i);
|
||||
}
|
||||
else {
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
self->SetPen(*pen);
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
||||
// Get the point coordinants
|
||||
if (isFastSeq) {
|
||||
obj = PySequence_Fast_GET_ITEM(pyPoints, i);
|
||||
}
|
||||
else {
|
||||
obj = PySequence_GetItem(pyPoints, i);
|
||||
}
|
||||
if (! wxPy2int_seq_helper(obj, &x1, &y1)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
if (PyErr_Occurred()) {
|
||||
retval = NULL;
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
// Now draw the point
|
||||
self->DrawPoint(x1, y1);
|
||||
|
||||
if (!isFastSeq)
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
retval = Py_None;
|
||||
goto exit;
|
||||
|
||||
err1:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
err0:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
exit:
|
||||
wxPyEndBlockThreads();
|
||||
return retval;
|
||||
static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) {
|
||||
return wxPyDrawXXXList(*self, wxPyDrawXXXPoint, pyCoords, pyPens, pyBrushes);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -7898,13 +7815,15 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","pyPoints","pyPens", NULL };
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawPointList",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawPointList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -7919,9 +7838,12 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2);
|
||||
_result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -7931,91 +7853,8 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * pyPens) {
|
||||
wxPyBeginBlockThreads();
|
||||
|
||||
bool isFastSeq = PyList_Check(pyLines) || PyTuple_Check(pyLines);
|
||||
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
|
||||
int numObjs = 0;
|
||||
int numPens = 0;
|
||||
wxPen* pen;
|
||||
PyObject* obj;
|
||||
int x1, y1, x2, y2;
|
||||
int i = 0;
|
||||
PyObject* retval;
|
||||
|
||||
if (!PySequence_Check(pyLines)) {
|
||||
goto err0;
|
||||
}
|
||||
if (!PySequence_Check(pyPens)) {
|
||||
goto err1;
|
||||
}
|
||||
numObjs = PySequence_Length(pyLines);
|
||||
numPens = PySequence_Length(pyPens);
|
||||
|
||||
for (i = 0; i < numObjs; i++) {
|
||||
// Use a new pen?
|
||||
if (i < numPens) {
|
||||
if (isFastPens) {
|
||||
obj = PySequence_Fast_GET_ITEM(pyPens, i);
|
||||
}
|
||||
else {
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
self->SetPen(*pen);
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
||||
// Get the line coordinants
|
||||
if (isFastSeq) {
|
||||
obj = PySequence_Fast_GET_ITEM(pyLines, i);
|
||||
}
|
||||
else {
|
||||
obj = PySequence_GetItem(pyLines, i);
|
||||
}
|
||||
if (! wxPy4int_seq_helper(obj, &x1, &y1, &x2, &y2)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
if (PyErr_Occurred()) {
|
||||
retval = NULL;
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Now draw the line
|
||||
self->DrawLine(x1, y1, x2, y2);
|
||||
|
||||
if (!isFastSeq)
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
retval = Py_None;
|
||||
goto exit;
|
||||
|
||||
err1:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
err0:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x2,y2) sequences.");
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
exit:
|
||||
wxPyEndBlockThreads();
|
||||
return retval;
|
||||
static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) {
|
||||
return wxPyDrawXXXList(*self, wxPyDrawXXXLine, pyCoords, pyPens, pyBrushes);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -8023,13 +7862,15 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","pyLines","pyPens", NULL };
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawLineList",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawLineList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -8044,9 +7885,205 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2);
|
||||
_result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawRectangleList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) {
|
||||
return wxPyDrawXXXList(*self, wxPyDrawXXXRectangle, pyCoords, pyPens, pyBrushes);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawRectangleList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
PyObject * _result;
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawRectangleList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawRectangleList. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawRectangleList(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawEllipseList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) {
|
||||
return wxPyDrawXXXList(*self, wxPyDrawXXXEllipse, pyCoords, pyPens, pyBrushes);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawEllipseList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
PyObject * _result;
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawEllipseList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawEllipseList. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawEllipseList(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawPolygonList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) {
|
||||
return wxPyDrawXXXList(*self, wxPyDrawXXXPolygon, pyCoords, pyPens, pyBrushes);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawPolygonList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
PyObject * _result;
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawPolygonList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawPolygonList. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawPolygonList(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawTextList(wxDC *self,PyObject * textList,PyObject * pyPoints,PyObject * foregroundList,PyObject * backgroundList) {
|
||||
return wxPyDrawTextList(*self, textList, pyPoints, foregroundList, backgroundList);
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawTextList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
PyObject * _result;
|
||||
wxDC * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _arg4;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
PyObject * _obj4 = 0;
|
||||
char *_kwnames[] = { "self","textList","pyPoints","foregroundList","backgroundList", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:wxDC__DrawTextList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&_obj4))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawTextList. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
_arg2 = _obj2;
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
_arg4 = _obj4;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (PyObject *)wxDC__DrawTextList(_arg0,_arg1,_arg2,_arg3,_arg4);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -10482,6 +10519,10 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "new_wxBufferedDC", (PyCFunction) _wrap_new_wxBufferedDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawTextList", (PyCFunction) _wrap_wxDC__DrawTextList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawPolygonList", (PyCFunction) _wrap_wxDC__DrawPolygonList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawEllipseList", (PyCFunction) _wrap_wxDC__DrawEllipseList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawRectangleList", (PyCFunction) _wrap_wxDC__DrawRectangleList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawLineList", (PyCFunction) _wrap_wxDC__DrawLineList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawPointList", (PyCFunction) _wrap_wxDC__DrawPointList, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC_GetBoundingBox", (PyCFunction) _wrap_wxDC_GetBoundingBox, METH_VARARGS | METH_KEYWORDS },
|
||||
|
Reference in New Issue
Block a user