Updates related to wxID_ANY and etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-03 22:54:13 +00:00
parent c731eb4710
commit 3eb221f6dd
9 changed files with 82 additions and 9 deletions

View File

@@ -136,8 +136,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
}
wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) {
return new wxBitmap(bits, width, height, depth);
wxBitmap* wxBitmapFromBits(PyObject* bits, int width, int height, int depth = 1 ) {
char* buf;
int length;
PyString_AsStringAndSize(bits, &buf, &length);
return new wxBitmap(buf, width, height, depth);
}
@@ -370,16 +373,20 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject
static PyObject *_wrap_wxBitmapFromBits(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxBitmap * _result;
char * _arg0;
PyObject * _arg0;
int _arg1;
int _arg2;
int _arg3 = (int ) 1;
PyObject * _obj0 = 0;
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))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxBitmapFromBits",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3))
return NULL;
{
_arg0 = _obj0;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3);