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