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";
|
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||||
|
|
||||||
//#ifdef SEPARATE
|
#if defined(SEPARATE) && defined(__WXMSW__)
|
||||||
// static wxString wxPyEmptyStr("");
|
static wxString wxPyEmptyStr("");
|
||||||
// static wxPoint wxPyDefaultPosition(-1, -1);
|
static wxPoint wxPyDefaultPosition(-1, -1);
|
||||||
// static wxSize wxPyDefaultSize(-1, -1);
|
static wxSize wxPyDefaultSize(-1, -1);
|
||||||
//#endif
|
#endif
|
||||||
static PyObject *_wrap_glArrayElementEXT(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_glArrayElementEXT(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
GLint _arg0;
|
GLint _arg0;
|
||||||
|
@@ -1208,13 +1208,16 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args) {
|
|||||||
return _resultobj;
|
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) {
|
static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
unsigned char * _result;
|
PyObject * _result;
|
||||||
wxImage * _arg0;
|
wxImage * _arg0;
|
||||||
char * _argc0 = 0;
|
char * _argc0 = 0;
|
||||||
char _ptemp[128];
|
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTuple(args,"s:wxImage_GetData",&_argc0))
|
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;
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
_result = (unsigned char *)wxImage_GetData(_arg0);
|
_result = (PyObject *)wxImage_GetData(_arg0);
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
wxPy_END_ALLOW_THREADS;
|
||||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_unsigned_char_p");
|
}{
|
||||||
_resultobj = Py_BuildValue("s",_ptemp);
|
_resultobj = _result;
|
||||||
|
}
|
||||||
return _resultobj;
|
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) {
|
static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
wxImage * _arg0;
|
wxImage * _arg0;
|
||||||
unsigned char * _arg1;
|
PyObject * _arg1;
|
||||||
char * _argc0 = 0;
|
char * _argc0 = 0;
|
||||||
char * _argc1 = 0;
|
PyObject * _obj1 = 0;
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTuple(args,"ss:wxImage_SetData",&_argc0,&_argc1))
|
if(!PyArg_ParseTuple(args,"sO:wxImage_SetData",&_argc0,&_obj1))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_argc0) {
|
if (_argc0) {
|
||||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) {
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) {
|
||||||
@@ -1252,12 +1265,9 @@ static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argc1) {
|
{
|
||||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_unsigned_char_p")) {
|
_arg1 = _obj1;
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_SetData. Expected _unsigned_char_p.");
|
}
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
wxImage_SetData(_arg0,_arg1);
|
wxImage_SetData(_arg0,_arg1);
|
||||||
|
@@ -2959,6 +2959,160 @@ static PyObject *_wrap_wxGridEvent_m_cell_get(PyObject *self, PyObject *args) {
|
|||||||
return _resultobj;
|
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) {
|
static void *SwigwxNotebookEventTowxNotifyEvent(void *ptr) {
|
||||||
wxNotebookEvent *src;
|
wxNotebookEvent *src;
|
||||||
wxNotifyEvent *dest;
|
wxNotifyEvent *dest;
|
||||||
@@ -4385,6 +4539,12 @@ static PyMethodDef windows2cMethods[] = {
|
|||||||
{ "wxNotebookEvent_SetOldSelection", _wrap_wxNotebookEvent_SetOldSelection, 1 },
|
{ "wxNotebookEvent_SetOldSelection", _wrap_wxNotebookEvent_SetOldSelection, 1 },
|
||||||
{ "wxNotebookEvent_GetOldSelection", _wrap_wxNotebookEvent_GetOldSelection, 1 },
|
{ "wxNotebookEvent_GetOldSelection", _wrap_wxNotebookEvent_GetOldSelection, 1 },
|
||||||
{ "wxNotebookEvent_GetSelection", _wrap_wxNotebookEvent_GetSelection, 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_get", _wrap_wxGridEvent_m_cell_get, 1 },
|
||||||
{ "wxGridEvent_m_cell_set", _wrap_wxGridEvent_m_cell_set, 1 },
|
{ "wxGridEvent_m_cell_set", _wrap_wxGridEvent_m_cell_set, 1 },
|
||||||
{ "wxGridEvent_m_shift_get", _wrap_wxGridEvent_m_shift_get, 1 },
|
{ "wxGridEvent_m_shift_get", _wrap_wxGridEvent_m_shift_get, 1 },
|
||||||
|
@@ -322,6 +322,27 @@ class wxGridEventPtr(wxEventPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
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):
|
def __setattr__(self,name,value):
|
||||||
if name == "m_row" :
|
if name == "m_row" :
|
||||||
windows2c.wxGridEvent_m_row_set(self.this,value)
|
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
|
# This helper function will take a wxPython object and convert it to
|
||||||
# another wxPython object type. This will not be able to create objects
|
# 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.
|
# actually part of wxPython and directly corespond to C++ objects.
|
||||||
#
|
#
|
||||||
# This is useful in situations where some method returns a generic
|
# This is useful in situations where some method returns a generic
|
||||||
@@ -1446,8 +1446,8 @@ class wxApp(wxPyApp):
|
|||||||
if filename:
|
if filename:
|
||||||
sys.stdout = sys.stderr = open(filename, 'a')
|
sys.stdout = sys.stderr = open(filename, 'a')
|
||||||
else:
|
else:
|
||||||
#raise self.error, 'wxPyStdOutWindow not yet implemented.'
|
raise self.error, 'wxPyStdOutWindow not yet implemented.'
|
||||||
self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
|
#self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
|
||||||
|
|
||||||
def RestoreStdio(self):
|
def RestoreStdio(self):
|
||||||
sys.stdout, sys.stderr = self.saveStdio
|
sys.stdout, sys.stderr = self.saveStdio
|
||||||
|
Reference in New Issue
Block a user