]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/xrc/xrc.cpp
undef LoadMenu() (patch #521743)
[wxWidgets.git] / wxPython / contrib / xrc / xrc.cpp
1 /*
2 * FILE : contrib/xrc/xrc.cpp
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
7 *
8 * Portions Copyright (c) 1995-1998
9 * The University of Utah and The Regents of the University of California.
10 * Permission is granted to distribute this file in any manner provided
11 * this notice remains intact.
12 *
13 * Do not make changes to this file--changes will be lost!
14 *
15 */
16
17
18 #define SWIGCODE
19 /* Implementation : PYTHON */
20
21 #define SWIGPYTHON
22 #include <string.h>
23 #include <stdlib.h>
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
28 # else
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
31 # else
32 # define SWIGEXPORT(a) a
33 # endif
34 # endif
35 #else
36 # define SWIGEXPORT(a) a
37 #endif
38
39 #include "Python.h"
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 extern void SWIG_MakePtr(char *, void *, char *);
46 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47 extern char *SWIG_GetPtr(char *, void **, char *);
48 extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
49 extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50 extern PyObject *SWIG_newvarlink(void);
51 #ifdef __cplusplus
52 }
53 #endif
54 #define SWIG_init initxrcc
55
56 #define SWIG_name "xrcc"
57
58 #include "export.h"
59 #include "wx/xrc/xmlres.h"
60
61
62 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
63 PyObject* o2;
64 PyObject* o3;
65
66 if (!target) {
67 target = o;
68 } else if (target == Py_None) {
69 Py_DECREF(Py_None);
70 target = o;
71 } else {
72 if (!PyTuple_Check(target)) {
73 o2 = target;
74 target = PyTuple_New(1);
75 PyTuple_SetItem(target, 0, o2);
76 }
77 o3 = PyTuple_New(1);
78 PyTuple_SetItem(o3, 0, o);
79
80 o2 = target;
81 target = PySequence_Concat(o2, o3);
82 Py_DECREF(o2);
83 Py_DECREF(o3);
84 }
85 return target;
86 }
87
88 #if PYTHON_API_VERSION >= 1009
89 static char* wxStringErrorMsg = "String or Unicode type required";
90 #else
91 static char* wxStringErrorMsg = "String type required";
92 #endif
93 #ifdef __cplusplus
94 extern "C" {
95 #endif
96 static void *SwigwxXmlResourceTowxObject(void *ptr) {
97 wxXmlResource *src;
98 wxObject *dest;
99 src = (wxXmlResource *) ptr;
100 dest = (wxObject *) src;
101 return (void *) dest;
102 }
103
104 #define new_wxXmlResourceEmpty(_swigarg0) (new wxXmlResource(_swigarg0))
105 static PyObject *_wrap_new_wxXmlResourceEmpty(PyObject *self, PyObject *args, PyObject *kwargs) {
106 PyObject * _resultobj;
107 wxXmlResource * _result;
108 int _arg0 = (int ) (wxXRC_USE_LOCALE);
109 char *_kwnames[] = { "flags", NULL };
110 char _ptemp[128];
111
112 self = self;
113 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxXmlResourceEmpty",_kwnames,&_arg0))
114 return NULL;
115 {
116 PyThreadState* __tstate = wxPyBeginAllowThreads();
117 _result = (wxXmlResource *)new_wxXmlResourceEmpty(_arg0);
118
119 wxPyEndAllowThreads(__tstate);
120 if (PyErr_Occurred()) return NULL;
121 } if (_result) {
122 SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
123 _resultobj = Py_BuildValue("s",_ptemp);
124 } else {
125 Py_INCREF(Py_None);
126 _resultobj = Py_None;
127 }
128 return _resultobj;
129 }
130
131 static wxXmlResource *new_wxXmlResource(const wxString *filemask,int flags) {
132 wxXmlResource* res = new wxXmlResource(*filemask, flags);
133 res->InitAllHandlers();
134 return res;
135 }
136
137 static PyObject *_wrap_new_wxXmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
138 PyObject * _resultobj;
139 wxXmlResource * _result;
140 wxString * _arg0;
141 int _arg1 = (int ) (wxXRC_USE_LOCALE);
142 PyObject * _obj0 = 0;
143 char *_kwnames[] = { "filemask","flags", NULL };
144 char _ptemp[128];
145
146 self = self;
147 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&_arg1))
148 return NULL;
149 {
150 #if PYTHON_API_VERSION >= 1009
151 char* tmpPtr; int tmpSize;
152 if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
153 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
154 return NULL;
155 }
156 if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
157 return NULL;
158 _arg0 = new wxString(tmpPtr, tmpSize);
159 #else
160 if (!PyString_Check(_obj0)) {
161 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
162 return NULL;
163 }
164 _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
165 #endif
166 }
167 {
168 PyThreadState* __tstate = wxPyBeginAllowThreads();
169 _result = (wxXmlResource *)new_wxXmlResource(_arg0,_arg1);
170
171 wxPyEndAllowThreads(__tstate);
172 if (PyErr_Occurred()) return NULL;
173 } if (_result) {
174 SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
175 _resultobj = Py_BuildValue("s",_ptemp);
176 } else {
177 Py_INCREF(Py_None);
178 _resultobj = Py_None;
179 }
180 {
181 if (_obj0)
182 delete _arg0;
183 }
184 return _resultobj;
185 }
186
187 #define delete_wxXmlResource(_swigobj) (delete _swigobj)
188 static PyObject *_wrap_delete_wxXmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
189 PyObject * _resultobj;
190 wxXmlResource * _arg0;
191 PyObject * _argo0 = 0;
192 char *_kwnames[] = { "self", NULL };
193
194 self = self;
195 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxXmlResource",_kwnames,&_argo0))
196 return NULL;
197 if (_argo0) {
198 if (_argo0 == Py_None) { _arg0 = NULL; }
199 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
200 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxXmlResource. Expected _wxXmlResource_p.");
201 return NULL;
202 }
203 }
204 {
205 PyThreadState* __tstate = wxPyBeginAllowThreads();
206 delete_wxXmlResource(_arg0);
207
208 wxPyEndAllowThreads(__tstate);
209 if (PyErr_Occurred()) return NULL;
210 } Py_INCREF(Py_None);
211 _resultobj = Py_None;
212 return _resultobj;
213 }
214
215 #define wxXmlResource_Load(_swigobj,_swigarg0) (_swigobj->Load(_swigarg0))
216 static PyObject *_wrap_wxXmlResource_Load(PyObject *self, PyObject *args, PyObject *kwargs) {
217 PyObject * _resultobj;
218 bool _result;
219 wxXmlResource * _arg0;
220 wxString * _arg1;
221 PyObject * _argo0 = 0;
222 PyObject * _obj1 = 0;
223 char *_kwnames[] = { "self","filemask", NULL };
224
225 self = self;
226 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_Load",_kwnames,&_argo0,&_obj1))
227 return NULL;
228 if (_argo0) {
229 if (_argo0 == Py_None) { _arg0 = NULL; }
230 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
231 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_Load. Expected _wxXmlResource_p.");
232 return NULL;
233 }
234 }
235 {
236 #if PYTHON_API_VERSION >= 1009
237 char* tmpPtr; int tmpSize;
238 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
239 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
240 return NULL;
241 }
242 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
243 return NULL;
244 _arg1 = new wxString(tmpPtr, tmpSize);
245 #else
246 if (!PyString_Check(_obj1)) {
247 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
248 return NULL;
249 }
250 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
251 #endif
252 }
253 {
254 PyThreadState* __tstate = wxPyBeginAllowThreads();
255 _result = (bool )wxXmlResource_Load(_arg0,*_arg1);
256
257 wxPyEndAllowThreads(__tstate);
258 if (PyErr_Occurred()) return NULL;
259 } _resultobj = Py_BuildValue("i",_result);
260 {
261 if (_obj1)
262 delete _arg1;
263 }
264 return _resultobj;
265 }
266
267 #define wxXmlResource_InitAllHandlers(_swigobj) (_swigobj->InitAllHandlers())
268 static PyObject *_wrap_wxXmlResource_InitAllHandlers(PyObject *self, PyObject *args, PyObject *kwargs) {
269 PyObject * _resultobj;
270 wxXmlResource * _arg0;
271 PyObject * _argo0 = 0;
272 char *_kwnames[] = { "self", NULL };
273
274 self = self;
275 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_InitAllHandlers",_kwnames,&_argo0))
276 return NULL;
277 if (_argo0) {
278 if (_argo0 == Py_None) { _arg0 = NULL; }
279 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
280 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_InitAllHandlers. Expected _wxXmlResource_p.");
281 return NULL;
282 }
283 }
284 {
285 PyThreadState* __tstate = wxPyBeginAllowThreads();
286 wxXmlResource_InitAllHandlers(_arg0);
287
288 wxPyEndAllowThreads(__tstate);
289 if (PyErr_Occurred()) return NULL;
290 } Py_INCREF(Py_None);
291 _resultobj = Py_None;
292 return _resultobj;
293 }
294
295 #define wxXmlResource_AddHandler(_swigobj,_swigarg0) (_swigobj->AddHandler(_swigarg0))
296 static PyObject *_wrap_wxXmlResource_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
297 PyObject * _resultobj;
298 wxXmlResource * _arg0;
299 wxXmlResourceHandler * _arg1;
300 PyObject * _argo0 = 0;
301 PyObject * _argo1 = 0;
302 char *_kwnames[] = { "self","handler", NULL };
303
304 self = self;
305 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_AddHandler",_kwnames,&_argo0,&_argo1))
306 return NULL;
307 if (_argo0) {
308 if (_argo0 == Py_None) { _arg0 = NULL; }
309 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
310 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_AddHandler. Expected _wxXmlResource_p.");
311 return NULL;
312 }
313 }
314 if (_argo1) {
315 if (_argo1 == Py_None) { _arg1 = NULL; }
316 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxXmlResourceHandler_p")) {
317 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_AddHandler. Expected _wxXmlResourceHandler_p.");
318 return NULL;
319 }
320 }
321 {
322 PyThreadState* __tstate = wxPyBeginAllowThreads();
323 wxXmlResource_AddHandler(_arg0,_arg1);
324
325 wxPyEndAllowThreads(__tstate);
326 if (PyErr_Occurred()) return NULL;
327 } Py_INCREF(Py_None);
328 _resultobj = Py_None;
329 return _resultobj;
330 }
331
332 #define wxXmlResource_ClearHandlers(_swigobj) (_swigobj->ClearHandlers())
333 static PyObject *_wrap_wxXmlResource_ClearHandlers(PyObject *self, PyObject *args, PyObject *kwargs) {
334 PyObject * _resultobj;
335 wxXmlResource * _arg0;
336 PyObject * _argo0 = 0;
337 char *_kwnames[] = { "self", NULL };
338
339 self = self;
340 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_ClearHandlers",_kwnames,&_argo0))
341 return NULL;
342 if (_argo0) {
343 if (_argo0 == Py_None) { _arg0 = NULL; }
344 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
345 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_ClearHandlers. Expected _wxXmlResource_p.");
346 return NULL;
347 }
348 }
349 {
350 PyThreadState* __tstate = wxPyBeginAllowThreads();
351 wxXmlResource_ClearHandlers(_arg0);
352
353 wxPyEndAllowThreads(__tstate);
354 if (PyErr_Occurred()) return NULL;
355 } Py_INCREF(Py_None);
356 _resultobj = Py_None;
357 return _resultobj;
358 }
359
360 #define wxXmlResource_LoadMenu(_swigobj,_swigarg0) (_swigobj->LoadMenu(_swigarg0))
361 static PyObject *_wrap_wxXmlResource_LoadMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
362 PyObject * _resultobj;
363 wxMenu * _result;
364 wxXmlResource * _arg0;
365 wxString * _arg1;
366 PyObject * _argo0 = 0;
367 PyObject * _obj1 = 0;
368 char *_kwnames[] = { "self","name", NULL };
369
370 self = self;
371 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_LoadMenu",_kwnames,&_argo0,&_obj1))
372 return NULL;
373 if (_argo0) {
374 if (_argo0 == Py_None) { _arg0 = NULL; }
375 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
376 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadMenu. Expected _wxXmlResource_p.");
377 return NULL;
378 }
379 }
380 {
381 #if PYTHON_API_VERSION >= 1009
382 char* tmpPtr; int tmpSize;
383 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
384 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
385 return NULL;
386 }
387 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
388 return NULL;
389 _arg1 = new wxString(tmpPtr, tmpSize);
390 #else
391 if (!PyString_Check(_obj1)) {
392 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
393 return NULL;
394 }
395 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
396 #endif
397 }
398 {
399 PyThreadState* __tstate = wxPyBeginAllowThreads();
400 _result = (wxMenu *)wxXmlResource_LoadMenu(_arg0,*_arg1);
401
402 wxPyEndAllowThreads(__tstate);
403 if (PyErr_Occurred()) return NULL;
404 }{ _resultobj = wxPyMake_wxObject(_result); }
405 {
406 if (_obj1)
407 delete _arg1;
408 }
409 return _resultobj;
410 }
411
412 #define wxXmlResource_LoadMenuBar(_swigobj,_swigarg0) (_swigobj->LoadMenuBar(_swigarg0))
413 static PyObject *_wrap_wxXmlResource_LoadMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) {
414 PyObject * _resultobj;
415 wxMenuBar * _result;
416 wxXmlResource * _arg0;
417 wxString * _arg1;
418 PyObject * _argo0 = 0;
419 PyObject * _obj1 = 0;
420 char *_kwnames[] = { "self","name", NULL };
421
422 self = self;
423 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_LoadMenuBar",_kwnames,&_argo0,&_obj1))
424 return NULL;
425 if (_argo0) {
426 if (_argo0 == Py_None) { _arg0 = NULL; }
427 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
428 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadMenuBar. Expected _wxXmlResource_p.");
429 return NULL;
430 }
431 }
432 {
433 #if PYTHON_API_VERSION >= 1009
434 char* tmpPtr; int tmpSize;
435 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
436 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
437 return NULL;
438 }
439 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
440 return NULL;
441 _arg1 = new wxString(tmpPtr, tmpSize);
442 #else
443 if (!PyString_Check(_obj1)) {
444 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
445 return NULL;
446 }
447 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
448 #endif
449 }
450 {
451 PyThreadState* __tstate = wxPyBeginAllowThreads();
452 _result = (wxMenuBar *)wxXmlResource_LoadMenuBar(_arg0,*_arg1);
453
454 wxPyEndAllowThreads(__tstate);
455 if (PyErr_Occurred()) return NULL;
456 }{ _resultobj = wxPyMake_wxObject(_result); }
457 {
458 if (_obj1)
459 delete _arg1;
460 }
461 return _resultobj;
462 }
463
464 #define wxXmlResource_LoadToolBar(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadToolBar(_swigarg0,_swigarg1))
465 static PyObject *_wrap_wxXmlResource_LoadToolBar(PyObject *self, PyObject *args, PyObject *kwargs) {
466 PyObject * _resultobj;
467 wxToolBar * _result;
468 wxXmlResource * _arg0;
469 wxWindow * _arg1;
470 wxString * _arg2;
471 PyObject * _argo0 = 0;
472 PyObject * _argo1 = 0;
473 PyObject * _obj2 = 0;
474 char *_kwnames[] = { "self","parent","name", NULL };
475
476 self = self;
477 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxXmlResource_LoadToolBar",_kwnames,&_argo0,&_argo1,&_obj2))
478 return NULL;
479 if (_argo0) {
480 if (_argo0 == Py_None) { _arg0 = NULL; }
481 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
482 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadToolBar. Expected _wxXmlResource_p.");
483 return NULL;
484 }
485 }
486 if (_argo1) {
487 if (_argo1 == Py_None) { _arg1 = NULL; }
488 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
489 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadToolBar. Expected _wxWindow_p.");
490 return NULL;
491 }
492 }
493 {
494 #if PYTHON_API_VERSION >= 1009
495 char* tmpPtr; int tmpSize;
496 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
497 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
498 return NULL;
499 }
500 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
501 return NULL;
502 _arg2 = new wxString(tmpPtr, tmpSize);
503 #else
504 if (!PyString_Check(_obj2)) {
505 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
506 return NULL;
507 }
508 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
509 #endif
510 }
511 {
512 PyThreadState* __tstate = wxPyBeginAllowThreads();
513 _result = (wxToolBar *)wxXmlResource_LoadToolBar(_arg0,_arg1,*_arg2);
514
515 wxPyEndAllowThreads(__tstate);
516 if (PyErr_Occurred()) return NULL;
517 }{ _resultobj = wxPyMake_wxObject(_result); }
518 {
519 if (_obj2)
520 delete _arg2;
521 }
522 return _resultobj;
523 }
524
525 #define wxXmlResource_LoadDialog(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadDialog(_swigarg0,_swigarg1))
526 static PyObject *_wrap_wxXmlResource_LoadDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
527 PyObject * _resultobj;
528 wxDialog * _result;
529 wxXmlResource * _arg0;
530 wxWindow * _arg1;
531 wxString * _arg2;
532 PyObject * _argo0 = 0;
533 PyObject * _argo1 = 0;
534 PyObject * _obj2 = 0;
535 char *_kwnames[] = { "self","parent","name", NULL };
536 char _ptemp[128];
537
538 self = self;
539 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxXmlResource_LoadDialog",_kwnames,&_argo0,&_argo1,&_obj2))
540 return NULL;
541 if (_argo0) {
542 if (_argo0 == Py_None) { _arg0 = NULL; }
543 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
544 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadDialog. Expected _wxXmlResource_p.");
545 return NULL;
546 }
547 }
548 if (_argo1) {
549 if (_argo1 == Py_None) { _arg1 = NULL; }
550 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
551 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadDialog. Expected _wxWindow_p.");
552 return NULL;
553 }
554 }
555 {
556 #if PYTHON_API_VERSION >= 1009
557 char* tmpPtr; int tmpSize;
558 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
559 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
560 return NULL;
561 }
562 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
563 return NULL;
564 _arg2 = new wxString(tmpPtr, tmpSize);
565 #else
566 if (!PyString_Check(_obj2)) {
567 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
568 return NULL;
569 }
570 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
571 #endif
572 }
573 {
574 PyThreadState* __tstate = wxPyBeginAllowThreads();
575 _result = (wxDialog *)wxXmlResource_LoadDialog(_arg0,_arg1,*_arg2);
576
577 wxPyEndAllowThreads(__tstate);
578 if (PyErr_Occurred()) return NULL;
579 } if (_result) {
580 SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p");
581 _resultobj = Py_BuildValue("s",_ptemp);
582 } else {
583 Py_INCREF(Py_None);
584 _resultobj = Py_None;
585 }
586 {
587 if (_obj2)
588 delete _arg2;
589 }
590 return _resultobj;
591 }
592
593 #define wxXmlResource_LoadOnDialog(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadDialog(_swigarg0,_swigarg1,_swigarg2))
594 static PyObject *_wrap_wxXmlResource_LoadOnDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
595 PyObject * _resultobj;
596 bool _result;
597 wxXmlResource * _arg0;
598 wxDialog * _arg1;
599 wxWindow * _arg2;
600 wxString * _arg3;
601 PyObject * _argo0 = 0;
602 PyObject * _argo1 = 0;
603 PyObject * _argo2 = 0;
604 PyObject * _obj3 = 0;
605 char *_kwnames[] = { "self","dlg","parent","name", NULL };
606
607 self = self;
608 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxXmlResource_LoadOnDialog",_kwnames,&_argo0,&_argo1,&_argo2,&_obj3))
609 return NULL;
610 if (_argo0) {
611 if (_argo0 == Py_None) { _arg0 = NULL; }
612 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
613 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadOnDialog. Expected _wxXmlResource_p.");
614 return NULL;
615 }
616 }
617 if (_argo1) {
618 if (_argo1 == Py_None) { _arg1 = NULL; }
619 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDialog_p")) {
620 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadOnDialog. Expected _wxDialog_p.");
621 return NULL;
622 }
623 }
624 if (_argo2) {
625 if (_argo2 == Py_None) { _arg2 = NULL; }
626 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
627 PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResource_LoadOnDialog. Expected _wxWindow_p.");
628 return NULL;
629 }
630 }
631 {
632 #if PYTHON_API_VERSION >= 1009
633 char* tmpPtr; int tmpSize;
634 if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
635 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
636 return NULL;
637 }
638 if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
639 return NULL;
640 _arg3 = new wxString(tmpPtr, tmpSize);
641 #else
642 if (!PyString_Check(_obj3)) {
643 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
644 return NULL;
645 }
646 _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
647 #endif
648 }
649 {
650 PyThreadState* __tstate = wxPyBeginAllowThreads();
651 _result = (bool )wxXmlResource_LoadOnDialog(_arg0,_arg1,_arg2,*_arg3);
652
653 wxPyEndAllowThreads(__tstate);
654 if (PyErr_Occurred()) return NULL;
655 } _resultobj = Py_BuildValue("i",_result);
656 {
657 if (_obj3)
658 delete _arg3;
659 }
660 return _resultobj;
661 }
662
663 #define wxXmlResource_LoadPanel(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadPanel(_swigarg0,_swigarg1))
664 static PyObject *_wrap_wxXmlResource_LoadPanel(PyObject *self, PyObject *args, PyObject *kwargs) {
665 PyObject * _resultobj;
666 wxPanel * _result;
667 wxXmlResource * _arg0;
668 wxWindow * _arg1;
669 wxString * _arg2;
670 PyObject * _argo0 = 0;
671 PyObject * _argo1 = 0;
672 PyObject * _obj2 = 0;
673 char *_kwnames[] = { "self","parent","name", NULL };
674 char _ptemp[128];
675
676 self = self;
677 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxXmlResource_LoadPanel",_kwnames,&_argo0,&_argo1,&_obj2))
678 return NULL;
679 if (_argo0) {
680 if (_argo0 == Py_None) { _arg0 = NULL; }
681 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
682 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadPanel. Expected _wxXmlResource_p.");
683 return NULL;
684 }
685 }
686 if (_argo1) {
687 if (_argo1 == Py_None) { _arg1 = NULL; }
688 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
689 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadPanel. Expected _wxWindow_p.");
690 return NULL;
691 }
692 }
693 {
694 #if PYTHON_API_VERSION >= 1009
695 char* tmpPtr; int tmpSize;
696 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
697 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
698 return NULL;
699 }
700 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
701 return NULL;
702 _arg2 = new wxString(tmpPtr, tmpSize);
703 #else
704 if (!PyString_Check(_obj2)) {
705 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
706 return NULL;
707 }
708 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
709 #endif
710 }
711 {
712 PyThreadState* __tstate = wxPyBeginAllowThreads();
713 _result = (wxPanel *)wxXmlResource_LoadPanel(_arg0,_arg1,*_arg2);
714
715 wxPyEndAllowThreads(__tstate);
716 if (PyErr_Occurred()) return NULL;
717 } if (_result) {
718 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPanel_p");
719 _resultobj = Py_BuildValue("s",_ptemp);
720 } else {
721 Py_INCREF(Py_None);
722 _resultobj = Py_None;
723 }
724 {
725 if (_obj2)
726 delete _arg2;
727 }
728 return _resultobj;
729 }
730
731 #define wxXmlResource_LoadOnPanel(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadPanel(_swigarg0,_swigarg1,_swigarg2))
732 static PyObject *_wrap_wxXmlResource_LoadOnPanel(PyObject *self, PyObject *args, PyObject *kwargs) {
733 PyObject * _resultobj;
734 bool _result;
735 wxXmlResource * _arg0;
736 wxPanel * _arg1;
737 wxWindow * _arg2;
738 wxString * _arg3;
739 PyObject * _argo0 = 0;
740 PyObject * _argo1 = 0;
741 PyObject * _argo2 = 0;
742 PyObject * _obj3 = 0;
743 char *_kwnames[] = { "self","panel","parent","name", NULL };
744
745 self = self;
746 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxXmlResource_LoadOnPanel",_kwnames,&_argo0,&_argo1,&_argo2,&_obj3))
747 return NULL;
748 if (_argo0) {
749 if (_argo0 == Py_None) { _arg0 = NULL; }
750 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
751 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadOnPanel. Expected _wxXmlResource_p.");
752 return NULL;
753 }
754 }
755 if (_argo1) {
756 if (_argo1 == Py_None) { _arg1 = NULL; }
757 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPanel_p")) {
758 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadOnPanel. Expected _wxPanel_p.");
759 return NULL;
760 }
761 }
762 if (_argo2) {
763 if (_argo2 == Py_None) { _arg2 = NULL; }
764 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
765 PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResource_LoadOnPanel. Expected _wxWindow_p.");
766 return NULL;
767 }
768 }
769 {
770 #if PYTHON_API_VERSION >= 1009
771 char* tmpPtr; int tmpSize;
772 if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
773 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
774 return NULL;
775 }
776 if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
777 return NULL;
778 _arg3 = new wxString(tmpPtr, tmpSize);
779 #else
780 if (!PyString_Check(_obj3)) {
781 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
782 return NULL;
783 }
784 _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
785 #endif
786 }
787 {
788 PyThreadState* __tstate = wxPyBeginAllowThreads();
789 _result = (bool )wxXmlResource_LoadOnPanel(_arg0,_arg1,_arg2,*_arg3);
790
791 wxPyEndAllowThreads(__tstate);
792 if (PyErr_Occurred()) return NULL;
793 } _resultobj = Py_BuildValue("i",_result);
794 {
795 if (_obj3)
796 delete _arg3;
797 }
798 return _resultobj;
799 }
800
801 #define wxXmlResource_LoadFrame(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFrame(_swigarg0,_swigarg1,_swigarg2))
802 static PyObject *_wrap_wxXmlResource_LoadFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
803 PyObject * _resultobj;
804 bool _result;
805 wxXmlResource * _arg0;
806 wxFrame * _arg1;
807 wxWindow * _arg2;
808 wxString * _arg3;
809 PyObject * _argo0 = 0;
810 PyObject * _argo1 = 0;
811 PyObject * _argo2 = 0;
812 PyObject * _obj3 = 0;
813 char *_kwnames[] = { "self","frame","parent","name", NULL };
814
815 self = self;
816 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxXmlResource_LoadFrame",_kwnames,&_argo0,&_argo1,&_argo2,&_obj3))
817 return NULL;
818 if (_argo0) {
819 if (_argo0 == Py_None) { _arg0 = NULL; }
820 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
821 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadFrame. Expected _wxXmlResource_p.");
822 return NULL;
823 }
824 }
825 if (_argo1) {
826 if (_argo1 == Py_None) { _arg1 = NULL; }
827 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) {
828 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadFrame. Expected _wxFrame_p.");
829 return NULL;
830 }
831 }
832 if (_argo2) {
833 if (_argo2 == Py_None) { _arg2 = NULL; }
834 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
835 PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResource_LoadFrame. Expected _wxWindow_p.");
836 return NULL;
837 }
838 }
839 {
840 #if PYTHON_API_VERSION >= 1009
841 char* tmpPtr; int tmpSize;
842 if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
843 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
844 return NULL;
845 }
846 if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
847 return NULL;
848 _arg3 = new wxString(tmpPtr, tmpSize);
849 #else
850 if (!PyString_Check(_obj3)) {
851 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
852 return NULL;
853 }
854 _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
855 #endif
856 }
857 {
858 PyThreadState* __tstate = wxPyBeginAllowThreads();
859 _result = (bool )wxXmlResource_LoadFrame(_arg0,_arg1,_arg2,*_arg3);
860
861 wxPyEndAllowThreads(__tstate);
862 if (PyErr_Occurred()) return NULL;
863 } _resultobj = Py_BuildValue("i",_result);
864 {
865 if (_obj3)
866 delete _arg3;
867 }
868 return _resultobj;
869 }
870
871 #define wxXmlResource_LoadBitmap(_swigobj,_swigarg0) (_swigobj->LoadBitmap(_swigarg0))
872 static PyObject *_wrap_wxXmlResource_LoadBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
873 PyObject * _resultobj;
874 wxBitmap * _result;
875 wxXmlResource * _arg0;
876 wxString * _arg1;
877 PyObject * _argo0 = 0;
878 PyObject * _obj1 = 0;
879 char *_kwnames[] = { "self","name", NULL };
880 char _ptemp[128];
881
882 self = self;
883 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_LoadBitmap",_kwnames,&_argo0,&_obj1))
884 return NULL;
885 if (_argo0) {
886 if (_argo0 == Py_None) { _arg0 = NULL; }
887 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
888 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadBitmap. Expected _wxXmlResource_p.");
889 return NULL;
890 }
891 }
892 {
893 #if PYTHON_API_VERSION >= 1009
894 char* tmpPtr; int tmpSize;
895 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
896 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
897 return NULL;
898 }
899 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
900 return NULL;
901 _arg1 = new wxString(tmpPtr, tmpSize);
902 #else
903 if (!PyString_Check(_obj1)) {
904 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
905 return NULL;
906 }
907 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
908 #endif
909 }
910 {
911 PyThreadState* __tstate = wxPyBeginAllowThreads();
912 _result = new wxBitmap (wxXmlResource_LoadBitmap(_arg0,*_arg1));
913
914 wxPyEndAllowThreads(__tstate);
915 if (PyErr_Occurred()) return NULL;
916 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
917 _resultobj = Py_BuildValue("s",_ptemp);
918 {
919 if (_obj1)
920 delete _arg1;
921 }
922 return _resultobj;
923 }
924
925 #define wxXmlResource_LoadIcon(_swigobj,_swigarg0) (_swigobj->LoadIcon(_swigarg0))
926 static PyObject *_wrap_wxXmlResource_LoadIcon(PyObject *self, PyObject *args, PyObject *kwargs) {
927 PyObject * _resultobj;
928 wxIcon * _result;
929 wxXmlResource * _arg0;
930 wxString * _arg1;
931 PyObject * _argo0 = 0;
932 PyObject * _obj1 = 0;
933 char *_kwnames[] = { "self","name", NULL };
934 char _ptemp[128];
935
936 self = self;
937 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_LoadIcon",_kwnames,&_argo0,&_obj1))
938 return NULL;
939 if (_argo0) {
940 if (_argo0 == Py_None) { _arg0 = NULL; }
941 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
942 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadIcon. Expected _wxXmlResource_p.");
943 return NULL;
944 }
945 }
946 {
947 #if PYTHON_API_VERSION >= 1009
948 char* tmpPtr; int tmpSize;
949 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
950 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
951 return NULL;
952 }
953 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
954 return NULL;
955 _arg1 = new wxString(tmpPtr, tmpSize);
956 #else
957 if (!PyString_Check(_obj1)) {
958 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
959 return NULL;
960 }
961 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
962 #endif
963 }
964 {
965 PyThreadState* __tstate = wxPyBeginAllowThreads();
966 _result = new wxIcon (wxXmlResource_LoadIcon(_arg0,*_arg1));
967
968 wxPyEndAllowThreads(__tstate);
969 if (PyErr_Occurred()) return NULL;
970 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p");
971 _resultobj = Py_BuildValue("s",_ptemp);
972 {
973 if (_obj1)
974 delete _arg1;
975 }
976 return _resultobj;
977 }
978
979 #define wxXmlResource_AttachUnknownControl(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->AttachUnknownControl(_swigarg0,_swigarg1,_swigarg2))
980 static PyObject *_wrap_wxXmlResource_AttachUnknownControl(PyObject *self, PyObject *args, PyObject *kwargs) {
981 PyObject * _resultobj;
982 bool _result;
983 wxXmlResource * _arg0;
984 wxString * _arg1;
985 wxWindow * _arg2;
986 wxWindow * _arg3 = (wxWindow *) NULL;
987 PyObject * _argo0 = 0;
988 PyObject * _obj1 = 0;
989 PyObject * _argo2 = 0;
990 PyObject * _argo3 = 0;
991 char *_kwnames[] = { "self","name","control","parent", NULL };
992
993 self = self;
994 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|O:wxXmlResource_AttachUnknownControl",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3))
995 return NULL;
996 if (_argo0) {
997 if (_argo0 == Py_None) { _arg0 = NULL; }
998 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
999 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_AttachUnknownControl. Expected _wxXmlResource_p.");
1000 return NULL;
1001 }
1002 }
1003 {
1004 #if PYTHON_API_VERSION >= 1009
1005 char* tmpPtr; int tmpSize;
1006 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
1007 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1008 return NULL;
1009 }
1010 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
1011 return NULL;
1012 _arg1 = new wxString(tmpPtr, tmpSize);
1013 #else
1014 if (!PyString_Check(_obj1)) {
1015 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1016 return NULL;
1017 }
1018 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
1019 #endif
1020 }
1021 if (_argo2) {
1022 if (_argo2 == Py_None) { _arg2 = NULL; }
1023 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
1024 PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResource_AttachUnknownControl. Expected _wxWindow_p.");
1025 return NULL;
1026 }
1027 }
1028 if (_argo3) {
1029 if (_argo3 == Py_None) { _arg3 = NULL; }
1030 else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) {
1031 PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxXmlResource_AttachUnknownControl. Expected _wxWindow_p.");
1032 return NULL;
1033 }
1034 }
1035 {
1036 PyThreadState* __tstate = wxPyBeginAllowThreads();
1037 _result = (bool )wxXmlResource_AttachUnknownControl(_arg0,*_arg1,_arg2,_arg3);
1038
1039 wxPyEndAllowThreads(__tstate);
1040 if (PyErr_Occurred()) return NULL;
1041 } _resultobj = Py_BuildValue("i",_result);
1042 {
1043 if (_obj1)
1044 delete _arg1;
1045 }
1046 return _resultobj;
1047 }
1048
1049 static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, PyObject *kwargs) {
1050 PyObject * _resultobj;
1051 int _result;
1052 char * _arg0;
1053 char *_kwnames[] = { "str_id", NULL };
1054
1055 self = self;
1056 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXRCID",_kwnames,&_arg0))
1057 return NULL;
1058 {
1059 PyThreadState* __tstate = wxPyBeginAllowThreads();
1060 _result = (int )wxXmlResource::GetXRCID(_arg0);
1061
1062 wxPyEndAllowThreads(__tstate);
1063 if (PyErr_Occurred()) return NULL;
1064 } _resultobj = Py_BuildValue("i",_result);
1065 return _resultobj;
1066 }
1067
1068 #define wxXmlResource_GetVersion(_swigobj) (_swigobj->GetVersion())
1069 static PyObject *_wrap_wxXmlResource_GetVersion(PyObject *self, PyObject *args, PyObject *kwargs) {
1070 PyObject * _resultobj;
1071 long _result;
1072 wxXmlResource * _arg0;
1073 PyObject * _argo0 = 0;
1074 char *_kwnames[] = { "self", NULL };
1075
1076 self = self;
1077 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_GetVersion",_kwnames,&_argo0))
1078 return NULL;
1079 if (_argo0) {
1080 if (_argo0 == Py_None) { _arg0 = NULL; }
1081 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
1082 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_GetVersion. Expected _wxXmlResource_p.");
1083 return NULL;
1084 }
1085 }
1086 {
1087 PyThreadState* __tstate = wxPyBeginAllowThreads();
1088 _result = (long )wxXmlResource_GetVersion(_arg0);
1089
1090 wxPyEndAllowThreads(__tstate);
1091 if (PyErr_Occurred()) return NULL;
1092 } _resultobj = Py_BuildValue("l",_result);
1093 return _resultobj;
1094 }
1095
1096 #define wxXmlResource_CompareVersion(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CompareVersion(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
1097 static PyObject *_wrap_wxXmlResource_CompareVersion(PyObject *self, PyObject *args, PyObject *kwargs) {
1098 PyObject * _resultobj;
1099 int _result;
1100 wxXmlResource * _arg0;
1101 int _arg1;
1102 int _arg2;
1103 int _arg3;
1104 int _arg4;
1105 PyObject * _argo0 = 0;
1106 char *_kwnames[] = { "self","major","minor","release","revision", NULL };
1107
1108 self = self;
1109 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxXmlResource_CompareVersion",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4))
1110 return NULL;
1111 if (_argo0) {
1112 if (_argo0 == Py_None) { _arg0 = NULL; }
1113 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
1114 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_CompareVersion. Expected _wxXmlResource_p.");
1115 return NULL;
1116 }
1117 }
1118 {
1119 PyThreadState* __tstate = wxPyBeginAllowThreads();
1120 _result = (int )wxXmlResource_CompareVersion(_arg0,_arg1,_arg2,_arg3,_arg4);
1121
1122 wxPyEndAllowThreads(__tstate);
1123 if (PyErr_Occurred()) return NULL;
1124 } _resultobj = Py_BuildValue("i",_result);
1125 return _resultobj;
1126 }
1127
1128 static PyObject *_wrap_wxXmlResource_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
1129 PyObject * _resultobj;
1130 wxXmlResource * _result;
1131 char *_kwnames[] = { NULL };
1132 char _ptemp[128];
1133
1134 self = self;
1135 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxXmlResource_Get",_kwnames))
1136 return NULL;
1137 {
1138 PyThreadState* __tstate = wxPyBeginAllowThreads();
1139 _result = (wxXmlResource *)wxXmlResource::Get();
1140
1141 wxPyEndAllowThreads(__tstate);
1142 if (PyErr_Occurred()) return NULL;
1143 } if (_result) {
1144 SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
1145 _resultobj = Py_BuildValue("s",_ptemp);
1146 } else {
1147 Py_INCREF(Py_None);
1148 _resultobj = Py_None;
1149 }
1150 return _resultobj;
1151 }
1152
1153 static PyObject *_wrap_wxXmlResource_Set(PyObject *self, PyObject *args, PyObject *kwargs) {
1154 PyObject * _resultobj;
1155 wxXmlResource * _result;
1156 wxXmlResource * _arg0;
1157 PyObject * _argo0 = 0;
1158 char *_kwnames[] = { "res", NULL };
1159 char _ptemp[128];
1160
1161 self = self;
1162 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_Set",_kwnames,&_argo0))
1163 return NULL;
1164 if (_argo0) {
1165 if (_argo0 == Py_None) { _arg0 = NULL; }
1166 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
1167 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_Set. Expected _wxXmlResource_p.");
1168 return NULL;
1169 }
1170 }
1171 {
1172 PyThreadState* __tstate = wxPyBeginAllowThreads();
1173 _result = (wxXmlResource *)wxXmlResource::Set(_arg0);
1174
1175 wxPyEndAllowThreads(__tstate);
1176 if (PyErr_Occurred()) return NULL;
1177 } if (_result) {
1178 SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
1179 _resultobj = Py_BuildValue("s",_ptemp);
1180 } else {
1181 Py_INCREF(Py_None);
1182 _resultobj = Py_None;
1183 }
1184 return _resultobj;
1185 }
1186
1187 static PyMethodDef xrccMethods[] = {
1188 { "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
1189 { "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
1190 { "wxXmlResource_CompareVersion", (PyCFunction) _wrap_wxXmlResource_CompareVersion, METH_VARARGS | METH_KEYWORDS },
1191 { "wxXmlResource_GetVersion", (PyCFunction) _wrap_wxXmlResource_GetVersion, METH_VARARGS | METH_KEYWORDS },
1192 { "wxXmlResource_GetXRCID", (PyCFunction) _wrap_wxXmlResource_GetXRCID, METH_VARARGS | METH_KEYWORDS },
1193 { "wxXmlResource_AttachUnknownControl", (PyCFunction) _wrap_wxXmlResource_AttachUnknownControl, METH_VARARGS | METH_KEYWORDS },
1194 { "wxXmlResource_LoadIcon", (PyCFunction) _wrap_wxXmlResource_LoadIcon, METH_VARARGS | METH_KEYWORDS },
1195 { "wxXmlResource_LoadBitmap", (PyCFunction) _wrap_wxXmlResource_LoadBitmap, METH_VARARGS | METH_KEYWORDS },
1196 { "wxXmlResource_LoadFrame", (PyCFunction) _wrap_wxXmlResource_LoadFrame, METH_VARARGS | METH_KEYWORDS },
1197 { "wxXmlResource_LoadOnPanel", (PyCFunction) _wrap_wxXmlResource_LoadOnPanel, METH_VARARGS | METH_KEYWORDS },
1198 { "wxXmlResource_LoadPanel", (PyCFunction) _wrap_wxXmlResource_LoadPanel, METH_VARARGS | METH_KEYWORDS },
1199 { "wxXmlResource_LoadOnDialog", (PyCFunction) _wrap_wxXmlResource_LoadOnDialog, METH_VARARGS | METH_KEYWORDS },
1200 { "wxXmlResource_LoadDialog", (PyCFunction) _wrap_wxXmlResource_LoadDialog, METH_VARARGS | METH_KEYWORDS },
1201 { "wxXmlResource_LoadToolBar", (PyCFunction) _wrap_wxXmlResource_LoadToolBar, METH_VARARGS | METH_KEYWORDS },
1202 { "wxXmlResource_LoadMenuBar", (PyCFunction) _wrap_wxXmlResource_LoadMenuBar, METH_VARARGS | METH_KEYWORDS },
1203 { "wxXmlResource_LoadMenu", (PyCFunction) _wrap_wxXmlResource_LoadMenu, METH_VARARGS | METH_KEYWORDS },
1204 { "wxXmlResource_ClearHandlers", (PyCFunction) _wrap_wxXmlResource_ClearHandlers, METH_VARARGS | METH_KEYWORDS },
1205 { "wxXmlResource_AddHandler", (PyCFunction) _wrap_wxXmlResource_AddHandler, METH_VARARGS | METH_KEYWORDS },
1206 { "wxXmlResource_InitAllHandlers", (PyCFunction) _wrap_wxXmlResource_InitAllHandlers, METH_VARARGS | METH_KEYWORDS },
1207 { "wxXmlResource_Load", (PyCFunction) _wrap_wxXmlResource_Load, METH_VARARGS | METH_KEYWORDS },
1208 { "delete_wxXmlResource", (PyCFunction) _wrap_delete_wxXmlResource, METH_VARARGS | METH_KEYWORDS },
1209 { "new_wxXmlResource", (PyCFunction) _wrap_new_wxXmlResource, METH_VARARGS | METH_KEYWORDS },
1210 { "new_wxXmlResourceEmpty", (PyCFunction) _wrap_new_wxXmlResourceEmpty, METH_VARARGS | METH_KEYWORDS },
1211 { NULL, NULL }
1212 };
1213 #ifdef __cplusplus
1214 }
1215 #endif
1216 /*
1217 * This table is used by the pointer type-checker
1218 */
1219 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
1220 { "_signed_long","_long",0},
1221 { "_wxPrintQuality","_wxCoord",0},
1222 { "_wxPrintQuality","_int",0},
1223 { "_wxPrintQuality","_signed_int",0},
1224 { "_wxPrintQuality","_unsigned_int",0},
1225 { "_wxPrintQuality","_wxWindowID",0},
1226 { "_wxPrintQuality","_uint",0},
1227 { "_wxPrintQuality","_EBool",0},
1228 { "_wxPrintQuality","_size_t",0},
1229 { "_wxPrintQuality","_time_t",0},
1230 { "_byte","_unsigned_char",0},
1231 { "_long","_unsigned_long",0},
1232 { "_long","_signed_long",0},
1233 { "_size_t","_wxCoord",0},
1234 { "_size_t","_wxPrintQuality",0},
1235 { "_size_t","_time_t",0},
1236 { "_size_t","_unsigned_int",0},
1237 { "_size_t","_int",0},
1238 { "_size_t","_wxWindowID",0},
1239 { "_size_t","_uint",0},
1240 { "_uint","_wxCoord",0},
1241 { "_uint","_wxPrintQuality",0},
1242 { "_uint","_time_t",0},
1243 { "_uint","_size_t",0},
1244 { "_uint","_unsigned_int",0},
1245 { "_uint","_int",0},
1246 { "_uint","_wxWindowID",0},
1247 { "_wxChar","_char",0},
1248 { "_char","_wxChar",0},
1249 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
1250 { "_EBool","_wxCoord",0},
1251 { "_EBool","_wxPrintQuality",0},
1252 { "_EBool","_signed_int",0},
1253 { "_EBool","_int",0},
1254 { "_EBool","_wxWindowID",0},
1255 { "_unsigned_long","_long",0},
1256 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
1257 { "_signed_int","_wxCoord",0},
1258 { "_signed_int","_wxPrintQuality",0},
1259 { "_signed_int","_EBool",0},
1260 { "_signed_int","_wxWindowID",0},
1261 { "_signed_int","_int",0},
1262 { "_WXTYPE","_wxDateTime_t",0},
1263 { "_WXTYPE","_short",0},
1264 { "_WXTYPE","_signed_short",0},
1265 { "_WXTYPE","_unsigned_short",0},
1266 { "_unsigned_short","_wxDateTime_t",0},
1267 { "_unsigned_short","_WXTYPE",0},
1268 { "_unsigned_short","_short",0},
1269 { "_wxObject","_wxXmlResource",SwigwxXmlResourceTowxObject},
1270 { "_signed_short","_WXTYPE",0},
1271 { "_signed_short","_short",0},
1272 { "_unsigned_char","_byte",0},
1273 { "_unsigned_int","_wxCoord",0},
1274 { "_unsigned_int","_wxPrintQuality",0},
1275 { "_unsigned_int","_time_t",0},
1276 { "_unsigned_int","_size_t",0},
1277 { "_unsigned_int","_uint",0},
1278 { "_unsigned_int","_wxWindowID",0},
1279 { "_unsigned_int","_int",0},
1280 { "_short","_wxDateTime_t",0},
1281 { "_short","_WXTYPE",0},
1282 { "_short","_unsigned_short",0},
1283 { "_short","_signed_short",0},
1284 { "_wxWindowID","_wxCoord",0},
1285 { "_wxWindowID","_wxPrintQuality",0},
1286 { "_wxWindowID","_time_t",0},
1287 { "_wxWindowID","_size_t",0},
1288 { "_wxWindowID","_EBool",0},
1289 { "_wxWindowID","_uint",0},
1290 { "_wxWindowID","_int",0},
1291 { "_wxWindowID","_signed_int",0},
1292 { "_wxWindowID","_unsigned_int",0},
1293 { "_int","_wxCoord",0},
1294 { "_int","_wxPrintQuality",0},
1295 { "_int","_time_t",0},
1296 { "_int","_size_t",0},
1297 { "_int","_EBool",0},
1298 { "_int","_uint",0},
1299 { "_int","_wxWindowID",0},
1300 { "_int","_unsigned_int",0},
1301 { "_int","_signed_int",0},
1302 { "_wxDateTime_t","_unsigned_short",0},
1303 { "_wxDateTime_t","_short",0},
1304 { "_wxDateTime_t","_WXTYPE",0},
1305 { "_time_t","_wxCoord",0},
1306 { "_time_t","_wxPrintQuality",0},
1307 { "_time_t","_unsigned_int",0},
1308 { "_time_t","_int",0},
1309 { "_time_t","_wxWindowID",0},
1310 { "_time_t","_uint",0},
1311 { "_time_t","_size_t",0},
1312 { "_wxCoord","_int",0},
1313 { "_wxCoord","_signed_int",0},
1314 { "_wxCoord","_unsigned_int",0},
1315 { "_wxCoord","_wxWindowID",0},
1316 { "_wxCoord","_uint",0},
1317 { "_wxCoord","_EBool",0},
1318 { "_wxCoord","_size_t",0},
1319 { "_wxCoord","_time_t",0},
1320 { "_wxCoord","_wxPrintQuality",0},
1321 {0,0,0}};
1322
1323 static PyObject *SWIG_globals;
1324 #ifdef __cplusplus
1325 extern "C"
1326 #endif
1327 SWIGEXPORT(void) initxrcc() {
1328 PyObject *m, *d;
1329 SWIG_globals = SWIG_newvarlink();
1330 m = Py_InitModule("xrcc", xrccMethods);
1331 d = PyModule_GetDict(m);
1332 PyDict_SetItemString(d,"wxXRC_USE_LOCALE", PyInt_FromLong((long) wxXRC_USE_LOCALE));
1333 PyDict_SetItemString(d,"wxXRC_NO_SUBCLASSING", PyInt_FromLong((long) wxXRC_NO_SUBCLASSING));
1334
1335
1336 wxClassInfo::CleanUpClasses();
1337 wxClassInfo::InitializeClasses();
1338
1339 wxXmlInitResourceModule();
1340 wxXmlResource::Get()->InitAllHandlers();
1341
1342 {
1343 int i;
1344 for (i = 0; _swig_mapping[i].n1; i++)
1345 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
1346 }
1347 }