]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp
memory dc must have bitmap selected into it before it can be used for measuring
[wxWidgets.git] / wxPython / contrib / glcanvas / msw / glcanvas_wrap.cpp
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.29
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11 #define SWIGPYTHON
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13
14 #ifdef __cplusplus
15 template<class T> class SwigValueWrapper {
16 T *tt;
17 public:
18 SwigValueWrapper() : tt(0) { }
19 SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
20 SwigValueWrapper(const T& t) : tt(new T(t)) { }
21 ~SwigValueWrapper() { delete tt; }
22 SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
23 operator T&() const { return *tt; }
24 T *operator&() { return tt; }
25 private:
26 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
27 };
28 #endif
29
30 /* -----------------------------------------------------------------------------
31 * This section contains generic SWIG labels for method/variable
32 * declarations/attributes, and other compiler dependent labels.
33 * ----------------------------------------------------------------------------- */
34
35 /* template workaround for compilers that cannot correctly implement the C++ standard */
36 #ifndef SWIGTEMPLATEDISAMBIGUATOR
37 # if defined(__SUNPRO_CC)
38 # if (__SUNPRO_CC <= 0x560)
39 # define SWIGTEMPLATEDISAMBIGUATOR template
40 # else
41 # define SWIGTEMPLATEDISAMBIGUATOR
42 # endif
43 # else
44 # define SWIGTEMPLATEDISAMBIGUATOR
45 # endif
46 #endif
47
48 /* inline attribute */
49 #ifndef SWIGINLINE
50 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
51 # define SWIGINLINE inline
52 # else
53 # define SWIGINLINE
54 # endif
55 #endif
56
57 /* attribute recognised by some compilers to avoid 'unused' warnings */
58 #ifndef SWIGUNUSED
59 # if defined(__GNUC__)
60 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
61 # define SWIGUNUSED __attribute__ ((__unused__))
62 # else
63 # define SWIGUNUSED
64 # endif
65 # elif defined(__ICC)
66 # define SWIGUNUSED __attribute__ ((__unused__))
67 # else
68 # define SWIGUNUSED
69 # endif
70 #endif
71
72 #ifndef SWIGUNUSEDPARM
73 # ifdef __cplusplus
74 # define SWIGUNUSEDPARM(p)
75 # else
76 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
77 # endif
78 #endif
79
80 /* internal SWIG method */
81 #ifndef SWIGINTERN
82 # define SWIGINTERN static SWIGUNUSED
83 #endif
84
85 /* internal inline SWIG method */
86 #ifndef SWIGINTERNINLINE
87 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
88 #endif
89
90 /* exporting methods */
91 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
92 # ifndef GCC_HASCLASSVISIBILITY
93 # define GCC_HASCLASSVISIBILITY
94 # endif
95 #endif
96
97 #ifndef SWIGEXPORT
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 # if defined(STATIC_LINKED)
100 # define SWIGEXPORT
101 # else
102 # define SWIGEXPORT __declspec(dllexport)
103 # endif
104 # else
105 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
106 # define SWIGEXPORT __attribute__ ((visibility("default")))
107 # else
108 # define SWIGEXPORT
109 # endif
110 # endif
111 #endif
112
113 /* calling conventions for Windows */
114 #ifndef SWIGSTDCALL
115 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
116 # define SWIGSTDCALL __stdcall
117 # else
118 # define SWIGSTDCALL
119 # endif
120 #endif
121
122 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
123 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
124 # define _CRT_SECURE_NO_DEPRECATE
125 #endif
126
127
128 /* Python.h has to appear first */
129 #include <Python.h>
130
131 /* -----------------------------------------------------------------------------
132 * swigrun.swg
133 *
134 * This file contains generic CAPI SWIG runtime support for pointer
135 * type checking.
136 * ----------------------------------------------------------------------------- */
137
138 /* This should only be incremented when either the layout of swig_type_info changes,
139 or for whatever reason, the runtime changes incompatibly */
140 #define SWIG_RUNTIME_VERSION "2"
141
142 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
143 #ifdef SWIG_TYPE_TABLE
144 # define SWIG_QUOTE_STRING(x) #x
145 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
146 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
147 #else
148 # define SWIG_TYPE_TABLE_NAME
149 #endif
150
151 /*
152 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
153 creating a static or dynamic library from the swig runtime code.
154 In 99.9% of the cases, swig just needs to declare them as 'static'.
155
156 But only do this if is strictly necessary, ie, if you have problems
157 with your compiler or so.
158 */
159
160 #ifndef SWIGRUNTIME
161 # define SWIGRUNTIME SWIGINTERN
162 #endif
163
164 #ifndef SWIGRUNTIMEINLINE
165 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
166 #endif
167
168 /* Generic buffer size */
169 #ifndef SWIG_BUFFER_SIZE
170 # define SWIG_BUFFER_SIZE 1024
171 #endif
172
173 /* Flags for pointer conversions */
174 #define SWIG_POINTER_DISOWN 0x1
175
176 /* Flags for new pointer objects */
177 #define SWIG_POINTER_OWN 0x1
178
179
180 /*
181 Flags/methods for returning states.
182
183 The swig conversion methods, as ConvertPtr, return and integer
184 that tells if the conversion was successful or not. And if not,
185 an error code can be returned (see swigerrors.swg for the codes).
186
187 Use the following macros/flags to set or process the returning
188 states.
189
190 In old swig versions, you usually write code as:
191
192 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
193 // success code
194 } else {
195 //fail code
196 }
197
198 Now you can be more explicit as:
199
200 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
201 if (SWIG_IsOK(res)) {
202 // success code
203 } else {
204 // fail code
205 }
206
207 that seems to be the same, but now you can also do
208
209 Type *ptr;
210 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
211 if (SWIG_IsOK(res)) {
212 // success code
213 if (SWIG_IsNewObj(res) {
214 ...
215 delete *ptr;
216 } else {
217 ...
218 }
219 } else {
220 // fail code
221 }
222
223 I.e., now SWIG_ConvertPtr can return new objects and you can
224 identify the case and take care of the deallocation. Of course that
225 requires also to SWIG_ConvertPtr to return new result values, as
226
227 int SWIG_ConvertPtr(obj, ptr,...) {
228 if (<obj is ok>) {
229 if (<need new object>) {
230 *ptr = <ptr to new allocated object>;
231 return SWIG_NEWOBJ;
232 } else {
233 *ptr = <ptr to old object>;
234 return SWIG_OLDOBJ;
235 }
236 } else {
237 return SWIG_BADOBJ;
238 }
239 }
240
241 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
242 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
243 swig errors code.
244
245 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
246 allows to return the 'cast rank', for example, if you have this
247
248 int food(double)
249 int fooi(int);
250
251 and you call
252
253 food(1) // cast rank '1' (1 -> 1.0)
254 fooi(1) // cast rank '0'
255
256 just use the SWIG_AddCast()/SWIG_CheckState()
257
258
259 */
260 #define SWIG_OK (0)
261 #define SWIG_ERROR (-1)
262 #define SWIG_IsOK(r) (r >= 0)
263 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
264
265 /* The CastRankLimit says how many bits are used for the cast rank */
266 #define SWIG_CASTRANKLIMIT (1 << 8)
267 /* The NewMask denotes the object was created (using new/malloc) */
268 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
269 /* The TmpMask is for in/out typemaps that use temporal objects */
270 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
271 /* Simple returning values */
272 #define SWIG_BADOBJ (SWIG_ERROR)
273 #define SWIG_OLDOBJ (SWIG_OK)
274 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
275 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
276 /* Check, add and del mask methods */
277 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
278 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
279 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
280 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
281 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
282 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
283
284
285 /* Cast-Rank Mode */
286 #if defined(SWIG_CASTRANK_MODE)
287 # ifndef SWIG_TypeRank
288 # define SWIG_TypeRank unsigned long
289 # endif
290 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
291 # define SWIG_MAXCASTRANK (2)
292 # endif
293 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
294 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
295 SWIGINTERNINLINE int SWIG_AddCast(int r) {
296 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
297 }
298 SWIGINTERNINLINE int SWIG_CheckState(int r) {
299 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
300 }
301 #else /* no cast-rank mode */
302 # define SWIG_AddCast
303 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
304 #endif
305
306
307
308
309 #include <string.h>
310
311 #ifdef __cplusplus
312 extern "C" {
313 #endif
314
315 typedef void *(*swig_converter_func)(void *);
316 typedef struct swig_type_info *(*swig_dycast_func)(void **);
317
318 /* Structure to store inforomation on one type */
319 typedef struct swig_type_info {
320 const char *name; /* mangled name of this type */
321 const char *str; /* human readable name of this type */
322 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
323 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
324 void *clientdata; /* language specific type data */
325 int owndata; /* flag if the structure owns the clientdata */
326 } swig_type_info;
327
328 /* Structure to store a type and conversion function used for casting */
329 typedef struct swig_cast_info {
330 swig_type_info *type; /* pointer to type that is equivalent to this type */
331 swig_converter_func converter; /* function to cast the void pointers */
332 struct swig_cast_info *next; /* pointer to next cast in linked list */
333 struct swig_cast_info *prev; /* pointer to the previous cast */
334 } swig_cast_info;
335
336 /* Structure used to store module information
337 * Each module generates one structure like this, and the runtime collects
338 * all of these structures and stores them in a circularly linked list.*/
339 typedef struct swig_module_info {
340 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
341 size_t size; /* Number of types in this module */
342 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
343 swig_type_info **type_initial; /* Array of initially generated type structures */
344 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
345 void *clientdata; /* Language specific module data */
346 } swig_module_info;
347
348 /*
349 Compare two type names skipping the space characters, therefore
350 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
351
352 Return 0 when the two name types are equivalent, as in
353 strncmp, but skipping ' '.
354 */
355 SWIGRUNTIME int
356 SWIG_TypeNameComp(const char *f1, const char *l1,
357 const char *f2, const char *l2) {
358 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
359 while ((*f1 == ' ') && (f1 != l1)) ++f1;
360 while ((*f2 == ' ') && (f2 != l2)) ++f2;
361 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
362 }
363 return (l1 - f1) - (l2 - f2);
364 }
365
366 /*
367 Check type equivalence in a name list like <name1>|<name2>|...
368 Return 0 if not equal, 1 if equal
369 */
370 SWIGRUNTIME int
371 SWIG_TypeEquiv(const char *nb, const char *tb) {
372 int equiv = 0;
373 const char* te = tb + strlen(tb);
374 const char* ne = nb;
375 while (!equiv && *ne) {
376 for (nb = ne; *ne; ++ne) {
377 if (*ne == '|') break;
378 }
379 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
380 if (*ne) ++ne;
381 }
382 return equiv;
383 }
384
385 /*
386 Check type equivalence in a name list like <name1>|<name2>|...
387 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
388 */
389 SWIGRUNTIME int
390 SWIG_TypeCompare(const char *nb, const char *tb) {
391 int equiv = 0;
392 const char* te = tb + strlen(tb);
393 const char* ne = nb;
394 while (!equiv && *ne) {
395 for (nb = ne; *ne; ++ne) {
396 if (*ne == '|') break;
397 }
398 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
399 if (*ne) ++ne;
400 }
401 return equiv;
402 }
403
404
405 /* think of this as a c++ template<> or a scheme macro */
406 #define SWIG_TypeCheck_Template(comparison, ty) \
407 if (ty) { \
408 swig_cast_info *iter = ty->cast; \
409 while (iter) { \
410 if (comparison) { \
411 if (iter == ty->cast) return iter; \
412 /* Move iter to the top of the linked list */ \
413 iter->prev->next = iter->next; \
414 if (iter->next) \
415 iter->next->prev = iter->prev; \
416 iter->next = ty->cast; \
417 iter->prev = 0; \
418 if (ty->cast) ty->cast->prev = iter; \
419 ty->cast = iter; \
420 return iter; \
421 } \
422 iter = iter->next; \
423 } \
424 } \
425 return 0
426
427 /*
428 Check the typename
429 */
430 SWIGRUNTIME swig_cast_info *
431 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
432 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
433 }
434
435 /* Same as previous function, except strcmp is replaced with a pointer comparison */
436 SWIGRUNTIME swig_cast_info *
437 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
438 SWIG_TypeCheck_Template(iter->type == from, into);
439 }
440
441 /*
442 Cast a pointer up an inheritance hierarchy
443 */
444 SWIGRUNTIMEINLINE void *
445 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
446 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
447 }
448
449 /*
450 Dynamic pointer casting. Down an inheritance hierarchy
451 */
452 SWIGRUNTIME swig_type_info *
453 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
454 swig_type_info *lastty = ty;
455 if (!ty || !ty->dcast) return ty;
456 while (ty && (ty->dcast)) {
457 ty = (*ty->dcast)(ptr);
458 if (ty) lastty = ty;
459 }
460 return lastty;
461 }
462
463 /*
464 Return the name associated with this type
465 */
466 SWIGRUNTIMEINLINE const char *
467 SWIG_TypeName(const swig_type_info *ty) {
468 return ty->name;
469 }
470
471 /*
472 Return the pretty name associated with this type,
473 that is an unmangled type name in a form presentable to the user.
474 */
475 SWIGRUNTIME const char *
476 SWIG_TypePrettyName(const swig_type_info *type) {
477 /* The "str" field contains the equivalent pretty names of the
478 type, separated by vertical-bar characters. We choose
479 to print the last name, as it is often (?) the most
480 specific. */
481 if (!type) return NULL;
482 if (type->str != NULL) {
483 const char *last_name = type->str;
484 const char *s;
485 for (s = type->str; *s; s++)
486 if (*s == '|') last_name = s+1;
487 return last_name;
488 }
489 else
490 return type->name;
491 }
492
493 /*
494 Set the clientdata field for a type
495 */
496 SWIGRUNTIME void
497 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
498 swig_cast_info *cast = ti->cast;
499 /* if (ti->clientdata == clientdata) return; */
500 ti->clientdata = clientdata;
501
502 while (cast) {
503 if (!cast->converter) {
504 swig_type_info *tc = cast->type;
505 if (!tc->clientdata) {
506 SWIG_TypeClientData(tc, clientdata);
507 }
508 }
509 cast = cast->next;
510 }
511 }
512 SWIGRUNTIME void
513 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
514 SWIG_TypeClientData(ti, clientdata);
515 ti->owndata = 1;
516 }
517
518 /*
519 Search for a swig_type_info structure only by mangled name
520 Search is a O(log #types)
521
522 We start searching at module start, and finish searching when start == end.
523 Note: if start == end at the beginning of the function, we go all the way around
524 the circular list.
525 */
526 SWIGRUNTIME swig_type_info *
527 SWIG_MangledTypeQueryModule(swig_module_info *start,
528 swig_module_info *end,
529 const char *name) {
530 swig_module_info *iter = start;
531 do {
532 if (iter->size) {
533 register size_t l = 0;
534 register size_t r = iter->size - 1;
535 do {
536 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
537 register size_t i = (l + r) >> 1;
538 const char *iname = iter->types[i]->name;
539 if (iname) {
540 register int compare = strcmp(name, iname);
541 if (compare == 0) {
542 return iter->types[i];
543 } else if (compare < 0) {
544 if (i) {
545 r = i - 1;
546 } else {
547 break;
548 }
549 } else if (compare > 0) {
550 l = i + 1;
551 }
552 } else {
553 break; /* should never happen */
554 }
555 } while (l <= r);
556 }
557 iter = iter->next;
558 } while (iter != end);
559 return 0;
560 }
561
562 /*
563 Search for a swig_type_info structure for either a mangled name or a human readable name.
564 It first searches the mangled names of the types, which is a O(log #types)
565 If a type is not found it then searches the human readable names, which is O(#types).
566
567 We start searching at module start, and finish searching when start == end.
568 Note: if start == end at the beginning of the function, we go all the way around
569 the circular list.
570 */
571 SWIGRUNTIME swig_type_info *
572 SWIG_TypeQueryModule(swig_module_info *start,
573 swig_module_info *end,
574 const char *name) {
575 /* STEP 1: Search the name field using binary search */
576 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
577 if (ret) {
578 return ret;
579 } else {
580 /* STEP 2: If the type hasn't been found, do a complete search
581 of the str field (the human readable name) */
582 swig_module_info *iter = start;
583 do {
584 register size_t i = 0;
585 for (; i < iter->size; ++i) {
586 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
587 return iter->types[i];
588 }
589 iter = iter->next;
590 } while (iter != end);
591 }
592
593 /* neither found a match */
594 return 0;
595 }
596
597 /*
598 Pack binary data into a string
599 */
600 SWIGRUNTIME char *
601 SWIG_PackData(char *c, void *ptr, size_t sz) {
602 static const char hex[17] = "0123456789abcdef";
603 register const unsigned char *u = (unsigned char *) ptr;
604 register const unsigned char *eu = u + sz;
605 for (; u != eu; ++u) {
606 register unsigned char uu = *u;
607 *(c++) = hex[(uu & 0xf0) >> 4];
608 *(c++) = hex[uu & 0xf];
609 }
610 return c;
611 }
612
613 /*
614 Unpack binary data from a string
615 */
616 SWIGRUNTIME const char *
617 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
618 register unsigned char *u = (unsigned char *) ptr;
619 register const unsigned char *eu = u + sz;
620 for (; u != eu; ++u) {
621 register char d = *(c++);
622 register unsigned char uu;
623 if ((d >= '0') && (d <= '9'))
624 uu = ((d - '0') << 4);
625 else if ((d >= 'a') && (d <= 'f'))
626 uu = ((d - ('a'-10)) << 4);
627 else
628 return (char *) 0;
629 d = *(c++);
630 if ((d >= '0') && (d <= '9'))
631 uu |= (d - '0');
632 else if ((d >= 'a') && (d <= 'f'))
633 uu |= (d - ('a'-10));
634 else
635 return (char *) 0;
636 *u = uu;
637 }
638 return c;
639 }
640
641 /*
642 Pack 'void *' into a string buffer.
643 */
644 SWIGRUNTIME char *
645 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
646 char *r = buff;
647 if ((2*sizeof(void *) + 2) > bsz) return 0;
648 *(r++) = '_';
649 r = SWIG_PackData(r,&ptr,sizeof(void *));
650 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
651 strcpy(r,name);
652 return buff;
653 }
654
655 SWIGRUNTIME const char *
656 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
657 if (*c != '_') {
658 if (strcmp(c,"NULL") == 0) {
659 *ptr = (void *) 0;
660 return name;
661 } else {
662 return 0;
663 }
664 }
665 return SWIG_UnpackData(++c,ptr,sizeof(void *));
666 }
667
668 SWIGRUNTIME char *
669 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
670 char *r = buff;
671 size_t lname = (name ? strlen(name) : 0);
672 if ((2*sz + 2 + lname) > bsz) return 0;
673 *(r++) = '_';
674 r = SWIG_PackData(r,ptr,sz);
675 if (lname) {
676 strncpy(r,name,lname+1);
677 } else {
678 *r = 0;
679 }
680 return buff;
681 }
682
683 SWIGRUNTIME const char *
684 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
685 if (*c != '_') {
686 if (strcmp(c,"NULL") == 0) {
687 memset(ptr,0,sz);
688 return name;
689 } else {
690 return 0;
691 }
692 }
693 return SWIG_UnpackData(++c,ptr,sz);
694 }
695
696 #ifdef __cplusplus
697 }
698 #endif
699
700 /* Errors in SWIG */
701 #define SWIG_UnknownError -1
702 #define SWIG_IOError -2
703 #define SWIG_RuntimeError -3
704 #define SWIG_IndexError -4
705 #define SWIG_TypeError -5
706 #define SWIG_DivisionByZero -6
707 #define SWIG_OverflowError -7
708 #define SWIG_SyntaxError -8
709 #define SWIG_ValueError -9
710 #define SWIG_SystemError -10
711 #define SWIG_AttributeError -11
712 #define SWIG_MemoryError -12
713 #define SWIG_NullReferenceError -13
714
715
716
717 /* Python.h has to appear first */
718 #include <Python.h>
719
720 /* Add PyOS_snprintf for old Pythons */
721 #if PY_VERSION_HEX < 0x02020000
722 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
723 # define PyOS_snprintf _snprintf
724 # else
725 # define PyOS_snprintf snprintf
726 # endif
727 #endif
728
729 /* A crude PyString_FromFormat implementation for old Pythons */
730 #if PY_VERSION_HEX < 0x02020000
731
732 #ifndef SWIG_PYBUFFER_SIZE
733 # define SWIG_PYBUFFER_SIZE 1024
734 #endif
735
736 static PyObject *
737 PyString_FromFormat(const char *fmt, ...) {
738 va_list ap;
739 char buf[SWIG_PYBUFFER_SIZE * 2];
740 int res;
741 va_start(ap, fmt);
742 res = vsnprintf(buf, sizeof(buf), fmt, ap);
743 va_end(ap);
744 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
745 }
746 #endif
747
748 /* Add PyObject_Del for old Pythons */
749 #if PY_VERSION_HEX < 0x01060000
750 # define PyObject_Del(op) PyMem_DEL((op))
751 #endif
752 #ifndef PyObject_DEL
753 # define PyObject_DEL PyObject_Del
754 #endif
755
756 /* A crude PyExc_StopIteration exception for old Pythons */
757 #if PY_VERSION_HEX < 0x02020000
758 # ifndef PyExc_StopIteration
759 # define PyExc_StopIteration PyExc_RuntimeError
760 # endif
761 # ifndef PyObject_GenericGetAttr
762 # define PyObject_GenericGetAttr 0
763 # endif
764 #endif
765 /* Py_NotImplemented is defined in 2.1 and up. */
766 #if PY_VERSION_HEX < 0x02010000
767 # ifndef Py_NotImplemented
768 # define Py_NotImplemented PyExc_RuntimeError
769 # endif
770 #endif
771
772
773 /* A crude PyString_AsStringAndSize implementation for old Pythons */
774 #if PY_VERSION_HEX < 0x02010000
775 # ifndef PyString_AsStringAndSize
776 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
777 # endif
778 #endif
779
780 /* PySequence_Size for old Pythons */
781 #if PY_VERSION_HEX < 0x02000000
782 # ifndef PySequence_Size
783 # define PySequence_Size PySequence_Length
784 # endif
785 #endif
786
787
788 /* PyBool_FromLong for old Pythons */
789 #if PY_VERSION_HEX < 0x02030000
790 static
791 PyObject *PyBool_FromLong(long ok)
792 {
793 PyObject *result = ok ? Py_True : Py_False;
794 Py_INCREF(result);
795 return result;
796 }
797 #endif
798
799
800 /* -----------------------------------------------------------------------------
801 * error manipulation
802 * ----------------------------------------------------------------------------- */
803
804 SWIGRUNTIME PyObject*
805 SWIG_Python_ErrorType(int code) {
806 PyObject* type = 0;
807 switch(code) {
808 case SWIG_MemoryError:
809 type = PyExc_MemoryError;
810 break;
811 case SWIG_IOError:
812 type = PyExc_IOError;
813 break;
814 case SWIG_RuntimeError:
815 type = PyExc_RuntimeError;
816 break;
817 case SWIG_IndexError:
818 type = PyExc_IndexError;
819 break;
820 case SWIG_TypeError:
821 type = PyExc_TypeError;
822 break;
823 case SWIG_DivisionByZero:
824 type = PyExc_ZeroDivisionError;
825 break;
826 case SWIG_OverflowError:
827 type = PyExc_OverflowError;
828 break;
829 case SWIG_SyntaxError:
830 type = PyExc_SyntaxError;
831 break;
832 case SWIG_ValueError:
833 type = PyExc_ValueError;
834 break;
835 case SWIG_SystemError:
836 type = PyExc_SystemError;
837 break;
838 case SWIG_AttributeError:
839 type = PyExc_AttributeError;
840 break;
841 default:
842 type = PyExc_RuntimeError;
843 }
844 return type;
845 }
846
847
848 SWIGRUNTIME void
849 SWIG_Python_AddErrorMsg(const char* mesg)
850 {
851 PyObject *type = 0;
852 PyObject *value = 0;
853 PyObject *traceback = 0;
854
855 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
856 if (value) {
857 PyObject *old_str = PyObject_Str(value);
858 PyErr_Clear();
859 Py_XINCREF(type);
860 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
861 Py_DECREF(old_str);
862 Py_DECREF(value);
863 } else {
864 PyErr_Format(PyExc_RuntimeError, mesg);
865 }
866 }
867
868
869
870 #if defined(SWIG_PYTHON_NO_THREADS)
871 # if defined(SWIG_PYTHON_THREADS)
872 # undef SWIG_PYTHON_THREADS
873 # endif
874 #endif
875 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
876 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
877 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
878 # define SWIG_PYTHON_USE_GIL
879 # endif
880 # endif
881 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
882 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
883 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
884 # endif
885 # ifdef __cplusplus /* C++ code */
886 class SWIG_Python_Thread_Block {
887 bool status;
888 PyGILState_STATE state;
889 public:
890 void end() { if (status) { PyGILState_Release(state); status = false;} }
891 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
892 ~SWIG_Python_Thread_Block() { end(); }
893 };
894 class SWIG_Python_Thread_Allow {
895 bool status;
896 PyThreadState *save;
897 public:
898 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
899 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
900 ~SWIG_Python_Thread_Allow() { end(); }
901 };
902 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
903 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
904 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
905 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
906 # else /* C code */
907 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
908 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
909 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
910 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
911 # endif
912 # else /* Old thread way, not implemented, user must provide it */
913 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
914 # define SWIG_PYTHON_INITIALIZE_THREADS
915 # endif
916 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
917 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
918 # endif
919 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
920 # define SWIG_PYTHON_THREAD_END_BLOCK
921 # endif
922 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
923 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
924 # endif
925 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
926 # define SWIG_PYTHON_THREAD_END_ALLOW
927 # endif
928 # endif
929 #else /* No thread support */
930 # define SWIG_PYTHON_INITIALIZE_THREADS
931 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
932 # define SWIG_PYTHON_THREAD_END_BLOCK
933 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
934 # define SWIG_PYTHON_THREAD_END_ALLOW
935 #endif
936
937 /* -----------------------------------------------------------------------------
938 * Python API portion that goes into the runtime
939 * ----------------------------------------------------------------------------- */
940
941 #ifdef __cplusplus
942 extern "C" {
943 #if 0
944 } /* cc-mode */
945 #endif
946 #endif
947
948 /* -----------------------------------------------------------------------------
949 * Constant declarations
950 * ----------------------------------------------------------------------------- */
951
952 /* Constant Types */
953 #define SWIG_PY_POINTER 4
954 #define SWIG_PY_BINARY 5
955
956 /* Constant information structure */
957 typedef struct swig_const_info {
958 int type;
959 char *name;
960 long lvalue;
961 double dvalue;
962 void *pvalue;
963 swig_type_info **ptype;
964 } swig_const_info;
965
966 #ifdef __cplusplus
967 #if 0
968 { /* cc-mode */
969 #endif
970 }
971 #endif
972
973
974 /* -----------------------------------------------------------------------------
975 * See the LICENSE file for information on copyright, usage and redistribution
976 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
977 *
978 * pyrun.swg
979 *
980 * This file contains the runtime support for Python modules
981 * and includes code for managing global variables and pointer
982 * type checking.
983 *
984 * ----------------------------------------------------------------------------- */
985
986 /* Common SWIG API */
987
988 /* for raw pointers */
989 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
990 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
991 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
992 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
993 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
994 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
995 #define swig_owntype int
996
997 /* for raw packed data */
998 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
999 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1000
1001 /* for class or struct pointers */
1002 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1003 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1004
1005 /* for C or C++ function pointers */
1006 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1007 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1008
1009 /* for C++ member pointers, ie, member methods */
1010 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1011 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1012
1013
1014 /* Runtime API */
1015
1016 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1017 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1018 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1019
1020 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1021 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1022 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1023 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1024 #define SWIG_fail goto fail
1025
1026
1027 /* Runtime API implementation */
1028
1029 /* Error manipulation */
1030
1031 SWIGINTERN void
1032 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1033 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1034 PyErr_SetObject(errtype, obj);
1035 Py_DECREF(obj);
1036 SWIG_PYTHON_THREAD_END_BLOCK;
1037 }
1038
1039 SWIGINTERN void
1040 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1041 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1042 PyErr_SetString(errtype, (char *) msg);
1043 SWIG_PYTHON_THREAD_END_BLOCK;
1044 }
1045
1046 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1047
1048 /* Set a constant value */
1049
1050 SWIGINTERN void
1051 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1052 PyDict_SetItemString(d, (char*) name, obj);
1053 Py_DECREF(obj);
1054 }
1055
1056 /* Append a value to the result obj */
1057
1058 SWIGINTERN PyObject*
1059 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1060 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1061 if (!result) {
1062 result = obj;
1063 } else if (result == Py_None) {
1064 Py_DECREF(result);
1065 result = obj;
1066 } else {
1067 if (!PyList_Check(result)) {
1068 PyObject *o2 = result;
1069 result = PyList_New(1);
1070 PyList_SetItem(result, 0, o2);
1071 }
1072 PyList_Append(result,obj);
1073 Py_DECREF(obj);
1074 }
1075 return result;
1076 #else
1077 PyObject* o2;
1078 PyObject* o3;
1079 if (!result) {
1080 result = obj;
1081 } else if (result == Py_None) {
1082 Py_DECREF(result);
1083 result = obj;
1084 } else {
1085 if (!PyTuple_Check(result)) {
1086 o2 = result;
1087 result = PyTuple_New(1);
1088 PyTuple_SET_ITEM(result, 0, o2);
1089 }
1090 o3 = PyTuple_New(1);
1091 PyTuple_SET_ITEM(o3, 0, obj);
1092 o2 = result;
1093 result = PySequence_Concat(o2, o3);
1094 Py_DECREF(o2);
1095 Py_DECREF(o3);
1096 }
1097 return result;
1098 #endif
1099 }
1100
1101 /* Unpack the argument tuple */
1102
1103 SWIGINTERN int
1104 SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
1105 {
1106 if (!args) {
1107 if (!min && !max) {
1108 return 1;
1109 } else {
1110 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1111 name, (min == max ? "" : "at least "), min);
1112 return 0;
1113 }
1114 }
1115 if (!PyTuple_Check(args)) {
1116 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1117 return 0;
1118 } else {
1119 register int l = PyTuple_GET_SIZE(args);
1120 if (l < min) {
1121 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1122 name, (min == max ? "" : "at least "), min, l);
1123 return 0;
1124 } else if (l > max) {
1125 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1126 name, (min == max ? "" : "at most "), max, l);
1127 return 0;
1128 } else {
1129 register int i;
1130 for (i = 0; i < l; ++i) {
1131 objs[i] = PyTuple_GET_ITEM(args, i);
1132 }
1133 for (; l < max; ++l) {
1134 objs[l] = 0;
1135 }
1136 return i + 1;
1137 }
1138 }
1139 }
1140
1141 /* A functor is a function object with one single object argument */
1142 #if PY_VERSION_HEX >= 0x02020000
1143 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1144 #else
1145 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1146 #endif
1147
1148 /*
1149 Helper for static pointer initialization for both C and C++ code, for example
1150 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1151 */
1152 #ifdef __cplusplus
1153 #define SWIG_STATIC_POINTER(var) var
1154 #else
1155 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1156 #endif
1157
1158 /* -----------------------------------------------------------------------------
1159 * Pointer declarations
1160 * ----------------------------------------------------------------------------- */
1161
1162 /* Flags for new pointer objects */
1163 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1164 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1165
1166 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1167
1168 #ifdef __cplusplus
1169 extern "C" {
1170 #if 0
1171 } /* cc-mode */
1172 #endif
1173 #endif
1174
1175 /* How to access Py_None */
1176 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1177 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1178 # ifndef SWIG_PYTHON_BUILD_NONE
1179 # define SWIG_PYTHON_BUILD_NONE
1180 # endif
1181 # endif
1182 #endif
1183
1184 #ifdef SWIG_PYTHON_BUILD_NONE
1185 # ifdef Py_None
1186 # undef Py_None
1187 # define Py_None SWIG_Py_None()
1188 # endif
1189 SWIGRUNTIMEINLINE PyObject *
1190 _SWIG_Py_None(void)
1191 {
1192 PyObject *none = Py_BuildValue("");
1193 Py_DECREF(none);
1194 return none;
1195 }
1196 SWIGRUNTIME PyObject *
1197 SWIG_Py_None(void)
1198 {
1199 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1200 return none;
1201 }
1202 #endif
1203
1204 /* The python void return value */
1205
1206 SWIGRUNTIMEINLINE PyObject *
1207 SWIG_Py_Void(void)
1208 {
1209 PyObject *none = Py_None;
1210 Py_INCREF(none);
1211 return none;
1212 }
1213
1214 /* PySwigClientData */
1215
1216 typedef struct {
1217 PyObject *klass;
1218 PyObject *newraw;
1219 PyObject *newargs;
1220 PyObject *destroy;
1221 int delargs;
1222 int implicitconv;
1223 } PySwigClientData;
1224
1225 SWIGRUNTIMEINLINE int
1226 SWIG_Python_CheckImplicit(swig_type_info *ty)
1227 {
1228 PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1229 return data ? data->implicitconv : 0;
1230 }
1231
1232 SWIGRUNTIMEINLINE PyObject *
1233 SWIG_Python_ExceptionType(swig_type_info *desc) {
1234 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
1235 PyObject *klass = data ? data->klass : 0;
1236 return (klass ? klass : PyExc_RuntimeError);
1237 }
1238
1239
1240 SWIGRUNTIME PySwigClientData *
1241 PySwigClientData_New(PyObject* obj)
1242 {
1243 if (!obj) {
1244 return 0;
1245 } else {
1246 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1247 /* the klass element */
1248 data->klass = obj;
1249 Py_INCREF(data->klass);
1250 /* the newraw method and newargs arguments used to create a new raw instance */
1251 if (PyClass_Check(obj)) {
1252 data->newraw = 0;
1253 data->newargs = obj;
1254 Py_INCREF(obj);
1255 } else {
1256 #if (PY_VERSION_HEX < 0x02020000)
1257 data->newraw = 0;
1258 #else
1259 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1260 #endif
1261 if (data->newraw) {
1262 Py_INCREF(data->newraw);
1263 data->newargs = PyTuple_New(1);
1264 PyTuple_SetItem(data->newargs, 0, obj);
1265 } else {
1266 data->newargs = obj;
1267 }
1268 Py_INCREF(data->newargs);
1269 }
1270 /* the destroy method, aka as the C++ delete method */
1271 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1272 if (PyErr_Occurred()) {
1273 PyErr_Clear();
1274 data->destroy = 0;
1275 }
1276 if (data->destroy) {
1277 int flags;
1278 Py_INCREF(data->destroy);
1279 flags = PyCFunction_GET_FLAGS(data->destroy);
1280 #ifdef METH_O
1281 data->delargs = !(flags & (METH_O));
1282 #else
1283 data->delargs = 0;
1284 #endif
1285 } else {
1286 data->delargs = 0;
1287 }
1288 data->implicitconv = 0;
1289 return data;
1290 }
1291 }
1292
1293 SWIGRUNTIME void
1294 PySwigClientData_Del(PySwigClientData* data)
1295 {
1296 Py_XDECREF(data->newraw);
1297 Py_XDECREF(data->newargs);
1298 Py_XDECREF(data->destroy);
1299 }
1300
1301 /* =============== PySwigObject =====================*/
1302
1303 typedef struct {
1304 PyObject_HEAD
1305 void *ptr;
1306 swig_type_info *ty;
1307 int own;
1308 PyObject *next;
1309 } PySwigObject;
1310
1311 SWIGRUNTIME PyObject *
1312 PySwigObject_long(PySwigObject *v)
1313 {
1314 return PyLong_FromVoidPtr(v->ptr);
1315 }
1316
1317 SWIGRUNTIME PyObject *
1318 PySwigObject_format(const char* fmt, PySwigObject *v)
1319 {
1320 PyObject *res = NULL;
1321 PyObject *args = PyTuple_New(1);
1322 if (args) {
1323 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1324 PyObject *ofmt = PyString_FromString(fmt);
1325 if (ofmt) {
1326 res = PyString_Format(ofmt,args);
1327 Py_DECREF(ofmt);
1328 }
1329 Py_DECREF(args);
1330 }
1331 }
1332 return res;
1333 }
1334
1335 SWIGRUNTIME PyObject *
1336 PySwigObject_oct(PySwigObject *v)
1337 {
1338 return PySwigObject_format("%o",v);
1339 }
1340
1341 SWIGRUNTIME PyObject *
1342 PySwigObject_hex(PySwigObject *v)
1343 {
1344 return PySwigObject_format("%x",v);
1345 }
1346
1347 SWIGRUNTIME PyObject *
1348 #ifdef METH_NOARGS
1349 PySwigObject_repr(PySwigObject *v)
1350 #else
1351 PySwigObject_repr(PySwigObject *v, PyObject *args)
1352 #endif
1353 {
1354 const char *name = SWIG_TypePrettyName(v->ty);
1355 PyObject *hex = PySwigObject_hex(v);
1356 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
1357 Py_DECREF(hex);
1358 if (v->next) {
1359 #ifdef METH_NOARGS
1360 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1361 #else
1362 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1363 #endif
1364 PyString_ConcatAndDel(&repr,nrep);
1365 }
1366 return repr;
1367 }
1368
1369 SWIGRUNTIME int
1370 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1371 {
1372 #ifdef METH_NOARGS
1373 PyObject *repr = PySwigObject_repr(v);
1374 #else
1375 PyObject *repr = PySwigObject_repr(v, NULL);
1376 #endif
1377 if (repr) {
1378 fputs(PyString_AsString(repr), fp);
1379 Py_DECREF(repr);
1380 return 0;
1381 } else {
1382 return 1;
1383 }
1384 }
1385
1386 SWIGRUNTIME PyObject *
1387 PySwigObject_str(PySwigObject *v)
1388 {
1389 char result[SWIG_BUFFER_SIZE];
1390 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1391 PyString_FromString(result) : 0;
1392 }
1393
1394 SWIGRUNTIME int
1395 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1396 {
1397 void *i = v->ptr;
1398 void *j = w->ptr;
1399 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1400 }
1401
1402 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1403
1404 SWIGRUNTIME PyTypeObject*
1405 PySwigObject_type(void) {
1406 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1407 return type;
1408 }
1409
1410 SWIGRUNTIMEINLINE int
1411 PySwigObject_Check(PyObject *op) {
1412 return ((op)->ob_type == PySwigObject_type())
1413 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1414 }
1415
1416 SWIGRUNTIME PyObject *
1417 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1418
1419 SWIGRUNTIME void
1420 PySwigObject_dealloc(PyObject *v)
1421 {
1422 PySwigObject *sobj = (PySwigObject *) v;
1423 PyObject *next = sobj->next;
1424 if (sobj->own) {
1425 swig_type_info *ty = sobj->ty;
1426 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1427 PyObject *destroy = data ? data->destroy : 0;
1428 if (destroy) {
1429 /* destroy is always a VARARGS method */
1430 PyObject *res;
1431 if (data->delargs) {
1432 /* we need to create a temporal object to carry the destroy operation */
1433 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
1434 res = SWIG_Python_CallFunctor(destroy, tmp);
1435 Py_DECREF(tmp);
1436 } else {
1437 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1438 PyObject *mself = PyCFunction_GET_SELF(destroy);
1439 res = ((*meth)(mself, v));
1440 }
1441 Py_XDECREF(res);
1442 } else {
1443 const char *name = SWIG_TypePrettyName(ty);
1444 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1445 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
1446 #endif
1447 }
1448 }
1449 Py_XDECREF(next);
1450 PyObject_DEL(v);
1451 }
1452
1453 SWIGRUNTIME PyObject*
1454 PySwigObject_append(PyObject* v, PyObject* next)
1455 {
1456 PySwigObject *sobj = (PySwigObject *) v;
1457 #ifndef METH_O
1458 PyObject *tmp = 0;
1459 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1460 next = tmp;
1461 #endif
1462 if (!PySwigObject_Check(next)) {
1463 return NULL;
1464 }
1465 sobj->next = next;
1466 Py_INCREF(next);
1467 return SWIG_Py_Void();
1468 }
1469
1470 SWIGRUNTIME PyObject*
1471 #ifdef METH_NOARGS
1472 PySwigObject_next(PyObject* v)
1473 #else
1474 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1475 #endif
1476 {
1477 PySwigObject *sobj = (PySwigObject *) v;
1478 if (sobj->next) {
1479 Py_INCREF(sobj->next);
1480 return sobj->next;
1481 } else {
1482 return SWIG_Py_Void();
1483 }
1484 }
1485
1486 SWIGINTERN PyObject*
1487 #ifdef METH_NOARGS
1488 PySwigObject_disown(PyObject *v)
1489 #else
1490 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1491 #endif
1492 {
1493 PySwigObject *sobj = (PySwigObject *)v;
1494 sobj->own = 0;
1495 return SWIG_Py_Void();
1496 }
1497
1498 SWIGINTERN PyObject*
1499 #ifdef METH_NOARGS
1500 PySwigObject_acquire(PyObject *v)
1501 #else
1502 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1503 #endif
1504 {
1505 PySwigObject *sobj = (PySwigObject *)v;
1506 sobj->own = SWIG_POINTER_OWN;
1507 return SWIG_Py_Void();
1508 }
1509
1510 SWIGINTERN PyObject*
1511 PySwigObject_own(PyObject *v, PyObject *args)
1512 {
1513 PyObject *val = 0;
1514 #if (PY_VERSION_HEX < 0x02020000)
1515 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1516 #else
1517 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1518 #endif
1519 {
1520 return NULL;
1521 }
1522 else
1523 {
1524 PySwigObject *sobj = (PySwigObject *)v;
1525 PyObject *obj = PyBool_FromLong(sobj->own);
1526 if (val) {
1527 #ifdef METH_NOARGS
1528 if (PyObject_IsTrue(val)) {
1529 PySwigObject_acquire(v);
1530 } else {
1531 PySwigObject_disown(v);
1532 }
1533 #else
1534 if (PyObject_IsTrue(val)) {
1535 PySwigObject_acquire(v,args);
1536 } else {
1537 PySwigObject_disown(v,args);
1538 }
1539 #endif
1540 }
1541 return obj;
1542 }
1543 }
1544
1545 #ifdef METH_O
1546 static PyMethodDef
1547 swigobject_methods[] = {
1548 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1549 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1550 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1551 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
1552 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1553 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
1554 {0, 0, 0, 0}
1555 };
1556 #else
1557 static PyMethodDef
1558 swigobject_methods[] = {
1559 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1560 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1561 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1562 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1563 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1564 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
1565 {0, 0, 0, 0}
1566 };
1567 #endif
1568
1569 #if PY_VERSION_HEX < 0x02020000
1570 SWIGINTERN PyObject *
1571 PySwigObject_getattr(PySwigObject *sobj,char *name)
1572 {
1573 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1574 }
1575 #endif
1576
1577 SWIGRUNTIME PyTypeObject*
1578 _PySwigObject_type(void) {
1579 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1580
1581 static PyNumberMethods PySwigObject_as_number = {
1582 (binaryfunc)0, /*nb_add*/
1583 (binaryfunc)0, /*nb_subtract*/
1584 (binaryfunc)0, /*nb_multiply*/
1585 (binaryfunc)0, /*nb_divide*/
1586 (binaryfunc)0, /*nb_remainder*/
1587 (binaryfunc)0, /*nb_divmod*/
1588 (ternaryfunc)0,/*nb_power*/
1589 (unaryfunc)0, /*nb_negative*/
1590 (unaryfunc)0, /*nb_positive*/
1591 (unaryfunc)0, /*nb_absolute*/
1592 (inquiry)0, /*nb_nonzero*/
1593 0, /*nb_invert*/
1594 0, /*nb_lshift*/
1595 0, /*nb_rshift*/
1596 0, /*nb_and*/
1597 0, /*nb_xor*/
1598 0, /*nb_or*/
1599 (coercion)0, /*nb_coerce*/
1600 (unaryfunc)PySwigObject_long, /*nb_int*/
1601 (unaryfunc)PySwigObject_long, /*nb_long*/
1602 (unaryfunc)0, /*nb_float*/
1603 (unaryfunc)PySwigObject_oct, /*nb_oct*/
1604 (unaryfunc)PySwigObject_hex, /*nb_hex*/
1605 #if PY_VERSION_HEX >= 0x02020000
1606 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1607 #elif PY_VERSION_HEX >= 0x02000000
1608 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1609 #endif
1610 };
1611
1612 static PyTypeObject pyswigobject_type;
1613 static int type_init = 0;
1614 if (!type_init) {
1615 const PyTypeObject tmp
1616 = {
1617 PyObject_HEAD_INIT(NULL)
1618 0, /* ob_size */
1619 (char *)"PySwigObject", /* tp_name */
1620 sizeof(PySwigObject), /* tp_basicsize */
1621 0, /* tp_itemsize */
1622 (destructor)PySwigObject_dealloc, /* tp_dealloc */
1623 (printfunc)PySwigObject_print, /* tp_print */
1624 #if PY_VERSION_HEX < 0x02020000
1625 (getattrfunc)PySwigObject_getattr, /* tp_getattr */
1626 #else
1627 (getattrfunc)0, /* tp_getattr */
1628 #endif
1629 (setattrfunc)0, /* tp_setattr */
1630 (cmpfunc)PySwigObject_compare, /* tp_compare */
1631 (reprfunc)PySwigObject_repr, /* tp_repr */
1632 &PySwigObject_as_number, /* tp_as_number */
1633 0, /* tp_as_sequence */
1634 0, /* tp_as_mapping */
1635 (hashfunc)0, /* tp_hash */
1636 (ternaryfunc)0, /* tp_call */
1637 (reprfunc)PySwigObject_str, /* tp_str */
1638 PyObject_GenericGetAttr, /* tp_getattro */
1639 0, /* tp_setattro */
1640 0, /* tp_as_buffer */
1641 Py_TPFLAGS_DEFAULT, /* tp_flags */
1642 swigobject_doc, /* tp_doc */
1643 0, /* tp_traverse */
1644 0, /* tp_clear */
1645 0, /* tp_richcompare */
1646 0, /* tp_weaklistoffset */
1647 #if PY_VERSION_HEX >= 0x02020000
1648 0, /* tp_iter */
1649 0, /* tp_iternext */
1650 swigobject_methods, /* tp_methods */
1651 0, /* tp_members */
1652 0, /* tp_getset */
1653 0, /* tp_base */
1654 0, /* tp_dict */
1655 0, /* tp_descr_get */
1656 0, /* tp_descr_set */
1657 0, /* tp_dictoffset */
1658 0, /* tp_init */
1659 0, /* tp_alloc */
1660 0, /* tp_new */
1661 0, /* tp_free */
1662 0, /* tp_is_gc */
1663 0, /* tp_bases */
1664 0, /* tp_mro */
1665 0, /* tp_cache */
1666 0, /* tp_subclasses */
1667 0, /* tp_weaklist */
1668 #endif
1669 #if PY_VERSION_HEX >= 0x02030000
1670 0, /* tp_del */
1671 #endif
1672 #ifdef COUNT_ALLOCS
1673 0,0,0,0 /* tp_alloc -> tp_next */
1674 #endif
1675 };
1676 pyswigobject_type = tmp;
1677 pyswigobject_type.ob_type = &PyType_Type;
1678 type_init = 1;
1679 }
1680 return &pyswigobject_type;
1681 }
1682
1683 SWIGRUNTIME PyObject *
1684 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1685 {
1686 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1687 if (sobj) {
1688 sobj->ptr = ptr;
1689 sobj->ty = ty;
1690 sobj->own = own;
1691 sobj->next = 0;
1692 }
1693 return (PyObject *)sobj;
1694 }
1695
1696 /* -----------------------------------------------------------------------------
1697 * Implements a simple Swig Packed type, and use it instead of string
1698 * ----------------------------------------------------------------------------- */
1699
1700 typedef struct {
1701 PyObject_HEAD
1702 void *pack;
1703 swig_type_info *ty;
1704 size_t size;
1705 } PySwigPacked;
1706
1707 SWIGRUNTIME int
1708 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1709 {
1710 char result[SWIG_BUFFER_SIZE];
1711 fputs("<Swig Packed ", fp);
1712 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1713 fputs("at ", fp);
1714 fputs(result, fp);
1715 }
1716 fputs(v->ty->name,fp);
1717 fputs(">", fp);
1718 return 0;
1719 }
1720
1721 SWIGRUNTIME PyObject *
1722 PySwigPacked_repr(PySwigPacked *v)
1723 {
1724 char result[SWIG_BUFFER_SIZE];
1725 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1726 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1727 } else {
1728 return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1729 }
1730 }
1731
1732 SWIGRUNTIME PyObject *
1733 PySwigPacked_str(PySwigPacked *v)
1734 {
1735 char result[SWIG_BUFFER_SIZE];
1736 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1737 return PyString_FromFormat("%s%s", result, v->ty->name);
1738 } else {
1739 return PyString_FromString(v->ty->name);
1740 }
1741 }
1742
1743 SWIGRUNTIME int
1744 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1745 {
1746 size_t i = v->size;
1747 size_t j = w->size;
1748 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1749 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1750 }
1751
1752 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1753
1754 SWIGRUNTIME PyTypeObject*
1755 PySwigPacked_type(void) {
1756 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1757 return type;
1758 }
1759
1760 SWIGRUNTIMEINLINE int
1761 PySwigPacked_Check(PyObject *op) {
1762 return ((op)->ob_type == _PySwigPacked_type())
1763 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1764 }
1765
1766 SWIGRUNTIME void
1767 PySwigPacked_dealloc(PyObject *v)
1768 {
1769 if (PySwigPacked_Check(v)) {
1770 PySwigPacked *sobj = (PySwigPacked *) v;
1771 free(sobj->pack);
1772 }
1773 PyObject_DEL(v);
1774 }
1775
1776 SWIGRUNTIME PyTypeObject*
1777 _PySwigPacked_type(void) {
1778 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1779 static PyTypeObject pyswigpacked_type;
1780 static int type_init = 0;
1781 if (!type_init) {
1782 const PyTypeObject tmp
1783 = {
1784 PyObject_HEAD_INIT(NULL)
1785 0, /* ob_size */
1786 (char *)"PySwigPacked", /* tp_name */
1787 sizeof(PySwigPacked), /* tp_basicsize */
1788 0, /* tp_itemsize */
1789 (destructor)PySwigPacked_dealloc, /* tp_dealloc */
1790 (printfunc)PySwigPacked_print, /* tp_print */
1791 (getattrfunc)0, /* tp_getattr */
1792 (setattrfunc)0, /* tp_setattr */
1793 (cmpfunc)PySwigPacked_compare, /* tp_compare */
1794 (reprfunc)PySwigPacked_repr, /* tp_repr */
1795 0, /* tp_as_number */
1796 0, /* tp_as_sequence */
1797 0, /* tp_as_mapping */
1798 (hashfunc)0, /* tp_hash */
1799 (ternaryfunc)0, /* tp_call */
1800 (reprfunc)PySwigPacked_str, /* tp_str */
1801 PyObject_GenericGetAttr, /* tp_getattro */
1802 0, /* tp_setattro */
1803 0, /* tp_as_buffer */
1804 Py_TPFLAGS_DEFAULT, /* tp_flags */
1805 swigpacked_doc, /* tp_doc */
1806 0, /* tp_traverse */
1807 0, /* tp_clear */
1808 0, /* tp_richcompare */
1809 0, /* tp_weaklistoffset */
1810 #if PY_VERSION_HEX >= 0x02020000
1811 0, /* tp_iter */
1812 0, /* tp_iternext */
1813 0, /* tp_methods */
1814 0, /* tp_members */
1815 0, /* tp_getset */
1816 0, /* tp_base */
1817 0, /* tp_dict */
1818 0, /* tp_descr_get */
1819 0, /* tp_descr_set */
1820 0, /* tp_dictoffset */
1821 0, /* tp_init */
1822 0, /* tp_alloc */
1823 0, /* tp_new */
1824 0, /* tp_free */
1825 0, /* tp_is_gc */
1826 0, /* tp_bases */
1827 0, /* tp_mro */
1828 0, /* tp_cache */
1829 0, /* tp_subclasses */
1830 0, /* tp_weaklist */
1831 #endif
1832 #if PY_VERSION_HEX >= 0x02030000
1833 0, /* tp_del */
1834 #endif
1835 #ifdef COUNT_ALLOCS
1836 0,0,0,0 /* tp_alloc -> tp_next */
1837 #endif
1838 };
1839 pyswigpacked_type = tmp;
1840 pyswigpacked_type.ob_type = &PyType_Type;
1841 type_init = 1;
1842 }
1843 return &pyswigpacked_type;
1844 }
1845
1846 SWIGRUNTIME PyObject *
1847 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1848 {
1849 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1850 if (sobj) {
1851 void *pack = malloc(size);
1852 if (pack) {
1853 memcpy(pack, ptr, size);
1854 sobj->pack = pack;
1855 sobj->ty = ty;
1856 sobj->size = size;
1857 } else {
1858 PyObject_DEL((PyObject *) sobj);
1859 sobj = 0;
1860 }
1861 }
1862 return (PyObject *) sobj;
1863 }
1864
1865 SWIGRUNTIME swig_type_info *
1866 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1867 {
1868 if (PySwigPacked_Check(obj)) {
1869 PySwigPacked *sobj = (PySwigPacked *)obj;
1870 if (sobj->size != size) return 0;
1871 memcpy(ptr, sobj->pack, size);
1872 return sobj->ty;
1873 } else {
1874 return 0;
1875 }
1876 }
1877
1878 /* -----------------------------------------------------------------------------
1879 * pointers/data manipulation
1880 * ----------------------------------------------------------------------------- */
1881
1882 SWIGRUNTIMEINLINE PyObject *
1883 _SWIG_This(void)
1884 {
1885 return PyString_FromString("this");
1886 }
1887
1888 SWIGRUNTIME PyObject *
1889 SWIG_This(void)
1890 {
1891 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1892 return swig_this;
1893 }
1894
1895 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1896
1897 SWIGRUNTIME PySwigObject *
1898 SWIG_Python_GetSwigThis(PyObject *pyobj)
1899 {
1900 if (PySwigObject_Check(pyobj)) {
1901 return (PySwigObject *) pyobj;
1902 } else {
1903 PyObject *obj = 0;
1904 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1905 if (PyInstance_Check(pyobj)) {
1906 obj = _PyInstance_Lookup(pyobj, SWIG_This());
1907 } else {
1908 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1909 if (dictptr != NULL) {
1910 PyObject *dict = *dictptr;
1911 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1912 } else {
1913 #ifdef PyWeakref_CheckProxy
1914 if (PyWeakref_CheckProxy(pyobj)) {
1915 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1916 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1917 }
1918 #endif
1919 obj = PyObject_GetAttr(pyobj,SWIG_This());
1920 if (obj) {
1921 Py_DECREF(obj);
1922 } else {
1923 if (PyErr_Occurred()) PyErr_Clear();
1924 return 0;
1925 }
1926 }
1927 }
1928 #else
1929 obj = PyObject_GetAttr(pyobj,SWIG_This());
1930 if (obj) {
1931 Py_DECREF(obj);
1932 } else {
1933 if (PyErr_Occurred()) PyErr_Clear();
1934 return 0;
1935 }
1936 #endif
1937 if (obj && !PySwigObject_Check(obj)) {
1938 /* a PyObject is called 'this', try to get the 'real this'
1939 PySwigObject from it */
1940 return SWIG_Python_GetSwigThis(obj);
1941 }
1942 return (PySwigObject *)obj;
1943 }
1944 }
1945
1946 /* Acquire a pointer value */
1947
1948 SWIGRUNTIME int
1949 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1950 if (own) {
1951 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1952 if (sobj) {
1953 int oldown = sobj->own;
1954 sobj->own = own;
1955 return oldown;
1956 }
1957 }
1958 return 0;
1959 }
1960
1961 /* Convert a pointer value */
1962
1963 SWIGRUNTIME int
1964 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
1965 if (!obj) return SWIG_ERROR;
1966 if (obj == Py_None) {
1967 if (ptr) *ptr = 0;
1968 return SWIG_OK;
1969 } else {
1970 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1971 while (sobj) {
1972 void *vptr = sobj->ptr;
1973 if (ty) {
1974 swig_type_info *to = sobj->ty;
1975 if (to == ty) {
1976 /* no type cast needed */
1977 if (ptr) *ptr = vptr;
1978 break;
1979 } else {
1980 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
1981 if (!tc) {
1982 sobj = (PySwigObject *)sobj->next;
1983 } else {
1984 if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
1985 break;
1986 }
1987 }
1988 } else {
1989 if (ptr) *ptr = vptr;
1990 break;
1991 }
1992 }
1993 if (sobj) {
1994 if (own) *own = sobj->own;
1995 if (flags & SWIG_POINTER_DISOWN) {
1996 sobj->own = 0;
1997 }
1998 return SWIG_OK;
1999 } else {
2000 int res = SWIG_ERROR;
2001 if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2002 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
2003 if (data && !data->implicitconv) {
2004 PyObject *klass = data->klass;
2005 if (klass) {
2006 PyObject *impconv;
2007 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2008 impconv = SWIG_Python_CallFunctor(klass, obj);
2009 data->implicitconv = 0;
2010 if (PyErr_Occurred()) {
2011 PyErr_Clear();
2012 impconv = 0;
2013 }
2014 if (impconv) {
2015 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2016 if (iobj) {
2017 void *vptr;
2018 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2019 if (SWIG_IsOK(res)) {
2020 if (ptr) {
2021 *ptr = vptr;
2022 /* transfer the ownership to 'ptr' */
2023 iobj->own = 0;
2024 res = SWIG_AddCast(res);
2025 res = SWIG_AddNewMask(res);
2026 } else {
2027 res = SWIG_AddCast(res);
2028 }
2029 }
2030 }
2031 Py_DECREF(impconv);
2032 }
2033 }
2034 }
2035 }
2036 return res;
2037 }
2038 }
2039 }
2040
2041 /* Convert a function ptr value */
2042
2043 SWIGRUNTIME int
2044 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2045 if (!PyCFunction_Check(obj)) {
2046 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2047 } else {
2048 void *vptr = 0;
2049
2050 /* here we get the method pointer for callbacks */
2051 char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2052 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2053 if (desc) {
2054 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2055 if (!desc) return SWIG_ERROR;
2056 }
2057 if (ty) {
2058 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2059 if (!tc) return SWIG_ERROR;
2060 *ptr = SWIG_TypeCast(tc,vptr);
2061 } else {
2062 *ptr = vptr;
2063 }
2064 return SWIG_OK;
2065 }
2066 }
2067
2068 /* Convert a packed value value */
2069
2070 SWIGRUNTIME int
2071 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2072 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
2073 if (!to) return SWIG_ERROR;
2074 if (ty) {
2075 if (to != ty) {
2076 /* check type cast? */
2077 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2078 if (!tc) return SWIG_ERROR;
2079 }
2080 }
2081 return SWIG_OK;
2082 }
2083
2084 /* -----------------------------------------------------------------------------
2085 * Create a new pointer object
2086 * ----------------------------------------------------------------------------- */
2087
2088 /*
2089 Create a new instance object, whitout calling __init__, and set the
2090 'this' attribute.
2091 */
2092
2093 SWIGRUNTIME PyObject*
2094 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2095 {
2096 #if (PY_VERSION_HEX >= 0x02020000)
2097 PyObject *inst = 0;
2098 PyObject *newraw = data->newraw;
2099 if (newraw) {
2100 inst = PyObject_Call(newraw, data->newargs, NULL);
2101 if (inst) {
2102 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2103 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2104 if (dictptr != NULL) {
2105 PyObject *dict = *dictptr;
2106 if (dict == NULL) {
2107 dict = PyDict_New();
2108 *dictptr = dict;
2109 PyDict_SetItem(dict, SWIG_This(), swig_this);
2110 }
2111 }
2112 #else
2113 PyObject *key = SWIG_This();
2114 PyObject_SetAttr(inst, key, swig_this);
2115 #endif
2116 }
2117 } else {
2118 PyObject *dict = PyDict_New();
2119 PyDict_SetItem(dict, SWIG_This(), swig_this);
2120 inst = PyInstance_NewRaw(data->newargs, dict);
2121 Py_DECREF(dict);
2122 }
2123 return inst;
2124 #else
2125 #if (PY_VERSION_HEX >= 0x02010000)
2126 PyObject *inst;
2127 PyObject *dict = PyDict_New();
2128 PyDict_SetItem(dict, SWIG_This(), swig_this);
2129 inst = PyInstance_NewRaw(data->newargs, dict);
2130 Py_DECREF(dict);
2131 return (PyObject *) inst;
2132 #else
2133 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2134 if (inst == NULL) {
2135 return NULL;
2136 }
2137 inst->in_class = (PyClassObject *)data->newargs;
2138 Py_INCREF(inst->in_class);
2139 inst->in_dict = PyDict_New();
2140 if (inst->in_dict == NULL) {
2141 Py_DECREF(inst);
2142 return NULL;
2143 }
2144 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2145 inst->in_weakreflist = NULL;
2146 #endif
2147 #ifdef Py_TPFLAGS_GC
2148 PyObject_GC_Init(inst);
2149 #endif
2150 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2151 return (PyObject *) inst;
2152 #endif
2153 #endif
2154 }
2155
2156 SWIGRUNTIME void
2157 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2158 {
2159 PyObject *dict;
2160 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2161 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2162 if (dictptr != NULL) {
2163 dict = *dictptr;
2164 if (dict == NULL) {
2165 dict = PyDict_New();
2166 *dictptr = dict;
2167 }
2168 PyDict_SetItem(dict, SWIG_This(), swig_this);
2169 return;
2170 }
2171 #endif
2172 dict = PyObject_GetAttrString(inst, "__dict__");
2173 PyDict_SetItem(dict, SWIG_This(), swig_this);
2174 Py_DECREF(dict);
2175 }
2176
2177
2178 SWIGINTERN PyObject *
2179 SWIG_Python_InitShadowInstance(PyObject *args) {
2180 PyObject *obj[2];
2181 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2182 return NULL;
2183 } else {
2184 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2185 if (sthis) {
2186 PySwigObject_append((PyObject*) sthis, obj[1]);
2187 } else {
2188 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2189 }
2190 return SWIG_Py_Void();
2191 }
2192 }
2193
2194 /* Create a new pointer object */
2195
2196 SWIGRUNTIME PyObject *
2197 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2198 if (!ptr) {
2199 return SWIG_Py_Void();
2200 } else {
2201 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2202 PyObject *robj = PySwigObject_New(ptr, type, own);
2203 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
2204 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2205 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2206 if (inst) {
2207 Py_DECREF(robj);
2208 robj = inst;
2209 }
2210 }
2211 return robj;
2212 }
2213 }
2214
2215 /* Create a new packed object */
2216
2217 SWIGRUNTIMEINLINE PyObject *
2218 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2219 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2220 }
2221
2222 /* -----------------------------------------------------------------------------*
2223 * Get type list
2224 * -----------------------------------------------------------------------------*/
2225
2226 #ifdef SWIG_LINK_RUNTIME
2227 void *SWIG_ReturnGlobalTypeList(void *);
2228 #endif
2229
2230 SWIGRUNTIME swig_module_info *
2231 SWIG_Python_GetModule(void) {
2232 static void *type_pointer = (void *)0;
2233 /* first check if module already created */
2234 if (!type_pointer) {
2235 #ifdef SWIG_LINK_RUNTIME
2236 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2237 #else
2238 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2239 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2240 if (PyErr_Occurred()) {
2241 PyErr_Clear();
2242 type_pointer = (void *)0;
2243 }
2244 #endif
2245 }
2246 return (swig_module_info *) type_pointer;
2247 }
2248
2249 #if PY_MAJOR_VERSION < 2
2250 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2251 is copied out of Python/modsupport.c in python version 2.3.4 */
2252 SWIGINTERN int
2253 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2254 {
2255 PyObject *dict;
2256 if (!PyModule_Check(m)) {
2257 PyErr_SetString(PyExc_TypeError,
2258 "PyModule_AddObject() needs module as first arg");
2259 return SWIG_ERROR;
2260 }
2261 if (!o) {
2262 PyErr_SetString(PyExc_TypeError,
2263 "PyModule_AddObject() needs non-NULL value");
2264 return SWIG_ERROR;
2265 }
2266
2267 dict = PyModule_GetDict(m);
2268 if (dict == NULL) {
2269 /* Internal error -- modules must have a dict! */
2270 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2271 PyModule_GetName(m));
2272 return SWIG_ERROR;
2273 }
2274 if (PyDict_SetItemString(dict, name, o))
2275 return SWIG_ERROR;
2276 Py_DECREF(o);
2277 return SWIG_OK;
2278 }
2279 #endif
2280
2281 SWIGRUNTIME void
2282 SWIG_Python_DestroyModule(void *vptr)
2283 {
2284 swig_module_info *swig_module = (swig_module_info *) vptr;
2285 swig_type_info **types = swig_module->types;
2286 size_t i;
2287 for (i =0; i < swig_module->size; ++i) {
2288 swig_type_info *ty = types[i];
2289 if (ty->owndata) {
2290 PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2291 if (data) PySwigClientData_Del(data);
2292 }
2293 }
2294 Py_DECREF(SWIG_This());
2295 }
2296
2297 SWIGRUNTIME void
2298 SWIG_Python_SetModule(swig_module_info *swig_module) {
2299 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2300
2301 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2302 swig_empty_runtime_method_table);
2303 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2304 if (pointer && module) {
2305 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2306 } else {
2307 Py_XDECREF(pointer);
2308 }
2309 }
2310
2311 /* The python cached type query */
2312 SWIGRUNTIME PyObject *
2313 SWIG_Python_TypeCache() {
2314 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2315 return cache;
2316 }
2317
2318 SWIGRUNTIME swig_type_info *
2319 SWIG_Python_TypeQuery(const char *type)
2320 {
2321 PyObject *cache = SWIG_Python_TypeCache();
2322 PyObject *key = PyString_FromString(type);
2323 PyObject *obj = PyDict_GetItem(cache, key);
2324 swig_type_info *descriptor;
2325 if (obj) {
2326 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2327 } else {
2328 swig_module_info *swig_module = SWIG_Python_GetModule();
2329 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2330 if (descriptor) {
2331 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2332 PyDict_SetItem(cache, key, obj);
2333 Py_DECREF(obj);
2334 }
2335 }
2336 Py_DECREF(key);
2337 return descriptor;
2338 }
2339
2340 /*
2341 For backward compatibility only
2342 */
2343 #define SWIG_POINTER_EXCEPTION 0
2344 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2345 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2346
2347 SWIGRUNTIME int
2348 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2349 {
2350 if (PyErr_Occurred()) {
2351 PyObject *type = 0;
2352 PyObject *value = 0;
2353 PyObject *traceback = 0;
2354 PyErr_Fetch(&type, &value, &traceback);
2355 if (value) {
2356 PyObject *old_str = PyObject_Str(value);
2357 Py_XINCREF(type);
2358 PyErr_Clear();
2359 if (infront) {
2360 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2361 } else {
2362 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2363 }
2364 Py_DECREF(old_str);
2365 }
2366 return 1;
2367 } else {
2368 return 0;
2369 }
2370 }
2371
2372 SWIGRUNTIME int
2373 SWIG_Python_ArgFail(int argnum)
2374 {
2375 if (PyErr_Occurred()) {
2376 /* add information about failing argument */
2377 char mesg[256];
2378 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2379 return SWIG_Python_AddErrMesg(mesg, 1);
2380 } else {
2381 return 0;
2382 }
2383 }
2384
2385 SWIGRUNTIMEINLINE const char *
2386 PySwigObject_GetDesc(PyObject *self)
2387 {
2388 PySwigObject *v = (PySwigObject *)self;
2389 swig_type_info *ty = v ? v->ty : 0;
2390 return ty ? ty->str : (char*)"";
2391 }
2392
2393 SWIGRUNTIME void
2394 SWIG_Python_TypeError(const char *type, PyObject *obj)
2395 {
2396 if (type) {
2397 #if defined(SWIG_COBJECT_TYPES)
2398 if (obj && PySwigObject_Check(obj)) {
2399 const char *otype = (const char *) PySwigObject_GetDesc(obj);
2400 if (otype) {
2401 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2402 type, otype);
2403 return;
2404 }
2405 } else
2406 #endif
2407 {
2408 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2409 if (otype) {
2410 PyObject *str = PyObject_Str(obj);
2411 const char *cstr = str ? PyString_AsString(str) : 0;
2412 if (cstr) {
2413 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2414 type, otype, cstr);
2415 } else {
2416 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2417 type, otype);
2418 }
2419 Py_XDECREF(str);
2420 return;
2421 }
2422 }
2423 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2424 } else {
2425 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2426 }
2427 }
2428
2429
2430 /* Convert a pointer value, signal an exception on a type mismatch */
2431 SWIGRUNTIME void *
2432 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2433 void *result;
2434 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2435 PyErr_Clear();
2436 if (flags & SWIG_POINTER_EXCEPTION) {
2437 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2438 SWIG_Python_ArgFail(argnum);
2439 }
2440 }
2441 return result;
2442 }
2443
2444
2445 #ifdef __cplusplus
2446 #if 0
2447 { /* cc-mode */
2448 #endif
2449 }
2450 #endif
2451
2452
2453
2454 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2455
2456 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2457
2458
2459
2460 /* -------- TYPES TABLE (BEGIN) -------- */
2461
2462 #define SWIGTYPE_p_char swig_types[0]
2463 #define SWIGTYPE_p_form_ops_t swig_types[1]
2464 #define SWIGTYPE_p_int swig_types[2]
2465 #define SWIGTYPE_p_unsigned_char swig_types[3]
2466 #define SWIGTYPE_p_unsigned_int swig_types[4]
2467 #define SWIGTYPE_p_unsigned_long swig_types[5]
2468 #define SWIGTYPE_p_wxANIHandler swig_types[6]
2469 #define SWIGTYPE_p_wxAcceleratorTable swig_types[7]
2470 #define SWIGTYPE_p_wxActivateEvent swig_types[8]
2471 #define SWIGTYPE_p_wxBMPHandler swig_types[9]
2472 #define SWIGTYPE_p_wxBoxSizer swig_types[10]
2473 #define SWIGTYPE_p_wxCURHandler swig_types[11]
2474 #define SWIGTYPE_p_wxChildFocusEvent swig_types[12]
2475 #define SWIGTYPE_p_wxCloseEvent swig_types[13]
2476 #define SWIGTYPE_p_wxCommandEvent swig_types[14]
2477 #define SWIGTYPE_p_wxContextMenuEvent swig_types[15]
2478 #define SWIGTYPE_p_wxControl swig_types[16]
2479 #define SWIGTYPE_p_wxControlWithItems swig_types[17]
2480 #define SWIGTYPE_p_wxDateEvent swig_types[18]
2481 #define SWIGTYPE_p_wxDisplayChangedEvent swig_types[19]
2482 #define SWIGTYPE_p_wxDropFilesEvent swig_types[20]
2483 #define SWIGTYPE_p_wxDuplexMode swig_types[21]
2484 #define SWIGTYPE_p_wxEraseEvent swig_types[22]
2485 #define SWIGTYPE_p_wxEvent swig_types[23]
2486 #define SWIGTYPE_p_wxEvtHandler swig_types[24]
2487 #define SWIGTYPE_p_wxFSFile swig_types[25]
2488 #define SWIGTYPE_p_wxFileSystem swig_types[26]
2489 #define SWIGTYPE_p_wxFlexGridSizer swig_types[27]
2490 #define SWIGTYPE_p_wxFocusEvent swig_types[28]
2491 #define SWIGTYPE_p_wxGBSizerItem swig_types[29]
2492 #define SWIGTYPE_p_wxGIFHandler swig_types[30]
2493 #define SWIGTYPE_p_wxGLCanvas swig_types[31]
2494 #define SWIGTYPE_p_wxGLContext swig_types[32]
2495 #define SWIGTYPE_p_wxGridBagSizer swig_types[33]
2496 #define SWIGTYPE_p_wxGridSizer swig_types[34]
2497 #define SWIGTYPE_p_wxICOHandler swig_types[35]
2498 #define SWIGTYPE_p_wxIconizeEvent swig_types[36]
2499 #define SWIGTYPE_p_wxIdleEvent swig_types[37]
2500 #define SWIGTYPE_p_wxImage swig_types[38]
2501 #define SWIGTYPE_p_wxImageHandler swig_types[39]
2502 #define SWIGTYPE_p_wxIndividualLayoutConstraint swig_types[40]
2503 #define SWIGTYPE_p_wxInitDialogEvent swig_types[41]
2504 #define SWIGTYPE_p_wxJPEGHandler swig_types[42]
2505 #define SWIGTYPE_p_wxKeyEvent swig_types[43]
2506 #define SWIGTYPE_p_wxLayoutConstraints swig_types[44]
2507 #define SWIGTYPE_p_wxMaximizeEvent swig_types[45]
2508 #define SWIGTYPE_p_wxMenu swig_types[46]
2509 #define SWIGTYPE_p_wxMenuBar swig_types[47]
2510 #define SWIGTYPE_p_wxMenuEvent swig_types[48]
2511 #define SWIGTYPE_p_wxMenuItem swig_types[49]
2512 #define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[50]
2513 #define SWIGTYPE_p_wxMouseEvent swig_types[51]
2514 #define SWIGTYPE_p_wxMoveEvent swig_types[52]
2515 #define SWIGTYPE_p_wxNavigationKeyEvent swig_types[53]
2516 #define SWIGTYPE_p_wxNcPaintEvent swig_types[54]
2517 #define SWIGTYPE_p_wxNotifyEvent swig_types[55]
2518 #define SWIGTYPE_p_wxObject swig_types[56]
2519 #define SWIGTYPE_p_wxPCXHandler swig_types[57]
2520 #define SWIGTYPE_p_wxPNGHandler swig_types[58]
2521 #define SWIGTYPE_p_wxPNMHandler swig_types[59]
2522 #define SWIGTYPE_p_wxPaintEvent swig_types[60]
2523 #define SWIGTYPE_p_wxPalette swig_types[61]
2524 #define SWIGTYPE_p_wxPaletteChangedEvent swig_types[62]
2525 #define SWIGTYPE_p_wxPaperSize swig_types[63]
2526 #define SWIGTYPE_p_wxPyApp swig_types[64]
2527 #define SWIGTYPE_p_wxPyCommandEvent swig_types[65]
2528 #define SWIGTYPE_p_wxPyEvent swig_types[66]
2529 #define SWIGTYPE_p_wxPyImageHandler swig_types[67]
2530 #define SWIGTYPE_p_wxPySizer swig_types[68]
2531 #define SWIGTYPE_p_wxPyValidator swig_types[69]
2532 #define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[70]
2533 #define SWIGTYPE_p_wxScrollEvent swig_types[71]
2534 #define SWIGTYPE_p_wxScrollWinEvent swig_types[72]
2535 #define SWIGTYPE_p_wxSetCursorEvent swig_types[73]
2536 #define SWIGTYPE_p_wxShowEvent swig_types[74]
2537 #define SWIGTYPE_p_wxSizeEvent swig_types[75]
2538 #define SWIGTYPE_p_wxSizer swig_types[76]
2539 #define SWIGTYPE_p_wxSizerItem swig_types[77]
2540 #define SWIGTYPE_p_wxStaticBoxSizer swig_types[78]
2541 #define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[79]
2542 #define SWIGTYPE_p_wxSysColourChangedEvent swig_types[80]
2543 #define SWIGTYPE_p_wxTIFFHandler swig_types[81]
2544 #define SWIGTYPE_p_wxUpdateUIEvent swig_types[82]
2545 #define SWIGTYPE_p_wxValidator swig_types[83]
2546 #define SWIGTYPE_p_wxWindow swig_types[84]
2547 #define SWIGTYPE_p_wxWindowCreateEvent swig_types[85]
2548 #define SWIGTYPE_p_wxWindowDestroyEvent swig_types[86]
2549 #define SWIGTYPE_p_wxXPMHandler swig_types[87]
2550 static swig_type_info *swig_types[89];
2551 static swig_module_info swig_module = {swig_types, 88, 0, 0, 0, 0};
2552 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2553 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2554
2555 /* -------- TYPES TABLE (END) -------- */
2556
2557 #if (PY_VERSION_HEX <= 0x02000000)
2558 # if !defined(SWIG_PYTHON_CLASSIC)
2559 # error "This python version requires to use swig with the '-classic' option"
2560 # endif
2561 #endif
2562 #if (PY_VERSION_HEX <= 0x02020000)
2563 # error "This python version requires to use swig with the '-nomodern' option"
2564 #endif
2565 #if (PY_VERSION_HEX <= 0x02020000)
2566 # error "This python version requires to use swig with the '-nomodernargs' option"
2567 #endif
2568 #ifndef METH_O
2569 # error "This python version requires to use swig with the '-nofastunpack' option"
2570 #endif
2571
2572 /*-----------------------------------------------
2573 @(target):= _glcanvas.so
2574 ------------------------------------------------*/
2575 #define SWIG_init init_glcanvas
2576
2577 #define SWIG_name "_glcanvas"
2578
2579 #define SWIGVERSION 0x010329
2580
2581
2582 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2583 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2584
2585
2586 #include <stdexcept>
2587
2588
2589 namespace swig {
2590 class PyObject_ptr {
2591 protected:
2592 PyObject *_obj;
2593
2594 public:
2595 PyObject_ptr() :_obj(0)
2596 {
2597 }
2598
2599 PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
2600 {
2601 Py_XINCREF(_obj);
2602 }
2603
2604 PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
2605 {
2606 if (initial_ref) Py_XINCREF(_obj);
2607 }
2608
2609 PyObject_ptr & operator=(const PyObject_ptr& item)
2610 {
2611 Py_XINCREF(item._obj);
2612 Py_XDECREF(_obj);
2613 _obj = item._obj;
2614 return *this;
2615 }
2616
2617 ~PyObject_ptr()
2618 {
2619 Py_XDECREF(_obj);
2620 }
2621
2622 operator PyObject *() const
2623 {
2624 return _obj;
2625 }
2626
2627 PyObject *operator->() const
2628 {
2629 return _obj;
2630 }
2631 };
2632 }
2633
2634
2635 namespace swig {
2636 struct PyObject_var : PyObject_ptr {
2637 PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
2638
2639 PyObject_var & operator = (PyObject* obj)
2640 {
2641 Py_XDECREF(_obj);
2642 _obj = obj;
2643 return *this;
2644 }
2645 };
2646 }
2647
2648
2649 #include "wx/wxPython/wxPython.h"
2650 #include "wx/wxPython/pyclasses.h"
2651
2652 #include <wx/glcanvas.h>
2653
2654
2655 static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
2656 static const wxString wxPyEmptyString(wxEmptyString);
2657
2658 SWIGINTERN int
2659 SWIG_AsVal_long (PyObject* obj, long* val)
2660 {
2661 if (PyNumber_Check(obj)) {
2662 if (val) *val = PyInt_AsLong(obj);
2663 return SWIG_OK;
2664 }
2665 return SWIG_TypeError;
2666 }
2667
2668
2669 SWIGINTERN int
2670 SWIG_AsVal_bool (PyObject *obj, bool *val)
2671 {
2672 if (obj == Py_True) {
2673 if (val) *val = true;
2674 return SWIG_OK;
2675 } else if (obj == Py_False) {
2676 if (val) *val = false;
2677 return SWIG_OK;
2678 } else {
2679 long v = 0;
2680 int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0));
2681 if (SWIG_IsOK(res) && val) *val = v ? true : false;
2682 return res;
2683 }
2684 }
2685
2686
2687 #define SWIG_From_long PyInt_FromLong
2688
2689
2690 SWIGINTERNINLINE PyObject *
2691 SWIG_From_int (int value)
2692 {
2693 return SWIG_From_long (value);
2694 }
2695
2696
2697 #include <limits.h>
2698 #ifndef LLONG_MIN
2699 # define LLONG_MIN LONG_LONG_MIN
2700 #endif
2701 #ifndef LLONG_MAX
2702 # define LLONG_MAX LONG_LONG_MAX
2703 #endif
2704 #ifndef ULLONG_MAX
2705 # define ULLONG_MAX ULONG_LONG_MAX
2706 #endif
2707
2708
2709 SWIGINTERN int
2710 SWIG_AsVal_int (PyObject * obj, int *val)
2711 {
2712 long v;
2713 int res = SWIG_AsVal_long (obj, &v);
2714 if (SWIG_IsOK(res)) {
2715 if ((v < INT_MIN || v > INT_MAX)) {
2716 return SWIG_OverflowError;
2717 } else {
2718 if (val) *val = static_cast< int >(v);
2719 }
2720 }
2721 return res;
2722 }
2723
2724 #ifdef __cplusplus
2725 extern "C" {
2726 #endif
2727 SWIGINTERN int GLCanvasNameStr_set(PyObject *) {
2728 SWIG_Error(SWIG_AttributeError,"Variable GLCanvasNameStr is read-only.");
2729 return 1;
2730 }
2731
2732
2733 SWIGINTERN PyObject *GLCanvasNameStr_get(void) {
2734 PyObject *pyobj = 0;
2735
2736 {
2737 #if wxUSE_UNICODE
2738 pyobj = PyUnicode_FromWideChar((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len());
2739 #else
2740 pyobj = PyString_FromStringAndSize((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len());
2741 #endif
2742 }
2743 return pyobj;
2744 }
2745
2746
2747 SWIGINTERN PyObject *_wrap_new_GLContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
2748 PyObject *resultobj = 0;
2749 bool arg1 ;
2750 wxGLCanvas *arg2 = (wxGLCanvas *) 0 ;
2751 wxPalette const &arg3_defvalue = wxNullPalette ;
2752 wxPalette *arg3 = (wxPalette *) &arg3_defvalue ;
2753 wxGLContext *arg4 = (wxGLContext *) NULL ;
2754 wxGLContext *result = 0 ;
2755 bool val1 ;
2756 int ecode1 = 0 ;
2757 void *argp2 = 0 ;
2758 int res2 = 0 ;
2759 void *argp3 = 0 ;
2760 int res3 = 0 ;
2761 void *argp4 = 0 ;
2762 int res4 = 0 ;
2763 PyObject * obj0 = 0 ;
2764 PyObject * obj1 = 0 ;
2765 PyObject * obj2 = 0 ;
2766 PyObject * obj3 = 0 ;
2767 char * kwnames[] = {
2768 (char *) "isRGB",(char *) "win",(char *) "palette",(char *) "other", NULL
2769 };
2770
2771 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_GLContext",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
2772 ecode1 = SWIG_AsVal_bool(obj0, &val1);
2773 if (!SWIG_IsOK(ecode1)) {
2774 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GLContext" "', expected argument " "1"" of type '" "bool""'");
2775 }
2776 arg1 = static_cast< bool >(val1);
2777 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
2778 if (!SWIG_IsOK(res2)) {
2779 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GLContext" "', expected argument " "2"" of type '" "wxGLCanvas *""'");
2780 }
2781 arg2 = reinterpret_cast< wxGLCanvas * >(argp2);
2782 if (obj2) {
2783 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxPalette, 0 | 0);
2784 if (!SWIG_IsOK(res3)) {
2785 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GLContext" "', expected argument " "3"" of type '" "wxPalette const &""'");
2786 }
2787 if (!argp3) {
2788 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GLContext" "', expected argument " "3"" of type '" "wxPalette const &""'");
2789 }
2790 arg3 = reinterpret_cast< wxPalette * >(argp3);
2791 }
2792 if (obj3) {
2793 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_wxGLContext, 0 | 0 );
2794 if (!SWIG_IsOK(res4)) {
2795 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GLContext" "', expected argument " "4"" of type '" "wxGLContext const *""'");
2796 }
2797 arg4 = reinterpret_cast< wxGLContext * >(argp4);
2798 }
2799 {
2800 if (!wxPyCheckForApp()) SWIG_fail;
2801 PyThreadState* __tstate = wxPyBeginAllowThreads();
2802 result = (wxGLContext *)new wxGLContext(arg1,arg2,(wxPalette const &)*arg3,(wxGLContext const *)arg4);
2803 wxPyEndAllowThreads(__tstate);
2804 if (PyErr_Occurred()) SWIG_fail;
2805 }
2806 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGLContext, SWIG_POINTER_NEW | 0 );
2807 return resultobj;
2808 fail:
2809 return NULL;
2810 }
2811
2812
2813 SWIGINTERN PyObject *_wrap_delete_GLContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2814 PyObject *resultobj = 0;
2815 wxGLContext *arg1 = (wxGLContext *) 0 ;
2816 void *argp1 = 0 ;
2817 int res1 = 0 ;
2818 PyObject *swig_obj[1] ;
2819
2820 if (!args) SWIG_fail;
2821 swig_obj[0] = args;
2822 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLContext, SWIG_POINTER_DISOWN | 0 );
2823 if (!SWIG_IsOK(res1)) {
2824 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GLContext" "', expected argument " "1"" of type '" "wxGLContext *""'");
2825 }
2826 arg1 = reinterpret_cast< wxGLContext * >(argp1);
2827 {
2828 PyThreadState* __tstate = wxPyBeginAllowThreads();
2829 delete arg1;
2830
2831 wxPyEndAllowThreads(__tstate);
2832 if (PyErr_Occurred()) SWIG_fail;
2833 }
2834 resultobj = SWIG_Py_Void();
2835 return resultobj;
2836 fail:
2837 return NULL;
2838 }
2839
2840
2841 SWIGINTERN PyObject *_wrap_GLContext_SetCurrent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2842 PyObject *resultobj = 0;
2843 wxGLContext *arg1 = (wxGLContext *) 0 ;
2844 void *argp1 = 0 ;
2845 int res1 = 0 ;
2846 PyObject *swig_obj[1] ;
2847
2848 if (!args) SWIG_fail;
2849 swig_obj[0] = args;
2850 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLContext, 0 | 0 );
2851 if (!SWIG_IsOK(res1)) {
2852 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLContext_SetCurrent" "', expected argument " "1"" of type '" "wxGLContext *""'");
2853 }
2854 arg1 = reinterpret_cast< wxGLContext * >(argp1);
2855 {
2856 PyThreadState* __tstate = wxPyBeginAllowThreads();
2857 (arg1)->SetCurrent();
2858 wxPyEndAllowThreads(__tstate);
2859 if (PyErr_Occurred()) SWIG_fail;
2860 }
2861 resultobj = SWIG_Py_Void();
2862 return resultobj;
2863 fail:
2864 return NULL;
2865 }
2866
2867
2868 SWIGINTERN PyObject *_wrap_GLContext_SetColour(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
2869 PyObject *resultobj = 0;
2870 wxGLContext *arg1 = (wxGLContext *) 0 ;
2871 wxString *arg2 = 0 ;
2872 void *argp1 = 0 ;
2873 int res1 = 0 ;
2874 bool temp2 = false ;
2875 PyObject * obj0 = 0 ;
2876 PyObject * obj1 = 0 ;
2877 char * kwnames[] = {
2878 (char *) "self",(char *) "colour", NULL
2879 };
2880
2881 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GLContext_SetColour",kwnames,&obj0,&obj1)) SWIG_fail;
2882 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGLContext, 0 | 0 );
2883 if (!SWIG_IsOK(res1)) {
2884 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLContext_SetColour" "', expected argument " "1"" of type '" "wxGLContext *""'");
2885 }
2886 arg1 = reinterpret_cast< wxGLContext * >(argp1);
2887 {
2888 arg2 = wxString_in_helper(obj1);
2889 if (arg2 == NULL) SWIG_fail;
2890 temp2 = true;
2891 }
2892 {
2893 PyThreadState* __tstate = wxPyBeginAllowThreads();
2894 (arg1)->SetColour((wxString const &)*arg2);
2895 wxPyEndAllowThreads(__tstate);
2896 if (PyErr_Occurred()) SWIG_fail;
2897 }
2898 resultobj = SWIG_Py_Void();
2899 {
2900 if (temp2)
2901 delete arg2;
2902 }
2903 return resultobj;
2904 fail:
2905 {
2906 if (temp2)
2907 delete arg2;
2908 }
2909 return NULL;
2910 }
2911
2912
2913 SWIGINTERN PyObject *_wrap_GLContext_SwapBuffers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2914 PyObject *resultobj = 0;
2915 wxGLContext *arg1 = (wxGLContext *) 0 ;
2916 void *argp1 = 0 ;
2917 int res1 = 0 ;
2918 PyObject *swig_obj[1] ;
2919
2920 if (!args) SWIG_fail;
2921 swig_obj[0] = args;
2922 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLContext, 0 | 0 );
2923 if (!SWIG_IsOK(res1)) {
2924 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLContext_SwapBuffers" "', expected argument " "1"" of type '" "wxGLContext *""'");
2925 }
2926 arg1 = reinterpret_cast< wxGLContext * >(argp1);
2927 {
2928 PyThreadState* __tstate = wxPyBeginAllowThreads();
2929 (arg1)->SwapBuffers();
2930 wxPyEndAllowThreads(__tstate);
2931 if (PyErr_Occurred()) SWIG_fail;
2932 }
2933 resultobj = SWIG_Py_Void();
2934 return resultobj;
2935 fail:
2936 return NULL;
2937 }
2938
2939
2940 SWIGINTERN PyObject *_wrap_GLContext_GetWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2941 PyObject *resultobj = 0;
2942 wxGLContext *arg1 = (wxGLContext *) 0 ;
2943 wxWindow *result = 0 ;
2944 void *argp1 = 0 ;
2945 int res1 = 0 ;
2946 PyObject *swig_obj[1] ;
2947
2948 if (!args) SWIG_fail;
2949 swig_obj[0] = args;
2950 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLContext, 0 | 0 );
2951 if (!SWIG_IsOK(res1)) {
2952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLContext_GetWindow" "', expected argument " "1"" of type '" "wxGLContext *""'");
2953 }
2954 arg1 = reinterpret_cast< wxGLContext * >(argp1);
2955 {
2956 PyThreadState* __tstate = wxPyBeginAllowThreads();
2957 result = (wxWindow *)(arg1)->GetWindow();
2958 wxPyEndAllowThreads(__tstate);
2959 if (PyErr_Occurred()) SWIG_fail;
2960 }
2961 {
2962 resultobj = wxPyMake_wxObject(result, 0);
2963 }
2964 return resultobj;
2965 fail:
2966 return NULL;
2967 }
2968
2969
2970 SWIGINTERN PyObject *GLContext_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2971 PyObject *obj;
2972 if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
2973 SWIG_TypeNewClientData(SWIGTYPE_p_wxGLContext, SWIG_NewClientData(obj));
2974 return SWIG_Py_Void();
2975 }
2976
2977 SWIGINTERN PyObject *GLContext_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2978 return SWIG_Python_InitShadowInstance(args);
2979 }
2980
2981 SWIGINTERN PyObject *_wrap_new_GLCanvas(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
2982 PyObject *resultobj = 0;
2983 wxWindow *arg1 = (wxWindow *) 0 ;
2984 int arg2 = (int) -1 ;
2985 wxPoint const &arg3_defvalue = wxDefaultPosition ;
2986 wxPoint *arg3 = (wxPoint *) &arg3_defvalue ;
2987 wxSize const &arg4_defvalue = wxDefaultSize ;
2988 wxSize *arg4 = (wxSize *) &arg4_defvalue ;
2989 long arg5 = (long) 0 ;
2990 wxString const &arg6_defvalue = wxPyGLCanvasNameStr ;
2991 wxString *arg6 = (wxString *) &arg6_defvalue ;
2992 int *arg7 = (int *) NULL ;
2993 wxPalette const &arg8_defvalue = wxNullPalette ;
2994 wxPalette *arg8 = (wxPalette *) &arg8_defvalue ;
2995 wxGLCanvas *result = 0 ;
2996 void *argp1 = 0 ;
2997 int res1 = 0 ;
2998 int val2 ;
2999 int ecode2 = 0 ;
3000 wxPoint temp3 ;
3001 wxSize temp4 ;
3002 long val5 ;
3003 int ecode5 = 0 ;
3004 bool temp6 = false ;
3005 int *temp7 ;
3006 void *argp8 = 0 ;
3007 int res8 = 0 ;
3008 PyObject * obj0 = 0 ;
3009 PyObject * obj1 = 0 ;
3010 PyObject * obj2 = 0 ;
3011 PyObject * obj3 = 0 ;
3012 PyObject * obj4 = 0 ;
3013 PyObject * obj5 = 0 ;
3014 PyObject * obj6 = 0 ;
3015 PyObject * obj7 = 0 ;
3016 char * kwnames[] = {
3017 (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name",(char *) "attribList",(char *) "palette", NULL
3018 };
3019
3020 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_GLCanvas",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
3021 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 );
3022 if (!SWIG_IsOK(res1)) {
3023 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GLCanvas" "', expected argument " "1"" of type '" "wxWindow *""'");
3024 }
3025 arg1 = reinterpret_cast< wxWindow * >(argp1);
3026 if (obj1) {
3027 ecode2 = SWIG_AsVal_int(obj1, &val2);
3028 if (!SWIG_IsOK(ecode2)) {
3029 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GLCanvas" "', expected argument " "2"" of type '" "int""'");
3030 }
3031 arg2 = static_cast< int >(val2);
3032 }
3033 if (obj2) {
3034 {
3035 arg3 = &temp3;
3036 if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail;
3037 }
3038 }
3039 if (obj3) {
3040 {
3041 arg4 = &temp4;
3042 if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail;
3043 }
3044 }
3045 if (obj4) {
3046 ecode5 = SWIG_AsVal_long(obj4, &val5);
3047 if (!SWIG_IsOK(ecode5)) {
3048 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GLCanvas" "', expected argument " "5"" of type '" "long""'");
3049 }
3050 arg5 = static_cast< long >(val5);
3051 }
3052 if (obj5) {
3053 {
3054 arg6 = wxString_in_helper(obj5);
3055 if (arg6 == NULL) SWIG_fail;
3056 temp6 = true;
3057 }
3058 }
3059 if (obj6) {
3060 {
3061 int i;
3062 if (PySequence_Check(obj6)) {
3063 int size = PyObject_Length(obj6);
3064 temp7 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
3065 for (i = 0; i < size; i++) {
3066 temp7[i] = PyInt_AsLong(PySequence_GetItem(obj6, i));
3067 }
3068 temp7[size] = 0;
3069 arg7 = temp7;
3070 }
3071 }
3072 }
3073 if (obj7) {
3074 res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_wxPalette, 0 | 0);
3075 if (!SWIG_IsOK(res8)) {
3076 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_GLCanvas" "', expected argument " "8"" of type '" "wxPalette const &""'");
3077 }
3078 if (!argp8) {
3079 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GLCanvas" "', expected argument " "8"" of type '" "wxPalette const &""'");
3080 }
3081 arg8 = reinterpret_cast< wxPalette * >(argp8);
3082 }
3083 {
3084 if (!wxPyCheckForApp()) SWIG_fail;
3085 PyThreadState* __tstate = wxPyBeginAllowThreads();
3086 result = (wxGLCanvas *)new wxGLCanvas(arg1,arg2,(wxPoint const &)*arg3,(wxSize const &)*arg4,arg5,(wxString const &)*arg6,arg7,(wxPalette const &)*arg8);
3087 wxPyEndAllowThreads(__tstate);
3088 if (PyErr_Occurred()) SWIG_fail;
3089 }
3090 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGLCanvas, SWIG_POINTER_NEW | 0 );
3091 {
3092 if (temp6)
3093 delete arg6;
3094 }
3095 {
3096 delete [] arg7;
3097 }
3098 return resultobj;
3099 fail:
3100 {
3101 if (temp6)
3102 delete arg6;
3103 }
3104 {
3105 delete [] arg7;
3106 }
3107 return NULL;
3108 }
3109
3110
3111 SWIGINTERN PyObject *_wrap_new_GLCanvasWithContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
3112 PyObject *resultobj = 0;
3113 wxWindow *arg1 = (wxWindow *) 0 ;
3114 wxGLContext *arg2 = (wxGLContext *) NULL ;
3115 int arg3 = (int) -1 ;
3116 wxPoint const &arg4_defvalue = wxDefaultPosition ;
3117 wxPoint *arg4 = (wxPoint *) &arg4_defvalue ;
3118 wxSize const &arg5_defvalue = wxDefaultSize ;
3119 wxSize *arg5 = (wxSize *) &arg5_defvalue ;
3120 long arg6 = (long) 0 ;
3121 wxString const &arg7_defvalue = wxPyGLCanvasNameStr ;
3122 wxString *arg7 = (wxString *) &arg7_defvalue ;
3123 int *arg8 = (int *) NULL ;
3124 wxPalette const &arg9_defvalue = wxNullPalette ;
3125 wxPalette *arg9 = (wxPalette *) &arg9_defvalue ;
3126 wxGLCanvas *result = 0 ;
3127 void *argp1 = 0 ;
3128 int res1 = 0 ;
3129 void *argp2 = 0 ;
3130 int res2 = 0 ;
3131 int val3 ;
3132 int ecode3 = 0 ;
3133 wxPoint temp4 ;
3134 wxSize temp5 ;
3135 long val6 ;
3136 int ecode6 = 0 ;
3137 bool temp7 = false ;
3138 int *temp8 ;
3139 void *argp9 = 0 ;
3140 int res9 = 0 ;
3141 PyObject * obj0 = 0 ;
3142 PyObject * obj1 = 0 ;
3143 PyObject * obj2 = 0 ;
3144 PyObject * obj3 = 0 ;
3145 PyObject * obj4 = 0 ;
3146 PyObject * obj5 = 0 ;
3147 PyObject * obj6 = 0 ;
3148 PyObject * obj7 = 0 ;
3149 PyObject * obj8 = 0 ;
3150 char * kwnames[] = {
3151 (char *) "parent",(char *) "shared",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name",(char *) "attribList",(char *) "palette", NULL
3152 };
3153
3154 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOOO:new_GLCanvasWithContext",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
3155 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 );
3156 if (!SWIG_IsOK(res1)) {
3157 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GLCanvasWithContext" "', expected argument " "1"" of type '" "wxWindow *""'");
3158 }
3159 arg1 = reinterpret_cast< wxWindow * >(argp1);
3160 if (obj1) {
3161 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_wxGLContext, 0 | 0 );
3162 if (!SWIG_IsOK(res2)) {
3163 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GLCanvasWithContext" "', expected argument " "2"" of type '" "wxGLContext const *""'");
3164 }
3165 arg2 = reinterpret_cast< wxGLContext * >(argp2);
3166 }
3167 if (obj2) {
3168 ecode3 = SWIG_AsVal_int(obj2, &val3);
3169 if (!SWIG_IsOK(ecode3)) {
3170 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GLCanvasWithContext" "', expected argument " "3"" of type '" "int""'");
3171 }
3172 arg3 = static_cast< int >(val3);
3173 }
3174 if (obj3) {
3175 {
3176 arg4 = &temp4;
3177 if ( ! wxPoint_helper(obj3, &arg4)) SWIG_fail;
3178 }
3179 }
3180 if (obj4) {
3181 {
3182 arg5 = &temp5;
3183 if ( ! wxSize_helper(obj4, &arg5)) SWIG_fail;
3184 }
3185 }
3186 if (obj5) {
3187 ecode6 = SWIG_AsVal_long(obj5, &val6);
3188 if (!SWIG_IsOK(ecode6)) {
3189 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GLCanvasWithContext" "', expected argument " "6"" of type '" "long""'");
3190 }
3191 arg6 = static_cast< long >(val6);
3192 }
3193 if (obj6) {
3194 {
3195 arg7 = wxString_in_helper(obj6);
3196 if (arg7 == NULL) SWIG_fail;
3197 temp7 = true;
3198 }
3199 }
3200 if (obj7) {
3201 {
3202 int i;
3203 if (PySequence_Check(obj7)) {
3204 int size = PyObject_Length(obj7);
3205 temp8 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
3206 for (i = 0; i < size; i++) {
3207 temp8[i] = PyInt_AsLong(PySequence_GetItem(obj7, i));
3208 }
3209 temp8[size] = 0;
3210 arg8 = temp8;
3211 }
3212 }
3213 }
3214 if (obj8) {
3215 res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_wxPalette, 0 | 0);
3216 if (!SWIG_IsOK(res9)) {
3217 SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_GLCanvasWithContext" "', expected argument " "9"" of type '" "wxPalette const &""'");
3218 }
3219 if (!argp9) {
3220 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GLCanvasWithContext" "', expected argument " "9"" of type '" "wxPalette const &""'");
3221 }
3222 arg9 = reinterpret_cast< wxPalette * >(argp9);
3223 }
3224 {
3225 if (!wxPyCheckForApp()) SWIG_fail;
3226 PyThreadState* __tstate = wxPyBeginAllowThreads();
3227 result = (wxGLCanvas *)new wxGLCanvas(arg1,(wxGLContext const *)arg2,arg3,(wxPoint const &)*arg4,(wxSize const &)*arg5,arg6,(wxString const &)*arg7,arg8,(wxPalette const &)*arg9);
3228 wxPyEndAllowThreads(__tstate);
3229 if (PyErr_Occurred()) SWIG_fail;
3230 }
3231 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGLCanvas, SWIG_POINTER_OWN | 0 );
3232 {
3233 if (temp7)
3234 delete arg7;
3235 }
3236 {
3237 delete [] arg8;
3238 }
3239 return resultobj;
3240 fail:
3241 {
3242 if (temp7)
3243 delete arg7;
3244 }
3245 {
3246 delete [] arg8;
3247 }
3248 return NULL;
3249 }
3250
3251
3252 SWIGINTERN PyObject *_wrap_GLCanvas_SetCurrent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3253 PyObject *resultobj = 0;
3254 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3255 void *argp1 = 0 ;
3256 int res1 = 0 ;
3257 PyObject *swig_obj[1] ;
3258
3259 if (!args) SWIG_fail;
3260 swig_obj[0] = args;
3261 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3262 if (!SWIG_IsOK(res1)) {
3263 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_SetCurrent" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3264 }
3265 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3266 {
3267 PyThreadState* __tstate = wxPyBeginAllowThreads();
3268 (arg1)->SetCurrent();
3269 wxPyEndAllowThreads(__tstate);
3270 if (PyErr_Occurred()) SWIG_fail;
3271 }
3272 resultobj = SWIG_Py_Void();
3273 return resultobj;
3274 fail:
3275 return NULL;
3276 }
3277
3278
3279 SWIGINTERN PyObject *_wrap_GLCanvas_SetColour(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
3280 PyObject *resultobj = 0;
3281 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3282 wxString *arg2 = 0 ;
3283 void *argp1 = 0 ;
3284 int res1 = 0 ;
3285 bool temp2 = false ;
3286 PyObject * obj0 = 0 ;
3287 PyObject * obj1 = 0 ;
3288 char * kwnames[] = {
3289 (char *) "self",(char *) "colour", NULL
3290 };
3291
3292 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GLCanvas_SetColour",kwnames,&obj0,&obj1)) SWIG_fail;
3293 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3294 if (!SWIG_IsOK(res1)) {
3295 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_SetColour" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3296 }
3297 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3298 {
3299 arg2 = wxString_in_helper(obj1);
3300 if (arg2 == NULL) SWIG_fail;
3301 temp2 = true;
3302 }
3303 {
3304 PyThreadState* __tstate = wxPyBeginAllowThreads();
3305 (arg1)->SetColour((wxString const &)*arg2);
3306 wxPyEndAllowThreads(__tstate);
3307 if (PyErr_Occurred()) SWIG_fail;
3308 }
3309 resultobj = SWIG_Py_Void();
3310 {
3311 if (temp2)
3312 delete arg2;
3313 }
3314 return resultobj;
3315 fail:
3316 {
3317 if (temp2)
3318 delete arg2;
3319 }
3320 return NULL;
3321 }
3322
3323
3324 SWIGINTERN PyObject *_wrap_GLCanvas_SwapBuffers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3325 PyObject *resultobj = 0;
3326 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3327 void *argp1 = 0 ;
3328 int res1 = 0 ;
3329 PyObject *swig_obj[1] ;
3330
3331 if (!args) SWIG_fail;
3332 swig_obj[0] = args;
3333 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3334 if (!SWIG_IsOK(res1)) {
3335 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_SwapBuffers" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3336 }
3337 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3338 {
3339 PyThreadState* __tstate = wxPyBeginAllowThreads();
3340 (arg1)->SwapBuffers();
3341 wxPyEndAllowThreads(__tstate);
3342 if (PyErr_Occurred()) SWIG_fail;
3343 }
3344 resultobj = SWIG_Py_Void();
3345 return resultobj;
3346 fail:
3347 return NULL;
3348 }
3349
3350
3351 SWIGINTERN PyObject *_wrap_GLCanvas_GetContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3352 PyObject *resultobj = 0;
3353 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3354 wxGLContext *result = 0 ;
3355 void *argp1 = 0 ;
3356 int res1 = 0 ;
3357 PyObject *swig_obj[1] ;
3358
3359 if (!args) SWIG_fail;
3360 swig_obj[0] = args;
3361 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3362 if (!SWIG_IsOK(res1)) {
3363 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_GetContext" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3364 }
3365 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3366 {
3367 PyThreadState* __tstate = wxPyBeginAllowThreads();
3368 result = (wxGLContext *)(arg1)->GetContext();
3369 wxPyEndAllowThreads(__tstate);
3370 if (PyErr_Occurred()) SWIG_fail;
3371 }
3372 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGLContext, 0 | 0 );
3373 return resultobj;
3374 fail:
3375 return NULL;
3376 }
3377
3378
3379 SWIGINTERN PyObject *_wrap_GLCanvas_SetupPixelFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
3380 PyObject *resultobj = 0;
3381 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3382 int *arg2 = (int *) NULL ;
3383 void *argp1 = 0 ;
3384 int res1 = 0 ;
3385 int *temp2 ;
3386 PyObject * obj0 = 0 ;
3387 PyObject * obj1 = 0 ;
3388 char * kwnames[] = {
3389 (char *) "self",(char *) "attribList", NULL
3390 };
3391
3392 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GLCanvas_SetupPixelFormat",kwnames,&obj0,&obj1)) SWIG_fail;
3393 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3394 if (!SWIG_IsOK(res1)) {
3395 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_SetupPixelFormat" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3396 }
3397 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3398 if (obj1) {
3399 {
3400 int i;
3401 if (PySequence_Check(obj1)) {
3402 int size = PyObject_Length(obj1);
3403 temp2 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
3404 for (i = 0; i < size; i++) {
3405 temp2[i] = PyInt_AsLong(PySequence_GetItem(obj1, i));
3406 }
3407 temp2[size] = 0;
3408 arg2 = temp2;
3409 }
3410 }
3411 }
3412 {
3413 PyThreadState* __tstate = wxPyBeginAllowThreads();
3414 (arg1)->SetupPixelFormat(arg2);
3415 wxPyEndAllowThreads(__tstate);
3416 if (PyErr_Occurred()) SWIG_fail;
3417 }
3418 resultobj = SWIG_Py_Void();
3419 {
3420 delete [] arg2;
3421 }
3422 return resultobj;
3423 fail:
3424 {
3425 delete [] arg2;
3426 }
3427 return NULL;
3428 }
3429
3430
3431 SWIGINTERN PyObject *_wrap_GLCanvas_SetupPalette(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
3432 PyObject *resultobj = 0;
3433 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3434 wxPalette *arg2 = 0 ;
3435 void *argp1 = 0 ;
3436 int res1 = 0 ;
3437 void *argp2 = 0 ;
3438 int res2 = 0 ;
3439 PyObject * obj0 = 0 ;
3440 PyObject * obj1 = 0 ;
3441 char * kwnames[] = {
3442 (char *) "self",(char *) "palette", NULL
3443 };
3444
3445 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GLCanvas_SetupPalette",kwnames,&obj0,&obj1)) SWIG_fail;
3446 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3447 if (!SWIG_IsOK(res1)) {
3448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_SetupPalette" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3449 }
3450 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3451 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxPalette, 0 | 0);
3452 if (!SWIG_IsOK(res2)) {
3453 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GLCanvas_SetupPalette" "', expected argument " "2"" of type '" "wxPalette const &""'");
3454 }
3455 if (!argp2) {
3456 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GLCanvas_SetupPalette" "', expected argument " "2"" of type '" "wxPalette const &""'");
3457 }
3458 arg2 = reinterpret_cast< wxPalette * >(argp2);
3459 {
3460 PyThreadState* __tstate = wxPyBeginAllowThreads();
3461 (arg1)->SetupPalette((wxPalette const &)*arg2);
3462 wxPyEndAllowThreads(__tstate);
3463 if (PyErr_Occurred()) SWIG_fail;
3464 }
3465 resultobj = SWIG_Py_Void();
3466 return resultobj;
3467 fail:
3468 return NULL;
3469 }
3470
3471
3472 SWIGINTERN PyObject *_wrap_GLCanvas_CreateDefaultPalette(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3473 PyObject *resultobj = 0;
3474 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3475 wxPalette result;
3476 void *argp1 = 0 ;
3477 int res1 = 0 ;
3478 PyObject *swig_obj[1] ;
3479
3480 if (!args) SWIG_fail;
3481 swig_obj[0] = args;
3482 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3483 if (!SWIG_IsOK(res1)) {
3484 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_CreateDefaultPalette" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3485 }
3486 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3487 {
3488 PyThreadState* __tstate = wxPyBeginAllowThreads();
3489 result = (arg1)->CreateDefaultPalette();
3490 wxPyEndAllowThreads(__tstate);
3491 if (PyErr_Occurred()) SWIG_fail;
3492 }
3493 resultobj = SWIG_NewPointerObj((new wxPalette(static_cast< const wxPalette& >(result))), SWIGTYPE_p_wxPalette, SWIG_POINTER_OWN | 0 );
3494 return resultobj;
3495 fail:
3496 return NULL;
3497 }
3498
3499
3500 SWIGINTERN PyObject *_wrap_GLCanvas_GetPalette(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3501 PyObject *resultobj = 0;
3502 wxGLCanvas *arg1 = (wxGLCanvas *) 0 ;
3503 wxPalette *result = 0 ;
3504 void *argp1 = 0 ;
3505 int res1 = 0 ;
3506 PyObject *swig_obj[1] ;
3507
3508 if (!args) SWIG_fail;
3509 swig_obj[0] = args;
3510 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGLCanvas, 0 | 0 );
3511 if (!SWIG_IsOK(res1)) {
3512 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLCanvas_GetPalette" "', expected argument " "1"" of type '" "wxGLCanvas *""'");
3513 }
3514 arg1 = reinterpret_cast< wxGLCanvas * >(argp1);
3515 {
3516 PyThreadState* __tstate = wxPyBeginAllowThreads();
3517 result = (wxPalette *)(arg1)->GetPalette();
3518 wxPyEndAllowThreads(__tstate);
3519 if (PyErr_Occurred()) SWIG_fail;
3520 }
3521 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxPalette, 0 | 0 );
3522 return resultobj;
3523 fail:
3524 return NULL;
3525 }
3526
3527
3528 SWIGINTERN PyObject *GLCanvas_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3529 PyObject *obj;
3530 if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
3531 SWIG_TypeNewClientData(SWIGTYPE_p_wxGLCanvas, SWIG_NewClientData(obj));
3532 return SWIG_Py_Void();
3533 }
3534
3535 SWIGINTERN PyObject *GLCanvas_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3536 return SWIG_Python_InitShadowInstance(args);
3537 }
3538
3539 static PyMethodDef SwigMethods[] = {
3540 { (char *)"new_GLContext", (PyCFunction) _wrap_new_GLContext, METH_VARARGS | METH_KEYWORDS, NULL},
3541 { (char *)"delete_GLContext", (PyCFunction)_wrap_delete_GLContext, METH_O, NULL},
3542 { (char *)"GLContext_SetCurrent", (PyCFunction)_wrap_GLContext_SetCurrent, METH_O, NULL},
3543 { (char *)"GLContext_SetColour", (PyCFunction) _wrap_GLContext_SetColour, METH_VARARGS | METH_KEYWORDS, NULL},
3544 { (char *)"GLContext_SwapBuffers", (PyCFunction)_wrap_GLContext_SwapBuffers, METH_O, NULL},
3545 { (char *)"GLContext_GetWindow", (PyCFunction)_wrap_GLContext_GetWindow, METH_O, NULL},
3546 { (char *)"GLContext_swigregister", GLContext_swigregister, METH_VARARGS, NULL},
3547 { (char *)"GLContext_swiginit", GLContext_swiginit, METH_VARARGS, NULL},
3548 { (char *)"new_GLCanvas", (PyCFunction) _wrap_new_GLCanvas, METH_VARARGS | METH_KEYWORDS, NULL},
3549 { (char *)"new_GLCanvasWithContext", (PyCFunction) _wrap_new_GLCanvasWithContext, METH_VARARGS | METH_KEYWORDS, NULL},
3550 { (char *)"GLCanvas_SetCurrent", (PyCFunction)_wrap_GLCanvas_SetCurrent, METH_O, NULL},
3551 { (char *)"GLCanvas_SetColour", (PyCFunction) _wrap_GLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS, NULL},
3552 { (char *)"GLCanvas_SwapBuffers", (PyCFunction)_wrap_GLCanvas_SwapBuffers, METH_O, NULL},
3553 { (char *)"GLCanvas_GetContext", (PyCFunction)_wrap_GLCanvas_GetContext, METH_O, NULL},
3554 { (char *)"GLCanvas_SetupPixelFormat", (PyCFunction) _wrap_GLCanvas_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS, NULL},
3555 { (char *)"GLCanvas_SetupPalette", (PyCFunction) _wrap_GLCanvas_SetupPalette, METH_VARARGS | METH_KEYWORDS, NULL},
3556 { (char *)"GLCanvas_CreateDefaultPalette", (PyCFunction)_wrap_GLCanvas_CreateDefaultPalette, METH_O, NULL},
3557 { (char *)"GLCanvas_GetPalette", (PyCFunction)_wrap_GLCanvas_GetPalette, METH_O, NULL},
3558 { (char *)"GLCanvas_swigregister", GLCanvas_swigregister, METH_VARARGS, NULL},
3559 { (char *)"GLCanvas_swiginit", GLCanvas_swiginit, METH_VARARGS, NULL},
3560 { NULL, NULL, 0, NULL }
3561 };
3562
3563
3564 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3565
3566 static void *_p_wxLayoutConstraintsTo_p_wxObject(void *x) {
3567 return (void *)((wxObject *) ((wxLayoutConstraints *) x));
3568 }
3569 static void *_p_wxGBSizerItemTo_p_wxObject(void *x) {
3570 return (void *)((wxObject *) (wxSizerItem *) ((wxGBSizerItem *) x));
3571 }
3572 static void *_p_wxSizerItemTo_p_wxObject(void *x) {
3573 return (void *)((wxObject *) ((wxSizerItem *) x));
3574 }
3575 static void *_p_wxScrollEventTo_p_wxObject(void *x) {
3576 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxScrollEvent *) x));
3577 }
3578 static void *_p_wxIndividualLayoutConstraintTo_p_wxObject(void *x) {
3579 return (void *)((wxObject *) ((wxIndividualLayoutConstraint *) x));
3580 }
3581 static void *_p_wxStaticBoxSizerTo_p_wxObject(void *x) {
3582 return (void *)((wxObject *) (wxSizer *)(wxBoxSizer *) ((wxStaticBoxSizer *) x));
3583 }
3584 static void *_p_wxBoxSizerTo_p_wxObject(void *x) {
3585 return (void *)((wxObject *) (wxSizer *) ((wxBoxSizer *) x));
3586 }
3587 static void *_p_wxSizerTo_p_wxObject(void *x) {
3588 return (void *)((wxObject *) ((wxSizer *) x));
3589 }
3590 static void *_p_wxGridBagSizerTo_p_wxObject(void *x) {
3591 return (void *)((wxObject *) (wxSizer *)(wxGridSizer *)(wxFlexGridSizer *) ((wxGridBagSizer *) x));
3592 }
3593 static void *_p_wxUpdateUIEventTo_p_wxObject(void *x) {
3594 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxUpdateUIEvent *) x));
3595 }
3596 static void *_p_wxEventTo_p_wxObject(void *x) {
3597 return (void *)((wxObject *) ((wxEvent *) x));
3598 }
3599 static void *_p_wxFlexGridSizerTo_p_wxObject(void *x) {
3600 return (void *)((wxObject *) (wxSizer *)(wxGridSizer *) ((wxFlexGridSizer *) x));
3601 }
3602 static void *_p_wxGridSizerTo_p_wxObject(void *x) {
3603 return (void *)((wxObject *) (wxSizer *) ((wxGridSizer *) x));
3604 }
3605 static void *_p_wxInitDialogEventTo_p_wxObject(void *x) {
3606 return (void *)((wxObject *) (wxEvent *) ((wxInitDialogEvent *) x));
3607 }
3608 static void *_p_wxPaintEventTo_p_wxObject(void *x) {
3609 return (void *)((wxObject *) (wxEvent *) ((wxPaintEvent *) x));
3610 }
3611 static void *_p_wxNcPaintEventTo_p_wxObject(void *x) {
3612 return (void *)((wxObject *) (wxEvent *) ((wxNcPaintEvent *) x));
3613 }
3614 static void *_p_wxPaletteChangedEventTo_p_wxObject(void *x) {
3615 return (void *)((wxObject *) (wxEvent *) ((wxPaletteChangedEvent *) x));
3616 }
3617 static void *_p_wxDisplayChangedEventTo_p_wxObject(void *x) {
3618 return (void *)((wxObject *) (wxEvent *) ((wxDisplayChangedEvent *) x));
3619 }
3620 static void *_p_wxMouseCaptureChangedEventTo_p_wxObject(void *x) {
3621 return (void *)((wxObject *) (wxEvent *) ((wxMouseCaptureChangedEvent *) x));
3622 }
3623 static void *_p_wxSysColourChangedEventTo_p_wxObject(void *x) {
3624 return (void *)((wxObject *) (wxEvent *) ((wxSysColourChangedEvent *) x));
3625 }
3626 static void *_p_wxControlTo_p_wxObject(void *x) {
3627 return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *) ((wxControl *) x));
3628 }
3629 static void *_p_wxSetCursorEventTo_p_wxObject(void *x) {
3630 return (void *)((wxObject *) (wxEvent *) ((wxSetCursorEvent *) x));
3631 }
3632 static void *_p_wxFSFileTo_p_wxObject(void *x) {
3633 return (void *)((wxObject *) ((wxFSFile *) x));
3634 }
3635 static void *_p_wxPySizerTo_p_wxObject(void *x) {
3636 return (void *)((wxObject *) (wxSizer *) ((wxPySizer *) x));
3637 }
3638 static void *_p_wxPyEventTo_p_wxObject(void *x) {
3639 return (void *)((wxObject *) (wxEvent *) ((wxPyEvent *) x));
3640 }
3641 static void *_p_wxNotifyEventTo_p_wxObject(void *x) {
3642 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxNotifyEvent *) x));
3643 }
3644 static void *_p_wxGLContextTo_p_wxObject(void *x) {
3645 return (void *)((wxObject *) ((wxGLContext *) x));
3646 }
3647 static void *_p_wxShowEventTo_p_wxObject(void *x) {
3648 return (void *)((wxObject *) (wxEvent *) ((wxShowEvent *) x));
3649 }
3650 static void *_p_wxMenuItemTo_p_wxObject(void *x) {
3651 return (void *)((wxObject *) ((wxMenuItem *) x));
3652 }
3653 static void *_p_wxDateEventTo_p_wxObject(void *x) {
3654 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxDateEvent *) x));
3655 }
3656 static void *_p_wxIdleEventTo_p_wxObject(void *x) {
3657 return (void *)((wxObject *) (wxEvent *) ((wxIdleEvent *) x));
3658 }
3659 static void *_p_wxWindowCreateEventTo_p_wxObject(void *x) {
3660 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxWindowCreateEvent *) x));
3661 }
3662 static void *_p_wxQueryNewPaletteEventTo_p_wxObject(void *x) {
3663 return (void *)((wxObject *) (wxEvent *) ((wxQueryNewPaletteEvent *) x));
3664 }
3665 static void *_p_wxMaximizeEventTo_p_wxObject(void *x) {
3666 return (void *)((wxObject *) (wxEvent *) ((wxMaximizeEvent *) x));
3667 }
3668 static void *_p_wxIconizeEventTo_p_wxObject(void *x) {
3669 return (void *)((wxObject *) (wxEvent *) ((wxIconizeEvent *) x));
3670 }
3671 static void *_p_wxSizeEventTo_p_wxObject(void *x) {
3672 return (void *)((wxObject *) (wxEvent *) ((wxSizeEvent *) x));
3673 }
3674 static void *_p_wxMoveEventTo_p_wxObject(void *x) {
3675 return (void *)((wxObject *) (wxEvent *) ((wxMoveEvent *) x));
3676 }
3677 static void *_p_wxActivateEventTo_p_wxObject(void *x) {
3678 return (void *)((wxObject *) (wxEvent *) ((wxActivateEvent *) x));
3679 }
3680 static void *_p_wxPNMHandlerTo_p_wxObject(void *x) {
3681 return (void *)((wxObject *) (wxImageHandler *) ((wxPNMHandler *) x));
3682 }
3683 static void *_p_wxJPEGHandlerTo_p_wxObject(void *x) {
3684 return (void *)((wxObject *) (wxImageHandler *) ((wxJPEGHandler *) x));
3685 }
3686 static void *_p_wxPCXHandlerTo_p_wxObject(void *x) {
3687 return (void *)((wxObject *) (wxImageHandler *) ((wxPCXHandler *) x));
3688 }
3689 static void *_p_wxGIFHandlerTo_p_wxObject(void *x) {
3690 return (void *)((wxObject *) (wxImageHandler *) ((wxGIFHandler *) x));
3691 }
3692 static void *_p_wxPNGHandlerTo_p_wxObject(void *x) {
3693 return (void *)((wxObject *) (wxImageHandler *) ((wxPNGHandler *) x));
3694 }
3695 static void *_p_wxANIHandlerTo_p_wxObject(void *x) {
3696 return (void *)((wxObject *) (wxImageHandler *)(wxBMPHandler *)(wxICOHandler *)(wxCURHandler *) ((wxANIHandler *) x));
3697 }
3698 static void *_p_wxCURHandlerTo_p_wxObject(void *x) {
3699 return (void *)((wxObject *) (wxImageHandler *)(wxBMPHandler *)(wxICOHandler *) ((wxCURHandler *) x));
3700 }
3701 static void *_p_wxICOHandlerTo_p_wxObject(void *x) {
3702 return (void *)((wxObject *) (wxImageHandler *)(wxBMPHandler *) ((wxICOHandler *) x));
3703 }
3704 static void *_p_wxBMPHandlerTo_p_wxObject(void *x) {
3705 return (void *)((wxObject *) (wxImageHandler *) ((wxBMPHandler *) x));
3706 }
3707 static void *_p_wxPyImageHandlerTo_p_wxObject(void *x) {
3708 return (void *)((wxObject *) (wxImageHandler *) ((wxPyImageHandler *) x));
3709 }
3710 static void *_p_wxImageHandlerTo_p_wxObject(void *x) {
3711 return (void *)((wxObject *) ((wxImageHandler *) x));
3712 }
3713 static void *_p_wxXPMHandlerTo_p_wxObject(void *x) {
3714 return (void *)((wxObject *) (wxImageHandler *) ((wxXPMHandler *) x));
3715 }
3716 static void *_p_wxTIFFHandlerTo_p_wxObject(void *x) {
3717 return (void *)((wxObject *) (wxImageHandler *) ((wxTIFFHandler *) x));
3718 }
3719 static void *_p_wxEvtHandlerTo_p_wxObject(void *x) {
3720 return (void *)((wxObject *) ((wxEvtHandler *) x));
3721 }
3722 static void *_p_wxGLCanvasTo_p_wxObject(void *x) {
3723 return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *) ((wxGLCanvas *) x));
3724 }
3725 static void *_p_wxStdDialogButtonSizerTo_p_wxObject(void *x) {
3726 return (void *)((wxObject *) (wxSizer *)(wxBoxSizer *) ((wxStdDialogButtonSizer *) x));
3727 }
3728 static void *_p_wxAcceleratorTableTo_p_wxObject(void *x) {
3729 return (void *)((wxObject *) ((wxAcceleratorTable *) x));
3730 }
3731 static void *_p_wxImageTo_p_wxObject(void *x) {
3732 return (void *)((wxObject *) ((wxImage *) x));
3733 }
3734 static void *_p_wxScrollWinEventTo_p_wxObject(void *x) {
3735 return (void *)((wxObject *) (wxEvent *) ((wxScrollWinEvent *) x));
3736 }
3737 static void *_p_wxWindowDestroyEventTo_p_wxObject(void *x) {
3738 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxWindowDestroyEvent *) x));
3739 }
3740 static void *_p_wxNavigationKeyEventTo_p_wxObject(void *x) {
3741 return (void *)((wxObject *) (wxEvent *) ((wxNavigationKeyEvent *) x));
3742 }
3743 static void *_p_wxKeyEventTo_p_wxObject(void *x) {
3744 return (void *)((wxObject *) (wxEvent *) ((wxKeyEvent *) x));
3745 }
3746 static void *_p_wxWindowTo_p_wxObject(void *x) {
3747 return (void *)((wxObject *) (wxEvtHandler *) ((wxWindow *) x));
3748 }
3749 static void *_p_wxMenuTo_p_wxObject(void *x) {
3750 return (void *)((wxObject *) (wxEvtHandler *) ((wxMenu *) x));
3751 }
3752 static void *_p_wxMenuBarTo_p_wxObject(void *x) {
3753 return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *) ((wxMenuBar *) x));
3754 }
3755 static void *_p_wxFileSystemTo_p_wxObject(void *x) {
3756 return (void *)((wxObject *) ((wxFileSystem *) x));
3757 }
3758 static void *_p_wxContextMenuEventTo_p_wxObject(void *x) {
3759 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxContextMenuEvent *) x));
3760 }
3761 static void *_p_wxMenuEventTo_p_wxObject(void *x) {
3762 return (void *)((wxObject *) (wxEvent *) ((wxMenuEvent *) x));
3763 }
3764 static void *_p_wxPyAppTo_p_wxObject(void *x) {
3765 return (void *)((wxObject *) (wxEvtHandler *) ((wxPyApp *) x));
3766 }
3767 static void *_p_wxCloseEventTo_p_wxObject(void *x) {
3768 return (void *)((wxObject *) (wxEvent *) ((wxCloseEvent *) x));
3769 }
3770 static void *_p_wxMouseEventTo_p_wxObject(void *x) {
3771 return (void *)((wxObject *) (wxEvent *) ((wxMouseEvent *) x));
3772 }
3773 static void *_p_wxEraseEventTo_p_wxObject(void *x) {
3774 return (void *)((wxObject *) (wxEvent *) ((wxEraseEvent *) x));
3775 }
3776 static void *_p_wxPyCommandEventTo_p_wxObject(void *x) {
3777 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxPyCommandEvent *) x));
3778 }
3779 static void *_p_wxCommandEventTo_p_wxObject(void *x) {
3780 return (void *)((wxObject *) (wxEvent *) ((wxCommandEvent *) x));
3781 }
3782 static void *_p_wxDropFilesEventTo_p_wxObject(void *x) {
3783 return (void *)((wxObject *) (wxEvent *) ((wxDropFilesEvent *) x));
3784 }
3785 static void *_p_wxFocusEventTo_p_wxObject(void *x) {
3786 return (void *)((wxObject *) (wxEvent *) ((wxFocusEvent *) x));
3787 }
3788 static void *_p_wxChildFocusEventTo_p_wxObject(void *x) {
3789 return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *) ((wxChildFocusEvent *) x));
3790 }
3791 static void *_p_wxControlWithItemsTo_p_wxObject(void *x) {
3792 return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *)(wxControl *) ((wxControlWithItems *) x));
3793 }
3794 static void *_p_wxPyValidatorTo_p_wxObject(void *x) {
3795 return (void *)((wxObject *) (wxEvtHandler *)(wxValidator *) ((wxPyValidator *) x));
3796 }
3797 static void *_p_wxValidatorTo_p_wxObject(void *x) {
3798 return (void *)((wxObject *) (wxEvtHandler *) ((wxValidator *) x));
3799 }
3800 static void *_p_wxControlTo_p_wxWindow(void *x) {
3801 return (void *)((wxWindow *) ((wxControl *) x));
3802 }
3803 static void *_p_wxControlWithItemsTo_p_wxWindow(void *x) {
3804 return (void *)((wxWindow *) (wxControl *) ((wxControlWithItems *) x));
3805 }
3806 static void *_p_wxMenuBarTo_p_wxWindow(void *x) {
3807 return (void *)((wxWindow *) ((wxMenuBar *) x));
3808 }
3809 static void *_p_wxGLCanvasTo_p_wxWindow(void *x) {
3810 return (void *)((wxWindow *) ((wxGLCanvas *) x));
3811 }
3812 static void *_p_wxControlTo_p_wxEvtHandler(void *x) {
3813 return (void *)((wxEvtHandler *) (wxWindow *) ((wxControl *) x));
3814 }
3815 static void *_p_wxWindowTo_p_wxEvtHandler(void *x) {
3816 return (void *)((wxEvtHandler *) ((wxWindow *) x));
3817 }
3818 static void *_p_wxControlWithItemsTo_p_wxEvtHandler(void *x) {
3819 return (void *)((wxEvtHandler *) (wxWindow *)(wxControl *) ((wxControlWithItems *) x));
3820 }
3821 static void *_p_wxPyAppTo_p_wxEvtHandler(void *x) {
3822 return (void *)((wxEvtHandler *) ((wxPyApp *) x));
3823 }
3824 static void *_p_wxValidatorTo_p_wxEvtHandler(void *x) {
3825 return (void *)((wxEvtHandler *) ((wxValidator *) x));
3826 }
3827 static void *_p_wxPyValidatorTo_p_wxEvtHandler(void *x) {
3828 return (void *)((wxEvtHandler *) (wxValidator *) ((wxPyValidator *) x));
3829 }
3830 static void *_p_wxMenuBarTo_p_wxEvtHandler(void *x) {
3831 return (void *)((wxEvtHandler *) (wxWindow *) ((wxMenuBar *) x));
3832 }
3833 static void *_p_wxGLCanvasTo_p_wxEvtHandler(void *x) {
3834 return (void *)((wxEvtHandler *) (wxWindow *) ((wxGLCanvas *) x));
3835 }
3836 static void *_p_wxMenuTo_p_wxEvtHandler(void *x) {
3837 return (void *)((wxEvtHandler *) ((wxMenu *) x));
3838 }
3839 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3840 static swig_type_info _swigt__p_form_ops_t = {"_p_form_ops_t", "enum form_ops_t *|form_ops_t *", 0, 0, (void*)0, 0};
3841 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
3842 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|byte *", 0, 0, (void*)0, 0};
3843 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|time_t *", 0, 0, (void*)0, 0};
3844 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|wxUIntPtr *", 0, 0, (void*)0, 0};
3845 static swig_type_info _swigt__p_wxDuplexMode = {"_p_wxDuplexMode", "enum wxDuplexMode *|wxDuplexMode *", 0, 0, (void*)0, 0};
3846 static swig_type_info _swigt__p_wxEvtHandler = {"_p_wxEvtHandler", "wxEvtHandler *", 0, 0, (void*)0, 0};
3847 static swig_type_info _swigt__p_wxControl = {"_p_wxControl", 0, 0, 0, 0, 0};
3848 static swig_type_info _swigt__p_wxControlWithItems = {"_p_wxControlWithItems", 0, 0, 0, 0, 0};
3849 static swig_type_info _swigt__p_wxPyApp = {"_p_wxPyApp", 0, 0, 0, 0, 0};
3850 static swig_type_info _swigt__p_wxMenuBar = {"_p_wxMenuBar", 0, 0, 0, 0, 0};
3851 static swig_type_info _swigt__p_wxValidator = {"_p_wxValidator", 0, 0, 0, 0, 0};
3852 static swig_type_info _swigt__p_wxPyValidator = {"_p_wxPyValidator", 0, 0, 0, 0, 0};
3853 static swig_type_info _swigt__p_wxMenu = {"_p_wxMenu", 0, 0, 0, 0, 0};
3854 static swig_type_info _swigt__p_wxGLCanvas = {"_p_wxGLCanvas", "wxGLCanvas *", 0, 0, (void*)0, 0};
3855 static swig_type_info _swigt__p_wxGLContext = {"_p_wxGLContext", "wxGLContext *", 0, 0, (void*)0, 0};
3856 static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, (void*)0, 0};
3857 static swig_type_info _swigt__p_wxLayoutConstraints = {"_p_wxLayoutConstraints", 0, 0, 0, 0, 0};
3858 static swig_type_info _swigt__p_wxGBSizerItem = {"_p_wxGBSizerItem", 0, 0, 0, 0, 0};
3859 static swig_type_info _swigt__p_wxSizerItem = {"_p_wxSizerItem", 0, 0, 0, 0, 0};
3860 static swig_type_info _swigt__p_wxScrollEvent = {"_p_wxScrollEvent", 0, 0, 0, 0, 0};
3861 static swig_type_info _swigt__p_wxIndividualLayoutConstraint = {"_p_wxIndividualLayoutConstraint", 0, 0, 0, 0, 0};
3862 static swig_type_info _swigt__p_wxStaticBoxSizer = {"_p_wxStaticBoxSizer", 0, 0, 0, 0, 0};
3863 static swig_type_info _swigt__p_wxBoxSizer = {"_p_wxBoxSizer", 0, 0, 0, 0, 0};
3864 static swig_type_info _swigt__p_wxSizer = {"_p_wxSizer", 0, 0, 0, 0, 0};
3865 static swig_type_info _swigt__p_wxGridBagSizer = {"_p_wxGridBagSizer", 0, 0, 0, 0, 0};
3866 static swig_type_info _swigt__p_wxUpdateUIEvent = {"_p_wxUpdateUIEvent", 0, 0, 0, 0, 0};
3867 static swig_type_info _swigt__p_wxEvent = {"_p_wxEvent", 0, 0, 0, 0, 0};
3868 static swig_type_info _swigt__p_wxGridSizer = {"_p_wxGridSizer", 0, 0, 0, 0, 0};
3869 static swig_type_info _swigt__p_wxFlexGridSizer = {"_p_wxFlexGridSizer", 0, 0, 0, 0, 0};
3870 static swig_type_info _swigt__p_wxInitDialogEvent = {"_p_wxInitDialogEvent", 0, 0, 0, 0, 0};
3871 static swig_type_info _swigt__p_wxPaintEvent = {"_p_wxPaintEvent", 0, 0, 0, 0, 0};
3872 static swig_type_info _swigt__p_wxNcPaintEvent = {"_p_wxNcPaintEvent", 0, 0, 0, 0, 0};
3873 static swig_type_info _swigt__p_wxPaletteChangedEvent = {"_p_wxPaletteChangedEvent", 0, 0, 0, 0, 0};
3874 static swig_type_info _swigt__p_wxDisplayChangedEvent = {"_p_wxDisplayChangedEvent", 0, 0, 0, 0, 0};
3875 static swig_type_info _swigt__p_wxMouseCaptureChangedEvent = {"_p_wxMouseCaptureChangedEvent", 0, 0, 0, 0, 0};
3876 static swig_type_info _swigt__p_wxSysColourChangedEvent = {"_p_wxSysColourChangedEvent", 0, 0, 0, 0, 0};
3877 static swig_type_info _swigt__p_wxSetCursorEvent = {"_p_wxSetCursorEvent", 0, 0, 0, 0, 0};
3878 static swig_type_info _swigt__p_wxFSFile = {"_p_wxFSFile", 0, 0, 0, 0, 0};
3879 static swig_type_info _swigt__p_wxPySizer = {"_p_wxPySizer", 0, 0, 0, 0, 0};
3880 static swig_type_info _swigt__p_wxPyEvent = {"_p_wxPyEvent", 0, 0, 0, 0, 0};
3881 static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", 0, 0, 0, 0, 0};
3882 static swig_type_info _swigt__p_wxShowEvent = {"_p_wxShowEvent", 0, 0, 0, 0, 0};
3883 static swig_type_info _swigt__p_wxMenuItem = {"_p_wxMenuItem", 0, 0, 0, 0, 0};
3884 static swig_type_info _swigt__p_wxQueryNewPaletteEvent = {"_p_wxQueryNewPaletteEvent", 0, 0, 0, 0, 0};
3885 static swig_type_info _swigt__p_wxWindowCreateEvent = {"_p_wxWindowCreateEvent", 0, 0, 0, 0, 0};
3886 static swig_type_info _swigt__p_wxIdleEvent = {"_p_wxIdleEvent", 0, 0, 0, 0, 0};
3887 static swig_type_info _swigt__p_wxDateEvent = {"_p_wxDateEvent", 0, 0, 0, 0, 0};
3888 static swig_type_info _swigt__p_wxMaximizeEvent = {"_p_wxMaximizeEvent", 0, 0, 0, 0, 0};
3889 static swig_type_info _swigt__p_wxIconizeEvent = {"_p_wxIconizeEvent", 0, 0, 0, 0, 0};
3890 static swig_type_info _swigt__p_wxActivateEvent = {"_p_wxActivateEvent", 0, 0, 0, 0, 0};
3891 static swig_type_info _swigt__p_wxMoveEvent = {"_p_wxMoveEvent", 0, 0, 0, 0, 0};
3892 static swig_type_info _swigt__p_wxSizeEvent = {"_p_wxSizeEvent", 0, 0, 0, 0, 0};
3893 static swig_type_info _swigt__p_wxPNMHandler = {"_p_wxPNMHandler", 0, 0, 0, 0, 0};
3894 static swig_type_info _swigt__p_wxJPEGHandler = {"_p_wxJPEGHandler", 0, 0, 0, 0, 0};
3895 static swig_type_info _swigt__p_wxPCXHandler = {"_p_wxPCXHandler", 0, 0, 0, 0, 0};
3896 static swig_type_info _swigt__p_wxGIFHandler = {"_p_wxGIFHandler", 0, 0, 0, 0, 0};
3897 static swig_type_info _swigt__p_wxPNGHandler = {"_p_wxPNGHandler", 0, 0, 0, 0, 0};
3898 static swig_type_info _swigt__p_wxANIHandler = {"_p_wxANIHandler", 0, 0, 0, 0, 0};
3899 static swig_type_info _swigt__p_wxCURHandler = {"_p_wxCURHandler", 0, 0, 0, 0, 0};
3900 static swig_type_info _swigt__p_wxICOHandler = {"_p_wxICOHandler", 0, 0, 0, 0, 0};
3901 static swig_type_info _swigt__p_wxBMPHandler = {"_p_wxBMPHandler", 0, 0, 0, 0, 0};
3902 static swig_type_info _swigt__p_wxPyImageHandler = {"_p_wxPyImageHandler", 0, 0, 0, 0, 0};
3903 static swig_type_info _swigt__p_wxImageHandler = {"_p_wxImageHandler", 0, 0, 0, 0, 0};
3904 static swig_type_info _swigt__p_wxXPMHandler = {"_p_wxXPMHandler", 0, 0, 0, 0, 0};
3905 static swig_type_info _swigt__p_wxTIFFHandler = {"_p_wxTIFFHandler", 0, 0, 0, 0, 0};
3906 static swig_type_info _swigt__p_wxStdDialogButtonSizer = {"_p_wxStdDialogButtonSizer", 0, 0, 0, 0, 0};
3907 static swig_type_info _swigt__p_wxAcceleratorTable = {"_p_wxAcceleratorTable", 0, 0, 0, 0, 0};
3908 static swig_type_info _swigt__p_wxImage = {"_p_wxImage", 0, 0, 0, 0, 0};
3909 static swig_type_info _swigt__p_wxScrollWinEvent = {"_p_wxScrollWinEvent", 0, 0, 0, 0, 0};
3910 static swig_type_info _swigt__p_wxWindowDestroyEvent = {"_p_wxWindowDestroyEvent", 0, 0, 0, 0, 0};
3911 static swig_type_info _swigt__p_wxNavigationKeyEvent = {"_p_wxNavigationKeyEvent", 0, 0, 0, 0, 0};
3912 static swig_type_info _swigt__p_wxKeyEvent = {"_p_wxKeyEvent", 0, 0, 0, 0, 0};
3913 static swig_type_info _swigt__p_wxFileSystem = {"_p_wxFileSystem", 0, 0, 0, 0, 0};
3914 static swig_type_info _swigt__p_wxContextMenuEvent = {"_p_wxContextMenuEvent", 0, 0, 0, 0, 0};
3915 static swig_type_info _swigt__p_wxMenuEvent = {"_p_wxMenuEvent", 0, 0, 0, 0, 0};
3916 static swig_type_info _swigt__p_wxCloseEvent = {"_p_wxCloseEvent", 0, 0, 0, 0, 0};
3917 static swig_type_info _swigt__p_wxMouseEvent = {"_p_wxMouseEvent", 0, 0, 0, 0, 0};
3918 static swig_type_info _swigt__p_wxEraseEvent = {"_p_wxEraseEvent", 0, 0, 0, 0, 0};
3919 static swig_type_info _swigt__p_wxCommandEvent = {"_p_wxCommandEvent", 0, 0, 0, 0, 0};
3920 static swig_type_info _swigt__p_wxPyCommandEvent = {"_p_wxPyCommandEvent", 0, 0, 0, 0, 0};
3921 static swig_type_info _swigt__p_wxDropFilesEvent = {"_p_wxDropFilesEvent", 0, 0, 0, 0, 0};
3922 static swig_type_info _swigt__p_wxFocusEvent = {"_p_wxFocusEvent", 0, 0, 0, 0, 0};
3923 static swig_type_info _swigt__p_wxChildFocusEvent = {"_p_wxChildFocusEvent", 0, 0, 0, 0, 0};
3924 static swig_type_info _swigt__p_wxPalette = {"_p_wxPalette", "wxPalette *", 0, 0, (void*)0, 0};
3925 static swig_type_info _swigt__p_wxPaperSize = {"_p_wxPaperSize", "enum wxPaperSize *|wxPaperSize *", 0, 0, (void*)0, 0};
3926 static swig_type_info _swigt__p_wxWindow = {"_p_wxWindow", "wxWindow *", 0, 0, (void*)0, 0};
3927
3928 static swig_type_info *swig_type_initial[] = {
3929 &_swigt__p_char,
3930 &_swigt__p_form_ops_t,
3931 &_swigt__p_int,
3932 &_swigt__p_unsigned_char,
3933 &_swigt__p_unsigned_int,
3934 &_swigt__p_unsigned_long,
3935 &_swigt__p_wxANIHandler,
3936 &_swigt__p_wxAcceleratorTable,
3937 &_swigt__p_wxActivateEvent,
3938 &_swigt__p_wxBMPHandler,
3939 &_swigt__p_wxBoxSizer,
3940 &_swigt__p_wxCURHandler,
3941 &_swigt__p_wxChildFocusEvent,
3942 &_swigt__p_wxCloseEvent,
3943 &_swigt__p_wxCommandEvent,
3944 &_swigt__p_wxContextMenuEvent,
3945 &_swigt__p_wxControl,
3946 &_swigt__p_wxControlWithItems,
3947 &_swigt__p_wxDateEvent,
3948 &_swigt__p_wxDisplayChangedEvent,
3949 &_swigt__p_wxDropFilesEvent,
3950 &_swigt__p_wxDuplexMode,
3951 &_swigt__p_wxEraseEvent,
3952 &_swigt__p_wxEvent,
3953 &_swigt__p_wxEvtHandler,
3954 &_swigt__p_wxFSFile,
3955 &_swigt__p_wxFileSystem,
3956 &_swigt__p_wxFlexGridSizer,
3957 &_swigt__p_wxFocusEvent,
3958 &_swigt__p_wxGBSizerItem,
3959 &_swigt__p_wxGIFHandler,
3960 &_swigt__p_wxGLCanvas,
3961 &_swigt__p_wxGLContext,
3962 &_swigt__p_wxGridBagSizer,
3963 &_swigt__p_wxGridSizer,
3964 &_swigt__p_wxICOHandler,
3965 &_swigt__p_wxIconizeEvent,
3966 &_swigt__p_wxIdleEvent,
3967 &_swigt__p_wxImage,
3968 &_swigt__p_wxImageHandler,
3969 &_swigt__p_wxIndividualLayoutConstraint,
3970 &_swigt__p_wxInitDialogEvent,
3971 &_swigt__p_wxJPEGHandler,
3972 &_swigt__p_wxKeyEvent,
3973 &_swigt__p_wxLayoutConstraints,
3974 &_swigt__p_wxMaximizeEvent,
3975 &_swigt__p_wxMenu,
3976 &_swigt__p_wxMenuBar,
3977 &_swigt__p_wxMenuEvent,
3978 &_swigt__p_wxMenuItem,
3979 &_swigt__p_wxMouseCaptureChangedEvent,
3980 &_swigt__p_wxMouseEvent,
3981 &_swigt__p_wxMoveEvent,
3982 &_swigt__p_wxNavigationKeyEvent,
3983 &_swigt__p_wxNcPaintEvent,
3984 &_swigt__p_wxNotifyEvent,
3985 &_swigt__p_wxObject,
3986 &_swigt__p_wxPCXHandler,
3987 &_swigt__p_wxPNGHandler,
3988 &_swigt__p_wxPNMHandler,
3989 &_swigt__p_wxPaintEvent,
3990 &_swigt__p_wxPalette,
3991 &_swigt__p_wxPaletteChangedEvent,
3992 &_swigt__p_wxPaperSize,
3993 &_swigt__p_wxPyApp,
3994 &_swigt__p_wxPyCommandEvent,
3995 &_swigt__p_wxPyEvent,
3996 &_swigt__p_wxPyImageHandler,
3997 &_swigt__p_wxPySizer,
3998 &_swigt__p_wxPyValidator,
3999 &_swigt__p_wxQueryNewPaletteEvent,
4000 &_swigt__p_wxScrollEvent,
4001 &_swigt__p_wxScrollWinEvent,
4002 &_swigt__p_wxSetCursorEvent,
4003 &_swigt__p_wxShowEvent,
4004 &_swigt__p_wxSizeEvent,
4005 &_swigt__p_wxSizer,
4006 &_swigt__p_wxSizerItem,
4007 &_swigt__p_wxStaticBoxSizer,
4008 &_swigt__p_wxStdDialogButtonSizer,
4009 &_swigt__p_wxSysColourChangedEvent,
4010 &_swigt__p_wxTIFFHandler,
4011 &_swigt__p_wxUpdateUIEvent,
4012 &_swigt__p_wxValidator,
4013 &_swigt__p_wxWindow,
4014 &_swigt__p_wxWindowCreateEvent,
4015 &_swigt__p_wxWindowDestroyEvent,
4016 &_swigt__p_wxXPMHandler,
4017 };
4018
4019 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4020 static swig_cast_info _swigc__p_form_ops_t[] = { {&_swigt__p_form_ops_t, 0, 0, 0},{0, 0, 0, 0}};
4021 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
4022 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
4023 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
4024 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
4025 static swig_cast_info _swigc__p_wxDuplexMode[] = { {&_swigt__p_wxDuplexMode, 0, 0, 0},{0, 0, 0, 0}};
4026 static swig_cast_info _swigc__p_wxControl[] = {{&_swigt__p_wxControl, 0, 0, 0},{0, 0, 0, 0}};
4027 static swig_cast_info _swigc__p_wxControlWithItems[] = {{&_swigt__p_wxControlWithItems, 0, 0, 0},{0, 0, 0, 0}};
4028 static swig_cast_info _swigc__p_wxPyApp[] = {{&_swigt__p_wxPyApp, 0, 0, 0},{0, 0, 0, 0}};
4029 static swig_cast_info _swigc__p_wxMenuBar[] = {{&_swigt__p_wxMenuBar, 0, 0, 0},{0, 0, 0, 0}};
4030 static swig_cast_info _swigc__p_wxValidator[] = {{&_swigt__p_wxValidator, 0, 0, 0},{0, 0, 0, 0}};
4031 static swig_cast_info _swigc__p_wxPyValidator[] = {{&_swigt__p_wxPyValidator, 0, 0, 0},{0, 0, 0, 0}};
4032 static swig_cast_info _swigc__p_wxMenu[] = {{&_swigt__p_wxMenu, 0, 0, 0},{0, 0, 0, 0}};
4033 static swig_cast_info _swigc__p_wxEvtHandler[] = { {&_swigt__p_wxControl, _p_wxControlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxWindow, _p_wxWindowTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxEvtHandler, 0, 0, 0}, {&_swigt__p_wxPyApp, _p_wxPyAppTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxGLCanvas, _p_wxGLCanvasTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxValidator, _p_wxValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyValidator, _p_wxPyValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenu, _p_wxMenuTo_p_wxEvtHandler, 0, 0},{0, 0, 0, 0}};
4034 static swig_cast_info _swigc__p_wxGLCanvas[] = { {&_swigt__p_wxGLCanvas, 0, 0, 0},{0, 0, 0, 0}};
4035 static swig_cast_info _swigc__p_wxGLContext[] = { {&_swigt__p_wxGLContext, 0, 0, 0},{0, 0, 0, 0}};
4036 static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}};
4037 static swig_cast_info _swigc__p_wxGBSizerItem[] = {{&_swigt__p_wxGBSizerItem, 0, 0, 0},{0, 0, 0, 0}};
4038 static swig_cast_info _swigc__p_wxSizerItem[] = {{&_swigt__p_wxSizerItem, 0, 0, 0},{0, 0, 0, 0}};
4039 static swig_cast_info _swigc__p_wxScrollEvent[] = {{&_swigt__p_wxScrollEvent, 0, 0, 0},{0, 0, 0, 0}};
4040 static swig_cast_info _swigc__p_wxIndividualLayoutConstraint[] = {{&_swigt__p_wxIndividualLayoutConstraint, 0, 0, 0},{0, 0, 0, 0}};
4041 static swig_cast_info _swigc__p_wxStaticBoxSizer[] = {{&_swigt__p_wxStaticBoxSizer, 0, 0, 0},{0, 0, 0, 0}};
4042 static swig_cast_info _swigc__p_wxBoxSizer[] = {{&_swigt__p_wxBoxSizer, 0, 0, 0},{0, 0, 0, 0}};
4043 static swig_cast_info _swigc__p_wxSizer[] = {{&_swigt__p_wxSizer, 0, 0, 0},{0, 0, 0, 0}};
4044 static swig_cast_info _swigc__p_wxGridBagSizer[] = {{&_swigt__p_wxGridBagSizer, 0, 0, 0},{0, 0, 0, 0}};
4045 static swig_cast_info _swigc__p_wxUpdateUIEvent[] = {{&_swigt__p_wxUpdateUIEvent, 0, 0, 0},{0, 0, 0, 0}};
4046 static swig_cast_info _swigc__p_wxEvent[] = {{&_swigt__p_wxEvent, 0, 0, 0},{0, 0, 0, 0}};
4047 static swig_cast_info _swigc__p_wxGridSizer[] = {{&_swigt__p_wxGridSizer, 0, 0, 0},{0, 0, 0, 0}};
4048 static swig_cast_info _swigc__p_wxFlexGridSizer[] = {{&_swigt__p_wxFlexGridSizer, 0, 0, 0},{0, 0, 0, 0}};
4049 static swig_cast_info _swigc__p_wxInitDialogEvent[] = {{&_swigt__p_wxInitDialogEvent, 0, 0, 0},{0, 0, 0, 0}};
4050 static swig_cast_info _swigc__p_wxPaintEvent[] = {{&_swigt__p_wxPaintEvent, 0, 0, 0},{0, 0, 0, 0}};
4051 static swig_cast_info _swigc__p_wxNcPaintEvent[] = {{&_swigt__p_wxNcPaintEvent, 0, 0, 0},{0, 0, 0, 0}};
4052 static swig_cast_info _swigc__p_wxPaletteChangedEvent[] = {{&_swigt__p_wxPaletteChangedEvent, 0, 0, 0},{0, 0, 0, 0}};
4053 static swig_cast_info _swigc__p_wxDisplayChangedEvent[] = {{&_swigt__p_wxDisplayChangedEvent, 0, 0, 0},{0, 0, 0, 0}};
4054 static swig_cast_info _swigc__p_wxMouseCaptureChangedEvent[] = {{&_swigt__p_wxMouseCaptureChangedEvent, 0, 0, 0},{0, 0, 0, 0}};
4055 static swig_cast_info _swigc__p_wxSysColourChangedEvent[] = {{&_swigt__p_wxSysColourChangedEvent, 0, 0, 0},{0, 0, 0, 0}};
4056 static swig_cast_info _swigc__p_wxSetCursorEvent[] = {{&_swigt__p_wxSetCursorEvent, 0, 0, 0},{0, 0, 0, 0}};
4057 static swig_cast_info _swigc__p_wxFSFile[] = {{&_swigt__p_wxFSFile, 0, 0, 0},{0, 0, 0, 0}};
4058 static swig_cast_info _swigc__p_wxPySizer[] = {{&_swigt__p_wxPySizer, 0, 0, 0},{0, 0, 0, 0}};
4059 static swig_cast_info _swigc__p_wxPyEvent[] = {{&_swigt__p_wxPyEvent, 0, 0, 0},{0, 0, 0, 0}};
4060 static swig_cast_info _swigc__p_wxNotifyEvent[] = {{&_swigt__p_wxNotifyEvent, 0, 0, 0},{0, 0, 0, 0}};
4061 static swig_cast_info _swigc__p_wxShowEvent[] = {{&_swigt__p_wxShowEvent, 0, 0, 0},{0, 0, 0, 0}};
4062 static swig_cast_info _swigc__p_wxMenuItem[] = {{&_swigt__p_wxMenuItem, 0, 0, 0},{0, 0, 0, 0}};
4063 static swig_cast_info _swigc__p_wxQueryNewPaletteEvent[] = {{&_swigt__p_wxQueryNewPaletteEvent, 0, 0, 0},{0, 0, 0, 0}};
4064 static swig_cast_info _swigc__p_wxWindowCreateEvent[] = {{&_swigt__p_wxWindowCreateEvent, 0, 0, 0},{0, 0, 0, 0}};
4065 static swig_cast_info _swigc__p_wxIdleEvent[] = {{&_swigt__p_wxIdleEvent, 0, 0, 0},{0, 0, 0, 0}};
4066 static swig_cast_info _swigc__p_wxDateEvent[] = {{&_swigt__p_wxDateEvent, 0, 0, 0},{0, 0, 0, 0}};
4067 static swig_cast_info _swigc__p_wxMaximizeEvent[] = {{&_swigt__p_wxMaximizeEvent, 0, 0, 0},{0, 0, 0, 0}};
4068 static swig_cast_info _swigc__p_wxIconizeEvent[] = {{&_swigt__p_wxIconizeEvent, 0, 0, 0},{0, 0, 0, 0}};
4069 static swig_cast_info _swigc__p_wxActivateEvent[] = {{&_swigt__p_wxActivateEvent, 0, 0, 0},{0, 0, 0, 0}};
4070 static swig_cast_info _swigc__p_wxMoveEvent[] = {{&_swigt__p_wxMoveEvent, 0, 0, 0},{0, 0, 0, 0}};
4071 static swig_cast_info _swigc__p_wxSizeEvent[] = {{&_swigt__p_wxSizeEvent, 0, 0, 0},{0, 0, 0, 0}};
4072 static swig_cast_info _swigc__p_wxPNMHandler[] = {{&_swigt__p_wxPNMHandler, 0, 0, 0},{0, 0, 0, 0}};
4073 static swig_cast_info _swigc__p_wxJPEGHandler[] = {{&_swigt__p_wxJPEGHandler, 0, 0, 0},{0, 0, 0, 0}};
4074 static swig_cast_info _swigc__p_wxPCXHandler[] = {{&_swigt__p_wxPCXHandler, 0, 0, 0},{0, 0, 0, 0}};
4075 static swig_cast_info _swigc__p_wxGIFHandler[] = {{&_swigt__p_wxGIFHandler, 0, 0, 0},{0, 0, 0, 0}};
4076 static swig_cast_info _swigc__p_wxPNGHandler[] = {{&_swigt__p_wxPNGHandler, 0, 0, 0},{0, 0, 0, 0}};
4077 static swig_cast_info _swigc__p_wxANIHandler[] = {{&_swigt__p_wxANIHandler, 0, 0, 0},{0, 0, 0, 0}};
4078 static swig_cast_info _swigc__p_wxCURHandler[] = {{&_swigt__p_wxCURHandler, 0, 0, 0},{0, 0, 0, 0}};
4079 static swig_cast_info _swigc__p_wxICOHandler[] = {{&_swigt__p_wxICOHandler, 0, 0, 0},{0, 0, 0, 0}};
4080 static swig_cast_info _swigc__p_wxBMPHandler[] = {{&_swigt__p_wxBMPHandler, 0, 0, 0},{0, 0, 0, 0}};
4081 static swig_cast_info _swigc__p_wxPyImageHandler[] = {{&_swigt__p_wxPyImageHandler, 0, 0, 0},{0, 0, 0, 0}};
4082 static swig_cast_info _swigc__p_wxImageHandler[] = {{&_swigt__p_wxImageHandler, 0, 0, 0},{0, 0, 0, 0}};
4083 static swig_cast_info _swigc__p_wxXPMHandler[] = {{&_swigt__p_wxXPMHandler, 0, 0, 0},{0, 0, 0, 0}};
4084 static swig_cast_info _swigc__p_wxTIFFHandler[] = {{&_swigt__p_wxTIFFHandler, 0, 0, 0},{0, 0, 0, 0}};
4085 static swig_cast_info _swigc__p_wxStdDialogButtonSizer[] = {{&_swigt__p_wxStdDialogButtonSizer, 0, 0, 0},{0, 0, 0, 0}};
4086 static swig_cast_info _swigc__p_wxAcceleratorTable[] = {{&_swigt__p_wxAcceleratorTable, 0, 0, 0},{0, 0, 0, 0}};
4087 static swig_cast_info _swigc__p_wxImage[] = {{&_swigt__p_wxImage, 0, 0, 0},{0, 0, 0, 0}};
4088 static swig_cast_info _swigc__p_wxScrollWinEvent[] = {{&_swigt__p_wxScrollWinEvent, 0, 0, 0},{0, 0, 0, 0}};
4089 static swig_cast_info _swigc__p_wxWindowDestroyEvent[] = {{&_swigt__p_wxWindowDestroyEvent, 0, 0, 0},{0, 0, 0, 0}};
4090 static swig_cast_info _swigc__p_wxNavigationKeyEvent[] = {{&_swigt__p_wxNavigationKeyEvent, 0, 0, 0},{0, 0, 0, 0}};
4091 static swig_cast_info _swigc__p_wxKeyEvent[] = {{&_swigt__p_wxKeyEvent, 0, 0, 0},{0, 0, 0, 0}};
4092 static swig_cast_info _swigc__p_wxFileSystem[] = {{&_swigt__p_wxFileSystem, 0, 0, 0},{0, 0, 0, 0}};
4093 static swig_cast_info _swigc__p_wxContextMenuEvent[] = {{&_swigt__p_wxContextMenuEvent, 0, 0, 0},{0, 0, 0, 0}};
4094 static swig_cast_info _swigc__p_wxMenuEvent[] = {{&_swigt__p_wxMenuEvent, 0, 0, 0},{0, 0, 0, 0}};
4095 static swig_cast_info _swigc__p_wxCloseEvent[] = {{&_swigt__p_wxCloseEvent, 0, 0, 0},{0, 0, 0, 0}};
4096 static swig_cast_info _swigc__p_wxMouseEvent[] = {{&_swigt__p_wxMouseEvent, 0, 0, 0},{0, 0, 0, 0}};
4097 static swig_cast_info _swigc__p_wxEraseEvent[] = {{&_swigt__p_wxEraseEvent, 0, 0, 0},{0, 0, 0, 0}};
4098 static swig_cast_info _swigc__p_wxCommandEvent[] = {{&_swigt__p_wxCommandEvent, 0, 0, 0},{0, 0, 0, 0}};
4099 static swig_cast_info _swigc__p_wxPyCommandEvent[] = {{&_swigt__p_wxPyCommandEvent, 0, 0, 0},{0, 0, 0, 0}};
4100 static swig_cast_info _swigc__p_wxDropFilesEvent[] = {{&_swigt__p_wxDropFilesEvent, 0, 0, 0},{0, 0, 0, 0}};
4101 static swig_cast_info _swigc__p_wxFocusEvent[] = {{&_swigt__p_wxFocusEvent, 0, 0, 0},{0, 0, 0, 0}};
4102 static swig_cast_info _swigc__p_wxChildFocusEvent[] = {{&_swigt__p_wxChildFocusEvent, 0, 0, 0},{0, 0, 0, 0}};
4103 static swig_cast_info _swigc__p_wxObject[] = { {&_swigt__p_wxLayoutConstraints, _p_wxLayoutConstraintsTo_p_wxObject, 0, 0}, {&_swigt__p_wxGBSizerItem, _p_wxGBSizerItemTo_p_wxObject, 0, 0}, {&_swigt__p_wxSizerItem, _p_wxSizerItemTo_p_wxObject, 0, 0}, {&_swigt__p_wxScrollEvent, _p_wxScrollEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxIndividualLayoutConstraint, _p_wxIndividualLayoutConstraintTo_p_wxObject, 0, 0}, {&_swigt__p_wxStaticBoxSizer, _p_wxStaticBoxSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxBoxSizer, _p_wxBoxSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxSizer, _p_wxSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxGridBagSizer, _p_wxGridBagSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxUpdateUIEvent, _p_wxUpdateUIEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMenu, _p_wxMenuTo_p_wxObject, 0, 0}, {&_swigt__p_wxEvent, _p_wxEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxGridSizer, _p_wxGridSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxFlexGridSizer, _p_wxFlexGridSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxInitDialogEvent, _p_wxInitDialogEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxPaintEvent, _p_wxPaintEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxNcPaintEvent, _p_wxNcPaintEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxPaletteChangedEvent, _p_wxPaletteChangedEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxDisplayChangedEvent, _p_wxDisplayChangedEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMouseCaptureChangedEvent, _p_wxMouseCaptureChangedEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxSysColourChangedEvent, _p_wxSysColourChangedEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxControl, _p_wxControlTo_p_wxObject, 0, 0}, {&_swigt__p_wxSetCursorEvent, _p_wxSetCursorEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxFSFile, _p_wxFSFileTo_p_wxObject, 0, 0}, {&_swigt__p_wxPySizer, _p_wxPySizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxPyEvent, _p_wxPyEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxNotifyEvent, _p_wxNotifyEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxGLContext, _p_wxGLContextTo_p_wxObject, 0, 0}, {&_swigt__p_wxShowEvent, _p_wxShowEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMenuItem, _p_wxMenuItemTo_p_wxObject, 0, 0}, {&_swigt__p_wxQueryNewPaletteEvent, _p_wxQueryNewPaletteEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxWindowCreateEvent, _p_wxWindowCreateEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxIdleEvent, _p_wxIdleEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxDateEvent, _p_wxDateEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMaximizeEvent, _p_wxMaximizeEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxIconizeEvent, _p_wxIconizeEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxActivateEvent, _p_wxActivateEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMoveEvent, _p_wxMoveEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxSizeEvent, _p_wxSizeEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxPNMHandler, _p_wxPNMHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxJPEGHandler, _p_wxJPEGHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxPCXHandler, _p_wxPCXHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxGIFHandler, _p_wxGIFHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxPNGHandler, _p_wxPNGHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxANIHandler, _p_wxANIHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxCURHandler, _p_wxCURHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxICOHandler, _p_wxICOHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxBMPHandler, _p_wxBMPHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxPyImageHandler, _p_wxPyImageHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxImageHandler, _p_wxImageHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxXPMHandler, _p_wxXPMHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxTIFFHandler, _p_wxTIFFHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxEvtHandler, _p_wxEvtHandlerTo_p_wxObject, 0, 0}, {&_swigt__p_wxGLCanvas, _p_wxGLCanvasTo_p_wxObject, 0, 0}, {&_swigt__p_wxStdDialogButtonSizer, _p_wxStdDialogButtonSizerTo_p_wxObject, 0, 0}, {&_swigt__p_wxAcceleratorTable, _p_wxAcceleratorTableTo_p_wxObject, 0, 0}, {&_swigt__p_wxImage, _p_wxImageTo_p_wxObject, 0, 0}, {&_swigt__p_wxScrollWinEvent, _p_wxScrollWinEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxObject, 0, 0, 0}, {&_swigt__p_wxWindowDestroyEvent, _p_wxWindowDestroyEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxNavigationKeyEvent, _p_wxNavigationKeyEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxKeyEvent, _p_wxKeyEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxWindow, _p_wxWindowTo_p_wxObject, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxObject, 0, 0}, {&_swigt__p_wxFileSystem, _p_wxFileSystemTo_p_wxObject, 0, 0}, {&_swigt__p_wxContextMenuEvent, _p_wxContextMenuEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMenuEvent, _p_wxMenuEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxPyApp, _p_wxPyAppTo_p_wxObject, 0, 0}, {&_swigt__p_wxCloseEvent, _p_wxCloseEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxMouseEvent, _p_wxMouseEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxEraseEvent, _p_wxEraseEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxCommandEvent, _p_wxCommandEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxPyCommandEvent, _p_wxPyCommandEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxDropFilesEvent, _p_wxDropFilesEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxFocusEvent, _p_wxFocusEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxChildFocusEvent, _p_wxChildFocusEventTo_p_wxObject, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxObject, 0, 0}, {&_swigt__p_wxPyValidator, _p_wxPyValidatorTo_p_wxObject, 0, 0}, {&_swigt__p_wxValidator, _p_wxValidatorTo_p_wxObject, 0, 0},{0, 0, 0, 0}};
4104 static swig_cast_info _swigc__p_wxPalette[] = { {&_swigt__p_wxPalette, 0, 0, 0},{0, 0, 0, 0}};
4105 static swig_cast_info _swigc__p_wxPaperSize[] = { {&_swigt__p_wxPaperSize, 0, 0, 0},{0, 0, 0, 0}};
4106 static swig_cast_info _swigc__p_wxWindow[] = { {&_swigt__p_wxControl, _p_wxControlTo_p_wxWindow, 0, 0}, {&_swigt__p_wxWindow, 0, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxWindow, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxWindow, 0, 0}, {&_swigt__p_wxGLCanvas, _p_wxGLCanvasTo_p_wxWindow, 0, 0},{0, 0, 0, 0}};
4107
4108 static swig_cast_info *swig_cast_initial[] = {
4109 _swigc__p_char,
4110 _swigc__p_form_ops_t,
4111 _swigc__p_int,
4112 _swigc__p_unsigned_char,
4113 _swigc__p_unsigned_int,
4114 _swigc__p_unsigned_long,
4115 _swigc__p_wxANIHandler,
4116 _swigc__p_wxAcceleratorTable,
4117 _swigc__p_wxActivateEvent,
4118 _swigc__p_wxBMPHandler,
4119 _swigc__p_wxBoxSizer,
4120 _swigc__p_wxCURHandler,
4121 _swigc__p_wxChildFocusEvent,
4122 _swigc__p_wxCloseEvent,
4123 _swigc__p_wxCommandEvent,
4124 _swigc__p_wxContextMenuEvent,
4125 _swigc__p_wxControl,
4126 _swigc__p_wxControlWithItems,
4127 _swigc__p_wxDateEvent,
4128 _swigc__p_wxDisplayChangedEvent,
4129 _swigc__p_wxDropFilesEvent,
4130 _swigc__p_wxDuplexMode,
4131 _swigc__p_wxEraseEvent,
4132 _swigc__p_wxEvent,
4133 _swigc__p_wxEvtHandler,
4134 _swigc__p_wxFSFile,
4135 _swigc__p_wxFileSystem,
4136 _swigc__p_wxFlexGridSizer,
4137 _swigc__p_wxFocusEvent,
4138 _swigc__p_wxGBSizerItem,
4139 _swigc__p_wxGIFHandler,
4140 _swigc__p_wxGLCanvas,
4141 _swigc__p_wxGLContext,
4142 _swigc__p_wxGridBagSizer,
4143 _swigc__p_wxGridSizer,
4144 _swigc__p_wxICOHandler,
4145 _swigc__p_wxIconizeEvent,
4146 _swigc__p_wxIdleEvent,
4147 _swigc__p_wxImage,
4148 _swigc__p_wxImageHandler,
4149 _swigc__p_wxIndividualLayoutConstraint,
4150 _swigc__p_wxInitDialogEvent,
4151 _swigc__p_wxJPEGHandler,
4152 _swigc__p_wxKeyEvent,
4153 _swigc__p_wxLayoutConstraints,
4154 _swigc__p_wxMaximizeEvent,
4155 _swigc__p_wxMenu,
4156 _swigc__p_wxMenuBar,
4157 _swigc__p_wxMenuEvent,
4158 _swigc__p_wxMenuItem,
4159 _swigc__p_wxMouseCaptureChangedEvent,
4160 _swigc__p_wxMouseEvent,
4161 _swigc__p_wxMoveEvent,
4162 _swigc__p_wxNavigationKeyEvent,
4163 _swigc__p_wxNcPaintEvent,
4164 _swigc__p_wxNotifyEvent,
4165 _swigc__p_wxObject,
4166 _swigc__p_wxPCXHandler,
4167 _swigc__p_wxPNGHandler,
4168 _swigc__p_wxPNMHandler,
4169 _swigc__p_wxPaintEvent,
4170 _swigc__p_wxPalette,
4171 _swigc__p_wxPaletteChangedEvent,
4172 _swigc__p_wxPaperSize,
4173 _swigc__p_wxPyApp,
4174 _swigc__p_wxPyCommandEvent,
4175 _swigc__p_wxPyEvent,
4176 _swigc__p_wxPyImageHandler,
4177 _swigc__p_wxPySizer,
4178 _swigc__p_wxPyValidator,
4179 _swigc__p_wxQueryNewPaletteEvent,
4180 _swigc__p_wxScrollEvent,
4181 _swigc__p_wxScrollWinEvent,
4182 _swigc__p_wxSetCursorEvent,
4183 _swigc__p_wxShowEvent,
4184 _swigc__p_wxSizeEvent,
4185 _swigc__p_wxSizer,
4186 _swigc__p_wxSizerItem,
4187 _swigc__p_wxStaticBoxSizer,
4188 _swigc__p_wxStdDialogButtonSizer,
4189 _swigc__p_wxSysColourChangedEvent,
4190 _swigc__p_wxTIFFHandler,
4191 _swigc__p_wxUpdateUIEvent,
4192 _swigc__p_wxValidator,
4193 _swigc__p_wxWindow,
4194 _swigc__p_wxWindowCreateEvent,
4195 _swigc__p_wxWindowDestroyEvent,
4196 _swigc__p_wxXPMHandler,
4197 };
4198
4199
4200 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4201
4202 static swig_const_info swig_const_table[] = {
4203 {0, 0, 0, 0.0, 0, 0}};
4204
4205 #ifdef __cplusplus
4206 }
4207 #endif
4208 /* -----------------------------------------------------------------------------
4209 * Type initialization:
4210 * This problem is tough by the requirement that no dynamic
4211 * memory is used. Also, since swig_type_info structures store pointers to
4212 * swig_cast_info structures and swig_cast_info structures store pointers back
4213 * to swig_type_info structures, we need some lookup code at initialization.
4214 * The idea is that swig generates all the structures that are needed.
4215 * The runtime then collects these partially filled structures.
4216 * The SWIG_InitializeModule function takes these initial arrays out of
4217 * swig_module, and does all the lookup, filling in the swig_module.types
4218 * array with the correct data and linking the correct swig_cast_info
4219 * structures together.
4220 *
4221 * The generated swig_type_info structures are assigned staticly to an initial
4222 * array. We just loop though that array, and handle each type individually.
4223 * First we lookup if this type has been already loaded, and if so, use the
4224 * loaded structure instead of the generated one. Then we have to fill in the
4225 * cast linked list. The cast data is initially stored in something like a
4226 * two-dimensional array. Each row corresponds to a type (there are the same
4227 * number of rows as there are in the swig_type_initial array). Each entry in
4228 * a column is one of the swig_cast_info structures for that type.
4229 * The cast_initial array is actually an array of arrays, because each row has
4230 * a variable number of columns. So to actually build the cast linked list,
4231 * we find the array of casts associated with the type, and loop through it
4232 * adding the casts to the list. The one last trick we need to do is making
4233 * sure the type pointer in the swig_cast_info struct is correct.
4234 *
4235 * First off, we lookup the cast->type name to see if it is already loaded.
4236 * There are three cases to handle:
4237 * 1) If the cast->type has already been loaded AND the type we are adding
4238 * casting info to has not been loaded (it is in this module), THEN we
4239 * replace the cast->type pointer with the type pointer that has already
4240 * been loaded.
4241 * 2) If BOTH types (the one we are adding casting info to, and the
4242 * cast->type) are loaded, THEN the cast info has already been loaded by
4243 * the previous module so we just ignore it.
4244 * 3) Finally, if cast->type has not already been loaded, then we add that
4245 * swig_cast_info to the linked list (because the cast->type) pointer will
4246 * be correct.
4247 * ----------------------------------------------------------------------------- */
4248
4249 #ifdef __cplusplus
4250 extern "C" {
4251 #if 0
4252 } /* c-mode */
4253 #endif
4254 #endif
4255
4256 #if 0
4257 #define SWIGRUNTIME_DEBUG
4258 #endif
4259
4260 SWIGRUNTIME void
4261 SWIG_InitializeModule(void *clientdata) {
4262 size_t i;
4263 swig_module_info *module_head;
4264 static int init_run = 0;
4265
4266 clientdata = clientdata;
4267
4268 if (init_run) return;
4269 init_run = 1;
4270
4271 /* Initialize the swig_module */
4272 swig_module.type_initial = swig_type_initial;
4273 swig_module.cast_initial = swig_cast_initial;
4274
4275 /* Try and load any already created modules */
4276 module_head = SWIG_GetModule(clientdata);
4277 if (module_head) {
4278 swig_module.next = module_head->next;
4279 module_head->next = &swig_module;
4280 } else {
4281 /* This is the first module loaded */
4282 swig_module.next = &swig_module;
4283 SWIG_SetModule(clientdata, &swig_module);
4284 }
4285
4286 /* Now work on filling in swig_module.types */
4287 #ifdef SWIGRUNTIME_DEBUG
4288 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4289 #endif
4290 for (i = 0; i < swig_module.size; ++i) {
4291 swig_type_info *type = 0;
4292 swig_type_info *ret;
4293 swig_cast_info *cast;
4294
4295 #ifdef SWIGRUNTIME_DEBUG
4296 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4297 #endif
4298
4299 /* if there is another module already loaded */
4300 if (swig_module.next != &swig_module) {
4301 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4302 }
4303 if (type) {
4304 /* Overwrite clientdata field */
4305 #ifdef SWIGRUNTIME_DEBUG
4306 printf("SWIG_InitializeModule: found type %s\n", type->name);
4307 #endif
4308 if (swig_module.type_initial[i]->clientdata) {
4309 type->clientdata = swig_module.type_initial[i]->clientdata;
4310 #ifdef SWIGRUNTIME_DEBUG
4311 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4312 #endif
4313 }
4314 } else {
4315 type = swig_module.type_initial[i];
4316 }
4317
4318 /* Insert casting types */
4319 cast = swig_module.cast_initial[i];
4320 while (cast->type) {
4321 /* Don't need to add information already in the list */
4322 ret = 0;
4323 #ifdef SWIGRUNTIME_DEBUG
4324 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4325 #endif
4326 if (swig_module.next != &swig_module) {
4327 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4328 #ifdef SWIGRUNTIME_DEBUG
4329 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4330 #endif
4331 }
4332 if (ret) {
4333 if (type == swig_module.type_initial[i]) {
4334 #ifdef SWIGRUNTIME_DEBUG
4335 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4336 #endif
4337 cast->type = ret;
4338 ret = 0;
4339 } else {
4340 /* Check for casting already in the list */
4341 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4342 #ifdef SWIGRUNTIME_DEBUG
4343 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4344 #endif
4345 if (!ocast) ret = 0;
4346 }
4347 }
4348
4349 if (!ret) {
4350 #ifdef SWIGRUNTIME_DEBUG
4351 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4352 #endif
4353 if (type->cast) {
4354 type->cast->prev = cast;
4355 cast->next = type->cast;
4356 }
4357 type->cast = cast;
4358 }
4359 cast++;
4360 }
4361 /* Set entry in modules->types array equal to the type */
4362 swig_module.types[i] = type;
4363 }
4364 swig_module.types[i] = 0;
4365
4366 #ifdef SWIGRUNTIME_DEBUG
4367 printf("**** SWIG_InitializeModule: Cast List ******\n");
4368 for (i = 0; i < swig_module.size; ++i) {
4369 int j = 0;
4370 swig_cast_info *cast = swig_module.cast_initial[i];
4371 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4372 while (cast->type) {
4373 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4374 cast++;
4375 ++j;
4376 }
4377 printf("---- Total casts: %d\n",j);
4378 }
4379 printf("**** SWIG_InitializeModule: Cast List ******\n");
4380 #endif
4381 }
4382
4383 /* This function will propagate the clientdata field of type to
4384 * any new swig_type_info structures that have been added into the list
4385 * of equivalent types. It is like calling
4386 * SWIG_TypeClientData(type, clientdata) a second time.
4387 */
4388 SWIGRUNTIME void
4389 SWIG_PropagateClientData(void) {
4390 size_t i;
4391 swig_cast_info *equiv;
4392 static int init_run = 0;
4393
4394 if (init_run) return;
4395 init_run = 1;
4396
4397 for (i = 0; i < swig_module.size; i++) {
4398 if (swig_module.types[i]->clientdata) {
4399 equiv = swig_module.types[i]->cast;
4400 while (equiv) {
4401 if (!equiv->converter) {
4402 if (equiv->type && !equiv->type->clientdata)
4403 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4404 }
4405 equiv = equiv->next;
4406 }
4407 }
4408 }
4409 }
4410
4411 #ifdef __cplusplus
4412 #if 0
4413 {
4414 /* c-mode */
4415 #endif
4416 }
4417 #endif
4418
4419
4420
4421 #ifdef __cplusplus
4422 extern "C" {
4423 #endif
4424
4425 /* Python-specific SWIG API */
4426 #define SWIG_newvarlink() SWIG_Python_newvarlink()
4427 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4428 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
4429
4430 /* -----------------------------------------------------------------------------
4431 * global variable support code.
4432 * ----------------------------------------------------------------------------- */
4433
4434 typedef struct swig_globalvar {
4435 char *name; /* Name of global variable */
4436 PyObject *(*get_attr)(void); /* Return the current value */
4437 int (*set_attr)(PyObject *); /* Set the value */
4438 struct swig_globalvar *next;
4439 } swig_globalvar;
4440
4441 typedef struct swig_varlinkobject {
4442 PyObject_HEAD
4443 swig_globalvar *vars;
4444 } swig_varlinkobject;
4445
4446 SWIGINTERN PyObject *
4447 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
4448 return PyString_FromString("<Swig global variables>");
4449 }
4450
4451 SWIGINTERN PyObject *
4452 swig_varlink_str(swig_varlinkobject *v) {
4453 PyObject *str = PyString_FromString("(");
4454 swig_globalvar *var;
4455 for (var = v->vars; var; var=var->next) {
4456 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4457 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
4458 }
4459 PyString_ConcatAndDel(&str,PyString_FromString(")"));
4460 return str;
4461 }
4462
4463 SWIGINTERN int
4464 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
4465 PyObject *str = swig_varlink_str(v);
4466 fprintf(fp,"Swig global variables ");
4467 fprintf(fp,"%s\n", PyString_AsString(str));
4468 Py_DECREF(str);
4469 return 0;
4470 }
4471
4472 SWIGINTERN void
4473 swig_varlink_dealloc(swig_varlinkobject *v) {
4474 swig_globalvar *var = v->vars;
4475 while (var) {
4476 swig_globalvar *n = var->next;
4477 free(var->name);
4478 free(var);
4479 var = n;
4480 }
4481 }
4482
4483 SWIGINTERN PyObject *
4484 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
4485 PyObject *res = NULL;
4486 swig_globalvar *var = v->vars;
4487 while (var) {
4488 if (strcmp(var->name,n) == 0) {
4489 res = (*var->get_attr)();
4490 break;
4491 }
4492 var = var->next;
4493 }
4494 if (res == NULL && !PyErr_Occurred()) {
4495 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
4496 }
4497 return res;
4498 }
4499
4500 SWIGINTERN int
4501 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
4502 int res = 1;
4503 swig_globalvar *var = v->vars;
4504 while (var) {
4505 if (strcmp(var->name,n) == 0) {
4506 res = (*var->set_attr)(p);
4507 break;
4508 }
4509 var = var->next;
4510 }
4511 if (res == 1 && !PyErr_Occurred()) {
4512 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
4513 }
4514 return res;
4515 }
4516
4517 SWIGINTERN PyTypeObject*
4518 swig_varlink_type(void) {
4519 static char varlink__doc__[] = "Swig var link object";
4520 static PyTypeObject varlink_type;
4521 static int type_init = 0;
4522 if (!type_init) {
4523 const PyTypeObject tmp
4524 = {
4525 PyObject_HEAD_INIT(NULL)
4526 0, /* Number of items in variable part (ob_size) */
4527 (char *)"swigvarlink", /* Type name (tp_name) */
4528 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
4529 0, /* Itemsize (tp_itemsize) */
4530 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
4531 (printfunc) swig_varlink_print, /* Print (tp_print) */
4532 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
4533 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
4534 0, /* tp_compare */
4535 (reprfunc) swig_varlink_repr, /* tp_repr */
4536 0, /* tp_as_number */
4537 0, /* tp_as_sequence */
4538 0, /* tp_as_mapping */
4539 0, /* tp_hash */
4540 0, /* tp_call */
4541 (reprfunc)swig_varlink_str, /* tp_str */
4542 0, /* tp_getattro */
4543 0, /* tp_setattro */
4544 0, /* tp_as_buffer */
4545 0, /* tp_flags */
4546 varlink__doc__, /* tp_doc */
4547 0, /* tp_traverse */
4548 0, /* tp_clear */
4549 0, /* tp_richcompare */
4550 0, /* tp_weaklistoffset */
4551 #if PY_VERSION_HEX >= 0x02020000
4552 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
4553 #endif
4554 #if PY_VERSION_HEX >= 0x02030000
4555 0, /* tp_del */
4556 #endif
4557 #ifdef COUNT_ALLOCS
4558 0,0,0,0 /* tp_alloc -> tp_next */
4559 #endif
4560 };
4561 varlink_type = tmp;
4562 varlink_type.ob_type = &PyType_Type;
4563 type_init = 1;
4564 }
4565 return &varlink_type;
4566 }
4567
4568 /* Create a variable linking object for use later */
4569 SWIGINTERN PyObject *
4570 SWIG_Python_newvarlink(void) {
4571 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
4572 if (result) {
4573 result->vars = 0;
4574 }
4575 return ((PyObject*) result);
4576 }
4577
4578 SWIGINTERN void
4579 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
4580 swig_varlinkobject *v = (swig_varlinkobject *) p;
4581 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
4582 if (gv) {
4583 size_t size = strlen(name)+1;
4584 gv->name = (char *)malloc(size);
4585 if (gv->name) {
4586 strncpy(gv->name,name,size);
4587 gv->get_attr = get_attr;
4588 gv->set_attr = set_attr;
4589 gv->next = v->vars;
4590 }
4591 }
4592 v->vars = gv;
4593 }
4594
4595 SWIGINTERN PyObject *
4596 SWIG_globals() {
4597 static PyObject *_SWIG_globals = 0;
4598 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
4599 return _SWIG_globals;
4600 }
4601
4602 /* -----------------------------------------------------------------------------
4603 * constants/methods manipulation
4604 * ----------------------------------------------------------------------------- */
4605
4606 /* Install Constants */
4607 SWIGINTERN void
4608 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
4609 PyObject *obj = 0;
4610 size_t i;
4611 for (i = 0; constants[i].type; ++i) {
4612 switch(constants[i].type) {
4613 case SWIG_PY_POINTER:
4614 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
4615 break;
4616 case SWIG_PY_BINARY:
4617 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
4618 break;
4619 default:
4620 obj = 0;
4621 break;
4622 }
4623 if (obj) {
4624 PyDict_SetItemString(d, constants[i].name, obj);
4625 Py_DECREF(obj);
4626 }
4627 }
4628 }
4629
4630 /* -----------------------------------------------------------------------------*/
4631 /* Fix SwigMethods to carry the callback ptrs when needed */
4632 /* -----------------------------------------------------------------------------*/
4633
4634 SWIGINTERN void
4635 SWIG_Python_FixMethods(PyMethodDef *methods,
4636 swig_const_info *const_table,
4637 swig_type_info **types,
4638 swig_type_info **types_initial) {
4639 size_t i;
4640 for (i = 0; methods[i].ml_name; ++i) {
4641 char *c = methods[i].ml_doc;
4642 if (c && (c = strstr(c, "swig_ptr: "))) {
4643 int j;
4644 swig_const_info *ci = 0;
4645 char *name = c + 10;
4646 for (j = 0; const_table[j].type; ++j) {
4647 if (strncmp(const_table[j].name, name,
4648 strlen(const_table[j].name)) == 0) {
4649 ci = &(const_table[j]);
4650 break;
4651 }
4652 }
4653 if (ci) {
4654 size_t shift = (ci->ptype) - types;
4655 swig_type_info *ty = types_initial[shift];
4656 size_t ldoc = (c - methods[i].ml_doc);
4657 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
4658 char *ndoc = (char*)malloc(ldoc + lptr + 10);
4659 if (ndoc) {
4660 char *buff = ndoc;
4661 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
4662 if (ptr) {
4663 strncpy(buff, methods[i].ml_doc, ldoc);
4664 buff += ldoc;
4665 strncpy(buff, "swig_ptr: ", 10);
4666 buff += 10;
4667 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
4668 methods[i].ml_doc = ndoc;
4669 }
4670 }
4671 }
4672 }
4673 }
4674 }
4675
4676 #ifdef __cplusplus
4677 }
4678 #endif
4679
4680 /* -----------------------------------------------------------------------------*
4681 * Partial Init method
4682 * -----------------------------------------------------------------------------*/
4683
4684 #ifdef __cplusplus
4685 extern "C"
4686 #endif
4687 SWIGEXPORT void SWIG_init(void) {
4688 PyObject *m, *d;
4689
4690 /* Fix SwigMethods to carry the callback ptrs when needed */
4691 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
4692
4693 m = Py_InitModule((char *) SWIG_name, SwigMethods);
4694 d = PyModule_GetDict(m);
4695
4696 SWIG_InitializeModule(0);
4697 SWIG_InstallConstants(d,swig_const_table);
4698
4699
4700 PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
4701 SWIG_addvarlink(SWIG_globals(),(char*)"GLCanvasNameStr",GLCanvasNameStr_get, GLCanvasNameStr_set);
4702 SWIG_Python_SetConstant(d, "WX_GL_RGBA",SWIG_From_int(static_cast< int >(WX_GL_RGBA)));
4703 SWIG_Python_SetConstant(d, "WX_GL_BUFFER_SIZE",SWIG_From_int(static_cast< int >(WX_GL_BUFFER_SIZE)));
4704 SWIG_Python_SetConstant(d, "WX_GL_LEVEL",SWIG_From_int(static_cast< int >(WX_GL_LEVEL)));
4705 SWIG_Python_SetConstant(d, "WX_GL_DOUBLEBUFFER",SWIG_From_int(static_cast< int >(WX_GL_DOUBLEBUFFER)));
4706 SWIG_Python_SetConstant(d, "WX_GL_STEREO",SWIG_From_int(static_cast< int >(WX_GL_STEREO)));
4707 SWIG_Python_SetConstant(d, "WX_GL_AUX_BUFFERS",SWIG_From_int(static_cast< int >(WX_GL_AUX_BUFFERS)));
4708 SWIG_Python_SetConstant(d, "WX_GL_MIN_RED",SWIG_From_int(static_cast< int >(WX_GL_MIN_RED)));
4709 SWIG_Python_SetConstant(d, "WX_GL_MIN_GREEN",SWIG_From_int(static_cast< int >(WX_GL_MIN_GREEN)));
4710 SWIG_Python_SetConstant(d, "WX_GL_MIN_BLUE",SWIG_From_int(static_cast< int >(WX_GL_MIN_BLUE)));
4711 SWIG_Python_SetConstant(d, "WX_GL_MIN_ALPHA",SWIG_From_int(static_cast< int >(WX_GL_MIN_ALPHA)));
4712 SWIG_Python_SetConstant(d, "WX_GL_DEPTH_SIZE",SWIG_From_int(static_cast< int >(WX_GL_DEPTH_SIZE)));
4713 SWIG_Python_SetConstant(d, "WX_GL_STENCIL_SIZE",SWIG_From_int(static_cast< int >(WX_GL_STENCIL_SIZE)));
4714 SWIG_Python_SetConstant(d, "WX_GL_MIN_ACCUM_RED",SWIG_From_int(static_cast< int >(WX_GL_MIN_ACCUM_RED)));
4715 SWIG_Python_SetConstant(d, "WX_GL_MIN_ACCUM_GREEN",SWIG_From_int(static_cast< int >(WX_GL_MIN_ACCUM_GREEN)));
4716 SWIG_Python_SetConstant(d, "WX_GL_MIN_ACCUM_BLUE",SWIG_From_int(static_cast< int >(WX_GL_MIN_ACCUM_BLUE)));
4717 SWIG_Python_SetConstant(d, "WX_GL_MIN_ACCUM_ALPHA",SWIG_From_int(static_cast< int >(WX_GL_MIN_ACCUM_ALPHA)));
4718
4719
4720
4721 }
4722