static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
- if (!target) {
+ if (!target) {
target = o;
- } else if (target == Py_None) {
+ } else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
- } else {
+ } else {
if (!PyList_Check(target)) {
o2 = target;
target = PyList_New(0);
PyObject* o2;
PyObject* o3;
- if (!target) {
+ if (!target) {
target = o;
- } else if (target == Py_None) {
+ } else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
- } else {
+ } else {
if (!PyTuple_Check(target)) {
o2 = target;
target = PyTuple_New(1);
PyTuple_SetItem(target, 0, o2);
}
- o3 = PyTuple_New(1);
- PyTuple_SetItem(o3, 0, o);
+ o3 = PyTuple_New(1);
+ PyTuple_SetItem(o3, 0, o);
o2 = target;
- target = PySequence_Concat(o2, o3);
- Py_DECREF(o2);
+ target = PySequence_Concat(o2, o3);
+ Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
-static char* wxStringErrorMsg = "string type is required for parameter";
+#if PYTHON_API_VERSION >= 1009
+ static char* wxStringErrorMsg = "String or Unicode type required";
+#else
+ static char* wxStringErrorMsg = "string type is required for parameter";
+#endif
+
+ static wxString wxPyEmptyStr("");
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
wxRegion reg1(*r1);
bool doSave = wxPyRestoreThread();
wxRect* newRect = new wxRect(dest);
obj = wxPyConstructObject((void*)newRect, "wxRect");
- PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1));
+ PyObject* one = PyInt_FromLong(1);
+ PyObject_SetAttrString(obj, "thisown", one);
+ Py_DECREF(one);
wxPySaveThread(doSave);
return obj;
}
return _resultobj;
}
-static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
+ long _result;
char *_kwnames[] = { NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxBell",_kwnames))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetCurrentId",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
- wxBell();
+ _result = (long )wxGetCurrentId();
wxPy_END_ALLOW_THREADS;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
+} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
-static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int * _arg0;
- int temp;
- int * _arg1;
- int temp0;
char *_kwnames[] = { NULL };
self = self;
-{
- _arg0 = &temp;
-}
-{
- _arg1 = &temp0;
-}
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySize",_kwnames))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxBell",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
- wxDisplaySize(_arg0,_arg1);
+ wxBell();
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
-{
- PyObject *o;
- o = PyInt_FromLong((long) (*_arg0));
- _resultobj = t_output_helper(_resultobj, o);
-}
-{
- PyObject *o;
- o = PyInt_FromLong((long) (*_arg1));
- _resultobj = t_output_helper(_resultobj, o);
-}
return _resultobj;
}
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
return _resultobj;
}
+static PyObject *_wrap_wxYieldIfNeeded(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ char *_kwnames[] = { NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYieldIfNeeded",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxYieldIfNeeded();
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _arg0;
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
{ "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS },
{ "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS },
{ "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS },
+ { "wxYieldIfNeeded", (PyCFunction) _wrap_wxYieldIfNeeded, 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 },
{ "wxGetFreeMemory", (PyCFunction) _wrap_wxGetFreeMemory, METH_VARARGS | METH_KEYWORDS },
{ "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS },
{ "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS },
- { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS },
{ "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS },
+ { "wxGetCurrentId", (PyCFunction) _wrap_wxGetCurrentId, METH_VARARGS | METH_KEYWORDS },
{ "RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS },
{ "NewId", (PyCFunction) _wrap_NewId, METH_VARARGS | METH_KEYWORDS },
{ "wxRegisterId", (PyCFunction) _wrap_wxRegisterId, METH_VARARGS | METH_KEYWORDS },