#ifdef __cplusplus
extern "C" {
#endif
-static int _wrap_wxTheXmlResource_set(PyObject *val) {
-
- PyErr_SetString(PyExc_TypeError,"Variable wxTheXmlResource is read-only.");
- return 1;
-}
-
-static PyObject *_wrap_wxTheXmlResource_get() {
- PyObject * pyobj;
- char ptemp[128];
-
- SWIG_MakePtr(ptemp, (char *) wxTheXmlResource,"_wxXmlResource_p");
- pyobj = PyString_FromString(ptemp);
- return pyobj;
-}
-
static void *SwigwxXmlResourceTowxObject(void *ptr) {
wxXmlResource *src;
wxObject *dest;
static PyObject *_wrap_new_wxXmlResourceEmpty(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxXmlResource * _result;
- bool _arg0 = (bool ) TRUE;
- int tempbool0 = (int) TRUE;
- char *_kwnames[] = { "use_locale", NULL };
+ int _arg0 = (int ) (wxXRC_USE_LOCALE);
+ char *_kwnames[] = { "flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxXmlResourceEmpty",_kwnames,&tempbool0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxXmlResourceEmpty",_kwnames,&_arg0))
return NULL;
- _arg0 = (bool ) tempbool0;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxXmlResource *)new_wxXmlResourceEmpty(_arg0);
return _resultobj;
}
-static wxXmlResource *new_wxXmlResource(const wxString *filemask,bool use_locale) {
- wxXmlResource* res = new wxXmlResource(*filemask, use_locale);
+static wxXmlResource *new_wxXmlResource(const wxString *filemask,int flags) {
+ wxXmlResource* res = new wxXmlResource(*filemask, flags);
res->InitAllHandlers();
return res;
}
PyObject * _resultobj;
wxXmlResource * _result;
wxString * _arg0;
- bool _arg1 = (bool ) TRUE;
+ int _arg1 = (int ) (wxXRC_USE_LOCALE);
PyObject * _obj0 = 0;
- int tempbool1 = (int) TRUE;
- char *_kwnames[] = { "filemask","use_locale", NULL };
+ char *_kwnames[] = { "filemask","flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&tempbool1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&_arg1))
return NULL;
{
#if PYTHON_API_VERSION >= 1009
_arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
#endif
}
- _arg1 = (bool ) tempbool1;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxXmlResource *)new_wxXmlResource(_arg0,_arg1);
return _resultobj;
}
-static PyObject *_wrap_wxXmlResource_GetXMLID(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
char * _arg0;
char *_kwnames[] = { "str_id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXMLID",_kwnames,&_arg0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXRCID",_kwnames,&_arg0))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxXmlResource::GetXMLID(_arg0);
+ _result = (int )wxXmlResource::GetXRCID(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
+static PyObject *_wrap_wxXmlResource_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxXmlResource * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxXmlResource_Get",_kwnames))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (wxXmlResource *)wxXmlResource::Get();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxXmlResource_Set(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxXmlResource * _result;
+ wxXmlResource * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "res", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_Set",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_Set. Expected _wxXmlResource_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (wxXmlResource *)wxXmlResource::Set(_arg0);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
static PyMethodDef xrccMethods[] = {
+ { "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_CompareVersion", (PyCFunction) _wrap_wxXmlResource_CompareVersion, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_GetVersion", (PyCFunction) _wrap_wxXmlResource_GetVersion, METH_VARARGS | METH_KEYWORDS },
- { "wxXmlResource_GetXMLID", (PyCFunction) _wrap_wxXmlResource_GetXMLID, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_GetXRCID", (PyCFunction) _wrap_wxXmlResource_GetXRCID, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_AttachUnknownControl", (PyCFunction) _wrap_wxXmlResource_AttachUnknownControl, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadIcon", (PyCFunction) _wrap_wxXmlResource_LoadIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadBitmap", (PyCFunction) _wrap_wxXmlResource_LoadBitmap, METH_VARARGS | METH_KEYWORDS },
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("xrcc", xrccMethods);
d = PyModule_GetDict(m);
- PyDict_SetItemString(d,"cvar", SWIG_globals);
- SWIG_addvarlink(SWIG_globals,"wxTheXmlResource",_wrap_wxTheXmlResource_get, _wrap_wxTheXmlResource_set);
+ PyDict_SetItemString(d,"wxXRC_USE_LOCALE", PyInt_FromLong((long) wxXRC_USE_LOCALE));
+ PyDict_SetItemString(d,"wxXRC_NO_SUBCLASSING", PyInt_FromLong((long) wxXRC_NO_SUBCLASSING));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
- wxXmlInitXmlModule();
wxXmlInitResourceModule();
- wxTheXmlResource->InitAllHandlers();
+ wxXmlResource::Get()->InitAllHandlers();
{
int i;