]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/msw/utils.cpp
Final tweaks for 2.1b1
[wxWidgets.git] / utils / wxPython / src / msw / utils.cpp
1 /*
2 * FILE : msw/utils.cpp
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Patch 5)
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 /***********************************************************************
25 * $Header$
26 * swig_lib/python/python.cfg
27 *
28 * This file contains coded needed to add variable linking to the
29 * Python interpreter. C variables are added as a new kind of Python
30 * datatype.
31 *
32 * Also contains supporting code for building python under Windows
33 * and things like that.
34 *
35 * $Log$
36 * Revision 1.7 1999/06/22 18:01:12 RD
37 * wxPython 2.1b1: More more set of generated sources...
38 *
39 ************************************************************************/
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 #include "Python.h"
45 #ifdef __cplusplus
46 }
47 #endif
48
49 /* Definitions for Windows/Unix exporting */
50 #if defined(__WIN32__)
51 # if defined(_MSC_VER)
52 # define SWIGEXPORT(a,b) __declspec(dllexport) a b
53 # else
54 # if defined(__BORLANDC__)
55 # define SWIGEXPORT(a,b) a _export b
56 # else
57 # define SWIGEXPORT(a,b) a b
58 # endif
59 # endif
60 #else
61 # define SWIGEXPORT(a,b) a b
62 #endif
63
64 #ifdef SWIG_GLOBAL
65 #ifdef __cplusplus
66 #define SWIGSTATIC extern "C"
67 #else
68 #define SWIGSTATIC
69 #endif
70 #endif
71
72 #ifndef SWIGSTATIC
73 #define SWIGSTATIC static
74 #endif
75
76 typedef struct {
77 char *name;
78 PyObject *(*get_attr)(void);
79 int (*set_attr)(PyObject *);
80 } swig_globalvar;
81
82 typedef struct swig_varlinkobject {
83 PyObject_HEAD
84 swig_globalvar **vars;
85 int nvars;
86 int maxvars;
87 } swig_varlinkobject;
88
89 /* ----------------------------------------------------------------------
90 swig_varlink_repr()
91
92 Function for python repr method
93 ---------------------------------------------------------------------- */
94
95 static PyObject *
96 swig_varlink_repr(swig_varlinkobject *v)
97 {
98 v = v;
99 return PyString_FromString("<Global variables>");
100 }
101
102 /* ---------------------------------------------------------------------
103 swig_varlink_print()
104
105 Print out all of the global variable names
106 --------------------------------------------------------------------- */
107
108 static int
109 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags)
110 {
111
112 int i = 0;
113 flags = flags;
114 fprintf(fp,"Global variables { ");
115 while (v->vars[i]) {
116 fprintf(fp,"%s", v->vars[i]->name);
117 i++;
118 if (v->vars[i]) fprintf(fp,", ");
119 }
120 fprintf(fp," }\n");
121 return 0;
122 }
123
124 /* --------------------------------------------------------------------
125 swig_varlink_getattr
126
127 This function gets the value of a variable and returns it as a
128 PyObject. In our case, we'll be looking at the datatype and
129 converting into a number or string
130 -------------------------------------------------------------------- */
131
132 static PyObject *
133 swig_varlink_getattr(swig_varlinkobject *v, char *n)
134 {
135 int i = 0;
136 char temp[128];
137
138 while (v->vars[i]) {
139 if (strcmp(v->vars[i]->name,n) == 0) {
140 return (*v->vars[i]->get_attr)();
141 }
142 i++;
143 }
144 sprintf(temp,"C global variable %s not found.", n);
145 PyErr_SetString(PyExc_NameError,temp);
146 return NULL;
147 }
148
149 /* -------------------------------------------------------------------
150 swig_varlink_setattr()
151
152 This function sets the value of a variable.
153 ------------------------------------------------------------------- */
154
155 static int
156 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
157 {
158 char temp[128];
159 int i = 0;
160 while (v->vars[i]) {
161 if (strcmp(v->vars[i]->name,n) == 0) {
162 return (*v->vars[i]->set_attr)(p);
163 }
164 i++;
165 }
166 sprintf(temp,"C global variable %s not found.", n);
167 PyErr_SetString(PyExc_NameError,temp);
168 return 1;
169 }
170
171 statichere PyTypeObject varlinktype = {
172 /* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */
173 PyObject_HEAD_INIT(0)
174 0,
175 "varlink", /* Type name */
176 sizeof(swig_varlinkobject), /* Basic size */
177 0, /* Itemsize */
178 0, /* Deallocator */
179 (printfunc) swig_varlink_print, /* Print */
180 (getattrfunc) swig_varlink_getattr, /* get attr */
181 (setattrfunc) swig_varlink_setattr, /* Set attr */
182 0, /* tp_compare */
183 (reprfunc) swig_varlink_repr, /* tp_repr */
184 0, /* tp_as_number */
185 0, /* tp_as_mapping*/
186 0, /* tp_hash */
187 };
188
189 /* Create a variable linking object for use later */
190
191 SWIGSTATIC PyObject *
192 SWIG_newvarlink(void)
193 {
194 swig_varlinkobject *result = 0;
195 result = PyMem_NEW(swig_varlinkobject,1);
196 varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
197 result->ob_type = &varlinktype;
198 /* _Py_NewReference(result); Does not seem to be necessary */
199 result->nvars = 0;
200 result->maxvars = 64;
201 result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *));
202 result->vars[0] = 0;
203 result->ob_refcnt = 0;
204 Py_XINCREF((PyObject *) result);
205 return ((PyObject*) result);
206 }
207
208 SWIGSTATIC void
209 SWIG_addvarlink(PyObject *p, char *name,
210 PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p))
211 {
212 swig_varlinkobject *v;
213 v= (swig_varlinkobject *) p;
214
215 if (v->nvars >= v->maxvars -1) {
216 v->maxvars = 2*v->maxvars;
217 v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *));
218 if (v->vars == NULL) {
219 fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n");
220 exit(1);
221 }
222 }
223 v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar));
224 v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1);
225 strcpy(v->vars[v->nvars]->name,name);
226 v->vars[v->nvars]->get_attr = get_attr;
227 v->vars[v->nvars]->set_attr = set_attr;
228 v->nvars++;
229 v->vars[v->nvars] = 0;
230 }
231
232
233
234 /*****************************************************************************
235 * $Header$
236 *
237 * swigptr.swg
238 *
239 * This file contains supporting code for the SWIG run-time type checking
240 * mechanism. The following functions are available :
241 *
242 * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *));
243 *
244 * Registers a new type-mapping with the type-checker. origtype is the
245 * original datatype and newtype is an equivalent type. cast is optional
246 * pointer to a function to cast pointer values between types (this
247 * is typically used to cast pointers from derived classes to base classes in C++)
248 *
249 * SWIG_MakePtr(char *buffer, void *ptr, char *typestring);
250 *
251 * Makes a pointer string from a pointer and typestring. The result is returned
252 * in buffer which is assumed to hold enough space for the result.
253 *
254 * char * SWIG_GetPtr(char *buffer, void **ptr, char *type)
255 *
256 * Gets a pointer value from a string. If there is a type-mismatch, returns
257 * a character string to the received type. On success, returns NULL.
258 *
259 *
260 * You can remap these functions by making a file called "swigptr.swg" in
261 * your the same directory as the interface file you are wrapping.
262 *
263 * These functions are normally declared static, but this file can be
264 * can be used in a multi-module environment by redefining the symbol
265 * SWIGSTATIC.
266 *****************************************************************************/
267
268 #include <stdlib.h>
269
270 #ifdef SWIG_GLOBAL
271 #ifdef __cplusplus
272 #define SWIGSTATIC extern "C"
273 #else
274 #define SWIGSTATIC
275 #endif
276 #endif
277
278 #ifndef SWIGSTATIC
279 #define SWIGSTATIC static
280 #endif
281
282
283 /* SWIG pointer structure */
284
285 typedef struct SwigPtrType {
286 char *name; /* Datatype name */
287 int len; /* Length (used for optimization) */
288 void *(*cast)(void *); /* Pointer casting function */
289 struct SwigPtrType *next; /* Linked list pointer */
290 } SwigPtrType;
291
292 /* Pointer cache structure */
293
294 typedef struct {
295 int stat; /* Status (valid) bit */
296 SwigPtrType *tp; /* Pointer to type structure */
297 char name[256]; /* Given datatype name */
298 char mapped[256]; /* Equivalent name */
299 } SwigCacheType;
300
301 /* Some variables */
302
303 static int SwigPtrMax = 64; /* Max entries that can be currently held */
304 /* This value may be adjusted dynamically */
305 static int SwigPtrN = 0; /* Current number of entries */
306 static int SwigPtrSort = 0; /* Status flag indicating sort */
307 static int SwigStart[256]; /* Starting positions of types */
308
309 /* Pointer table */
310 static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */
311
312 /* Cached values */
313
314 #define SWIG_CACHESIZE 8
315 #define SWIG_CACHEMASK 0x7
316 static SwigCacheType SwigCache[SWIG_CACHESIZE];
317 static int SwigCacheIndex = 0;
318 static int SwigLastCache = 0;
319
320 /* Sort comparison function */
321 static int swigsort(const void *data1, const void *data2) {
322 SwigPtrType *d1 = (SwigPtrType *) data1;
323 SwigPtrType *d2 = (SwigPtrType *) data2;
324 return strcmp(d1->name,d2->name);
325 }
326
327 /* Binary Search function */
328 static int swigcmp(const void *key, const void *data) {
329 char *k = (char *) key;
330 SwigPtrType *d = (SwigPtrType *) data;
331 return strncmp(k,d->name,d->len);
332 }
333
334 /* Register a new datatype with the type-checker */
335
336 SWIGSTATIC
337 void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) {
338
339 int i;
340 SwigPtrType *t = 0,*t1;
341
342 /* Allocate the pointer table if necessary */
343
344 if (!SwigPtrTable) {
345 SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
346 SwigPtrN = 0;
347 }
348 /* Grow the table */
349 if (SwigPtrN >= SwigPtrMax) {
350 SwigPtrMax = 2*SwigPtrMax;
351 SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType));
352 }
353 for (i = 0; i < SwigPtrN; i++)
354 if (strcmp(SwigPtrTable[i].name,origtype) == 0) {
355 t = &SwigPtrTable[i];
356 break;
357 }
358 if (!t) {
359 t = &SwigPtrTable[SwigPtrN];
360 t->name = origtype;
361 t->len = strlen(t->name);
362 t->cast = 0;
363 t->next = 0;
364 SwigPtrN++;
365 }
366
367 /* Check for existing entry */
368
369 while (t->next) {
370 if ((strcmp(t->name,newtype) == 0)) {
371 if (cast) t->cast = cast;
372 return;
373 }
374 t = t->next;
375 }
376
377 /* Now place entry (in sorted order) */
378
379 t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType));
380 t1->name = newtype;
381 t1->len = strlen(t1->name);
382 t1->cast = cast;
383 t1->next = 0;
384 t->next = t1;
385 SwigPtrSort = 0;
386 }
387
388 /* Make a pointer value string */
389
390 SWIGSTATIC
391 void SWIG_MakePtr(char *_c, const void *_ptr, char *type) {
392 static char _hex[16] =
393 {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
394 'a', 'b', 'c', 'd', 'e', 'f'};
395 unsigned long _p, _s;
396 char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */
397 _r = _result;
398 _p = (unsigned long) _ptr;
399 if (_p > 0) {
400 while (_p > 0) {
401 _s = _p & 0xf;
402 *(_r++) = _hex[_s];
403 _p = _p >> 4;
404 }
405 *_r = '_';
406 while (_r >= _result)
407 *(_c++) = *(_r--);
408 } else {
409 strcpy (_c, "NULL");
410 }
411 if (_ptr)
412 strcpy (_c, type);
413 }
414
415 /* Define for backwards compatibility */
416
417 #define _swig_make_hex SWIG_MakePtr
418
419 /* Function for getting a pointer value */
420
421 SWIGSTATIC
422 char *SWIG_GetPtr(char *_c, void **ptr, char *_t)
423 {
424 unsigned long _p;
425 char temp_type[256];
426 char *name;
427 int i, len;
428 SwigPtrType *sp,*tp;
429 SwigCacheType *cache;
430 int start, end;
431 _p = 0;
432
433 /* Pointer values must start with leading underscore */
434 if (*_c == '_') {
435 _c++;
436 /* Extract hex value from pointer */
437 while (*_c) {
438 if ((*_c >= '0') && (*_c <= '9'))
439 _p = (_p << 4) + (*_c - '0');
440 else if ((*_c >= 'a') && (*_c <= 'f'))
441 _p = (_p << 4) + ((*_c - 'a') + 10);
442 else
443 break;
444 _c++;
445 }
446
447 if (_t) {
448 if (strcmp(_t,_c)) {
449 if (!SwigPtrSort) {
450 qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort);
451 for (i = 0; i < 256; i++) {
452 SwigStart[i] = SwigPtrN;
453 }
454 for (i = SwigPtrN-1; i >= 0; i--) {
455 SwigStart[(int) (SwigPtrTable[i].name[1])] = i;
456 }
457 for (i = 255; i >= 1; i--) {
458 if (SwigStart[i-1] > SwigStart[i])
459 SwigStart[i-1] = SwigStart[i];
460 }
461 SwigPtrSort = 1;
462 for (i = 0; i < SWIG_CACHESIZE; i++)
463 SwigCache[i].stat = 0;
464 }
465
466 /* First check cache for matches. Uses last cache value as starting point */
467 cache = &SwigCache[SwigLastCache];
468 for (i = 0; i < SWIG_CACHESIZE; i++) {
469 if (cache->stat) {
470 if (strcmp(_t,cache->name) == 0) {
471 if (strcmp(_c,cache->mapped) == 0) {
472 cache->stat++;
473 *ptr = (void *) _p;
474 if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr);
475 return (char *) 0;
476 }
477 }
478 }
479 SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK;
480 if (!SwigLastCache) cache = SwigCache;
481 else cache++;
482 }
483 /* We have a type mismatch. Will have to look through our type
484 mapping table to figure out whether or not we can accept this datatype */
485
486 start = SwigStart[(int) _t[1]];
487 end = SwigStart[(int) _t[1]+1];
488 sp = &SwigPtrTable[start];
489 while (start < end) {
490 if (swigcmp(_t,sp) == 0) break;
491 sp++;
492 start++;
493 }
494 if (start >= end) sp = 0;
495 /* Try to find a match for this */
496 if (sp) {
497 while (swigcmp(_t,sp) == 0) {
498 name = sp->name;
499 len = sp->len;
500 tp = sp->next;
501 /* Try to find entry for our given datatype */
502 while(tp) {
503 if (tp->len >= 255) {
504 return _c;
505 }
506 strcpy(temp_type,tp->name);
507 strncat(temp_type,_t+len,255-tp->len);
508 if (strcmp(_c,temp_type) == 0) {
509
510 strcpy(SwigCache[SwigCacheIndex].mapped,_c);
511 strcpy(SwigCache[SwigCacheIndex].name,_t);
512 SwigCache[SwigCacheIndex].stat = 1;
513 SwigCache[SwigCacheIndex].tp = tp;
514 SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK;
515
516 /* Get pointer value */
517 *ptr = (void *) _p;
518 if (tp->cast) *ptr = (*(tp->cast))(*ptr);
519 return (char *) 0;
520 }
521 tp = tp->next;
522 }
523 sp++;
524 /* Hmmm. Didn't find it this time */
525 }
526 }
527 /* Didn't find any sort of match for this data.
528 Get the pointer value and return the received type */
529 *ptr = (void *) _p;
530 return _c;
531 } else {
532 /* Found a match on the first try. Return pointer value */
533 *ptr = (void *) _p;
534 return (char *) 0;
535 }
536 } else {
537 /* No type specified. Good luck */
538 *ptr = (void *) _p;
539 return (char *) 0;
540 }
541 } else {
542 if (strcmp (_c, "NULL") == 0) {
543 *ptr = (void *) 0;
544 return (char *) 0;
545 }
546 *ptr = (void *) 0;
547 return _c;
548 }
549 }
550
551 /* Compatibility mode */
552
553 #define _swig_get_hex SWIG_GetPtr
554
555 #define SWIG_init initutilsc
556
557 #define SWIG_name "utilsc"
558
559 #include "helpers.h"
560 #include <wx/config.h>
561
562 static PyObject* l_output_helper(PyObject* target, PyObject* o) {
563 PyObject* o2;
564 if (!target) {
565 target = o;
566 } else if (target == Py_None) {
567 Py_DECREF(Py_None);
568 target = o;
569 } else {
570 if (!PyList_Check(target)) {
571 o2 = target;
572 target = PyList_New(0);
573 PyList_Append(target, o2);
574 Py_XDECREF(o2);
575 }
576 PyList_Append(target,o);
577 Py_XDECREF(o);
578 }
579 return target;
580 }
581
582 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
583 PyObject* o2;
584 PyObject* o3;
585
586 if (!target) {
587 target = o;
588 } else if (target == Py_None) {
589 Py_DECREF(Py_None);
590 target = o;
591 } else {
592 if (!PyTuple_Check(target)) {
593 o2 = target;
594 target = PyTuple_New(1);
595 PyTuple_SetItem(target, 0, o2);
596 }
597 o3 = PyTuple_New(1);
598 PyTuple_SetItem(o3, 0, o);
599
600 o2 = target;
601 target = PySequence_Concat(o2, o3);
602 Py_DECREF(o2);
603 Py_DECREF(o3);
604 }
605 return target;
606 }
607
608
609 extern byte* byte_LIST_helper(PyObject* source);
610 extern int* int_LIST_helper(PyObject* source);
611 extern long* long_LIST_helper(PyObject* source);
612 extern char** string_LIST_helper(PyObject* source);
613 extern wxPoint* wxPoint_LIST_helper(PyObject* source);
614 extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
615 extern wxString* wxString_LIST_helper(PyObject* source);
616 extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
617
618
619 static char* wxStringErrorMsg = "string type is required for parameter";
620
621 #ifdef SEPARATE
622 wxString wxPyEmptyStr("");
623 #endif
624
625 static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
626 PyObject* ret = PyTuple_New(3);
627 if (ret) {
628 PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
629 PyTuple_SET_ITEM(ret, 1, PyString_FromString(str));
630 PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index));
631 }
632 return ret;
633 }
634 #define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
635 static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) {
636 PyObject * _resultobj;
637 wxConfig * _result;
638 wxString * _arg0 = &wxPyEmptyStr;
639 wxString * _arg1 = &wxPyEmptyStr;
640 wxString * _arg2 = &wxPyEmptyStr;
641 wxString * _arg3 = &wxPyEmptyStr;
642 long _arg4 = 0;
643 PyObject * _obj0 = 0;
644 PyObject * _obj1 = 0;
645 PyObject * _obj2 = 0;
646 PyObject * _obj3 = 0;
647 char _ptemp[128];
648
649 self = self;
650 if(!PyArg_ParseTuple(args,"|OOOOl:new_wxConfig",&_obj0,&_obj1,&_obj2,&_obj3,&_arg4))
651 return NULL;
652 if (_obj0)
653 {
654 if (!PyString_Check(_obj0)) {
655 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
656 return NULL;
657 }
658 _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
659 }
660 if (_obj1)
661 {
662 if (!PyString_Check(_obj1)) {
663 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
664 return NULL;
665 }
666 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
667 }
668 if (_obj2)
669 {
670 if (!PyString_Check(_obj2)) {
671 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
672 return NULL;
673 }
674 _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
675 }
676 if (_obj3)
677 {
678 if (!PyString_Check(_obj3)) {
679 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
680 return NULL;
681 }
682 _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3));
683 }
684 {
685 wxPy_BEGIN_ALLOW_THREADS;
686 _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4);
687
688 wxPy_END_ALLOW_THREADS;
689 } SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p");
690 _resultobj = Py_BuildValue("s",_ptemp);
691 {
692 if (_obj0)
693 delete _arg0;
694 }
695 {
696 if (_obj1)
697 delete _arg1;
698 }
699 {
700 if (_obj2)
701 delete _arg2;
702 }
703 {
704 if (_obj3)
705 delete _arg3;
706 }
707 return _resultobj;
708 }
709
710 #define delete_wxConfig(_swigobj) (delete _swigobj)
711 static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args) {
712 PyObject * _resultobj;
713 wxConfig * _arg0;
714 char * _argc0 = 0;
715
716 self = self;
717 if(!PyArg_ParseTuple(args,"s:delete_wxConfig",&_argc0))
718 return NULL;
719 if (_argc0) {
720 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
721 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p.");
722 return NULL;
723 }
724 }
725 {
726 wxPy_BEGIN_ALLOW_THREADS;
727 delete_wxConfig(_arg0);
728
729 wxPy_END_ALLOW_THREADS;
730 } Py_INCREF(Py_None);
731 _resultobj = Py_None;
732 return _resultobj;
733 }
734
735 #define wxConfig_DontCreateOnDemand(_swigobj) (_swigobj->DontCreateOnDemand())
736 static PyObject *_wrap_wxConfig_DontCreateOnDemand(PyObject *self, PyObject *args) {
737 PyObject * _resultobj;
738 wxConfig * _arg0;
739 char * _argc0 = 0;
740
741 self = self;
742 if(!PyArg_ParseTuple(args,"s:wxConfig_DontCreateOnDemand",&_argc0))
743 return NULL;
744 if (_argc0) {
745 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
746 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DontCreateOnDemand. Expected _wxConfig_p.");
747 return NULL;
748 }
749 }
750 {
751 wxPy_BEGIN_ALLOW_THREADS;
752 wxConfig_DontCreateOnDemand(_arg0);
753
754 wxPy_END_ALLOW_THREADS;
755 } Py_INCREF(Py_None);
756 _resultobj = Py_None;
757 return _resultobj;
758 }
759
760 #define wxConfig_DeleteAll(_swigobj) (_swigobj->DeleteAll())
761 static PyObject *_wrap_wxConfig_DeleteAll(PyObject *self, PyObject *args) {
762 PyObject * _resultobj;
763 bool _result;
764 wxConfig * _arg0;
765 char * _argc0 = 0;
766
767 self = self;
768 if(!PyArg_ParseTuple(args,"s:wxConfig_DeleteAll",&_argc0))
769 return NULL;
770 if (_argc0) {
771 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
772 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteAll. Expected _wxConfig_p.");
773 return NULL;
774 }
775 }
776 {
777 wxPy_BEGIN_ALLOW_THREADS;
778 _result = (bool )wxConfig_DeleteAll(_arg0);
779
780 wxPy_END_ALLOW_THREADS;
781 } _resultobj = Py_BuildValue("i",_result);
782 return _resultobj;
783 }
784
785 #define wxConfig_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1))
786 static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args) {
787 PyObject * _resultobj;
788 bool _result;
789 wxConfig * _arg0;
790 wxString * _arg1;
791 bool _arg2 = TRUE;
792 char * _argc0 = 0;
793 PyObject * _obj1 = 0;
794 int tempbool2;
795
796 self = self;
797 if(!PyArg_ParseTuple(args,"sO|i:wxConfig_DeleteEntry",&_argc0,&_obj1,&tempbool2))
798 return NULL;
799 if (_argc0) {
800 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
801 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteEntry. Expected _wxConfig_p.");
802 return NULL;
803 }
804 }
805 {
806 if (!PyString_Check(_obj1)) {
807 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
808 return NULL;
809 }
810 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
811 }
812 _arg2 = (bool ) tempbool2;
813 {
814 wxPy_BEGIN_ALLOW_THREADS;
815 _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2);
816
817 wxPy_END_ALLOW_THREADS;
818 } _resultobj = Py_BuildValue("i",_result);
819 {
820 if (_obj1)
821 delete _arg1;
822 }
823 return _resultobj;
824 }
825
826 #define wxConfig_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0))
827 static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args) {
828 PyObject * _resultobj;
829 bool _result;
830 wxConfig * _arg0;
831 wxString * _arg1;
832 char * _argc0 = 0;
833 PyObject * _obj1 = 0;
834
835 self = self;
836 if(!PyArg_ParseTuple(args,"sO:wxConfig_DeleteGroup",&_argc0,&_obj1))
837 return NULL;
838 if (_argc0) {
839 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
840 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteGroup. Expected _wxConfig_p.");
841 return NULL;
842 }
843 }
844 {
845 if (!PyString_Check(_obj1)) {
846 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
847 return NULL;
848 }
849 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
850 }
851 {
852 wxPy_BEGIN_ALLOW_THREADS;
853 _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1);
854
855 wxPy_END_ALLOW_THREADS;
856 } _resultobj = Py_BuildValue("i",_result);
857 {
858 if (_obj1)
859 delete _arg1;
860 }
861 return _resultobj;
862 }
863
864 #define wxConfig_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0))
865 static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args) {
866 PyObject * _resultobj;
867 bool _result;
868 wxConfig * _arg0;
869 wxString * _arg1;
870 char * _argc0 = 0;
871 PyObject * _obj1 = 0;
872
873 self = self;
874 if(!PyArg_ParseTuple(args,"sO:wxConfig_Exists",&_argc0,&_obj1))
875 return NULL;
876 if (_argc0) {
877 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
878 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Exists. Expected _wxConfig_p.");
879 return NULL;
880 }
881 }
882 {
883 if (!PyString_Check(_obj1)) {
884 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
885 return NULL;
886 }
887 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
888 }
889 {
890 wxPy_BEGIN_ALLOW_THREADS;
891 _result = (bool )wxConfig_Exists(_arg0,*_arg1);
892
893 wxPy_END_ALLOW_THREADS;
894 } _resultobj = Py_BuildValue("i",_result);
895 {
896 if (_obj1)
897 delete _arg1;
898 }
899 return _resultobj;
900 }
901
902 #define wxConfig_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0))
903 static PyObject *_wrap_wxConfig_Flush(PyObject *self, PyObject *args) {
904 PyObject * _resultobj;
905 bool _result;
906 wxConfig * _arg0;
907 bool _arg1 = FALSE;
908 char * _argc0 = 0;
909 int tempbool1;
910
911 self = self;
912 if(!PyArg_ParseTuple(args,"s|i:wxConfig_Flush",&_argc0,&tempbool1))
913 return NULL;
914 if (_argc0) {
915 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
916 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Flush. Expected _wxConfig_p.");
917 return NULL;
918 }
919 }
920 _arg1 = (bool ) tempbool1;
921 {
922 wxPy_BEGIN_ALLOW_THREADS;
923 _result = (bool )wxConfig_Flush(_arg0,_arg1);
924
925 wxPy_END_ALLOW_THREADS;
926 } _resultobj = Py_BuildValue("i",_result);
927 return _resultobj;
928 }
929
930 #define wxConfig_GetAppName(_swigobj) (_swigobj->GetAppName())
931 static PyObject *_wrap_wxConfig_GetAppName(PyObject *self, PyObject *args) {
932 PyObject * _resultobj;
933 wxString * _result;
934 wxConfig * _arg0;
935 char * _argc0 = 0;
936
937 self = self;
938 if(!PyArg_ParseTuple(args,"s:wxConfig_GetAppName",&_argc0))
939 return NULL;
940 if (_argc0) {
941 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
942 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetAppName. Expected _wxConfig_p.");
943 return NULL;
944 }
945 }
946 {
947 wxPy_BEGIN_ALLOW_THREADS;
948 _result = new wxString (wxConfig_GetAppName(_arg0));
949
950 wxPy_END_ALLOW_THREADS;
951 }{
952 _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
953 }
954 {
955 delete _result;
956 }
957 return _resultobj;
958 }
959
960 static PyObject * wxConfig_GetFirstGroup(wxConfig *self) {
961 bool cont;
962 long index = 0;
963 wxString value;
964
965 cont = self->GetFirstGroup(value, index);
966 return __EnumerationHelper(cont, value, index);
967 }
968 static PyObject *_wrap_wxConfig_GetFirstGroup(PyObject *self, PyObject *args) {
969 PyObject * _resultobj;
970 PyObject * _result;
971 wxConfig * _arg0;
972 char * _argc0 = 0;
973
974 self = self;
975 if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstGroup",&_argc0))
976 return NULL;
977 if (_argc0) {
978 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
979 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstGroup. Expected _wxConfig_p.");
980 return NULL;
981 }
982 }
983 {
984 wxPy_BEGIN_ALLOW_THREADS;
985 _result = (PyObject *)wxConfig_GetFirstGroup(_arg0);
986
987 wxPy_END_ALLOW_THREADS;
988 }{
989 _resultobj = _result;
990 }
991 return _resultobj;
992 }
993
994 static PyObject * wxConfig_GetFirstEntry(wxConfig *self) {
995 bool cont;
996 long index = 0;
997 wxString value;
998
999 cont = self->GetFirstEntry(value, index);
1000 return __EnumerationHelper(cont, value, index);
1001 }
1002 static PyObject *_wrap_wxConfig_GetFirstEntry(PyObject *self, PyObject *args) {
1003 PyObject * _resultobj;
1004 PyObject * _result;
1005 wxConfig * _arg0;
1006 char * _argc0 = 0;
1007
1008 self = self;
1009 if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstEntry",&_argc0))
1010 return NULL;
1011 if (_argc0) {
1012 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1013 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstEntry. Expected _wxConfig_p.");
1014 return NULL;
1015 }
1016 }
1017 {
1018 wxPy_BEGIN_ALLOW_THREADS;
1019 _result = (PyObject *)wxConfig_GetFirstEntry(_arg0);
1020
1021 wxPy_END_ALLOW_THREADS;
1022 }{
1023 _resultobj = _result;
1024 }
1025 return _resultobj;
1026 }
1027
1028 static PyObject * wxConfig_GetNextGroup(wxConfig *self,long index) {
1029 bool cont;
1030 wxString value;
1031
1032 cont = self->GetNextGroup(value, index);
1033 return __EnumerationHelper(cont, value, index);
1034 }
1035 static PyObject *_wrap_wxConfig_GetNextGroup(PyObject *self, PyObject *args) {
1036 PyObject * _resultobj;
1037 PyObject * _result;
1038 wxConfig * _arg0;
1039 long _arg1;
1040 char * _argc0 = 0;
1041
1042 self = self;
1043 if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextGroup",&_argc0,&_arg1))
1044 return NULL;
1045 if (_argc0) {
1046 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1047 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextGroup. Expected _wxConfig_p.");
1048 return NULL;
1049 }
1050 }
1051 {
1052 wxPy_BEGIN_ALLOW_THREADS;
1053 _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1);
1054
1055 wxPy_END_ALLOW_THREADS;
1056 }{
1057 _resultobj = _result;
1058 }
1059 return _resultobj;
1060 }
1061
1062 static PyObject * wxConfig_GetNextEntry(wxConfig *self,long index) {
1063 bool cont;
1064 wxString value;
1065
1066 cont = self->GetNextEntry(value, index);
1067 return __EnumerationHelper(cont, value, index);
1068 }
1069 static PyObject *_wrap_wxConfig_GetNextEntry(PyObject *self, PyObject *args) {
1070 PyObject * _resultobj;
1071 PyObject * _result;
1072 wxConfig * _arg0;
1073 long _arg1;
1074 char * _argc0 = 0;
1075
1076 self = self;
1077 if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextEntry",&_argc0,&_arg1))
1078 return NULL;
1079 if (_argc0) {
1080 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1081 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextEntry. Expected _wxConfig_p.");
1082 return NULL;
1083 }
1084 }
1085 {
1086 wxPy_BEGIN_ALLOW_THREADS;
1087 _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1);
1088
1089 wxPy_END_ALLOW_THREADS;
1090 }{
1091 _resultobj = _result;
1092 }
1093 return _resultobj;
1094 }
1095
1096 #define wxConfig_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0))
1097 static PyObject *_wrap_wxConfig_GetNumberOfEntries(PyObject *self, PyObject *args) {
1098 PyObject * _resultobj;
1099 int _result;
1100 wxConfig * _arg0;
1101 bool _arg1 = FALSE;
1102 char * _argc0 = 0;
1103 int tempbool1;
1104
1105 self = self;
1106 if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfEntries",&_argc0,&tempbool1))
1107 return NULL;
1108 if (_argc0) {
1109 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1110 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfEntries. Expected _wxConfig_p.");
1111 return NULL;
1112 }
1113 }
1114 _arg1 = (bool ) tempbool1;
1115 {
1116 wxPy_BEGIN_ALLOW_THREADS;
1117 _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1);
1118
1119 wxPy_END_ALLOW_THREADS;
1120 } _resultobj = Py_BuildValue("i",_result);
1121 return _resultobj;
1122 }
1123
1124 #define wxConfig_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0))
1125 static PyObject *_wrap_wxConfig_GetNumberOfGroups(PyObject *self, PyObject *args) {
1126 PyObject * _resultobj;
1127 int _result;
1128 wxConfig * _arg0;
1129 bool _arg1 = FALSE;
1130 char * _argc0 = 0;
1131 int tempbool1;
1132
1133 self = self;
1134 if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfGroups",&_argc0,&tempbool1))
1135 return NULL;
1136 if (_argc0) {
1137 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1138 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfGroups. Expected _wxConfig_p.");
1139 return NULL;
1140 }
1141 }
1142 _arg1 = (bool ) tempbool1;
1143 {
1144 wxPy_BEGIN_ALLOW_THREADS;
1145 _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1);
1146
1147 wxPy_END_ALLOW_THREADS;
1148 } _resultobj = Py_BuildValue("i",_result);
1149 return _resultobj;
1150 }
1151
1152 #define wxConfig_GetPath(_swigobj) (_swigobj->GetPath())
1153 static PyObject *_wrap_wxConfig_GetPath(PyObject *self, PyObject *args) {
1154 PyObject * _resultobj;
1155 wxString * _result;
1156 wxConfig * _arg0;
1157 char * _argc0 = 0;
1158
1159 self = self;
1160 if(!PyArg_ParseTuple(args,"s:wxConfig_GetPath",&_argc0))
1161 return NULL;
1162 if (_argc0) {
1163 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1164 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetPath. Expected _wxConfig_p.");
1165 return NULL;
1166 }
1167 }
1168 {
1169 wxPy_BEGIN_ALLOW_THREADS;
1170 _result = new wxString (wxConfig_GetPath(_arg0));
1171
1172 wxPy_END_ALLOW_THREADS;
1173 }{
1174 _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
1175 }
1176 {
1177 delete _result;
1178 }
1179 return _resultobj;
1180 }
1181
1182 #define wxConfig_GetVendorName(_swigobj) (_swigobj->GetVendorName())
1183 static PyObject *_wrap_wxConfig_GetVendorName(PyObject *self, PyObject *args) {
1184 PyObject * _resultobj;
1185 wxString * _result;
1186 wxConfig * _arg0;
1187 char * _argc0 = 0;
1188
1189 self = self;
1190 if(!PyArg_ParseTuple(args,"s:wxConfig_GetVendorName",&_argc0))
1191 return NULL;
1192 if (_argc0) {
1193 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1194 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetVendorName. Expected _wxConfig_p.");
1195 return NULL;
1196 }
1197 }
1198 {
1199 wxPy_BEGIN_ALLOW_THREADS;
1200 _result = new wxString (wxConfig_GetVendorName(_arg0));
1201
1202 wxPy_END_ALLOW_THREADS;
1203 }{
1204 _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
1205 }
1206 {
1207 delete _result;
1208 }
1209 return _resultobj;
1210 }
1211
1212 #define wxConfig_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0))
1213 static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args) {
1214 PyObject * _resultobj;
1215 bool _result;
1216 wxConfig * _arg0;
1217 wxString * _arg1;
1218 char * _argc0 = 0;
1219 PyObject * _obj1 = 0;
1220
1221 self = self;
1222 if(!PyArg_ParseTuple(args,"sO:wxConfig_HasEntry",&_argc0,&_obj1))
1223 return NULL;
1224 if (_argc0) {
1225 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1226 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasEntry. Expected _wxConfig_p.");
1227 return NULL;
1228 }
1229 }
1230 {
1231 if (!PyString_Check(_obj1)) {
1232 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1233 return NULL;
1234 }
1235 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1236 }
1237 {
1238 wxPy_BEGIN_ALLOW_THREADS;
1239 _result = (bool )wxConfig_HasEntry(_arg0,*_arg1);
1240
1241 wxPy_END_ALLOW_THREADS;
1242 } _resultobj = Py_BuildValue("i",_result);
1243 {
1244 if (_obj1)
1245 delete _arg1;
1246 }
1247 return _resultobj;
1248 }
1249
1250 #define wxConfig_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0))
1251 static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args) {
1252 PyObject * _resultobj;
1253 bool _result;
1254 wxConfig * _arg0;
1255 wxString * _arg1;
1256 char * _argc0 = 0;
1257 PyObject * _obj1 = 0;
1258
1259 self = self;
1260 if(!PyArg_ParseTuple(args,"sO:wxConfig_HasGroup",&_argc0,&_obj1))
1261 return NULL;
1262 if (_argc0) {
1263 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1264 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasGroup. Expected _wxConfig_p.");
1265 return NULL;
1266 }
1267 }
1268 {
1269 if (!PyString_Check(_obj1)) {
1270 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1271 return NULL;
1272 }
1273 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1274 }
1275 {
1276 wxPy_BEGIN_ALLOW_THREADS;
1277 _result = (bool )wxConfig_HasGroup(_arg0,*_arg1);
1278
1279 wxPy_END_ALLOW_THREADS;
1280 } _resultobj = Py_BuildValue("i",_result);
1281 {
1282 if (_obj1)
1283 delete _arg1;
1284 }
1285 return _resultobj;
1286 }
1287
1288 #define wxConfig_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars())
1289 static PyObject *_wrap_wxConfig_IsExpandingEnvVars(PyObject *self, PyObject *args) {
1290 PyObject * _resultobj;
1291 bool _result;
1292 wxConfig * _arg0;
1293 char * _argc0 = 0;
1294
1295 self = self;
1296 if(!PyArg_ParseTuple(args,"s:wxConfig_IsExpandingEnvVars",&_argc0))
1297 return NULL;
1298 if (_argc0) {
1299 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1300 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsExpandingEnvVars. Expected _wxConfig_p.");
1301 return NULL;
1302 }
1303 }
1304 {
1305 wxPy_BEGIN_ALLOW_THREADS;
1306 _result = (bool )wxConfig_IsExpandingEnvVars(_arg0);
1307
1308 wxPy_END_ALLOW_THREADS;
1309 } _resultobj = Py_BuildValue("i",_result);
1310 return _resultobj;
1311 }
1312
1313 #define wxConfig_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults())
1314 static PyObject *_wrap_wxConfig_IsRecordingDefaults(PyObject *self, PyObject *args) {
1315 PyObject * _resultobj;
1316 bool _result;
1317 wxConfig * _arg0;
1318 char * _argc0 = 0;
1319
1320 self = self;
1321 if(!PyArg_ParseTuple(args,"s:wxConfig_IsRecordingDefaults",&_argc0))
1322 return NULL;
1323 if (_argc0) {
1324 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1325 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsRecordingDefaults. Expected _wxConfig_p.");
1326 return NULL;
1327 }
1328 }
1329 {
1330 wxPy_BEGIN_ALLOW_THREADS;
1331 _result = (bool )wxConfig_IsRecordingDefaults(_arg0);
1332
1333 wxPy_END_ALLOW_THREADS;
1334 } _resultobj = Py_BuildValue("i",_result);
1335 return _resultobj;
1336 }
1337
1338 #define wxConfig_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1))
1339 static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args) {
1340 PyObject * _resultobj;
1341 wxString * _result;
1342 wxConfig * _arg0;
1343 wxString * _arg1;
1344 wxString * _arg2 = &wxPyEmptyStr;
1345 char * _argc0 = 0;
1346 PyObject * _obj1 = 0;
1347 PyObject * _obj2 = 0;
1348
1349 self = self;
1350 if(!PyArg_ParseTuple(args,"sO|O:wxConfig_Read",&_argc0,&_obj1,&_obj2))
1351 return NULL;
1352 if (_argc0) {
1353 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1354 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Read. Expected _wxConfig_p.");
1355 return NULL;
1356 }
1357 }
1358 {
1359 if (!PyString_Check(_obj1)) {
1360 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1361 return NULL;
1362 }
1363 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1364 }
1365 if (_obj2)
1366 {
1367 if (!PyString_Check(_obj2)) {
1368 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1369 return NULL;
1370 }
1371 _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
1372 }
1373 {
1374 wxPy_BEGIN_ALLOW_THREADS;
1375 _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2));
1376
1377 wxPy_END_ALLOW_THREADS;
1378 }{
1379 _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
1380 }
1381 {
1382 if (_obj1)
1383 delete _arg1;
1384 }
1385 {
1386 if (_obj2)
1387 delete _arg2;
1388 }
1389 {
1390 delete _result;
1391 }
1392 return _resultobj;
1393 }
1394
1395 #define wxConfig_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1))
1396 static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args) {
1397 PyObject * _resultobj;
1398 long _result;
1399 wxConfig * _arg0;
1400 wxString * _arg1;
1401 long _arg2 = 0;
1402 char * _argc0 = 0;
1403 PyObject * _obj1 = 0;
1404
1405 self = self;
1406 if(!PyArg_ParseTuple(args,"sO|l:wxConfig_ReadInt",&_argc0,&_obj1,&_arg2))
1407 return NULL;
1408 if (_argc0) {
1409 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1410 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadInt. Expected _wxConfig_p.");
1411 return NULL;
1412 }
1413 }
1414 {
1415 if (!PyString_Check(_obj1)) {
1416 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1417 return NULL;
1418 }
1419 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1420 }
1421 {
1422 wxPy_BEGIN_ALLOW_THREADS;
1423 _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2);
1424
1425 wxPy_END_ALLOW_THREADS;
1426 } _resultobj = Py_BuildValue("l",_result);
1427 {
1428 if (_obj1)
1429 delete _arg1;
1430 }
1431 return _resultobj;
1432 }
1433
1434 #define wxConfig_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1))
1435 static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args) {
1436 PyObject * _resultobj;
1437 double _result;
1438 wxConfig * _arg0;
1439 wxString * _arg1;
1440 double _arg2 = 0.0;
1441 char * _argc0 = 0;
1442 PyObject * _obj1 = 0;
1443
1444 self = self;
1445 if(!PyArg_ParseTuple(args,"sO|d:wxConfig_ReadFloat",&_argc0,&_obj1,&_arg2))
1446 return NULL;
1447 if (_argc0) {
1448 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1449 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadFloat. Expected _wxConfig_p.");
1450 return NULL;
1451 }
1452 }
1453 {
1454 if (!PyString_Check(_obj1)) {
1455 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1456 return NULL;
1457 }
1458 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1459 }
1460 {
1461 wxPy_BEGIN_ALLOW_THREADS;
1462 _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2);
1463
1464 wxPy_END_ALLOW_THREADS;
1465 } _resultobj = Py_BuildValue("d",_result);
1466 {
1467 if (_obj1)
1468 delete _arg1;
1469 }
1470 return _resultobj;
1471 }
1472
1473 #define wxConfig_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0))
1474 static PyObject *_wrap_wxConfig_SetExpandEnvVars(PyObject *self, PyObject *args) {
1475 PyObject * _resultobj;
1476 wxConfig * _arg0;
1477 bool _arg1 = TRUE;
1478 char * _argc0 = 0;
1479 int tempbool1;
1480
1481 self = self;
1482 if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetExpandEnvVars",&_argc0,&tempbool1))
1483 return NULL;
1484 if (_argc0) {
1485 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1486 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetExpandEnvVars. Expected _wxConfig_p.");
1487 return NULL;
1488 }
1489 }
1490 _arg1 = (bool ) tempbool1;
1491 {
1492 wxPy_BEGIN_ALLOW_THREADS;
1493 wxConfig_SetExpandEnvVars(_arg0,_arg1);
1494
1495 wxPy_END_ALLOW_THREADS;
1496 } Py_INCREF(Py_None);
1497 _resultobj = Py_None;
1498 return _resultobj;
1499 }
1500
1501 #define wxConfig_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0))
1502 static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args) {
1503 PyObject * _resultobj;
1504 wxConfig * _arg0;
1505 wxString * _arg1;
1506 char * _argc0 = 0;
1507 PyObject * _obj1 = 0;
1508
1509 self = self;
1510 if(!PyArg_ParseTuple(args,"sO:wxConfig_SetPath",&_argc0,&_obj1))
1511 return NULL;
1512 if (_argc0) {
1513 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1514 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetPath. Expected _wxConfig_p.");
1515 return NULL;
1516 }
1517 }
1518 {
1519 if (!PyString_Check(_obj1)) {
1520 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1521 return NULL;
1522 }
1523 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1524 }
1525 {
1526 wxPy_BEGIN_ALLOW_THREADS;
1527 wxConfig_SetPath(_arg0,*_arg1);
1528
1529 wxPy_END_ALLOW_THREADS;
1530 } Py_INCREF(Py_None);
1531 _resultobj = Py_None;
1532 {
1533 if (_obj1)
1534 delete _arg1;
1535 }
1536 return _resultobj;
1537 }
1538
1539 #define wxConfig_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0))
1540 static PyObject *_wrap_wxConfig_SetRecordDefaults(PyObject *self, PyObject *args) {
1541 PyObject * _resultobj;
1542 wxConfig * _arg0;
1543 bool _arg1 = TRUE;
1544 char * _argc0 = 0;
1545 int tempbool1;
1546
1547 self = self;
1548 if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetRecordDefaults",&_argc0,&tempbool1))
1549 return NULL;
1550 if (_argc0) {
1551 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1552 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetRecordDefaults. Expected _wxConfig_p.");
1553 return NULL;
1554 }
1555 }
1556 _arg1 = (bool ) tempbool1;
1557 {
1558 wxPy_BEGIN_ALLOW_THREADS;
1559 wxConfig_SetRecordDefaults(_arg0,_arg1);
1560
1561 wxPy_END_ALLOW_THREADS;
1562 } Py_INCREF(Py_None);
1563 _resultobj = Py_None;
1564 return _resultobj;
1565 }
1566
1567 #define wxConfig_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1))
1568 static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args) {
1569 PyObject * _resultobj;
1570 bool _result;
1571 wxConfig * _arg0;
1572 wxString * _arg1;
1573 wxString * _arg2;
1574 char * _argc0 = 0;
1575 PyObject * _obj1 = 0;
1576 PyObject * _obj2 = 0;
1577
1578 self = self;
1579 if(!PyArg_ParseTuple(args,"sOO:wxConfig_Write",&_argc0,&_obj1,&_obj2))
1580 return NULL;
1581 if (_argc0) {
1582 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1583 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Write. Expected _wxConfig_p.");
1584 return NULL;
1585 }
1586 }
1587 {
1588 if (!PyString_Check(_obj1)) {
1589 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1590 return NULL;
1591 }
1592 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1593 }
1594 {
1595 if (!PyString_Check(_obj2)) {
1596 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1597 return NULL;
1598 }
1599 _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
1600 }
1601 {
1602 wxPy_BEGIN_ALLOW_THREADS;
1603 _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2);
1604
1605 wxPy_END_ALLOW_THREADS;
1606 } _resultobj = Py_BuildValue("i",_result);
1607 {
1608 if (_obj1)
1609 delete _arg1;
1610 }
1611 {
1612 if (_obj2)
1613 delete _arg2;
1614 }
1615 return _resultobj;
1616 }
1617
1618 #define wxConfig_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1))
1619 static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args) {
1620 PyObject * _resultobj;
1621 bool _result;
1622 wxConfig * _arg0;
1623 wxString * _arg1;
1624 long _arg2;
1625 char * _argc0 = 0;
1626 PyObject * _obj1 = 0;
1627
1628 self = self;
1629 if(!PyArg_ParseTuple(args,"sOl:wxConfig_WriteInt",&_argc0,&_obj1,&_arg2))
1630 return NULL;
1631 if (_argc0) {
1632 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1633 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteInt. Expected _wxConfig_p.");
1634 return NULL;
1635 }
1636 }
1637 {
1638 if (!PyString_Check(_obj1)) {
1639 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1640 return NULL;
1641 }
1642 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1643 }
1644 {
1645 wxPy_BEGIN_ALLOW_THREADS;
1646 _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2);
1647
1648 wxPy_END_ALLOW_THREADS;
1649 } _resultobj = Py_BuildValue("i",_result);
1650 {
1651 if (_obj1)
1652 delete _arg1;
1653 }
1654 return _resultobj;
1655 }
1656
1657 #define wxConfig_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1))
1658 static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args) {
1659 PyObject * _resultobj;
1660 bool _result;
1661 wxConfig * _arg0;
1662 wxString * _arg1;
1663 double _arg2;
1664 char * _argc0 = 0;
1665 PyObject * _obj1 = 0;
1666
1667 self = self;
1668 if(!PyArg_ParseTuple(args,"sOd:wxConfig_WriteFloat",&_argc0,&_obj1,&_arg2))
1669 return NULL;
1670 if (_argc0) {
1671 if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) {
1672 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteFloat. Expected _wxConfig_p.");
1673 return NULL;
1674 }
1675 }
1676 {
1677 if (!PyString_Check(_obj1)) {
1678 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1679 return NULL;
1680 }
1681 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
1682 }
1683 {
1684 wxPy_BEGIN_ALLOW_THREADS;
1685 _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2);
1686
1687 wxPy_END_ALLOW_THREADS;
1688 } _resultobj = Py_BuildValue("i",_result);
1689 {
1690 if (_obj1)
1691 delete _arg1;
1692 }
1693 return _resultobj;
1694 }
1695
1696 static PyMethodDef utilscMethods[] = {
1697 { "wxConfig_WriteFloat", _wrap_wxConfig_WriteFloat, 1 },
1698 { "wxConfig_WriteInt", _wrap_wxConfig_WriteInt, 1 },
1699 { "wxConfig_Write", _wrap_wxConfig_Write, 1 },
1700 { "wxConfig_SetRecordDefaults", _wrap_wxConfig_SetRecordDefaults, 1 },
1701 { "wxConfig_SetPath", _wrap_wxConfig_SetPath, 1 },
1702 { "wxConfig_SetExpandEnvVars", _wrap_wxConfig_SetExpandEnvVars, 1 },
1703 { "wxConfig_ReadFloat", _wrap_wxConfig_ReadFloat, 1 },
1704 { "wxConfig_ReadInt", _wrap_wxConfig_ReadInt, 1 },
1705 { "wxConfig_Read", _wrap_wxConfig_Read, 1 },
1706 { "wxConfig_IsRecordingDefaults", _wrap_wxConfig_IsRecordingDefaults, 1 },
1707 { "wxConfig_IsExpandingEnvVars", _wrap_wxConfig_IsExpandingEnvVars, 1 },
1708 { "wxConfig_HasGroup", _wrap_wxConfig_HasGroup, 1 },
1709 { "wxConfig_HasEntry", _wrap_wxConfig_HasEntry, 1 },
1710 { "wxConfig_GetVendorName", _wrap_wxConfig_GetVendorName, 1 },
1711 { "wxConfig_GetPath", _wrap_wxConfig_GetPath, 1 },
1712 { "wxConfig_GetNumberOfGroups", _wrap_wxConfig_GetNumberOfGroups, 1 },
1713 { "wxConfig_GetNumberOfEntries", _wrap_wxConfig_GetNumberOfEntries, 1 },
1714 { "wxConfig_GetNextEntry", _wrap_wxConfig_GetNextEntry, 1 },
1715 { "wxConfig_GetNextGroup", _wrap_wxConfig_GetNextGroup, 1 },
1716 { "wxConfig_GetFirstEntry", _wrap_wxConfig_GetFirstEntry, 1 },
1717 { "wxConfig_GetFirstGroup", _wrap_wxConfig_GetFirstGroup, 1 },
1718 { "wxConfig_GetAppName", _wrap_wxConfig_GetAppName, 1 },
1719 { "wxConfig_Flush", _wrap_wxConfig_Flush, 1 },
1720 { "wxConfig_Exists", _wrap_wxConfig_Exists, 1 },
1721 { "wxConfig_DeleteGroup", _wrap_wxConfig_DeleteGroup, 1 },
1722 { "wxConfig_DeleteEntry", _wrap_wxConfig_DeleteEntry, 1 },
1723 { "wxConfig_DeleteAll", _wrap_wxConfig_DeleteAll, 1 },
1724 { "wxConfig_DontCreateOnDemand", _wrap_wxConfig_DontCreateOnDemand, 1 },
1725 { "delete_wxConfig", _wrap_delete_wxConfig, 1 },
1726 { "new_wxConfig", _wrap_new_wxConfig, 1 },
1727 { NULL, NULL }
1728 };
1729 static PyObject *SWIG_globals;
1730 #ifdef __cplusplus
1731 extern "C"
1732 #endif
1733 SWIGEXPORT(void,initutilsc)() {
1734 PyObject *m, *d;
1735 SWIG_globals = SWIG_newvarlink();
1736 m = Py_InitModule("utilsc", utilscMethods);
1737 d = PyModule_GetDict(m);
1738
1739
1740 wxClassInfo::CleanUpClasses();
1741 wxClassInfo::InitializeClasses();
1742
1743 /*
1744 * These are the pointer type-equivalency mappings.
1745 * (Used by the SWIG pointer type-checker).
1746 */
1747 SWIG_RegisterMapping("_signed_long","_long",0);
1748 SWIG_RegisterMapping("_long","_unsigned_long",0);
1749 SWIG_RegisterMapping("_long","_signed_long",0);
1750 SWIG_RegisterMapping("_wxConfig","_class_wxConfig",0);
1751 SWIG_RegisterMapping("_unsigned_long","_long",0);
1752 SWIG_RegisterMapping("_signed_int","_int",0);
1753 SWIG_RegisterMapping("_unsigned_short","_short",0);
1754 SWIG_RegisterMapping("_signed_short","_short",0);
1755 SWIG_RegisterMapping("_unsigned_int","_int",0);
1756 SWIG_RegisterMapping("_short","_unsigned_short",0);
1757 SWIG_RegisterMapping("_short","_signed_short",0);
1758 SWIG_RegisterMapping("_int","_unsigned_int",0);
1759 SWIG_RegisterMapping("_int","_signed_int",0);
1760 SWIG_RegisterMapping("_class_wxConfig","_wxConfig",0);
1761 }