more tweaks...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -116,11 +116,11 @@ extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
|
||||
//#ifdef SEPARATE
|
||||
// static wxString wxPyEmptyStr("");
|
||||
// static wxPoint wxPyDefaultPosition(-1, -1);
|
||||
// static wxSize wxPyDefaultSize(-1, -1);
|
||||
//#endif
|
||||
#if defined(SEPARATE) && defined(__WXMSW__)
|
||||
static wxString wxPyEmptyStr("");
|
||||
static wxPoint wxPyDefaultPosition(-1, -1);
|
||||
static wxSize wxPyDefaultSize(-1, -1);
|
||||
#endif
|
||||
static PyObject *_wrap_glArrayElementEXT(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
GLint _arg0;
|
||||
|
@@ -1208,13 +1208,16 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_GetData(_swigobj) (_swigobj->GetData())
|
||||
static PyObject * wxImage_GetData(wxImage *self) {
|
||||
unsigned char* data = self->GetData();
|
||||
int len = self->GetWidth() * self->GetHeight() * 3;
|
||||
return PyString_FromStringAndSize((char*)data, len);
|
||||
}
|
||||
static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
unsigned char * _result;
|
||||
PyObject * _result;
|
||||
wxImage * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxImage_GetData",&_argc0))
|
||||
@@ -1227,24 +1230,34 @@ static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args) {
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (unsigned char *)wxImage_GetData(_arg0);
|
||||
_result = (PyObject *)wxImage_GetData(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_unsigned_char_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
}{
|
||||
_resultobj = _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_SetData(_swigobj,_swigarg0) (_swigobj->SetData(_swigarg0))
|
||||
static void wxImage_SetData(wxImage *self,PyObject * data) {
|
||||
unsigned char* dataPtr;
|
||||
|
||||
if (! PyString_Check(data)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected string object");
|
||||
return /* NULL */ ;
|
||||
}
|
||||
dataPtr = (unsigned char*)PyString_AsString(data);
|
||||
self->SetData(dataPtr);
|
||||
}
|
||||
static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxImage * _arg0;
|
||||
unsigned char * _arg1;
|
||||
PyObject * _arg1;
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss:wxImage_SetData",&_argc0,&_argc1))
|
||||
if(!PyArg_ParseTuple(args,"sO:wxImage_SetData",&_argc0,&_obj1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) {
|
||||
@@ -1252,11 +1265,8 @@ static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_unsigned_char_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_SetData. Expected _unsigned_char_p.");
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
|
@@ -2959,6 +2959,160 @@ static PyObject *_wrap_wxGridEvent_m_cell_get(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_GetRow(_swigobj) (_swigobj->GetRow())
|
||||
static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_GetRow",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetRow. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxGridEvent_GetRow(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_GetCol(_swigobj) (_swigobj->GetCol())
|
||||
static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_GetCol",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCol. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxGridEvent_GetCol(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_GetPosition(_swigobj) (_swigobj->GetPosition())
|
||||
static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxPoint * _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_GetPosition",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetPosition. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxPoint (wxGridEvent_GetPosition(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_ControlDown(_swigobj) (_swigobj->ControlDown())
|
||||
static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_ControlDown",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ControlDown. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxGridEvent_ControlDown(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown())
|
||||
static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_ShiftDown",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ShiftDown. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxGridEvent_ShiftDown(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGridEvent_GetCell(_swigobj) (_swigobj->GetCell())
|
||||
static PyObject *_wrap_wxGridEvent_GetCell(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxGridCell * _result;
|
||||
wxGridEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGridEvent_GetCell",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCell. Expected _wxGridEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxGridCell *)wxGridEvent_GetCell(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxNotebookEventTowxNotifyEvent(void *ptr) {
|
||||
wxNotebookEvent *src;
|
||||
wxNotifyEvent *dest;
|
||||
@@ -4385,6 +4539,12 @@ static PyMethodDef windows2cMethods[] = {
|
||||
{ "wxNotebookEvent_SetOldSelection", _wrap_wxNotebookEvent_SetOldSelection, 1 },
|
||||
{ "wxNotebookEvent_GetOldSelection", _wrap_wxNotebookEvent_GetOldSelection, 1 },
|
||||
{ "wxNotebookEvent_GetSelection", _wrap_wxNotebookEvent_GetSelection, 1 },
|
||||
{ "wxGridEvent_GetCell", _wrap_wxGridEvent_GetCell, 1 },
|
||||
{ "wxGridEvent_ShiftDown", _wrap_wxGridEvent_ShiftDown, 1 },
|
||||
{ "wxGridEvent_ControlDown", _wrap_wxGridEvent_ControlDown, 1 },
|
||||
{ "wxGridEvent_GetPosition", _wrap_wxGridEvent_GetPosition, 1 },
|
||||
{ "wxGridEvent_GetCol", _wrap_wxGridEvent_GetCol, 1 },
|
||||
{ "wxGridEvent_GetRow", _wrap_wxGridEvent_GetRow, 1 },
|
||||
{ "wxGridEvent_m_cell_get", _wrap_wxGridEvent_m_cell_get, 1 },
|
||||
{ "wxGridEvent_m_cell_set", _wrap_wxGridEvent_m_cell_set, 1 },
|
||||
{ "wxGridEvent_m_shift_get", _wrap_wxGridEvent_m_shift_get, 1 },
|
||||
|
@@ -322,6 +322,27 @@ class wxGridEventPtr(wxEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetRow(self):
|
||||
val = windows2c.wxGridEvent_GetRow(self.this)
|
||||
return val
|
||||
def GetCol(self):
|
||||
val = windows2c.wxGridEvent_GetCol(self.this)
|
||||
return val
|
||||
def GetPosition(self):
|
||||
val = windows2c.wxGridEvent_GetPosition(self.this)
|
||||
val = wxPointPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def ControlDown(self):
|
||||
val = windows2c.wxGridEvent_ControlDown(self.this)
|
||||
return val
|
||||
def ShiftDown(self):
|
||||
val = windows2c.wxGridEvent_ShiftDown(self.this)
|
||||
return val
|
||||
def GetCell(self):
|
||||
val = windows2c.wxGridEvent_GetCell(self.this)
|
||||
val = wxGridCellPtr(val)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "m_row" :
|
||||
windows2c.wxGridEvent_m_row_set(self.this,value)
|
||||
|
@@ -1359,7 +1359,7 @@ class wxAcceleratorTable(wxAcceleratorTablePtr):
|
||||
#----------------------------------------------------------------------
|
||||
# This helper function will take a wxPython object and convert it to
|
||||
# another wxPython object type. This will not be able to create objects
|
||||
# user that are derived from wxPython classes, only those that are
|
||||
# that are derived from wxPython classes by the user, only those that are
|
||||
# actually part of wxPython and directly corespond to C++ objects.
|
||||
#
|
||||
# This is useful in situations where some method returns a generic
|
||||
@@ -1446,8 +1446,8 @@ class wxApp(wxPyApp):
|
||||
if filename:
|
||||
sys.stdout = sys.stderr = open(filename, 'a')
|
||||
else:
|
||||
#raise self.error, 'wxPyStdOutWindow not yet implemented.'
|
||||
self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
|
||||
raise self.error, 'wxPyStdOutWindow not yet implemented.'
|
||||
#self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
|
||||
|
||||
def RestoreStdio(self):
|
||||
sys.stdout, sys.stderr = self.saveStdio
|
||||
|
Reference in New Issue
Block a user