A more dynamic wxWizard sample, and a fix for wxGrid wrappers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-08-22 00:00:04 +00:00
parent a4353f07c6
commit 85260f24de
7 changed files with 226 additions and 13 deletions

View File

@@ -425,7 +425,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
void CBNAME(int a, const wxString& c) { \
bool found; \
wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* s = wx2PyString(c); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)",a,s)); \
Py_DECREF(s); \

View File

@@ -6567,6 +6567,90 @@ static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyO
return _resultobj;
}
#define wxProcess_IsInputOpened(_swigobj) (_swigobj->IsInputOpened())
static PyObject *_wrap_wxProcess_IsInputOpened(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPyProcess * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsInputOpened",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsInputOpened. Expected _wxPyProcess_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxProcess_IsInputOpened(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxProcess_IsInputAvailable(_swigobj) (_swigobj->IsInputAvailable())
static PyObject *_wrap_wxProcess_IsInputAvailable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPyProcess * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsInputAvailable",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsInputAvailable. Expected _wxPyProcess_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxProcess_IsInputAvailable(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxProcess_IsErrorAvailable(_swigobj) (_swigobj->IsErrorAvailable())
static PyObject *_wrap_wxProcess_IsErrorAvailable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPyProcess * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsErrorAvailable",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsErrorAvailable. Expected _wxPyProcess_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxProcess_IsErrorAvailable(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxJoystickTowxObject(void *ptr) {
wxJoystick *src;
wxObject *dest;
@@ -10483,6 +10567,9 @@ static PyMethodDef misc2cMethods[] = {
{ "wxJoystick_GetPosition", (PyCFunction) _wrap_wxJoystick_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxJoystick", (PyCFunction) _wrap_delete_wxJoystick, METH_VARARGS | METH_KEYWORDS },
{ "new_wxJoystick", (PyCFunction) _wrap_new_wxJoystick, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_IsErrorAvailable", (PyCFunction) _wrap_wxProcess_IsErrorAvailable, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_IsInputAvailable", (PyCFunction) _wrap_wxProcess_IsInputAvailable, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_IsInputOpened", (PyCFunction) _wrap_wxProcess_IsInputOpened, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_CloseOutput", (PyCFunction) _wrap_wxProcess_CloseOutput, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_GetOutputStream", (PyCFunction) _wrap_wxProcess_GetOutputStream, METH_VARARGS | METH_KEYWORDS },
{ "wxProcess_GetErrorStream", (PyCFunction) _wrap_wxProcess_GetErrorStream, METH_VARARGS | METH_KEYWORDS },

View File

@@ -604,6 +604,15 @@ class wxProcessPtr(wxEvtHandlerPtr):
def CloseOutput(self, *_args, **_kwargs):
val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs)
return val
def IsInputOpened(self, *_args, **_kwargs):
val = apply(misc2c.wxProcess_IsInputOpened,(self,) + _args, _kwargs)
return val
def IsInputAvailable(self, *_args, **_kwargs):
val = apply(misc2c.wxProcess_IsInputAvailable,(self,) + _args, _kwargs)
return val
def IsErrorAvailable(self, *_args, **_kwargs):
val = apply(misc2c.wxProcess_IsErrorAvailable,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxProcess instance at %s>" % (self.this,)
class wxProcess(wxProcessPtr):

View File

@@ -2264,6 +2264,9 @@ SWIGEXPORT(void) initwizardc() {
PyDict_SetItemString(d,"wxEVT_WIZARD_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_WIZARD_PAGE_CHANGING));
PyDict_SetItemString(d,"wxEVT_WIZARD_CANCEL", PyInt_FromLong((long) wxEVT_WIZARD_CANCEL));
PyDict_SetItemString(d,"wxEVT_WIZARD_HELP", PyInt_FromLong((long) wxEVT_WIZARD_HELP));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)