return target;
}
+ // Put some wx default wxChar* values into wxStrings.
+ static const wxString wxPyEmptyString(wxT(""));
+
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
wxRegion reg1(*r1);
wxRegion reg2(*r2);
}
wxString wxGetResource(const wxString& section, const wxString& entry,
- const wxString& file = wxEmptyString) {
+ const wxString& file = wxPyEmptyString) {
wxChar * retval;
wxGetResource(section, entry, &retval, file);
return retval;
static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
- wxString * _arg0 = (wxString *) &wxEmptyString;
+ wxString * _arg0 = (wxString *) &wxPyEmptyString;
PyObject * _obj0 = 0;
char *_kwnames[] = { "command", NULL };
return _resultobj;
}
+static PyObject *_wrap_wxShutdown(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxShutdownFlags _arg0;
+ char *_kwnames[] = { "wFlags", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxShutdown",_kwnames,&_arg0))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (bool )wxShutdown(_arg0);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _arg0;
wxString * _result;
wxString * _arg0;
wxString * _arg1;
- wxString * _arg2 = (wxString *) &wxEmptyString;
+ wxString * _arg2 = (wxString *) &wxPyEmptyString;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
- char * _arg0 = (char *) "";
+ wxString * _arg0 = (wxString *) &wxPyEmptyString;
+ PyObject * _obj0 = 0;
char *_kwnames[] = { "user", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxGetUserHome",_kwnames,&_obj0))
+ return NULL;
+ if (_obj0)
+{
+ _arg0 = wxString_in_helper(_obj0);
+ if (_arg0 == NULL)
return NULL;
+}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxString (wxGetUserHome(_arg0));
+ _result = new wxString (wxGetUserHome(*_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
+{
+ if (_obj0)
+ delete _arg0;
+}
{
delete _result;
}
return _resultobj;
}
+static PyObject *_wrap_wxGetProcessId(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ unsigned long _result;
+ char *_kwnames[] = { NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetProcessId",_kwnames))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (unsigned long )wxGetProcessId();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxAcceleratorEntry * _result;
}
static PyObject * wxSize_asTuple(wxSize *self) {
+ wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
+ wxPyEndBlockThreads();
return tup;
}
static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
}
static PyObject * wxRealPoint_asTuple(wxRealPoint *self) {
+ wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y));
+ wxPyEndBlockThreads();
return tup;
}
static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
}
static PyObject * wxPoint_asTuple(wxPoint *self) {
+ wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
+ wxPyEndBlockThreads();
return tup;
}
static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
return _resultobj;
}
+#define wxRect_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0))
+static PyObject *_wrap_wxRect_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxRect * _arg0;
+ wxPoint * _arg1;
+ wxRect temp;
+ PyObject * _obj0 = 0;
+ wxPoint temp0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","p", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetPosition",_kwnames,&_obj0,&_obj1))
+ return NULL;
+{
+ _arg0 = &temp;
+ if (! wxRect_helper(_obj0, &_arg0))
+ return NULL;
+}
+{
+ _arg1 = &temp0;
+ if (! wxPoint_helper(_obj1, &_arg1))
+ return NULL;
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxRect_SetPosition(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxRect_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0))
+static PyObject *_wrap_wxRect_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxRect * _arg0;
+ wxSize * _arg1;
+ wxRect temp;
+ PyObject * _obj0 = 0;
+ wxSize temp0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","s", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetSize",_kwnames,&_obj0,&_obj1))
+ return NULL;
+{
+ _arg0 = &temp;
+ if (! wxRect_helper(_obj0, &_arg0))
+ return NULL;
+}
+{
+ _arg1 = &temp0;
+ if (! wxSize_helper(_obj1, &_arg1))
+ return NULL;
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxRect_SetSize(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxRect_GetLeft(_swigobj) (_swigobj->GetLeft())
static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
}
static PyObject * wxRect_asTuple(wxRect *self) {
+ wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(4);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
+ wxPyEndBlockThreads();
return tup;
}
static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
{ "wxRect_GetBottom", (PyCFunction) _wrap_wxRect_GetBottom, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetTop", (PyCFunction) _wrap_wxRect_GetTop, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetLeft", (PyCFunction) _wrap_wxRect_GetLeft, METH_VARARGS | METH_KEYWORDS },
+ { "wxRect_SetSize", (PyCFunction) _wrap_wxRect_SetSize, METH_VARARGS | METH_KEYWORDS },
+ { "wxRect_SetPosition", (PyCFunction) _wrap_wxRect_SetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetSize", (PyCFunction) _wrap_wxRect_GetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetPosition", (PyCFunction) _wrap_wxRect_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_SetHeight", (PyCFunction) _wrap_wxRect_SetHeight, METH_VARARGS | METH_KEYWORDS },
{ "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS },
{ "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS },
{ "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS },
+ { "wxGetProcessId", (PyCFunction) _wrap_wxGetProcessId, METH_VARARGS | METH_KEYWORDS },
{ "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS },
{ "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS },
{ "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS },
{ "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS },
{ "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS },
{ "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS },
+ { "wxShutdown", (PyCFunction) _wrap_wxShutdown, METH_VARARGS | METH_KEYWORDS },
{ "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS },
{ "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS },
{ "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS },
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("miscc", misccMethods);
d = PyModule_GetDict(m);
+ PyDict_SetItemString(d,"wxSHUTDOWN_POWEROFF", PyInt_FromLong((long) wxSHUTDOWN_POWEROFF));
+ PyDict_SetItemString(d,"wxSHUTDOWN_REBOOT", PyInt_FromLong((long) wxSHUTDOWN_REBOOT));
PyDict_SetItemString(d,"wxLeft", PyInt_FromLong((long) wxLeft));
PyDict_SetItemString(d,"wxTop", PyInt_FromLong((long) wxTop));
PyDict_SetItemString(d,"wxRight", PyInt_FromLong((long) wxRight));