SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
- return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
+ if (PyNumber_Check(obj))
+ return PyInt_AsLong(obj);
+ else {
+ PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
+ obj->ob_type->tp_name);
+ PyErr_SetObject(PyExc_TypeError, errmsg);
+ Py_DECREF(errmsg);
+ return 0;
+ }
}
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
- long i = PyInt_AsLong(obj);
+ long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
- PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
+ PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
DEC_PYCALLBACK_BOOL_(ShouldInheritColours);
+ DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground);
PYPRIVATE;
};
IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, ShouldInheritColours);
+IMP_PYCALLBACK__COLOUR(wxPyControl, wxControl, ApplyParentThemeBackground);
}
+static PyObject *_wrap_new_PrePyControl(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyControl *result;
+ char *kwnames[] = {
+ NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_PrePyControl",kwnames)) goto fail;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (wxPyControl *)new wxPyControl();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxPyControl, 1);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject *_wrap_PyControl__setCallbackInfo(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyControl *arg1 = (wxPyControl *) 0 ;
}
+static PyObject *_wrap_PyControl_base_ShouldInheritColours(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyControl *arg1 = (wxPyControl *) 0 ;
+ bool result;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "self", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PyControl_base_ShouldInheritColours",kwnames,&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyControl,
+ SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (bool)(arg1)->base_ShouldInheritColours();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ {
+ resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+ }
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
+static PyObject *_wrap_PyControl_base_ApplyParentThemeBackground(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyControl *arg1 = (wxPyControl *) 0 ;
+ wxColour *arg2 = 0 ;
+ wxColour temp2 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char *kwnames[] = {
+ (char *) "self",(char *) "c", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyControl_base_ApplyParentThemeBackground",kwnames,&obj0,&obj1)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyControl,
+ SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ {
+ arg2 = &temp2;
+ if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail;
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ (arg1)->base_ApplyParentThemeBackground((wxColour const &)*arg2);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ Py_INCREF(Py_None); resultobj = Py_None;
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject * PyControl_swigregister(PyObject *, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"DirFilterListCtrl_FillFilterList", (PyCFunction) _wrap_DirFilterListCtrl_FillFilterList, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"DirFilterListCtrl_swigregister", DirFilterListCtrl_swigregister, METH_VARARGS, NULL },
{ (char *)"new_PyControl", (PyCFunction) _wrap_new_PyControl, METH_VARARGS | METH_KEYWORDS, NULL },
+ { (char *)"new_PrePyControl", (PyCFunction) _wrap_new_PrePyControl, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl__setCallbackInfo", (PyCFunction) _wrap_PyControl__setCallbackInfo, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_base_DoMoveWindow", (PyCFunction) _wrap_PyControl_base_DoMoveWindow, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_base_DoSetSize", (PyCFunction) _wrap_PyControl_base_DoSetSize, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_base_GetMaxSize", (PyCFunction) _wrap_PyControl_base_GetMaxSize, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_base_AddChild", (PyCFunction) _wrap_PyControl_base_AddChild, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_base_RemoveChild", (PyCFunction) _wrap_PyControl_base_RemoveChild, METH_VARARGS | METH_KEYWORDS, NULL },
+ { (char *)"PyControl_base_ShouldInheritColours", (PyCFunction) _wrap_PyControl_base_ShouldInheritColours, METH_VARARGS | METH_KEYWORDS, NULL },
+ { (char *)"PyControl_base_ApplyParentThemeBackground", (PyCFunction) _wrap_PyControl_base_ApplyParentThemeBackground, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"PyControl_swigregister", PyControl_swigregister, METH_VARARGS, NULL },
{ (char *)"new_HelpEvent", (PyCFunction) _wrap_new_HelpEvent, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"HelpEvent_GetPosition", (PyCFunction) _wrap_HelpEvent_GetPosition, METH_VARARGS | METH_KEYWORDS, NULL },