generated code updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-06-22 16:53:59 +00:00
parent b59893f3ef
commit 9d6da64a8b
11 changed files with 996 additions and 17 deletions

View File

@@ -120,6 +120,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
return cArray;
}
wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings) {
char** cArray = NULL;
wxBitmap* bmp;
@@ -138,18 +139,21 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
}
#ifdef __WXMSW__
wxBitmap* wxBitmapFromData(PyObject* data, long type,
int width, int height, int depth = 1) {
if (! PyString_Check(data)) {
PyErr_SetString(PyExc_TypeError, "Expected string object");
return NULL;
}
return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) {
return new wxBitmap(bits, width, height, depth);
}
#endif
// #ifdef __WXMSW__
// wxBitmap* wxBitmapFromData(PyObject* data, long type,
// int width, int height, int depth = 1) {
// if (! PyString_Check(data)) {
// PyErr_SetString(PyExc_TypeError, "Expected string object");
// return NULL;
// }
// return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
// }
// #endif
wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
return new wxMask(bitmap, colour);
@@ -335,6 +339,35 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
static PyObject *_wrap_wxBitmapFromBits(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxBitmap * _result;
char * _arg0;
int _arg1;
int _arg2;
int _arg3 = (int ) 1;
char *_kwnames[] = { "bits","width","height","depth", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"sii|i:wxBitmapFromBits",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMask * _result;
@@ -10124,6 +10157,7 @@ static PyMethodDef gdicMethods[] = {
{ "wxIconFromXPMData", (PyCFunction) _wrap_wxIconFromXPMData, METH_VARARGS | METH_KEYWORDS },
{ "wxEmptyIcon", (PyCFunction) _wrap_wxEmptyIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxMaskColour", (PyCFunction) _wrap_wxMaskColour, METH_VARARGS | METH_KEYWORDS },
{ "wxBitmapFromBits", (PyCFunction) _wrap_wxBitmapFromBits, METH_VARARGS | METH_KEYWORDS },
{ "wxBitmapFromIcon", (PyCFunction) _wrap_wxBitmapFromIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxBitmapFromXPMData", (PyCFunction) _wrap_wxBitmapFromXPMData, METH_VARARGS | METH_KEYWORDS },
{ "wxEmptyBitmap", (PyCFunction) _wrap_wxEmptyBitmap, METH_VARARGS | METH_KEYWORDS },