1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
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
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 #define SWIGPYTHON_BUILTIN
18
19 /* -----------------------------------------------------------------------------
20 * This section contains generic SWIG labels for method/variable
21 * declarations/attributes, and other compiler dependent labels.
22 * ----------------------------------------------------------------------------- */
23
24 /* template workaround for compilers that cannot correctly implement the C++ standard */
25 #ifndef SWIGTEMPLATEDISAMBIGUATOR
26 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
27 # define SWIGTEMPLATEDISAMBIGUATOR template
28 # elif defined(__HP_aCC)
29 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
30 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
31 # define SWIGTEMPLATEDISAMBIGUATOR template
32 # else
33 # define SWIGTEMPLATEDISAMBIGUATOR
34 # endif
35 #endif
36
37 /* inline attribute */
38 #ifndef SWIGINLINE
39 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
40 # define SWIGINLINE inline
41 # else
42 # define SWIGINLINE
43 # endif
44 #endif
45
46 /* attribute recognised by some compilers to avoid 'unused' warnings */
47 #ifndef SWIGUNUSED
48 # if defined(__GNUC__)
49 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
50 # define SWIGUNUSED __attribute__ ((__unused__))
51 # else
52 # define SWIGUNUSED
53 # endif
54 # elif defined(__ICC)
55 # define SWIGUNUSED __attribute__ ((__unused__))
56 # else
57 # define SWIGUNUSED
58 # endif
59 #endif
60
61 #ifndef SWIG_MSC_UNSUPPRESS_4505
62 # if defined(_MSC_VER)
63 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
64 # endif
65 #endif
66
67 #ifndef SWIGUNUSEDPARM
68 # ifdef __cplusplus
69 # define SWIGUNUSEDPARM(p)
70 # else
71 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
72 # endif
73 #endif
74
75 /* internal SWIG method */
76 #ifndef SWIGINTERN
77 # define SWIGINTERN static SWIGUNUSED
78 #endif
79
80 /* internal inline SWIG method */
81 #ifndef SWIGINTERNINLINE
82 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
83 #endif
84
85 /* exporting methods */
86 #if defined(__GNUC__)
87 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
88 # ifndef GCC_HASCLASSVISIBILITY
89 # define GCC_HASCLASSVISIBILITY
90 # endif
91 # endif
92 #endif
93
94 #ifndef SWIGEXPORT
95 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
96 # if defined(STATIC_LINKED)
97 # define SWIGEXPORT
98 # else
99 # define SWIGEXPORT __declspec(dllexport)
100 # endif
101 # else
102 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
103 # define SWIGEXPORT __attribute__ ((visibility("default")))
104 # else
105 # define SWIGEXPORT
106 # endif
107 # endif
108 #endif
109
110 /* calling conventions for Windows */
111 #ifndef SWIGSTDCALL
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 # define SWIGSTDCALL __stdcall
114 # else
115 # define SWIGSTDCALL
116 # endif
117 #endif
118
119 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
120 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
121 # define _CRT_SECURE_NO_DEPRECATE
122 #endif
123
124 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
125 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
126 # define _SCL_SECURE_NO_DEPRECATE
127 #endif
128
129 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
130 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
131 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
132 #endif
133
134 /* Intel's compiler complains if a variable which was never initialised is
135 * cast to void, which is a common idiom which we use to indicate that we
136 * are aware a variable isn't used. So we just silence that warning.
137 * See: https://github.com/swig/swig/issues/192 for more discussion.
138 */
139 #ifdef __INTEL_COMPILER
140 # pragma warning disable 592
141 #endif
142
143
144 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
145 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
146 # include <math.h>
147 #endif
148
149 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
150 /* Use debug wrappers with the Python release dll */
151 # undef _DEBUG
152 # include <Python.h>
153 # define _DEBUG 1
154 #else
155 # include <Python.h>
156 #endif
157
158 /* -----------------------------------------------------------------------------
159 * swigrun.swg
160 *
161 * This file contains generic C API SWIG runtime support for pointer
162 * type checking.
163 * ----------------------------------------------------------------------------- */
164
165 /* This should only be incremented when either the layout of swig_type_info changes,
166 or for whatever reason, the runtime changes incompatibly */
167 #define SWIG_RUNTIME_VERSION "4"
168
169 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
170 #ifdef SWIG_TYPE_TABLE
171 # define SWIG_QUOTE_STRING(x) #x
172 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
173 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
174 #else
175 # define SWIG_TYPE_TABLE_NAME
176 #endif
177
178 /*
179 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
180 creating a static or dynamic library from the SWIG runtime code.
181 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
182
183 But only do this if strictly necessary, ie, if you have problems
184 with your compiler or suchlike.
185 */
186
187 #ifndef SWIGRUNTIME
188 # define SWIGRUNTIME SWIGINTERN
189 #endif
190
191 #ifndef SWIGRUNTIMEINLINE
192 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
193 #endif
194
195 /* Generic buffer size */
196 #ifndef SWIG_BUFFER_SIZE
197 # define SWIG_BUFFER_SIZE 1024
198 #endif
199
200 /* Flags for pointer conversions */
201 #define SWIG_POINTER_DISOWN 0x1
202 #define SWIG_CAST_NEW_MEMORY 0x2
203 #define SWIG_POINTER_NO_NULL 0x4
204
205 /* Flags for new pointer objects */
206 #define SWIG_POINTER_OWN 0x1
207
208
209 /*
210 Flags/methods for returning states.
211
212 The SWIG conversion methods, as ConvertPtr, return an integer
213 that tells if the conversion was successful or not. And if not,
214 an error code can be returned (see swigerrors.swg for the codes).
215
216 Use the following macros/flags to set or process the returning
217 states.
218
219 In old versions of SWIG, code such as the following was usually written:
220
221 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
222 // success code
223 } else {
224 //fail code
225 }
226
227 Now you can be more explicit:
228
229 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
230 if (SWIG_IsOK(res)) {
231 // success code
232 } else {
233 // fail code
234 }
235
236 which is the same really, but now you can also do
237
238 Type *ptr;
239 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
240 if (SWIG_IsOK(res)) {
241 // success code
242 if (SWIG_IsNewObj(res) {
243 ...
244 delete *ptr;
245 } else {
246 ...
247 }
248 } else {
249 // fail code
250 }
251
252 I.e., now SWIG_ConvertPtr can return new objects and you can
253 identify the case and take care of the deallocation. Of course that
254 also requires SWIG_ConvertPtr to return new result values, such as
255
256 int SWIG_ConvertPtr(obj, ptr,...) {
257 if (<obj is ok>) {
258 if (<need new object>) {
259 *ptr = <ptr to new allocated object>;
260 return SWIG_NEWOBJ;
261 } else {
262 *ptr = <ptr to old object>;
263 return SWIG_OLDOBJ;
264 }
265 } else {
266 return SWIG_BADOBJ;
267 }
268 }
269
270 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
271 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
272 SWIG errors code.
273
274 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
275 allows to return the 'cast rank', for example, if you have this
276
277 int food(double)
278 int fooi(int);
279
280 and you call
281
282 food(1) // cast rank '1' (1 -> 1.0)
283 fooi(1) // cast rank '0'
284
285 just use the SWIG_AddCast()/SWIG_CheckState()
286 */
287
288 #define SWIG_OK (0)
289 #define SWIG_ERROR (-1)
290 #define SWIG_IsOK(r) (r >= 0)
291 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
292
293 /* The CastRankLimit says how many bits are used for the cast rank */
294 #define SWIG_CASTRANKLIMIT (1 << 8)
295 /* The NewMask denotes the object was created (using new/malloc) */
296 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
297 /* The TmpMask is for in/out typemaps that use temporal objects */
298 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
299 /* Simple returning values */
300 #define SWIG_BADOBJ (SWIG_ERROR)
301 #define SWIG_OLDOBJ (SWIG_OK)
302 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
303 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
304 /* Check, add and del mask methods */
305 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
306 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
307 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
308 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
309 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
310 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
311
312 /* Cast-Rank Mode */
313 #if defined(SWIG_CASTRANK_MODE)
314 # ifndef SWIG_TypeRank
315 # define SWIG_TypeRank unsigned long
316 # endif
317 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
318 # define SWIG_MAXCASTRANK (2)
319 # endif
320 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
321 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)322 SWIGINTERNINLINE int SWIG_AddCast(int r) {
323 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
324 }
SWIG_CheckState(int r)325 SWIGINTERNINLINE int SWIG_CheckState(int r) {
326 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
327 }
328 #else /* no cast-rank mode */
329 # define SWIG_AddCast(r) (r)
330 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
331 #endif
332
333
334 #include <string.h>
335
336 #ifdef __cplusplus
337 extern "C" {
338 #endif
339
340 typedef void *(*swig_converter_func)(void *, int *);
341 typedef struct swig_type_info *(*swig_dycast_func)(void **);
342
343 /* Structure to store information on one type */
344 typedef struct swig_type_info {
345 const char *name; /* mangled name of this type */
346 const char *str; /* human readable name of this type */
347 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
348 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
349 void *clientdata; /* language specific type data */
350 int owndata; /* flag if the structure owns the clientdata */
351 } swig_type_info;
352
353 /* Structure to store a type and conversion function used for casting */
354 typedef struct swig_cast_info {
355 swig_type_info *type; /* pointer to type that is equivalent to this type */
356 swig_converter_func converter; /* function to cast the void pointers */
357 struct swig_cast_info *next; /* pointer to next cast in linked list */
358 struct swig_cast_info *prev; /* pointer to the previous cast */
359 } swig_cast_info;
360
361 /* Structure used to store module information
362 * Each module generates one structure like this, and the runtime collects
363 * all of these structures and stores them in a circularly linked list.*/
364 typedef struct swig_module_info {
365 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
366 size_t size; /* Number of types in this module */
367 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
368 swig_type_info **type_initial; /* Array of initially generated type structures */
369 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
370 void *clientdata; /* Language specific module data */
371 } swig_module_info;
372
373 /*
374 Compare two type names skipping the space characters, therefore
375 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
376
377 Return 0 when the two name types are equivalent, as in
378 strncmp, but skipping ' '.
379 */
380 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)381 SWIG_TypeNameComp(const char *f1, const char *l1,
382 const char *f2, const char *l2) {
383 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
384 while ((*f1 == ' ') && (f1 != l1)) ++f1;
385 while ((*f2 == ' ') && (f2 != l2)) ++f2;
386 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
387 }
388 return (int)((l1 - f1) - (l2 - f2));
389 }
390
391 /*
392 Check type equivalence in a name list like <name1>|<name2>|...
393 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
394 */
395 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)396 SWIG_TypeCmp(const char *nb, const char *tb) {
397 int equiv = 1;
398 const char* te = tb + strlen(tb);
399 const char* ne = nb;
400 while (equiv != 0 && *ne) {
401 for (nb = ne; *ne; ++ne) {
402 if (*ne == '|') break;
403 }
404 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
405 if (*ne) ++ne;
406 }
407 return equiv;
408 }
409
410 /*
411 Check type equivalence in a name list like <name1>|<name2>|...
412 Return 0 if not equal, 1 if equal
413 */
414 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)415 SWIG_TypeEquiv(const char *nb, const char *tb) {
416 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
417 }
418
419 /*
420 Check the typename
421 */
422 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)423 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
424 if (ty) {
425 swig_cast_info *iter = ty->cast;
426 while (iter) {
427 if (strcmp(iter->type->name, c) == 0) {
428 if (iter == ty->cast)
429 return iter;
430 /* Move iter to the top of the linked list */
431 iter->prev->next = iter->next;
432 if (iter->next)
433 iter->next->prev = iter->prev;
434 iter->next = ty->cast;
435 iter->prev = 0;
436 if (ty->cast) ty->cast->prev = iter;
437 ty->cast = iter;
438 return iter;
439 }
440 iter = iter->next;
441 }
442 }
443 return 0;
444 }
445
446 /*
447 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
448 */
449 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)450 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
451 if (ty) {
452 swig_cast_info *iter = ty->cast;
453 while (iter) {
454 if (iter->type == from) {
455 if (iter == ty->cast)
456 return iter;
457 /* Move iter to the top of the linked list */
458 iter->prev->next = iter->next;
459 if (iter->next)
460 iter->next->prev = iter->prev;
461 iter->next = ty->cast;
462 iter->prev = 0;
463 if (ty->cast) ty->cast->prev = iter;
464 ty->cast = iter;
465 return iter;
466 }
467 iter = iter->next;
468 }
469 }
470 return 0;
471 }
472
473 /*
474 Cast a pointer up an inheritance hierarchy
475 */
476 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)477 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
478 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
479 }
480
481 /*
482 Dynamic pointer casting. Down an inheritance hierarchy
483 */
484 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)485 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
486 swig_type_info *lastty = ty;
487 if (!ty || !ty->dcast) return ty;
488 while (ty && (ty->dcast)) {
489 ty = (*ty->dcast)(ptr);
490 if (ty) lastty = ty;
491 }
492 return lastty;
493 }
494
495 /*
496 Return the name associated with this type
497 */
498 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)499 SWIG_TypeName(const swig_type_info *ty) {
500 return ty->name;
501 }
502
503 /*
504 Return the pretty name associated with this type,
505 that is an unmangled type name in a form presentable to the user.
506 */
507 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)508 SWIG_TypePrettyName(const swig_type_info *type) {
509 /* The "str" field contains the equivalent pretty names of the
510 type, separated by vertical-bar characters. We choose
511 to print the last name, as it is often (?) the most
512 specific. */
513 if (!type) return NULL;
514 if (type->str != NULL) {
515 const char *last_name = type->str;
516 const char *s;
517 for (s = type->str; *s; s++)
518 if (*s == '|') last_name = s+1;
519 return last_name;
520 }
521 else
522 return type->name;
523 }
524
525 /*
526 Set the clientdata field for a type
527 */
528 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)529 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
530 swig_cast_info *cast = ti->cast;
531 /* if (ti->clientdata == clientdata) return; */
532 ti->clientdata = clientdata;
533
534 while (cast) {
535 if (!cast->converter) {
536 swig_type_info *tc = cast->type;
537 if (!tc->clientdata) {
538 SWIG_TypeClientData(tc, clientdata);
539 }
540 }
541 cast = cast->next;
542 }
543 }
544 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)545 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
546 SWIG_TypeClientData(ti, clientdata);
547 ti->owndata = 1;
548 }
549
550 /*
551 Search for a swig_type_info structure only by mangled name
552 Search is a O(log #types)
553
554 We start searching at module start, and finish searching when start == end.
555 Note: if start == end at the beginning of the function, we go all the way around
556 the circular list.
557 */
558 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)559 SWIG_MangledTypeQueryModule(swig_module_info *start,
560 swig_module_info *end,
561 const char *name) {
562 swig_module_info *iter = start;
563 do {
564 if (iter->size) {
565 size_t l = 0;
566 size_t r = iter->size - 1;
567 do {
568 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
569 size_t i = (l + r) >> 1;
570 const char *iname = iter->types[i]->name;
571 if (iname) {
572 int compare = strcmp(name, iname);
573 if (compare == 0) {
574 return iter->types[i];
575 } else if (compare < 0) {
576 if (i) {
577 r = i - 1;
578 } else {
579 break;
580 }
581 } else if (compare > 0) {
582 l = i + 1;
583 }
584 } else {
585 break; /* should never happen */
586 }
587 } while (l <= r);
588 }
589 iter = iter->next;
590 } while (iter != end);
591 return 0;
592 }
593
594 /*
595 Search for a swig_type_info structure for either a mangled name or a human readable name.
596 It first searches the mangled names of the types, which is a O(log #types)
597 If a type is not found it then searches the human readable names, which is O(#types).
598
599 We start searching at module start, and finish searching when start == end.
600 Note: if start == end at the beginning of the function, we go all the way around
601 the circular list.
602 */
603 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)604 SWIG_TypeQueryModule(swig_module_info *start,
605 swig_module_info *end,
606 const char *name) {
607 /* STEP 1: Search the name field using binary search */
608 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
609 if (ret) {
610 return ret;
611 } else {
612 /* STEP 2: If the type hasn't been found, do a complete search
613 of the str field (the human readable name) */
614 swig_module_info *iter = start;
615 do {
616 size_t i = 0;
617 for (; i < iter->size; ++i) {
618 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
619 return iter->types[i];
620 }
621 iter = iter->next;
622 } while (iter != end);
623 }
624
625 /* neither found a match */
626 return 0;
627 }
628
629 /*
630 Pack binary data into a string
631 */
632 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)633 SWIG_PackData(char *c, void *ptr, size_t sz) {
634 static const char hex[17] = "0123456789abcdef";
635 const unsigned char *u = (unsigned char *) ptr;
636 const unsigned char *eu = u + sz;
637 for (; u != eu; ++u) {
638 unsigned char uu = *u;
639 *(c++) = hex[(uu & 0xf0) >> 4];
640 *(c++) = hex[uu & 0xf];
641 }
642 return c;
643 }
644
645 /*
646 Unpack binary data from a string
647 */
648 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)649 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
650 unsigned char *u = (unsigned char *) ptr;
651 const unsigned char *eu = u + sz;
652 for (; u != eu; ++u) {
653 char d = *(c++);
654 unsigned char uu;
655 if ((d >= '0') && (d <= '9'))
656 uu = (unsigned char)((d - '0') << 4);
657 else if ((d >= 'a') && (d <= 'f'))
658 uu = (unsigned char)((d - ('a'-10)) << 4);
659 else
660 return (char *) 0;
661 d = *(c++);
662 if ((d >= '0') && (d <= '9'))
663 uu |= (unsigned char)(d - '0');
664 else if ((d >= 'a') && (d <= 'f'))
665 uu |= (unsigned char)(d - ('a'-10));
666 else
667 return (char *) 0;
668 *u = uu;
669 }
670 return c;
671 }
672
673 /*
674 Pack 'void *' into a string buffer.
675 */
676 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)677 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
678 char *r = buff;
679 if ((2*sizeof(void *) + 2) > bsz) return 0;
680 *(r++) = '_';
681 r = SWIG_PackData(r,&ptr,sizeof(void *));
682 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
683 strcpy(r,name);
684 return buff;
685 }
686
687 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)688 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
689 if (*c != '_') {
690 if (strcmp(c,"NULL") == 0) {
691 *ptr = (void *) 0;
692 return name;
693 } else {
694 return 0;
695 }
696 }
697 return SWIG_UnpackData(++c,ptr,sizeof(void *));
698 }
699
700 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)701 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
702 char *r = buff;
703 size_t lname = (name ? strlen(name) : 0);
704 if ((2*sz + 2 + lname) > bsz) return 0;
705 *(r++) = '_';
706 r = SWIG_PackData(r,ptr,sz);
707 if (lname) {
708 strncpy(r,name,lname+1);
709 } else {
710 *r = 0;
711 }
712 return buff;
713 }
714
715 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)716 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
717 if (*c != '_') {
718 if (strcmp(c,"NULL") == 0) {
719 memset(ptr,0,sz);
720 return name;
721 } else {
722 return 0;
723 }
724 }
725 return SWIG_UnpackData(++c,ptr,sz);
726 }
727
728 #ifdef __cplusplus
729 }
730 #endif
731
732 /* Errors in SWIG */
733 #define SWIG_UnknownError -1
734 #define SWIG_IOError -2
735 #define SWIG_RuntimeError -3
736 #define SWIG_IndexError -4
737 #define SWIG_TypeError -5
738 #define SWIG_DivisionByZero -6
739 #define SWIG_OverflowError -7
740 #define SWIG_SyntaxError -8
741 #define SWIG_ValueError -9
742 #define SWIG_SystemError -10
743 #define SWIG_AttributeError -11
744 #define SWIG_MemoryError -12
745 #define SWIG_NullReferenceError -13
746
747
748
749 /* Compatibility macros for Python 3 */
750 #if PY_VERSION_HEX >= 0x03000000
751
752 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
753 #define PyInt_Check(x) PyLong_Check(x)
754 #define PyInt_AsLong(x) PyLong_AsLong(x)
755 #define PyInt_FromLong(x) PyLong_FromLong(x)
756 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
757 #define PyString_Check(name) PyBytes_Check(name)
758 #define PyString_FromString(x) PyUnicode_FromString(x)
759 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
760 #define PyString_AsString(str) PyBytes_AsString(str)
761 #define PyString_Size(str) PyBytes_Size(str)
762 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
763 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
764 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
765 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
766
767 #endif
768
769 #ifndef Py_TYPE
770 # define Py_TYPE(op) ((op)->ob_type)
771 #endif
772
773 /* SWIG APIs for compatibility of both Python 2 & 3 */
774
775 #if PY_VERSION_HEX >= 0x03000000
776 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
777 #else
778 # define SWIG_Python_str_FromFormat PyString_FromFormat
779 #endif
780
781
782 /* Warning: This function will allocate a new string in Python 3,
783 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
784 */
785 SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject * str)786 SWIG_Python_str_AsChar(PyObject *str)
787 {
788 #if PY_VERSION_HEX >= 0x03030000
789 return (char *)PyUnicode_AsUTF8(str);
790 #elif PY_VERSION_HEX >= 0x03000000
791 char *newstr = 0;
792 str = PyUnicode_AsUTF8String(str);
793 if (str) {
794 char *cstr;
795 Py_ssize_t len;
796 if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
797 newstr = (char *) malloc(len+1);
798 if (newstr)
799 memcpy(newstr, cstr, len+1);
800 }
801 Py_XDECREF(str);
802 }
803 return newstr;
804 #else
805 return PyString_AsString(str);
806 #endif
807 }
808
809 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
810 # define SWIG_Python_str_DelForPy3(x)
811 #else
812 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
813 #endif
814
815
816 SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char * c)817 SWIG_Python_str_FromChar(const char *c)
818 {
819 #if PY_VERSION_HEX >= 0x03000000
820 return PyUnicode_FromString(c);
821 #else
822 return PyString_FromString(c);
823 #endif
824 }
825
826 #ifndef PyObject_DEL
827 # define PyObject_DEL PyObject_Del
828 #endif
829
830 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
831 // interface files check for it.
832 # define SWIGPY_USE_CAPSULE
833 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
834
835 #if PY_VERSION_HEX < 0x03020000
836 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
837 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
838 #define Py_hash_t long
839 #endif
840
841 /* -----------------------------------------------------------------------------
842 * error manipulation
843 * ----------------------------------------------------------------------------- */
844
845 SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code)846 SWIG_Python_ErrorType(int code) {
847 PyObject* type = 0;
848 switch(code) {
849 case SWIG_MemoryError:
850 type = PyExc_MemoryError;
851 break;
852 case SWIG_IOError:
853 type = PyExc_IOError;
854 break;
855 case SWIG_RuntimeError:
856 type = PyExc_RuntimeError;
857 break;
858 case SWIG_IndexError:
859 type = PyExc_IndexError;
860 break;
861 case SWIG_TypeError:
862 type = PyExc_TypeError;
863 break;
864 case SWIG_DivisionByZero:
865 type = PyExc_ZeroDivisionError;
866 break;
867 case SWIG_OverflowError:
868 type = PyExc_OverflowError;
869 break;
870 case SWIG_SyntaxError:
871 type = PyExc_SyntaxError;
872 break;
873 case SWIG_ValueError:
874 type = PyExc_ValueError;
875 break;
876 case SWIG_SystemError:
877 type = PyExc_SystemError;
878 break;
879 case SWIG_AttributeError:
880 type = PyExc_AttributeError;
881 break;
882 default:
883 type = PyExc_RuntimeError;
884 }
885 return type;
886 }
887
888
889 SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char * mesg)890 SWIG_Python_AddErrorMsg(const char* mesg)
891 {
892 PyObject *type = 0;
893 PyObject *value = 0;
894 PyObject *traceback = 0;
895
896 if (PyErr_Occurred())
897 PyErr_Fetch(&type, &value, &traceback);
898 if (value) {
899 PyObject *old_str = PyObject_Str(value);
900 const char *tmp = SWIG_Python_str_AsChar(old_str);
901 PyErr_Clear();
902 Py_XINCREF(type);
903 if (tmp)
904 PyErr_Format(type, "%s %s", tmp, mesg);
905 else
906 PyErr_Format(type, "%s", mesg);
907 SWIG_Python_str_DelForPy3(tmp);
908 Py_DECREF(old_str);
909 Py_DECREF(value);
910 } else {
911 PyErr_SetString(PyExc_RuntimeError, mesg);
912 }
913 }
914
915 SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject * obj)916 SWIG_Python_TypeErrorOccurred(PyObject *obj)
917 {
918 PyObject *error;
919 if (obj)
920 return 0;
921 error = PyErr_Occurred();
922 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
923 }
924
925 SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char * message)926 SWIG_Python_RaiseOrModifyTypeError(const char *message)
927 {
928 if (SWIG_Python_TypeErrorOccurred(NULL)) {
929 /* Use existing TypeError to preserve stacktrace and enhance with given message */
930 PyObject *newvalue;
931 PyObject *type = NULL, *value = NULL, *traceback = NULL;
932 PyErr_Fetch(&type, &value, &traceback);
933 #if PY_VERSION_HEX >= 0x03000000
934 newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
935 #else
936 newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
937 #endif
938 Py_XDECREF(value);
939 PyErr_Restore(type, newvalue, traceback);
940 } else {
941 /* Raise TypeError using given message */
942 PyErr_SetString(PyExc_TypeError, message);
943 }
944 }
945
946 #if defined(SWIG_PYTHON_NO_THREADS)
947 # if defined(SWIG_PYTHON_THREADS)
948 # undef SWIG_PYTHON_THREADS
949 # endif
950 #endif
951 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
952 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
953 # define SWIG_PYTHON_USE_GIL
954 # endif
955 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
956 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
957 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
958 # endif
959 # ifdef __cplusplus /* C++ code */
960 class SWIG_Python_Thread_Block {
961 bool status;
962 PyGILState_STATE state;
963 public:
end()964 void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()965 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()966 ~SWIG_Python_Thread_Block() { end(); }
967 };
968 class SWIG_Python_Thread_Allow {
969 bool status;
970 PyThreadState *save;
971 public:
end()972 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()973 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()974 ~SWIG_Python_Thread_Allow() { end(); }
975 };
976 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
977 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
978 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
979 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
980 # else /* C code */
981 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
982 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
983 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
984 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
985 # endif
986 # else /* Old thread way, not implemented, user must provide it */
987 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
988 # define SWIG_PYTHON_INITIALIZE_THREADS
989 # endif
990 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
991 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
992 # endif
993 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
994 # define SWIG_PYTHON_THREAD_END_BLOCK
995 # endif
996 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
997 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
998 # endif
999 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1000 # define SWIG_PYTHON_THREAD_END_ALLOW
1001 # endif
1002 # endif
1003 #else /* No thread support */
1004 # define SWIG_PYTHON_INITIALIZE_THREADS
1005 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1006 # define SWIG_PYTHON_THREAD_END_BLOCK
1007 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1008 # define SWIG_PYTHON_THREAD_END_ALLOW
1009 #endif
1010
1011 /* -----------------------------------------------------------------------------
1012 * Python API portion that goes into the runtime
1013 * ----------------------------------------------------------------------------- */
1014
1015 #ifdef __cplusplus
1016 extern "C" {
1017 #endif
1018
1019 /* -----------------------------------------------------------------------------
1020 * Constant declarations
1021 * ----------------------------------------------------------------------------- */
1022
1023 /* Constant Types */
1024 #define SWIG_PY_POINTER 4
1025 #define SWIG_PY_BINARY 5
1026
1027 /* Constant information structure */
1028 typedef struct swig_const_info {
1029 int type;
1030 const char *name;
1031 long lvalue;
1032 double dvalue;
1033 void *pvalue;
1034 swig_type_info **ptype;
1035 } swig_const_info;
1036
1037 #ifdef __cplusplus
1038 }
1039 #endif
1040
1041
1042 /* -----------------------------------------------------------------------------
1043 * pyrun.swg
1044 *
1045 * This file contains the runtime support for Python modules
1046 * and includes code for managing global variables and pointer
1047 * type checking.
1048 *
1049 * ----------------------------------------------------------------------------- */
1050
1051 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1052 # error "This version of SWIG only supports Python >= 2.7"
1053 #endif
1054
1055 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1056 # error "This version of SWIG only supports Python 3 >= 3.2"
1057 #endif
1058
1059 /* Common SWIG API */
1060
1061 /* for raw pointers */
1062 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1063 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1064 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1065
1066 #ifdef SWIGPYTHON_BUILTIN
1067 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1068 #else
1069 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1070 #endif
1071
1072 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1073
1074 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1075 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1076 #define swig_owntype int
1077
1078 /* for raw packed data */
1079 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1080 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1081
1082 /* for class or struct pointers */
1083 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1084 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1085
1086 /* for C or C++ function pointers */
1087 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1088 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1089
1090 /* for C++ member pointers, ie, member methods */
1091 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1092 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1093
1094
1095 /* Runtime API */
1096
1097 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1098 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1099 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1100
1101 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1102 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1103 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1104 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1105 #define SWIG_fail goto fail
1106
1107
1108 /* Runtime API implementation */
1109
1110 /* Error manipulation */
1111
1112 SWIGINTERN void
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1113 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1114 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1115 PyErr_SetObject(errtype, obj);
1116 Py_DECREF(obj);
1117 SWIG_PYTHON_THREAD_END_BLOCK;
1118 }
1119
1120 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1121 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1122 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1123 PyErr_SetString(errtype, msg);
1124 SWIG_PYTHON_THREAD_END_BLOCK;
1125 }
1126
1127 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1128
1129 /* Set a constant value */
1130
1131 #if defined(SWIGPYTHON_BUILTIN)
1132
1133 SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject * seq,const char * key)1134 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1135 PyObject *s = PyString_InternFromString(key);
1136 PyList_Append(seq, s);
1137 Py_DECREF(s);
1138 }
1139
1140 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,PyObject * public_interface,const char * name,PyObject * obj)1141 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1142 PyDict_SetItemString(d, name, obj);
1143 Py_DECREF(obj);
1144 if (public_interface)
1145 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1146 }
1147
1148 #else
1149
1150 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)1151 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1152 PyDict_SetItemString(d, name, obj);
1153 Py_DECREF(obj);
1154 }
1155
1156 #endif
1157
1158 /* Append a value to the result obj */
1159
1160 SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)1161 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1162 if (!result) {
1163 result = obj;
1164 } else if (result == Py_None) {
1165 Py_DECREF(result);
1166 result = obj;
1167 } else {
1168 if (!PyList_Check(result)) {
1169 PyObject *o2 = result;
1170 result = PyList_New(1);
1171 PyList_SetItem(result, 0, o2);
1172 }
1173 PyList_Append(result,obj);
1174 Py_DECREF(obj);
1175 }
1176 return result;
1177 }
1178
1179 /* Unpack the argument tuple */
1180
1181 SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject * args,const char * name,Py_ssize_t min,Py_ssize_t max,PyObject ** objs)1182 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1183 {
1184 if (!args) {
1185 if (!min && !max) {
1186 return 1;
1187 } else {
1188 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1189 name, (min == max ? "" : "at least "), (int)min);
1190 return 0;
1191 }
1192 }
1193 if (!PyTuple_Check(args)) {
1194 if (min <= 1 && max >= 1) {
1195 Py_ssize_t i;
1196 objs[0] = args;
1197 for (i = 1; i < max; ++i) {
1198 objs[i] = 0;
1199 }
1200 return 2;
1201 }
1202 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1203 return 0;
1204 } else {
1205 Py_ssize_t l = PyTuple_GET_SIZE(args);
1206 if (l < min) {
1207 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1208 name, (min == max ? "" : "at least "), (int)min, (int)l);
1209 return 0;
1210 } else if (l > max) {
1211 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1212 name, (min == max ? "" : "at most "), (int)max, (int)l);
1213 return 0;
1214 } else {
1215 Py_ssize_t i;
1216 for (i = 0; i < l; ++i) {
1217 objs[i] = PyTuple_GET_ITEM(args, i);
1218 }
1219 for (; l < max; ++l) {
1220 objs[l] = 0;
1221 }
1222 return i + 1;
1223 }
1224 }
1225 }
1226
1227 SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject * kwargs,const char * name)1228 SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1229 int no_kwargs = 1;
1230 if (kwargs) {
1231 assert(PyDict_Check(kwargs));
1232 if (PyDict_Size(kwargs) > 0) {
1233 PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1234 no_kwargs = 0;
1235 }
1236 }
1237 return no_kwargs;
1238 }
1239
1240 /* A functor is a function object with one single object argument */
1241 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1242
1243 /*
1244 Helper for static pointer initialization for both C and C++ code, for example
1245 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1246 */
1247 #ifdef __cplusplus
1248 #define SWIG_STATIC_POINTER(var) var
1249 #else
1250 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1251 #endif
1252
1253 /* -----------------------------------------------------------------------------
1254 * Pointer declarations
1255 * ----------------------------------------------------------------------------- */
1256
1257 /* Flags for new pointer objects */
1258 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1259 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1260
1261 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1262
1263 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1264 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1265
1266 #ifdef __cplusplus
1267 extern "C" {
1268 #endif
1269
1270 /* The python void return value */
1271
1272 SWIGRUNTIMEINLINE PyObject *
SWIG_Py_Void(void)1273 SWIG_Py_Void(void)
1274 {
1275 PyObject *none = Py_None;
1276 Py_INCREF(none);
1277 return none;
1278 }
1279
1280 /* SwigPyClientData */
1281
1282 typedef struct {
1283 PyObject *klass;
1284 PyObject *newraw;
1285 PyObject *newargs;
1286 PyObject *destroy;
1287 int delargs;
1288 int implicitconv;
1289 PyTypeObject *pytype;
1290 } SwigPyClientData;
1291
1292 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1293 SWIG_Python_CheckImplicit(swig_type_info *ty)
1294 {
1295 SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1296 int fail = data ? data->implicitconv : 0;
1297 if (fail)
1298 PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1299 return fail;
1300 }
1301
1302 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info * desc)1303 SWIG_Python_ExceptionType(swig_type_info *desc) {
1304 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1305 PyObject *klass = data ? data->klass : 0;
1306 return (klass ? klass : PyExc_RuntimeError);
1307 }
1308
1309
1310 SWIGRUNTIME SwigPyClientData *
SwigPyClientData_New(PyObject * obj)1311 SwigPyClientData_New(PyObject* obj)
1312 {
1313 if (!obj) {
1314 return 0;
1315 } else {
1316 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1317 /* the klass element */
1318 data->klass = obj;
1319 Py_INCREF(data->klass);
1320 /* the newraw method and newargs arguments used to create a new raw instance */
1321 if (PyClass_Check(obj)) {
1322 data->newraw = 0;
1323 data->newargs = obj;
1324 Py_INCREF(obj);
1325 } else {
1326 data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1327 if (data->newraw) {
1328 Py_INCREF(data->newraw);
1329 data->newargs = PyTuple_New(1);
1330 PyTuple_SetItem(data->newargs, 0, obj);
1331 } else {
1332 data->newargs = obj;
1333 }
1334 Py_INCREF(data->newargs);
1335 }
1336 /* the destroy method, aka as the C++ delete method */
1337 data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1338 if (PyErr_Occurred()) {
1339 PyErr_Clear();
1340 data->destroy = 0;
1341 }
1342 if (data->destroy) {
1343 int flags;
1344 Py_INCREF(data->destroy);
1345 flags = PyCFunction_GET_FLAGS(data->destroy);
1346 data->delargs = !(flags & (METH_O));
1347 } else {
1348 data->delargs = 0;
1349 }
1350 data->implicitconv = 0;
1351 data->pytype = 0;
1352 return data;
1353 }
1354 }
1355
1356 SWIGRUNTIME void
SwigPyClientData_Del(SwigPyClientData * data)1357 SwigPyClientData_Del(SwigPyClientData *data) {
1358 Py_XDECREF(data->newraw);
1359 Py_XDECREF(data->newargs);
1360 Py_XDECREF(data->destroy);
1361 }
1362
1363 /* =============== SwigPyObject =====================*/
1364
1365 typedef struct {
1366 PyObject_HEAD
1367 void *ptr;
1368 swig_type_info *ty;
1369 int own;
1370 PyObject *next;
1371 #ifdef SWIGPYTHON_BUILTIN
1372 PyObject *dict;
1373 #endif
1374 } SwigPyObject;
1375
1376
1377 #ifdef SWIGPYTHON_BUILTIN
1378
1379 SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1380 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1381 {
1382 SwigPyObject *sobj = (SwigPyObject *)v;
1383
1384 if (!sobj->dict)
1385 sobj->dict = PyDict_New();
1386
1387 Py_INCREF(sobj->dict);
1388 return sobj->dict;
1389 }
1390
1391 #endif
1392
1393 SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject * v)1394 SwigPyObject_long(SwigPyObject *v)
1395 {
1396 return PyLong_FromVoidPtr(v->ptr);
1397 }
1398
1399 SWIGRUNTIME PyObject *
SwigPyObject_format(const char * fmt,SwigPyObject * v)1400 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1401 {
1402 PyObject *res = NULL;
1403 PyObject *args = PyTuple_New(1);
1404 if (args) {
1405 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1406 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1407 if (ofmt) {
1408 #if PY_VERSION_HEX >= 0x03000000
1409 res = PyUnicode_Format(ofmt,args);
1410 #else
1411 res = PyString_Format(ofmt,args);
1412 #endif
1413 Py_DECREF(ofmt);
1414 }
1415 Py_DECREF(args);
1416 }
1417 }
1418 return res;
1419 }
1420
1421 SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject * v)1422 SwigPyObject_oct(SwigPyObject *v)
1423 {
1424 return SwigPyObject_format("%o",v);
1425 }
1426
1427 SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject * v)1428 SwigPyObject_hex(SwigPyObject *v)
1429 {
1430 return SwigPyObject_format("%x",v);
1431 }
1432
1433 SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject * v)1434 SwigPyObject_repr(SwigPyObject *v)
1435 {
1436 const char *name = SWIG_TypePrettyName(v->ty);
1437 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1438 if (v->next) {
1439 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1440 # if PY_VERSION_HEX >= 0x03000000
1441 PyObject *joined = PyUnicode_Concat(repr, nrep);
1442 Py_DecRef(repr);
1443 Py_DecRef(nrep);
1444 repr = joined;
1445 # else
1446 PyString_ConcatAndDel(&repr,nrep);
1447 # endif
1448 }
1449 return repr;
1450 }
1451
1452 /* We need a version taking two PyObject* parameters so it's a valid
1453 * PyCFunction to use in swigobject_methods[]. */
1454 SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1455 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1456 {
1457 return SwigPyObject_repr((SwigPyObject*)v);
1458 }
1459
1460 SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject * v,SwigPyObject * w)1461 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1462 {
1463 void *i = v->ptr;
1464 void *j = w->ptr;
1465 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1466 }
1467
1468 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1469 SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject * v,SwigPyObject * w,int op)1470 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1471 {
1472 PyObject* res;
1473 if( op != Py_EQ && op != Py_NE ) {
1474 Py_INCREF(Py_NotImplemented);
1475 return Py_NotImplemented;
1476 }
1477 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1478 return res;
1479 }
1480
1481
1482 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1483
1484 #ifdef SWIGPYTHON_BUILTIN
1485 static swig_type_info *SwigPyObject_stype = 0;
1486 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1487 SwigPyObject_type(void) {
1488 SwigPyClientData *cd;
1489 assert(SwigPyObject_stype);
1490 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1491 assert(cd);
1492 assert(cd->pytype);
1493 return cd->pytype;
1494 }
1495 #else
1496 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1497 SwigPyObject_type(void) {
1498 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1499 return type;
1500 }
1501 #endif
1502
1503 SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject * op)1504 SwigPyObject_Check(PyObject *op) {
1505 #ifdef SWIGPYTHON_BUILTIN
1506 PyTypeObject *target_tp = SwigPyObject_type();
1507 if (PyType_IsSubtype(op->ob_type, target_tp))
1508 return 1;
1509 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1510 #else
1511 return (Py_TYPE(op) == SwigPyObject_type())
1512 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1513 #endif
1514 }
1515
1516 SWIGRUNTIME PyObject *
1517 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1518
1519 SWIGRUNTIME void
SwigPyObject_dealloc(PyObject * v)1520 SwigPyObject_dealloc(PyObject *v)
1521 {
1522 SwigPyObject *sobj = (SwigPyObject *) v;
1523 PyObject *next = sobj->next;
1524 if (sobj->own == SWIG_POINTER_OWN) {
1525 swig_type_info *ty = sobj->ty;
1526 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1527 PyObject *destroy = data ? data->destroy : 0;
1528 if (destroy) {
1529 /* destroy is always a VARARGS method */
1530 PyObject *res;
1531
1532 /* PyObject_CallFunction() has the potential to silently drop
1533 the active exception. In cases of unnamed temporary
1534 variable or where we just finished iterating over a generator
1535 StopIteration will be active right now, and this needs to
1536 remain true upon return from SwigPyObject_dealloc. So save
1537 and restore. */
1538
1539 PyObject *type = NULL, *value = NULL, *traceback = NULL;
1540 PyErr_Fetch(&type, &value, &traceback);
1541
1542 if (data->delargs) {
1543 /* we need to create a temporary object to carry the destroy operation */
1544 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1545 res = SWIG_Python_CallFunctor(destroy, tmp);
1546 Py_DECREF(tmp);
1547 } else {
1548 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1549 PyObject *mself = PyCFunction_GET_SELF(destroy);
1550 res = ((*meth)(mself, v));
1551 }
1552 if (!res)
1553 PyErr_WriteUnraisable(destroy);
1554
1555 PyErr_Restore(type, value, traceback);
1556
1557 Py_XDECREF(res);
1558 }
1559 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1560 else {
1561 const char *name = SWIG_TypePrettyName(ty);
1562 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1563 }
1564 #endif
1565 }
1566 Py_XDECREF(next);
1567 PyObject_DEL(v);
1568 }
1569
1570 SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject * v,PyObject * next)1571 SwigPyObject_append(PyObject* v, PyObject* next)
1572 {
1573 SwigPyObject *sobj = (SwigPyObject *) v;
1574 if (!SwigPyObject_Check(next)) {
1575 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1576 return NULL;
1577 }
1578 sobj->next = next;
1579 Py_INCREF(next);
1580 return SWIG_Py_Void();
1581 }
1582
1583 SWIGRUNTIME PyObject*
SwigPyObject_next(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1584 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1585 {
1586 SwigPyObject *sobj = (SwigPyObject *) v;
1587 if (sobj->next) {
1588 Py_INCREF(sobj->next);
1589 return sobj->next;
1590 } else {
1591 return SWIG_Py_Void();
1592 }
1593 }
1594
1595 SWIGINTERN PyObject*
SwigPyObject_disown(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1596 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1597 {
1598 SwigPyObject *sobj = (SwigPyObject *)v;
1599 sobj->own = 0;
1600 return SWIG_Py_Void();
1601 }
1602
1603 SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1604 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 {
1606 SwigPyObject *sobj = (SwigPyObject *)v;
1607 sobj->own = SWIG_POINTER_OWN;
1608 return SWIG_Py_Void();
1609 }
1610
1611 SWIGINTERN PyObject*
SwigPyObject_own(PyObject * v,PyObject * args)1612 SwigPyObject_own(PyObject *v, PyObject *args)
1613 {
1614 PyObject *val = 0;
1615 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1616 return NULL;
1617 } else {
1618 SwigPyObject *sobj = (SwigPyObject *)v;
1619 PyObject *obj = PyBool_FromLong(sobj->own);
1620 if (val) {
1621 if (PyObject_IsTrue(val)) {
1622 SwigPyObject_acquire(v,args);
1623 } else {
1624 SwigPyObject_disown(v,args);
1625 }
1626 }
1627 return obj;
1628 }
1629 }
1630
1631 static PyMethodDef
1632 swigobject_methods[] = {
1633 {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1634 {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1635 {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1636 {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1637 {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1638 {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1639 {0, 0, 0, 0}
1640 };
1641
1642 SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void)1643 SwigPyObject_TypeOnce(void) {
1644 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1645
1646 static PyNumberMethods SwigPyObject_as_number = {
1647 (binaryfunc)0, /*nb_add*/
1648 (binaryfunc)0, /*nb_subtract*/
1649 (binaryfunc)0, /*nb_multiply*/
1650 /* nb_divide removed in Python 3 */
1651 #if PY_VERSION_HEX < 0x03000000
1652 (binaryfunc)0, /*nb_divide*/
1653 #endif
1654 (binaryfunc)0, /*nb_remainder*/
1655 (binaryfunc)0, /*nb_divmod*/
1656 (ternaryfunc)0,/*nb_power*/
1657 (unaryfunc)0, /*nb_negative*/
1658 (unaryfunc)0, /*nb_positive*/
1659 (unaryfunc)0, /*nb_absolute*/
1660 (inquiry)0, /*nb_nonzero*/
1661 0, /*nb_invert*/
1662 0, /*nb_lshift*/
1663 0, /*nb_rshift*/
1664 0, /*nb_and*/
1665 0, /*nb_xor*/
1666 0, /*nb_or*/
1667 #if PY_VERSION_HEX < 0x03000000
1668 0, /*nb_coerce*/
1669 #endif
1670 (unaryfunc)SwigPyObject_long, /*nb_int*/
1671 #if PY_VERSION_HEX < 0x03000000
1672 (unaryfunc)SwigPyObject_long, /*nb_long*/
1673 #else
1674 0, /*nb_reserved*/
1675 #endif
1676 (unaryfunc)0, /*nb_float*/
1677 #if PY_VERSION_HEX < 0x03000000
1678 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1679 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1680 #endif
1681 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1682 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1683 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1684 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1685 #else
1686 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1687 #endif
1688 };
1689
1690 static PyTypeObject swigpyobject_type;
1691 static int type_init = 0;
1692 if (!type_init) {
1693 const PyTypeObject tmp = {
1694 #if PY_VERSION_HEX >= 0x03000000
1695 PyVarObject_HEAD_INIT(NULL, 0)
1696 #else
1697 PyObject_HEAD_INIT(NULL)
1698 0, /* ob_size */
1699 #endif
1700 "SwigPyObject", /* tp_name */
1701 sizeof(SwigPyObject), /* tp_basicsize */
1702 0, /* tp_itemsize */
1703 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1704 0, /* tp_print */
1705 (getattrfunc)0, /* tp_getattr */
1706 (setattrfunc)0, /* tp_setattr */
1707 #if PY_VERSION_HEX >= 0x03000000
1708 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1709 #else
1710 (cmpfunc)SwigPyObject_compare, /* tp_compare */
1711 #endif
1712 (reprfunc)SwigPyObject_repr, /* tp_repr */
1713 &SwigPyObject_as_number, /* tp_as_number */
1714 0, /* tp_as_sequence */
1715 0, /* tp_as_mapping */
1716 (hashfunc)0, /* tp_hash */
1717 (ternaryfunc)0, /* tp_call */
1718 0, /* tp_str */
1719 PyObject_GenericGetAttr, /* tp_getattro */
1720 0, /* tp_setattro */
1721 0, /* tp_as_buffer */
1722 Py_TPFLAGS_DEFAULT, /* tp_flags */
1723 swigobject_doc, /* tp_doc */
1724 0, /* tp_traverse */
1725 0, /* tp_clear */
1726 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1727 0, /* tp_weaklistoffset */
1728 0, /* tp_iter */
1729 0, /* tp_iternext */
1730 swigobject_methods, /* tp_methods */
1731 0, /* tp_members */
1732 0, /* tp_getset */
1733 0, /* tp_base */
1734 0, /* tp_dict */
1735 0, /* tp_descr_get */
1736 0, /* tp_descr_set */
1737 0, /* tp_dictoffset */
1738 0, /* tp_init */
1739 0, /* tp_alloc */
1740 0, /* tp_new */
1741 0, /* tp_free */
1742 0, /* tp_is_gc */
1743 0, /* tp_bases */
1744 0, /* tp_mro */
1745 0, /* tp_cache */
1746 0, /* tp_subclasses */
1747 0, /* tp_weaklist */
1748 0, /* tp_del */
1749 0, /* tp_version_tag */
1750 #if PY_VERSION_HEX >= 0x03040000
1751 0, /* tp_finalize */
1752 #endif
1753 #if PY_VERSION_HEX >= 0x03080000
1754 0, /* tp_vectorcall */
1755 #endif
1756 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1757 0, /* tp_print */
1758 #endif
1759 #ifdef COUNT_ALLOCS
1760 0, /* tp_allocs */
1761 0, /* tp_frees */
1762 0, /* tp_maxalloc */
1763 0, /* tp_prev */
1764 0 /* tp_next */
1765 #endif
1766 };
1767 swigpyobject_type = tmp;
1768 type_init = 1;
1769 if (PyType_Ready(&swigpyobject_type) < 0)
1770 return NULL;
1771 }
1772 return &swigpyobject_type;
1773 }
1774
1775 SWIGRUNTIME PyObject *
SwigPyObject_New(void * ptr,swig_type_info * ty,int own)1776 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1777 {
1778 SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1779 if (sobj) {
1780 sobj->ptr = ptr;
1781 sobj->ty = ty;
1782 sobj->own = own;
1783 sobj->next = 0;
1784 }
1785 return (PyObject *)sobj;
1786 }
1787
1788 /* -----------------------------------------------------------------------------
1789 * Implements a simple Swig Packed type, and use it instead of string
1790 * ----------------------------------------------------------------------------- */
1791
1792 typedef struct {
1793 PyObject_HEAD
1794 void *pack;
1795 swig_type_info *ty;
1796 size_t size;
1797 } SwigPyPacked;
1798
1799 SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked * v)1800 SwigPyPacked_repr(SwigPyPacked *v)
1801 {
1802 char result[SWIG_BUFFER_SIZE];
1803 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1804 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1805 } else {
1806 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1807 }
1808 }
1809
1810 SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked * v)1811 SwigPyPacked_str(SwigPyPacked *v)
1812 {
1813 char result[SWIG_BUFFER_SIZE];
1814 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1815 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1816 } else {
1817 return SWIG_Python_str_FromChar(v->ty->name);
1818 }
1819 }
1820
1821 SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked * v,SwigPyPacked * w)1822 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1823 {
1824 size_t i = v->size;
1825 size_t j = w->size;
1826 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1827 return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1828 }
1829
1830 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1831
1832 SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void)1833 SwigPyPacked_type(void) {
1834 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1835 return type;
1836 }
1837
1838 SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject * op)1839 SwigPyPacked_Check(PyObject *op) {
1840 return ((op)->ob_type == SwigPyPacked_TypeOnce())
1841 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1842 }
1843
1844 SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject * v)1845 SwigPyPacked_dealloc(PyObject *v)
1846 {
1847 if (SwigPyPacked_Check(v)) {
1848 SwigPyPacked *sobj = (SwigPyPacked *) v;
1849 free(sobj->pack);
1850 }
1851 PyObject_DEL(v);
1852 }
1853
1854 SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void)1855 SwigPyPacked_TypeOnce(void) {
1856 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1857 static PyTypeObject swigpypacked_type;
1858 static int type_init = 0;
1859 if (!type_init) {
1860 const PyTypeObject tmp = {
1861 #if PY_VERSION_HEX>=0x03000000
1862 PyVarObject_HEAD_INIT(NULL, 0)
1863 #else
1864 PyObject_HEAD_INIT(NULL)
1865 0, /* ob_size */
1866 #endif
1867 "SwigPyPacked", /* tp_name */
1868 sizeof(SwigPyPacked), /* tp_basicsize */
1869 0, /* tp_itemsize */
1870 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1871 0, /* tp_print */
1872 (getattrfunc)0, /* tp_getattr */
1873 (setattrfunc)0, /* tp_setattr */
1874 #if PY_VERSION_HEX>=0x03000000
1875 0, /* tp_reserved in 3.0.1 */
1876 #else
1877 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1878 #endif
1879 (reprfunc)SwigPyPacked_repr, /* tp_repr */
1880 0, /* tp_as_number */
1881 0, /* tp_as_sequence */
1882 0, /* tp_as_mapping */
1883 (hashfunc)0, /* tp_hash */
1884 (ternaryfunc)0, /* tp_call */
1885 (reprfunc)SwigPyPacked_str, /* tp_str */
1886 PyObject_GenericGetAttr, /* tp_getattro */
1887 0, /* tp_setattro */
1888 0, /* tp_as_buffer */
1889 Py_TPFLAGS_DEFAULT, /* tp_flags */
1890 swigpacked_doc, /* tp_doc */
1891 0, /* tp_traverse */
1892 0, /* tp_clear */
1893 0, /* tp_richcompare */
1894 0, /* tp_weaklistoffset */
1895 0, /* tp_iter */
1896 0, /* tp_iternext */
1897 0, /* tp_methods */
1898 0, /* tp_members */
1899 0, /* tp_getset */
1900 0, /* tp_base */
1901 0, /* tp_dict */
1902 0, /* tp_descr_get */
1903 0, /* tp_descr_set */
1904 0, /* tp_dictoffset */
1905 0, /* tp_init */
1906 0, /* tp_alloc */
1907 0, /* tp_new */
1908 0, /* tp_free */
1909 0, /* tp_is_gc */
1910 0, /* tp_bases */
1911 0, /* tp_mro */
1912 0, /* tp_cache */
1913 0, /* tp_subclasses */
1914 0, /* tp_weaklist */
1915 0, /* tp_del */
1916 0, /* tp_version_tag */
1917 #if PY_VERSION_HEX >= 0x03040000
1918 0, /* tp_finalize */
1919 #endif
1920 #if PY_VERSION_HEX >= 0x03080000
1921 0, /* tp_vectorcall */
1922 #endif
1923 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1924 0, /* tp_print */
1925 #endif
1926 #ifdef COUNT_ALLOCS
1927 0, /* tp_allocs */
1928 0, /* tp_frees */
1929 0, /* tp_maxalloc */
1930 0, /* tp_prev */
1931 0 /* tp_next */
1932 #endif
1933 };
1934 swigpypacked_type = tmp;
1935 type_init = 1;
1936 if (PyType_Ready(&swigpypacked_type) < 0)
1937 return NULL;
1938 }
1939 return &swigpypacked_type;
1940 }
1941
1942 SWIGRUNTIME PyObject *
SwigPyPacked_New(void * ptr,size_t size,swig_type_info * ty)1943 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1944 {
1945 SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1946 if (sobj) {
1947 void *pack = malloc(size);
1948 if (pack) {
1949 memcpy(pack, ptr, size);
1950 sobj->pack = pack;
1951 sobj->ty = ty;
1952 sobj->size = size;
1953 } else {
1954 PyObject_DEL((PyObject *) sobj);
1955 sobj = 0;
1956 }
1957 }
1958 return (PyObject *) sobj;
1959 }
1960
1961 SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject * obj,void * ptr,size_t size)1962 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1963 {
1964 if (SwigPyPacked_Check(obj)) {
1965 SwigPyPacked *sobj = (SwigPyPacked *)obj;
1966 if (sobj->size != size) return 0;
1967 memcpy(ptr, sobj->pack, size);
1968 return sobj->ty;
1969 } else {
1970 return 0;
1971 }
1972 }
1973
1974 /* -----------------------------------------------------------------------------
1975 * pointers/data manipulation
1976 * ----------------------------------------------------------------------------- */
1977
1978 static PyObject *Swig_This_global = NULL;
1979
1980 SWIGRUNTIME PyObject *
SWIG_This(void)1981 SWIG_This(void)
1982 {
1983 if (Swig_This_global == NULL)
1984 Swig_This_global = SWIG_Python_str_FromChar("this");
1985 return Swig_This_global;
1986 }
1987
1988 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1989
1990 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
1991 #if PY_VERSION_HEX>=0x03000000
1992 #define SWIG_PYTHON_SLOW_GETSET_THIS
1993 #endif
1994
1995 SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)1996 SWIG_Python_GetSwigThis(PyObject *pyobj)
1997 {
1998 PyObject *obj;
1999
2000 if (SwigPyObject_Check(pyobj))
2001 return (SwigPyObject *) pyobj;
2002
2003 #ifdef SWIGPYTHON_BUILTIN
2004 (void)obj;
2005 # ifdef PyWeakref_CheckProxy
2006 if (PyWeakref_CheckProxy(pyobj)) {
2007 pyobj = PyWeakref_GET_OBJECT(pyobj);
2008 if (pyobj && SwigPyObject_Check(pyobj))
2009 return (SwigPyObject*) pyobj;
2010 }
2011 # endif
2012 return NULL;
2013 #else
2014
2015 obj = 0;
2016
2017 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2018 if (PyInstance_Check(pyobj)) {
2019 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2020 } else {
2021 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2022 if (dictptr != NULL) {
2023 PyObject *dict = *dictptr;
2024 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2025 } else {
2026 #ifdef PyWeakref_CheckProxy
2027 if (PyWeakref_CheckProxy(pyobj)) {
2028 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2029 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2030 }
2031 #endif
2032 obj = PyObject_GetAttr(pyobj,SWIG_This());
2033 if (obj) {
2034 Py_DECREF(obj);
2035 } else {
2036 if (PyErr_Occurred()) PyErr_Clear();
2037 return 0;
2038 }
2039 }
2040 }
2041 #else
2042 obj = PyObject_GetAttr(pyobj,SWIG_This());
2043 if (obj) {
2044 Py_DECREF(obj);
2045 } else {
2046 if (PyErr_Occurred()) PyErr_Clear();
2047 return 0;
2048 }
2049 #endif
2050 if (obj && !SwigPyObject_Check(obj)) {
2051 /* a PyObject is called 'this', try to get the 'real this'
2052 SwigPyObject from it */
2053 return SWIG_Python_GetSwigThis(obj);
2054 }
2055 return (SwigPyObject *)obj;
2056 #endif
2057 }
2058
2059 /* Acquire a pointer value */
2060
2061 SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject * obj,int own)2062 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2063 if (own == SWIG_POINTER_OWN) {
2064 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2065 if (sobj) {
2066 int oldown = sobj->own;
2067 sobj->own = own;
2068 return oldown;
2069 }
2070 }
2071 return 0;
2072 }
2073
2074 /* Convert a pointer value */
2075
2076 SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)2077 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2078 int res;
2079 SwigPyObject *sobj;
2080 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2081
2082 if (!obj)
2083 return SWIG_ERROR;
2084 if (obj == Py_None && !implicit_conv) {
2085 if (ptr)
2086 *ptr = 0;
2087 return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2088 }
2089
2090 res = SWIG_ERROR;
2091
2092 sobj = SWIG_Python_GetSwigThis(obj);
2093 if (own)
2094 *own = 0;
2095 while (sobj) {
2096 void *vptr = sobj->ptr;
2097 if (ty) {
2098 swig_type_info *to = sobj->ty;
2099 if (to == ty) {
2100 /* no type cast needed */
2101 if (ptr) *ptr = vptr;
2102 break;
2103 } else {
2104 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2105 if (!tc) {
2106 sobj = (SwigPyObject *)sobj->next;
2107 } else {
2108 if (ptr) {
2109 int newmemory = 0;
2110 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2111 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2112 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2113 if (own)
2114 *own = *own | SWIG_CAST_NEW_MEMORY;
2115 }
2116 }
2117 break;
2118 }
2119 }
2120 } else {
2121 if (ptr) *ptr = vptr;
2122 break;
2123 }
2124 }
2125 if (sobj) {
2126 if (own)
2127 *own = *own | sobj->own;
2128 if (flags & SWIG_POINTER_DISOWN) {
2129 sobj->own = 0;
2130 }
2131 res = SWIG_OK;
2132 } else {
2133 if (implicit_conv) {
2134 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2135 if (data && !data->implicitconv) {
2136 PyObject *klass = data->klass;
2137 if (klass) {
2138 PyObject *impconv;
2139 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2140 impconv = SWIG_Python_CallFunctor(klass, obj);
2141 data->implicitconv = 0;
2142 if (PyErr_Occurred()) {
2143 PyErr_Clear();
2144 impconv = 0;
2145 }
2146 if (impconv) {
2147 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2148 if (iobj) {
2149 void *vptr;
2150 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2151 if (SWIG_IsOK(res)) {
2152 if (ptr) {
2153 *ptr = vptr;
2154 /* transfer the ownership to 'ptr' */
2155 iobj->own = 0;
2156 res = SWIG_AddCast(res);
2157 res = SWIG_AddNewMask(res);
2158 } else {
2159 res = SWIG_AddCast(res);
2160 }
2161 }
2162 }
2163 Py_DECREF(impconv);
2164 }
2165 }
2166 }
2167 if (!SWIG_IsOK(res) && obj == Py_None) {
2168 if (ptr)
2169 *ptr = 0;
2170 if (PyErr_Occurred())
2171 PyErr_Clear();
2172 res = SWIG_OK;
2173 }
2174 }
2175 }
2176 return res;
2177 }
2178
2179 /* Convert a function ptr value */
2180
2181 SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)2182 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2183 if (!PyCFunction_Check(obj)) {
2184 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2185 } else {
2186 void *vptr = 0;
2187 swig_cast_info *tc;
2188
2189 /* here we get the method pointer for callbacks */
2190 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2191 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2192 if (desc)
2193 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2194 if (!desc)
2195 return SWIG_ERROR;
2196 tc = SWIG_TypeCheck(desc,ty);
2197 if (tc) {
2198 int newmemory = 0;
2199 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2200 assert(!newmemory); /* newmemory handling not yet implemented */
2201 } else {
2202 return SWIG_ERROR;
2203 }
2204 return SWIG_OK;
2205 }
2206 }
2207
2208 /* Convert a packed pointer value */
2209
2210 SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)2211 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2212 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2213 if (!to) return SWIG_ERROR;
2214 if (ty) {
2215 if (to != ty) {
2216 /* check type cast? */
2217 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2218 if (!tc) return SWIG_ERROR;
2219 }
2220 }
2221 return SWIG_OK;
2222 }
2223
2224 /* -----------------------------------------------------------------------------
2225 * Create a new pointer object
2226 * ----------------------------------------------------------------------------- */
2227
2228 /*
2229 Create a new instance object, without calling __init__, and set the
2230 'this' attribute.
2231 */
2232
2233 SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData * data,PyObject * swig_this)2234 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2235 {
2236 PyObject *inst = 0;
2237 PyObject *newraw = data->newraw;
2238 if (newraw) {
2239 inst = PyObject_Call(newraw, data->newargs, NULL);
2240 if (inst) {
2241 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2242 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2243 if (dictptr != NULL) {
2244 PyObject *dict = *dictptr;
2245 if (dict == NULL) {
2246 dict = PyDict_New();
2247 *dictptr = dict;
2248 PyDict_SetItem(dict, SWIG_This(), swig_this);
2249 }
2250 }
2251 #else
2252 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2253 Py_DECREF(inst);
2254 inst = 0;
2255 }
2256 #endif
2257 }
2258 } else {
2259 #if PY_VERSION_HEX >= 0x03000000
2260 PyObject *empty_args = PyTuple_New(0);
2261 if (empty_args) {
2262 PyObject *empty_kwargs = PyDict_New();
2263 if (empty_kwargs) {
2264 inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2265 Py_DECREF(empty_kwargs);
2266 if (inst) {
2267 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2268 Py_DECREF(inst);
2269 inst = 0;
2270 } else {
2271 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2272 }
2273 }
2274 }
2275 Py_DECREF(empty_args);
2276 }
2277 #else
2278 PyObject *dict = PyDict_New();
2279 if (dict) {
2280 PyDict_SetItem(dict, SWIG_This(), swig_this);
2281 inst = PyInstance_NewRaw(data->newargs, dict);
2282 Py_DECREF(dict);
2283 }
2284 #endif
2285 }
2286 return inst;
2287 }
2288
2289 SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)2290 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2291 {
2292 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2293 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2294 if (dictptr != NULL) {
2295 PyObject *dict = *dictptr;
2296 if (dict == NULL) {
2297 dict = PyDict_New();
2298 *dictptr = dict;
2299 }
2300 return PyDict_SetItem(dict, SWIG_This(), swig_this);
2301 }
2302 #endif
2303 return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2304 }
2305
2306
2307 SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject * args)2308 SWIG_Python_InitShadowInstance(PyObject *args) {
2309 PyObject *obj[2];
2310 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2311 return NULL;
2312 } else {
2313 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2314 if (sthis) {
2315 SwigPyObject_append((PyObject*) sthis, obj[1]);
2316 } else {
2317 if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2318 return NULL;
2319 }
2320 return SWIG_Py_Void();
2321 }
2322 }
2323
2324 /* Create a new pointer object */
2325
2326 SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject * self,void * ptr,swig_type_info * type,int flags)2327 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2328 SwigPyClientData *clientdata;
2329 PyObject * robj;
2330 int own;
2331
2332 if (!ptr)
2333 return SWIG_Py_Void();
2334
2335 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2336 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2337 if (clientdata && clientdata->pytype) {
2338 SwigPyObject *newobj;
2339 if (flags & SWIG_BUILTIN_TP_INIT) {
2340 newobj = (SwigPyObject*) self;
2341 if (newobj->ptr) {
2342 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2343 while (newobj->next)
2344 newobj = (SwigPyObject *) newobj->next;
2345 newobj->next = next_self;
2346 newobj = (SwigPyObject *)next_self;
2347 #ifdef SWIGPYTHON_BUILTIN
2348 newobj->dict = 0;
2349 #endif
2350 }
2351 } else {
2352 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2353 #ifdef SWIGPYTHON_BUILTIN
2354 newobj->dict = 0;
2355 #endif
2356 }
2357 if (newobj) {
2358 newobj->ptr = ptr;
2359 newobj->ty = type;
2360 newobj->own = own;
2361 newobj->next = 0;
2362 return (PyObject*) newobj;
2363 }
2364 return SWIG_Py_Void();
2365 }
2366
2367 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2368
2369 robj = SwigPyObject_New(ptr, type, own);
2370 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2371 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2372 Py_DECREF(robj);
2373 robj = inst;
2374 }
2375 return robj;
2376 }
2377
2378 /* Create a new packed object */
2379
2380 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)2381 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2382 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2383 }
2384
2385 /* -----------------------------------------------------------------------------*
2386 * Get type list
2387 * -----------------------------------------------------------------------------*/
2388
2389 #ifdef SWIG_LINK_RUNTIME
2390 void *SWIG_ReturnGlobalTypeList(void *);
2391 #endif
2392
2393 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void * SWIGUNUSEDPARM (clientdata))2394 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2395 static void *type_pointer = (void *)0;
2396 /* first check if module already created */
2397 if (!type_pointer) {
2398 #ifdef SWIG_LINK_RUNTIME
2399 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2400 #else
2401 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2402 if (PyErr_Occurred()) {
2403 PyErr_Clear();
2404 type_pointer = (void *)0;
2405 }
2406 #endif
2407 }
2408 return (swig_module_info *) type_pointer;
2409 }
2410
2411 SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject * obj)2412 SWIG_Python_DestroyModule(PyObject *obj)
2413 {
2414 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2415 swig_type_info **types = swig_module->types;
2416 size_t i;
2417 for (i =0; i < swig_module->size; ++i) {
2418 swig_type_info *ty = types[i];
2419 if (ty->owndata) {
2420 SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2421 if (data) SwigPyClientData_Del(data);
2422 }
2423 }
2424 Py_DECREF(SWIG_This());
2425 Swig_This_global = NULL;
2426 }
2427
2428 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2429 SWIG_Python_SetModule(swig_module_info *swig_module) {
2430 #if PY_VERSION_HEX >= 0x03000000
2431 /* Add a dummy module object into sys.modules */
2432 PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2433 #else
2434 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2435 PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2436 #endif
2437 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2438 if (pointer && module) {
2439 PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2440 } else {
2441 Py_XDECREF(pointer);
2442 }
2443 }
2444
2445 /* The python cached type query */
2446 SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void)2447 SWIG_Python_TypeCache(void) {
2448 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2449 return cache;
2450 }
2451
2452 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)2453 SWIG_Python_TypeQuery(const char *type)
2454 {
2455 PyObject *cache = SWIG_Python_TypeCache();
2456 PyObject *key = SWIG_Python_str_FromChar(type);
2457 PyObject *obj = PyDict_GetItem(cache, key);
2458 swig_type_info *descriptor;
2459 if (obj) {
2460 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2461 } else {
2462 swig_module_info *swig_module = SWIG_GetModule(0);
2463 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2464 if (descriptor) {
2465 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2466 PyDict_SetItem(cache, key, obj);
2467 Py_DECREF(obj);
2468 }
2469 }
2470 Py_DECREF(key);
2471 return descriptor;
2472 }
2473
2474 /*
2475 For backward compatibility only
2476 */
2477 #define SWIG_POINTER_EXCEPTION 0
2478 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2479 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2480
2481 SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char * mesg,int infront)2482 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2483 {
2484 if (PyErr_Occurred()) {
2485 PyObject *type = 0;
2486 PyObject *value = 0;
2487 PyObject *traceback = 0;
2488 PyErr_Fetch(&type, &value, &traceback);
2489 if (value) {
2490 PyObject *old_str = PyObject_Str(value);
2491 const char *tmp = SWIG_Python_str_AsChar(old_str);
2492 const char *errmesg = tmp ? tmp : "Invalid error message";
2493 Py_XINCREF(type);
2494 PyErr_Clear();
2495 if (infront) {
2496 PyErr_Format(type, "%s %s", mesg, errmesg);
2497 } else {
2498 PyErr_Format(type, "%s %s", errmesg, mesg);
2499 }
2500 SWIG_Python_str_DelForPy3(tmp);
2501 Py_DECREF(old_str);
2502 }
2503 return 1;
2504 } else {
2505 return 0;
2506 }
2507 }
2508
2509 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2510 SWIG_Python_ArgFail(int argnum)
2511 {
2512 if (PyErr_Occurred()) {
2513 /* add information about failing argument */
2514 char mesg[256];
2515 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2516 return SWIG_Python_AddErrMesg(mesg, 1);
2517 } else {
2518 return 0;
2519 }
2520 }
2521
2522 SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject * self)2523 SwigPyObject_GetDesc(PyObject *self)
2524 {
2525 SwigPyObject *v = (SwigPyObject *)self;
2526 swig_type_info *ty = v ? v->ty : 0;
2527 return ty ? ty->str : "";
2528 }
2529
2530 SWIGRUNTIME void
SWIG_Python_TypeError(const char * type,PyObject * obj)2531 SWIG_Python_TypeError(const char *type, PyObject *obj)
2532 {
2533 if (type) {
2534 #if defined(SWIG_COBJECT_TYPES)
2535 if (obj && SwigPyObject_Check(obj)) {
2536 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2537 if (otype) {
2538 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2539 type, otype);
2540 return;
2541 }
2542 } else
2543 #endif
2544 {
2545 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2546 if (otype) {
2547 PyObject *str = PyObject_Str(obj);
2548 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2549 if (cstr) {
2550 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2551 type, otype, cstr);
2552 SWIG_Python_str_DelForPy3(cstr);
2553 } else {
2554 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2555 type, otype);
2556 }
2557 Py_XDECREF(str);
2558 return;
2559 }
2560 }
2561 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2562 } else {
2563 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2564 }
2565 }
2566
2567
2568 /* Convert a pointer value, signal an exception on a type mismatch */
2569 SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int SWIGUNUSEDPARM (argnum),int flags)2570 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2571 void *result;
2572 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2573 PyErr_Clear();
2574 #if SWIG_POINTER_EXCEPTION
2575 if (flags) {
2576 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2577 SWIG_Python_ArgFail(argnum);
2578 }
2579 #endif
2580 }
2581 return result;
2582 }
2583
2584 #ifdef SWIGPYTHON_BUILTIN
2585 SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject * obj,PyObject * name,PyObject * value)2586 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2587 PyTypeObject *tp = obj->ob_type;
2588 PyObject *descr;
2589 PyObject *encoded_name;
2590 descrsetfunc f;
2591 int res = -1;
2592
2593 # ifdef Py_USING_UNICODE
2594 if (PyString_Check(name)) {
2595 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2596 if (!name)
2597 return -1;
2598 } else if (!PyUnicode_Check(name))
2599 # else
2600 if (!PyString_Check(name))
2601 # endif
2602 {
2603 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2604 return -1;
2605 } else {
2606 Py_INCREF(name);
2607 }
2608
2609 if (!tp->tp_dict) {
2610 if (PyType_Ready(tp) < 0)
2611 goto done;
2612 }
2613
2614 descr = _PyType_Lookup(tp, name);
2615 f = NULL;
2616 if (descr != NULL)
2617 f = descr->ob_type->tp_descr_set;
2618 if (!f) {
2619 if (PyString_Check(name)) {
2620 encoded_name = name;
2621 Py_INCREF(name);
2622 } else {
2623 encoded_name = PyUnicode_AsUTF8String(name);
2624 if (!encoded_name)
2625 return -1;
2626 }
2627 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2628 Py_DECREF(encoded_name);
2629 } else {
2630 res = f(descr, obj, value);
2631 }
2632
2633 done:
2634 Py_DECREF(name);
2635 return res;
2636 }
2637 #endif
2638
2639
2640 #ifdef __cplusplus
2641 }
2642 #endif
2643
2644 #ifdef __cplusplus
2645 extern "C" {
2646 #endif
2647
2648 SWIGINTERN Py_hash_t
SwigPyObject_hash(PyObject * obj)2649 SwigPyObject_hash(PyObject *obj) {
2650 SwigPyObject *sobj = (SwigPyObject *)obj;
2651 void *ptr = sobj->ptr;
2652 return (Py_hash_t)ptr;
2653 }
2654
2655 SWIGINTERN Py_hash_t
SWIG_PyNumber_AsPyHash(PyObject * obj)2656 SWIG_PyNumber_AsPyHash(PyObject *obj) {
2657 Py_hash_t result = -1;
2658 #if PY_VERSION_HEX < 0x03020000
2659 if (PyInt_Check(obj))
2660 result = PyInt_AsLong(obj);
2661 else if (PyLong_Check(obj))
2662 result = PyLong_AsLong(obj);
2663 #else
2664 if (PyNumber_Check(obj))
2665 result = PyNumber_AsSsize_t(obj, NULL);
2666 #endif
2667 else
2668 PyErr_Format(PyExc_TypeError, "Wrong type for hash function");
2669 return PyErr_Occurred() ? -1 : result;
2670 }
2671
2672 SWIGINTERN int
SwigPyBuiltin_BadInit(PyObject * self,PyObject * SWIGUNUSEDPARM (args),PyObject * SWIGUNUSEDPARM (kwds))2673 SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) {
2674 PyErr_Format(PyExc_TypeError, "Cannot create new instances of type '%.300s'", self->ob_type->tp_name);
2675 return -1;
2676 }
2677
2678 SWIGINTERN void
SwigPyBuiltin_BadDealloc(PyObject * obj)2679 SwigPyBuiltin_BadDealloc(PyObject *obj) {
2680 SwigPyObject *sobj = (SwigPyObject *)obj;
2681 if (sobj->own) {
2682 PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", obj->ob_type->tp_name);
2683 }
2684 }
2685
2686 typedef struct {
2687 PyCFunction get;
2688 PyCFunction set;
2689 } SwigPyGetSet;
2690
2691 SWIGINTERN PyObject *
SwigPyBuiltin_GetterClosure(PyObject * obj,void * closure)2692 SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) {
2693 SwigPyGetSet *getset;
2694 PyObject *tuple, *result;
2695 if (!closure)
2696 return SWIG_Py_Void();
2697 getset = (SwigPyGetSet *)closure;
2698 if (!getset->get)
2699 return SWIG_Py_Void();
2700 tuple = PyTuple_New(0);
2701 assert(tuple);
2702 result = (*getset->get)(obj, tuple);
2703 Py_DECREF(tuple);
2704 return result;
2705 }
2706
2707 SWIGINTERN PyObject *
SwigPyBuiltin_FunpackGetterClosure(PyObject * obj,void * closure)2708 SwigPyBuiltin_FunpackGetterClosure (PyObject *obj, void *closure) {
2709 SwigPyGetSet *getset;
2710 PyObject *result;
2711 if (!closure)
2712 return SWIG_Py_Void();
2713 getset = (SwigPyGetSet *)closure;
2714 if (!getset->get)
2715 return SWIG_Py_Void();
2716 result = (*getset->get)(obj, NULL);
2717 return result;
2718 }
2719
2720 SWIGINTERN int
SwigPyBuiltin_SetterClosure(PyObject * obj,PyObject * val,void * closure)2721 SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
2722 SwigPyGetSet *getset;
2723 PyObject *tuple, *result;
2724 if (!closure) {
2725 PyErr_Format(PyExc_TypeError, "Missing getset closure");
2726 return -1;
2727 }
2728 getset = (SwigPyGetSet *)closure;
2729 if (!getset->set) {
2730 PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
2731 return -1;
2732 }
2733 tuple = PyTuple_New(1);
2734 assert(tuple);
2735 Py_INCREF(val);
2736 PyTuple_SET_ITEM(tuple, 0, val);
2737 result = (*getset->set)(obj, tuple);
2738 Py_DECREF(tuple);
2739 Py_XDECREF(result);
2740 return result ? 0 : -1;
2741 }
2742
2743 SWIGINTERN int
SwigPyBuiltin_FunpackSetterClosure(PyObject * obj,PyObject * val,void * closure)2744 SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) {
2745 SwigPyGetSet *getset;
2746 PyObject *result;
2747 if (!closure) {
2748 PyErr_Format(PyExc_TypeError, "Missing getset closure");
2749 return -1;
2750 }
2751 getset = (SwigPyGetSet *)closure;
2752 if (!getset->set) {
2753 PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
2754 return -1;
2755 }
2756 result = (*getset->set)(obj, val);
2757 Py_XDECREF(result);
2758 return result ? 0 : -1;
2759 }
2760
2761 SWIGINTERN void
SwigPyStaticVar_dealloc(PyDescrObject * descr)2762 SwigPyStaticVar_dealloc(PyDescrObject *descr) {
2763 PyObject_GC_UnTrack(descr);
2764 Py_XDECREF(PyDescr_TYPE(descr));
2765 Py_XDECREF(PyDescr_NAME(descr));
2766 PyObject_GC_Del(descr);
2767 }
2768
2769 SWIGINTERN PyObject *
SwigPyStaticVar_repr(PyGetSetDescrObject * descr)2770 SwigPyStaticVar_repr(PyGetSetDescrObject *descr) {
2771 #if PY_VERSION_HEX >= 0x03000000
2772
2773 return PyUnicode_FromFormat("<class attribute '%S' of type '%s'>", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2774 #else
2775 return PyString_FromFormat("<class attribute '%s' of type '%s'>", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2776 #endif
2777 }
2778
2779 SWIGINTERN int
SwigPyStaticVar_traverse(PyObject * self,visitproc visit,void * arg)2780 SwigPyStaticVar_traverse(PyObject *self, visitproc visit, void *arg) {
2781 PyDescrObject *descr;
2782 descr = (PyDescrObject *)self;
2783 Py_VISIT((PyObject*) PyDescr_TYPE(descr));
2784 return 0;
2785 }
2786
2787 SWIGINTERN PyObject *
SwigPyStaticVar_get(PyGetSetDescrObject * descr,PyObject * obj,PyObject * SWIGUNUSEDPARM (type))2788 SwigPyStaticVar_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *SWIGUNUSEDPARM(type)) {
2789 if (descr->d_getset->get != NULL)
2790 return descr->d_getset->get(obj, descr->d_getset->closure);
2791 #if PY_VERSION_HEX >= 0x03000000
2792 PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not readable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2793 #else
2794 PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not readable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2795 #endif
2796 return NULL;
2797 }
2798
2799 SWIGINTERN int
SwigPyStaticVar_set(PyGetSetDescrObject * descr,PyObject * obj,PyObject * value)2800 SwigPyStaticVar_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value) {
2801 if (descr->d_getset->set != NULL)
2802 return descr->d_getset->set(obj, value, descr->d_getset->closure);
2803 #if PY_VERSION_HEX >= 0x03000000
2804 PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not writable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2805 #else
2806 PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not writable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2807 #endif
2808 return -1;
2809 }
2810
2811 SWIGINTERN int
SwigPyObjectType_setattro(PyObject * typeobject,PyObject * name,PyObject * value)2812 SwigPyObjectType_setattro(PyObject *typeobject, PyObject *name, PyObject *value) {
2813 PyObject *attribute;
2814 PyTypeObject *type;
2815 descrsetfunc local_set;
2816
2817 assert(PyType_Check(typeobject));
2818 type = (PyTypeObject *)typeobject;
2819 attribute = _PyType_Lookup(type, name);
2820 if (attribute != NULL) {
2821 /* Implement descriptor functionality, if any */
2822 local_set = attribute->ob_type->tp_descr_set;
2823 if (local_set != NULL)
2824 return local_set(attribute, (PyObject *)type, value);
2825 #if PY_VERSION_HEX >= 0x03000000
2826 PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400S'", type->tp_name, name);
2827 #else
2828 PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400s'", type->tp_name, PyString_AS_STRING(name));
2829 #endif
2830 } else {
2831 #if PY_VERSION_HEX >= 0x03000000
2832 PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400S'", type->tp_name, name);
2833 #else
2834 PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400s'", type->tp_name, PyString_AS_STRING(name));
2835 #endif
2836 }
2837
2838 return -1;
2839 }
2840
2841 SWIGINTERN PyTypeObject*
SwigPyStaticVar_Type(void)2842 SwigPyStaticVar_Type(void) {
2843 static PyTypeObject staticvar_type;
2844 static int type_init = 0;
2845 if (!type_init) {
2846 const PyTypeObject tmp = {
2847 #if PY_VERSION_HEX >= 0x03000000
2848 PyVarObject_HEAD_INIT(&PyType_Type, 0)
2849 #else
2850 PyObject_HEAD_INIT(&PyType_Type)
2851 0, /* ob_size */
2852 #endif
2853 "swig_static_var_getset_descriptor", /* tp_name */
2854 sizeof(PyGetSetDescrObject), /* tp_basicsize */
2855 0, /* tp_itemsize */
2856 (destructor)SwigPyStaticVar_dealloc, /* tp_dealloc */
2857 0, /* tp_print */
2858 0, /* tp_getattr */
2859 0, /* tp_setattr */
2860 0, /* tp_compare */
2861 (reprfunc)SwigPyStaticVar_repr, /* tp_repr */
2862 0, /* tp_as_number */
2863 0, /* tp_as_sequence */
2864 0, /* tp_as_mapping */
2865 0, /* tp_hash */
2866 0, /* tp_call */
2867 0, /* tp_str */
2868 PyObject_GenericGetAttr, /* tp_getattro */
2869 0, /* tp_setattro */
2870 0, /* tp_as_buffer */
2871 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
2872 0, /* tp_doc */
2873 SwigPyStaticVar_traverse, /* tp_traverse */
2874 0, /* tp_clear */
2875 0, /* tp_richcompare */
2876 0, /* tp_weaklistoffset */
2877 0, /* tp_iter */
2878 0, /* tp_iternext */
2879 0, /* tp_methods */
2880 0, /* tp_members */
2881 0, /* tp_getset */
2882 0, /* tp_base */
2883 0, /* tp_dict */
2884 (descrgetfunc)SwigPyStaticVar_get, /* tp_descr_get */
2885 (descrsetfunc)SwigPyStaticVar_set, /* tp_descr_set */
2886 0, /* tp_dictoffset */
2887 0, /* tp_init */
2888 0, /* tp_alloc */
2889 0, /* tp_new */
2890 0, /* tp_free */
2891 0, /* tp_is_gc */
2892 0, /* tp_bases */
2893 0, /* tp_mro */
2894 0, /* tp_cache */
2895 0, /* tp_subclasses */
2896 0, /* tp_weaklist */
2897 0, /* tp_del */
2898 0, /* tp_version_tag */
2899 #if PY_VERSION_HEX >= 0x03040000
2900 0, /* tp_finalize */
2901 #endif
2902 #if PY_VERSION_HEX >= 0x03080000
2903 0, /* tp_vectorcall */
2904 #endif
2905 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2906 0, /* tp_print */
2907 #endif
2908 #ifdef COUNT_ALLOCS
2909 0, /* tp_allocs */
2910 0, /* tp_frees */
2911 0, /* tp_maxalloc */
2912 0, /* tp_prev */
2913 0 /* tp_next */
2914 #endif
2915 };
2916 staticvar_type = tmp;
2917 type_init = 1;
2918 if (PyType_Ready(&staticvar_type) < 0)
2919 return NULL;
2920 }
2921 return &staticvar_type;
2922 }
2923
2924 SWIGINTERN PyTypeObject*
SwigPyObjectType(void)2925 SwigPyObjectType(void) {
2926 static char swigpyobjecttype_doc[] = "Metaclass for SWIG wrapped types";
2927 static PyTypeObject swigpyobjecttype_type;
2928 static int type_init = 0;
2929 if (!type_init) {
2930 const PyTypeObject tmp = {
2931 #if PY_VERSION_HEX >= 0x03000000
2932 PyVarObject_HEAD_INIT(&PyType_Type, 0)
2933 #else
2934 PyObject_HEAD_INIT(&PyType_Type)
2935 0, /* ob_size */
2936 #endif
2937 "SwigPyObjectType", /* tp_name */
2938 PyType_Type.tp_basicsize, /* tp_basicsize */
2939 0, /* tp_itemsize */
2940 0, /* tp_dealloc */
2941 0, /* tp_print */
2942 0, /* tp_getattr */
2943 0, /* tp_setattr */
2944 0, /* tp_compare */
2945 0, /* tp_repr */
2946 0, /* tp_as_number */
2947 0, /* tp_as_sequence */
2948 0, /* tp_as_mapping */
2949 0, /* tp_hash */
2950 0, /* tp_call */
2951 0, /* tp_str */
2952 0, /* tp_getattro */
2953 SwigPyObjectType_setattro, /* tp_setattro */
2954 0, /* tp_as_buffer */
2955 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
2956 swigpyobjecttype_doc, /* tp_doc */
2957 0, /* tp_traverse */
2958 0, /* tp_clear */
2959 0, /* tp_richcompare */
2960 0, /* tp_weaklistoffset */
2961 0, /* tp_iter */
2962 0, /* tp_iternext */
2963 0, /* tp_methods */
2964 0, /* tp_members */
2965 0, /* tp_getset */
2966 0, /* tp_base */
2967 0, /* tp_dict */
2968 0, /* tp_descr_get */
2969 0, /* tp_descr_set */
2970 0, /* tp_dictoffset */
2971 0, /* tp_init */
2972 0, /* tp_alloc */
2973 0, /* tp_new */
2974 0, /* tp_free */
2975 0, /* tp_is_gc */
2976 0, /* tp_bases */
2977 0, /* tp_mro */
2978 0, /* tp_cache */
2979 0, /* tp_subclasses */
2980 0, /* tp_weaklist */
2981 0, /* tp_del */
2982 0, /* tp_version_tag */
2983 #if PY_VERSION_HEX >= 0x03040000
2984 0, /* tp_finalize */
2985 #endif
2986 #if PY_VERSION_HEX >= 0x03080000
2987 0, /* tp_vectorcall */
2988 #endif
2989 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2990 0, /* tp_print */
2991 #endif
2992 #ifdef COUNT_ALLOCS
2993 0, /* tp_allocs */
2994 0, /* tp_frees */
2995 0, /* tp_maxalloc */
2996 0, /* tp_prev */
2997 0 /* tp_next */
2998 #endif
2999 };
3000 swigpyobjecttype_type = tmp;
3001 type_init = 1;
3002 swigpyobjecttype_type.tp_base = &PyType_Type;
3003 if (PyType_Ready(&swigpyobjecttype_type) < 0)
3004 return NULL;
3005 }
3006 return &swigpyobjecttype_type;
3007 }
3008
3009 SWIGINTERN PyGetSetDescrObject *
SwigPyStaticVar_new_getset(PyTypeObject * type,PyGetSetDef * getset)3010 SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {
3011
3012 PyGetSetDescrObject *descr;
3013 descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0);
3014 assert(descr);
3015 Py_XINCREF(type);
3016 PyDescr_TYPE(descr) = type;
3017 PyDescr_NAME(descr) = PyString_InternFromString(getset->name);
3018 descr->d_getset = getset;
3019 if (PyDescr_NAME(descr) == NULL) {
3020 Py_DECREF(descr);
3021 descr = NULL;
3022 }
3023 return descr;
3024 }
3025
3026 SWIGINTERN void
SwigPyBuiltin_InitBases(PyTypeObject * type,PyTypeObject ** bases)3027 SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
3028 Py_ssize_t base_count = 0;
3029 PyTypeObject **b;
3030 PyObject *tuple;
3031 Py_ssize_t i;
3032
3033 if (!bases[0]) {
3034 bases[0] = SwigPyObject_type();
3035 bases[1] = NULL;
3036 }
3037 type->tp_base = bases[0];
3038 Py_INCREF((PyObject *)bases[0]);
3039 for (b = bases; *b != NULL; ++b)
3040 ++base_count;
3041 tuple = PyTuple_New(base_count);
3042 for (i = 0; i < base_count; ++i) {
3043 Py_INCREF((PyObject *)bases[i]);
3044 PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]);
3045 }
3046 type->tp_bases = tuple;
3047 }
3048
3049 SWIGINTERN PyObject *
SwigPyBuiltin_ThisClosure(PyObject * self,void * SWIGUNUSEDPARM (closure))3050 SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
3051 PyObject *result;
3052 result = (PyObject *)SWIG_Python_GetSwigThis(self);
3053 Py_XINCREF(result);
3054 return result;
3055 }
3056
3057 SWIGINTERN void
SwigPyBuiltin_SetMetaType(PyTypeObject * type,PyTypeObject * metatype)3058 SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
3059 {
3060 #if PY_VERSION_HEX >= 0x03000000
3061 type->ob_base.ob_base.ob_type = metatype;
3062 #else
3063 type->ob_type = metatype;
3064 #endif
3065 }
3066
3067
3068 /* Start of callback function macros for use in PyTypeObject */
3069
3070 typedef PyObject *(*SwigPyWrapperFunction)(PyObject *, PyObject *);
3071
3072 #define SWIGPY_UNARYFUNC_CLOSURE(wrapper) \
3073 SWIGINTERN PyObject * \
3074 wrapper##_unaryfunc_closure(PyObject *a) { \
3075 return SwigPyBuiltin_unaryfunc_closure(wrapper, a); \
3076 }
3077 SWIGINTERN PyObject *
SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3078 SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3079 return wrapper(a, NULL);
3080 }
3081
3082 #define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \
3083 SWIGINTERN void \
3084 wrapper##_destructor_closure(PyObject *a) { \
3085 SwigPyBuiltin_destructor_closure(wrapper, #wrapper, a); \
3086 }
3087 SWIGINTERN void
SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper,const char * wrappername,PyObject * a)3088 SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) {
3089 SwigPyObject *sobj;
3090 sobj = (SwigPyObject *)a;
3091 Py_XDECREF(sobj->dict);
3092 if (sobj->own) {
3093 PyObject *o;
3094 PyObject *type = 0, *value = 0, *traceback = 0;
3095 PyErr_Fetch(&type, &value, &traceback);
3096 o = wrapper(a, NULL);
3097 if (!o) {
3098 PyObject *deallocname = PyString_FromString(wrappername);
3099 PyErr_WriteUnraisable(deallocname);
3100 Py_DECREF(deallocname);
3101 }
3102 PyErr_Restore(type, value, traceback);
3103 Py_XDECREF(o);
3104 }
3105 if (PyType_IS_GC(a->ob_type)) {
3106 PyObject_GC_Del(a);
3107 } else {
3108 PyObject_Del(a);
3109 }
3110 }
3111
3112 #define SWIGPY_INQUIRY_CLOSURE(wrapper) \
3113 SWIGINTERN int \
3114 wrapper##_inquiry_closure(PyObject *a) { \
3115 return SwigPyBuiltin_inquiry_closure(wrapper, a); \
3116 }
3117 SWIGINTERN int
SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper,PyObject * a)3118 SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3119 PyObject *pyresult;
3120 int result;
3121 pyresult = wrapper(a, NULL);
3122 result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0;
3123 Py_XDECREF(pyresult);
3124 return result;
3125 }
3126
3127 #define SWIGPY_GETITERFUNC_CLOSURE(wrapper) \
3128 SWIGINTERN PyObject * \
3129 wrapper##_getiterfunc_closure(PyObject *a) { \
3130 return SwigPyBuiltin_getiterfunc_closure(wrapper, a); \
3131 }
3132 SWIGINTERN PyObject *
SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3133 SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3134 return wrapper(a, NULL);
3135 }
3136
3137 #define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \
3138 SWIGINTERN PyObject * \
3139 wrapper##_binaryfunc_closure(PyObject *a, PyObject *b) { \
3140 return SwigPyBuiltin_binaryfunc_closure(wrapper, a, b); \
3141 }
3142 SWIGINTERN PyObject *
SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3143 SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3144 PyObject *tuple, *result;
3145 tuple = PyTuple_New(1);
3146 assert(tuple);
3147 Py_INCREF(b);
3148 PyTuple_SET_ITEM(tuple, 0, b);
3149 result = wrapper(a, tuple);
3150 Py_DECREF(tuple);
3151 return result;
3152 }
3153
3154 typedef ternaryfunc ternarycallfunc;
3155
3156 #define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \
3157 SWIGINTERN PyObject * \
3158 wrapper##_ternaryfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3159 return SwigPyBuiltin_ternaryfunc_closure(wrapper, a, b, c); \
3160 }
3161 SWIGINTERN PyObject *
SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3162 SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3163 PyObject *tuple, *result;
3164 tuple = PyTuple_New(2);
3165 assert(tuple);
3166 Py_INCREF(b);
3167 PyTuple_SET_ITEM(tuple, 0, b);
3168 Py_INCREF(c);
3169 PyTuple_SET_ITEM(tuple, 1, c);
3170 result = wrapper(a, tuple);
3171 Py_DECREF(tuple);
3172 return result;
3173 }
3174
3175 #define SWIGPY_TERNARYCALLFUNC_CLOSURE(wrapper) \
3176 SWIGINTERN PyObject * \
3177 wrapper##_ternarycallfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3178 return SwigPyBuiltin_ternarycallfunc_closure(wrapper, a, b, c); \
3179 }
3180 SWIGINTERN PyObject *
SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3181 SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3182 (void) c;
3183 return wrapper(a, b);
3184 }
3185
3186 #define SWIGPY_LENFUNC_CLOSURE(wrapper) \
3187 SWIGINTERN Py_ssize_t \
3188 wrapper##_lenfunc_closure(PyObject *a) { \
3189 return SwigPyBuiltin_lenfunc_closure(wrapper, a); \
3190 }
3191 SWIGINTERN Py_ssize_t
SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3192 SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3193 PyObject *resultobj;
3194 Py_ssize_t result;
3195 resultobj = wrapper(a, NULL);
3196 result = PyNumber_AsSsize_t(resultobj, NULL);
3197 Py_DECREF(resultobj);
3198 return result;
3199 }
3200
3201 #define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \
3202 SWIGINTERN PyObject * \
3203 wrapper##_ssizessizeargfunc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \
3204 return SwigPyBuiltin_ssizessizeargfunc_closure(wrapper, a, b, c); \
3205 }
3206 SWIGINTERN PyObject *
SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c)3207 SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c) {
3208 PyObject *tuple, *result;
3209 tuple = PyTuple_New(2);
3210 assert(tuple);
3211 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3212 PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3213 result = wrapper(a, tuple);
3214 Py_DECREF(tuple);
3215 return result;
3216 }
3217
3218 #define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \
3219 SWIGINTERN int \
3220 wrapper##_ssizessizeobjargproc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
3221 return SwigPyBuiltin_ssizessizeobjargproc_closure(wrapper, a, b, c, d); \
3222 }
3223 SWIGINTERN int
SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c,PyObject * d)3224 SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) {
3225 PyObject *tuple, *resultobj;
3226 int result;
3227 tuple = PyTuple_New(d ? 3 : 2);
3228 assert(tuple);
3229 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3230 PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3231 if (d) {
3232 Py_INCREF(d);
3233 PyTuple_SET_ITEM(tuple, 2, d);
3234 }
3235 resultobj = wrapper(a, tuple);
3236 result = resultobj ? 0 : -1;
3237 Py_DECREF(tuple);
3238 Py_XDECREF(resultobj);
3239 return result;
3240 }
3241
3242 #define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \
3243 SWIGINTERN PyObject * \
3244 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \
3245 return SwigPyBuiltin_funpack_ssizeargfunc_closure(wrapper, a, b); \
3246 }
3247 SWIGINTERN PyObject *
SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3248 SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3249 PyObject *tuple, *result;
3250 tuple = PyTuple_New(1);
3251 assert(tuple);
3252 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3253 result = wrapper(a, tuple);
3254 Py_DECREF(tuple);
3255 return result;
3256 }
3257
3258 #define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \
3259 SWIGINTERN PyObject * \
3260 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \
3261 return SwigPyBuiltin_ssizeargfunc_closure(wrapper, a, b); \
3262 }
3263 SWIGINTERN PyObject *
SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3264 SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3265 PyObject *arg, *result;
3266 arg = _PyLong_FromSsize_t(b);
3267 result = wrapper(a, arg);
3268 Py_DECREF(arg);
3269 return result;
3270 }
3271
3272 #define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \
3273 SWIGINTERN int \
3274 wrapper##_ssizeobjargproc_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \
3275 return SwigPyBuiltin_ssizeobjargproc_closure(wrapper, a, b, c); \
3276 }
3277 SWIGINTERN int
SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,PyObject * c)3278 SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, PyObject *c) {
3279 PyObject *tuple, *resultobj;
3280 int result;
3281 tuple = PyTuple_New(2);
3282 assert(tuple);
3283 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3284 Py_INCREF(c);
3285 PyTuple_SET_ITEM(tuple, 1, c);
3286 resultobj = wrapper(a, tuple);
3287 result = resultobj ? 0 : -1;
3288 Py_XDECREF(resultobj);
3289 Py_DECREF(tuple);
3290 return result;
3291 }
3292
3293 #define SWIGPY_OBJOBJPROC_CLOSURE(wrapper) \
3294 SWIGINTERN int \
3295 wrapper##_objobjproc_closure(PyObject *a, PyObject *b) { \
3296 return SwigPyBuiltin_objobjproc_closure(wrapper, a, b); \
3297 }
3298 SWIGINTERN int
SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3299 SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3300 int result;
3301 PyObject *pyresult;
3302 PyObject *tuple;
3303 tuple = PyTuple_New(1);
3304 assert(tuple);
3305 Py_INCREF(b);
3306 PyTuple_SET_ITEM(tuple, 0, b);
3307 pyresult = wrapper(a, tuple);
3308 result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1;
3309 Py_XDECREF(pyresult);
3310 Py_DECREF(tuple);
3311 return result;
3312 }
3313
3314 #define SWIGPY_FUNPACK_OBJOBJPROC_CLOSURE(wrapper) \
3315 SWIGINTERN int \
3316 wrapper##_objobjproc_closure(PyObject *a, PyObject *b) { \
3317 return SwigPyBuiltin_funpack_objobjproc_closure(wrapper, a, b); \
3318 }
3319 SWIGINTERN int
SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3320 SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3321 int result;
3322 PyObject *pyresult;
3323 pyresult = wrapper(a, b);
3324 result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1;
3325 Py_XDECREF(pyresult);
3326 return result;
3327 }
3328
3329 #define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \
3330 SWIGINTERN int \
3331 wrapper##_objobjargproc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3332 return SwigPyBuiltin_objobjargproc_closure(wrapper, a, b, c); \
3333 }
3334 SWIGINTERN int
SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3335 SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3336 PyObject *tuple, *resultobj;
3337 int result;
3338 tuple = PyTuple_New(c ? 2 : 1);
3339 assert(tuple);
3340 Py_INCREF(b);
3341 PyTuple_SET_ITEM(tuple, 0, b);
3342 if (c) {
3343 Py_INCREF(c);
3344 PyTuple_SET_ITEM(tuple, 1, c);
3345 }
3346 resultobj = wrapper(a, tuple);
3347 result = resultobj ? 0 : -1;
3348 Py_XDECREF(resultobj);
3349 Py_DECREF(tuple);
3350 return result;
3351 }
3352
3353 #define SWIGPY_REPRFUNC_CLOSURE(wrapper) \
3354 SWIGINTERN PyObject * \
3355 wrapper##_reprfunc_closure(PyObject *a) { \
3356 return SwigPyBuiltin_reprfunc_closure(wrapper, a); \
3357 }
3358 SWIGINTERN PyObject *
SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3359 SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3360 return wrapper(a, NULL);
3361 }
3362
3363 #define SWIGPY_HASHFUNC_CLOSURE(wrapper) \
3364 SWIGINTERN Py_hash_t \
3365 wrapper##_hashfunc_closure(PyObject *a) { \
3366 return SwigPyBuiltin_hashfunc_closure(wrapper, a); \
3367 }
3368 SWIGINTERN Py_hash_t
SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3369 SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3370 PyObject *pyresult;
3371 Py_hash_t result;
3372 pyresult = wrapper(a, NULL);
3373 if (!pyresult)
3374 return -1;
3375 result = SWIG_PyNumber_AsPyHash(pyresult);
3376 Py_DECREF(pyresult);
3377 return result;
3378 }
3379
3380 #define SWIGPY_ITERNEXTFUNC_CLOSURE(wrapper) \
3381 SWIGINTERN PyObject * \
3382 wrapper##_iternextfunc_closure(PyObject *a) { \
3383 return SwigPyBuiltin_iternextfunc_closure(wrapper, a);\
3384 }
3385 SWIGINTERN PyObject *
SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3386 SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3387 return wrapper(a, NULL);
3388 }
3389
3390 /* End of callback function macros for use in PyTypeObject */
3391
3392 #ifdef __cplusplus
3393 }
3394 #endif
3395
3396
3397
3398
3399 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
3400
3401 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3402
3403
3404
3405 #ifdef __cplusplus
3406 extern "C" {
3407 #endif
3408
3409 /* Method creation and docstring support functions */
3410
3411 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
3412 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
3413 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
3414
3415 #ifdef __cplusplus
3416 }
3417 #endif
3418
3419
3420 /* -------- TYPES TABLE (BEGIN) -------- */
3421
3422 #define SWIGTYPE_p_CameraAbilities swig_types[0]
3423 #define SWIGTYPE_p_CameraCaptureType swig_types[1]
3424 #define SWIGTYPE_p_CameraDriverStatus swig_types[2]
3425 #define SWIGTYPE_p_CameraEventType swig_types[3]
3426 #define SWIGTYPE_p_CameraFileAccessType swig_types[4]
3427 #define SWIGTYPE_p_CameraFileInfoFields swig_types[5]
3428 #define SWIGTYPE_p_CameraFileOperation swig_types[6]
3429 #define SWIGTYPE_p_CameraFilePath swig_types[7]
3430 #define SWIGTYPE_p_CameraFilePermissions swig_types[8]
3431 #define SWIGTYPE_p_CameraFileStatus swig_types[9]
3432 #define SWIGTYPE_p_CameraFileType swig_types[10]
3433 #define SWIGTYPE_p_CameraFolderOperation swig_types[11]
3434 #define SWIGTYPE_p_CameraOperation swig_types[12]
3435 #define SWIGTYPE_p_CameraStorageAccessType swig_types[13]
3436 #define SWIGTYPE_p_CameraStorageFilesystemType swig_types[14]
3437 #define SWIGTYPE_p_CameraStorageInfoFields swig_types[15]
3438 #define SWIGTYPE_p_CameraStorageType swig_types[16]
3439 #define SWIGTYPE_p_CameraText swig_types[17]
3440 #define SWIGTYPE_p_CameraWidgetChildIter swig_types[18]
3441 #define SWIGTYPE_p_CameraWidgetChoiceIter swig_types[19]
3442 #define SWIGTYPE_p_CameraWidgetType swig_types[20]
3443 #define SWIGTYPE_p_GPLogLevel swig_types[21]
3444 #define SWIGTYPE_p_GPPortType swig_types[22]
3445 #define SWIGTYPE_p_GPVersionVerbosity swig_types[23]
3446 #define SWIGTYPE_p_GphotoDeviceType swig_types[24]
3447 #define SWIGTYPE_p_SwigPyObject swig_types[25]
3448 #define SWIGTYPE_p__Camera swig_types[26]
3449 #define SWIGTYPE_p__CameraAbilitiesList swig_types[27]
3450 #define SWIGTYPE_p__CameraFile swig_types[28]
3451 #define SWIGTYPE_p__CameraFileHandler swig_types[29]
3452 #define SWIGTYPE_p__CameraFileInfo swig_types[30]
3453 #define SWIGTYPE_p__CameraFileInfoAudio swig_types[31]
3454 #define SWIGTYPE_p__CameraFileInfoFile swig_types[32]
3455 #define SWIGTYPE_p__CameraFileInfoPreview swig_types[33]
3456 #define SWIGTYPE_p__CameraFilesystem swig_types[34]
3457 #define SWIGTYPE_p__CameraFilesystemFuncs swig_types[35]
3458 #define SWIGTYPE_p__CameraFunctions swig_types[36]
3459 #define SWIGTYPE_p__CameraList swig_types[37]
3460 #define SWIGTYPE_p__CameraPrivateCore swig_types[38]
3461 #define SWIGTYPE_p__CameraPrivateLibrary swig_types[39]
3462 #define SWIGTYPE_p__CameraStorageInformation swig_types[40]
3463 #define SWIGTYPE_p__CameraWidget swig_types[41]
3464 #define SWIGTYPE_p__GPContext swig_types[42]
3465 #define SWIGTYPE_p__GPContextFeedback swig_types[43]
3466 #define SWIGTYPE_p__GPPortInfoList swig_types[44]
3467 #define SWIGTYPE_p_char swig_types[45]
3468 #define SWIGTYPE_p_float swig_types[46]
3469 #define SWIGTYPE_p_int swig_types[47]
3470 #define SWIGTYPE_p_long swig_types[48]
3471 #define SWIGTYPE_p_long_long swig_types[49]
3472 #define SWIGTYPE_p_p__CameraWidget swig_types[50]
3473 #define SWIGTYPE_p_p_char swig_types[51]
3474 #define SWIGTYPE_p_short swig_types[52]
3475 #define SWIGTYPE_p_signed_char swig_types[53]
3476 #define SWIGTYPE_p_unsigned_char swig_types[54]
3477 #define SWIGTYPE_p_unsigned_int swig_types[55]
3478 #define SWIGTYPE_p_unsigned_long_long swig_types[56]
3479 #define SWIGTYPE_p_unsigned_short swig_types[57]
3480 static swig_type_info *swig_types[59];
3481 static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0};
3482 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3483 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3484
3485 /* -------- TYPES TABLE (END) -------- */
3486
3487 #ifdef SWIG_TypeQuery
3488 # undef SWIG_TypeQuery
3489 #endif
3490 #define SWIG_TypeQuery SWIG_Python_TypeQuery
3491
3492 /*-----------------------------------------------
3493 @(target):= _widget.so
3494 ------------------------------------------------*/
3495 #if PY_VERSION_HEX >= 0x03000000
3496 # define SWIG_init PyInit__widget
3497
3498 #else
3499 # define SWIG_init init_widget
3500
3501 #endif
3502 #define SWIG_name "_widget"
3503
3504 #define SWIGVERSION 0x040002
3505 #define SWIG_VERSION SWIGVERSION
3506
3507
3508 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
3509 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
3510
3511
3512 #include <stddef.h>
3513
3514
3515 #include "gphoto2/gphoto2.h"
3516
3517
3518 PyObject *PyExc_GPhoto2Error = NULL;
3519
3520
3521 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)3522 SWIG_pchar_descriptor(void)
3523 {
3524 static int init = 0;
3525 static swig_type_info* info = 0;
3526 if (!init) {
3527 info = SWIG_TypeQuery("_p_char");
3528 init = 1;
3529 }
3530 return info;
3531 }
3532
3533
3534 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)3535 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3536 {
3537 #if PY_VERSION_HEX>=0x03000000
3538 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3539 if (PyBytes_Check(obj))
3540 #else
3541 if (PyUnicode_Check(obj))
3542 #endif
3543 #else
3544 if (PyString_Check(obj))
3545 #endif
3546 {
3547 char *cstr; Py_ssize_t len;
3548 int ret = SWIG_OK;
3549 #if PY_VERSION_HEX>=0x03000000
3550 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3551 if (!alloc && cptr) {
3552 /* We can't allow converting without allocation, since the internal
3553 representation of string in Python 3 is UCS-2/UCS-4 but we require
3554 a UTF-8 representation.
3555 TODO(bhy) More detailed explanation */
3556 return SWIG_RuntimeError;
3557 }
3558 obj = PyUnicode_AsUTF8String(obj);
3559 if (!obj)
3560 return SWIG_TypeError;
3561 if (alloc)
3562 *alloc = SWIG_NEWOBJ;
3563 #endif
3564 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3565 return SWIG_TypeError;
3566 #else
3567 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3568 return SWIG_TypeError;
3569 #endif
3570 if (cptr) {
3571 if (alloc) {
3572 if (*alloc == SWIG_NEWOBJ) {
3573 *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3574 *alloc = SWIG_NEWOBJ;
3575 } else {
3576 *cptr = cstr;
3577 *alloc = SWIG_OLDOBJ;
3578 }
3579 } else {
3580 #if PY_VERSION_HEX>=0x03000000
3581 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3582 *cptr = PyBytes_AsString(obj);
3583 #else
3584 assert(0); /* Should never reach here with Unicode strings in Python 3 */
3585 #endif
3586 #else
3587 *cptr = SWIG_Python_str_AsChar(obj);
3588 if (!*cptr)
3589 ret = SWIG_TypeError;
3590 #endif
3591 }
3592 }
3593 if (psize) *psize = len + 1;
3594 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3595 Py_XDECREF(obj);
3596 #endif
3597 return ret;
3598 } else {
3599 #if defined(SWIG_PYTHON_2_UNICODE)
3600 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3601 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3602 #endif
3603 #if PY_VERSION_HEX<0x03000000
3604 if (PyUnicode_Check(obj)) {
3605 char *cstr; Py_ssize_t len;
3606 if (!alloc && cptr) {
3607 return SWIG_RuntimeError;
3608 }
3609 obj = PyUnicode_AsUTF8String(obj);
3610 if (!obj)
3611 return SWIG_TypeError;
3612 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3613 if (cptr) {
3614 if (alloc) *alloc = SWIG_NEWOBJ;
3615 *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3616 }
3617 if (psize) *psize = len + 1;
3618
3619 Py_XDECREF(obj);
3620 return SWIG_OK;
3621 } else {
3622 Py_XDECREF(obj);
3623 }
3624 }
3625 #endif
3626 #endif
3627
3628 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3629 if (pchar_descriptor) {
3630 void* vptr = 0;
3631 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3632 if (cptr) *cptr = (char *) vptr;
3633 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3634 if (alloc) *alloc = SWIG_OLDOBJ;
3635 return SWIG_OK;
3636 }
3637 }
3638 }
3639 return SWIG_TypeError;
3640 }
3641
3642
3643
3644
3645
3646 SWIGINTERNINLINE PyObject*
SWIG_From_int(int value)3647 SWIG_From_int (int value)
3648 {
3649 return PyInt_FromLong((long) value);
3650 }
3651
3652
3653 #include <float.h>
3654
3655
3656 #include <math.h>
3657
3658
3659 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
3660 #ifndef SWIG_isfinite
3661 /* isfinite() is a macro for C99 */
3662 # if defined(isfinite)
3663 # define SWIG_isfinite(X) (isfinite(X))
3664 # elif defined(__cplusplus) && __cplusplus >= 201103L
3665 /* Use a template so that this works whether isfinite() is std::isfinite() or
3666 * in the global namespace. The reality seems to vary between compiler
3667 * versions.
3668 *
3669 * Make sure namespace std exists to avoid compiler warnings.
3670 *
3671 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
3672 */
3673 namespace std { }
3674 extern "C++" template<typename T>
SWIG_isfinite_func(T x)3675 inline int SWIG_isfinite_func(T x) {
3676 using namespace std;
3677 return isfinite(x);
3678 }
3679 # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
3680 # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
3681 # define SWIG_isfinite(X) (__builtin_isfinite(X))
3682 # elif defined(__clang__) && defined(__has_builtin)
3683 # if __has_builtin(__builtin_isfinite)
3684 # define SWIG_isfinite(X) (__builtin_isfinite(X))
3685 # endif
3686 # elif defined(_MSC_VER)
3687 # define SWIG_isfinite(X) (_finite(X))
3688 # elif defined(__sun) && defined(__SVR4)
3689 # include <ieeefp.h>
3690 # define SWIG_isfinite(X) (finite(X))
3691 # endif
3692 #endif
3693
3694
3695 /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
3696 #ifdef SWIG_isfinite
3697 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
3698 #else
3699 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
3700 #endif
3701
3702
3703 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)3704 SWIG_AsVal_double (PyObject *obj, double *val)
3705 {
3706 int res = SWIG_TypeError;
3707 if (PyFloat_Check(obj)) {
3708 if (val) *val = PyFloat_AsDouble(obj);
3709 return SWIG_OK;
3710 #if PY_VERSION_HEX < 0x03000000
3711 } else if (PyInt_Check(obj)) {
3712 if (val) *val = (double) PyInt_AsLong(obj);
3713 return SWIG_OK;
3714 #endif
3715 } else if (PyLong_Check(obj)) {
3716 double v = PyLong_AsDouble(obj);
3717 if (!PyErr_Occurred()) {
3718 if (val) *val = v;
3719 return SWIG_OK;
3720 } else {
3721 PyErr_Clear();
3722 }
3723 }
3724 #ifdef SWIG_PYTHON_CAST_MODE
3725 {
3726 int dispatch = 0;
3727 double d = PyFloat_AsDouble(obj);
3728 if (!PyErr_Occurred()) {
3729 if (val) *val = d;
3730 return SWIG_AddCast(SWIG_OK);
3731 } else {
3732 PyErr_Clear();
3733 }
3734 if (!dispatch) {
3735 long v = PyLong_AsLong(obj);
3736 if (!PyErr_Occurred()) {
3737 if (val) *val = v;
3738 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3739 } else {
3740 PyErr_Clear();
3741 }
3742 }
3743 }
3744 #endif
3745 return res;
3746 }
3747
3748
3749 SWIGINTERN int
SWIG_AsVal_float(PyObject * obj,float * val)3750 SWIG_AsVal_float (PyObject * obj, float *val)
3751 {
3752 double v;
3753 int res = SWIG_AsVal_double (obj, &v);
3754 if (SWIG_IsOK(res)) {
3755 if (SWIG_Float_Overflow_Check(v)) {
3756 return SWIG_OverflowError;
3757 } else {
3758 if (val) *val = (float)(v);
3759 }
3760 }
3761 return res;
3762 }
3763
3764
3765 #include <limits.h>
3766 #if !defined(SWIG_NO_LLONG_MAX)
3767 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3768 # define LLONG_MAX __LONG_LONG_MAX__
3769 # define LLONG_MIN (-LLONG_MAX - 1LL)
3770 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3771 # endif
3772 #endif
3773
3774
3775 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)3776 SWIG_CanCastAsInteger(double *d, double min, double max) {
3777 double x = *d;
3778 if ((min <= x && x <= max)) {
3779 double fx = floor(x);
3780 double cx = ceil(x);
3781 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3782 if ((errno == EDOM) || (errno == ERANGE)) {
3783 errno = 0;
3784 } else {
3785 double summ, reps, diff;
3786 if (rd < x) {
3787 diff = x - rd;
3788 } else if (rd > x) {
3789 diff = rd - x;
3790 } else {
3791 return 1;
3792 }
3793 summ = rd + x;
3794 reps = diff/summ;
3795 if (reps < 8*DBL_EPSILON) {
3796 *d = rd;
3797 return 1;
3798 }
3799 }
3800 }
3801 return 0;
3802 }
3803
3804
3805 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)3806 SWIG_AsVal_long (PyObject *obj, long* val)
3807 {
3808 #if PY_VERSION_HEX < 0x03000000
3809 if (PyInt_Check(obj)) {
3810 if (val) *val = PyInt_AsLong(obj);
3811 return SWIG_OK;
3812 } else
3813 #endif
3814 if (PyLong_Check(obj)) {
3815 long v = PyLong_AsLong(obj);
3816 if (!PyErr_Occurred()) {
3817 if (val) *val = v;
3818 return SWIG_OK;
3819 } else {
3820 PyErr_Clear();
3821 return SWIG_OverflowError;
3822 }
3823 }
3824 #ifdef SWIG_PYTHON_CAST_MODE
3825 {
3826 int dispatch = 0;
3827 long v = PyInt_AsLong(obj);
3828 if (!PyErr_Occurred()) {
3829 if (val) *val = v;
3830 return SWIG_AddCast(SWIG_OK);
3831 } else {
3832 PyErr_Clear();
3833 }
3834 if (!dispatch) {
3835 double d;
3836 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3837 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3838 if (val) *val = (long)(d);
3839 return res;
3840 }
3841 }
3842 }
3843 #endif
3844 return SWIG_TypeError;
3845 }
3846
3847
3848 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)3849 SWIG_AsVal_int (PyObject * obj, int *val)
3850 {
3851 long v;
3852 int res = SWIG_AsVal_long (obj, &v);
3853 if (SWIG_IsOK(res)) {
3854 if ((v < INT_MIN || v > INT_MAX)) {
3855 return SWIG_OverflowError;
3856 } else {
3857 if (val) *val = (int)(v);
3858 }
3859 }
3860 return res;
3861 }
3862
3863
3864 #define SWIG_From_double PyFloat_FromDouble
3865
3866
3867 SWIGINTERNINLINE PyObject *
SWIG_From_float(float value)3868 SWIG_From_float (float value)
3869 {
3870 return SWIG_From_double (value);
3871 }
3872
3873
make_iterator(PyObject * self)3874 static PyObject* make_iterator(PyObject* self)
3875 {
3876 Py_INCREF(self);
3877 return self;
3878 }
3879
3880
3881 typedef struct CameraWidgetChildIter {
3882 CameraWidget* parent;
3883 int idx;
3884 int len;
3885 } CameraWidgetChildIter;
3886
CameraWidgetChildIter___next__(struct CameraWidgetChildIter * self)3887 SWIGINTERN CameraWidget *CameraWidgetChildIter___next__(struct CameraWidgetChildIter *self){
3888 CameraWidget* result;
3889 int error;
3890 if (self->idx >= self->len)
3891 {
3892 PyErr_SetString(PyExc_StopIteration, "End of iteration");
3893 return NULL;
3894 }
3895 error = gp_widget_get_child(self->parent, self->idx, &result);
3896 self->idx++;
3897 if (error < 0)
3898 {
3899 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3900 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3901 /*@SWIG@*/
3902 return NULL;
3903 }
3904 return result;
3905 }
3906
gp_widget_get_children(CameraWidget * widget,CameraWidgetChildIter * iter)3907 int gp_widget_get_children(CameraWidget* widget, CameraWidgetChildIter* iter) {
3908 iter->parent = widget;
3909 iter->idx = 0;
3910 iter->len = gp_widget_count_children(widget);
3911 if (iter->len < GP_OK)
3912 return iter->len;
3913 return GP_OK;
3914 };
3915
3916
3917 typedef struct CameraWidgetChoiceIter {
3918 CameraWidget* parent;
3919 int idx;
3920 int len;
3921 } CameraWidgetChoiceIter;
3922
CameraWidgetChoiceIter___next__(struct CameraWidgetChoiceIter * self)3923 SWIGINTERN char const *CameraWidgetChoiceIter___next__(struct CameraWidgetChoiceIter *self){
3924 const char* result;
3925 int error;
3926 if (self->idx >= self->len)
3927 {
3928 PyErr_SetString(PyExc_StopIteration, "End of iteration");
3929 return NULL;
3930 }
3931 error = gp_widget_get_choice(self->parent, self->idx, &result);
3932 self->idx++;
3933 if (error < 0)
3934 {
3935 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3936 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3937 /*@SWIG@*/
3938 return NULL;
3939 }
3940 return result;
3941 }
3942
3943 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)3944 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3945 {
3946 if (carray) {
3947 if (size > INT_MAX) {
3948 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3949 return pchar_descriptor ?
3950 SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3951 } else {
3952 #if PY_VERSION_HEX >= 0x03000000
3953 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3954 return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
3955 #else
3956 return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
3957 #endif
3958 #else
3959 return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
3960 #endif
3961 }
3962 } else {
3963 return SWIG_Py_Void();
3964 }
3965 }
3966
3967
3968 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)3969 SWIG_FromCharPtr(const char *cptr)
3970 {
3971 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3972 }
3973
3974
gp_widget_get_choices(CameraWidget * widget,CameraWidgetChoiceIter * iter)3975 int gp_widget_get_choices(CameraWidget* widget, CameraWidgetChoiceIter* iter) {
3976 iter->parent = widget;
3977 iter->idx = 0;
3978 iter->len = gp_widget_count_choices(widget);
3979 if (iter->len < GP_OK)
3980 return iter->len;
3981 return GP_OK;
3982 };
3983
3984
widget_dtor(CameraWidget * widget)3985 static int widget_dtor(CameraWidget *widget) {
3986 if (widget == NULL)
3987 return GP_OK;
3988 {
3989 CameraWidget *root;
3990 int error = gp_widget_get_root(widget, &root);
3991 if (error < GP_OK)
3992 return error;
3993 return gp_widget_unref(root);
3994 }
3995 }
3996
_CameraWidget_count_children(struct _CameraWidget * self)3997 SWIGINTERN int _CameraWidget_count_children(struct _CameraWidget *self){
3998
3999
4000
4001 int result = gp_widget_count_children (self);
4002
4003
4004
4005 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4006 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4007 /*@SWIG@*/
4008
4009 return result;
4010
4011 }
_CameraWidget_get_child(struct _CameraWidget * self,int child_number,CameraWidget ** child)4012 SWIGINTERN void _CameraWidget_get_child(struct _CameraWidget *self,int child_number,CameraWidget **child){
4013
4014
4015
4016 int result = gp_widget_get_child (self, child_number, child);
4017
4018
4019
4020 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4021 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4022 /*@SWIG@*/
4023
4024
4025
4026 }
_CameraWidget_get_children(struct _CameraWidget * self,CameraWidgetChildIter * iter)4027 SWIGINTERN void _CameraWidget_get_children(struct _CameraWidget *self,CameraWidgetChildIter *iter){
4028
4029
4030
4031 int result = gp_widget_get_children (self, iter);
4032
4033
4034
4035 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4036 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4037 /*@SWIG@*/
4038
4039
4040
4041 }
_CameraWidget_get_child_by_label(struct _CameraWidget * self,char const * label,CameraWidget ** child)4042 SWIGINTERN void _CameraWidget_get_child_by_label(struct _CameraWidget *self,char const *label,CameraWidget **child){
4043
4044
4045
4046 int result = gp_widget_get_child_by_label (self, label, child);
4047
4048
4049
4050 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4051 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4052 /*@SWIG@*/
4053
4054
4055
4056 }
_CameraWidget_get_child_by_id(struct _CameraWidget * self,int id,CameraWidget ** child)4057 SWIGINTERN void _CameraWidget_get_child_by_id(struct _CameraWidget *self,int id,CameraWidget **child){
4058
4059
4060
4061 int result = gp_widget_get_child_by_id (self, id, child);
4062
4063
4064
4065 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4066 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4067 /*@SWIG@*/
4068
4069
4070
4071 }
_CameraWidget_get_child_by_name(struct _CameraWidget * self,char const * name,CameraWidget ** child)4072 SWIGINTERN void _CameraWidget_get_child_by_name(struct _CameraWidget *self,char const *name,CameraWidget **child){
4073
4074
4075
4076 int result = gp_widget_get_child_by_name (self, name, child);
4077
4078
4079
4080 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4081 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4082 /*@SWIG@*/
4083
4084
4085
4086 }
_CameraWidget_get_root(struct _CameraWidget * self,CameraWidget ** root)4087 SWIGINTERN void _CameraWidget_get_root(struct _CameraWidget *self,CameraWidget **root){
4088
4089
4090
4091 int result = gp_widget_get_root (self, root);
4092
4093
4094
4095 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4096 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4097 /*@SWIG@*/
4098
4099
4100
4101 }
_CameraWidget_get_parent(struct _CameraWidget * self,CameraWidget ** parent)4102 SWIGINTERN void _CameraWidget_get_parent(struct _CameraWidget *self,CameraWidget **parent){
4103
4104
4105
4106 int result = gp_widget_get_parent (self, parent);
4107
4108
4109
4110 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4111 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4112 /*@SWIG@*/
4113
4114
4115
4116 }
_CameraWidget_set_value__SWIG_0(struct _CameraWidget * self,char const * value)4117 SWIGINTERN void _CameraWidget_set_value__SWIG_0(struct _CameraWidget *self,char const *value){
4118
4119
4120
4121 int result = gp_widget_set_value (self, value);
4122
4123
4124
4125 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4126 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4127 /*@SWIG@*/
4128
4129
4130
4131 }
_CameraWidget_set_value__SWIG_1(struct _CameraWidget * self,float const * value)4132 SWIGINTERN void _CameraWidget_set_value__SWIG_1(struct _CameraWidget *self,float const *value){
4133
4134
4135
4136 int result = gp_widget_set_value (self, value);
4137
4138
4139
4140 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4141 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4142 /*@SWIG@*/
4143
4144
4145
4146 }
_CameraWidget_set_value__SWIG_2(struct _CameraWidget * self,int const * value)4147 SWIGINTERN void _CameraWidget_set_value__SWIG_2(struct _CameraWidget *self,int const *value){
4148
4149
4150
4151 int result = gp_widget_set_value (self, value);
4152
4153
4154
4155 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4156 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4157 /*@SWIG@*/
4158
4159
4160
4161 }
_CameraWidget_get_value__SWIG_0(struct _CameraWidget * self,char ** value)4162 SWIGINTERN void _CameraWidget_get_value__SWIG_0(struct _CameraWidget *self,char **value){
4163
4164
4165
4166 int result = gp_widget_get_value (self, value);
4167
4168
4169
4170 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4171 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4172 /*@SWIG@*/
4173
4174
4175
4176 }
_CameraWidget_get_value__SWIG_1(struct _CameraWidget * self,float * value)4177 SWIGINTERN void _CameraWidget_get_value__SWIG_1(struct _CameraWidget *self,float *value){
4178
4179
4180
4181 int result = gp_widget_get_value (self, value);
4182
4183
4184
4185 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4186 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4187 /*@SWIG@*/
4188
4189
4190
4191 }
_CameraWidget_get_value__SWIG_2(struct _CameraWidget * self,int * value)4192 SWIGINTERN void _CameraWidget_get_value__SWIG_2(struct _CameraWidget *self,int *value){
4193
4194
4195
4196 int result = gp_widget_get_value (self, value);
4197
4198
4199
4200 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4201 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4202 /*@SWIG@*/
4203
4204
4205
4206 }
_CameraWidget_set_name(struct _CameraWidget * self,char const * name)4207 SWIGINTERN void _CameraWidget_set_name(struct _CameraWidget *self,char const *name){
4208
4209
4210
4211 int result = gp_widget_set_name (self, name);
4212
4213
4214
4215 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4216 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4217 /*@SWIG@*/
4218
4219
4220
4221 }
_CameraWidget_get_name(struct _CameraWidget * self,char const ** name)4222 SWIGINTERN void _CameraWidget_get_name(struct _CameraWidget *self,char const **name){
4223
4224
4225
4226 int result = gp_widget_get_name (self, name);
4227
4228
4229
4230 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4231 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4232 /*@SWIG@*/
4233
4234
4235
4236 }
_CameraWidget_set_info(struct _CameraWidget * self,char const * info)4237 SWIGINTERN void _CameraWidget_set_info(struct _CameraWidget *self,char const *info){
4238
4239
4240
4241 int result = gp_widget_set_info (self, info);
4242
4243
4244
4245 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4246 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4247 /*@SWIG@*/
4248
4249
4250
4251 }
_CameraWidget_get_info(struct _CameraWidget * self,char const ** info)4252 SWIGINTERN void _CameraWidget_get_info(struct _CameraWidget *self,char const **info){
4253
4254
4255
4256 int result = gp_widget_get_info (self, info);
4257
4258
4259
4260 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4261 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4262 /*@SWIG@*/
4263
4264
4265
4266 }
_CameraWidget_get_id(struct _CameraWidget * self,int * id)4267 SWIGINTERN void _CameraWidget_get_id(struct _CameraWidget *self,int *id){
4268
4269
4270
4271 int result = gp_widget_get_id (self, id);
4272
4273
4274
4275 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4276 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4277 /*@SWIG@*/
4278
4279
4280
4281 }
_CameraWidget_get_type(struct _CameraWidget * self,CameraWidgetType * type)4282 SWIGINTERN void _CameraWidget_get_type(struct _CameraWidget *self,CameraWidgetType *type){
4283
4284
4285
4286 int result = gp_widget_get_type (self, type);
4287
4288
4289
4290 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4291 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4292 /*@SWIG@*/
4293
4294
4295
4296 }
_CameraWidget_get_label(struct _CameraWidget * self,char const ** label)4297 SWIGINTERN void _CameraWidget_get_label(struct _CameraWidget *self,char const **label){
4298
4299
4300
4301 int result = gp_widget_get_label (self, label);
4302
4303
4304
4305 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4306 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4307 /*@SWIG@*/
4308
4309
4310
4311 }
_CameraWidget_set_range(struct _CameraWidget * self,float min,float max,float increment)4312 SWIGINTERN void _CameraWidget_set_range(struct _CameraWidget *self,float min,float max,float increment){
4313
4314
4315
4316 int result = gp_widget_set_range (self, min, max, increment);
4317
4318
4319
4320 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4321 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4322 /*@SWIG@*/
4323
4324
4325
4326 }
_CameraWidget_get_range(struct _CameraWidget * self,float * min,float * max,float * increment)4327 SWIGINTERN void _CameraWidget_get_range(struct _CameraWidget *self,float *min,float *max,float *increment){
4328
4329
4330
4331 int result = gp_widget_get_range (self, min, max, increment);
4332
4333
4334
4335 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4336 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4337 /*@SWIG@*/
4338
4339
4340
4341 }
_CameraWidget_add_choice(struct _CameraWidget * self,char const * choice)4342 SWIGINTERN void _CameraWidget_add_choice(struct _CameraWidget *self,char const *choice){
4343
4344
4345
4346 int result = gp_widget_add_choice (self, choice);
4347
4348
4349
4350 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4351 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4352 /*@SWIG@*/
4353
4354
4355
4356 }
_CameraWidget_count_choices(struct _CameraWidget * self)4357 SWIGINTERN int _CameraWidget_count_choices(struct _CameraWidget *self){
4358
4359
4360
4361 int result = gp_widget_count_choices (self);
4362
4363
4364
4365 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4366 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4367 /*@SWIG@*/
4368
4369 return result;
4370
4371 }
_CameraWidget_get_choices(struct _CameraWidget * self,CameraWidgetChoiceIter * iter)4372 SWIGINTERN void _CameraWidget_get_choices(struct _CameraWidget *self,CameraWidgetChoiceIter *iter){
4373
4374
4375
4376 int result = gp_widget_get_choices (self, iter);
4377
4378
4379
4380 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4381 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4382 /*@SWIG@*/
4383
4384
4385
4386 }
_CameraWidget_get_choice(struct _CameraWidget * self,int choice_number,char const ** choice)4387 SWIGINTERN void _CameraWidget_get_choice(struct _CameraWidget *self,int choice_number,char const **choice){
4388
4389
4390
4391 int result = gp_widget_get_choice (self, choice_number, choice);
4392
4393
4394
4395 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4396 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4397 /*@SWIG@*/
4398
4399
4400
4401 }
_CameraWidget_changed(struct _CameraWidget * self)4402 SWIGINTERN int _CameraWidget_changed(struct _CameraWidget *self){
4403
4404
4405
4406 int result = gp_widget_changed (self);
4407
4408
4409
4410 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4411 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4412 /*@SWIG@*/
4413
4414 return result;
4415
4416 }
_CameraWidget_set_changed(struct _CameraWidget * self,int changed)4417 SWIGINTERN void _CameraWidget_set_changed(struct _CameraWidget *self,int changed){
4418
4419
4420
4421 int result = gp_widget_set_changed (self, changed);
4422
4423
4424
4425 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4426 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4427 /*@SWIG@*/
4428
4429
4430
4431 }
_CameraWidget_set_readonly(struct _CameraWidget * self,int readonly)4432 SWIGINTERN void _CameraWidget_set_readonly(struct _CameraWidget *self,int readonly){
4433
4434
4435
4436 int result = gp_widget_set_readonly (self, readonly);
4437
4438
4439
4440 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4441 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4442 /*@SWIG@*/
4443
4444
4445
4446 }
_CameraWidget_get_readonly(struct _CameraWidget * self,int * readonly)4447 SWIGINTERN void _CameraWidget_get_readonly(struct _CameraWidget *self,int *readonly){
4448
4449
4450
4451 int result = gp_widget_get_readonly (self, readonly);
4452
4453
4454
4455 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4456 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4457 /*@SWIG@*/
4458
4459
4460
4461 }
delete__CameraWidget(struct _CameraWidget * self)4462 SWIGINTERN void delete__CameraWidget(struct _CameraWidget *self){
4463 int error = widget_dtor(self);
4464 if (error < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4465 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
4466 /*@SWIG@*/
4467 }
4468 #ifdef __cplusplus
4469 extern "C" {
4470 #endif
_wrap_gp_widget_set_value__SWIG_0(PyObject * self,PyObject * args)4471 SWIGINTERN PyObject *_wrap_gp_widget_set_value__SWIG_0(PyObject *self, PyObject *args) {
4472 PyObject *resultobj = 0;
4473 CameraWidget *arg1 = (CameraWidget *) 0 ;
4474 char *arg2 = (char *) 0 ;
4475 void *argp1 = 0 ;
4476 int res1 = 0 ;
4477 int res2 ;
4478 char *buf2 = 0 ;
4479 int alloc2 = 0 ;
4480 PyObject * obj0 = 0 ;
4481 PyObject * obj1 = 0 ;
4482 int result;
4483
4484 if (!PyArg_UnpackTuple(args, "gp_widget_set_value", 2, 2, &obj0, &obj1)) SWIG_fail;
4485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4486 if (!SWIG_IsOK(res1)) {
4487 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_value" "', argument " "1"" of type '" "CameraWidget *""'");
4488 }
4489 arg1 = (CameraWidget *)(argp1);
4490 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4491 if (!SWIG_IsOK(res2)) {
4492 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_set_value" "', argument " "2"" of type '" "char const *""'");
4493 }
4494 arg2 = (char *)(buf2);
4495 result = (int)gp_widget_set_value(arg1,(char const *)arg2);
4496 resultobj = SWIG_From_int((int)(result));
4497 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4498 return resultobj;
4499 fail:
4500 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4501 return NULL;
4502 }
4503
4504
_wrap_gp_widget_set_value__SWIG_1(PyObject * self,PyObject * args)4505 SWIGINTERN PyObject *_wrap_gp_widget_set_value__SWIG_1(PyObject *self, PyObject *args) {
4506 PyObject *resultobj = 0;
4507 CameraWidget *arg1 = (CameraWidget *) 0 ;
4508 float *arg2 = (float *) 0 ;
4509 void *argp1 = 0 ;
4510 int res1 = 0 ;
4511 float temp2 ;
4512 int res2 = 0 ;
4513 PyObject * obj0 = 0 ;
4514 PyObject * obj1 = 0 ;
4515 int result;
4516
4517 if (!PyArg_UnpackTuple(args, "gp_widget_set_value", 2, 2, &obj0, &obj1)) SWIG_fail;
4518 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4519 if (!SWIG_IsOK(res1)) {
4520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_value" "', argument " "1"" of type '" "CameraWidget *""'");
4521 }
4522 arg1 = (CameraWidget *)(argp1);
4523 if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_float,0))))) {
4524 float val;
4525 int ecode = SWIG_AsVal_float(obj1, &val);
4526 if (!SWIG_IsOK(ecode)) {
4527 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "gp_widget_set_value" "', argument " "2"" of type '" "float""'");
4528 }
4529 temp2 = (float)(val);
4530 arg2 = &temp2;
4531 res2 = SWIG_AddTmpMask(ecode);
4532 }
4533 result = (int)gp_widget_set_value(arg1,(float const *)arg2);
4534 resultobj = SWIG_From_int((int)(result));
4535 {
4536
4537 }
4538 if (SWIG_IsNewObj(res2)) free((char*)arg2);
4539 return resultobj;
4540 fail:
4541 if (SWIG_IsNewObj(res2)) free((char*)arg2);
4542 return NULL;
4543 }
4544
4545
_wrap_gp_widget_set_value__SWIG_2(PyObject * self,PyObject * args)4546 SWIGINTERN PyObject *_wrap_gp_widget_set_value__SWIG_2(PyObject *self, PyObject *args) {
4547 PyObject *resultobj = 0;
4548 CameraWidget *arg1 = (CameraWidget *) 0 ;
4549 int *arg2 = (int *) 0 ;
4550 void *argp1 = 0 ;
4551 int res1 = 0 ;
4552 int temp2 ;
4553 int res2 = 0 ;
4554 PyObject * obj0 = 0 ;
4555 PyObject * obj1 = 0 ;
4556 int result;
4557
4558 if (!PyArg_UnpackTuple(args, "gp_widget_set_value", 2, 2, &obj0, &obj1)) SWIG_fail;
4559 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4560 if (!SWIG_IsOK(res1)) {
4561 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_value" "', argument " "1"" of type '" "CameraWidget *""'");
4562 }
4563 arg1 = (CameraWidget *)(argp1);
4564 if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
4565 int val;
4566 int ecode = SWIG_AsVal_int(obj1, &val);
4567 if (!SWIG_IsOK(ecode)) {
4568 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "gp_widget_set_value" "', argument " "2"" of type '" "int""'");
4569 }
4570 temp2 = (int)(val);
4571 arg2 = &temp2;
4572 res2 = SWIG_AddTmpMask(ecode);
4573 }
4574 result = (int)gp_widget_set_value(arg1,(int const *)arg2);
4575 resultobj = SWIG_From_int((int)(result));
4576 {
4577
4578 }
4579 if (SWIG_IsNewObj(res2)) free((char*)arg2);
4580 return resultobj;
4581 fail:
4582 if (SWIG_IsNewObj(res2)) free((char*)arg2);
4583 return NULL;
4584 }
4585
4586
_wrap_gp_widget_set_value(PyObject * self,PyObject * args)4587 SWIGINTERN PyObject *_wrap_gp_widget_set_value(PyObject *self, PyObject *args) {
4588 Py_ssize_t argc;
4589 PyObject *argv[3] = {
4590 0
4591 };
4592 Py_ssize_t ii;
4593
4594 if (!PyTuple_Check(args)) SWIG_fail;
4595 argc = PyObject_Length(args);
4596 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
4597 argv[ii] = PyTuple_GET_ITEM(args,ii);
4598 }
4599 if (argc == 2) {
4600 int _v = 0;
4601 {
4602 {
4603 CameraWidget *widget;
4604 CameraWidgetType type;
4605 int error;
4606
4607 _v = 0;
4608 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
4609 if (SWIG_IsOK(error)) {
4610 error = gp_widget_get_type(widget, &type);
4611 if (error >= 0) {
4612 _v = ((type == GP_WIDGET_DATE) || (type == GP_WIDGET_TOGGLE)) ? 1 : 0;
4613 }
4614 }
4615 }
4616 }
4617 if (!_v) goto check_1;
4618 return _wrap_gp_widget_set_value__SWIG_2(self, args);
4619 }
4620 check_1:
4621
4622 if (argc == 2) {
4623 int _v = 0;
4624 {
4625 {
4626 CameraWidget *widget;
4627 CameraWidgetType type;
4628 int error;
4629
4630 _v = 0;
4631 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
4632 if (SWIG_IsOK(error)) {
4633 error = gp_widget_get_type(widget, &type);
4634 if (error >= 0) {
4635 _v = (type == GP_WIDGET_RANGE) ? 1 : 0;
4636 }
4637 }
4638 }
4639 }
4640 if (!_v) goto check_2;
4641 return _wrap_gp_widget_set_value__SWIG_1(self, args);
4642 }
4643 check_2:
4644
4645 if (argc == 2) {
4646 {
4647 PyObject *retobj = _wrap_gp_widget_set_value__SWIG_0(self, args);
4648 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
4649 SWIG_fail;
4650 }
4651 }
4652
4653 fail:
4654 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'gp_widget_set_value'.\n"
4655 " Possible C/C++ prototypes are:\n"
4656 " gp_widget_set_value(CameraWidget *,char const *)\n"
4657 " gp_widget_set_value(CameraWidget *,float const *)\n"
4658 " gp_widget_set_value(CameraWidget *,int const *)\n");
4659 return 0;
4660 }
4661
4662
_wrap_gp_widget_get_value__SWIG_0(PyObject * self,PyObject * args)4663 SWIGINTERN PyObject *_wrap_gp_widget_get_value__SWIG_0(PyObject *self, PyObject *args) {
4664 PyObject *resultobj = 0;
4665 CameraWidget *arg1 = (CameraWidget *) 0 ;
4666 char **arg2 = (char **) 0 ;
4667 void *argp1 = 0 ;
4668 int res1 = 0 ;
4669 char *temp2 ;
4670 PyObject * obj0 = 0 ;
4671 int result;
4672
4673 {
4674 temp2 = NULL;
4675 arg2 = &temp2;
4676 }
4677 if (!PyArg_UnpackTuple(args, "gp_widget_get_value", 1, 1, &obj0)) SWIG_fail;
4678 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4679 if (!SWIG_IsOK(res1)) {
4680 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_value" "', argument " "1"" of type '" "CameraWidget *""'");
4681 }
4682 arg1 = (CameraWidget *)(argp1);
4683 result = (int)gp_widget_get_value(arg1,arg2);
4684 resultobj = SWIG_From_int((int)(result));
4685 {
4686 if (*arg2) {
4687 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
4688 }
4689 else {
4690 Py_INCREF(Py_None);
4691 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
4692 }
4693 }
4694 return resultobj;
4695 fail:
4696 return NULL;
4697 }
4698
4699
_wrap_gp_widget_get_value__SWIG_1(PyObject * self,PyObject * args)4700 SWIGINTERN PyObject *_wrap_gp_widget_get_value__SWIG_1(PyObject *self, PyObject *args) {
4701 PyObject *resultobj = 0;
4702 CameraWidget *arg1 = (CameraWidget *) 0 ;
4703 float *arg2 = (float *) 0 ;
4704 void *argp1 = 0 ;
4705 int res1 = 0 ;
4706 float temp2 ;
4707 int res2 = SWIG_TMPOBJ ;
4708 PyObject * obj0 = 0 ;
4709 int result;
4710
4711 arg2 = &temp2;
4712 if (!PyArg_UnpackTuple(args, "gp_widget_get_value", 1, 1, &obj0)) SWIG_fail;
4713 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4714 if (!SWIG_IsOK(res1)) {
4715 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_value" "', argument " "1"" of type '" "CameraWidget *""'");
4716 }
4717 arg1 = (CameraWidget *)(argp1);
4718 result = (int)gp_widget_get_value(arg1,arg2);
4719 resultobj = SWIG_From_int((int)(result));
4720 if (SWIG_IsTmpObj(res2)) {
4721 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
4722 } else {
4723 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4724 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
4725 }
4726 return resultobj;
4727 fail:
4728 return NULL;
4729 }
4730
4731
_wrap_gp_widget_get_value__SWIG_2(PyObject * self,PyObject * args)4732 SWIGINTERN PyObject *_wrap_gp_widget_get_value__SWIG_2(PyObject *self, PyObject *args) {
4733 PyObject *resultobj = 0;
4734 CameraWidget *arg1 = (CameraWidget *) 0 ;
4735 int *arg2 = (int *) 0 ;
4736 void *argp1 = 0 ;
4737 int res1 = 0 ;
4738 int temp2 ;
4739 int res2 = SWIG_TMPOBJ ;
4740 PyObject * obj0 = 0 ;
4741 int result;
4742
4743 arg2 = &temp2;
4744 if (!PyArg_UnpackTuple(args, "gp_widget_get_value", 1, 1, &obj0)) SWIG_fail;
4745 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4746 if (!SWIG_IsOK(res1)) {
4747 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_value" "', argument " "1"" of type '" "CameraWidget *""'");
4748 }
4749 arg1 = (CameraWidget *)(argp1);
4750 result = (int)gp_widget_get_value(arg1,arg2);
4751 resultobj = SWIG_From_int((int)(result));
4752 if (SWIG_IsTmpObj(res2)) {
4753 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
4754 } else {
4755 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4756 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
4757 }
4758 return resultobj;
4759 fail:
4760 return NULL;
4761 }
4762
4763
_wrap_gp_widget_get_value(PyObject * self,PyObject * args)4764 SWIGINTERN PyObject *_wrap_gp_widget_get_value(PyObject *self, PyObject *args) {
4765 Py_ssize_t argc;
4766 PyObject *argv[2] = {
4767 0
4768 };
4769 Py_ssize_t ii;
4770
4771 if (!PyTuple_Check(args)) SWIG_fail;
4772 argc = PyObject_Length(args);
4773 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
4774 argv[ii] = PyTuple_GET_ITEM(args,ii);
4775 }
4776 if (argc == 1) {
4777 int _v = 0;
4778 {
4779 {
4780 CameraWidget *widget;
4781 CameraWidgetType type;
4782 int error;
4783
4784 _v = 0;
4785 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
4786 if (SWIG_IsOK(error)) {
4787 error = gp_widget_get_type(widget, &type);
4788 if (error >= 0) {
4789 _v = ((type == GP_WIDGET_DATE) || (type == GP_WIDGET_TOGGLE)) ? 1 : 0;
4790 }
4791 }
4792 }
4793 }
4794 if (!_v) goto check_1;
4795 return _wrap_gp_widget_get_value__SWIG_2(self, args);
4796 }
4797 check_1:
4798
4799 if (argc == 1) {
4800 int _v = 0;
4801 {
4802 {
4803 CameraWidget *widget;
4804 CameraWidgetType type;
4805 int error;
4806
4807 _v = 0;
4808 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
4809 if (SWIG_IsOK(error)) {
4810 error = gp_widget_get_type(widget, &type);
4811 if (error >= 0) {
4812 _v = (type == GP_WIDGET_RANGE) ? 1 : 0;
4813 }
4814 }
4815 }
4816 }
4817 if (!_v) goto check_2;
4818 return _wrap_gp_widget_get_value__SWIG_1(self, args);
4819 }
4820 check_2:
4821
4822 if (argc == 1) {
4823 {
4824 PyObject *retobj = _wrap_gp_widget_get_value__SWIG_0(self, args);
4825 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
4826 SWIG_fail;
4827 }
4828 }
4829
4830 fail:
4831 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'gp_widget_get_value'.\n"
4832 " Possible C/C++ prototypes are:\n"
4833 " gp_widget_get_value(CameraWidget *,char **)\n"
4834 " gp_widget_get_value(CameraWidget *,float *)\n"
4835 " gp_widget_get_value(CameraWidget *,int *)\n");
4836 return 0;
4837 }
4838
4839
_wrap_CameraWidgetChildIter___next__(PyObject * self,PyObject * args)4840 SWIGINTERN PyObject *_wrap_CameraWidgetChildIter___next__(PyObject *self, PyObject *args) {
4841 PyObject *resultobj = 0;
4842 struct CameraWidgetChildIter *arg1 = (struct CameraWidgetChildIter *) 0 ;
4843 void *argp1 = 0 ;
4844 int res1 = 0 ;
4845 CameraWidget *result = 0 ;
4846
4847 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidgetChildIter___next__ takes no arguments");
4848 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraWidgetChildIter, 0 | 0 );
4849 if (!SWIG_IsOK(res1)) {
4850 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidgetChildIter___next__" "', argument " "1"" of type '" "struct CameraWidgetChildIter *""'");
4851 }
4852 arg1 = (struct CameraWidgetChildIter *)(argp1);
4853 {
4854 result = (CameraWidget *)CameraWidgetChildIter___next__(arg1);
4855 if (PyErr_Occurred() != NULL) SWIG_fail;
4856 }
4857 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CameraWidget, 0 | 0 );
4858 return resultobj;
4859 fail:
4860 return NULL;
4861 }
4862
4863
_wrap_delete_CameraWidgetChildIter(PyObject * self,PyObject * args)4864 SWIGINTERN PyObject *_wrap_delete_CameraWidgetChildIter(PyObject *self, PyObject *args) {
4865 PyObject *resultobj = 0;
4866 struct CameraWidgetChildIter *arg1 = (struct CameraWidgetChildIter *) 0 ;
4867 void *argp1 = 0 ;
4868 int res1 = 0 ;
4869
4870 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraWidgetChildIter takes no arguments");
4871 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraWidgetChildIter, SWIG_POINTER_DISOWN | 0 );
4872 if (!SWIG_IsOK(res1)) {
4873 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraWidgetChildIter" "', argument " "1"" of type '" "struct CameraWidgetChildIter *""'");
4874 }
4875 arg1 = (struct CameraWidgetChildIter *)(argp1);
4876 free((char *) arg1);
4877 resultobj = SWIG_Py_Void();
4878 return resultobj;
4879 fail:
4880 return NULL;
4881 }
4882
4883
4884 SWIGPY_ITERNEXTFUNC_CLOSURE(_wrap_CameraWidgetChildIter___next__) /* defines _wrap_CameraWidgetChildIter___next___iternextfunc_closure */
4885
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidgetChildIter)4886 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidgetChildIter) /* defines _wrap_delete_CameraWidgetChildIter_destructor_closure */
4887
4888 SWIGINTERN PyObject *_wrap_gp_widget_get_children(PyObject *self, PyObject *args) {
4889 PyObject *resultobj = 0;
4890 CameraWidget *arg1 = (CameraWidget *) 0 ;
4891 CameraWidgetChildIter *arg2 = (CameraWidgetChildIter *) 0 ;
4892 void *argp1 = 0 ;
4893 int res1 = 0 ;
4894 PyObject * obj0 = 0 ;
4895 int result;
4896
4897 {
4898 arg2 = (CameraWidgetChildIter *)calloc(1, sizeof(CameraWidgetChildIter));
4899 if (arg2 == NULL) {
4900 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraWidgetChildIter");
4901 SWIG_fail;
4902 }
4903 }
4904 if (!PyArg_UnpackTuple(args, "gp_widget_get_children", 1, 1, &obj0)) SWIG_fail;
4905 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4906 if (!SWIG_IsOK(res1)) {
4907 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_children" "', argument " "1"" of type '" "CameraWidget *""'");
4908 }
4909 arg1 = (CameraWidget *)(argp1);
4910 result = (int)gp_widget_get_children(arg1,arg2);
4911 resultobj = SWIG_From_int((int)(result));
4912 {
4913 resultobj = SWIG_Python_AppendOutput(
4914 resultobj, SWIG_NewPointerObj(arg2, SWIGTYPE_p_CameraWidgetChildIter, SWIG_POINTER_OWN));
4915 arg2 = NULL;
4916 }
4917 {
4918 free(arg2);
4919 }
4920 return resultobj;
4921 fail:
4922 {
4923 free(arg2);
4924 }
4925 return NULL;
4926 }
4927
4928
_wrap_CameraWidgetChoiceIter___next__(PyObject * self,PyObject * args)4929 SWIGINTERN PyObject *_wrap_CameraWidgetChoiceIter___next__(PyObject *self, PyObject *args) {
4930 PyObject *resultobj = 0;
4931 struct CameraWidgetChoiceIter *arg1 = (struct CameraWidgetChoiceIter *) 0 ;
4932 void *argp1 = 0 ;
4933 int res1 = 0 ;
4934 char *result = 0 ;
4935
4936 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidgetChoiceIter___next__ takes no arguments");
4937 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraWidgetChoiceIter, 0 | 0 );
4938 if (!SWIG_IsOK(res1)) {
4939 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidgetChoiceIter___next__" "', argument " "1"" of type '" "struct CameraWidgetChoiceIter *""'");
4940 }
4941 arg1 = (struct CameraWidgetChoiceIter *)(argp1);
4942 {
4943 result = (char *)CameraWidgetChoiceIter___next__(arg1);
4944 if (PyErr_Occurred() != NULL) SWIG_fail;
4945 }
4946 resultobj = SWIG_FromCharPtr((const char *)result);
4947 return resultobj;
4948 fail:
4949 return NULL;
4950 }
4951
4952
_wrap_delete_CameraWidgetChoiceIter(PyObject * self,PyObject * args)4953 SWIGINTERN PyObject *_wrap_delete_CameraWidgetChoiceIter(PyObject *self, PyObject *args) {
4954 PyObject *resultobj = 0;
4955 struct CameraWidgetChoiceIter *arg1 = (struct CameraWidgetChoiceIter *) 0 ;
4956 void *argp1 = 0 ;
4957 int res1 = 0 ;
4958
4959 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraWidgetChoiceIter takes no arguments");
4960 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraWidgetChoiceIter, SWIG_POINTER_DISOWN | 0 );
4961 if (!SWIG_IsOK(res1)) {
4962 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraWidgetChoiceIter" "', argument " "1"" of type '" "struct CameraWidgetChoiceIter *""'");
4963 }
4964 arg1 = (struct CameraWidgetChoiceIter *)(argp1);
4965 free((char *) arg1);
4966 resultobj = SWIG_Py_Void();
4967 return resultobj;
4968 fail:
4969 return NULL;
4970 }
4971
4972
4973 SWIGPY_ITERNEXTFUNC_CLOSURE(_wrap_CameraWidgetChoiceIter___next__) /* defines _wrap_CameraWidgetChoiceIter___next___iternextfunc_closure */
4974
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidgetChoiceIter)4975 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidgetChoiceIter) /* defines _wrap_delete_CameraWidgetChoiceIter_destructor_closure */
4976
4977 SWIGINTERN PyObject *_wrap_gp_widget_get_choices(PyObject *self, PyObject *args) {
4978 PyObject *resultobj = 0;
4979 CameraWidget *arg1 = (CameraWidget *) 0 ;
4980 CameraWidgetChoiceIter *arg2 = (CameraWidgetChoiceIter *) 0 ;
4981 void *argp1 = 0 ;
4982 int res1 = 0 ;
4983 PyObject * obj0 = 0 ;
4984 int result;
4985
4986 {
4987 arg2 = (CameraWidgetChoiceIter *)calloc(1, sizeof(CameraWidgetChoiceIter));
4988 if (arg2 == NULL) {
4989 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraWidgetChoiceIter");
4990 SWIG_fail;
4991 }
4992 }
4993 if (!PyArg_UnpackTuple(args, "gp_widget_get_choices", 1, 1, &obj0)) SWIG_fail;
4994 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
4995 if (!SWIG_IsOK(res1)) {
4996 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_choices" "', argument " "1"" of type '" "CameraWidget *""'");
4997 }
4998 arg1 = (CameraWidget *)(argp1);
4999 result = (int)gp_widget_get_choices(arg1,arg2);
5000 resultobj = SWIG_From_int((int)(result));
5001 {
5002 resultobj = SWIG_Python_AppendOutput(
5003 resultobj, SWIG_NewPointerObj(arg2, SWIGTYPE_p_CameraWidgetChoiceIter, SWIG_POINTER_OWN));
5004 arg2 = NULL;
5005 }
5006 {
5007 free(arg2);
5008 }
5009 return resultobj;
5010 fail:
5011 {
5012 free(arg2);
5013 }
5014 return NULL;
5015 }
5016
5017
_wrap_CameraWidget_count_children(PyObject * self,PyObject * args)5018 SWIGINTERN PyObject *_wrap_CameraWidget_count_children(PyObject *self, PyObject *args) {
5019 PyObject *resultobj = 0;
5020 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5021 void *argp1 = 0 ;
5022 int res1 = 0 ;
5023 int result;
5024
5025 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_count_children takes no arguments");
5026 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5027 if (!SWIG_IsOK(res1)) {
5028 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_count_children" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5029 }
5030 arg1 = (struct _CameraWidget *)(argp1);
5031 {
5032 result = (int)_CameraWidget_count_children(arg1);
5033 if (PyErr_Occurred()) SWIG_fail;
5034 }
5035 resultobj = SWIG_From_int((int)(result));
5036 return resultobj;
5037 fail:
5038 return NULL;
5039 }
5040
5041
_wrap_CameraWidget_get_child(PyObject * self,PyObject * args)5042 SWIGINTERN PyObject *_wrap_CameraWidget_get_child(PyObject *self, PyObject *args) {
5043 PyObject *resultobj = 0;
5044 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5045 int arg2 ;
5046 CameraWidget **arg3 = (CameraWidget **) 0 ;
5047 void *argp1 = 0 ;
5048 int res1 = 0 ;
5049 int val2 ;
5050 int ecode2 = 0 ;
5051 CameraWidget *temp3 ;
5052 PyObject * obj1 = 0 ;
5053
5054 {
5055 temp3 = NULL;
5056 arg3 = &temp3;
5057 }
5058 if (!PyArg_UnpackTuple(args, "CameraWidget_get_child", 1, 1, &obj1)) SWIG_fail;
5059 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5060 if (!SWIG_IsOK(res1)) {
5061 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_child" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5062 }
5063 arg1 = (struct _CameraWidget *)(argp1);
5064 ecode2 = SWIG_AsVal_int(obj1, &val2);
5065 if (!SWIG_IsOK(ecode2)) {
5066 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_get_child" "', argument " "2"" of type '" "int""'");
5067 }
5068 arg2 = (int)(val2);
5069 {
5070 _CameraWidget_get_child(arg1,arg2,arg3);
5071 if (PyErr_Occurred()) SWIG_fail;
5072 }
5073 resultobj = SWIG_Py_Void();
5074 {
5075 if (*arg3 != NULL) {
5076 // Increment refcount on root widget
5077 CameraWidget *root;
5078 int error = gp_widget_get_root(*arg3, &root);
5079 if (error < 0) {
5080 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5081 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5082 /*@SWIG@*/;
5083 SWIG_fail;
5084 }
5085 error = gp_widget_ref(root);
5086 if (error < 0) {
5087 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5088 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5089 /*@SWIG@*/;
5090 SWIG_fail;
5091 }
5092 }
5093 // Append result to output object
5094 resultobj = SWIG_Python_AppendOutput(
5095 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5096 }
5097 return resultobj;
5098 fail:
5099 return NULL;
5100 }
5101
5102
_wrap_CameraWidget_get_children(PyObject * self,PyObject * args)5103 SWIGINTERN PyObject *_wrap_CameraWidget_get_children(PyObject *self, PyObject *args) {
5104 PyObject *resultobj = 0;
5105 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5106 CameraWidgetChildIter *arg2 = (CameraWidgetChildIter *) 0 ;
5107 void *argp1 = 0 ;
5108 int res1 = 0 ;
5109
5110 {
5111 arg2 = (CameraWidgetChildIter *)calloc(1, sizeof(CameraWidgetChildIter));
5112 if (arg2 == NULL) {
5113 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraWidgetChildIter");
5114 SWIG_fail;
5115 }
5116 }
5117 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_children takes no arguments");
5118 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5119 if (!SWIG_IsOK(res1)) {
5120 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_children" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5121 }
5122 arg1 = (struct _CameraWidget *)(argp1);
5123 {
5124 _CameraWidget_get_children(arg1,arg2);
5125 if (PyErr_Occurred()) SWIG_fail;
5126 }
5127 resultobj = SWIG_Py_Void();
5128 {
5129 resultobj = SWIG_Python_AppendOutput(
5130 resultobj, SWIG_NewPointerObj(arg2, SWIGTYPE_p_CameraWidgetChildIter, SWIG_POINTER_OWN));
5131 arg2 = NULL;
5132 }
5133 {
5134 free(arg2);
5135 }
5136 return resultobj;
5137 fail:
5138 {
5139 free(arg2);
5140 }
5141 return NULL;
5142 }
5143
5144
_wrap_CameraWidget_get_child_by_label(PyObject * self,PyObject * args)5145 SWIGINTERN PyObject *_wrap_CameraWidget_get_child_by_label(PyObject *self, PyObject *args) {
5146 PyObject *resultobj = 0;
5147 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5148 char *arg2 = (char *) 0 ;
5149 CameraWidget **arg3 = (CameraWidget **) 0 ;
5150 void *argp1 = 0 ;
5151 int res1 = 0 ;
5152 int res2 ;
5153 char *buf2 = 0 ;
5154 int alloc2 = 0 ;
5155 CameraWidget *temp3 ;
5156 PyObject * obj1 = 0 ;
5157
5158 {
5159 temp3 = NULL;
5160 arg3 = &temp3;
5161 }
5162 if (!PyArg_UnpackTuple(args, "CameraWidget_get_child_by_label", 1, 1, &obj1)) SWIG_fail;
5163 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5164 if (!SWIG_IsOK(res1)) {
5165 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_child_by_label" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5166 }
5167 arg1 = (struct _CameraWidget *)(argp1);
5168 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5169 if (!SWIG_IsOK(res2)) {
5170 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_get_child_by_label" "', argument " "2"" of type '" "char const *""'");
5171 }
5172 arg2 = (char *)(buf2);
5173 {
5174 _CameraWidget_get_child_by_label(arg1,(char const *)arg2,arg3);
5175 if (PyErr_Occurred()) SWIG_fail;
5176 }
5177 resultobj = SWIG_Py_Void();
5178 {
5179 if (*arg3 != NULL) {
5180 // Increment refcount on root widget
5181 CameraWidget *root;
5182 int error = gp_widget_get_root(*arg3, &root);
5183 if (error < 0) {
5184 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5185 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5186 /*@SWIG@*/;
5187 SWIG_fail;
5188 }
5189 error = gp_widget_ref(root);
5190 if (error < 0) {
5191 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5192 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5193 /*@SWIG@*/;
5194 SWIG_fail;
5195 }
5196 }
5197 // Append result to output object
5198 resultobj = SWIG_Python_AppendOutput(
5199 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5200 }
5201 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5202 return resultobj;
5203 fail:
5204 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5205 return NULL;
5206 }
5207
5208
_wrap_CameraWidget_get_child_by_id(PyObject * self,PyObject * args)5209 SWIGINTERN PyObject *_wrap_CameraWidget_get_child_by_id(PyObject *self, PyObject *args) {
5210 PyObject *resultobj = 0;
5211 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5212 int arg2 ;
5213 CameraWidget **arg3 = (CameraWidget **) 0 ;
5214 void *argp1 = 0 ;
5215 int res1 = 0 ;
5216 int val2 ;
5217 int ecode2 = 0 ;
5218 CameraWidget *temp3 ;
5219 PyObject * obj1 = 0 ;
5220
5221 {
5222 temp3 = NULL;
5223 arg3 = &temp3;
5224 }
5225 if (!PyArg_UnpackTuple(args, "CameraWidget_get_child_by_id", 1, 1, &obj1)) SWIG_fail;
5226 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5227 if (!SWIG_IsOK(res1)) {
5228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_child_by_id" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5229 }
5230 arg1 = (struct _CameraWidget *)(argp1);
5231 ecode2 = SWIG_AsVal_int(obj1, &val2);
5232 if (!SWIG_IsOK(ecode2)) {
5233 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_get_child_by_id" "', argument " "2"" of type '" "int""'");
5234 }
5235 arg2 = (int)(val2);
5236 {
5237 _CameraWidget_get_child_by_id(arg1,arg2,arg3);
5238 if (PyErr_Occurred()) SWIG_fail;
5239 }
5240 resultobj = SWIG_Py_Void();
5241 {
5242 if (*arg3 != NULL) {
5243 // Increment refcount on root widget
5244 CameraWidget *root;
5245 int error = gp_widget_get_root(*arg3, &root);
5246 if (error < 0) {
5247 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5248 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5249 /*@SWIG@*/;
5250 SWIG_fail;
5251 }
5252 error = gp_widget_ref(root);
5253 if (error < 0) {
5254 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5255 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5256 /*@SWIG@*/;
5257 SWIG_fail;
5258 }
5259 }
5260 // Append result to output object
5261 resultobj = SWIG_Python_AppendOutput(
5262 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5263 }
5264 return resultobj;
5265 fail:
5266 return NULL;
5267 }
5268
5269
_wrap_CameraWidget_get_child_by_name(PyObject * self,PyObject * args)5270 SWIGINTERN PyObject *_wrap_CameraWidget_get_child_by_name(PyObject *self, PyObject *args) {
5271 PyObject *resultobj = 0;
5272 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5273 char *arg2 = (char *) 0 ;
5274 CameraWidget **arg3 = (CameraWidget **) 0 ;
5275 void *argp1 = 0 ;
5276 int res1 = 0 ;
5277 int res2 ;
5278 char *buf2 = 0 ;
5279 int alloc2 = 0 ;
5280 CameraWidget *temp3 ;
5281 PyObject * obj1 = 0 ;
5282
5283 {
5284 temp3 = NULL;
5285 arg3 = &temp3;
5286 }
5287 if (!PyArg_UnpackTuple(args, "CameraWidget_get_child_by_name", 1, 1, &obj1)) SWIG_fail;
5288 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5289 if (!SWIG_IsOK(res1)) {
5290 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_child_by_name" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5291 }
5292 arg1 = (struct _CameraWidget *)(argp1);
5293 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5294 if (!SWIG_IsOK(res2)) {
5295 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_get_child_by_name" "', argument " "2"" of type '" "char const *""'");
5296 }
5297 arg2 = (char *)(buf2);
5298 {
5299 _CameraWidget_get_child_by_name(arg1,(char const *)arg2,arg3);
5300 if (PyErr_Occurred()) SWIG_fail;
5301 }
5302 resultobj = SWIG_Py_Void();
5303 {
5304 if (*arg3 != NULL) {
5305 // Increment refcount on root widget
5306 CameraWidget *root;
5307 int error = gp_widget_get_root(*arg3, &root);
5308 if (error < 0) {
5309 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5310 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5311 /*@SWIG@*/;
5312 SWIG_fail;
5313 }
5314 error = gp_widget_ref(root);
5315 if (error < 0) {
5316 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5317 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5318 /*@SWIG@*/;
5319 SWIG_fail;
5320 }
5321 }
5322 // Append result to output object
5323 resultobj = SWIG_Python_AppendOutput(
5324 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5325 }
5326 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5327 return resultobj;
5328 fail:
5329 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5330 return NULL;
5331 }
5332
5333
_wrap_CameraWidget_get_root(PyObject * self,PyObject * args)5334 SWIGINTERN PyObject *_wrap_CameraWidget_get_root(PyObject *self, PyObject *args) {
5335 PyObject *resultobj = 0;
5336 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5337 CameraWidget **arg2 = (CameraWidget **) 0 ;
5338 void *argp1 = 0 ;
5339 int res1 = 0 ;
5340 CameraWidget *temp2 ;
5341
5342 {
5343 temp2 = NULL;
5344 arg2 = &temp2;
5345 }
5346 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_root takes no arguments");
5347 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5348 if (!SWIG_IsOK(res1)) {
5349 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_root" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5350 }
5351 arg1 = (struct _CameraWidget *)(argp1);
5352 {
5353 _CameraWidget_get_root(arg1,arg2);
5354 if (PyErr_Occurred()) SWIG_fail;
5355 }
5356 resultobj = SWIG_Py_Void();
5357 {
5358 if (*arg2 != NULL) {
5359 // Increment refcount on root widget
5360 CameraWidget *root;
5361 int error = gp_widget_get_root(*arg2, &root);
5362 if (error < 0) {
5363 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5364 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5365 /*@SWIG@*/;
5366 SWIG_fail;
5367 }
5368 error = gp_widget_ref(root);
5369 if (error < 0) {
5370 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5371 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5372 /*@SWIG@*/;
5373 SWIG_fail;
5374 }
5375 }
5376 // Append result to output object
5377 resultobj = SWIG_Python_AppendOutput(
5378 resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5379 }
5380 return resultobj;
5381 fail:
5382 return NULL;
5383 }
5384
5385
_wrap_CameraWidget_get_parent(PyObject * self,PyObject * args)5386 SWIGINTERN PyObject *_wrap_CameraWidget_get_parent(PyObject *self, PyObject *args) {
5387 PyObject *resultobj = 0;
5388 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5389 CameraWidget **arg2 = (CameraWidget **) 0 ;
5390 void *argp1 = 0 ;
5391 int res1 = 0 ;
5392 CameraWidget *temp2 ;
5393
5394 {
5395 temp2 = NULL;
5396 arg2 = &temp2;
5397 }
5398 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_parent takes no arguments");
5399 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5400 if (!SWIG_IsOK(res1)) {
5401 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_parent" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5402 }
5403 arg1 = (struct _CameraWidget *)(argp1);
5404 {
5405 _CameraWidget_get_parent(arg1,arg2);
5406 if (PyErr_Occurred()) SWIG_fail;
5407 }
5408 resultobj = SWIG_Py_Void();
5409 {
5410 if (*arg2 != NULL) {
5411 // Increment refcount on root widget
5412 CameraWidget *root;
5413 int error = gp_widget_get_root(*arg2, &root);
5414 if (error < 0) {
5415 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5416 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5417 /*@SWIG@*/;
5418 SWIG_fail;
5419 }
5420 error = gp_widget_ref(root);
5421 if (error < 0) {
5422 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5423 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5424 /*@SWIG@*/;
5425 SWIG_fail;
5426 }
5427 }
5428 // Append result to output object
5429 resultobj = SWIG_Python_AppendOutput(
5430 resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
5431 }
5432 return resultobj;
5433 fail:
5434 return NULL;
5435 }
5436
5437
_wrap_CameraWidget_set_value__SWIG_0(PyObject * self,PyObject * args)5438 SWIGINTERN PyObject *_wrap_CameraWidget_set_value__SWIG_0(PyObject *self, PyObject *args) {
5439 PyObject *resultobj = 0;
5440 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5441 char *arg2 = (char *) 0 ;
5442 void *argp1 = 0 ;
5443 int res1 = 0 ;
5444 int res2 ;
5445 char *buf2 = 0 ;
5446 int alloc2 = 0 ;
5447 PyObject * obj1 = 0 ;
5448
5449 if (!PyArg_UnpackTuple(args, "CameraWidget_set_value", 1, 1, &obj1)) SWIG_fail;
5450 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5451 if (!SWIG_IsOK(res1)) {
5452 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5453 }
5454 arg1 = (struct _CameraWidget *)(argp1);
5455 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5456 if (!SWIG_IsOK(res2)) {
5457 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_set_value" "', argument " "2"" of type '" "char const *""'");
5458 }
5459 arg2 = (char *)(buf2);
5460 {
5461 _CameraWidget_set_value__SWIG_0(arg1,(char const *)arg2);
5462 if (PyErr_Occurred()) SWIG_fail;
5463 }
5464 resultobj = SWIG_Py_Void();
5465 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5466 return resultobj;
5467 fail:
5468 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5469 return NULL;
5470 }
5471
5472
_wrap_CameraWidget_set_value__SWIG_1(PyObject * self,PyObject * args)5473 SWIGINTERN PyObject *_wrap_CameraWidget_set_value__SWIG_1(PyObject *self, PyObject *args) {
5474 PyObject *resultobj = 0;
5475 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5476 float *arg2 = (float *) 0 ;
5477 void *argp1 = 0 ;
5478 int res1 = 0 ;
5479 float temp2 ;
5480 int res2 = 0 ;
5481 PyObject * obj1 = 0 ;
5482
5483 if (!PyArg_UnpackTuple(args, "CameraWidget_set_value", 1, 1, &obj1)) SWIG_fail;
5484 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5485 if (!SWIG_IsOK(res1)) {
5486 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5487 }
5488 arg1 = (struct _CameraWidget *)(argp1);
5489 if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_float,0))))) {
5490 float val;
5491 int ecode = SWIG_AsVal_float(obj1, &val);
5492 if (!SWIG_IsOK(ecode)) {
5493 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "CameraWidget_set_value" "', argument " "2"" of type '" "float""'");
5494 }
5495 temp2 = (float)(val);
5496 arg2 = &temp2;
5497 res2 = SWIG_AddTmpMask(ecode);
5498 }
5499 {
5500 _CameraWidget_set_value__SWIG_1(arg1,(float const *)arg2);
5501 if (PyErr_Occurred()) SWIG_fail;
5502 }
5503 resultobj = SWIG_Py_Void();
5504 {
5505
5506 }
5507 if (SWIG_IsNewObj(res2)) free((char*)arg2);
5508 return resultobj;
5509 fail:
5510 if (SWIG_IsNewObj(res2)) free((char*)arg2);
5511 return NULL;
5512 }
5513
5514
_wrap_CameraWidget_set_value__SWIG_2(PyObject * self,PyObject * args)5515 SWIGINTERN PyObject *_wrap_CameraWidget_set_value__SWIG_2(PyObject *self, PyObject *args) {
5516 PyObject *resultobj = 0;
5517 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5518 int *arg2 = (int *) 0 ;
5519 void *argp1 = 0 ;
5520 int res1 = 0 ;
5521 int temp2 ;
5522 int res2 = 0 ;
5523 PyObject * obj1 = 0 ;
5524
5525 if (!PyArg_UnpackTuple(args, "CameraWidget_set_value", 1, 1, &obj1)) SWIG_fail;
5526 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5527 if (!SWIG_IsOK(res1)) {
5528 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5529 }
5530 arg1 = (struct _CameraWidget *)(argp1);
5531 if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
5532 int val;
5533 int ecode = SWIG_AsVal_int(obj1, &val);
5534 if (!SWIG_IsOK(ecode)) {
5535 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "CameraWidget_set_value" "', argument " "2"" of type '" "int""'");
5536 }
5537 temp2 = (int)(val);
5538 arg2 = &temp2;
5539 res2 = SWIG_AddTmpMask(ecode);
5540 }
5541 {
5542 _CameraWidget_set_value__SWIG_2(arg1,(int const *)arg2);
5543 if (PyErr_Occurred()) SWIG_fail;
5544 }
5545 resultobj = SWIG_Py_Void();
5546 {
5547
5548 }
5549 if (SWIG_IsNewObj(res2)) free((char*)arg2);
5550 return resultobj;
5551 fail:
5552 if (SWIG_IsNewObj(res2)) free((char*)arg2);
5553 return NULL;
5554 }
5555
5556
_wrap_CameraWidget_set_value(PyObject * self,PyObject * args)5557 SWIGINTERN PyObject *_wrap_CameraWidget_set_value(PyObject *self, PyObject *args) {
5558 Py_ssize_t argc;
5559 PyObject *argv[3] = {
5560 0
5561 };
5562 Py_ssize_t ii;
5563
5564 if (!PyTuple_Check(args)) SWIG_fail;
5565 argc = PyObject_Length(args);
5566 argv[0] = self;
5567 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
5568 argv[ii + 1] = PyTuple_GET_ITEM(args,ii);
5569 }
5570 argc++;
5571 if (argc == 2) {
5572 int _v = 0;
5573 {
5574 {
5575 CameraWidget *widget;
5576 CameraWidgetType type;
5577 int error;
5578
5579 _v = 0;
5580 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
5581 if (SWIG_IsOK(error)) {
5582 error = gp_widget_get_type(widget, &type);
5583 if (error >= 0) {
5584 _v = ((type == GP_WIDGET_DATE) || (type == GP_WIDGET_TOGGLE)) ? 1 : 0;
5585 }
5586 }
5587 }
5588 }
5589 if (!_v) goto check_1;
5590 return _wrap_CameraWidget_set_value__SWIG_2(self, args);
5591 }
5592 check_1:
5593
5594 if (argc == 2) {
5595 int _v = 0;
5596 {
5597 {
5598 CameraWidget *widget;
5599 CameraWidgetType type;
5600 int error;
5601
5602 _v = 0;
5603 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
5604 if (SWIG_IsOK(error)) {
5605 error = gp_widget_get_type(widget, &type);
5606 if (error >= 0) {
5607 _v = (type == GP_WIDGET_RANGE) ? 1 : 0;
5608 }
5609 }
5610 }
5611 }
5612 if (!_v) goto check_2;
5613 return _wrap_CameraWidget_set_value__SWIG_1(self, args);
5614 }
5615 check_2:
5616
5617 if (argc == 2) {
5618 {
5619 PyObject *retobj = _wrap_CameraWidget_set_value__SWIG_0(self, args);
5620 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
5621 SWIG_fail;
5622 }
5623 }
5624
5625 fail:
5626 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CameraWidget_set_value'.\n"
5627 " Possible C/C++ prototypes are:\n"
5628 " _CameraWidget::set_value(char const *)\n"
5629 " _CameraWidget::set_value(float const *)\n"
5630 " _CameraWidget::set_value(int const *)\n");
5631 return 0;
5632 }
5633
5634
_wrap_CameraWidget_get_value__SWIG_0(PyObject * self,PyObject * args)5635 SWIGINTERN PyObject *_wrap_CameraWidget_get_value__SWIG_0(PyObject *self, PyObject *args) {
5636 PyObject *resultobj = 0;
5637 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5638 char **arg2 = (char **) 0 ;
5639 void *argp1 = 0 ;
5640 int res1 = 0 ;
5641 char *temp2 ;
5642
5643 {
5644 temp2 = NULL;
5645 arg2 = &temp2;
5646 }
5647 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_value takes no arguments");
5648 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5649 if (!SWIG_IsOK(res1)) {
5650 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5651 }
5652 arg1 = (struct _CameraWidget *)(argp1);
5653 {
5654 _CameraWidget_get_value__SWIG_0(arg1,arg2);
5655 if (PyErr_Occurred()) SWIG_fail;
5656 }
5657 resultobj = SWIG_Py_Void();
5658 {
5659 if (*arg2) {
5660 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
5661 }
5662 else {
5663 Py_INCREF(Py_None);
5664 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
5665 }
5666 }
5667 return resultobj;
5668 fail:
5669 return NULL;
5670 }
5671
5672
_wrap_CameraWidget_get_value__SWIG_1(PyObject * self,PyObject * args)5673 SWIGINTERN PyObject *_wrap_CameraWidget_get_value__SWIG_1(PyObject *self, PyObject *args) {
5674 PyObject *resultobj = 0;
5675 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5676 float *arg2 = (float *) 0 ;
5677 void *argp1 = 0 ;
5678 int res1 = 0 ;
5679 float temp2 ;
5680 int res2 = SWIG_TMPOBJ ;
5681
5682 arg2 = &temp2;
5683 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_value takes no arguments");
5684 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5685 if (!SWIG_IsOK(res1)) {
5686 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5687 }
5688 arg1 = (struct _CameraWidget *)(argp1);
5689 {
5690 _CameraWidget_get_value__SWIG_1(arg1,arg2);
5691 if (PyErr_Occurred()) SWIG_fail;
5692 }
5693 resultobj = SWIG_Py_Void();
5694 if (SWIG_IsTmpObj(res2)) {
5695 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
5696 } else {
5697 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5698 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
5699 }
5700 return resultobj;
5701 fail:
5702 return NULL;
5703 }
5704
5705
_wrap_CameraWidget_get_value__SWIG_2(PyObject * self,PyObject * args)5706 SWIGINTERN PyObject *_wrap_CameraWidget_get_value__SWIG_2(PyObject *self, PyObject *args) {
5707 PyObject *resultobj = 0;
5708 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5709 int *arg2 = (int *) 0 ;
5710 void *argp1 = 0 ;
5711 int res1 = 0 ;
5712 int temp2 ;
5713 int res2 = SWIG_TMPOBJ ;
5714
5715 arg2 = &temp2;
5716 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_value takes no arguments");
5717 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5718 if (!SWIG_IsOK(res1)) {
5719 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_value" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5720 }
5721 arg1 = (struct _CameraWidget *)(argp1);
5722 {
5723 _CameraWidget_get_value__SWIG_2(arg1,arg2);
5724 if (PyErr_Occurred()) SWIG_fail;
5725 }
5726 resultobj = SWIG_Py_Void();
5727 if (SWIG_IsTmpObj(res2)) {
5728 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
5729 } else {
5730 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5731 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
5732 }
5733 return resultobj;
5734 fail:
5735 return NULL;
5736 }
5737
5738
_wrap_CameraWidget_get_value(PyObject * self,PyObject * args)5739 SWIGINTERN PyObject *_wrap_CameraWidget_get_value(PyObject *self, PyObject *args) {
5740 Py_ssize_t argc;
5741 PyObject *argv[2] = {
5742 0
5743 };
5744 Py_ssize_t ii;
5745
5746 argc = args ? PyObject_Length(args) : 0;
5747 argv[0] = self;
5748 for (ii = 0; (ii < 0) && (ii < argc); ii++) {
5749 argv[ii + 1] = PyTuple_GET_ITEM(args,ii);
5750 }
5751 argc++;
5752 if (argc == 1) {
5753 int _v = 0;
5754 {
5755 {
5756 CameraWidget *widget;
5757 CameraWidgetType type;
5758 int error;
5759
5760 _v = 0;
5761 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
5762 if (SWIG_IsOK(error)) {
5763 error = gp_widget_get_type(widget, &type);
5764 if (error >= 0) {
5765 _v = ((type == GP_WIDGET_DATE) || (type == GP_WIDGET_TOGGLE)) ? 1 : 0;
5766 }
5767 }
5768 }
5769 }
5770 if (!_v) goto check_1;
5771 return _wrap_CameraWidget_get_value__SWIG_2(self, args);
5772 }
5773 check_1:
5774
5775 if (argc == 1) {
5776 int _v = 0;
5777 {
5778 {
5779 CameraWidget *widget;
5780 CameraWidgetType type;
5781 int error;
5782
5783 _v = 0;
5784 error = SWIG_ConvertPtr(argv[0], (void **)&widget, SWIGTYPE_p__CameraWidget, 0);
5785 if (SWIG_IsOK(error)) {
5786 error = gp_widget_get_type(widget, &type);
5787 if (error >= 0) {
5788 _v = (type == GP_WIDGET_RANGE) ? 1 : 0;
5789 }
5790 }
5791 }
5792 }
5793 if (!_v) goto check_2;
5794 return _wrap_CameraWidget_get_value__SWIG_1(self, args);
5795 }
5796 check_2:
5797
5798 if (argc == 1) {
5799 {
5800 PyObject *retobj = _wrap_CameraWidget_get_value__SWIG_0(self, args);
5801 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
5802 SWIG_fail;
5803 }
5804 }
5805
5806 fail:
5807 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CameraWidget_get_value'.\n"
5808 " Possible C/C++ prototypes are:\n"
5809 " _CameraWidget::get_value(char **)\n"
5810 " _CameraWidget::get_value(float *)\n"
5811 " _CameraWidget::get_value(int *)\n");
5812 return 0;
5813 }
5814
5815
_wrap_CameraWidget_set_name(PyObject * self,PyObject * args)5816 SWIGINTERN PyObject *_wrap_CameraWidget_set_name(PyObject *self, PyObject *args) {
5817 PyObject *resultobj = 0;
5818 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5819 char *arg2 = (char *) 0 ;
5820 void *argp1 = 0 ;
5821 int res1 = 0 ;
5822 int res2 ;
5823 char *buf2 = 0 ;
5824 int alloc2 = 0 ;
5825 PyObject * obj1 = 0 ;
5826
5827 if (!PyArg_UnpackTuple(args, "CameraWidget_set_name", 1, 1, &obj1)) SWIG_fail;
5828 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5829 if (!SWIG_IsOK(res1)) {
5830 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_name" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5831 }
5832 arg1 = (struct _CameraWidget *)(argp1);
5833 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5834 if (!SWIG_IsOK(res2)) {
5835 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_set_name" "', argument " "2"" of type '" "char const *""'");
5836 }
5837 arg2 = (char *)(buf2);
5838 {
5839 _CameraWidget_set_name(arg1,(char const *)arg2);
5840 if (PyErr_Occurred()) SWIG_fail;
5841 }
5842 resultobj = SWIG_Py_Void();
5843 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5844 return resultobj;
5845 fail:
5846 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5847 return NULL;
5848 }
5849
5850
_wrap_CameraWidget_get_name(PyObject * self,PyObject * args)5851 SWIGINTERN PyObject *_wrap_CameraWidget_get_name(PyObject *self, PyObject *args) {
5852 PyObject *resultobj = 0;
5853 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5854 char **arg2 = (char **) 0 ;
5855 void *argp1 = 0 ;
5856 int res1 = 0 ;
5857 char *temp2 ;
5858
5859 {
5860 temp2 = NULL;
5861 arg2 = &temp2;
5862 }
5863 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_name takes no arguments");
5864 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5865 if (!SWIG_IsOK(res1)) {
5866 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_name" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5867 }
5868 arg1 = (struct _CameraWidget *)(argp1);
5869 {
5870 _CameraWidget_get_name(arg1,(char const **)arg2);
5871 if (PyErr_Occurred()) SWIG_fail;
5872 }
5873 resultobj = SWIG_Py_Void();
5874 {
5875 if (*arg2) {
5876 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
5877 }
5878 else {
5879 Py_INCREF(Py_None);
5880 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
5881 }
5882 }
5883 return resultobj;
5884 fail:
5885 return NULL;
5886 }
5887
5888
_wrap_CameraWidget_set_info(PyObject * self,PyObject * args)5889 SWIGINTERN PyObject *_wrap_CameraWidget_set_info(PyObject *self, PyObject *args) {
5890 PyObject *resultobj = 0;
5891 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5892 char *arg2 = (char *) 0 ;
5893 void *argp1 = 0 ;
5894 int res1 = 0 ;
5895 int res2 ;
5896 char *buf2 = 0 ;
5897 int alloc2 = 0 ;
5898 PyObject * obj1 = 0 ;
5899
5900 if (!PyArg_UnpackTuple(args, "CameraWidget_set_info", 1, 1, &obj1)) SWIG_fail;
5901 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5902 if (!SWIG_IsOK(res1)) {
5903 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_info" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5904 }
5905 arg1 = (struct _CameraWidget *)(argp1);
5906 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5907 if (!SWIG_IsOK(res2)) {
5908 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_set_info" "', argument " "2"" of type '" "char const *""'");
5909 }
5910 arg2 = (char *)(buf2);
5911 {
5912 _CameraWidget_set_info(arg1,(char const *)arg2);
5913 if (PyErr_Occurred()) SWIG_fail;
5914 }
5915 resultobj = SWIG_Py_Void();
5916 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5917 return resultobj;
5918 fail:
5919 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5920 return NULL;
5921 }
5922
5923
_wrap_CameraWidget_get_info(PyObject * self,PyObject * args)5924 SWIGINTERN PyObject *_wrap_CameraWidget_get_info(PyObject *self, PyObject *args) {
5925 PyObject *resultobj = 0;
5926 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5927 char **arg2 = (char **) 0 ;
5928 void *argp1 = 0 ;
5929 int res1 = 0 ;
5930 char *temp2 ;
5931
5932 {
5933 temp2 = NULL;
5934 arg2 = &temp2;
5935 }
5936 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_info takes no arguments");
5937 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5938 if (!SWIG_IsOK(res1)) {
5939 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_info" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5940 }
5941 arg1 = (struct _CameraWidget *)(argp1);
5942 {
5943 _CameraWidget_get_info(arg1,(char const **)arg2);
5944 if (PyErr_Occurred()) SWIG_fail;
5945 }
5946 resultobj = SWIG_Py_Void();
5947 {
5948 if (*arg2) {
5949 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
5950 }
5951 else {
5952 Py_INCREF(Py_None);
5953 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
5954 }
5955 }
5956 return resultobj;
5957 fail:
5958 return NULL;
5959 }
5960
5961
_wrap_CameraWidget_get_id(PyObject * self,PyObject * args)5962 SWIGINTERN PyObject *_wrap_CameraWidget_get_id(PyObject *self, PyObject *args) {
5963 PyObject *resultobj = 0;
5964 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5965 int *arg2 = (int *) 0 ;
5966 void *argp1 = 0 ;
5967 int res1 = 0 ;
5968 int temp2 ;
5969 int res2 = SWIG_TMPOBJ ;
5970
5971 arg2 = &temp2;
5972 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_id takes no arguments");
5973 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
5974 if (!SWIG_IsOK(res1)) {
5975 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_id" "', argument " "1"" of type '" "struct _CameraWidget *""'");
5976 }
5977 arg1 = (struct _CameraWidget *)(argp1);
5978 {
5979 _CameraWidget_get_id(arg1,arg2);
5980 if (PyErr_Occurred()) SWIG_fail;
5981 }
5982 resultobj = SWIG_Py_Void();
5983 if (SWIG_IsTmpObj(res2)) {
5984 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
5985 } else {
5986 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5987 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
5988 }
5989 return resultobj;
5990 fail:
5991 return NULL;
5992 }
5993
5994
_wrap_CameraWidget_get_type(PyObject * self,PyObject * args)5995 SWIGINTERN PyObject *_wrap_CameraWidget_get_type(PyObject *self, PyObject *args) {
5996 PyObject *resultobj = 0;
5997 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
5998 CameraWidgetType *arg2 = (CameraWidgetType *) 0 ;
5999 void *argp1 = 0 ;
6000 int res1 = 0 ;
6001 CameraWidgetType temp2 ;
6002 int res2 = SWIG_TMPOBJ ;
6003
6004 arg2 = &temp2;
6005 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_type takes no arguments");
6006 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6007 if (!SWIG_IsOK(res1)) {
6008 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_type" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6009 }
6010 arg1 = (struct _CameraWidget *)(argp1);
6011 {
6012 _CameraWidget_get_type(arg1,arg2);
6013 if (PyErr_Occurred()) SWIG_fail;
6014 }
6015 resultobj = SWIG_Py_Void();
6016 if (SWIG_IsTmpObj(res2)) {
6017 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
6018 } else {
6019 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6020 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_CameraWidgetType, new_flags));
6021 }
6022 return resultobj;
6023 fail:
6024 return NULL;
6025 }
6026
6027
_wrap_CameraWidget_get_label(PyObject * self,PyObject * args)6028 SWIGINTERN PyObject *_wrap_CameraWidget_get_label(PyObject *self, PyObject *args) {
6029 PyObject *resultobj = 0;
6030 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6031 char **arg2 = (char **) 0 ;
6032 void *argp1 = 0 ;
6033 int res1 = 0 ;
6034 char *temp2 ;
6035
6036 {
6037 temp2 = NULL;
6038 arg2 = &temp2;
6039 }
6040 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_label takes no arguments");
6041 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6042 if (!SWIG_IsOK(res1)) {
6043 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_label" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6044 }
6045 arg1 = (struct _CameraWidget *)(argp1);
6046 {
6047 _CameraWidget_get_label(arg1,(char const **)arg2);
6048 if (PyErr_Occurred()) SWIG_fail;
6049 }
6050 resultobj = SWIG_Py_Void();
6051 {
6052 if (*arg2) {
6053 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
6054 }
6055 else {
6056 Py_INCREF(Py_None);
6057 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
6058 }
6059 }
6060 return resultobj;
6061 fail:
6062 return NULL;
6063 }
6064
6065
_wrap_CameraWidget_set_range(PyObject * self,PyObject * args)6066 SWIGINTERN PyObject *_wrap_CameraWidget_set_range(PyObject *self, PyObject *args) {
6067 PyObject *resultobj = 0;
6068 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6069 float arg2 ;
6070 float arg3 ;
6071 float arg4 ;
6072 void *argp1 = 0 ;
6073 int res1 = 0 ;
6074 float val2 ;
6075 int ecode2 = 0 ;
6076 float val3 ;
6077 int ecode3 = 0 ;
6078 float val4 ;
6079 int ecode4 = 0 ;
6080 PyObject * obj1 = 0 ;
6081 PyObject * obj2 = 0 ;
6082 PyObject * obj3 = 0 ;
6083
6084 if (!PyArg_UnpackTuple(args, "CameraWidget_set_range", 3, 3, &obj1, &obj2, &obj3)) SWIG_fail;
6085 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6086 if (!SWIG_IsOK(res1)) {
6087 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_range" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6088 }
6089 arg1 = (struct _CameraWidget *)(argp1);
6090 ecode2 = SWIG_AsVal_float(obj1, &val2);
6091 if (!SWIG_IsOK(ecode2)) {
6092 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_set_range" "', argument " "2"" of type '" "float""'");
6093 }
6094 arg2 = (float)(val2);
6095 ecode3 = SWIG_AsVal_float(obj2, &val3);
6096 if (!SWIG_IsOK(ecode3)) {
6097 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CameraWidget_set_range" "', argument " "3"" of type '" "float""'");
6098 }
6099 arg3 = (float)(val3);
6100 ecode4 = SWIG_AsVal_float(obj3, &val4);
6101 if (!SWIG_IsOK(ecode4)) {
6102 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CameraWidget_set_range" "', argument " "4"" of type '" "float""'");
6103 }
6104 arg4 = (float)(val4);
6105 {
6106 _CameraWidget_set_range(arg1,arg2,arg3,arg4);
6107 if (PyErr_Occurred()) SWIG_fail;
6108 }
6109 resultobj = SWIG_Py_Void();
6110 return resultobj;
6111 fail:
6112 return NULL;
6113 }
6114
6115
_wrap_CameraWidget_get_range(PyObject * self,PyObject * args)6116 SWIGINTERN PyObject *_wrap_CameraWidget_get_range(PyObject *self, PyObject *args) {
6117 PyObject *resultobj = 0;
6118 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6119 float *arg2 = (float *) 0 ;
6120 float *arg3 = (float *) 0 ;
6121 float *arg4 = (float *) 0 ;
6122 void *argp1 = 0 ;
6123 int res1 = 0 ;
6124 float temp2 ;
6125 int res2 = SWIG_TMPOBJ ;
6126 float temp3 ;
6127 int res3 = SWIG_TMPOBJ ;
6128 float temp4 ;
6129 int res4 = SWIG_TMPOBJ ;
6130
6131 arg2 = &temp2;
6132 arg3 = &temp3;
6133 arg4 = &temp4;
6134 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_range takes no arguments");
6135 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6136 if (!SWIG_IsOK(res1)) {
6137 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_range" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6138 }
6139 arg1 = (struct _CameraWidget *)(argp1);
6140 {
6141 _CameraWidget_get_range(arg1,arg2,arg3,arg4);
6142 if (PyErr_Occurred()) SWIG_fail;
6143 }
6144 resultobj = SWIG_Py_Void();
6145 if (SWIG_IsTmpObj(res2)) {
6146 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
6147 } else {
6148 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6149 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
6150 }
6151 if (SWIG_IsTmpObj(res3)) {
6152 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg3)));
6153 } else {
6154 int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6155 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_float, new_flags));
6156 }
6157 if (SWIG_IsTmpObj(res4)) {
6158 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg4)));
6159 } else {
6160 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6161 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_float, new_flags));
6162 }
6163 return resultobj;
6164 fail:
6165 return NULL;
6166 }
6167
6168
_wrap_CameraWidget_add_choice(PyObject * self,PyObject * args)6169 SWIGINTERN PyObject *_wrap_CameraWidget_add_choice(PyObject *self, PyObject *args) {
6170 PyObject *resultobj = 0;
6171 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6172 char *arg2 = (char *) 0 ;
6173 void *argp1 = 0 ;
6174 int res1 = 0 ;
6175 int res2 ;
6176 char *buf2 = 0 ;
6177 int alloc2 = 0 ;
6178 PyObject * obj1 = 0 ;
6179
6180 if (!PyArg_UnpackTuple(args, "CameraWidget_add_choice", 1, 1, &obj1)) SWIG_fail;
6181 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6182 if (!SWIG_IsOK(res1)) {
6183 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_add_choice" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6184 }
6185 arg1 = (struct _CameraWidget *)(argp1);
6186 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6187 if (!SWIG_IsOK(res2)) {
6188 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraWidget_add_choice" "', argument " "2"" of type '" "char const *""'");
6189 }
6190 arg2 = (char *)(buf2);
6191 {
6192 _CameraWidget_add_choice(arg1,(char const *)arg2);
6193 if (PyErr_Occurred()) SWIG_fail;
6194 }
6195 resultobj = SWIG_Py_Void();
6196 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6197 return resultobj;
6198 fail:
6199 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6200 return NULL;
6201 }
6202
6203
_wrap_CameraWidget_count_choices(PyObject * self,PyObject * args)6204 SWIGINTERN PyObject *_wrap_CameraWidget_count_choices(PyObject *self, PyObject *args) {
6205 PyObject *resultobj = 0;
6206 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6207 void *argp1 = 0 ;
6208 int res1 = 0 ;
6209 int result;
6210
6211 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_count_choices takes no arguments");
6212 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6213 if (!SWIG_IsOK(res1)) {
6214 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_count_choices" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6215 }
6216 arg1 = (struct _CameraWidget *)(argp1);
6217 {
6218 result = (int)_CameraWidget_count_choices(arg1);
6219 if (PyErr_Occurred()) SWIG_fail;
6220 }
6221 resultobj = SWIG_From_int((int)(result));
6222 return resultobj;
6223 fail:
6224 return NULL;
6225 }
6226
6227
_wrap_CameraWidget_get_choices(PyObject * self,PyObject * args)6228 SWIGINTERN PyObject *_wrap_CameraWidget_get_choices(PyObject *self, PyObject *args) {
6229 PyObject *resultobj = 0;
6230 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6231 CameraWidgetChoiceIter *arg2 = (CameraWidgetChoiceIter *) 0 ;
6232 void *argp1 = 0 ;
6233 int res1 = 0 ;
6234
6235 {
6236 arg2 = (CameraWidgetChoiceIter *)calloc(1, sizeof(CameraWidgetChoiceIter));
6237 if (arg2 == NULL) {
6238 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraWidgetChoiceIter");
6239 SWIG_fail;
6240 }
6241 }
6242 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_choices takes no arguments");
6243 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6244 if (!SWIG_IsOK(res1)) {
6245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_choices" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6246 }
6247 arg1 = (struct _CameraWidget *)(argp1);
6248 {
6249 _CameraWidget_get_choices(arg1,arg2);
6250 if (PyErr_Occurred()) SWIG_fail;
6251 }
6252 resultobj = SWIG_Py_Void();
6253 {
6254 resultobj = SWIG_Python_AppendOutput(
6255 resultobj, SWIG_NewPointerObj(arg2, SWIGTYPE_p_CameraWidgetChoiceIter, SWIG_POINTER_OWN));
6256 arg2 = NULL;
6257 }
6258 {
6259 free(arg2);
6260 }
6261 return resultobj;
6262 fail:
6263 {
6264 free(arg2);
6265 }
6266 return NULL;
6267 }
6268
6269
_wrap_CameraWidget_get_choice(PyObject * self,PyObject * args)6270 SWIGINTERN PyObject *_wrap_CameraWidget_get_choice(PyObject *self, PyObject *args) {
6271 PyObject *resultobj = 0;
6272 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6273 int arg2 ;
6274 char **arg3 = (char **) 0 ;
6275 void *argp1 = 0 ;
6276 int res1 = 0 ;
6277 int val2 ;
6278 int ecode2 = 0 ;
6279 char *temp3 ;
6280 PyObject * obj1 = 0 ;
6281
6282 {
6283 temp3 = NULL;
6284 arg3 = &temp3;
6285 }
6286 if (!PyArg_UnpackTuple(args, "CameraWidget_get_choice", 1, 1, &obj1)) SWIG_fail;
6287 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6288 if (!SWIG_IsOK(res1)) {
6289 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_choice" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6290 }
6291 arg1 = (struct _CameraWidget *)(argp1);
6292 ecode2 = SWIG_AsVal_int(obj1, &val2);
6293 if (!SWIG_IsOK(ecode2)) {
6294 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_get_choice" "', argument " "2"" of type '" "int""'");
6295 }
6296 arg2 = (int)(val2);
6297 {
6298 _CameraWidget_get_choice(arg1,arg2,(char const **)arg3);
6299 if (PyErr_Occurred()) SWIG_fail;
6300 }
6301 resultobj = SWIG_Py_Void();
6302 {
6303 if (*arg3) {
6304 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
6305 }
6306 else {
6307 Py_INCREF(Py_None);
6308 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
6309 }
6310 }
6311 return resultobj;
6312 fail:
6313 return NULL;
6314 }
6315
6316
_wrap_CameraWidget_changed(PyObject * self,PyObject * args)6317 SWIGINTERN PyObject *_wrap_CameraWidget_changed(PyObject *self, PyObject *args) {
6318 PyObject *resultobj = 0;
6319 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6320 void *argp1 = 0 ;
6321 int res1 = 0 ;
6322 int result;
6323
6324 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_changed takes no arguments");
6325 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6326 if (!SWIG_IsOK(res1)) {
6327 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_changed" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6328 }
6329 arg1 = (struct _CameraWidget *)(argp1);
6330 {
6331 result = (int)_CameraWidget_changed(arg1);
6332 if (PyErr_Occurred()) SWIG_fail;
6333 }
6334 resultobj = SWIG_From_int((int)(result));
6335 return resultobj;
6336 fail:
6337 return NULL;
6338 }
6339
6340
_wrap_CameraWidget_set_changed(PyObject * self,PyObject * args)6341 SWIGINTERN PyObject *_wrap_CameraWidget_set_changed(PyObject *self, PyObject *args) {
6342 PyObject *resultobj = 0;
6343 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6344 int arg2 ;
6345 void *argp1 = 0 ;
6346 int res1 = 0 ;
6347 int val2 ;
6348 int ecode2 = 0 ;
6349 PyObject * obj1 = 0 ;
6350
6351 if (!PyArg_UnpackTuple(args, "CameraWidget_set_changed", 1, 1, &obj1)) SWIG_fail;
6352 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6353 if (!SWIG_IsOK(res1)) {
6354 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_changed" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6355 }
6356 arg1 = (struct _CameraWidget *)(argp1);
6357 ecode2 = SWIG_AsVal_int(obj1, &val2);
6358 if (!SWIG_IsOK(ecode2)) {
6359 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_set_changed" "', argument " "2"" of type '" "int""'");
6360 }
6361 arg2 = (int)(val2);
6362 {
6363 _CameraWidget_set_changed(arg1,arg2);
6364 if (PyErr_Occurred()) SWIG_fail;
6365 }
6366 resultobj = SWIG_Py_Void();
6367 return resultobj;
6368 fail:
6369 return NULL;
6370 }
6371
6372
_wrap_CameraWidget_set_readonly(PyObject * self,PyObject * args)6373 SWIGINTERN PyObject *_wrap_CameraWidget_set_readonly(PyObject *self, PyObject *args) {
6374 PyObject *resultobj = 0;
6375 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6376 int arg2 ;
6377 void *argp1 = 0 ;
6378 int res1 = 0 ;
6379 int val2 ;
6380 int ecode2 = 0 ;
6381 PyObject * obj1 = 0 ;
6382
6383 if (!PyArg_UnpackTuple(args, "CameraWidget_set_readonly", 1, 1, &obj1)) SWIG_fail;
6384 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6385 if (!SWIG_IsOK(res1)) {
6386 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_set_readonly" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6387 }
6388 arg1 = (struct _CameraWidget *)(argp1);
6389 ecode2 = SWIG_AsVal_int(obj1, &val2);
6390 if (!SWIG_IsOK(ecode2)) {
6391 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraWidget_set_readonly" "', argument " "2"" of type '" "int""'");
6392 }
6393 arg2 = (int)(val2);
6394 {
6395 _CameraWidget_set_readonly(arg1,arg2);
6396 if (PyErr_Occurred()) SWIG_fail;
6397 }
6398 resultobj = SWIG_Py_Void();
6399 return resultobj;
6400 fail:
6401 return NULL;
6402 }
6403
6404
_wrap_CameraWidget_get_readonly(PyObject * self,PyObject * args)6405 SWIGINTERN PyObject *_wrap_CameraWidget_get_readonly(PyObject *self, PyObject *args) {
6406 PyObject *resultobj = 0;
6407 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6408 int *arg2 = (int *) 0 ;
6409 void *argp1 = 0 ;
6410 int res1 = 0 ;
6411 int temp2 ;
6412 int res2 = SWIG_TMPOBJ ;
6413
6414 arg2 = &temp2;
6415 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraWidget_get_readonly takes no arguments");
6416 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6417 if (!SWIG_IsOK(res1)) {
6418 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraWidget_get_readonly" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6419 }
6420 arg1 = (struct _CameraWidget *)(argp1);
6421 {
6422 _CameraWidget_get_readonly(arg1,arg2);
6423 if (PyErr_Occurred()) SWIG_fail;
6424 }
6425 resultobj = SWIG_Py_Void();
6426 if (SWIG_IsTmpObj(res2)) {
6427 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
6428 } else {
6429 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6430 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
6431 }
6432 return resultobj;
6433 fail:
6434 return NULL;
6435 }
6436
6437
_wrap_delete_CameraWidget(PyObject * self,PyObject * args)6438 SWIGINTERN PyObject *_wrap_delete_CameraWidget(PyObject *self, PyObject *args) {
6439 PyObject *resultobj = 0;
6440 struct _CameraWidget *arg1 = (struct _CameraWidget *) 0 ;
6441 void *argp1 = 0 ;
6442 int res1 = 0 ;
6443
6444 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraWidget takes no arguments");
6445 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraWidget, SWIG_POINTER_DISOWN | 0 );
6446 if (!SWIG_IsOK(res1)) {
6447 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraWidget" "', argument " "1"" of type '" "struct _CameraWidget *""'");
6448 }
6449 arg1 = (struct _CameraWidget *)(argp1);
6450 {
6451 delete__CameraWidget(arg1);
6452 if (PyErr_Occurred() != NULL) SWIG_fail;
6453 }
6454 resultobj = SWIG_Py_Void();
6455 return resultobj;
6456 fail:
6457 return NULL;
6458 }
6459
6460
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidget)6461 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraWidget) /* defines _wrap_delete_CameraWidget_destructor_closure */
6462
6463 SWIGINTERN PyObject *_wrap_gp_widget_append(PyObject *self, PyObject *args) {
6464 PyObject *resultobj = 0;
6465 CameraWidget *arg1 = (CameraWidget *) 0 ;
6466 CameraWidget *arg2 = (CameraWidget *) 0 ;
6467 void *argp1 = 0 ;
6468 int res1 = 0 ;
6469 void *argp2 = 0 ;
6470 int res2 = 0 ;
6471 PyObject * obj0 = 0 ;
6472 PyObject * obj1 = 0 ;
6473 int result;
6474
6475 if (!PyArg_UnpackTuple(args, "gp_widget_append", 2, 2, &obj0, &obj1)) SWIG_fail;
6476 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6477 if (!SWIG_IsOK(res1)) {
6478 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_append" "', argument " "1"" of type '" "CameraWidget *""'");
6479 }
6480 arg1 = (CameraWidget *)(argp1);
6481 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__CameraWidget, 0 | 0 );
6482 if (!SWIG_IsOK(res2)) {
6483 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_append" "', argument " "2"" of type '" "CameraWidget *""'");
6484 }
6485 arg2 = (CameraWidget *)(argp2);
6486 result = (int)gp_widget_append(arg1,arg2);
6487 resultobj = SWIG_From_int((int)(result));
6488 return resultobj;
6489 fail:
6490 return NULL;
6491 }
6492
6493
_wrap_gp_widget_prepend(PyObject * self,PyObject * args)6494 SWIGINTERN PyObject *_wrap_gp_widget_prepend(PyObject *self, PyObject *args) {
6495 PyObject *resultobj = 0;
6496 CameraWidget *arg1 = (CameraWidget *) 0 ;
6497 CameraWidget *arg2 = (CameraWidget *) 0 ;
6498 void *argp1 = 0 ;
6499 int res1 = 0 ;
6500 void *argp2 = 0 ;
6501 int res2 = 0 ;
6502 PyObject * obj0 = 0 ;
6503 PyObject * obj1 = 0 ;
6504 int result;
6505
6506 if (!PyArg_UnpackTuple(args, "gp_widget_prepend", 2, 2, &obj0, &obj1)) SWIG_fail;
6507 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6508 if (!SWIG_IsOK(res1)) {
6509 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_prepend" "', argument " "1"" of type '" "CameraWidget *""'");
6510 }
6511 arg1 = (CameraWidget *)(argp1);
6512 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__CameraWidget, 0 | 0 );
6513 if (!SWIG_IsOK(res2)) {
6514 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_prepend" "', argument " "2"" of type '" "CameraWidget *""'");
6515 }
6516 arg2 = (CameraWidget *)(argp2);
6517 result = (int)gp_widget_prepend(arg1,arg2);
6518 resultobj = SWIG_From_int((int)(result));
6519 return resultobj;
6520 fail:
6521 return NULL;
6522 }
6523
6524
_wrap_gp_widget_count_children(PyObject * self,PyObject * args)6525 SWIGINTERN PyObject *_wrap_gp_widget_count_children(PyObject *self, PyObject *args) {
6526 PyObject *resultobj = 0;
6527 CameraWidget *arg1 = (CameraWidget *) 0 ;
6528 void *argp1 = 0 ;
6529 int res1 = 0 ;
6530 PyObject * obj0 = 0 ;
6531 int result;
6532
6533 if (!PyArg_UnpackTuple(args, "gp_widget_count_children", 1, 1, &obj0)) SWIG_fail;
6534 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6535 if (!SWIG_IsOK(res1)) {
6536 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_count_children" "', argument " "1"" of type '" "CameraWidget *""'");
6537 }
6538 arg1 = (CameraWidget *)(argp1);
6539 result = (int)gp_widget_count_children(arg1);
6540 resultobj = SWIG_From_int((int)(result));
6541 return resultobj;
6542 fail:
6543 return NULL;
6544 }
6545
6546
_wrap_gp_widget_get_child(PyObject * self,PyObject * args)6547 SWIGINTERN PyObject *_wrap_gp_widget_get_child(PyObject *self, PyObject *args) {
6548 PyObject *resultobj = 0;
6549 CameraWidget *arg1 = (CameraWidget *) 0 ;
6550 int arg2 ;
6551 CameraWidget **arg3 = (CameraWidget **) 0 ;
6552 void *argp1 = 0 ;
6553 int res1 = 0 ;
6554 int val2 ;
6555 int ecode2 = 0 ;
6556 CameraWidget *temp3 ;
6557 PyObject * obj0 = 0 ;
6558 PyObject * obj1 = 0 ;
6559 int result;
6560
6561 {
6562 temp3 = NULL;
6563 arg3 = &temp3;
6564 }
6565 if (!PyArg_UnpackTuple(args, "gp_widget_get_child", 2, 2, &obj0, &obj1)) SWIG_fail;
6566 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6567 if (!SWIG_IsOK(res1)) {
6568 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_child" "', argument " "1"" of type '" "CameraWidget *""'");
6569 }
6570 arg1 = (CameraWidget *)(argp1);
6571 ecode2 = SWIG_AsVal_int(obj1, &val2);
6572 if (!SWIG_IsOK(ecode2)) {
6573 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_get_child" "', argument " "2"" of type '" "int""'");
6574 }
6575 arg2 = (int)(val2);
6576 result = (int)gp_widget_get_child(arg1,arg2,arg3);
6577 resultobj = SWIG_From_int((int)(result));
6578 {
6579 if (*arg3 != NULL) {
6580 // Increment refcount on root widget
6581 CameraWidget *root;
6582 int error = gp_widget_get_root(*arg3, &root);
6583 if (error < 0) {
6584 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6585 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6586 /*@SWIG@*/;
6587 SWIG_fail;
6588 }
6589 error = gp_widget_ref(root);
6590 if (error < 0) {
6591 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6592 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6593 /*@SWIG@*/;
6594 SWIG_fail;
6595 }
6596 }
6597 // Append result to output object
6598 resultobj = SWIG_Python_AppendOutput(
6599 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6600 }
6601 return resultobj;
6602 fail:
6603 return NULL;
6604 }
6605
6606
_wrap_gp_widget_get_child_by_label(PyObject * self,PyObject * args)6607 SWIGINTERN PyObject *_wrap_gp_widget_get_child_by_label(PyObject *self, PyObject *args) {
6608 PyObject *resultobj = 0;
6609 CameraWidget *arg1 = (CameraWidget *) 0 ;
6610 char *arg2 = (char *) 0 ;
6611 CameraWidget **arg3 = (CameraWidget **) 0 ;
6612 void *argp1 = 0 ;
6613 int res1 = 0 ;
6614 int res2 ;
6615 char *buf2 = 0 ;
6616 int alloc2 = 0 ;
6617 CameraWidget *temp3 ;
6618 PyObject * obj0 = 0 ;
6619 PyObject * obj1 = 0 ;
6620 int result;
6621
6622 {
6623 temp3 = NULL;
6624 arg3 = &temp3;
6625 }
6626 if (!PyArg_UnpackTuple(args, "gp_widget_get_child_by_label", 2, 2, &obj0, &obj1)) SWIG_fail;
6627 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6628 if (!SWIG_IsOK(res1)) {
6629 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_child_by_label" "', argument " "1"" of type '" "CameraWidget *""'");
6630 }
6631 arg1 = (CameraWidget *)(argp1);
6632 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6633 if (!SWIG_IsOK(res2)) {
6634 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_get_child_by_label" "', argument " "2"" of type '" "char const *""'");
6635 }
6636 arg2 = (char *)(buf2);
6637 result = (int)gp_widget_get_child_by_label(arg1,(char const *)arg2,arg3);
6638 resultobj = SWIG_From_int((int)(result));
6639 {
6640 if (*arg3 != NULL) {
6641 // Increment refcount on root widget
6642 CameraWidget *root;
6643 int error = gp_widget_get_root(*arg3, &root);
6644 if (error < 0) {
6645 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6646 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6647 /*@SWIG@*/;
6648 SWIG_fail;
6649 }
6650 error = gp_widget_ref(root);
6651 if (error < 0) {
6652 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6653 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6654 /*@SWIG@*/;
6655 SWIG_fail;
6656 }
6657 }
6658 // Append result to output object
6659 resultobj = SWIG_Python_AppendOutput(
6660 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6661 }
6662 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6663 return resultobj;
6664 fail:
6665 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6666 return NULL;
6667 }
6668
6669
_wrap_gp_widget_get_child_by_id(PyObject * self,PyObject * args)6670 SWIGINTERN PyObject *_wrap_gp_widget_get_child_by_id(PyObject *self, PyObject *args) {
6671 PyObject *resultobj = 0;
6672 CameraWidget *arg1 = (CameraWidget *) 0 ;
6673 int arg2 ;
6674 CameraWidget **arg3 = (CameraWidget **) 0 ;
6675 void *argp1 = 0 ;
6676 int res1 = 0 ;
6677 int val2 ;
6678 int ecode2 = 0 ;
6679 CameraWidget *temp3 ;
6680 PyObject * obj0 = 0 ;
6681 PyObject * obj1 = 0 ;
6682 int result;
6683
6684 {
6685 temp3 = NULL;
6686 arg3 = &temp3;
6687 }
6688 if (!PyArg_UnpackTuple(args, "gp_widget_get_child_by_id", 2, 2, &obj0, &obj1)) SWIG_fail;
6689 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6690 if (!SWIG_IsOK(res1)) {
6691 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_child_by_id" "', argument " "1"" of type '" "CameraWidget *""'");
6692 }
6693 arg1 = (CameraWidget *)(argp1);
6694 ecode2 = SWIG_AsVal_int(obj1, &val2);
6695 if (!SWIG_IsOK(ecode2)) {
6696 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_get_child_by_id" "', argument " "2"" of type '" "int""'");
6697 }
6698 arg2 = (int)(val2);
6699 result = (int)gp_widget_get_child_by_id(arg1,arg2,arg3);
6700 resultobj = SWIG_From_int((int)(result));
6701 {
6702 if (*arg3 != NULL) {
6703 // Increment refcount on root widget
6704 CameraWidget *root;
6705 int error = gp_widget_get_root(*arg3, &root);
6706 if (error < 0) {
6707 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6708 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6709 /*@SWIG@*/;
6710 SWIG_fail;
6711 }
6712 error = gp_widget_ref(root);
6713 if (error < 0) {
6714 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6715 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6716 /*@SWIG@*/;
6717 SWIG_fail;
6718 }
6719 }
6720 // Append result to output object
6721 resultobj = SWIG_Python_AppendOutput(
6722 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6723 }
6724 return resultobj;
6725 fail:
6726 return NULL;
6727 }
6728
6729
_wrap_gp_widget_get_child_by_name(PyObject * self,PyObject * args)6730 SWIGINTERN PyObject *_wrap_gp_widget_get_child_by_name(PyObject *self, PyObject *args) {
6731 PyObject *resultobj = 0;
6732 CameraWidget *arg1 = (CameraWidget *) 0 ;
6733 char *arg2 = (char *) 0 ;
6734 CameraWidget **arg3 = (CameraWidget **) 0 ;
6735 void *argp1 = 0 ;
6736 int res1 = 0 ;
6737 int res2 ;
6738 char *buf2 = 0 ;
6739 int alloc2 = 0 ;
6740 CameraWidget *temp3 ;
6741 PyObject * obj0 = 0 ;
6742 PyObject * obj1 = 0 ;
6743 int result;
6744
6745 {
6746 temp3 = NULL;
6747 arg3 = &temp3;
6748 }
6749 if (!PyArg_UnpackTuple(args, "gp_widget_get_child_by_name", 2, 2, &obj0, &obj1)) SWIG_fail;
6750 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6751 if (!SWIG_IsOK(res1)) {
6752 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_child_by_name" "', argument " "1"" of type '" "CameraWidget *""'");
6753 }
6754 arg1 = (CameraWidget *)(argp1);
6755 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6756 if (!SWIG_IsOK(res2)) {
6757 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_get_child_by_name" "', argument " "2"" of type '" "char const *""'");
6758 }
6759 arg2 = (char *)(buf2);
6760 result = (int)gp_widget_get_child_by_name(arg1,(char const *)arg2,arg3);
6761 resultobj = SWIG_From_int((int)(result));
6762 {
6763 if (*arg3 != NULL) {
6764 // Increment refcount on root widget
6765 CameraWidget *root;
6766 int error = gp_widget_get_root(*arg3, &root);
6767 if (error < 0) {
6768 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6769 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6770 /*@SWIG@*/;
6771 SWIG_fail;
6772 }
6773 error = gp_widget_ref(root);
6774 if (error < 0) {
6775 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6776 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6777 /*@SWIG@*/;
6778 SWIG_fail;
6779 }
6780 }
6781 // Append result to output object
6782 resultobj = SWIG_Python_AppendOutput(
6783 resultobj, SWIG_NewPointerObj(*arg3, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6784 }
6785 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6786 return resultobj;
6787 fail:
6788 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6789 return NULL;
6790 }
6791
6792
_wrap_gp_widget_get_root(PyObject * self,PyObject * args)6793 SWIGINTERN PyObject *_wrap_gp_widget_get_root(PyObject *self, PyObject *args) {
6794 PyObject *resultobj = 0;
6795 CameraWidget *arg1 = (CameraWidget *) 0 ;
6796 CameraWidget **arg2 = (CameraWidget **) 0 ;
6797 void *argp1 = 0 ;
6798 int res1 = 0 ;
6799 CameraWidget *temp2 ;
6800 PyObject * obj0 = 0 ;
6801 int result;
6802
6803 {
6804 temp2 = NULL;
6805 arg2 = &temp2;
6806 }
6807 if (!PyArg_UnpackTuple(args, "gp_widget_get_root", 1, 1, &obj0)) SWIG_fail;
6808 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6809 if (!SWIG_IsOK(res1)) {
6810 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_root" "', argument " "1"" of type '" "CameraWidget *""'");
6811 }
6812 arg1 = (CameraWidget *)(argp1);
6813 result = (int)gp_widget_get_root(arg1,arg2);
6814 resultobj = SWIG_From_int((int)(result));
6815 {
6816 if (*arg2 != NULL) {
6817 // Increment refcount on root widget
6818 CameraWidget *root;
6819 int error = gp_widget_get_root(*arg2, &root);
6820 if (error < 0) {
6821 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6822 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6823 /*@SWIG@*/;
6824 SWIG_fail;
6825 }
6826 error = gp_widget_ref(root);
6827 if (error < 0) {
6828 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6829 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6830 /*@SWIG@*/;
6831 SWIG_fail;
6832 }
6833 }
6834 // Append result to output object
6835 resultobj = SWIG_Python_AppendOutput(
6836 resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6837 }
6838 return resultobj;
6839 fail:
6840 return NULL;
6841 }
6842
6843
_wrap_gp_widget_get_parent(PyObject * self,PyObject * args)6844 SWIGINTERN PyObject *_wrap_gp_widget_get_parent(PyObject *self, PyObject *args) {
6845 PyObject *resultobj = 0;
6846 CameraWidget *arg1 = (CameraWidget *) 0 ;
6847 CameraWidget **arg2 = (CameraWidget **) 0 ;
6848 void *argp1 = 0 ;
6849 int res1 = 0 ;
6850 CameraWidget *temp2 ;
6851 PyObject * obj0 = 0 ;
6852 int result;
6853
6854 {
6855 temp2 = NULL;
6856 arg2 = &temp2;
6857 }
6858 if (!PyArg_UnpackTuple(args, "gp_widget_get_parent", 1, 1, &obj0)) SWIG_fail;
6859 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6860 if (!SWIG_IsOK(res1)) {
6861 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_parent" "', argument " "1"" of type '" "CameraWidget *""'");
6862 }
6863 arg1 = (CameraWidget *)(argp1);
6864 result = (int)gp_widget_get_parent(arg1,arg2);
6865 resultobj = SWIG_From_int((int)(result));
6866 {
6867 if (*arg2 != NULL) {
6868 // Increment refcount on root widget
6869 CameraWidget *root;
6870 int error = gp_widget_get_root(*arg2, &root);
6871 if (error < 0) {
6872 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6873 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6874 /*@SWIG@*/;
6875 SWIG_fail;
6876 }
6877 error = gp_widget_ref(root);
6878 if (error < 0) {
6879 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
6880 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
6881 /*@SWIG@*/;
6882 SWIG_fail;
6883 }
6884 }
6885 // Append result to output object
6886 resultobj = SWIG_Python_AppendOutput(
6887 resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p__CameraWidget, SWIG_POINTER_OWN));
6888 }
6889 return resultobj;
6890 fail:
6891 return NULL;
6892 }
6893
6894
_wrap_gp_widget_set_name(PyObject * self,PyObject * args)6895 SWIGINTERN PyObject *_wrap_gp_widget_set_name(PyObject *self, PyObject *args) {
6896 PyObject *resultobj = 0;
6897 CameraWidget *arg1 = (CameraWidget *) 0 ;
6898 char *arg2 = (char *) 0 ;
6899 void *argp1 = 0 ;
6900 int res1 = 0 ;
6901 int res2 ;
6902 char *buf2 = 0 ;
6903 int alloc2 = 0 ;
6904 PyObject * obj0 = 0 ;
6905 PyObject * obj1 = 0 ;
6906 int result;
6907
6908 if (!PyArg_UnpackTuple(args, "gp_widget_set_name", 2, 2, &obj0, &obj1)) SWIG_fail;
6909 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6910 if (!SWIG_IsOK(res1)) {
6911 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_name" "', argument " "1"" of type '" "CameraWidget *""'");
6912 }
6913 arg1 = (CameraWidget *)(argp1);
6914 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6915 if (!SWIG_IsOK(res2)) {
6916 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_set_name" "', argument " "2"" of type '" "char const *""'");
6917 }
6918 arg2 = (char *)(buf2);
6919 result = (int)gp_widget_set_name(arg1,(char const *)arg2);
6920 resultobj = SWIG_From_int((int)(result));
6921 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6922 return resultobj;
6923 fail:
6924 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6925 return NULL;
6926 }
6927
6928
_wrap_gp_widget_get_name(PyObject * self,PyObject * args)6929 SWIGINTERN PyObject *_wrap_gp_widget_get_name(PyObject *self, PyObject *args) {
6930 PyObject *resultobj = 0;
6931 CameraWidget *arg1 = (CameraWidget *) 0 ;
6932 char **arg2 = (char **) 0 ;
6933 void *argp1 = 0 ;
6934 int res1 = 0 ;
6935 char *temp2 ;
6936 PyObject * obj0 = 0 ;
6937 int result;
6938
6939 {
6940 temp2 = NULL;
6941 arg2 = &temp2;
6942 }
6943 if (!PyArg_UnpackTuple(args, "gp_widget_get_name", 1, 1, &obj0)) SWIG_fail;
6944 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6945 if (!SWIG_IsOK(res1)) {
6946 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_name" "', argument " "1"" of type '" "CameraWidget *""'");
6947 }
6948 arg1 = (CameraWidget *)(argp1);
6949 result = (int)gp_widget_get_name(arg1,(char const **)arg2);
6950 resultobj = SWIG_From_int((int)(result));
6951 {
6952 if (*arg2) {
6953 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
6954 }
6955 else {
6956 Py_INCREF(Py_None);
6957 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
6958 }
6959 }
6960 return resultobj;
6961 fail:
6962 return NULL;
6963 }
6964
6965
_wrap_gp_widget_set_info(PyObject * self,PyObject * args)6966 SWIGINTERN PyObject *_wrap_gp_widget_set_info(PyObject *self, PyObject *args) {
6967 PyObject *resultobj = 0;
6968 CameraWidget *arg1 = (CameraWidget *) 0 ;
6969 char *arg2 = (char *) 0 ;
6970 void *argp1 = 0 ;
6971 int res1 = 0 ;
6972 int res2 ;
6973 char *buf2 = 0 ;
6974 int alloc2 = 0 ;
6975 PyObject * obj0 = 0 ;
6976 PyObject * obj1 = 0 ;
6977 int result;
6978
6979 if (!PyArg_UnpackTuple(args, "gp_widget_set_info", 2, 2, &obj0, &obj1)) SWIG_fail;
6980 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
6981 if (!SWIG_IsOK(res1)) {
6982 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_info" "', argument " "1"" of type '" "CameraWidget *""'");
6983 }
6984 arg1 = (CameraWidget *)(argp1);
6985 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6986 if (!SWIG_IsOK(res2)) {
6987 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_set_info" "', argument " "2"" of type '" "char const *""'");
6988 }
6989 arg2 = (char *)(buf2);
6990 result = (int)gp_widget_set_info(arg1,(char const *)arg2);
6991 resultobj = SWIG_From_int((int)(result));
6992 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6993 return resultobj;
6994 fail:
6995 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6996 return NULL;
6997 }
6998
6999
_wrap_gp_widget_get_info(PyObject * self,PyObject * args)7000 SWIGINTERN PyObject *_wrap_gp_widget_get_info(PyObject *self, PyObject *args) {
7001 PyObject *resultobj = 0;
7002 CameraWidget *arg1 = (CameraWidget *) 0 ;
7003 char **arg2 = (char **) 0 ;
7004 void *argp1 = 0 ;
7005 int res1 = 0 ;
7006 char *temp2 ;
7007 PyObject * obj0 = 0 ;
7008 int result;
7009
7010 {
7011 temp2 = NULL;
7012 arg2 = &temp2;
7013 }
7014 if (!PyArg_UnpackTuple(args, "gp_widget_get_info", 1, 1, &obj0)) SWIG_fail;
7015 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7016 if (!SWIG_IsOK(res1)) {
7017 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_info" "', argument " "1"" of type '" "CameraWidget *""'");
7018 }
7019 arg1 = (CameraWidget *)(argp1);
7020 result = (int)gp_widget_get_info(arg1,(char const **)arg2);
7021 resultobj = SWIG_From_int((int)(result));
7022 {
7023 if (*arg2) {
7024 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
7025 }
7026 else {
7027 Py_INCREF(Py_None);
7028 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
7029 }
7030 }
7031 return resultobj;
7032 fail:
7033 return NULL;
7034 }
7035
7036
_wrap_gp_widget_get_id(PyObject * self,PyObject * args)7037 SWIGINTERN PyObject *_wrap_gp_widget_get_id(PyObject *self, PyObject *args) {
7038 PyObject *resultobj = 0;
7039 CameraWidget *arg1 = (CameraWidget *) 0 ;
7040 int *arg2 = (int *) 0 ;
7041 void *argp1 = 0 ;
7042 int res1 = 0 ;
7043 int temp2 ;
7044 int res2 = SWIG_TMPOBJ ;
7045 PyObject * obj0 = 0 ;
7046 int result;
7047
7048 arg2 = &temp2;
7049 if (!PyArg_UnpackTuple(args, "gp_widget_get_id", 1, 1, &obj0)) SWIG_fail;
7050 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7051 if (!SWIG_IsOK(res1)) {
7052 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_id" "', argument " "1"" of type '" "CameraWidget *""'");
7053 }
7054 arg1 = (CameraWidget *)(argp1);
7055 result = (int)gp_widget_get_id(arg1,arg2);
7056 resultobj = SWIG_From_int((int)(result));
7057 if (SWIG_IsTmpObj(res2)) {
7058 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
7059 } else {
7060 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7061 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
7062 }
7063 return resultobj;
7064 fail:
7065 return NULL;
7066 }
7067
7068
_wrap_gp_widget_get_type(PyObject * self,PyObject * args)7069 SWIGINTERN PyObject *_wrap_gp_widget_get_type(PyObject *self, PyObject *args) {
7070 PyObject *resultobj = 0;
7071 CameraWidget *arg1 = (CameraWidget *) 0 ;
7072 CameraWidgetType *arg2 = (CameraWidgetType *) 0 ;
7073 void *argp1 = 0 ;
7074 int res1 = 0 ;
7075 CameraWidgetType temp2 ;
7076 int res2 = SWIG_TMPOBJ ;
7077 PyObject * obj0 = 0 ;
7078 int result;
7079
7080 arg2 = &temp2;
7081 if (!PyArg_UnpackTuple(args, "gp_widget_get_type", 1, 1, &obj0)) SWIG_fail;
7082 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7083 if (!SWIG_IsOK(res1)) {
7084 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_type" "', argument " "1"" of type '" "CameraWidget *""'");
7085 }
7086 arg1 = (CameraWidget *)(argp1);
7087 result = (int)gp_widget_get_type(arg1,arg2);
7088 resultobj = SWIG_From_int((int)(result));
7089 if (SWIG_IsTmpObj(res2)) {
7090 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
7091 } else {
7092 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7093 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_CameraWidgetType, new_flags));
7094 }
7095 return resultobj;
7096 fail:
7097 return NULL;
7098 }
7099
7100
_wrap_gp_widget_get_label(PyObject * self,PyObject * args)7101 SWIGINTERN PyObject *_wrap_gp_widget_get_label(PyObject *self, PyObject *args) {
7102 PyObject *resultobj = 0;
7103 CameraWidget *arg1 = (CameraWidget *) 0 ;
7104 char **arg2 = (char **) 0 ;
7105 void *argp1 = 0 ;
7106 int res1 = 0 ;
7107 char *temp2 ;
7108 PyObject * obj0 = 0 ;
7109 int result;
7110
7111 {
7112 temp2 = NULL;
7113 arg2 = &temp2;
7114 }
7115 if (!PyArg_UnpackTuple(args, "gp_widget_get_label", 1, 1, &obj0)) SWIG_fail;
7116 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7117 if (!SWIG_IsOK(res1)) {
7118 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_label" "', argument " "1"" of type '" "CameraWidget *""'");
7119 }
7120 arg1 = (CameraWidget *)(argp1);
7121 result = (int)gp_widget_get_label(arg1,(char const **)arg2);
7122 resultobj = SWIG_From_int((int)(result));
7123 {
7124 if (*arg2) {
7125 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg2));
7126 }
7127 else {
7128 Py_INCREF(Py_None);
7129 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
7130 }
7131 }
7132 return resultobj;
7133 fail:
7134 return NULL;
7135 }
7136
7137
_wrap_gp_widget_set_range(PyObject * self,PyObject * args)7138 SWIGINTERN PyObject *_wrap_gp_widget_set_range(PyObject *self, PyObject *args) {
7139 PyObject *resultobj = 0;
7140 CameraWidget *arg1 = (CameraWidget *) 0 ;
7141 float arg2 ;
7142 float arg3 ;
7143 float arg4 ;
7144 void *argp1 = 0 ;
7145 int res1 = 0 ;
7146 float val2 ;
7147 int ecode2 = 0 ;
7148 float val3 ;
7149 int ecode3 = 0 ;
7150 float val4 ;
7151 int ecode4 = 0 ;
7152 PyObject * obj0 = 0 ;
7153 PyObject * obj1 = 0 ;
7154 PyObject * obj2 = 0 ;
7155 PyObject * obj3 = 0 ;
7156 int result;
7157
7158 if (!PyArg_UnpackTuple(args, "gp_widget_set_range", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
7159 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7160 if (!SWIG_IsOK(res1)) {
7161 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_range" "', argument " "1"" of type '" "CameraWidget *""'");
7162 }
7163 arg1 = (CameraWidget *)(argp1);
7164 ecode2 = SWIG_AsVal_float(obj1, &val2);
7165 if (!SWIG_IsOK(ecode2)) {
7166 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_set_range" "', argument " "2"" of type '" "float""'");
7167 }
7168 arg2 = (float)(val2);
7169 ecode3 = SWIG_AsVal_float(obj2, &val3);
7170 if (!SWIG_IsOK(ecode3)) {
7171 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gp_widget_set_range" "', argument " "3"" of type '" "float""'");
7172 }
7173 arg3 = (float)(val3);
7174 ecode4 = SWIG_AsVal_float(obj3, &val4);
7175 if (!SWIG_IsOK(ecode4)) {
7176 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gp_widget_set_range" "', argument " "4"" of type '" "float""'");
7177 }
7178 arg4 = (float)(val4);
7179 result = (int)gp_widget_set_range(arg1,arg2,arg3,arg4);
7180 resultobj = SWIG_From_int((int)(result));
7181 return resultobj;
7182 fail:
7183 return NULL;
7184 }
7185
7186
_wrap_gp_widget_get_range(PyObject * self,PyObject * args)7187 SWIGINTERN PyObject *_wrap_gp_widget_get_range(PyObject *self, PyObject *args) {
7188 PyObject *resultobj = 0;
7189 CameraWidget *arg1 = (CameraWidget *) 0 ;
7190 float *arg2 = (float *) 0 ;
7191 float *arg3 = (float *) 0 ;
7192 float *arg4 = (float *) 0 ;
7193 void *argp1 = 0 ;
7194 int res1 = 0 ;
7195 float temp2 ;
7196 int res2 = SWIG_TMPOBJ ;
7197 float temp3 ;
7198 int res3 = SWIG_TMPOBJ ;
7199 float temp4 ;
7200 int res4 = SWIG_TMPOBJ ;
7201 PyObject * obj0 = 0 ;
7202 int result;
7203
7204 arg2 = &temp2;
7205 arg3 = &temp3;
7206 arg4 = &temp4;
7207 if (!PyArg_UnpackTuple(args, "gp_widget_get_range", 1, 1, &obj0)) SWIG_fail;
7208 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7209 if (!SWIG_IsOK(res1)) {
7210 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_range" "', argument " "1"" of type '" "CameraWidget *""'");
7211 }
7212 arg1 = (CameraWidget *)(argp1);
7213 result = (int)gp_widget_get_range(arg1,arg2,arg3,arg4);
7214 resultobj = SWIG_From_int((int)(result));
7215 if (SWIG_IsTmpObj(res2)) {
7216 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
7217 } else {
7218 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7219 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
7220 }
7221 if (SWIG_IsTmpObj(res3)) {
7222 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg3)));
7223 } else {
7224 int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7225 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_float, new_flags));
7226 }
7227 if (SWIG_IsTmpObj(res4)) {
7228 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg4)));
7229 } else {
7230 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7231 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_float, new_flags));
7232 }
7233 return resultobj;
7234 fail:
7235 return NULL;
7236 }
7237
7238
_wrap_gp_widget_add_choice(PyObject * self,PyObject * args)7239 SWIGINTERN PyObject *_wrap_gp_widget_add_choice(PyObject *self, PyObject *args) {
7240 PyObject *resultobj = 0;
7241 CameraWidget *arg1 = (CameraWidget *) 0 ;
7242 char *arg2 = (char *) 0 ;
7243 void *argp1 = 0 ;
7244 int res1 = 0 ;
7245 int res2 ;
7246 char *buf2 = 0 ;
7247 int alloc2 = 0 ;
7248 PyObject * obj0 = 0 ;
7249 PyObject * obj1 = 0 ;
7250 int result;
7251
7252 if (!PyArg_UnpackTuple(args, "gp_widget_add_choice", 2, 2, &obj0, &obj1)) SWIG_fail;
7253 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7254 if (!SWIG_IsOK(res1)) {
7255 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_add_choice" "', argument " "1"" of type '" "CameraWidget *""'");
7256 }
7257 arg1 = (CameraWidget *)(argp1);
7258 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
7259 if (!SWIG_IsOK(res2)) {
7260 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_widget_add_choice" "', argument " "2"" of type '" "char const *""'");
7261 }
7262 arg2 = (char *)(buf2);
7263 result = (int)gp_widget_add_choice(arg1,(char const *)arg2);
7264 resultobj = SWIG_From_int((int)(result));
7265 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7266 return resultobj;
7267 fail:
7268 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7269 return NULL;
7270 }
7271
7272
_wrap_gp_widget_count_choices(PyObject * self,PyObject * args)7273 SWIGINTERN PyObject *_wrap_gp_widget_count_choices(PyObject *self, PyObject *args) {
7274 PyObject *resultobj = 0;
7275 CameraWidget *arg1 = (CameraWidget *) 0 ;
7276 void *argp1 = 0 ;
7277 int res1 = 0 ;
7278 PyObject * obj0 = 0 ;
7279 int result;
7280
7281 if (!PyArg_UnpackTuple(args, "gp_widget_count_choices", 1, 1, &obj0)) SWIG_fail;
7282 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7283 if (!SWIG_IsOK(res1)) {
7284 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_count_choices" "', argument " "1"" of type '" "CameraWidget *""'");
7285 }
7286 arg1 = (CameraWidget *)(argp1);
7287 result = (int)gp_widget_count_choices(arg1);
7288 resultobj = SWIG_From_int((int)(result));
7289 return resultobj;
7290 fail:
7291 return NULL;
7292 }
7293
7294
_wrap_gp_widget_get_choice(PyObject * self,PyObject * args)7295 SWIGINTERN PyObject *_wrap_gp_widget_get_choice(PyObject *self, PyObject *args) {
7296 PyObject *resultobj = 0;
7297 CameraWidget *arg1 = (CameraWidget *) 0 ;
7298 int arg2 ;
7299 char **arg3 = (char **) 0 ;
7300 void *argp1 = 0 ;
7301 int res1 = 0 ;
7302 int val2 ;
7303 int ecode2 = 0 ;
7304 char *temp3 ;
7305 PyObject * obj0 = 0 ;
7306 PyObject * obj1 = 0 ;
7307 int result;
7308
7309 {
7310 temp3 = NULL;
7311 arg3 = &temp3;
7312 }
7313 if (!PyArg_UnpackTuple(args, "gp_widget_get_choice", 2, 2, &obj0, &obj1)) SWIG_fail;
7314 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7315 if (!SWIG_IsOK(res1)) {
7316 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_choice" "', argument " "1"" of type '" "CameraWidget *""'");
7317 }
7318 arg1 = (CameraWidget *)(argp1);
7319 ecode2 = SWIG_AsVal_int(obj1, &val2);
7320 if (!SWIG_IsOK(ecode2)) {
7321 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_get_choice" "', argument " "2"" of type '" "int""'");
7322 }
7323 arg2 = (int)(val2);
7324 result = (int)gp_widget_get_choice(arg1,arg2,(char const **)arg3);
7325 resultobj = SWIG_From_int((int)(result));
7326 {
7327 if (*arg3) {
7328 resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
7329 }
7330 else {
7331 Py_INCREF(Py_None);
7332 resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
7333 }
7334 }
7335 return resultobj;
7336 fail:
7337 return NULL;
7338 }
7339
7340
_wrap_gp_widget_changed(PyObject * self,PyObject * args)7341 SWIGINTERN PyObject *_wrap_gp_widget_changed(PyObject *self, PyObject *args) {
7342 PyObject *resultobj = 0;
7343 CameraWidget *arg1 = (CameraWidget *) 0 ;
7344 void *argp1 = 0 ;
7345 int res1 = 0 ;
7346 PyObject * obj0 = 0 ;
7347 int result;
7348
7349 if (!PyArg_UnpackTuple(args, "gp_widget_changed", 1, 1, &obj0)) SWIG_fail;
7350 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7351 if (!SWIG_IsOK(res1)) {
7352 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_changed" "', argument " "1"" of type '" "CameraWidget *""'");
7353 }
7354 arg1 = (CameraWidget *)(argp1);
7355 result = (int)gp_widget_changed(arg1);
7356 resultobj = SWIG_From_int((int)(result));
7357 return resultobj;
7358 fail:
7359 return NULL;
7360 }
7361
7362
_wrap_gp_widget_set_changed(PyObject * self,PyObject * args)7363 SWIGINTERN PyObject *_wrap_gp_widget_set_changed(PyObject *self, PyObject *args) {
7364 PyObject *resultobj = 0;
7365 CameraWidget *arg1 = (CameraWidget *) 0 ;
7366 int arg2 ;
7367 void *argp1 = 0 ;
7368 int res1 = 0 ;
7369 int val2 ;
7370 int ecode2 = 0 ;
7371 PyObject * obj0 = 0 ;
7372 PyObject * obj1 = 0 ;
7373 int result;
7374
7375 if (!PyArg_UnpackTuple(args, "gp_widget_set_changed", 2, 2, &obj0, &obj1)) SWIG_fail;
7376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7377 if (!SWIG_IsOK(res1)) {
7378 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_changed" "', argument " "1"" of type '" "CameraWidget *""'");
7379 }
7380 arg1 = (CameraWidget *)(argp1);
7381 ecode2 = SWIG_AsVal_int(obj1, &val2);
7382 if (!SWIG_IsOK(ecode2)) {
7383 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_set_changed" "', argument " "2"" of type '" "int""'");
7384 }
7385 arg2 = (int)(val2);
7386 result = (int)gp_widget_set_changed(arg1,arg2);
7387 resultobj = SWIG_From_int((int)(result));
7388 return resultobj;
7389 fail:
7390 return NULL;
7391 }
7392
7393
_wrap_gp_widget_set_readonly(PyObject * self,PyObject * args)7394 SWIGINTERN PyObject *_wrap_gp_widget_set_readonly(PyObject *self, PyObject *args) {
7395 PyObject *resultobj = 0;
7396 CameraWidget *arg1 = (CameraWidget *) 0 ;
7397 int arg2 ;
7398 void *argp1 = 0 ;
7399 int res1 = 0 ;
7400 int val2 ;
7401 int ecode2 = 0 ;
7402 PyObject * obj0 = 0 ;
7403 PyObject * obj1 = 0 ;
7404 int result;
7405
7406 if (!PyArg_UnpackTuple(args, "gp_widget_set_readonly", 2, 2, &obj0, &obj1)) SWIG_fail;
7407 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7408 if (!SWIG_IsOK(res1)) {
7409 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_set_readonly" "', argument " "1"" of type '" "CameraWidget *""'");
7410 }
7411 arg1 = (CameraWidget *)(argp1);
7412 ecode2 = SWIG_AsVal_int(obj1, &val2);
7413 if (!SWIG_IsOK(ecode2)) {
7414 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_widget_set_readonly" "', argument " "2"" of type '" "int""'");
7415 }
7416 arg2 = (int)(val2);
7417 result = (int)gp_widget_set_readonly(arg1,arg2);
7418 resultobj = SWIG_From_int((int)(result));
7419 return resultobj;
7420 fail:
7421 return NULL;
7422 }
7423
7424
_wrap_gp_widget_get_readonly(PyObject * self,PyObject * args)7425 SWIGINTERN PyObject *_wrap_gp_widget_get_readonly(PyObject *self, PyObject *args) {
7426 PyObject *resultobj = 0;
7427 CameraWidget *arg1 = (CameraWidget *) 0 ;
7428 int *arg2 = (int *) 0 ;
7429 void *argp1 = 0 ;
7430 int res1 = 0 ;
7431 int temp2 ;
7432 int res2 = SWIG_TMPOBJ ;
7433 PyObject * obj0 = 0 ;
7434 int result;
7435
7436 arg2 = &temp2;
7437 if (!PyArg_UnpackTuple(args, "gp_widget_get_readonly", 1, 1, &obj0)) SWIG_fail;
7438 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraWidget, 0 | 0 );
7439 if (!SWIG_IsOK(res1)) {
7440 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_widget_get_readonly" "', argument " "1"" of type '" "CameraWidget *""'");
7441 }
7442 arg1 = (CameraWidget *)(argp1);
7443 result = (int)gp_widget_get_readonly(arg1,arg2);
7444 resultobj = SWIG_From_int((int)(result));
7445 if (SWIG_IsTmpObj(res2)) {
7446 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
7447 } else {
7448 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7449 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
7450 }
7451 return resultobj;
7452 fail:
7453 return NULL;
7454 }
7455
7456
7457 static PyMethodDef SwigMethods[] = {
7458 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
7459 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
7460 { "gp_widget_set_value", _wrap_gp_widget_set_value, METH_VARARGS, "\n"
7461 "gp_widget_set_value(widget, value) -> int\n"
7462 "\n"
7463 "Parameters\n"
7464 "----------\n"
7465 "widget: gphoto2.CameraWidget\n"
7466 "value: str\n"
7467 "\n"
7468 "gp_widget_set_value(widget, value) -> int\n"
7469 "\n"
7470 "Parameters\n"
7471 "----------\n"
7472 "widget: gphoto2.CameraWidget\n"
7473 "value: float const *\n"
7474 "\n"
7475 "gp_widget_set_value(widget, value) -> int\n"
7476 "\n"
7477 "Parameters\n"
7478 "----------\n"
7479 "widget: gphoto2.CameraWidget\n"
7480 "value: int const *\n"
7481 "\n"
7482 "Sets the value of the widget. \n"
7483 "\n"
7484 "Parameters\n"
7485 "----------\n"
7486 "* `widget` : \n"
7487 " a CameraWidget \n"
7488 "* `value` : \n"
7489 "\n"
7490 "Returns\n"
7491 "-------\n"
7492 "a gphoto2 error code. \n"
7493 "\n"
7494 "Please pass (char*) for GP_WIDGET_MENU, GP_WIDGET_TEXT, GP_WIDGET_RADIO,\n"
7495 "(float) for GP_WIDGET_RANGE, (int) for GP_WIDGET_DATE, GP_WIDGET_TOGGLE,\n"
7496 "and (CameraWidgetCallback) for GP_WIDGET_BUTTON.\n"
7497 "\n"
7498 "See also gphoto2.CameraWidget.set_value\n"
7499 ""},
7500 { "gp_widget_get_value", _wrap_gp_widget_get_value, METH_VARARGS, "\n"
7501 "gp_widget_get_value(widget) -> int\n"
7502 "\n"
7503 "Parameters\n"
7504 "----------\n"
7505 "widget: gphoto2.CameraWidget\n"
7506 "\n"
7507 "gp_widget_get_value(widget) -> int\n"
7508 "\n"
7509 "Parameters\n"
7510 "----------\n"
7511 "widget: gphoto2.CameraWidget\n"
7512 "\n"
7513 "gp_widget_get_value(widget) -> int\n"
7514 "\n"
7515 "Parameters\n"
7516 "----------\n"
7517 "widget: gphoto2.CameraWidget\n"
7518 "\n"
7519 "Retrieves the value of the CameraWidget. \n"
7520 "\n"
7521 "Parameters\n"
7522 "----------\n"
7523 "* `widget` : \n"
7524 " a CameraWidget \n"
7525 "* `value` : \n"
7526 "\n"
7527 "Returns\n"
7528 "-------\n"
7529 "a gphoto2 error code.\n"
7530 "\n"
7531 "See also gphoto2.CameraWidget.get_value\n"
7532 ""},
7533 { "gp_widget_get_children", _wrap_gp_widget_get_children, METH_VARARGS, "\n"
7534 "gp_widget_get_children(widget) -> int\n"
7535 "\n"
7536 "Parameters\n"
7537 "----------\n"
7538 "widget: gphoto2.CameraWidget\n"
7539 "\n"
7540 "Gets all the child widgets of a CameraWidget. The return value is a list\n"
7541 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
7542 "be used to get each child in sequence.\n"
7543 "\n"
7544 "Parameters\n"
7545 "----------\n"
7546 "* `widget` :\n"
7547 " a CameraWidget\n"
7548 "\n"
7549 "Returns\n"
7550 "-------\n"
7551 "a gphoto2 error code and a Python iterator.\n"
7552 "\n"
7553 "See also gphoto2.CameraWidget.get_children\n"
7554 ""},
7555 { "gp_widget_get_choices", _wrap_gp_widget_get_choices, METH_VARARGS, "\n"
7556 "gp_widget_get_choices(widget) -> int\n"
7557 "\n"
7558 "Parameters\n"
7559 "----------\n"
7560 "widget: gphoto2.CameraWidget\n"
7561 "\n"
7562 "Gets all the choice values of a CameraWidget. The return value is a list\n"
7563 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
7564 "be used to get each choice in sequence.\n"
7565 "\n"
7566 "Parameters\n"
7567 "----------\n"
7568 "* `widget` :\n"
7569 " a CameraWidget\n"
7570 "\n"
7571 "Returns\n"
7572 "-------\n"
7573 "a gphoto2 error code and a Python iterator.\n"
7574 "\n"
7575 "See also gphoto2.CameraWidget.get_choices\n"
7576 ""},
7577 { "gp_widget_append", _wrap_gp_widget_append, METH_VARARGS, "\n"
7578 "gp_widget_append(widget, child) -> int\n"
7579 "\n"
7580 "Parameters\n"
7581 "----------\n"
7582 "widget: gphoto2.CameraWidget\n"
7583 "child: gphoto2.CameraWidget\n"
7584 "\n"
7585 "Appends a CameraWidget to a CameraWidget. \n"
7586 "\n"
7587 "Parameters\n"
7588 "----------\n"
7589 "* `widget` : \n"
7590 " a CameraWidget \n"
7591 "* `child` : \n"
7592 " the CameraWidget you would like to append to above \n"
7593 "\n"
7594 "Returns\n"
7595 "-------\n"
7596 "a gphoto2 error code.\n"
7597 "\n"
7598 "See also gphoto2.CameraWidget.append\n"
7599 ""},
7600 { "gp_widget_prepend", _wrap_gp_widget_prepend, METH_VARARGS, "\n"
7601 "gp_widget_prepend(widget, child) -> int\n"
7602 "\n"
7603 "Parameters\n"
7604 "----------\n"
7605 "widget: gphoto2.CameraWidget\n"
7606 "child: gphoto2.CameraWidget\n"
7607 "\n"
7608 "Prepends a CameraWidget to a CameraWidget. \n"
7609 "\n"
7610 "Parameters\n"
7611 "----------\n"
7612 "* `widget` : \n"
7613 " a CameraWidget \n"
7614 "* `child` : \n"
7615 " the CameraWidget you would like to prepend to above \n"
7616 "\n"
7617 "Returns\n"
7618 "-------\n"
7619 "a gphoto2 error code.\n"
7620 "\n"
7621 "See also gphoto2.CameraWidget.prepend\n"
7622 ""},
7623 { "gp_widget_count_children", _wrap_gp_widget_count_children, METH_VARARGS, "\n"
7624 "gp_widget_count_children(widget) -> int\n"
7625 "\n"
7626 "Parameters\n"
7627 "----------\n"
7628 "widget: gphoto2.CameraWidget\n"
7629 "\n"
7630 "Counts the children of the CameraWidget. \n"
7631 "\n"
7632 "Parameters\n"
7633 "----------\n"
7634 "* `widget` : \n"
7635 " a CameraWidget \n"
7636 "\n"
7637 "Returns\n"
7638 "-------\n"
7639 "a gphoto2 error code or number of children\n"
7640 "\n"
7641 "See also gphoto2.CameraWidget.count_children\n"
7642 ""},
7643 { "gp_widget_get_child", _wrap_gp_widget_get_child, METH_VARARGS, "\n"
7644 "gp_widget_get_child(widget, child_number) -> int\n"
7645 "\n"
7646 "Parameters\n"
7647 "----------\n"
7648 "widget: gphoto2.CameraWidget\n"
7649 "child_number: int\n"
7650 "\n"
7651 "Retrieves the child number `child_number` of the parent. \n"
7652 "\n"
7653 "Parameters\n"
7654 "----------\n"
7655 "* `widget` : \n"
7656 " a CameraWidget \n"
7657 "* `child_number` : \n"
7658 " the number of the child \n"
7659 "* `child` : \n"
7660 "\n"
7661 "Returns\n"
7662 "-------\n"
7663 "a gphoto2 error code.\n"
7664 "\n"
7665 "See also gphoto2.CameraWidget.get_child\n"
7666 ""},
7667 { "gp_widget_get_child_by_label", _wrap_gp_widget_get_child_by_label, METH_VARARGS, "\n"
7668 "gp_widget_get_child_by_label(widget, label) -> int\n"
7669 "\n"
7670 "Parameters\n"
7671 "----------\n"
7672 "widget: gphoto2.CameraWidget\n"
7673 "label: str\n"
7674 "\n"
7675 "Retrieves the child with label `label` of the CameraWidget. \n"
7676 "\n"
7677 "Parameters\n"
7678 "----------\n"
7679 "* `widget` : \n"
7680 " a CameraWidget \n"
7681 "* `label` : \n"
7682 " the label of the child \n"
7683 "* `child` : \n"
7684 "\n"
7685 "Returns\n"
7686 "-------\n"
7687 "a gphoto2 error code.\n"
7688 "\n"
7689 "See also gphoto2.CameraWidget.get_child_by_label\n"
7690 ""},
7691 { "gp_widget_get_child_by_id", _wrap_gp_widget_get_child_by_id, METH_VARARGS, "\n"
7692 "gp_widget_get_child_by_id(widget, id) -> int\n"
7693 "\n"
7694 "Parameters\n"
7695 "----------\n"
7696 "widget: gphoto2.CameraWidget\n"
7697 "id: int\n"
7698 "\n"
7699 "Retrieves the child with id `id` of the widget. \n"
7700 "\n"
7701 "Parameters\n"
7702 "----------\n"
7703 "* `widget` : \n"
7704 " a CameraWidget \n"
7705 "* `id` : \n"
7706 " the id of the child \n"
7707 "* `child` : \n"
7708 "\n"
7709 "Returns\n"
7710 "-------\n"
7711 "a gphoto2 error code.\n"
7712 "\n"
7713 "See also gphoto2.CameraWidget.get_child_by_id\n"
7714 ""},
7715 { "gp_widget_get_child_by_name", _wrap_gp_widget_get_child_by_name, METH_VARARGS, "\n"
7716 "gp_widget_get_child_by_name(widget, name) -> int\n"
7717 "\n"
7718 "Parameters\n"
7719 "----------\n"
7720 "widget: gphoto2.CameraWidget\n"
7721 "name: str\n"
7722 "\n"
7723 "Retrieves the child with name `name` of the widget. \n"
7724 "\n"
7725 "Parameters\n"
7726 "----------\n"
7727 "* `widget` : \n"
7728 " a CameraWidget \n"
7729 "* `name` : \n"
7730 " the name of the child \n"
7731 "\n"
7732 "Returns\n"
7733 "-------\n"
7734 "a gphoto2 error code.\n"
7735 "\n"
7736 "See also gphoto2.CameraWidget.get_child_by_name\n"
7737 ""},
7738 { "gp_widget_get_root", _wrap_gp_widget_get_root, METH_VARARGS, "\n"
7739 "gp_widget_get_root(widget) -> int\n"
7740 "\n"
7741 "Parameters\n"
7742 "----------\n"
7743 "widget: gphoto2.CameraWidget\n"
7744 "\n"
7745 "Retrieves the root of the CameraWidget. \n"
7746 "\n"
7747 "Parameters\n"
7748 "----------\n"
7749 "* `widget` : \n"
7750 " a CameraWidget \n"
7751 "* `root` : \n"
7752 "\n"
7753 "Returns\n"
7754 "-------\n"
7755 "a gphoto2 error code.\n"
7756 "\n"
7757 "See also gphoto2.CameraWidget.get_root\n"
7758 ""},
7759 { "gp_widget_get_parent", _wrap_gp_widget_get_parent, METH_VARARGS, "\n"
7760 "gp_widget_get_parent(widget) -> int\n"
7761 "\n"
7762 "Parameters\n"
7763 "----------\n"
7764 "widget: gphoto2.CameraWidget\n"
7765 "\n"
7766 "Retrieves the parent of a CameraWidget. \n"
7767 "\n"
7768 "Parameters\n"
7769 "----------\n"
7770 "* `widget` : \n"
7771 " a CameraWidget \n"
7772 "* `parent` : \n"
7773 " the pointer to the parent to return \n"
7774 "\n"
7775 "Returns\n"
7776 "-------\n"
7777 "a gphoto2 error code.\n"
7778 "\n"
7779 "See also gphoto2.CameraWidget.get_parent\n"
7780 ""},
7781 { "gp_widget_set_name", _wrap_gp_widget_set_name, METH_VARARGS, "\n"
7782 "gp_widget_set_name(widget, name) -> int\n"
7783 "\n"
7784 "Parameters\n"
7785 "----------\n"
7786 "widget: gphoto2.CameraWidget\n"
7787 "name: str\n"
7788 "\n"
7789 "Sets the name of the widget. \n"
7790 "\n"
7791 "Parameters\n"
7792 "----------\n"
7793 "* `widget` : \n"
7794 " a CameraWidget \n"
7795 "* `name` : \n"
7796 " Name of above widget \n"
7797 "\n"
7798 "Returns\n"
7799 "-------\n"
7800 "a gphoto2 error code.\n"
7801 "\n"
7802 "See also gphoto2.CameraWidget.set_name\n"
7803 ""},
7804 { "gp_widget_get_name", _wrap_gp_widget_get_name, METH_VARARGS, "\n"
7805 "gp_widget_get_name(widget) -> int\n"
7806 "\n"
7807 "Parameters\n"
7808 "----------\n"
7809 "widget: gphoto2.CameraWidget\n"
7810 "\n"
7811 "Gets the name of the widget. \n"
7812 "\n"
7813 "Parameters\n"
7814 "----------\n"
7815 "* `widget` : \n"
7816 " a CameraWidget \n"
7817 "* `name` : \n"
7818 " Name of above widget \n"
7819 "\n"
7820 "Returns\n"
7821 "-------\n"
7822 "a gphoto2 error code.\n"
7823 "\n"
7824 "See also gphoto2.CameraWidget.get_name\n"
7825 ""},
7826 { "gp_widget_set_info", _wrap_gp_widget_set_info, METH_VARARGS, "\n"
7827 "gp_widget_set_info(widget, info) -> int\n"
7828 "\n"
7829 "Parameters\n"
7830 "----------\n"
7831 "widget: gphoto2.CameraWidget\n"
7832 "info: str\n"
7833 "\n"
7834 "Sets the information about the widget. \n"
7835 "\n"
7836 "Parameters\n"
7837 "----------\n"
7838 "* `widget` : \n"
7839 " a CameraWidget \n"
7840 "* `info` : \n"
7841 " Information about above widget \n"
7842 "\n"
7843 "Returns\n"
7844 "-------\n"
7845 "a gphoto2 error code.\n"
7846 "\n"
7847 "See also gphoto2.CameraWidget.set_info\n"
7848 ""},
7849 { "gp_widget_get_info", _wrap_gp_widget_get_info, METH_VARARGS, "\n"
7850 "gp_widget_get_info(widget) -> int\n"
7851 "\n"
7852 "Parameters\n"
7853 "----------\n"
7854 "widget: gphoto2.CameraWidget\n"
7855 "\n"
7856 "Retrieves the information about the widget. \n"
7857 "\n"
7858 "Parameters\n"
7859 "----------\n"
7860 "* `widget` : \n"
7861 " a CameraWidget \n"
7862 "* `info` : \n"
7863 "\n"
7864 "Returns\n"
7865 "-------\n"
7866 "a gphoto2 error code.\n"
7867 "\n"
7868 "See also gphoto2.CameraWidget.get_info\n"
7869 ""},
7870 { "gp_widget_get_id", _wrap_gp_widget_get_id, METH_VARARGS, "\n"
7871 "gp_widget_get_id(widget) -> int\n"
7872 "\n"
7873 "Parameters\n"
7874 "----------\n"
7875 "widget: gphoto2.CameraWidget\n"
7876 "\n"
7877 "Retrieves the unique id of the CameraWidget. \n"
7878 "\n"
7879 "Parameters\n"
7880 "----------\n"
7881 "* `widget` : \n"
7882 " a CameraWidget \n"
7883 "* `id` : \n"
7884 "\n"
7885 "Returns\n"
7886 "-------\n"
7887 "a gphoto2 error code.\n"
7888 "\n"
7889 "See also gphoto2.CameraWidget.get_id\n"
7890 ""},
7891 { "gp_widget_get_type", _wrap_gp_widget_get_type, METH_VARARGS, "\n"
7892 "gp_widget_get_type(widget) -> int\n"
7893 "\n"
7894 "Parameters\n"
7895 "----------\n"
7896 "widget: gphoto2.CameraWidget\n"
7897 "\n"
7898 "Retrieves the type of the CameraWidget. \n"
7899 "\n"
7900 "Parameters\n"
7901 "----------\n"
7902 "* `widget` : \n"
7903 " a CameraWidget \n"
7904 "* `type` : \n"
7905 "\n"
7906 "Returns\n"
7907 "-------\n"
7908 "a gphoto2 error code.\n"
7909 "\n"
7910 "See also gphoto2.CameraWidget.get_type\n"
7911 ""},
7912 { "gp_widget_get_label", _wrap_gp_widget_get_label, METH_VARARGS, "\n"
7913 "gp_widget_get_label(widget) -> int\n"
7914 "\n"
7915 "Parameters\n"
7916 "----------\n"
7917 "widget: gphoto2.CameraWidget\n"
7918 "\n"
7919 "Retrieves the label of the CameraWidget. \n"
7920 "\n"
7921 "Parameters\n"
7922 "----------\n"
7923 "* `widget` : \n"
7924 " a CameraWidget \n"
7925 "* `label` : \n"
7926 "\n"
7927 "Returns\n"
7928 "-------\n"
7929 "a gphoto2 error code.\n"
7930 "\n"
7931 "See also gphoto2.CameraWidget.get_label\n"
7932 ""},
7933 { "gp_widget_set_range", _wrap_gp_widget_set_range, METH_VARARGS, "\n"
7934 "gp_widget_set_range(range, low, high, increment) -> int\n"
7935 "\n"
7936 "Parameters\n"
7937 "----------\n"
7938 "range: gphoto2.CameraWidget\n"
7939 "low: float\n"
7940 "high: float\n"
7941 "increment: float\n"
7942 "\n"
7943 "Sets some range parameters of the CameraWidget. \n"
7944 "\n"
7945 "Parameters\n"
7946 "----------\n"
7947 "* `range` : \n"
7948 " a CameraWidget of type GP_WIDGET_RANGE \n"
7949 "* `min` : \n"
7950 "* `max` : \n"
7951 "* `increment` : \n"
7952 "\n"
7953 "Returns\n"
7954 "-------\n"
7955 "a gphoto2 error code.\n"
7956 "\n"
7957 "See also gphoto2.CameraWidget.set_range\n"
7958 ""},
7959 { "gp_widget_get_range", _wrap_gp_widget_get_range, METH_VARARGS, "\n"
7960 "gp_widget_get_range(range) -> int\n"
7961 "\n"
7962 "Parameters\n"
7963 "----------\n"
7964 "range: gphoto2.CameraWidget\n"
7965 "\n"
7966 "Retrieves some range parameters of the CameraWidget. \n"
7967 "\n"
7968 "Parameters\n"
7969 "----------\n"
7970 "* `range` : \n"
7971 " a CameraWidget of type GP_WIDGET_RANGE \n"
7972 "* `min` : \n"
7973 "* `max` : \n"
7974 "* `increment` : \n"
7975 "\n"
7976 "Returns\n"
7977 "-------\n"
7978 "a gphoto2 error code.\n"
7979 "\n"
7980 "See also gphoto2.CameraWidget.get_range\n"
7981 ""},
7982 { "gp_widget_add_choice", _wrap_gp_widget_add_choice, METH_VARARGS, "\n"
7983 "gp_widget_add_choice(widget, choice) -> int\n"
7984 "\n"
7985 "Parameters\n"
7986 "----------\n"
7987 "widget: gphoto2.CameraWidget\n"
7988 "choice: str\n"
7989 "\n"
7990 "Adds a choice to the CameraWidget. \n"
7991 "\n"
7992 "Parameters\n"
7993 "----------\n"
7994 "* `widget` : \n"
7995 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
7996 "* `choice` : \n"
7997 "\n"
7998 "Returns\n"
7999 "-------\n"
8000 "a gphoto2 error code.\n"
8001 "\n"
8002 "See also gphoto2.CameraWidget.add_choice\n"
8003 ""},
8004 { "gp_widget_count_choices", _wrap_gp_widget_count_choices, METH_VARARGS, "\n"
8005 "gp_widget_count_choices(widget) -> int\n"
8006 "\n"
8007 "Parameters\n"
8008 "----------\n"
8009 "widget: gphoto2.CameraWidget\n"
8010 "\n"
8011 "Counts the choices of the CameraWidget. \n"
8012 "\n"
8013 "Parameters\n"
8014 "----------\n"
8015 "* `widget` : \n"
8016 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
8017 "\n"
8018 "Returns\n"
8019 "-------\n"
8020 "a gphoto2 error code or number of choices.\n"
8021 "\n"
8022 "See also gphoto2.CameraWidget.count_choices\n"
8023 ""},
8024 { "gp_widget_get_choice", _wrap_gp_widget_get_choice, METH_VARARGS, "\n"
8025 "gp_widget_get_choice(widget, choice_number) -> int\n"
8026 "\n"
8027 "Parameters\n"
8028 "----------\n"
8029 "widget: gphoto2.CameraWidget\n"
8030 "choice_number: int\n"
8031 "\n"
8032 "Retrieves the choice number `choice_number`. \n"
8033 "\n"
8034 "Parameters\n"
8035 "----------\n"
8036 "* `widget` : \n"
8037 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
8038 "* `choice_number` : \n"
8039 "* `choice` : \n"
8040 "\n"
8041 "Returns\n"
8042 "-------\n"
8043 "a gphoto2 error code\n"
8044 "\n"
8045 "See also gphoto2.CameraWidget.get_choice\n"
8046 ""},
8047 { "gp_widget_changed", _wrap_gp_widget_changed, METH_VARARGS, "\n"
8048 "gp_widget_changed(widget) -> int\n"
8049 "\n"
8050 "Parameters\n"
8051 "----------\n"
8052 "widget: gphoto2.CameraWidget\n"
8053 "\n"
8054 "Tells if the widget has been changed. \n"
8055 "\n"
8056 "Parameters\n"
8057 "----------\n"
8058 "* `widget` : \n"
8059 " a CameraWidget \n"
8060 "\n"
8061 "Returns\n"
8062 "-------\n"
8063 "a gphoto2 error code or changed flag. \n"
8064 "\n"
8065 "Returns 1 if the state of the CameraWidget has been changed or 0 if not. \n"
8066 "\n"
8067 "Note: this formerly cleared the changed state. It no longer does with\n"
8068 "2.5.11.\n"
8069 "\n"
8070 "See also gphoto2.CameraWidget.changed\n"
8071 ""},
8072 { "gp_widget_set_changed", _wrap_gp_widget_set_changed, METH_VARARGS, "\n"
8073 "gp_widget_set_changed(widget, changed) -> int\n"
8074 "\n"
8075 "Parameters\n"
8076 "----------\n"
8077 "widget: gphoto2.CameraWidget\n"
8078 "changed: int\n"
8079 "\n"
8080 "Tells that the widget has been changed. \n"
8081 "\n"
8082 "Parameters\n"
8083 "----------\n"
8084 "* `widget` : \n"
8085 " a CameraWidget \n"
8086 "* `changed` : \n"
8087 " a boolean whether we changed or not \n"
8088 "\n"
8089 "Returns\n"
8090 "-------\n"
8091 "a gphoto2 error code \n"
8092 "\n"
8093 "Sets the changed of the CameraWidget depending on the changed parameter.\n"
8094 "\n"
8095 "See also gphoto2.CameraWidget.set_changed\n"
8096 ""},
8097 { "gp_widget_set_readonly", _wrap_gp_widget_set_readonly, METH_VARARGS, "\n"
8098 "gp_widget_set_readonly(widget, readonly) -> int\n"
8099 "\n"
8100 "Parameters\n"
8101 "----------\n"
8102 "widget: gphoto2.CameraWidget\n"
8103 "readonly: int\n"
8104 "\n"
8105 "Tells that the widget is readonly. \n"
8106 "\n"
8107 "Parameters\n"
8108 "----------\n"
8109 "* `widget` : \n"
8110 " a CameraWidget \n"
8111 "* `changed` : \n"
8112 " a boolean whether we are readonly or not \n"
8113 "\n"
8114 "Returns\n"
8115 "-------\n"
8116 "a gphoto2 error code \n"
8117 "\n"
8118 "Sets the readonly of the CameraWidget depending on the changed\n"
8119 "parameter. \n"
8120 "\n"
8121 "Only useful when called from the camera driver.\n"
8122 "\n"
8123 "See also gphoto2.CameraWidget.set_readonly\n"
8124 ""},
8125 { "gp_widget_get_readonly", _wrap_gp_widget_get_readonly, METH_VARARGS, "\n"
8126 "gp_widget_get_readonly(widget) -> int\n"
8127 "\n"
8128 "Parameters\n"
8129 "----------\n"
8130 "widget: gphoto2.CameraWidget\n"
8131 "\n"
8132 "Retrieves the readonly state of the CameraWidget. \n"
8133 "\n"
8134 "Parameters\n"
8135 "----------\n"
8136 "* `widget` : \n"
8137 " a CameraWidget \n"
8138 "* `readonly` : \n"
8139 "\n"
8140 "Returns\n"
8141 "-------\n"
8142 "a gphoto2 error code.\n"
8143 "\n"
8144 "See also gphoto2.CameraWidget.get_readonly\n"
8145 ""},
8146 { NULL, NULL, 0, NULL }
8147 };
8148
8149 static PyMethodDef SwigMethods_proxydocs[] = {
8150 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
8151 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
8152 { "gp_widget_set_value", _wrap_gp_widget_set_value, METH_VARARGS, "\n"
8153 "gp_widget_set_value(widget, value) -> int\n"
8154 "\n"
8155 "Parameters\n"
8156 "----------\n"
8157 "widget: gphoto2.CameraWidget\n"
8158 "value: str\n"
8159 "\n"
8160 "gp_widget_set_value(widget, value) -> int\n"
8161 "\n"
8162 "Parameters\n"
8163 "----------\n"
8164 "widget: gphoto2.CameraWidget\n"
8165 "value: float const *\n"
8166 "\n"
8167 "gp_widget_set_value(widget, value) -> int\n"
8168 "\n"
8169 "Parameters\n"
8170 "----------\n"
8171 "widget: gphoto2.CameraWidget\n"
8172 "value: int const *\n"
8173 "\n"
8174 "Sets the value of the widget. \n"
8175 "\n"
8176 "Parameters\n"
8177 "----------\n"
8178 "* `widget` : \n"
8179 " a CameraWidget \n"
8180 "* `value` : \n"
8181 "\n"
8182 "Returns\n"
8183 "-------\n"
8184 "a gphoto2 error code. \n"
8185 "\n"
8186 "Please pass (char*) for GP_WIDGET_MENU, GP_WIDGET_TEXT, GP_WIDGET_RADIO,\n"
8187 "(float) for GP_WIDGET_RANGE, (int) for GP_WIDGET_DATE, GP_WIDGET_TOGGLE,\n"
8188 "and (CameraWidgetCallback) for GP_WIDGET_BUTTON.\n"
8189 "\n"
8190 "See also gphoto2.CameraWidget.set_value\n"
8191 ""},
8192 { "gp_widget_get_value", _wrap_gp_widget_get_value, METH_VARARGS, "\n"
8193 "gp_widget_get_value(widget) -> int\n"
8194 "\n"
8195 "Parameters\n"
8196 "----------\n"
8197 "widget: gphoto2.CameraWidget\n"
8198 "\n"
8199 "gp_widget_get_value(widget) -> int\n"
8200 "\n"
8201 "Parameters\n"
8202 "----------\n"
8203 "widget: gphoto2.CameraWidget\n"
8204 "\n"
8205 "gp_widget_get_value(widget) -> int\n"
8206 "\n"
8207 "Parameters\n"
8208 "----------\n"
8209 "widget: gphoto2.CameraWidget\n"
8210 "\n"
8211 "Retrieves the value of the CameraWidget. \n"
8212 "\n"
8213 "Parameters\n"
8214 "----------\n"
8215 "* `widget` : \n"
8216 " a CameraWidget \n"
8217 "* `value` : \n"
8218 "\n"
8219 "Returns\n"
8220 "-------\n"
8221 "a gphoto2 error code.\n"
8222 "\n"
8223 "See also gphoto2.CameraWidget.get_value\n"
8224 ""},
8225 { "gp_widget_get_children", _wrap_gp_widget_get_children, METH_VARARGS, "\n"
8226 "gp_widget_get_children(widget) -> int\n"
8227 "\n"
8228 "Parameters\n"
8229 "----------\n"
8230 "widget: gphoto2.CameraWidget\n"
8231 "\n"
8232 "Gets all the child widgets of a CameraWidget. The return value is a list\n"
8233 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
8234 "be used to get each child in sequence.\n"
8235 "\n"
8236 "Parameters\n"
8237 "----------\n"
8238 "* `widget` :\n"
8239 " a CameraWidget\n"
8240 "\n"
8241 "Returns\n"
8242 "-------\n"
8243 "a gphoto2 error code and a Python iterator.\n"
8244 "\n"
8245 "See also gphoto2.CameraWidget.get_children\n"
8246 ""},
8247 { "gp_widget_get_choices", _wrap_gp_widget_get_choices, METH_VARARGS, "\n"
8248 "gp_widget_get_choices(widget) -> int\n"
8249 "\n"
8250 "Parameters\n"
8251 "----------\n"
8252 "widget: gphoto2.CameraWidget\n"
8253 "\n"
8254 "Gets all the choice values of a CameraWidget. The return value is a list\n"
8255 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
8256 "be used to get each choice in sequence.\n"
8257 "\n"
8258 "Parameters\n"
8259 "----------\n"
8260 "* `widget` :\n"
8261 " a CameraWidget\n"
8262 "\n"
8263 "Returns\n"
8264 "-------\n"
8265 "a gphoto2 error code and a Python iterator.\n"
8266 "\n"
8267 "See also gphoto2.CameraWidget.get_choices\n"
8268 ""},
8269 { "gp_widget_append", _wrap_gp_widget_append, METH_VARARGS, "\n"
8270 "gp_widget_append(widget, child) -> int\n"
8271 "\n"
8272 "Parameters\n"
8273 "----------\n"
8274 "widget: gphoto2.CameraWidget\n"
8275 "child: gphoto2.CameraWidget\n"
8276 "\n"
8277 "Appends a CameraWidget to a CameraWidget. \n"
8278 "\n"
8279 "Parameters\n"
8280 "----------\n"
8281 "* `widget` : \n"
8282 " a CameraWidget \n"
8283 "* `child` : \n"
8284 " the CameraWidget you would like to append to above \n"
8285 "\n"
8286 "Returns\n"
8287 "-------\n"
8288 "a gphoto2 error code.\n"
8289 "\n"
8290 "See also gphoto2.CameraWidget.append\n"
8291 ""},
8292 { "gp_widget_prepend", _wrap_gp_widget_prepend, METH_VARARGS, "\n"
8293 "gp_widget_prepend(widget, child) -> int\n"
8294 "\n"
8295 "Parameters\n"
8296 "----------\n"
8297 "widget: gphoto2.CameraWidget\n"
8298 "child: gphoto2.CameraWidget\n"
8299 "\n"
8300 "Prepends a CameraWidget to a CameraWidget. \n"
8301 "\n"
8302 "Parameters\n"
8303 "----------\n"
8304 "* `widget` : \n"
8305 " a CameraWidget \n"
8306 "* `child` : \n"
8307 " the CameraWidget you would like to prepend to above \n"
8308 "\n"
8309 "Returns\n"
8310 "-------\n"
8311 "a gphoto2 error code.\n"
8312 "\n"
8313 "See also gphoto2.CameraWidget.prepend\n"
8314 ""},
8315 { "gp_widget_count_children", _wrap_gp_widget_count_children, METH_VARARGS, "\n"
8316 "gp_widget_count_children(widget) -> int\n"
8317 "\n"
8318 "Parameters\n"
8319 "----------\n"
8320 "widget: gphoto2.CameraWidget\n"
8321 "\n"
8322 "Counts the children of the CameraWidget. \n"
8323 "\n"
8324 "Parameters\n"
8325 "----------\n"
8326 "* `widget` : \n"
8327 " a CameraWidget \n"
8328 "\n"
8329 "Returns\n"
8330 "-------\n"
8331 "a gphoto2 error code or number of children\n"
8332 "\n"
8333 "See also gphoto2.CameraWidget.count_children\n"
8334 ""},
8335 { "gp_widget_get_child", _wrap_gp_widget_get_child, METH_VARARGS, "\n"
8336 "gp_widget_get_child(widget, child_number) -> int\n"
8337 "\n"
8338 "Parameters\n"
8339 "----------\n"
8340 "widget: gphoto2.CameraWidget\n"
8341 "child_number: int\n"
8342 "\n"
8343 "Retrieves the child number `child_number` of the parent. \n"
8344 "\n"
8345 "Parameters\n"
8346 "----------\n"
8347 "* `widget` : \n"
8348 " a CameraWidget \n"
8349 "* `child_number` : \n"
8350 " the number of the child \n"
8351 "* `child` : \n"
8352 "\n"
8353 "Returns\n"
8354 "-------\n"
8355 "a gphoto2 error code.\n"
8356 "\n"
8357 "See also gphoto2.CameraWidget.get_child\n"
8358 ""},
8359 { "gp_widget_get_child_by_label", _wrap_gp_widget_get_child_by_label, METH_VARARGS, "\n"
8360 "gp_widget_get_child_by_label(widget, label) -> int\n"
8361 "\n"
8362 "Parameters\n"
8363 "----------\n"
8364 "widget: gphoto2.CameraWidget\n"
8365 "label: str\n"
8366 "\n"
8367 "Retrieves the child with label `label` of the CameraWidget. \n"
8368 "\n"
8369 "Parameters\n"
8370 "----------\n"
8371 "* `widget` : \n"
8372 " a CameraWidget \n"
8373 "* `label` : \n"
8374 " the label of the child \n"
8375 "* `child` : \n"
8376 "\n"
8377 "Returns\n"
8378 "-------\n"
8379 "a gphoto2 error code.\n"
8380 "\n"
8381 "See also gphoto2.CameraWidget.get_child_by_label\n"
8382 ""},
8383 { "gp_widget_get_child_by_id", _wrap_gp_widget_get_child_by_id, METH_VARARGS, "\n"
8384 "gp_widget_get_child_by_id(widget, id) -> int\n"
8385 "\n"
8386 "Parameters\n"
8387 "----------\n"
8388 "widget: gphoto2.CameraWidget\n"
8389 "id: int\n"
8390 "\n"
8391 "Retrieves the child with id `id` of the widget. \n"
8392 "\n"
8393 "Parameters\n"
8394 "----------\n"
8395 "* `widget` : \n"
8396 " a CameraWidget \n"
8397 "* `id` : \n"
8398 " the id of the child \n"
8399 "* `child` : \n"
8400 "\n"
8401 "Returns\n"
8402 "-------\n"
8403 "a gphoto2 error code.\n"
8404 "\n"
8405 "See also gphoto2.CameraWidget.get_child_by_id\n"
8406 ""},
8407 { "gp_widget_get_child_by_name", _wrap_gp_widget_get_child_by_name, METH_VARARGS, "\n"
8408 "gp_widget_get_child_by_name(widget, name) -> int\n"
8409 "\n"
8410 "Parameters\n"
8411 "----------\n"
8412 "widget: gphoto2.CameraWidget\n"
8413 "name: str\n"
8414 "\n"
8415 "Retrieves the child with name `name` of the widget. \n"
8416 "\n"
8417 "Parameters\n"
8418 "----------\n"
8419 "* `widget` : \n"
8420 " a CameraWidget \n"
8421 "* `name` : \n"
8422 " the name of the child \n"
8423 "\n"
8424 "Returns\n"
8425 "-------\n"
8426 "a gphoto2 error code.\n"
8427 "\n"
8428 "See also gphoto2.CameraWidget.get_child_by_name\n"
8429 ""},
8430 { "gp_widget_get_root", _wrap_gp_widget_get_root, METH_VARARGS, "\n"
8431 "gp_widget_get_root(widget) -> int\n"
8432 "\n"
8433 "Parameters\n"
8434 "----------\n"
8435 "widget: gphoto2.CameraWidget\n"
8436 "\n"
8437 "Retrieves the root of the CameraWidget. \n"
8438 "\n"
8439 "Parameters\n"
8440 "----------\n"
8441 "* `widget` : \n"
8442 " a CameraWidget \n"
8443 "* `root` : \n"
8444 "\n"
8445 "Returns\n"
8446 "-------\n"
8447 "a gphoto2 error code.\n"
8448 "\n"
8449 "See also gphoto2.CameraWidget.get_root\n"
8450 ""},
8451 { "gp_widget_get_parent", _wrap_gp_widget_get_parent, METH_VARARGS, "\n"
8452 "gp_widget_get_parent(widget) -> int\n"
8453 "\n"
8454 "Parameters\n"
8455 "----------\n"
8456 "widget: gphoto2.CameraWidget\n"
8457 "\n"
8458 "Retrieves the parent of a CameraWidget. \n"
8459 "\n"
8460 "Parameters\n"
8461 "----------\n"
8462 "* `widget` : \n"
8463 " a CameraWidget \n"
8464 "* `parent` : \n"
8465 " the pointer to the parent to return \n"
8466 "\n"
8467 "Returns\n"
8468 "-------\n"
8469 "a gphoto2 error code.\n"
8470 "\n"
8471 "See also gphoto2.CameraWidget.get_parent\n"
8472 ""},
8473 { "gp_widget_set_name", _wrap_gp_widget_set_name, METH_VARARGS, "\n"
8474 "gp_widget_set_name(widget, name) -> int\n"
8475 "\n"
8476 "Parameters\n"
8477 "----------\n"
8478 "widget: gphoto2.CameraWidget\n"
8479 "name: str\n"
8480 "\n"
8481 "Sets the name of the widget. \n"
8482 "\n"
8483 "Parameters\n"
8484 "----------\n"
8485 "* `widget` : \n"
8486 " a CameraWidget \n"
8487 "* `name` : \n"
8488 " Name of above widget \n"
8489 "\n"
8490 "Returns\n"
8491 "-------\n"
8492 "a gphoto2 error code.\n"
8493 "\n"
8494 "See also gphoto2.CameraWidget.set_name\n"
8495 ""},
8496 { "gp_widget_get_name", _wrap_gp_widget_get_name, METH_VARARGS, "\n"
8497 "gp_widget_get_name(widget) -> int\n"
8498 "\n"
8499 "Parameters\n"
8500 "----------\n"
8501 "widget: gphoto2.CameraWidget\n"
8502 "\n"
8503 "Gets the name of the widget. \n"
8504 "\n"
8505 "Parameters\n"
8506 "----------\n"
8507 "* `widget` : \n"
8508 " a CameraWidget \n"
8509 "* `name` : \n"
8510 " Name of above widget \n"
8511 "\n"
8512 "Returns\n"
8513 "-------\n"
8514 "a gphoto2 error code.\n"
8515 "\n"
8516 "See also gphoto2.CameraWidget.get_name\n"
8517 ""},
8518 { "gp_widget_set_info", _wrap_gp_widget_set_info, METH_VARARGS, "\n"
8519 "gp_widget_set_info(widget, info) -> int\n"
8520 "\n"
8521 "Parameters\n"
8522 "----------\n"
8523 "widget: gphoto2.CameraWidget\n"
8524 "info: str\n"
8525 "\n"
8526 "Sets the information about the widget. \n"
8527 "\n"
8528 "Parameters\n"
8529 "----------\n"
8530 "* `widget` : \n"
8531 " a CameraWidget \n"
8532 "* `info` : \n"
8533 " Information about above widget \n"
8534 "\n"
8535 "Returns\n"
8536 "-------\n"
8537 "a gphoto2 error code.\n"
8538 "\n"
8539 "See also gphoto2.CameraWidget.set_info\n"
8540 ""},
8541 { "gp_widget_get_info", _wrap_gp_widget_get_info, METH_VARARGS, "\n"
8542 "gp_widget_get_info(widget) -> int\n"
8543 "\n"
8544 "Parameters\n"
8545 "----------\n"
8546 "widget: gphoto2.CameraWidget\n"
8547 "\n"
8548 "Retrieves the information about the widget. \n"
8549 "\n"
8550 "Parameters\n"
8551 "----------\n"
8552 "* `widget` : \n"
8553 " a CameraWidget \n"
8554 "* `info` : \n"
8555 "\n"
8556 "Returns\n"
8557 "-------\n"
8558 "a gphoto2 error code.\n"
8559 "\n"
8560 "See also gphoto2.CameraWidget.get_info\n"
8561 ""},
8562 { "gp_widget_get_id", _wrap_gp_widget_get_id, METH_VARARGS, "\n"
8563 "gp_widget_get_id(widget) -> int\n"
8564 "\n"
8565 "Parameters\n"
8566 "----------\n"
8567 "widget: gphoto2.CameraWidget\n"
8568 "\n"
8569 "Retrieves the unique id of the CameraWidget. \n"
8570 "\n"
8571 "Parameters\n"
8572 "----------\n"
8573 "* `widget` : \n"
8574 " a CameraWidget \n"
8575 "* `id` : \n"
8576 "\n"
8577 "Returns\n"
8578 "-------\n"
8579 "a gphoto2 error code.\n"
8580 "\n"
8581 "See also gphoto2.CameraWidget.get_id\n"
8582 ""},
8583 { "gp_widget_get_type", _wrap_gp_widget_get_type, METH_VARARGS, "\n"
8584 "gp_widget_get_type(widget) -> int\n"
8585 "\n"
8586 "Parameters\n"
8587 "----------\n"
8588 "widget: gphoto2.CameraWidget\n"
8589 "\n"
8590 "Retrieves the type of the CameraWidget. \n"
8591 "\n"
8592 "Parameters\n"
8593 "----------\n"
8594 "* `widget` : \n"
8595 " a CameraWidget \n"
8596 "* `type` : \n"
8597 "\n"
8598 "Returns\n"
8599 "-------\n"
8600 "a gphoto2 error code.\n"
8601 "\n"
8602 "See also gphoto2.CameraWidget.get_type\n"
8603 ""},
8604 { "gp_widget_get_label", _wrap_gp_widget_get_label, METH_VARARGS, "\n"
8605 "gp_widget_get_label(widget) -> int\n"
8606 "\n"
8607 "Parameters\n"
8608 "----------\n"
8609 "widget: gphoto2.CameraWidget\n"
8610 "\n"
8611 "Retrieves the label of the CameraWidget. \n"
8612 "\n"
8613 "Parameters\n"
8614 "----------\n"
8615 "* `widget` : \n"
8616 " a CameraWidget \n"
8617 "* `label` : \n"
8618 "\n"
8619 "Returns\n"
8620 "-------\n"
8621 "a gphoto2 error code.\n"
8622 "\n"
8623 "See also gphoto2.CameraWidget.get_label\n"
8624 ""},
8625 { "gp_widget_set_range", _wrap_gp_widget_set_range, METH_VARARGS, "\n"
8626 "gp_widget_set_range(range, low, high, increment) -> int\n"
8627 "\n"
8628 "Parameters\n"
8629 "----------\n"
8630 "range: gphoto2.CameraWidget\n"
8631 "low: float\n"
8632 "high: float\n"
8633 "increment: float\n"
8634 "\n"
8635 "Sets some range parameters of the CameraWidget. \n"
8636 "\n"
8637 "Parameters\n"
8638 "----------\n"
8639 "* `range` : \n"
8640 " a CameraWidget of type GP_WIDGET_RANGE \n"
8641 "* `min` : \n"
8642 "* `max` : \n"
8643 "* `increment` : \n"
8644 "\n"
8645 "Returns\n"
8646 "-------\n"
8647 "a gphoto2 error code.\n"
8648 "\n"
8649 "See also gphoto2.CameraWidget.set_range\n"
8650 ""},
8651 { "gp_widget_get_range", _wrap_gp_widget_get_range, METH_VARARGS, "\n"
8652 "gp_widget_get_range(range) -> int\n"
8653 "\n"
8654 "Parameters\n"
8655 "----------\n"
8656 "range: gphoto2.CameraWidget\n"
8657 "\n"
8658 "Retrieves some range parameters of the CameraWidget. \n"
8659 "\n"
8660 "Parameters\n"
8661 "----------\n"
8662 "* `range` : \n"
8663 " a CameraWidget of type GP_WIDGET_RANGE \n"
8664 "* `min` : \n"
8665 "* `max` : \n"
8666 "* `increment` : \n"
8667 "\n"
8668 "Returns\n"
8669 "-------\n"
8670 "a gphoto2 error code.\n"
8671 "\n"
8672 "See also gphoto2.CameraWidget.get_range\n"
8673 ""},
8674 { "gp_widget_add_choice", _wrap_gp_widget_add_choice, METH_VARARGS, "\n"
8675 "gp_widget_add_choice(widget, choice) -> int\n"
8676 "\n"
8677 "Parameters\n"
8678 "----------\n"
8679 "widget: gphoto2.CameraWidget\n"
8680 "choice: str\n"
8681 "\n"
8682 "Adds a choice to the CameraWidget. \n"
8683 "\n"
8684 "Parameters\n"
8685 "----------\n"
8686 "* `widget` : \n"
8687 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
8688 "* `choice` : \n"
8689 "\n"
8690 "Returns\n"
8691 "-------\n"
8692 "a gphoto2 error code.\n"
8693 "\n"
8694 "See also gphoto2.CameraWidget.add_choice\n"
8695 ""},
8696 { "gp_widget_count_choices", _wrap_gp_widget_count_choices, METH_VARARGS, "\n"
8697 "gp_widget_count_choices(widget) -> int\n"
8698 "\n"
8699 "Parameters\n"
8700 "----------\n"
8701 "widget: gphoto2.CameraWidget\n"
8702 "\n"
8703 "Counts the choices of the CameraWidget. \n"
8704 "\n"
8705 "Parameters\n"
8706 "----------\n"
8707 "* `widget` : \n"
8708 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
8709 "\n"
8710 "Returns\n"
8711 "-------\n"
8712 "a gphoto2 error code or number of choices.\n"
8713 "\n"
8714 "See also gphoto2.CameraWidget.count_choices\n"
8715 ""},
8716 { "gp_widget_get_choice", _wrap_gp_widget_get_choice, METH_VARARGS, "\n"
8717 "gp_widget_get_choice(widget, choice_number) -> int\n"
8718 "\n"
8719 "Parameters\n"
8720 "----------\n"
8721 "widget: gphoto2.CameraWidget\n"
8722 "choice_number: int\n"
8723 "\n"
8724 "Retrieves the choice number `choice_number`. \n"
8725 "\n"
8726 "Parameters\n"
8727 "----------\n"
8728 "* `widget` : \n"
8729 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
8730 "* `choice_number` : \n"
8731 "* `choice` : \n"
8732 "\n"
8733 "Returns\n"
8734 "-------\n"
8735 "a gphoto2 error code\n"
8736 "\n"
8737 "See also gphoto2.CameraWidget.get_choice\n"
8738 ""},
8739 { "gp_widget_changed", _wrap_gp_widget_changed, METH_VARARGS, "\n"
8740 "gp_widget_changed(widget) -> int\n"
8741 "\n"
8742 "Parameters\n"
8743 "----------\n"
8744 "widget: gphoto2.CameraWidget\n"
8745 "\n"
8746 "Tells if the widget has been changed. \n"
8747 "\n"
8748 "Parameters\n"
8749 "----------\n"
8750 "* `widget` : \n"
8751 " a CameraWidget \n"
8752 "\n"
8753 "Returns\n"
8754 "-------\n"
8755 "a gphoto2 error code or changed flag. \n"
8756 "\n"
8757 "Returns 1 if the state of the CameraWidget has been changed or 0 if not. \n"
8758 "\n"
8759 "Note: this formerly cleared the changed state. It no longer does with\n"
8760 "2.5.11.\n"
8761 "\n"
8762 "See also gphoto2.CameraWidget.changed\n"
8763 ""},
8764 { "gp_widget_set_changed", _wrap_gp_widget_set_changed, METH_VARARGS, "\n"
8765 "gp_widget_set_changed(widget, changed) -> int\n"
8766 "\n"
8767 "Parameters\n"
8768 "----------\n"
8769 "widget: gphoto2.CameraWidget\n"
8770 "changed: int\n"
8771 "\n"
8772 "Tells that the widget has been changed. \n"
8773 "\n"
8774 "Parameters\n"
8775 "----------\n"
8776 "* `widget` : \n"
8777 " a CameraWidget \n"
8778 "* `changed` : \n"
8779 " a boolean whether we changed or not \n"
8780 "\n"
8781 "Returns\n"
8782 "-------\n"
8783 "a gphoto2 error code \n"
8784 "\n"
8785 "Sets the changed of the CameraWidget depending on the changed parameter.\n"
8786 "\n"
8787 "See also gphoto2.CameraWidget.set_changed\n"
8788 ""},
8789 { "gp_widget_set_readonly", _wrap_gp_widget_set_readonly, METH_VARARGS, "\n"
8790 "gp_widget_set_readonly(widget, readonly) -> int\n"
8791 "\n"
8792 "Parameters\n"
8793 "----------\n"
8794 "widget: gphoto2.CameraWidget\n"
8795 "readonly: int\n"
8796 "\n"
8797 "Tells that the widget is readonly. \n"
8798 "\n"
8799 "Parameters\n"
8800 "----------\n"
8801 "* `widget` : \n"
8802 " a CameraWidget \n"
8803 "* `changed` : \n"
8804 " a boolean whether we are readonly or not \n"
8805 "\n"
8806 "Returns\n"
8807 "-------\n"
8808 "a gphoto2 error code \n"
8809 "\n"
8810 "Sets the readonly of the CameraWidget depending on the changed\n"
8811 "parameter. \n"
8812 "\n"
8813 "Only useful when called from the camera driver.\n"
8814 "\n"
8815 "See also gphoto2.CameraWidget.set_readonly\n"
8816 ""},
8817 { "gp_widget_get_readonly", _wrap_gp_widget_get_readonly, METH_VARARGS, "\n"
8818 "gp_widget_get_readonly(widget) -> int\n"
8819 "\n"
8820 "Parameters\n"
8821 "----------\n"
8822 "widget: gphoto2.CameraWidget\n"
8823 "\n"
8824 "Retrieves the readonly state of the CameraWidget. \n"
8825 "\n"
8826 "Parameters\n"
8827 "----------\n"
8828 "* `widget` : \n"
8829 " a CameraWidget \n"
8830 "* `readonly` : \n"
8831 "\n"
8832 "Returns\n"
8833 "-------\n"
8834 "a gphoto2 error code.\n"
8835 "\n"
8836 "See also gphoto2.CameraWidget.get_readonly\n"
8837 ""},
8838 { NULL, NULL, 0, NULL }
8839 };
8840
8841 static SwigPyGetSet CameraWidgetChildIter___dict___getset = { SwigPyObject_get___dict__, 0 };
8842 SWIGINTERN PyGetSetDef SwigPyBuiltin__CameraWidgetChildIter_getset[] = {
8843 { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n"
8844 "gp_widget_set_value\n"
8845 "gp_widget_set_value\n"
8846 "gp_widget_set_value\n"
8847 "Sets the value of the widget. \n"
8848 "\n"
8849 "Parameters\n"
8850 "----------\n"
8851 "* `widget` : \n"
8852 " a CameraWidget \n"
8853 "* `value` : \n"
8854 "\n"
8855 "Returns\n"
8856 "-------\n"
8857 "a gphoto2 error code. \n"
8858 "\n"
8859 "Please pass (char*) for GP_WIDGET_MENU, GP_WIDGET_TEXT, GP_WIDGET_RADIO,\n"
8860 "(float) for GP_WIDGET_RANGE, (int) for GP_WIDGET_DATE, GP_WIDGET_TOGGLE,\n"
8861 "and (CameraWidgetCallback) for GP_WIDGET_BUTTON.\n"
8862 "\n"
8863 "See also gphoto2.CameraWidget.set_value\n"
8864 "", &CameraWidgetChildIter___dict___getset },
8865 { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
8866 };
8867
8868 SWIGINTERN PyObject *
SwigPyBuiltin__CameraWidgetChildIter_richcompare(PyObject * self,PyObject * other,int op)8869 SwigPyBuiltin__CameraWidgetChildIter_richcompare(PyObject *self, PyObject *other, int op) {
8870 PyObject *result = NULL;
8871 PyObject *tuple = PyTuple_New(1);
8872 assert(tuple);
8873 PyTuple_SET_ITEM(tuple, 0, other);
8874 Py_XINCREF(other);
8875 if (!result) {
8876 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
8877 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
8878 } else {
8879 result = Py_NotImplemented;
8880 Py_INCREF(result);
8881 }
8882 }
8883 Py_DECREF(tuple);
8884 return result;
8885 }
8886
8887 SWIGINTERN PyMethodDef SwigPyBuiltin__CameraWidgetChildIter_methods[] = {
8888 { "__next__", _wrap_CameraWidgetChildIter___next__, METH_VARARGS, "__next__(self) -> CameraWidget" },
8889 { NULL, NULL, 0, NULL } /* Sentinel */
8890 };
8891
8892 static PyHeapTypeObject SwigPyBuiltin__CameraWidgetChildIter_type = {
8893 {
8894 #if PY_VERSION_HEX >= 0x03000000
8895 PyVarObject_HEAD_INIT(NULL, 0)
8896 #else
8897 PyObject_HEAD_INIT(NULL)
8898 0, /* ob_size */
8899 #endif
8900 "gphoto2.widget.CameraWidgetChildIter", /* tp_name */
8901 sizeof(SwigPyObject), /* tp_basicsize */
8902 0, /* tp_itemsize */
8903 _wrap_delete_CameraWidgetChildIter_destructor_closure, /* tp_dealloc */
8904 (printfunc) 0, /* tp_print */
8905 (getattrfunc) 0, /* tp_getattr */
8906 (setattrfunc) 0, /* tp_setattr */
8907 #if PY_VERSION_HEX >= 0x03000000
8908 0, /* tp_compare */
8909 #else
8910 (cmpfunc) 0, /* tp_compare */
8911 #endif
8912 (reprfunc) 0, /* tp_repr */
8913 &SwigPyBuiltin__CameraWidgetChildIter_type.as_number, /* tp_as_number */
8914 &SwigPyBuiltin__CameraWidgetChildIter_type.as_sequence, /* tp_as_sequence */
8915 &SwigPyBuiltin__CameraWidgetChildIter_type.as_mapping, /* tp_as_mapping */
8916 SwigPyObject_hash, /* tp_hash */
8917 (ternaryfunc) 0, /* tp_call */
8918 (reprfunc) 0, /* tp_str */
8919 (getattrofunc) 0, /* tp_getattro */
8920 (setattrofunc) 0, /* tp_setattro */
8921 &SwigPyBuiltin__CameraWidgetChildIter_type.as_buffer, /* tp_as_buffer */
8922 #if PY_VERSION_HEX >= 0x03000000
8923 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
8924 #else
8925 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
8926 #endif
8927 "::CameraWidgetChildIter", /* tp_doc */
8928 (traverseproc) 0, /* tp_traverse */
8929 (inquiry) 0, /* tp_clear */
8930 SwigPyBuiltin__CameraWidgetChildIter_richcompare, /* tp_richcompare */
8931 0, /* tp_weaklistoffset */
8932 make_iterator, /* tp_iter */
8933 _wrap_CameraWidgetChildIter___next___iternextfunc_closure, /* tp_iternext */
8934 SwigPyBuiltin__CameraWidgetChildIter_methods, /* tp_methods */
8935 0, /* tp_members */
8936 SwigPyBuiltin__CameraWidgetChildIter_getset, /* tp_getset */
8937 0, /* tp_base */
8938 0, /* tp_dict */
8939 (descrgetfunc) 0, /* tp_descr_get */
8940 (descrsetfunc) 0, /* tp_descr_set */
8941 offsetof(SwigPyObject, dict), /* tp_dictoffset */
8942 SwigPyBuiltin_BadInit, /* tp_init */
8943 (allocfunc) 0, /* tp_alloc */
8944 (newfunc) 0, /* tp_new */
8945 (freefunc) 0, /* tp_free */
8946 (inquiry) 0, /* tp_is_gc */
8947 (PyObject *) 0, /* tp_bases */
8948 (PyObject *) 0, /* tp_mro */
8949 (PyObject *) 0, /* tp_cache */
8950 (PyObject *) 0, /* tp_subclasses */
8951 (PyObject *) 0, /* tp_weaklist */
8952 (destructor) 0, /* tp_del */
8953 (int) 0, /* tp_version_tag */
8954 #if PY_VERSION_HEX >= 0x03040000
8955 (destructor) 0, /* tp_finalize */
8956 #endif
8957 #if PY_VERSION_HEX >= 0x03080000
8958 (vectorcallfunc) 0, /* tp_vectorcall */
8959 #endif
8960 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
8961 0, /* tp_print */
8962 #endif
8963 #ifdef COUNT_ALLOCS
8964 (Py_ssize_t) 0, /* tp_allocs */
8965 (Py_ssize_t) 0, /* tp_frees */
8966 (Py_ssize_t) 0, /* tp_maxalloc */
8967 0, /* tp_prev */
8968 0, /* tp_next */
8969 #endif
8970 },
8971 #if PY_VERSION_HEX >= 0x03050000
8972 {
8973 (unaryfunc) 0, /* am_await */
8974 (unaryfunc) 0, /* am_aiter */
8975 (unaryfunc) 0, /* am_anext */
8976 },
8977 #endif
8978 {
8979 (binaryfunc) 0, /* nb_add */
8980 (binaryfunc) 0, /* nb_subtract */
8981 (binaryfunc) 0, /* nb_multiply */
8982 #if PY_VERSION_HEX < 0x03000000
8983 (binaryfunc) 0, /* nb_divide */
8984 #endif
8985 (binaryfunc) 0, /* nb_remainder */
8986 (binaryfunc) 0, /* nb_divmod */
8987 (ternaryfunc) 0, /* nb_power */
8988 (unaryfunc) 0, /* nb_negative */
8989 (unaryfunc) 0, /* nb_positive */
8990 (unaryfunc) 0, /* nb_absolute */
8991 (inquiry) 0, /* nb_nonzero */
8992 (unaryfunc) 0, /* nb_invert */
8993 (binaryfunc) 0, /* nb_lshift */
8994 (binaryfunc) 0, /* nb_rshift */
8995 (binaryfunc) 0, /* nb_and */
8996 (binaryfunc) 0, /* nb_xor */
8997 (binaryfunc) 0, /* nb_or */
8998 #if PY_VERSION_HEX < 0x03000000
8999 (coercion) 0, /* nb_coerce */
9000 #endif
9001 (unaryfunc) 0, /* nb_int */
9002 #if PY_VERSION_HEX >= 0x03000000
9003 (void *) 0, /* nb_reserved */
9004 #else
9005 (unaryfunc) 0, /* nb_long */
9006 #endif
9007 (unaryfunc) 0, /* nb_float */
9008 #if PY_VERSION_HEX < 0x03000000
9009 (unaryfunc) 0, /* nb_oct */
9010 (unaryfunc) 0, /* nb_hex */
9011 #endif
9012 (binaryfunc) 0, /* nb_inplace_add */
9013 (binaryfunc) 0, /* nb_inplace_subtract */
9014 (binaryfunc) 0, /* nb_inplace_multiply */
9015 #if PY_VERSION_HEX < 0x03000000
9016 (binaryfunc) 0, /* nb_inplace_divide */
9017 #endif
9018 (binaryfunc) 0, /* nb_inplace_remainder */
9019 (ternaryfunc) 0, /* nb_inplace_power */
9020 (binaryfunc) 0, /* nb_inplace_lshift */
9021 (binaryfunc) 0, /* nb_inplace_rshift */
9022 (binaryfunc) 0, /* nb_inplace_and */
9023 (binaryfunc) 0, /* nb_inplace_xor */
9024 (binaryfunc) 0, /* nb_inplace_or */
9025 (binaryfunc) 0, /* nb_floor_divide */
9026 (binaryfunc) 0, /* nb_true_divide */
9027 (binaryfunc) 0, /* nb_inplace_floor_divide */
9028 (binaryfunc) 0, /* nb_inplace_true_divide */
9029 (unaryfunc) 0, /* nb_index */
9030 #if PY_VERSION_HEX >= 0x03050000
9031 (binaryfunc) 0, /* nb_matrix_multiply */
9032 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
9033 #endif
9034 },
9035 {
9036 (lenfunc) 0, /* mp_length */
9037 (binaryfunc) 0, /* mp_subscript */
9038 (objobjargproc) 0, /* mp_ass_subscript */
9039 },
9040 {
9041 (lenfunc) 0, /* sq_length */
9042 (binaryfunc) 0, /* sq_concat */
9043 (ssizeargfunc) 0, /* sq_repeat */
9044 (ssizeargfunc) 0, /* sq_item */
9045 #if PY_VERSION_HEX >= 0x03000000
9046 (void *) 0, /* was_sq_slice */
9047 #else
9048 (ssizessizeargfunc) 0, /* sq_slice */
9049 #endif
9050 (ssizeobjargproc) 0, /* sq_ass_item */
9051 #if PY_VERSION_HEX >= 0x03000000
9052 (void *) 0, /* was_sq_ass_slice */
9053 #else
9054 (ssizessizeobjargproc) 0, /* sq_ass_slice */
9055 #endif
9056 (objobjproc) 0, /* sq_contains */
9057 (binaryfunc) 0, /* sq_inplace_concat */
9058 (ssizeargfunc) 0, /* sq_inplace_repeat */
9059 },
9060 {
9061 #if PY_VERSION_HEX < 0x03000000
9062 (readbufferproc) 0, /* bf_getreadbuffer */
9063 (writebufferproc) 0, /* bf_getwritebuffer */
9064 (segcountproc) 0, /* bf_getsegcount */
9065 (charbufferproc) 0, /* bf_getcharbuffer */
9066 #endif
9067 (getbufferproc) 0, /* bf_getbuffer */
9068 (releasebufferproc) 0, /* bf_releasebuffer */
9069 },
9070 (PyObject *) 0, /* ht_name */
9071 (PyObject *) 0, /* ht_slots */
9072 #if PY_VERSION_HEX >= 0x03030000
9073 (PyObject *) 0, /* ht_qualname */
9074 0, /* ht_cached_keys */
9075 #endif
9076 };
9077
9078 SWIGINTERN SwigPyClientData SwigPyBuiltin__CameraWidgetChildIter_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__CameraWidgetChildIter_type};
9079
9080 static SwigPyGetSet CameraWidgetChoiceIter___dict___getset = { SwigPyObject_get___dict__, 0 };
9081 SWIGINTERN PyGetSetDef SwigPyBuiltin__CameraWidgetChoiceIter_getset[] = {
9082 { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n"
9083 "gp_widget_get_children\n"
9084 "Gets all the child widgets of a CameraWidget. The return value is a list\n"
9085 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
9086 "be used to get each child in sequence.\n"
9087 "\n"
9088 "Parameters\n"
9089 "----------\n"
9090 "* `widget` :\n"
9091 " a CameraWidget\n"
9092 "\n"
9093 "Returns\n"
9094 "-------\n"
9095 "a gphoto2 error code and a Python iterator.\n"
9096 "\n"
9097 "See also gphoto2.CameraWidget.get_children\n"
9098 "", &CameraWidgetChoiceIter___dict___getset },
9099 { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
9100 };
9101
9102 SWIGINTERN PyObject *
SwigPyBuiltin__CameraWidgetChoiceIter_richcompare(PyObject * self,PyObject * other,int op)9103 SwigPyBuiltin__CameraWidgetChoiceIter_richcompare(PyObject *self, PyObject *other, int op) {
9104 PyObject *result = NULL;
9105 PyObject *tuple = PyTuple_New(1);
9106 assert(tuple);
9107 PyTuple_SET_ITEM(tuple, 0, other);
9108 Py_XINCREF(other);
9109 if (!result) {
9110 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
9111 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
9112 } else {
9113 result = Py_NotImplemented;
9114 Py_INCREF(result);
9115 }
9116 }
9117 Py_DECREF(tuple);
9118 return result;
9119 }
9120
9121 SWIGINTERN PyMethodDef SwigPyBuiltin__CameraWidgetChoiceIter_methods[] = {
9122 { "__next__", _wrap_CameraWidgetChoiceIter___next__, METH_VARARGS, "__next__(self) -> char const *" },
9123 { NULL, NULL, 0, NULL } /* Sentinel */
9124 };
9125
9126 static PyHeapTypeObject SwigPyBuiltin__CameraWidgetChoiceIter_type = {
9127 {
9128 #if PY_VERSION_HEX >= 0x03000000
9129 PyVarObject_HEAD_INIT(NULL, 0)
9130 #else
9131 PyObject_HEAD_INIT(NULL)
9132 0, /* ob_size */
9133 #endif
9134 "gphoto2.widget.CameraWidgetChoiceIter", /* tp_name */
9135 sizeof(SwigPyObject), /* tp_basicsize */
9136 0, /* tp_itemsize */
9137 _wrap_delete_CameraWidgetChoiceIter_destructor_closure, /* tp_dealloc */
9138 (printfunc) 0, /* tp_print */
9139 (getattrfunc) 0, /* tp_getattr */
9140 (setattrfunc) 0, /* tp_setattr */
9141 #if PY_VERSION_HEX >= 0x03000000
9142 0, /* tp_compare */
9143 #else
9144 (cmpfunc) 0, /* tp_compare */
9145 #endif
9146 (reprfunc) 0, /* tp_repr */
9147 &SwigPyBuiltin__CameraWidgetChoiceIter_type.as_number, /* tp_as_number */
9148 &SwigPyBuiltin__CameraWidgetChoiceIter_type.as_sequence, /* tp_as_sequence */
9149 &SwigPyBuiltin__CameraWidgetChoiceIter_type.as_mapping, /* tp_as_mapping */
9150 SwigPyObject_hash, /* tp_hash */
9151 (ternaryfunc) 0, /* tp_call */
9152 (reprfunc) 0, /* tp_str */
9153 (getattrofunc) 0, /* tp_getattro */
9154 (setattrofunc) 0, /* tp_setattro */
9155 &SwigPyBuiltin__CameraWidgetChoiceIter_type.as_buffer, /* tp_as_buffer */
9156 #if PY_VERSION_HEX >= 0x03000000
9157 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
9158 #else
9159 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
9160 #endif
9161 "::CameraWidgetChoiceIter", /* tp_doc */
9162 (traverseproc) 0, /* tp_traverse */
9163 (inquiry) 0, /* tp_clear */
9164 SwigPyBuiltin__CameraWidgetChoiceIter_richcompare, /* tp_richcompare */
9165 0, /* tp_weaklistoffset */
9166 make_iterator, /* tp_iter */
9167 _wrap_CameraWidgetChoiceIter___next___iternextfunc_closure, /* tp_iternext */
9168 SwigPyBuiltin__CameraWidgetChoiceIter_methods, /* tp_methods */
9169 0, /* tp_members */
9170 SwigPyBuiltin__CameraWidgetChoiceIter_getset, /* tp_getset */
9171 0, /* tp_base */
9172 0, /* tp_dict */
9173 (descrgetfunc) 0, /* tp_descr_get */
9174 (descrsetfunc) 0, /* tp_descr_set */
9175 offsetof(SwigPyObject, dict), /* tp_dictoffset */
9176 SwigPyBuiltin_BadInit, /* tp_init */
9177 (allocfunc) 0, /* tp_alloc */
9178 (newfunc) 0, /* tp_new */
9179 (freefunc) 0, /* tp_free */
9180 (inquiry) 0, /* tp_is_gc */
9181 (PyObject *) 0, /* tp_bases */
9182 (PyObject *) 0, /* tp_mro */
9183 (PyObject *) 0, /* tp_cache */
9184 (PyObject *) 0, /* tp_subclasses */
9185 (PyObject *) 0, /* tp_weaklist */
9186 (destructor) 0, /* tp_del */
9187 (int) 0, /* tp_version_tag */
9188 #if PY_VERSION_HEX >= 0x03040000
9189 (destructor) 0, /* tp_finalize */
9190 #endif
9191 #if PY_VERSION_HEX >= 0x03080000
9192 (vectorcallfunc) 0, /* tp_vectorcall */
9193 #endif
9194 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
9195 0, /* tp_print */
9196 #endif
9197 #ifdef COUNT_ALLOCS
9198 (Py_ssize_t) 0, /* tp_allocs */
9199 (Py_ssize_t) 0, /* tp_frees */
9200 (Py_ssize_t) 0, /* tp_maxalloc */
9201 0, /* tp_prev */
9202 0, /* tp_next */
9203 #endif
9204 },
9205 #if PY_VERSION_HEX >= 0x03050000
9206 {
9207 (unaryfunc) 0, /* am_await */
9208 (unaryfunc) 0, /* am_aiter */
9209 (unaryfunc) 0, /* am_anext */
9210 },
9211 #endif
9212 {
9213 (binaryfunc) 0, /* nb_add */
9214 (binaryfunc) 0, /* nb_subtract */
9215 (binaryfunc) 0, /* nb_multiply */
9216 #if PY_VERSION_HEX < 0x03000000
9217 (binaryfunc) 0, /* nb_divide */
9218 #endif
9219 (binaryfunc) 0, /* nb_remainder */
9220 (binaryfunc) 0, /* nb_divmod */
9221 (ternaryfunc) 0, /* nb_power */
9222 (unaryfunc) 0, /* nb_negative */
9223 (unaryfunc) 0, /* nb_positive */
9224 (unaryfunc) 0, /* nb_absolute */
9225 (inquiry) 0, /* nb_nonzero */
9226 (unaryfunc) 0, /* nb_invert */
9227 (binaryfunc) 0, /* nb_lshift */
9228 (binaryfunc) 0, /* nb_rshift */
9229 (binaryfunc) 0, /* nb_and */
9230 (binaryfunc) 0, /* nb_xor */
9231 (binaryfunc) 0, /* nb_or */
9232 #if PY_VERSION_HEX < 0x03000000
9233 (coercion) 0, /* nb_coerce */
9234 #endif
9235 (unaryfunc) 0, /* nb_int */
9236 #if PY_VERSION_HEX >= 0x03000000
9237 (void *) 0, /* nb_reserved */
9238 #else
9239 (unaryfunc) 0, /* nb_long */
9240 #endif
9241 (unaryfunc) 0, /* nb_float */
9242 #if PY_VERSION_HEX < 0x03000000
9243 (unaryfunc) 0, /* nb_oct */
9244 (unaryfunc) 0, /* nb_hex */
9245 #endif
9246 (binaryfunc) 0, /* nb_inplace_add */
9247 (binaryfunc) 0, /* nb_inplace_subtract */
9248 (binaryfunc) 0, /* nb_inplace_multiply */
9249 #if PY_VERSION_HEX < 0x03000000
9250 (binaryfunc) 0, /* nb_inplace_divide */
9251 #endif
9252 (binaryfunc) 0, /* nb_inplace_remainder */
9253 (ternaryfunc) 0, /* nb_inplace_power */
9254 (binaryfunc) 0, /* nb_inplace_lshift */
9255 (binaryfunc) 0, /* nb_inplace_rshift */
9256 (binaryfunc) 0, /* nb_inplace_and */
9257 (binaryfunc) 0, /* nb_inplace_xor */
9258 (binaryfunc) 0, /* nb_inplace_or */
9259 (binaryfunc) 0, /* nb_floor_divide */
9260 (binaryfunc) 0, /* nb_true_divide */
9261 (binaryfunc) 0, /* nb_inplace_floor_divide */
9262 (binaryfunc) 0, /* nb_inplace_true_divide */
9263 (unaryfunc) 0, /* nb_index */
9264 #if PY_VERSION_HEX >= 0x03050000
9265 (binaryfunc) 0, /* nb_matrix_multiply */
9266 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
9267 #endif
9268 },
9269 {
9270 (lenfunc) 0, /* mp_length */
9271 (binaryfunc) 0, /* mp_subscript */
9272 (objobjargproc) 0, /* mp_ass_subscript */
9273 },
9274 {
9275 (lenfunc) 0, /* sq_length */
9276 (binaryfunc) 0, /* sq_concat */
9277 (ssizeargfunc) 0, /* sq_repeat */
9278 (ssizeargfunc) 0, /* sq_item */
9279 #if PY_VERSION_HEX >= 0x03000000
9280 (void *) 0, /* was_sq_slice */
9281 #else
9282 (ssizessizeargfunc) 0, /* sq_slice */
9283 #endif
9284 (ssizeobjargproc) 0, /* sq_ass_item */
9285 #if PY_VERSION_HEX >= 0x03000000
9286 (void *) 0, /* was_sq_ass_slice */
9287 #else
9288 (ssizessizeobjargproc) 0, /* sq_ass_slice */
9289 #endif
9290 (objobjproc) 0, /* sq_contains */
9291 (binaryfunc) 0, /* sq_inplace_concat */
9292 (ssizeargfunc) 0, /* sq_inplace_repeat */
9293 },
9294 {
9295 #if PY_VERSION_HEX < 0x03000000
9296 (readbufferproc) 0, /* bf_getreadbuffer */
9297 (writebufferproc) 0, /* bf_getwritebuffer */
9298 (segcountproc) 0, /* bf_getsegcount */
9299 (charbufferproc) 0, /* bf_getcharbuffer */
9300 #endif
9301 (getbufferproc) 0, /* bf_getbuffer */
9302 (releasebufferproc) 0, /* bf_releasebuffer */
9303 },
9304 (PyObject *) 0, /* ht_name */
9305 (PyObject *) 0, /* ht_slots */
9306 #if PY_VERSION_HEX >= 0x03030000
9307 (PyObject *) 0, /* ht_qualname */
9308 0, /* ht_cached_keys */
9309 #endif
9310 };
9311
9312 SWIGINTERN SwigPyClientData SwigPyBuiltin__CameraWidgetChoiceIter_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__CameraWidgetChoiceIter_type};
9313
9314 static SwigPyGetSet CameraWidget___dict___getset = { SwigPyObject_get___dict__, 0 };
9315 SWIGINTERN PyGetSetDef SwigPyBuiltin___CameraWidget_getset[] = {
9316 { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n"
9317 "gp_widget_get_choices\n"
9318 "Gets all the choice values of a CameraWidget. The return value is a list\n"
9319 "containing a gphoto2 error code and a Python iterator. The iterator can\n"
9320 "be used to get each choice in sequence.\n"
9321 "\n"
9322 "Parameters\n"
9323 "----------\n"
9324 "* `widget` :\n"
9325 " a CameraWidget\n"
9326 "\n"
9327 "Returns\n"
9328 "-------\n"
9329 "a gphoto2 error code and a Python iterator.\n"
9330 "\n"
9331 "See also gphoto2.CameraWidget.get_choices\n"
9332 "", &CameraWidget___dict___getset },
9333 { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
9334 };
9335
9336 SWIGINTERN PyObject *
SwigPyBuiltin___CameraWidget_richcompare(PyObject * self,PyObject * other,int op)9337 SwigPyBuiltin___CameraWidget_richcompare(PyObject *self, PyObject *other, int op) {
9338 PyObject *result = NULL;
9339 PyObject *tuple = PyTuple_New(1);
9340 assert(tuple);
9341 PyTuple_SET_ITEM(tuple, 0, other);
9342 Py_XINCREF(other);
9343 if (!result) {
9344 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
9345 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
9346 } else {
9347 result = Py_NotImplemented;
9348 Py_INCREF(result);
9349 }
9350 }
9351 Py_DECREF(tuple);
9352 return result;
9353 }
9354
9355 SWIGINTERN PyMethodDef SwigPyBuiltin___CameraWidget_methods[] = {
9356 { "count_children", _wrap_CameraWidget_count_children, METH_VARARGS, "\n"
9357 "count_children(self) -> int\n"
9358 "Counts the children of the CameraWidget. \n"
9359 "\n"
9360 "Parameters\n"
9361 "----------\n"
9362 "* `widget` : \n"
9363 " a CameraWidget \n"
9364 "\n"
9365 "Returns\n"
9366 "-------\n"
9367 "a gphoto2 error code or number of children\n"
9368 "\n"
9369 "See also gphoto2.gp_widget_count_children\n"
9370 "" },
9371 { "get_child", _wrap_CameraWidget_get_child, METH_VARARGS, "\n"
9372 "get_child(self, child_number)\n"
9373 "\n"
9374 "Parameters\n"
9375 "----------\n"
9376 "child_number: int\n"
9377 "\n"
9378 "Retrieves the child number `child_number` of the parent. \n"
9379 "\n"
9380 "Parameters\n"
9381 "----------\n"
9382 "* `widget` : \n"
9383 " a CameraWidget \n"
9384 "* `child_number` : \n"
9385 " the number of the child \n"
9386 "* `child` : \n"
9387 "\n"
9388 "Returns\n"
9389 "-------\n"
9390 "a gphoto2 error code.\n"
9391 "\n"
9392 "See also gphoto2.gp_widget_get_child\n"
9393 "" },
9394 { "get_children", _wrap_CameraWidget_get_children, METH_VARARGS, "\n"
9395 "get_children(self)\n"
9396 "Gets all the child widgets of a CameraWidget. The return value is a\n"
9397 "Python iterator which can be used to get each child in sequence.\n"
9398 "\n"
9399 "Returns\n"
9400 "-------\n"
9401 "a Python iterator.\n"
9402 "\n"
9403 "See also gphoto2.gp_widget_get_children\n"
9404 "" },
9405 { "get_child_by_label", _wrap_CameraWidget_get_child_by_label, METH_VARARGS, "\n"
9406 "get_child_by_label(self, label)\n"
9407 "\n"
9408 "Parameters\n"
9409 "----------\n"
9410 "label: str\n"
9411 "\n"
9412 "Retrieves the child with label `label` of the CameraWidget. \n"
9413 "\n"
9414 "Parameters\n"
9415 "----------\n"
9416 "* `widget` : \n"
9417 " a CameraWidget \n"
9418 "* `label` : \n"
9419 " the label of the child \n"
9420 "* `child` : \n"
9421 "\n"
9422 "Returns\n"
9423 "-------\n"
9424 "a gphoto2 error code.\n"
9425 "\n"
9426 "See also gphoto2.gp_widget_get_child_by_label\n"
9427 "" },
9428 { "get_child_by_id", _wrap_CameraWidget_get_child_by_id, METH_VARARGS, "\n"
9429 "get_child_by_id(self, id)\n"
9430 "\n"
9431 "Parameters\n"
9432 "----------\n"
9433 "id: int\n"
9434 "\n"
9435 "Retrieves the child with id `id` of the widget. \n"
9436 "\n"
9437 "Parameters\n"
9438 "----------\n"
9439 "* `widget` : \n"
9440 " a CameraWidget \n"
9441 "* `id` : \n"
9442 " the id of the child \n"
9443 "* `child` : \n"
9444 "\n"
9445 "Returns\n"
9446 "-------\n"
9447 "a gphoto2 error code.\n"
9448 "\n"
9449 "See also gphoto2.gp_widget_get_child_by_id\n"
9450 "" },
9451 { "get_child_by_name", _wrap_CameraWidget_get_child_by_name, METH_VARARGS, "\n"
9452 "get_child_by_name(self, name)\n"
9453 "\n"
9454 "Parameters\n"
9455 "----------\n"
9456 "name: str\n"
9457 "\n"
9458 "Retrieves the child with name `name` of the widget. \n"
9459 "\n"
9460 "Parameters\n"
9461 "----------\n"
9462 "* `widget` : \n"
9463 " a CameraWidget \n"
9464 "* `name` : \n"
9465 " the name of the child \n"
9466 "\n"
9467 "Returns\n"
9468 "-------\n"
9469 "a gphoto2 error code.\n"
9470 "\n"
9471 "See also gphoto2.gp_widget_get_child_by_name\n"
9472 "" },
9473 { "get_root", _wrap_CameraWidget_get_root, METH_VARARGS, "\n"
9474 "get_root(self)\n"
9475 "Retrieves the root of the CameraWidget. \n"
9476 "\n"
9477 "Parameters\n"
9478 "----------\n"
9479 "* `widget` : \n"
9480 " a CameraWidget \n"
9481 "* `root` : \n"
9482 "\n"
9483 "Returns\n"
9484 "-------\n"
9485 "a gphoto2 error code.\n"
9486 "\n"
9487 "See also gphoto2.gp_widget_get_root\n"
9488 "" },
9489 { "get_parent", _wrap_CameraWidget_get_parent, METH_VARARGS, "\n"
9490 "get_parent(self)\n"
9491 "Retrieves the parent of a CameraWidget. \n"
9492 "\n"
9493 "Parameters\n"
9494 "----------\n"
9495 "* `widget` : \n"
9496 " a CameraWidget \n"
9497 "* `parent` : \n"
9498 " the pointer to the parent to return \n"
9499 "\n"
9500 "Returns\n"
9501 "-------\n"
9502 "a gphoto2 error code.\n"
9503 "\n"
9504 "See also gphoto2.gp_widget_get_parent\n"
9505 "" },
9506 { "set_value", _wrap_CameraWidget_set_value, METH_VARARGS, "\n"
9507 "set_value(self, value)\n"
9508 "\n"
9509 "Parameters\n"
9510 "----------\n"
9511 "value: str\n"
9512 "\n"
9513 "set_value(self, value)\n"
9514 "\n"
9515 "Parameters\n"
9516 "----------\n"
9517 "value: float const *\n"
9518 "\n"
9519 "set_value(self, value)\n"
9520 "\n"
9521 "Parameters\n"
9522 "----------\n"
9523 "value: int const *\n"
9524 "\n"
9525 "Sets the value of the widget. \n"
9526 "\n"
9527 "Parameters\n"
9528 "----------\n"
9529 "* `widget` : \n"
9530 " a CameraWidget \n"
9531 "* `value` : \n"
9532 "\n"
9533 "Returns\n"
9534 "-------\n"
9535 "a gphoto2 error code. \n"
9536 "\n"
9537 "Please pass (char*) for GP_WIDGET_MENU, GP_WIDGET_TEXT, GP_WIDGET_RADIO,\n"
9538 "(float) for GP_WIDGET_RANGE, (int) for GP_WIDGET_DATE, GP_WIDGET_TOGGLE,\n"
9539 "and (CameraWidgetCallback) for GP_WIDGET_BUTTON.\n"
9540 "\n"
9541 "See also gphoto2.gp_widget_set_value\n"
9542 "" },
9543 { "get_value", _wrap_CameraWidget_get_value, METH_VARARGS, "\n"
9544 "get_value(self)\n"
9545 "get_value(self)\n"
9546 "get_value(self)\n"
9547 "Retrieves the value of the CameraWidget. \n"
9548 "\n"
9549 "Parameters\n"
9550 "----------\n"
9551 "* `widget` : \n"
9552 " a CameraWidget \n"
9553 "* `value` : \n"
9554 "\n"
9555 "Returns\n"
9556 "-------\n"
9557 "a gphoto2 error code.\n"
9558 "\n"
9559 "See also gphoto2.gp_widget_get_value\n"
9560 "" },
9561 { "set_name", _wrap_CameraWidget_set_name, METH_VARARGS, "\n"
9562 "set_name(self, name)\n"
9563 "\n"
9564 "Parameters\n"
9565 "----------\n"
9566 "name: str\n"
9567 "\n"
9568 "Sets the name of the widget. \n"
9569 "\n"
9570 "Parameters\n"
9571 "----------\n"
9572 "* `widget` : \n"
9573 " a CameraWidget \n"
9574 "* `name` : \n"
9575 " Name of above widget \n"
9576 "\n"
9577 "Returns\n"
9578 "-------\n"
9579 "a gphoto2 error code.\n"
9580 "\n"
9581 "See also gphoto2.gp_widget_set_name\n"
9582 "" },
9583 { "get_name", _wrap_CameraWidget_get_name, METH_VARARGS, "\n"
9584 "get_name(self)\n"
9585 "Gets the name of the widget. \n"
9586 "\n"
9587 "Parameters\n"
9588 "----------\n"
9589 "* `widget` : \n"
9590 " a CameraWidget \n"
9591 "* `name` : \n"
9592 " Name of above widget \n"
9593 "\n"
9594 "Returns\n"
9595 "-------\n"
9596 "a gphoto2 error code.\n"
9597 "\n"
9598 "See also gphoto2.gp_widget_get_name\n"
9599 "" },
9600 { "set_info", _wrap_CameraWidget_set_info, METH_VARARGS, "\n"
9601 "set_info(self, info)\n"
9602 "\n"
9603 "Parameters\n"
9604 "----------\n"
9605 "info: str\n"
9606 "\n"
9607 "Sets the information about the widget. \n"
9608 "\n"
9609 "Parameters\n"
9610 "----------\n"
9611 "* `widget` : \n"
9612 " a CameraWidget \n"
9613 "* `info` : \n"
9614 " Information about above widget \n"
9615 "\n"
9616 "Returns\n"
9617 "-------\n"
9618 "a gphoto2 error code.\n"
9619 "\n"
9620 "See also gphoto2.gp_widget_set_info\n"
9621 "" },
9622 { "get_info", _wrap_CameraWidget_get_info, METH_VARARGS, "\n"
9623 "get_info(self)\n"
9624 "Retrieves the information about the widget. \n"
9625 "\n"
9626 "Parameters\n"
9627 "----------\n"
9628 "* `widget` : \n"
9629 " a CameraWidget \n"
9630 "* `info` : \n"
9631 "\n"
9632 "Returns\n"
9633 "-------\n"
9634 "a gphoto2 error code.\n"
9635 "\n"
9636 "See also gphoto2.gp_widget_get_info\n"
9637 "" },
9638 { "get_id", _wrap_CameraWidget_get_id, METH_VARARGS, "\n"
9639 "get_id(self)\n"
9640 "Retrieves the unique id of the CameraWidget. \n"
9641 "\n"
9642 "Parameters\n"
9643 "----------\n"
9644 "* `widget` : \n"
9645 " a CameraWidget \n"
9646 "* `id` : \n"
9647 "\n"
9648 "Returns\n"
9649 "-------\n"
9650 "a gphoto2 error code.\n"
9651 "\n"
9652 "See also gphoto2.gp_widget_get_id\n"
9653 "" },
9654 { "get_type", _wrap_CameraWidget_get_type, METH_VARARGS, "\n"
9655 "get_type(self)\n"
9656 "Retrieves the type of the CameraWidget. \n"
9657 "\n"
9658 "Parameters\n"
9659 "----------\n"
9660 "* `widget` : \n"
9661 " a CameraWidget \n"
9662 "* `type` : \n"
9663 "\n"
9664 "Returns\n"
9665 "-------\n"
9666 "a gphoto2 error code.\n"
9667 "\n"
9668 "See also gphoto2.gp_widget_get_type\n"
9669 "" },
9670 { "get_label", _wrap_CameraWidget_get_label, METH_VARARGS, "\n"
9671 "get_label(self)\n"
9672 "Retrieves the label of the CameraWidget. \n"
9673 "\n"
9674 "Parameters\n"
9675 "----------\n"
9676 "* `widget` : \n"
9677 " a CameraWidget \n"
9678 "* `label` : \n"
9679 "\n"
9680 "Returns\n"
9681 "-------\n"
9682 "a gphoto2 error code.\n"
9683 "\n"
9684 "See also gphoto2.gp_widget_get_label\n"
9685 "" },
9686 { "set_range", _wrap_CameraWidget_set_range, METH_VARARGS, "\n"
9687 "set_range(self, min, max, increment)\n"
9688 "\n"
9689 "Parameters\n"
9690 "----------\n"
9691 "min: float\n"
9692 "max: float\n"
9693 "increment: float\n"
9694 "\n"
9695 "Sets some range parameters of the CameraWidget. \n"
9696 "\n"
9697 "Parameters\n"
9698 "----------\n"
9699 "* `range` : \n"
9700 " a CameraWidget of type GP_WIDGET_RANGE \n"
9701 "* `min` : \n"
9702 "* `max` : \n"
9703 "* `increment` : \n"
9704 "\n"
9705 "Returns\n"
9706 "-------\n"
9707 "a gphoto2 error code.\n"
9708 "\n"
9709 "See also gphoto2.gp_widget_set_range\n"
9710 "" },
9711 { "get_range", _wrap_CameraWidget_get_range, METH_VARARGS, "\n"
9712 "get_range(self)\n"
9713 "Retrieves some range parameters of the CameraWidget. \n"
9714 "\n"
9715 "Parameters\n"
9716 "----------\n"
9717 "* `range` : \n"
9718 " a CameraWidget of type GP_WIDGET_RANGE \n"
9719 "* `min` : \n"
9720 "* `max` : \n"
9721 "* `increment` : \n"
9722 "\n"
9723 "Returns\n"
9724 "-------\n"
9725 "a gphoto2 error code.\n"
9726 "\n"
9727 "See also gphoto2.gp_widget_get_range\n"
9728 "" },
9729 { "add_choice", _wrap_CameraWidget_add_choice, METH_VARARGS, "\n"
9730 "add_choice(self, choice)\n"
9731 "\n"
9732 "Parameters\n"
9733 "----------\n"
9734 "choice: str\n"
9735 "\n"
9736 "Adds a choice to the CameraWidget. \n"
9737 "\n"
9738 "Parameters\n"
9739 "----------\n"
9740 "* `widget` : \n"
9741 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
9742 "* `choice` : \n"
9743 "\n"
9744 "Returns\n"
9745 "-------\n"
9746 "a gphoto2 error code.\n"
9747 "\n"
9748 "See also gphoto2.gp_widget_add_choice\n"
9749 "" },
9750 { "count_choices", _wrap_CameraWidget_count_choices, METH_VARARGS, "\n"
9751 "count_choices(self) -> int\n"
9752 "Counts the choices of the CameraWidget. \n"
9753 "\n"
9754 "Parameters\n"
9755 "----------\n"
9756 "* `widget` : \n"
9757 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
9758 "\n"
9759 "Returns\n"
9760 "-------\n"
9761 "a gphoto2 error code or number of choices.\n"
9762 "\n"
9763 "See also gphoto2.gp_widget_count_choices\n"
9764 "" },
9765 { "get_choices", _wrap_CameraWidget_get_choices, METH_VARARGS, "\n"
9766 "get_choices(self)\n"
9767 "Gets all the choice values of a CameraWidget. The return value is a\n"
9768 "Python iterator which can be used to get each choice in sequence.\n"
9769 "\n"
9770 "Returns\n"
9771 "-------\n"
9772 "a Python iterator.\n"
9773 "\n"
9774 "See also gphoto2.gp_widget_get_choices\n"
9775 "" },
9776 { "get_choice", _wrap_CameraWidget_get_choice, METH_VARARGS, "\n"
9777 "get_choice(self, choice_number)\n"
9778 "\n"
9779 "Parameters\n"
9780 "----------\n"
9781 "choice_number: int\n"
9782 "\n"
9783 "Retrieves the choice number `choice_number`. \n"
9784 "\n"
9785 "Parameters\n"
9786 "----------\n"
9787 "* `widget` : \n"
9788 " a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU \n"
9789 "* `choice_number` : \n"
9790 "* `choice` : \n"
9791 "\n"
9792 "Returns\n"
9793 "-------\n"
9794 "a gphoto2 error code\n"
9795 "\n"
9796 "See also gphoto2.gp_widget_get_choice\n"
9797 "" },
9798 { "changed", _wrap_CameraWidget_changed, METH_VARARGS, "\n"
9799 "changed(self) -> int\n"
9800 "Tells if the widget has been changed. \n"
9801 "\n"
9802 "Parameters\n"
9803 "----------\n"
9804 "* `widget` : \n"
9805 " a CameraWidget \n"
9806 "\n"
9807 "Returns\n"
9808 "-------\n"
9809 "a gphoto2 error code or changed flag. \n"
9810 "\n"
9811 "Returns 1 if the state of the CameraWidget has been changed or 0 if not. \n"
9812 "\n"
9813 "Note: this formerly cleared the changed state. It no longer does with\n"
9814 "2.5.11.\n"
9815 "\n"
9816 "See also gphoto2.gp_widget_changed\n"
9817 "" },
9818 { "set_changed", _wrap_CameraWidget_set_changed, METH_VARARGS, "\n"
9819 "set_changed(self, changed)\n"
9820 "\n"
9821 "Parameters\n"
9822 "----------\n"
9823 "changed: int\n"
9824 "\n"
9825 "Tells that the widget has been changed. \n"
9826 "\n"
9827 "Parameters\n"
9828 "----------\n"
9829 "* `widget` : \n"
9830 " a CameraWidget \n"
9831 "* `changed` : \n"
9832 " a boolean whether we changed or not \n"
9833 "\n"
9834 "Returns\n"
9835 "-------\n"
9836 "a gphoto2 error code \n"
9837 "\n"
9838 "Sets the changed of the CameraWidget depending on the changed parameter.\n"
9839 "\n"
9840 "See also gphoto2.gp_widget_set_changed\n"
9841 "" },
9842 { "set_readonly", _wrap_CameraWidget_set_readonly, METH_VARARGS, "\n"
9843 "set_readonly(self, readonly)\n"
9844 "\n"
9845 "Parameters\n"
9846 "----------\n"
9847 "readonly: int\n"
9848 "\n"
9849 "Tells that the widget is readonly. \n"
9850 "\n"
9851 "Parameters\n"
9852 "----------\n"
9853 "* `widget` : \n"
9854 " a CameraWidget \n"
9855 "* `changed` : \n"
9856 " a boolean whether we are readonly or not \n"
9857 "\n"
9858 "Returns\n"
9859 "-------\n"
9860 "a gphoto2 error code \n"
9861 "\n"
9862 "Sets the readonly of the CameraWidget depending on the changed\n"
9863 "parameter. \n"
9864 "\n"
9865 "Only useful when called from the camera driver.\n"
9866 "\n"
9867 "See also gphoto2.gp_widget_set_readonly\n"
9868 "" },
9869 { "get_readonly", _wrap_CameraWidget_get_readonly, METH_VARARGS, "\n"
9870 "get_readonly(self)\n"
9871 "Retrieves the readonly state of the CameraWidget. \n"
9872 "\n"
9873 "Parameters\n"
9874 "----------\n"
9875 "* `widget` : \n"
9876 " a CameraWidget \n"
9877 "* `readonly` : \n"
9878 "\n"
9879 "Returns\n"
9880 "-------\n"
9881 "a gphoto2 error code.\n"
9882 "\n"
9883 "See also gphoto2.gp_widget_get_readonly\n"
9884 "" },
9885 { NULL, NULL, 0, NULL } /* Sentinel */
9886 };
9887
9888 static PyHeapTypeObject SwigPyBuiltin___CameraWidget_type = {
9889 {
9890 #if PY_VERSION_HEX >= 0x03000000
9891 PyVarObject_HEAD_INIT(NULL, 0)
9892 #else
9893 PyObject_HEAD_INIT(NULL)
9894 0, /* ob_size */
9895 #endif
9896 "gphoto2.widget.CameraWidget", /* tp_name */
9897 sizeof(SwigPyObject), /* tp_basicsize */
9898 0, /* tp_itemsize */
9899 _wrap_delete_CameraWidget_destructor_closure, /* tp_dealloc */
9900 (printfunc) 0, /* tp_print */
9901 (getattrfunc) 0, /* tp_getattr */
9902 (setattrfunc) 0, /* tp_setattr */
9903 #if PY_VERSION_HEX >= 0x03000000
9904 0, /* tp_compare */
9905 #else
9906 (cmpfunc) 0, /* tp_compare */
9907 #endif
9908 (reprfunc) 0, /* tp_repr */
9909 &SwigPyBuiltin___CameraWidget_type.as_number, /* tp_as_number */
9910 &SwigPyBuiltin___CameraWidget_type.as_sequence, /* tp_as_sequence */
9911 &SwigPyBuiltin___CameraWidget_type.as_mapping, /* tp_as_mapping */
9912 SwigPyObject_hash, /* tp_hash */
9913 (ternaryfunc) 0, /* tp_call */
9914 (reprfunc) 0, /* tp_str */
9915 (getattrofunc) 0, /* tp_getattro */
9916 (setattrofunc) 0, /* tp_setattro */
9917 &SwigPyBuiltin___CameraWidget_type.as_buffer, /* tp_as_buffer */
9918 #if PY_VERSION_HEX >= 0x03000000
9919 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
9920 #else
9921 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
9922 #endif
9923 "\n"
9924 "CameraWidget: \n"
9925 "\n"
9926 "The internals of the CameraWidget are only visible to gphoto2. You can\n"
9927 "only access them using the functions provided by gphoto2.\n"
9928 "",/* tp_doc */
9929 (traverseproc) 0, /* tp_traverse */
9930 (inquiry) 0, /* tp_clear */
9931 SwigPyBuiltin___CameraWidget_richcompare, /* tp_richcompare */
9932 0, /* tp_weaklistoffset */
9933 (getiterfunc) 0, /* tp_iter */
9934 (iternextfunc) 0, /* tp_iternext */
9935 SwigPyBuiltin___CameraWidget_methods, /* tp_methods */
9936 0, /* tp_members */
9937 SwigPyBuiltin___CameraWidget_getset, /* tp_getset */
9938 0, /* tp_base */
9939 0, /* tp_dict */
9940 (descrgetfunc) 0, /* tp_descr_get */
9941 (descrsetfunc) 0, /* tp_descr_set */
9942 offsetof(SwigPyObject, dict), /* tp_dictoffset */
9943 SwigPyBuiltin_BadInit, /* tp_init */
9944 (allocfunc) 0, /* tp_alloc */
9945 (newfunc) 0, /* tp_new */
9946 (freefunc) 0, /* tp_free */
9947 (inquiry) 0, /* tp_is_gc */
9948 (PyObject *) 0, /* tp_bases */
9949 (PyObject *) 0, /* tp_mro */
9950 (PyObject *) 0, /* tp_cache */
9951 (PyObject *) 0, /* tp_subclasses */
9952 (PyObject *) 0, /* tp_weaklist */
9953 (destructor) 0, /* tp_del */
9954 (int) 0, /* tp_version_tag */
9955 #if PY_VERSION_HEX >= 0x03040000
9956 (destructor) 0, /* tp_finalize */
9957 #endif
9958 #if PY_VERSION_HEX >= 0x03080000
9959 (vectorcallfunc) 0, /* tp_vectorcall */
9960 #endif
9961 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
9962 0, /* tp_print */
9963 #endif
9964 #ifdef COUNT_ALLOCS
9965 (Py_ssize_t) 0, /* tp_allocs */
9966 (Py_ssize_t) 0, /* tp_frees */
9967 (Py_ssize_t) 0, /* tp_maxalloc */
9968 0, /* tp_prev */
9969 0, /* tp_next */
9970 #endif
9971 },
9972 #if PY_VERSION_HEX >= 0x03050000
9973 {
9974 (unaryfunc) 0, /* am_await */
9975 (unaryfunc) 0, /* am_aiter */
9976 (unaryfunc) 0, /* am_anext */
9977 },
9978 #endif
9979 {
9980 (binaryfunc) 0, /* nb_add */
9981 (binaryfunc) 0, /* nb_subtract */
9982 (binaryfunc) 0, /* nb_multiply */
9983 #if PY_VERSION_HEX < 0x03000000
9984 (binaryfunc) 0, /* nb_divide */
9985 #endif
9986 (binaryfunc) 0, /* nb_remainder */
9987 (binaryfunc) 0, /* nb_divmod */
9988 (ternaryfunc) 0, /* nb_power */
9989 (unaryfunc) 0, /* nb_negative */
9990 (unaryfunc) 0, /* nb_positive */
9991 (unaryfunc) 0, /* nb_absolute */
9992 (inquiry) 0, /* nb_nonzero */
9993 (unaryfunc) 0, /* nb_invert */
9994 (binaryfunc) 0, /* nb_lshift */
9995 (binaryfunc) 0, /* nb_rshift */
9996 (binaryfunc) 0, /* nb_and */
9997 (binaryfunc) 0, /* nb_xor */
9998 (binaryfunc) 0, /* nb_or */
9999 #if PY_VERSION_HEX < 0x03000000
10000 (coercion) 0, /* nb_coerce */
10001 #endif
10002 (unaryfunc) 0, /* nb_int */
10003 #if PY_VERSION_HEX >= 0x03000000
10004 (void *) 0, /* nb_reserved */
10005 #else
10006 (unaryfunc) 0, /* nb_long */
10007 #endif
10008 (unaryfunc) 0, /* nb_float */
10009 #if PY_VERSION_HEX < 0x03000000
10010 (unaryfunc) 0, /* nb_oct */
10011 (unaryfunc) 0, /* nb_hex */
10012 #endif
10013 (binaryfunc) 0, /* nb_inplace_add */
10014 (binaryfunc) 0, /* nb_inplace_subtract */
10015 (binaryfunc) 0, /* nb_inplace_multiply */
10016 #if PY_VERSION_HEX < 0x03000000
10017 (binaryfunc) 0, /* nb_inplace_divide */
10018 #endif
10019 (binaryfunc) 0, /* nb_inplace_remainder */
10020 (ternaryfunc) 0, /* nb_inplace_power */
10021 (binaryfunc) 0, /* nb_inplace_lshift */
10022 (binaryfunc) 0, /* nb_inplace_rshift */
10023 (binaryfunc) 0, /* nb_inplace_and */
10024 (binaryfunc) 0, /* nb_inplace_xor */
10025 (binaryfunc) 0, /* nb_inplace_or */
10026 (binaryfunc) 0, /* nb_floor_divide */
10027 (binaryfunc) 0, /* nb_true_divide */
10028 (binaryfunc) 0, /* nb_inplace_floor_divide */
10029 (binaryfunc) 0, /* nb_inplace_true_divide */
10030 (unaryfunc) 0, /* nb_index */
10031 #if PY_VERSION_HEX >= 0x03050000
10032 (binaryfunc) 0, /* nb_matrix_multiply */
10033 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
10034 #endif
10035 },
10036 {
10037 (lenfunc) 0, /* mp_length */
10038 (binaryfunc) 0, /* mp_subscript */
10039 (objobjargproc) 0, /* mp_ass_subscript */
10040 },
10041 {
10042 (lenfunc) 0, /* sq_length */
10043 (binaryfunc) 0, /* sq_concat */
10044 (ssizeargfunc) 0, /* sq_repeat */
10045 (ssizeargfunc) 0, /* sq_item */
10046 #if PY_VERSION_HEX >= 0x03000000
10047 (void *) 0, /* was_sq_slice */
10048 #else
10049 (ssizessizeargfunc) 0, /* sq_slice */
10050 #endif
10051 (ssizeobjargproc) 0, /* sq_ass_item */
10052 #if PY_VERSION_HEX >= 0x03000000
10053 (void *) 0, /* was_sq_ass_slice */
10054 #else
10055 (ssizessizeobjargproc) 0, /* sq_ass_slice */
10056 #endif
10057 (objobjproc) 0, /* sq_contains */
10058 (binaryfunc) 0, /* sq_inplace_concat */
10059 (ssizeargfunc) 0, /* sq_inplace_repeat */
10060 },
10061 {
10062 #if PY_VERSION_HEX < 0x03000000
10063 (readbufferproc) 0, /* bf_getreadbuffer */
10064 (writebufferproc) 0, /* bf_getwritebuffer */
10065 (segcountproc) 0, /* bf_getsegcount */
10066 (charbufferproc) 0, /* bf_getcharbuffer */
10067 #endif
10068 (getbufferproc) 0, /* bf_getbuffer */
10069 (releasebufferproc) 0, /* bf_releasebuffer */
10070 },
10071 (PyObject *) 0, /* ht_name */
10072 (PyObject *) 0, /* ht_slots */
10073 #if PY_VERSION_HEX >= 0x03030000
10074 (PyObject *) 0, /* ht_qualname */
10075 0, /* ht_cached_keys */
10076 #endif
10077 };
10078
10079 SWIGINTERN SwigPyClientData SwigPyBuiltin___CameraWidget_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___CameraWidget_type};
10080
10081
10082 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
10083
10084 static swig_type_info _swigt__p_CameraAbilities = {"_p_CameraAbilities", "CameraAbilities *", 0, 0, (void*)0, 0};
10085 static swig_type_info _swigt__p_CameraCaptureType = {"_p_CameraCaptureType", "enum CameraCaptureType *|CameraCaptureType *", 0, 0, (void*)0, 0};
10086 static swig_type_info _swigt__p_CameraDriverStatus = {"_p_CameraDriverStatus", "enum CameraDriverStatus *|CameraDriverStatus *", 0, 0, (void*)0, 0};
10087 static swig_type_info _swigt__p_CameraEventType = {"_p_CameraEventType", "enum CameraEventType *|CameraEventType *", 0, 0, (void*)0, 0};
10088 static swig_type_info _swigt__p_CameraFileAccessType = {"_p_CameraFileAccessType", "enum CameraFileAccessType *|CameraFileAccessType *", 0, 0, (void*)0, 0};
10089 static swig_type_info _swigt__p_CameraFileInfoFields = {"_p_CameraFileInfoFields", "enum CameraFileInfoFields *|CameraFileInfoFields *", 0, 0, (void*)0, 0};
10090 static swig_type_info _swigt__p_CameraFileOperation = {"_p_CameraFileOperation", "enum CameraFileOperation *|CameraFileOperation *", 0, 0, (void*)0, 0};
10091 static swig_type_info _swigt__p_CameraFilePath = {"_p_CameraFilePath", "CameraFilePath *", 0, 0, (void*)0, 0};
10092 static swig_type_info _swigt__p_CameraFilePermissions = {"_p_CameraFilePermissions", "enum CameraFilePermissions *|CameraFilePermissions *", 0, 0, (void*)0, 0};
10093 static swig_type_info _swigt__p_CameraFileStatus = {"_p_CameraFileStatus", "enum CameraFileStatus *|CameraFileStatus *", 0, 0, (void*)0, 0};
10094 static swig_type_info _swigt__p_CameraFileType = {"_p_CameraFileType", "enum CameraFileType *|CameraFileType *", 0, 0, (void*)0, 0};
10095 static swig_type_info _swigt__p_CameraFolderOperation = {"_p_CameraFolderOperation", "enum CameraFolderOperation *|CameraFolderOperation *", 0, 0, (void*)0, 0};
10096 static swig_type_info _swigt__p_CameraOperation = {"_p_CameraOperation", "enum CameraOperation *|CameraOperation *", 0, 0, (void*)0, 0};
10097 static swig_type_info _swigt__p_CameraStorageAccessType = {"_p_CameraStorageAccessType", "enum CameraStorageAccessType *|CameraStorageAccessType *", 0, 0, (void*)0, 0};
10098 static swig_type_info _swigt__p_CameraStorageFilesystemType = {"_p_CameraStorageFilesystemType", "enum CameraStorageFilesystemType *|CameraStorageFilesystemType *", 0, 0, (void*)0, 0};
10099 static swig_type_info _swigt__p_CameraStorageInfoFields = {"_p_CameraStorageInfoFields", "enum CameraStorageInfoFields *|CameraStorageInfoFields *", 0, 0, (void*)0, 0};
10100 static swig_type_info _swigt__p_CameraStorageType = {"_p_CameraStorageType", "enum CameraStorageType *|CameraStorageType *", 0, 0, (void*)0, 0};
10101 static swig_type_info _swigt__p_CameraText = {"_p_CameraText", "CameraText *", 0, 0, (void*)0, 0};
10102 static swig_type_info _swigt__p_CameraWidgetChildIter = {"_p_CameraWidgetChildIter", "struct CameraWidgetChildIter *|CameraWidgetChildIter *", 0, 0, (void*)&SwigPyBuiltin__CameraWidgetChildIter_clientdata, 0};
10103 static swig_type_info _swigt__p_CameraWidgetChoiceIter = {"_p_CameraWidgetChoiceIter", "struct CameraWidgetChoiceIter *|CameraWidgetChoiceIter *", 0, 0, (void*)&SwigPyBuiltin__CameraWidgetChoiceIter_clientdata, 0};
10104 static swig_type_info _swigt__p_CameraWidgetType = {"_p_CameraWidgetType", "enum CameraWidgetType *|CameraWidgetType *", 0, 0, (void*)0, 0};
10105 static swig_type_info _swigt__p_GPLogLevel = {"_p_GPLogLevel", "enum GPLogLevel *|GPLogLevel *", 0, 0, (void*)0, 0};
10106 static swig_type_info _swigt__p_GPPortType = {"_p_GPPortType", "enum GPPortType *|GPPortType *", 0, 0, (void*)0, 0};
10107 static swig_type_info _swigt__p_GPVersionVerbosity = {"_p_GPVersionVerbosity", "enum GPVersionVerbosity *|GPVersionVerbosity *", 0, 0, (void*)0, 0};
10108 static swig_type_info _swigt__p_GphotoDeviceType = {"_p_GphotoDeviceType", "enum GphotoDeviceType *|GphotoDeviceType *", 0, 0, (void*)0, 0};
10109 static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0};
10110 static swig_type_info _swigt__p__Camera = {"_p__Camera", "struct _Camera *|Camera *", 0, 0, (void*)0, 0};
10111 static swig_type_info _swigt__p__CameraAbilitiesList = {"_p__CameraAbilitiesList", "struct _CameraAbilitiesList *|CameraAbilitiesList *", 0, 0, (void*)0, 0};
10112 static swig_type_info _swigt__p__CameraFile = {"_p__CameraFile", "struct _CameraFile *|CameraFile *", 0, 0, (void*)0, 0};
10113 static swig_type_info _swigt__p__CameraFileHandler = {"_p__CameraFileHandler", "struct _CameraFileHandler *|CameraFileHandler *", 0, 0, (void*)0, 0};
10114 static swig_type_info _swigt__p__CameraFileInfo = {"_p__CameraFileInfo", "struct _CameraFileInfo *|CameraFileInfo *", 0, 0, (void*)0, 0};
10115 static swig_type_info _swigt__p__CameraFileInfoAudio = {"_p__CameraFileInfoAudio", "struct _CameraFileInfoAudio *|CameraFileInfoAudio *", 0, 0, (void*)0, 0};
10116 static swig_type_info _swigt__p__CameraFileInfoFile = {"_p__CameraFileInfoFile", "struct _CameraFileInfoFile *|CameraFileInfoFile *", 0, 0, (void*)0, 0};
10117 static swig_type_info _swigt__p__CameraFileInfoPreview = {"_p__CameraFileInfoPreview", "struct _CameraFileInfoPreview *|CameraFileInfoPreview *", 0, 0, (void*)0, 0};
10118 static swig_type_info _swigt__p__CameraFilesystem = {"_p__CameraFilesystem", "struct _CameraFilesystem *|CameraFilesystem *", 0, 0, (void*)0, 0};
10119 static swig_type_info _swigt__p__CameraFilesystemFuncs = {"_p__CameraFilesystemFuncs", "struct _CameraFilesystemFuncs *|CameraFilesystemFuncs *", 0, 0, (void*)0, 0};
10120 static swig_type_info _swigt__p__CameraFunctions = {"_p__CameraFunctions", "struct _CameraFunctions *|CameraFunctions *", 0, 0, (void*)0, 0};
10121 static swig_type_info _swigt__p__CameraList = {"_p__CameraList", "struct _CameraList *|CameraList *", 0, 0, (void*)0, 0};
10122 static swig_type_info _swigt__p__CameraPrivateCore = {"_p__CameraPrivateCore", "struct _CameraPrivateCore *|CameraPrivateCore *", 0, 0, (void*)0, 0};
10123 static swig_type_info _swigt__p__CameraPrivateLibrary = {"_p__CameraPrivateLibrary", "struct _CameraPrivateLibrary *|CameraPrivateLibrary *", 0, 0, (void*)0, 0};
10124 static swig_type_info _swigt__p__CameraStorageInformation = {"_p__CameraStorageInformation", "struct _CameraStorageInformation *|CameraStorageInformation *", 0, 0, (void*)0, 0};
10125 static swig_type_info _swigt__p__CameraWidget = {"_p__CameraWidget", "struct _CameraWidget *|CameraWidget *|_CameraWidget *", 0, 0, (void*)&SwigPyBuiltin___CameraWidget_clientdata, 0};
10126 static swig_type_info _swigt__p__GPContext = {"_p__GPContext", "struct _GPContext *|GPContext *", 0, 0, (void*)0, 0};
10127 static swig_type_info _swigt__p__GPContextFeedback = {"_p__GPContextFeedback", "enum _GPContextFeedback *|GPContextFeedback *", 0, 0, (void*)0, 0};
10128 static swig_type_info _swigt__p__GPPortInfoList = {"_p__GPPortInfoList", "struct _GPPortInfoList *|GPPortInfoList *", 0, 0, (void*)0, 0};
10129 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
10130 static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
10131 static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
10132 static swig_type_info _swigt__p_long = {"_p_long", "long *|time_t *", 0, 0, (void*)0, 0};
10133 static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
10134 static swig_type_info _swigt__p_p__CameraWidget = {"_p_p__CameraWidget", "struct _CameraWidget **|CameraWidget **", 0, 0, (void*)0, 0};
10135 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
10136 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
10137 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
10138 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
10139 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
10140 static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
10141 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
10142
10143 static swig_type_info *swig_type_initial[] = {
10144 &_swigt__p_CameraAbilities,
10145 &_swigt__p_CameraCaptureType,
10146 &_swigt__p_CameraDriverStatus,
10147 &_swigt__p_CameraEventType,
10148 &_swigt__p_CameraFileAccessType,
10149 &_swigt__p_CameraFileInfoFields,
10150 &_swigt__p_CameraFileOperation,
10151 &_swigt__p_CameraFilePath,
10152 &_swigt__p_CameraFilePermissions,
10153 &_swigt__p_CameraFileStatus,
10154 &_swigt__p_CameraFileType,
10155 &_swigt__p_CameraFolderOperation,
10156 &_swigt__p_CameraOperation,
10157 &_swigt__p_CameraStorageAccessType,
10158 &_swigt__p_CameraStorageFilesystemType,
10159 &_swigt__p_CameraStorageInfoFields,
10160 &_swigt__p_CameraStorageType,
10161 &_swigt__p_CameraText,
10162 &_swigt__p_CameraWidgetChildIter,
10163 &_swigt__p_CameraWidgetChoiceIter,
10164 &_swigt__p_CameraWidgetType,
10165 &_swigt__p_GPLogLevel,
10166 &_swigt__p_GPPortType,
10167 &_swigt__p_GPVersionVerbosity,
10168 &_swigt__p_GphotoDeviceType,
10169 &_swigt__p_SwigPyObject,
10170 &_swigt__p__Camera,
10171 &_swigt__p__CameraAbilitiesList,
10172 &_swigt__p__CameraFile,
10173 &_swigt__p__CameraFileHandler,
10174 &_swigt__p__CameraFileInfo,
10175 &_swigt__p__CameraFileInfoAudio,
10176 &_swigt__p__CameraFileInfoFile,
10177 &_swigt__p__CameraFileInfoPreview,
10178 &_swigt__p__CameraFilesystem,
10179 &_swigt__p__CameraFilesystemFuncs,
10180 &_swigt__p__CameraFunctions,
10181 &_swigt__p__CameraList,
10182 &_swigt__p__CameraPrivateCore,
10183 &_swigt__p__CameraPrivateLibrary,
10184 &_swigt__p__CameraStorageInformation,
10185 &_swigt__p__CameraWidget,
10186 &_swigt__p__GPContext,
10187 &_swigt__p__GPContextFeedback,
10188 &_swigt__p__GPPortInfoList,
10189 &_swigt__p_char,
10190 &_swigt__p_float,
10191 &_swigt__p_int,
10192 &_swigt__p_long,
10193 &_swigt__p_long_long,
10194 &_swigt__p_p__CameraWidget,
10195 &_swigt__p_p_char,
10196 &_swigt__p_short,
10197 &_swigt__p_signed_char,
10198 &_swigt__p_unsigned_char,
10199 &_swigt__p_unsigned_int,
10200 &_swigt__p_unsigned_long_long,
10201 &_swigt__p_unsigned_short,
10202 };
10203
10204 static swig_cast_info _swigc__p_CameraAbilities[] = { {&_swigt__p_CameraAbilities, 0, 0, 0},{0, 0, 0, 0}};
10205 static swig_cast_info _swigc__p_CameraCaptureType[] = { {&_swigt__p_CameraCaptureType, 0, 0, 0},{0, 0, 0, 0}};
10206 static swig_cast_info _swigc__p_CameraDriverStatus[] = { {&_swigt__p_CameraDriverStatus, 0, 0, 0},{0, 0, 0, 0}};
10207 static swig_cast_info _swigc__p_CameraEventType[] = { {&_swigt__p_CameraEventType, 0, 0, 0},{0, 0, 0, 0}};
10208 static swig_cast_info _swigc__p_CameraFileAccessType[] = { {&_swigt__p_CameraFileAccessType, 0, 0, 0},{0, 0, 0, 0}};
10209 static swig_cast_info _swigc__p_CameraFileInfoFields[] = { {&_swigt__p_CameraFileInfoFields, 0, 0, 0},{0, 0, 0, 0}};
10210 static swig_cast_info _swigc__p_CameraFileOperation[] = { {&_swigt__p_CameraFileOperation, 0, 0, 0},{0, 0, 0, 0}};
10211 static swig_cast_info _swigc__p_CameraFilePath[] = { {&_swigt__p_CameraFilePath, 0, 0, 0},{0, 0, 0, 0}};
10212 static swig_cast_info _swigc__p_CameraFilePermissions[] = { {&_swigt__p_CameraFilePermissions, 0, 0, 0},{0, 0, 0, 0}};
10213 static swig_cast_info _swigc__p_CameraFileStatus[] = { {&_swigt__p_CameraFileStatus, 0, 0, 0},{0, 0, 0, 0}};
10214 static swig_cast_info _swigc__p_CameraFileType[] = { {&_swigt__p_CameraFileType, 0, 0, 0},{0, 0, 0, 0}};
10215 static swig_cast_info _swigc__p_CameraFolderOperation[] = { {&_swigt__p_CameraFolderOperation, 0, 0, 0},{0, 0, 0, 0}};
10216 static swig_cast_info _swigc__p_CameraOperation[] = { {&_swigt__p_CameraOperation, 0, 0, 0},{0, 0, 0, 0}};
10217 static swig_cast_info _swigc__p_CameraStorageAccessType[] = { {&_swigt__p_CameraStorageAccessType, 0, 0, 0},{0, 0, 0, 0}};
10218 static swig_cast_info _swigc__p_CameraStorageFilesystemType[] = { {&_swigt__p_CameraStorageFilesystemType, 0, 0, 0},{0, 0, 0, 0}};
10219 static swig_cast_info _swigc__p_CameraStorageInfoFields[] = { {&_swigt__p_CameraStorageInfoFields, 0, 0, 0},{0, 0, 0, 0}};
10220 static swig_cast_info _swigc__p_CameraStorageType[] = { {&_swigt__p_CameraStorageType, 0, 0, 0},{0, 0, 0, 0}};
10221 static swig_cast_info _swigc__p_CameraText[] = { {&_swigt__p_CameraText, 0, 0, 0},{0, 0, 0, 0}};
10222 static swig_cast_info _swigc__p_CameraWidgetChildIter[] = { {&_swigt__p_CameraWidgetChildIter, 0, 0, 0},{0, 0, 0, 0}};
10223 static swig_cast_info _swigc__p_CameraWidgetChoiceIter[] = { {&_swigt__p_CameraWidgetChoiceIter, 0, 0, 0},{0, 0, 0, 0}};
10224 static swig_cast_info _swigc__p_CameraWidgetType[] = { {&_swigt__p_CameraWidgetType, 0, 0, 0},{0, 0, 0, 0}};
10225 static swig_cast_info _swigc__p_GPLogLevel[] = { {&_swigt__p_GPLogLevel, 0, 0, 0},{0, 0, 0, 0}};
10226 static swig_cast_info _swigc__p_GPPortType[] = { {&_swigt__p_GPPortType, 0, 0, 0},{0, 0, 0, 0}};
10227 static swig_cast_info _swigc__p_GPVersionVerbosity[] = { {&_swigt__p_GPVersionVerbosity, 0, 0, 0},{0, 0, 0, 0}};
10228 static swig_cast_info _swigc__p_GphotoDeviceType[] = { {&_swigt__p_GphotoDeviceType, 0, 0, 0},{0, 0, 0, 0}};
10229 static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}};
10230 static swig_cast_info _swigc__p__Camera[] = { {&_swigt__p__Camera, 0, 0, 0},{0, 0, 0, 0}};
10231 static swig_cast_info _swigc__p__CameraAbilitiesList[] = { {&_swigt__p__CameraAbilitiesList, 0, 0, 0},{0, 0, 0, 0}};
10232 static swig_cast_info _swigc__p__CameraFile[] = { {&_swigt__p__CameraFile, 0, 0, 0},{0, 0, 0, 0}};
10233 static swig_cast_info _swigc__p__CameraFileHandler[] = { {&_swigt__p__CameraFileHandler, 0, 0, 0},{0, 0, 0, 0}};
10234 static swig_cast_info _swigc__p__CameraFileInfo[] = { {&_swigt__p__CameraFileInfo, 0, 0, 0},{0, 0, 0, 0}};
10235 static swig_cast_info _swigc__p__CameraFileInfoAudio[] = { {&_swigt__p__CameraFileInfoAudio, 0, 0, 0},{0, 0, 0, 0}};
10236 static swig_cast_info _swigc__p__CameraFileInfoFile[] = { {&_swigt__p__CameraFileInfoFile, 0, 0, 0},{0, 0, 0, 0}};
10237 static swig_cast_info _swigc__p__CameraFileInfoPreview[] = { {&_swigt__p__CameraFileInfoPreview, 0, 0, 0},{0, 0, 0, 0}};
10238 static swig_cast_info _swigc__p__CameraFilesystem[] = { {&_swigt__p__CameraFilesystem, 0, 0, 0},{0, 0, 0, 0}};
10239 static swig_cast_info _swigc__p__CameraFilesystemFuncs[] = { {&_swigt__p__CameraFilesystemFuncs, 0, 0, 0},{0, 0, 0, 0}};
10240 static swig_cast_info _swigc__p__CameraFunctions[] = { {&_swigt__p__CameraFunctions, 0, 0, 0},{0, 0, 0, 0}};
10241 static swig_cast_info _swigc__p__CameraList[] = { {&_swigt__p__CameraList, 0, 0, 0},{0, 0, 0, 0}};
10242 static swig_cast_info _swigc__p__CameraPrivateCore[] = { {&_swigt__p__CameraPrivateCore, 0, 0, 0},{0, 0, 0, 0}};
10243 static swig_cast_info _swigc__p__CameraPrivateLibrary[] = { {&_swigt__p__CameraPrivateLibrary, 0, 0, 0},{0, 0, 0, 0}};
10244 static swig_cast_info _swigc__p__CameraStorageInformation[] = { {&_swigt__p__CameraStorageInformation, 0, 0, 0},{0, 0, 0, 0}};
10245 static swig_cast_info _swigc__p__CameraWidget[] = { {&_swigt__p__CameraWidget, 0, 0, 0},{0, 0, 0, 0}};
10246 static swig_cast_info _swigc__p__GPContext[] = { {&_swigt__p__GPContext, 0, 0, 0},{0, 0, 0, 0}};
10247 static swig_cast_info _swigc__p__GPContextFeedback[] = { {&_swigt__p__GPContextFeedback, 0, 0, 0},{0, 0, 0, 0}};
10248 static swig_cast_info _swigc__p__GPPortInfoList[] = { {&_swigt__p__GPPortInfoList, 0, 0, 0},{0, 0, 0, 0}};
10249 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
10250 static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
10251 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
10252 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
10253 static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
10254 static swig_cast_info _swigc__p_p__CameraWidget[] = { {&_swigt__p_p__CameraWidget, 0, 0, 0},{0, 0, 0, 0}};
10255 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
10256 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
10257 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
10258 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
10259 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
10260 static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
10261 static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
10262
10263 static swig_cast_info *swig_cast_initial[] = {
10264 _swigc__p_CameraAbilities,
10265 _swigc__p_CameraCaptureType,
10266 _swigc__p_CameraDriverStatus,
10267 _swigc__p_CameraEventType,
10268 _swigc__p_CameraFileAccessType,
10269 _swigc__p_CameraFileInfoFields,
10270 _swigc__p_CameraFileOperation,
10271 _swigc__p_CameraFilePath,
10272 _swigc__p_CameraFilePermissions,
10273 _swigc__p_CameraFileStatus,
10274 _swigc__p_CameraFileType,
10275 _swigc__p_CameraFolderOperation,
10276 _swigc__p_CameraOperation,
10277 _swigc__p_CameraStorageAccessType,
10278 _swigc__p_CameraStorageFilesystemType,
10279 _swigc__p_CameraStorageInfoFields,
10280 _swigc__p_CameraStorageType,
10281 _swigc__p_CameraText,
10282 _swigc__p_CameraWidgetChildIter,
10283 _swigc__p_CameraWidgetChoiceIter,
10284 _swigc__p_CameraWidgetType,
10285 _swigc__p_GPLogLevel,
10286 _swigc__p_GPPortType,
10287 _swigc__p_GPVersionVerbosity,
10288 _swigc__p_GphotoDeviceType,
10289 _swigc__p_SwigPyObject,
10290 _swigc__p__Camera,
10291 _swigc__p__CameraAbilitiesList,
10292 _swigc__p__CameraFile,
10293 _swigc__p__CameraFileHandler,
10294 _swigc__p__CameraFileInfo,
10295 _swigc__p__CameraFileInfoAudio,
10296 _swigc__p__CameraFileInfoFile,
10297 _swigc__p__CameraFileInfoPreview,
10298 _swigc__p__CameraFilesystem,
10299 _swigc__p__CameraFilesystemFuncs,
10300 _swigc__p__CameraFunctions,
10301 _swigc__p__CameraList,
10302 _swigc__p__CameraPrivateCore,
10303 _swigc__p__CameraPrivateLibrary,
10304 _swigc__p__CameraStorageInformation,
10305 _swigc__p__CameraWidget,
10306 _swigc__p__GPContext,
10307 _swigc__p__GPContextFeedback,
10308 _swigc__p__GPPortInfoList,
10309 _swigc__p_char,
10310 _swigc__p_float,
10311 _swigc__p_int,
10312 _swigc__p_long,
10313 _swigc__p_long_long,
10314 _swigc__p_p__CameraWidget,
10315 _swigc__p_p_char,
10316 _swigc__p_short,
10317 _swigc__p_signed_char,
10318 _swigc__p_unsigned_char,
10319 _swigc__p_unsigned_int,
10320 _swigc__p_unsigned_long_long,
10321 _swigc__p_unsigned_short,
10322 };
10323
10324
10325 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
10326
10327 static swig_const_info swig_const_table[] = {
10328 {0, 0, 0, 0.0, 0, 0}};
10329
10330 #ifdef __cplusplus
10331 }
10332 #endif
10333 static PyTypeObject *builtin_bases[2];
10334
10335 /* -----------------------------------------------------------------------------
10336 * Type initialization:
10337 * This problem is tough by the requirement that no dynamic
10338 * memory is used. Also, since swig_type_info structures store pointers to
10339 * swig_cast_info structures and swig_cast_info structures store pointers back
10340 * to swig_type_info structures, we need some lookup code at initialization.
10341 * The idea is that swig generates all the structures that are needed.
10342 * The runtime then collects these partially filled structures.
10343 * The SWIG_InitializeModule function takes these initial arrays out of
10344 * swig_module, and does all the lookup, filling in the swig_module.types
10345 * array with the correct data and linking the correct swig_cast_info
10346 * structures together.
10347 *
10348 * The generated swig_type_info structures are assigned statically to an initial
10349 * array. We just loop through that array, and handle each type individually.
10350 * First we lookup if this type has been already loaded, and if so, use the
10351 * loaded structure instead of the generated one. Then we have to fill in the
10352 * cast linked list. The cast data is initially stored in something like a
10353 * two-dimensional array. Each row corresponds to a type (there are the same
10354 * number of rows as there are in the swig_type_initial array). Each entry in
10355 * a column is one of the swig_cast_info structures for that type.
10356 * The cast_initial array is actually an array of arrays, because each row has
10357 * a variable number of columns. So to actually build the cast linked list,
10358 * we find the array of casts associated with the type, and loop through it
10359 * adding the casts to the list. The one last trick we need to do is making
10360 * sure the type pointer in the swig_cast_info struct is correct.
10361 *
10362 * First off, we lookup the cast->type name to see if it is already loaded.
10363 * There are three cases to handle:
10364 * 1) If the cast->type has already been loaded AND the type we are adding
10365 * casting info to has not been loaded (it is in this module), THEN we
10366 * replace the cast->type pointer with the type pointer that has already
10367 * been loaded.
10368 * 2) If BOTH types (the one we are adding casting info to, and the
10369 * cast->type) are loaded, THEN the cast info has already been loaded by
10370 * the previous module so we just ignore it.
10371 * 3) Finally, if cast->type has not already been loaded, then we add that
10372 * swig_cast_info to the linked list (because the cast->type) pointer will
10373 * be correct.
10374 * ----------------------------------------------------------------------------- */
10375
10376 #ifdef __cplusplus
10377 extern "C" {
10378 #if 0
10379 } /* c-mode */
10380 #endif
10381 #endif
10382
10383 #if 0
10384 #define SWIGRUNTIME_DEBUG
10385 #endif
10386
10387
10388 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)10389 SWIG_InitializeModule(void *clientdata) {
10390 size_t i;
10391 swig_module_info *module_head, *iter;
10392 int init;
10393
10394 /* check to see if the circular list has been setup, if not, set it up */
10395 if (swig_module.next==0) {
10396 /* Initialize the swig_module */
10397 swig_module.type_initial = swig_type_initial;
10398 swig_module.cast_initial = swig_cast_initial;
10399 swig_module.next = &swig_module;
10400 init = 1;
10401 } else {
10402 init = 0;
10403 }
10404
10405 /* Try and load any already created modules */
10406 module_head = SWIG_GetModule(clientdata);
10407 if (!module_head) {
10408 /* This is the first module loaded for this interpreter */
10409 /* so set the swig module into the interpreter */
10410 SWIG_SetModule(clientdata, &swig_module);
10411 } else {
10412 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
10413 iter=module_head;
10414 do {
10415 if (iter==&swig_module) {
10416 /* Our module is already in the list, so there's nothing more to do. */
10417 return;
10418 }
10419 iter=iter->next;
10420 } while (iter!= module_head);
10421
10422 /* otherwise we must add our module into the list */
10423 swig_module.next = module_head->next;
10424 module_head->next = &swig_module;
10425 }
10426
10427 /* When multiple interpreters are used, a module could have already been initialized in
10428 a different interpreter, but not yet have a pointer in this interpreter.
10429 In this case, we do not want to continue adding types... everything should be
10430 set up already */
10431 if (init == 0) return;
10432
10433 /* Now work on filling in swig_module.types */
10434 #ifdef SWIGRUNTIME_DEBUG
10435 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
10436 #endif
10437 for (i = 0; i < swig_module.size; ++i) {
10438 swig_type_info *type = 0;
10439 swig_type_info *ret;
10440 swig_cast_info *cast;
10441
10442 #ifdef SWIGRUNTIME_DEBUG
10443 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
10444 #endif
10445
10446 /* if there is another module already loaded */
10447 if (swig_module.next != &swig_module) {
10448 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
10449 }
10450 if (type) {
10451 /* Overwrite clientdata field */
10452 #ifdef SWIGRUNTIME_DEBUG
10453 printf("SWIG_InitializeModule: found type %s\n", type->name);
10454 #endif
10455 if (swig_module.type_initial[i]->clientdata) {
10456 type->clientdata = swig_module.type_initial[i]->clientdata;
10457 #ifdef SWIGRUNTIME_DEBUG
10458 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
10459 #endif
10460 }
10461 } else {
10462 type = swig_module.type_initial[i];
10463 }
10464
10465 /* Insert casting types */
10466 cast = swig_module.cast_initial[i];
10467 while (cast->type) {
10468 /* Don't need to add information already in the list */
10469 ret = 0;
10470 #ifdef SWIGRUNTIME_DEBUG
10471 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
10472 #endif
10473 if (swig_module.next != &swig_module) {
10474 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
10475 #ifdef SWIGRUNTIME_DEBUG
10476 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
10477 #endif
10478 }
10479 if (ret) {
10480 if (type == swig_module.type_initial[i]) {
10481 #ifdef SWIGRUNTIME_DEBUG
10482 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
10483 #endif
10484 cast->type = ret;
10485 ret = 0;
10486 } else {
10487 /* Check for casting already in the list */
10488 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
10489 #ifdef SWIGRUNTIME_DEBUG
10490 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
10491 #endif
10492 if (!ocast) ret = 0;
10493 }
10494 }
10495
10496 if (!ret) {
10497 #ifdef SWIGRUNTIME_DEBUG
10498 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
10499 #endif
10500 if (type->cast) {
10501 type->cast->prev = cast;
10502 cast->next = type->cast;
10503 }
10504 type->cast = cast;
10505 }
10506 cast++;
10507 }
10508 /* Set entry in modules->types array equal to the type */
10509 swig_module.types[i] = type;
10510 }
10511 swig_module.types[i] = 0;
10512
10513 #ifdef SWIGRUNTIME_DEBUG
10514 printf("**** SWIG_InitializeModule: Cast List ******\n");
10515 for (i = 0; i < swig_module.size; ++i) {
10516 int j = 0;
10517 swig_cast_info *cast = swig_module.cast_initial[i];
10518 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
10519 while (cast->type) {
10520 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
10521 cast++;
10522 ++j;
10523 }
10524 printf("---- Total casts: %d\n",j);
10525 }
10526 printf("**** SWIG_InitializeModule: Cast List ******\n");
10527 #endif
10528 }
10529
10530 /* This function will propagate the clientdata field of type to
10531 * any new swig_type_info structures that have been added into the list
10532 * of equivalent types. It is like calling
10533 * SWIG_TypeClientData(type, clientdata) a second time.
10534 */
10535 SWIGRUNTIME void
SWIG_PropagateClientData(void)10536 SWIG_PropagateClientData(void) {
10537 size_t i;
10538 swig_cast_info *equiv;
10539 static int init_run = 0;
10540
10541 if (init_run) return;
10542 init_run = 1;
10543
10544 for (i = 0; i < swig_module.size; i++) {
10545 if (swig_module.types[i]->clientdata) {
10546 equiv = swig_module.types[i]->cast;
10547 while (equiv) {
10548 if (!equiv->converter) {
10549 if (equiv->type && !equiv->type->clientdata)
10550 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
10551 }
10552 equiv = equiv->next;
10553 }
10554 }
10555 }
10556 }
10557
10558 #ifdef __cplusplus
10559 #if 0
10560 {
10561 /* c-mode */
10562 #endif
10563 }
10564 #endif
10565
10566
10567
10568 #ifdef __cplusplus
10569 extern "C" {
10570 #endif
10571
10572 /* Python-specific SWIG API */
10573 #define SWIG_newvarlink() SWIG_Python_newvarlink()
10574 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
10575 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
10576
10577 /* -----------------------------------------------------------------------------
10578 * global variable support code.
10579 * ----------------------------------------------------------------------------- */
10580
10581 typedef struct swig_globalvar {
10582 char *name; /* Name of global variable */
10583 PyObject *(*get_attr)(void); /* Return the current value */
10584 int (*set_attr)(PyObject *); /* Set the value */
10585 struct swig_globalvar *next;
10586 } swig_globalvar;
10587
10588 typedef struct swig_varlinkobject {
10589 PyObject_HEAD
10590 swig_globalvar *vars;
10591 } swig_varlinkobject;
10592
10593 SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))10594 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
10595 #if PY_VERSION_HEX >= 0x03000000
10596 return PyUnicode_InternFromString("<Swig global variables>");
10597 #else
10598 return PyString_FromString("<Swig global variables>");
10599 #endif
10600 }
10601
10602 SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)10603 swig_varlink_str(swig_varlinkobject *v) {
10604 #if PY_VERSION_HEX >= 0x03000000
10605 PyObject *str = PyUnicode_InternFromString("(");
10606 PyObject *tail;
10607 PyObject *joined;
10608 swig_globalvar *var;
10609 for (var = v->vars; var; var=var->next) {
10610 tail = PyUnicode_FromString(var->name);
10611 joined = PyUnicode_Concat(str, tail);
10612 Py_DecRef(str);
10613 Py_DecRef(tail);
10614 str = joined;
10615 if (var->next) {
10616 tail = PyUnicode_InternFromString(", ");
10617 joined = PyUnicode_Concat(str, tail);
10618 Py_DecRef(str);
10619 Py_DecRef(tail);
10620 str = joined;
10621 }
10622 }
10623 tail = PyUnicode_InternFromString(")");
10624 joined = PyUnicode_Concat(str, tail);
10625 Py_DecRef(str);
10626 Py_DecRef(tail);
10627 str = joined;
10628 #else
10629 PyObject *str = PyString_FromString("(");
10630 swig_globalvar *var;
10631 for (var = v->vars; var; var=var->next) {
10632 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
10633 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
10634 }
10635 PyString_ConcatAndDel(&str,PyString_FromString(")"));
10636 #endif
10637 return str;
10638 }
10639
10640 SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)10641 swig_varlink_dealloc(swig_varlinkobject *v) {
10642 swig_globalvar *var = v->vars;
10643 while (var) {
10644 swig_globalvar *n = var->next;
10645 free(var->name);
10646 free(var);
10647 var = n;
10648 }
10649 }
10650
10651 SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)10652 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
10653 PyObject *res = NULL;
10654 swig_globalvar *var = v->vars;
10655 while (var) {
10656 if (strcmp(var->name,n) == 0) {
10657 res = (*var->get_attr)();
10658 break;
10659 }
10660 var = var->next;
10661 }
10662 if (res == NULL && !PyErr_Occurred()) {
10663 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
10664 }
10665 return res;
10666 }
10667
10668 SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)10669 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
10670 int res = 1;
10671 swig_globalvar *var = v->vars;
10672 while (var) {
10673 if (strcmp(var->name,n) == 0) {
10674 res = (*var->set_attr)(p);
10675 break;
10676 }
10677 var = var->next;
10678 }
10679 if (res == 1 && !PyErr_Occurred()) {
10680 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
10681 }
10682 return res;
10683 }
10684
10685 SWIGINTERN PyTypeObject*
swig_varlink_type(void)10686 swig_varlink_type(void) {
10687 static char varlink__doc__[] = "Swig var link object";
10688 static PyTypeObject varlink_type;
10689 static int type_init = 0;
10690 if (!type_init) {
10691 const PyTypeObject tmp = {
10692 #if PY_VERSION_HEX >= 0x03000000
10693 PyVarObject_HEAD_INIT(NULL, 0)
10694 #else
10695 PyObject_HEAD_INIT(NULL)
10696 0, /* ob_size */
10697 #endif
10698 "swigvarlink", /* tp_name */
10699 sizeof(swig_varlinkobject), /* tp_basicsize */
10700 0, /* tp_itemsize */
10701 (destructor) swig_varlink_dealloc, /* tp_dealloc */
10702 0, /* tp_print */
10703 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
10704 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
10705 0, /* tp_compare */
10706 (reprfunc) swig_varlink_repr, /* tp_repr */
10707 0, /* tp_as_number */
10708 0, /* tp_as_sequence */
10709 0, /* tp_as_mapping */
10710 0, /* tp_hash */
10711 0, /* tp_call */
10712 (reprfunc) swig_varlink_str, /* tp_str */
10713 0, /* tp_getattro */
10714 0, /* tp_setattro */
10715 0, /* tp_as_buffer */
10716 0, /* tp_flags */
10717 varlink__doc__, /* tp_doc */
10718 0, /* tp_traverse */
10719 0, /* tp_clear */
10720 0, /* tp_richcompare */
10721 0, /* tp_weaklistoffset */
10722 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
10723 0, /* tp_del */
10724 0, /* tp_version_tag */
10725 #if PY_VERSION_HEX >= 0x03040000
10726 0, /* tp_finalize */
10727 #endif
10728 #if PY_VERSION_HEX >= 0x03080000
10729 0, /* tp_vectorcall */
10730 #endif
10731 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
10732 0, /* tp_print */
10733 #endif
10734 #ifdef COUNT_ALLOCS
10735 0, /* tp_allocs */
10736 0, /* tp_frees */
10737 0, /* tp_maxalloc */
10738 0, /* tp_prev */
10739 0 /* tp_next */
10740 #endif
10741 };
10742 varlink_type = tmp;
10743 type_init = 1;
10744 if (PyType_Ready(&varlink_type) < 0)
10745 return NULL;
10746 }
10747 return &varlink_type;
10748 }
10749
10750 /* Create a variable linking object for use later */
10751 SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)10752 SWIG_Python_newvarlink(void) {
10753 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
10754 if (result) {
10755 result->vars = 0;
10756 }
10757 return ((PyObject*) result);
10758 }
10759
10760 SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,const char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))10761 SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
10762 swig_varlinkobject *v = (swig_varlinkobject *) p;
10763 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
10764 if (gv) {
10765 size_t size = strlen(name)+1;
10766 gv->name = (char *)malloc(size);
10767 if (gv->name) {
10768 memcpy(gv->name, name, size);
10769 gv->get_attr = get_attr;
10770 gv->set_attr = set_attr;
10771 gv->next = v->vars;
10772 }
10773 }
10774 v->vars = gv;
10775 }
10776
10777 SWIGINTERN PyObject *
SWIG_globals(void)10778 SWIG_globals(void) {
10779 static PyObject *globals = 0;
10780 if (!globals) {
10781 globals = SWIG_newvarlink();
10782 }
10783 return globals;
10784 }
10785
10786 /* -----------------------------------------------------------------------------
10787 * constants/methods manipulation
10788 * ----------------------------------------------------------------------------- */
10789
10790 /* Install Constants */
10791 SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])10792 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
10793 PyObject *obj = 0;
10794 size_t i;
10795 for (i = 0; constants[i].type; ++i) {
10796 switch(constants[i].type) {
10797 case SWIG_PY_POINTER:
10798 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
10799 break;
10800 case SWIG_PY_BINARY:
10801 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
10802 break;
10803 default:
10804 obj = 0;
10805 break;
10806 }
10807 if (obj) {
10808 PyDict_SetItemString(d, constants[i].name, obj);
10809 Py_DECREF(obj);
10810 }
10811 }
10812 }
10813
10814 /* -----------------------------------------------------------------------------*/
10815 /* Fix SwigMethods to carry the callback ptrs when needed */
10816 /* -----------------------------------------------------------------------------*/
10817
10818 SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)10819 SWIG_Python_FixMethods(PyMethodDef *methods,
10820 swig_const_info *const_table,
10821 swig_type_info **types,
10822 swig_type_info **types_initial) {
10823 size_t i;
10824 for (i = 0; methods[i].ml_name; ++i) {
10825 const char *c = methods[i].ml_doc;
10826 if (!c) continue;
10827 c = strstr(c, "swig_ptr: ");
10828 if (c) {
10829 int j;
10830 swig_const_info *ci = 0;
10831 const char *name = c + 10;
10832 for (j = 0; const_table[j].type; ++j) {
10833 if (strncmp(const_table[j].name, name,
10834 strlen(const_table[j].name)) == 0) {
10835 ci = &(const_table[j]);
10836 break;
10837 }
10838 }
10839 if (ci) {
10840 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
10841 if (ptr) {
10842 size_t shift = (ci->ptype) - types;
10843 swig_type_info *ty = types_initial[shift];
10844 size_t ldoc = (c - methods[i].ml_doc);
10845 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
10846 char *ndoc = (char*)malloc(ldoc + lptr + 10);
10847 if (ndoc) {
10848 char *buff = ndoc;
10849 memcpy(buff, methods[i].ml_doc, ldoc);
10850 buff += ldoc;
10851 memcpy(buff, "swig_ptr: ", 10);
10852 buff += 10;
10853 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
10854 methods[i].ml_doc = ndoc;
10855 }
10856 }
10857 }
10858 }
10859 }
10860 }
10861
10862 /* -----------------------------------------------------------------------------
10863 * Method creation and docstring support functions
10864 * ----------------------------------------------------------------------------- */
10865
10866 /* -----------------------------------------------------------------------------
10867 * Function to find the method definition with the correct docstring for the
10868 * proxy module as opposed to the low-level API
10869 * ----------------------------------------------------------------------------- */
10870
SWIG_PythonGetProxyDoc(const char * name)10871 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
10872 /* Find the function in the modified method table */
10873 size_t offset = 0;
10874 int found = 0;
10875 while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
10876 if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
10877 found = 1;
10878 break;
10879 }
10880 offset++;
10881 }
10882 /* Use the copy with the modified docstring if available */
10883 return found ? &SwigMethods_proxydocs[offset] : NULL;
10884 }
10885
10886 /* -----------------------------------------------------------------------------
10887 * Wrapper of PyInstanceMethod_New() used in Python 3
10888 * It is exported to the generated module, used for -fastproxy
10889 * ----------------------------------------------------------------------------- */
10890
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)10891 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
10892 if (PyCFunction_Check(func)) {
10893 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
10894 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
10895 if (ml)
10896 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
10897 }
10898 #if PY_VERSION_HEX >= 0x03000000
10899 return PyInstanceMethod_New(func);
10900 #else
10901 return PyMethod_New(func, NULL, NULL);
10902 #endif
10903 }
10904
10905 /* -----------------------------------------------------------------------------
10906 * Wrapper of PyStaticMethod_New()
10907 * It is exported to the generated module, used for -fastproxy
10908 * ----------------------------------------------------------------------------- */
10909
SWIG_PyStaticMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)10910 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
10911 if (PyCFunction_Check(func)) {
10912 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
10913 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
10914 if (ml)
10915 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
10916 }
10917 return PyStaticMethod_New(func);
10918 }
10919
10920 #ifdef __cplusplus
10921 }
10922 #endif
10923
10924 /* -----------------------------------------------------------------------------*
10925 * Partial Init method
10926 * -----------------------------------------------------------------------------*/
10927
10928 #ifdef __cplusplus
10929 extern "C"
10930 #endif
10931
10932 SWIGEXPORT
10933 #if PY_VERSION_HEX >= 0x03000000
10934 PyObject*
10935 #else
10936 void
10937 #endif
SWIG_init(void)10938 SWIG_init(void) {
10939 PyObject *m, *d, *md, *globals;
10940
10941 #if PY_VERSION_HEX >= 0x03000000
10942 static struct PyModuleDef SWIG_module = {
10943 PyModuleDef_HEAD_INIT,
10944 SWIG_name,
10945 NULL,
10946 -1,
10947 SwigMethods,
10948 NULL,
10949 NULL,
10950 NULL,
10951 NULL
10952 };
10953 #endif
10954
10955 #if defined(SWIGPYTHON_BUILTIN)
10956 static SwigPyClientData SwigPyObject_clientdata = {
10957 0, 0, 0, 0, 0, 0, 0
10958 };
10959 static PyGetSetDef this_getset_def = {
10960 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
10961 };
10962 static SwigPyGetSet thisown_getset_closure = {
10963 SwigPyObject_own,
10964 SwigPyObject_own
10965 };
10966 static PyGetSetDef thisown_getset_def = {
10967 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
10968 };
10969 PyTypeObject *builtin_pytype;
10970 int builtin_base_count;
10971 swig_type_info *builtin_basetype;
10972 PyObject *tuple;
10973 PyGetSetDescrObject *static_getset;
10974 PyTypeObject *metatype;
10975 PyTypeObject *swigpyobject;
10976 SwigPyClientData *cd;
10977 PyObject *public_interface, *public_symbol;
10978 PyObject *this_descr;
10979 PyObject *thisown_descr;
10980 PyObject *self = 0;
10981 int i;
10982
10983 (void)builtin_pytype;
10984 (void)builtin_base_count;
10985 (void)builtin_basetype;
10986 (void)tuple;
10987 (void)static_getset;
10988 (void)self;
10989
10990 /* Metaclass is used to implement static member variables */
10991 metatype = SwigPyObjectType();
10992 assert(metatype);
10993 #endif
10994
10995 (void)globals;
10996
10997 /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
10998 SWIG_This();
10999 SWIG_Python_TypeCache();
11000 SwigPyPacked_type();
11001 #ifndef SWIGPYTHON_BUILTIN
11002 SwigPyObject_type();
11003 #endif
11004
11005 /* Fix SwigMethods to carry the callback ptrs when needed */
11006 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
11007
11008 #if PY_VERSION_HEX >= 0x03000000
11009 m = PyModule_Create(&SWIG_module);
11010 #else
11011 m = Py_InitModule(SWIG_name, SwigMethods);
11012 #endif
11013
11014 md = d = PyModule_GetDict(m);
11015 (void)md;
11016
11017 SWIG_InitializeModule(0);
11018
11019 #ifdef SWIGPYTHON_BUILTIN
11020 swigpyobject = SwigPyObject_TypeOnce();
11021
11022 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
11023 assert(SwigPyObject_stype);
11024 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
11025 if (!cd) {
11026 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
11027 SwigPyObject_clientdata.pytype = swigpyobject;
11028 } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
11029 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
11030 # if PY_VERSION_HEX >= 0x03000000
11031 return NULL;
11032 # else
11033 return;
11034 # endif
11035 }
11036
11037 /* All objects have a 'this' attribute */
11038 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
11039 (void)this_descr;
11040
11041 /* All objects have a 'thisown' attribute */
11042 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
11043 (void)thisown_descr;
11044
11045 public_interface = PyList_New(0);
11046 public_symbol = 0;
11047 (void)public_symbol;
11048
11049 PyDict_SetItemString(md, "__all__", public_interface);
11050 Py_DECREF(public_interface);
11051 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
11052 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
11053 for (i = 0; swig_const_table[i].name != 0; ++i)
11054 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
11055 #endif
11056
11057 SWIG_InstallConstants(d,swig_const_table);
11058
11059
11060 {
11061 PyObject *module = PyImport_ImportModule("gphoto2");
11062 if (module != NULL) {
11063 PyExc_GPhoto2Error = PyObject_GetAttrString(module, "GPhoto2Error");
11064 Py_DECREF(module);
11065 }
11066 if (PyExc_GPhoto2Error == NULL)
11067 #if PY_VERSION_HEX >= 0x03000000
11068 return NULL;
11069 #else
11070 return;
11071 #endif
11072 }
11073
11074
11075 /* type '::CameraWidgetChildIter' */
11076 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__CameraWidgetChildIter_type;
11077 builtin_pytype->tp_dict = d = PyDict_New();
11078 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
11079 builtin_pytype->tp_new = PyType_GenericNew;
11080 builtin_base_count = 0;
11081 builtin_bases[builtin_base_count] = NULL;
11082 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
11083 PyDict_SetItemString(d, "this", this_descr);
11084 PyDict_SetItemString(d, "thisown", thisown_descr);
11085 if (PyType_Ready(builtin_pytype) < 0) {
11086 PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraWidgetChildIter'.");
11087 #if PY_VERSION_HEX >= 0x03000000
11088 return NULL;
11089 #else
11090 return;
11091 #endif
11092 }
11093 Py_INCREF(builtin_pytype);
11094 PyModule_AddObject(m, "CameraWidgetChildIter", (PyObject *)builtin_pytype);
11095 SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraWidgetChildIter");
11096 d = md;
11097
11098 /* type '::CameraWidgetChoiceIter' */
11099 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__CameraWidgetChoiceIter_type;
11100 builtin_pytype->tp_dict = d = PyDict_New();
11101 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
11102 builtin_pytype->tp_new = PyType_GenericNew;
11103 builtin_base_count = 0;
11104 builtin_bases[builtin_base_count] = NULL;
11105 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
11106 PyDict_SetItemString(d, "this", this_descr);
11107 PyDict_SetItemString(d, "thisown", thisown_descr);
11108 if (PyType_Ready(builtin_pytype) < 0) {
11109 PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraWidgetChoiceIter'.");
11110 #if PY_VERSION_HEX >= 0x03000000
11111 return NULL;
11112 #else
11113 return;
11114 #endif
11115 }
11116 Py_INCREF(builtin_pytype);
11117 PyModule_AddObject(m, "CameraWidgetChoiceIter", (PyObject *)builtin_pytype);
11118 SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraWidgetChoiceIter");
11119 d = md;
11120
11121 /* type '::_CameraWidget' */
11122 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___CameraWidget_type;
11123 builtin_pytype->tp_dict = d = PyDict_New();
11124 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
11125 builtin_pytype->tp_new = PyType_GenericNew;
11126 builtin_base_count = 0;
11127 builtin_bases[builtin_base_count] = NULL;
11128 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
11129 PyDict_SetItemString(d, "this", this_descr);
11130 PyDict_SetItemString(d, "thisown", thisown_descr);
11131 if (PyType_Ready(builtin_pytype) < 0) {
11132 PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraWidget'.");
11133 #if PY_VERSION_HEX >= 0x03000000
11134 return NULL;
11135 #else
11136 return;
11137 #endif
11138 }
11139 Py_INCREF(builtin_pytype);
11140 PyModule_AddObject(m, "CameraWidget", (PyObject *)builtin_pytype);
11141 SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraWidget");
11142 d = md;
11143 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_WINDOW",SWIG_From_int((int)(GP_WIDGET_WINDOW)));
11144 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_SECTION",SWIG_From_int((int)(GP_WIDGET_SECTION)));
11145 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_TEXT",SWIG_From_int((int)(GP_WIDGET_TEXT)));
11146 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_RANGE",SWIG_From_int((int)(GP_WIDGET_RANGE)));
11147 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_TOGGLE",SWIG_From_int((int)(GP_WIDGET_TOGGLE)));
11148 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_RADIO",SWIG_From_int((int)(GP_WIDGET_RADIO)));
11149 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_MENU",SWIG_From_int((int)(GP_WIDGET_MENU)));
11150 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_BUTTON",SWIG_From_int((int)(GP_WIDGET_BUTTON)));
11151 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_WIDGET_DATE",SWIG_From_int((int)(GP_WIDGET_DATE)));
11152 #if PY_VERSION_HEX >= 0x03000000
11153 return m;
11154 #else
11155 return;
11156 #endif
11157 }
11158
11159