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