]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/image.cpp
warning fixed
[wxWidgets.git] / wxPython / src / msw / image.cpp
1 /*
2 * FILE : src/msw/image.cpp
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
7 *
8 * Portions Copyright (c) 1995-1998
9 * The University of Utah and The Regents of the University of California.
10 * Permission is granted to distribute this file in any manner provided
11 * this notice remains intact.
12 *
13 * Do not make changes to this file--changes will be lost!
14 *
15 */
16
17
18 #define SWIGCODE
19 /* Implementation : PYTHON */
20
21 #define SWIGPYTHON
22 #include <string.h>
23 #include <stdlib.h>
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
28 # else
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
31 # else
32 # define SWIGEXPORT(a) a
33 # endif
34 # endif
35 #else
36 # define SWIGEXPORT(a) a
37 #endif
38
39 #include "Python.h"
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 extern void SWIG_MakePtr(char *, void *, char *);
46 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47 extern char *SWIG_GetPtr(char *, void **, char *);
48 extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
49 extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50 extern PyObject *SWIG_newvarlink(void);
51 #ifdef __cplusplus
52 }
53 #endif
54 #define SWIG_init initimagec
55
56 #define SWIG_name "imagec"
57
58 #include "helpers.h"
59 #include <wx/image.h>
60
61 static PyObject* l_output_helper(PyObject* target, PyObject* o) {
62 PyObject* o2;
63 if (!target) {
64 target = o;
65 } else if (target == Py_None) {
66 Py_DECREF(Py_None);
67 target = o;
68 } else {
69 if (!PyList_Check(target)) {
70 o2 = target;
71 target = PyList_New(0);
72 PyList_Append(target, o2);
73 Py_XDECREF(o2);
74 }
75 PyList_Append(target,o);
76 Py_XDECREF(o);
77 }
78 return target;
79 }
80
81 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
82 PyObject* o2;
83 PyObject* o3;
84
85 if (!target) {
86 target = o;
87 } else if (target == Py_None) {
88 Py_DECREF(Py_None);
89 target = o;
90 } else {
91 if (!PyTuple_Check(target)) {
92 o2 = target;
93 target = PyTuple_New(1);
94 PyTuple_SetItem(target, 0, o2);
95 }
96 o3 = PyTuple_New(1);
97 PyTuple_SetItem(o3, 0, o);
98
99 o2 = target;
100 target = PySequence_Concat(o2, o3);
101 Py_DECREF(o2);
102 Py_DECREF(o3);
103 }
104 return target;
105 }
106
107 #if PYTHON_API_VERSION >= 1009
108 static char* wxStringErrorMsg = "String or Unicode type required";
109 #else
110 static char* wxStringErrorMsg = "string type is required for parameter";
111 #endif
112
113 wxImage* wxEmptyImage(int width=0, int height=0) {
114 if (width == 0 && height == 0)
115 return new wxImage;
116 else
117 return new wxImage(width, height);
118 }
119
120 wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype) {
121 return new wxImage(name, mimetype);
122 }
123
124 wxImage* wxImageFromBitmap(const wxBitmap &bitmap) {
125 return new wxImage(bitmap);
126 }
127
128 #if 0
129 extern wxImage wxNullImage;
130
131 #endif
132
133 wxBitmap* wxBitmapFromImage(const wxImage& img, int depth=-1) {
134 return new wxBitmap(img, depth);
135 }
136
137 #ifdef __cplusplus
138 extern "C" {
139 #endif
140 static PyObject *_wrap_wxEmptyImage(PyObject *self, PyObject *args, PyObject *kwargs) {
141 PyObject * _resultobj;
142 wxImage * _result;
143 int _arg0 = (int ) 0;
144 int _arg1 = (int ) 0;
145 char *_kwnames[] = { "width","height", NULL };
146 char _ptemp[128];
147
148 self = self;
149 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxEmptyImage",_kwnames,&_arg0,&_arg1))
150 return NULL;
151 {
152 wxPy_BEGIN_ALLOW_THREADS;
153 _result = (wxImage *)wxEmptyImage(_arg0,_arg1);
154
155 wxPy_END_ALLOW_THREADS;
156 } if (_result) {
157 SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
158 _resultobj = Py_BuildValue("s",_ptemp);
159 } else {
160 Py_INCREF(Py_None);
161 _resultobj = Py_None;
162 }
163 return _resultobj;
164 }
165
166 static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject *kwargs) {
167 PyObject * _resultobj;
168 wxImage * _result;
169 wxString * _arg0;
170 wxString * _arg1;
171 PyObject * _obj0 = 0;
172 PyObject * _obj1 = 0;
173 char *_kwnames[] = { "name","mimetype", NULL };
174 char _ptemp[128];
175
176 self = self;
177 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageFromMime",_kwnames,&_obj0,&_obj1))
178 return NULL;
179 {
180 #if PYTHON_API_VERSION >= 1009
181 char* tmpPtr; int tmpSize;
182 if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
183 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
184 return NULL;
185 }
186 if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
187 return NULL;
188 _arg0 = new wxString(tmpPtr, tmpSize);
189 #else
190 if (!PyString_Check(_obj0)) {
191 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
192 return NULL;
193 }
194 _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
195 #endif
196 }
197 {
198 #if PYTHON_API_VERSION >= 1009
199 char* tmpPtr; int tmpSize;
200 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
201 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
202 return NULL;
203 }
204 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
205 return NULL;
206 _arg1 = new wxString(tmpPtr, tmpSize);
207 #else
208 if (!PyString_Check(_obj1)) {
209 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
210 return NULL;
211 }
212 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
213 #endif
214 }
215 {
216 wxPy_BEGIN_ALLOW_THREADS;
217 _result = (wxImage *)wxImageFromMime(*_arg0,*_arg1);
218
219 wxPy_END_ALLOW_THREADS;
220 } if (_result) {
221 SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
222 _resultobj = Py_BuildValue("s",_ptemp);
223 } else {
224 Py_INCREF(Py_None);
225 _resultobj = Py_None;
226 }
227 {
228 if (_obj0)
229 delete _arg0;
230 }
231 {
232 if (_obj1)
233 delete _arg1;
234 }
235 return _resultobj;
236 }
237
238 static PyObject *_wrap_wxImageFromBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
239 PyObject * _resultobj;
240 wxImage * _result;
241 wxBitmap * _arg0;
242 PyObject * _argo0 = 0;
243 char *_kwnames[] = { "bitmap", NULL };
244 char _ptemp[128];
245
246 self = self;
247 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageFromBitmap",_kwnames,&_argo0))
248 return NULL;
249 if (_argo0) {
250 if (_argo0 == Py_None) { _arg0 = NULL; }
251 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
252 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
253 return NULL;
254 }
255 }
256 {
257 wxPy_BEGIN_ALLOW_THREADS;
258 _result = (wxImage *)wxImageFromBitmap(*_arg0);
259
260 wxPy_END_ALLOW_THREADS;
261 } if (_result) {
262 SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
263 _resultobj = Py_BuildValue("s",_ptemp);
264 } else {
265 Py_INCREF(Py_None);
266 _resultobj = Py_None;
267 }
268 return _resultobj;
269 }
270
271 static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, PyObject *kwargs) {
272 PyObject * _resultobj;
273 char *_kwnames[] = { NULL };
274
275 self = self;
276 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxInitAllImageHandlers",_kwnames))
277 return NULL;
278 {
279 wxPy_BEGIN_ALLOW_THREADS;
280 wxInitAllImageHandlers();
281
282 wxPy_END_ALLOW_THREADS;
283 } Py_INCREF(Py_None);
284 _resultobj = Py_None;
285 return _resultobj;
286 }
287
288 static int _wrap_wxNullImage_set(PyObject *val) {
289
290 PyErr_SetString(PyExc_TypeError,"Variable wxNullImage is read-only.");
291 return 1;
292 }
293
294 static PyObject *_wrap_wxNullImage_get() {
295 PyObject * pyobj;
296 char ptemp[128];
297
298 SWIG_MakePtr(ptemp,(char *) &wxNullImage,"_wxImage_p");
299 pyobj = PyString_FromString(ptemp);
300 return pyobj;
301 }
302
303 static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObject *kwargs) {
304 PyObject * _resultobj;
305 wxBitmap * _result;
306 wxImage * _arg0;
307 int _arg1 = (int ) -1;
308 PyObject * _argo0 = 0;
309 char *_kwnames[] = { "img","depth", NULL };
310 char _ptemp[128];
311
312 self = self;
313 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxBitmapFromImage",_kwnames,&_argo0,&_arg1))
314 return NULL;
315 if (_argo0) {
316 if (_argo0 == Py_None) { _arg0 = NULL; }
317 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
318 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
319 return NULL;
320 }
321 }
322 {
323 wxPy_BEGIN_ALLOW_THREADS;
324 _result = (wxBitmap *)wxBitmapFromImage(*_arg0,_arg1);
325
326 wxPy_END_ALLOW_THREADS;
327 } if (_result) {
328 SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p");
329 _resultobj = Py_BuildValue("s",_ptemp);
330 } else {
331 Py_INCREF(Py_None);
332 _resultobj = Py_None;
333 }
334 return _resultobj;
335 }
336
337 #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
338 static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, PyObject *kwargs) {
339 PyObject * _resultobj;
340 wxString * _result;
341 wxImageHandler * _arg0;
342 PyObject * _argo0 = 0;
343 char *_kwnames[] = { "self", NULL };
344
345 self = self;
346 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageHandler_GetName",_kwnames,&_argo0))
347 return NULL;
348 if (_argo0) {
349 if (_argo0 == Py_None) { _arg0 = NULL; }
350 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
351 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_GetName. Expected _wxImageHandler_p.");
352 return NULL;
353 }
354 }
355 {
356 wxPy_BEGIN_ALLOW_THREADS;
357 _result = new wxString (wxImageHandler_GetName(_arg0));
358
359 wxPy_END_ALLOW_THREADS;
360 }{
361 _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
362 }
363 {
364 delete _result;
365 }
366 return _resultobj;
367 }
368
369 #define wxImageHandler_GetExtension(_swigobj) (_swigobj->GetExtension())
370 static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *args, PyObject *kwargs) {
371 PyObject * _resultobj;
372 wxString * _result;
373 wxImageHandler * _arg0;
374 PyObject * _argo0 = 0;
375 char *_kwnames[] = { "self", NULL };
376
377 self = self;
378 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageHandler_GetExtension",_kwnames,&_argo0))
379 return NULL;
380 if (_argo0) {
381 if (_argo0 == Py_None) { _arg0 = NULL; }
382 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
383 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_GetExtension. Expected _wxImageHandler_p.");
384 return NULL;
385 }
386 }
387 {
388 wxPy_BEGIN_ALLOW_THREADS;
389 _result = new wxString (wxImageHandler_GetExtension(_arg0));
390
391 wxPy_END_ALLOW_THREADS;
392 }{
393 _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
394 }
395 {
396 delete _result;
397 }
398 return _resultobj;
399 }
400
401 #define wxImageHandler_GetType(_swigobj) (_swigobj->GetType())
402 static PyObject *_wrap_wxImageHandler_GetType(PyObject *self, PyObject *args, PyObject *kwargs) {
403 PyObject * _resultobj;
404 long _result;
405 wxImageHandler * _arg0;
406 PyObject * _argo0 = 0;
407 char *_kwnames[] = { "self", NULL };
408
409 self = self;
410 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageHandler_GetType",_kwnames,&_argo0))
411 return NULL;
412 if (_argo0) {
413 if (_argo0 == Py_None) { _arg0 = NULL; }
414 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
415 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_GetType. Expected _wxImageHandler_p.");
416 return NULL;
417 }
418 }
419 {
420 wxPy_BEGIN_ALLOW_THREADS;
421 _result = (long )wxImageHandler_GetType(_arg0);
422
423 wxPy_END_ALLOW_THREADS;
424 } _resultobj = Py_BuildValue("l",_result);
425 return _resultobj;
426 }
427
428 #define wxImageHandler_GetMimeType(_swigobj) (_swigobj->GetMimeType())
429 static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) {
430 PyObject * _resultobj;
431 wxString * _result;
432 wxImageHandler * _arg0;
433 PyObject * _argo0 = 0;
434 char *_kwnames[] = { "self", NULL };
435
436 self = self;
437 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageHandler_GetMimeType",_kwnames,&_argo0))
438 return NULL;
439 if (_argo0) {
440 if (_argo0 == Py_None) { _arg0 = NULL; }
441 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
442 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_GetMimeType. Expected _wxImageHandler_p.");
443 return NULL;
444 }
445 }
446 {
447 wxPy_BEGIN_ALLOW_THREADS;
448 _result = new wxString (wxImageHandler_GetMimeType(_arg0));
449
450 wxPy_END_ALLOW_THREADS;
451 }{
452 _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
453 }
454 {
455 delete _result;
456 }
457 return _resultobj;
458 }
459
460 #define wxImageHandler_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
461 static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, PyObject *kwargs) {
462 PyObject * _resultobj;
463 wxImageHandler * _arg0;
464 wxString * _arg1;
465 PyObject * _argo0 = 0;
466 PyObject * _obj1 = 0;
467 char *_kwnames[] = { "self","name", NULL };
468
469 self = self;
470 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageHandler_SetName",_kwnames,&_argo0,&_obj1))
471 return NULL;
472 if (_argo0) {
473 if (_argo0 == Py_None) { _arg0 = NULL; }
474 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
475 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_SetName. Expected _wxImageHandler_p.");
476 return NULL;
477 }
478 }
479 {
480 #if PYTHON_API_VERSION >= 1009
481 char* tmpPtr; int tmpSize;
482 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
483 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
484 return NULL;
485 }
486 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
487 return NULL;
488 _arg1 = new wxString(tmpPtr, tmpSize);
489 #else
490 if (!PyString_Check(_obj1)) {
491 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
492 return NULL;
493 }
494 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
495 #endif
496 }
497 {
498 wxPy_BEGIN_ALLOW_THREADS;
499 wxImageHandler_SetName(_arg0,*_arg1);
500
501 wxPy_END_ALLOW_THREADS;
502 } Py_INCREF(Py_None);
503 _resultobj = Py_None;
504 {
505 if (_obj1)
506 delete _arg1;
507 }
508 return _resultobj;
509 }
510
511 #define wxImageHandler_SetExtension(_swigobj,_swigarg0) (_swigobj->SetExtension(_swigarg0))
512 static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *args, PyObject *kwargs) {
513 PyObject * _resultobj;
514 wxImageHandler * _arg0;
515 wxString * _arg1;
516 PyObject * _argo0 = 0;
517 PyObject * _obj1 = 0;
518 char *_kwnames[] = { "self","extension", NULL };
519
520 self = self;
521 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageHandler_SetExtension",_kwnames,&_argo0,&_obj1))
522 return NULL;
523 if (_argo0) {
524 if (_argo0 == Py_None) { _arg0 = NULL; }
525 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
526 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_SetExtension. Expected _wxImageHandler_p.");
527 return NULL;
528 }
529 }
530 {
531 #if PYTHON_API_VERSION >= 1009
532 char* tmpPtr; int tmpSize;
533 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
534 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
535 return NULL;
536 }
537 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
538 return NULL;
539 _arg1 = new wxString(tmpPtr, tmpSize);
540 #else
541 if (!PyString_Check(_obj1)) {
542 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
543 return NULL;
544 }
545 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
546 #endif
547 }
548 {
549 wxPy_BEGIN_ALLOW_THREADS;
550 wxImageHandler_SetExtension(_arg0,*_arg1);
551
552 wxPy_END_ALLOW_THREADS;
553 } Py_INCREF(Py_None);
554 _resultobj = Py_None;
555 {
556 if (_obj1)
557 delete _arg1;
558 }
559 return _resultobj;
560 }
561
562 #define wxImageHandler_SetType(_swigobj,_swigarg0) (_swigobj->SetType(_swigarg0))
563 static PyObject *_wrap_wxImageHandler_SetType(PyObject *self, PyObject *args, PyObject *kwargs) {
564 PyObject * _resultobj;
565 wxImageHandler * _arg0;
566 long _arg1;
567 PyObject * _argo0 = 0;
568 char *_kwnames[] = { "self","type", NULL };
569
570 self = self;
571 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxImageHandler_SetType",_kwnames,&_argo0,&_arg1))
572 return NULL;
573 if (_argo0) {
574 if (_argo0 == Py_None) { _arg0 = NULL; }
575 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
576 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_SetType. Expected _wxImageHandler_p.");
577 return NULL;
578 }
579 }
580 {
581 wxPy_BEGIN_ALLOW_THREADS;
582 wxImageHandler_SetType(_arg0,_arg1);
583
584 wxPy_END_ALLOW_THREADS;
585 } Py_INCREF(Py_None);
586 _resultobj = Py_None;
587 return _resultobj;
588 }
589
590 #define wxImageHandler_SetMimeType(_swigobj,_swigarg0) (_swigobj->SetMimeType(_swigarg0))
591 static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) {
592 PyObject * _resultobj;
593 wxImageHandler * _arg0;
594 wxString * _arg1;
595 PyObject * _argo0 = 0;
596 PyObject * _obj1 = 0;
597 char *_kwnames[] = { "self","mimetype", NULL };
598
599 self = self;
600 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageHandler_SetMimeType",_kwnames,&_argo0,&_obj1))
601 return NULL;
602 if (_argo0) {
603 if (_argo0 == Py_None) { _arg0 = NULL; }
604 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
605 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageHandler_SetMimeType. Expected _wxImageHandler_p.");
606 return NULL;
607 }
608 }
609 {
610 #if PYTHON_API_VERSION >= 1009
611 char* tmpPtr; int tmpSize;
612 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
613 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
614 return NULL;
615 }
616 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
617 return NULL;
618 _arg1 = new wxString(tmpPtr, tmpSize);
619 #else
620 if (!PyString_Check(_obj1)) {
621 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
622 return NULL;
623 }
624 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
625 #endif
626 }
627 {
628 wxPy_BEGIN_ALLOW_THREADS;
629 wxImageHandler_SetMimeType(_arg0,*_arg1);
630
631 wxPy_END_ALLOW_THREADS;
632 } Py_INCREF(Py_None);
633 _resultobj = Py_None;
634 {
635 if (_obj1)
636 delete _arg1;
637 }
638 return _resultobj;
639 }
640
641 static void *SwigwxPNGHandlerTowxImageHandler(void *ptr) {
642 wxPNGHandler *src;
643 wxImageHandler *dest;
644 src = (wxPNGHandler *) ptr;
645 dest = (wxImageHandler *) src;
646 return (void *) dest;
647 }
648
649 #define new_wxPNGHandler() (new wxPNGHandler())
650 static PyObject *_wrap_new_wxPNGHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
651 PyObject * _resultobj;
652 wxPNGHandler * _result;
653 char *_kwnames[] = { NULL };
654 char _ptemp[128];
655
656 self = self;
657 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPNGHandler",_kwnames))
658 return NULL;
659 {
660 wxPy_BEGIN_ALLOW_THREADS;
661 _result = (wxPNGHandler *)new_wxPNGHandler();
662
663 wxPy_END_ALLOW_THREADS;
664 } if (_result) {
665 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPNGHandler_p");
666 _resultobj = Py_BuildValue("s",_ptemp);
667 } else {
668 Py_INCREF(Py_None);
669 _resultobj = Py_None;
670 }
671 return _resultobj;
672 }
673
674 static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr) {
675 wxJPEGHandler *src;
676 wxImageHandler *dest;
677 src = (wxJPEGHandler *) ptr;
678 dest = (wxImageHandler *) src;
679 return (void *) dest;
680 }
681
682 #define new_wxJPEGHandler() (new wxJPEGHandler())
683 static PyObject *_wrap_new_wxJPEGHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
684 PyObject * _resultobj;
685 wxJPEGHandler * _result;
686 char *_kwnames[] = { NULL };
687 char _ptemp[128];
688
689 self = self;
690 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxJPEGHandler",_kwnames))
691 return NULL;
692 {
693 wxPy_BEGIN_ALLOW_THREADS;
694 _result = (wxJPEGHandler *)new_wxJPEGHandler();
695
696 wxPy_END_ALLOW_THREADS;
697 } if (_result) {
698 SWIG_MakePtr(_ptemp, (char *) _result,"_wxJPEGHandler_p");
699 _resultobj = Py_BuildValue("s",_ptemp);
700 } else {
701 Py_INCREF(Py_None);
702 _resultobj = Py_None;
703 }
704 return _resultobj;
705 }
706
707 static void *SwigwxBMPHandlerTowxImageHandler(void *ptr) {
708 wxBMPHandler *src;
709 wxImageHandler *dest;
710 src = (wxBMPHandler *) ptr;
711 dest = (wxImageHandler *) src;
712 return (void *) dest;
713 }
714
715 #define new_wxBMPHandler() (new wxBMPHandler())
716 static PyObject *_wrap_new_wxBMPHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
717 PyObject * _resultobj;
718 wxBMPHandler * _result;
719 char *_kwnames[] = { NULL };
720 char _ptemp[128];
721
722 self = self;
723 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxBMPHandler",_kwnames))
724 return NULL;
725 {
726 wxPy_BEGIN_ALLOW_THREADS;
727 _result = (wxBMPHandler *)new_wxBMPHandler();
728
729 wxPy_END_ALLOW_THREADS;
730 } if (_result) {
731 SWIG_MakePtr(_ptemp, (char *) _result,"_wxBMPHandler_p");
732 _resultobj = Py_BuildValue("s",_ptemp);
733 } else {
734 Py_INCREF(Py_None);
735 _resultobj = Py_None;
736 }
737 return _resultobj;
738 }
739
740 static void *SwigwxGIFHandlerTowxImageHandler(void *ptr) {
741 wxGIFHandler *src;
742 wxImageHandler *dest;
743 src = (wxGIFHandler *) ptr;
744 dest = (wxImageHandler *) src;
745 return (void *) dest;
746 }
747
748 #define new_wxGIFHandler() (new wxGIFHandler())
749 static PyObject *_wrap_new_wxGIFHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
750 PyObject * _resultobj;
751 wxGIFHandler * _result;
752 char *_kwnames[] = { NULL };
753 char _ptemp[128];
754
755 self = self;
756 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGIFHandler",_kwnames))
757 return NULL;
758 {
759 wxPy_BEGIN_ALLOW_THREADS;
760 _result = (wxGIFHandler *)new_wxGIFHandler();
761
762 wxPy_END_ALLOW_THREADS;
763 } if (_result) {
764 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGIFHandler_p");
765 _resultobj = Py_BuildValue("s",_ptemp);
766 } else {
767 Py_INCREF(Py_None);
768 _resultobj = Py_None;
769 }
770 return _resultobj;
771 }
772
773 static void *SwigwxPNMHandlerTowxImageHandler(void *ptr) {
774 wxPNMHandler *src;
775 wxImageHandler *dest;
776 src = (wxPNMHandler *) ptr;
777 dest = (wxImageHandler *) src;
778 return (void *) dest;
779 }
780
781 #define new_wxPNMHandler() (new wxPNMHandler())
782 static PyObject *_wrap_new_wxPNMHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
783 PyObject * _resultobj;
784 wxPNMHandler * _result;
785 char *_kwnames[] = { NULL };
786 char _ptemp[128];
787
788 self = self;
789 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPNMHandler",_kwnames))
790 return NULL;
791 {
792 wxPy_BEGIN_ALLOW_THREADS;
793 _result = (wxPNMHandler *)new_wxPNMHandler();
794
795 wxPy_END_ALLOW_THREADS;
796 } if (_result) {
797 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPNMHandler_p");
798 _resultobj = Py_BuildValue("s",_ptemp);
799 } else {
800 Py_INCREF(Py_None);
801 _resultobj = Py_None;
802 }
803 return _resultobj;
804 }
805
806 static void *SwigwxPCXHandlerTowxImageHandler(void *ptr) {
807 wxPCXHandler *src;
808 wxImageHandler *dest;
809 src = (wxPCXHandler *) ptr;
810 dest = (wxImageHandler *) src;
811 return (void *) dest;
812 }
813
814 #define new_wxPCXHandler() (new wxPCXHandler())
815 static PyObject *_wrap_new_wxPCXHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
816 PyObject * _resultobj;
817 wxPCXHandler * _result;
818 char *_kwnames[] = { NULL };
819 char _ptemp[128];
820
821 self = self;
822 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPCXHandler",_kwnames))
823 return NULL;
824 {
825 wxPy_BEGIN_ALLOW_THREADS;
826 _result = (wxPCXHandler *)new_wxPCXHandler();
827
828 wxPy_END_ALLOW_THREADS;
829 } if (_result) {
830 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPCXHandler_p");
831 _resultobj = Py_BuildValue("s",_ptemp);
832 } else {
833 Py_INCREF(Py_None);
834 _resultobj = Py_None;
835 }
836 return _resultobj;
837 }
838
839 static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr) {
840 wxTIFFHandler *src;
841 wxImageHandler *dest;
842 src = (wxTIFFHandler *) ptr;
843 dest = (wxImageHandler *) src;
844 return (void *) dest;
845 }
846
847 #define new_wxTIFFHandler() (new wxTIFFHandler())
848 static PyObject *_wrap_new_wxTIFFHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
849 PyObject * _resultobj;
850 wxTIFFHandler * _result;
851 char *_kwnames[] = { NULL };
852 char _ptemp[128];
853
854 self = self;
855 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxTIFFHandler",_kwnames))
856 return NULL;
857 {
858 wxPy_BEGIN_ALLOW_THREADS;
859 _result = (wxTIFFHandler *)new_wxTIFFHandler();
860
861 wxPy_END_ALLOW_THREADS;
862 } if (_result) {
863 SWIG_MakePtr(_ptemp, (char *) _result,"_wxTIFFHandler_p");
864 _resultobj = Py_BuildValue("s",_ptemp);
865 } else {
866 Py_INCREF(Py_None);
867 _resultobj = Py_None;
868 }
869 return _resultobj;
870 }
871
872 #define new_wxImage(_swigarg0,_swigarg1) (new wxImage(_swigarg0,_swigarg1))
873 static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) {
874 PyObject * _resultobj;
875 wxImage * _result;
876 wxString * _arg0;
877 long _arg1 = (long ) wxBITMAP_TYPE_ANY;
878 PyObject * _obj0 = 0;
879 char *_kwnames[] = { "name","type", NULL };
880 char _ptemp[128];
881
882 self = self;
883 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:new_wxImage",_kwnames,&_obj0,&_arg1))
884 return NULL;
885 {
886 #if PYTHON_API_VERSION >= 1009
887 char* tmpPtr; int tmpSize;
888 if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
889 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
890 return NULL;
891 }
892 if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
893 return NULL;
894 _arg0 = new wxString(tmpPtr, tmpSize);
895 #else
896 if (!PyString_Check(_obj0)) {
897 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
898 return NULL;
899 }
900 _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
901 #endif
902 }
903 {
904 wxPy_BEGIN_ALLOW_THREADS;
905 _result = (wxImage *)new_wxImage(*_arg0,_arg1);
906
907 wxPy_END_ALLOW_THREADS;
908 } if (_result) {
909 SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
910 _resultobj = Py_BuildValue("s",_ptemp);
911 } else {
912 Py_INCREF(Py_None);
913 _resultobj = Py_None;
914 }
915 {
916 if (_obj0)
917 delete _arg0;
918 }
919 return _resultobj;
920 }
921
922 #define delete_wxImage(_swigobj) (delete _swigobj)
923 static PyObject *_wrap_delete_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) {
924 PyObject * _resultobj;
925 wxImage * _arg0;
926 PyObject * _argo0 = 0;
927 char *_kwnames[] = { "self", NULL };
928
929 self = self;
930 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxImage",_kwnames,&_argo0))
931 return NULL;
932 if (_argo0) {
933 if (_argo0 == Py_None) { _arg0 = NULL; }
934 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
935 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxImage. Expected _wxImage_p.");
936 return NULL;
937 }
938 }
939 {
940 wxPy_BEGIN_ALLOW_THREADS;
941 delete_wxImage(_arg0);
942
943 wxPy_END_ALLOW_THREADS;
944 } Py_INCREF(Py_None);
945 _resultobj = Py_None;
946 return _resultobj;
947 }
948
949 #define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
950 static PyObject *_wrap_wxImage_ConvertToBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
951 PyObject * _resultobj;
952 wxBitmap * _result;
953 wxImage * _arg0;
954 PyObject * _argo0 = 0;
955 char *_kwnames[] = { "self", NULL };
956 char _ptemp[128];
957
958 self = self;
959 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_ConvertToBitmap",_kwnames,&_argo0))
960 return NULL;
961 if (_argo0) {
962 if (_argo0 == Py_None) { _arg0 = NULL; }
963 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
964 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
965 return NULL;
966 }
967 }
968 {
969 wxPy_BEGIN_ALLOW_THREADS;
970 _result = new wxBitmap (wxImage_ConvertToBitmap(_arg0));
971
972 wxPy_END_ALLOW_THREADS;
973 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
974 _resultobj = Py_BuildValue("s",_ptemp);
975 return _resultobj;
976 }
977
978 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
979 static PyObject *_wrap_wxImage_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
980 PyObject * _resultobj;
981 wxImage * _arg0;
982 int _arg1;
983 int _arg2;
984 PyObject * _argo0 = 0;
985 char *_kwnames[] = { "self","width","height", NULL };
986
987 self = self;
988 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_Create",_kwnames,&_argo0,&_arg1,&_arg2))
989 return NULL;
990 if (_argo0) {
991 if (_argo0 == Py_None) { _arg0 = NULL; }
992 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
993 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
994 return NULL;
995 }
996 }
997 {
998 wxPy_BEGIN_ALLOW_THREADS;
999 wxImage_Create(_arg0,_arg1,_arg2);
1000
1001 wxPy_END_ALLOW_THREADS;
1002 } Py_INCREF(Py_None);
1003 _resultobj = Py_None;
1004 return _resultobj;
1005 }
1006
1007 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1008 static PyObject *_wrap_wxImage_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) {
1009 PyObject * _resultobj;
1010 wxImage * _arg0;
1011 PyObject * _argo0 = 0;
1012 char *_kwnames[] = { "self", NULL };
1013
1014 self = self;
1015 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_Destroy",_kwnames,&_argo0))
1016 return NULL;
1017 if (_argo0) {
1018 if (_argo0 == Py_None) { _arg0 = NULL; }
1019 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1020 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1021 return NULL;
1022 }
1023 }
1024 {
1025 wxPy_BEGIN_ALLOW_THREADS;
1026 wxImage_Destroy(_arg0);
1027
1028 wxPy_END_ALLOW_THREADS;
1029 } Py_INCREF(Py_None);
1030 _resultobj = Py_None;
1031 return _resultobj;
1032 }
1033
1034 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1035 static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args, PyObject *kwargs) {
1036 PyObject * _resultobj;
1037 wxImage * _result;
1038 wxImage * _arg0;
1039 int _arg1;
1040 int _arg2;
1041 PyObject * _argo0 = 0;
1042 char *_kwnames[] = { "self","width","height", NULL };
1043 char _ptemp[128];
1044
1045 self = self;
1046 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_Scale",_kwnames,&_argo0,&_arg1,&_arg2))
1047 return NULL;
1048 if (_argo0) {
1049 if (_argo0 == Py_None) { _arg0 = NULL; }
1050 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1051 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1052 return NULL;
1053 }
1054 }
1055 {
1056 wxPy_BEGIN_ALLOW_THREADS;
1057 _result = new wxImage (wxImage_Scale(_arg0,_arg1,_arg2));
1058
1059 wxPy_END_ALLOW_THREADS;
1060 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
1061 _resultobj = Py_BuildValue("s",_ptemp);
1062 return _resultobj;
1063 }
1064
1065 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1066 static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject *kwargs) {
1067 PyObject * _resultobj;
1068 wxImage * _result;
1069 wxImage * _arg0;
1070 int _arg1;
1071 int _arg2;
1072 PyObject * _argo0 = 0;
1073 char *_kwnames[] = { "self","width","height", NULL };
1074 char _ptemp[128];
1075
1076 self = self;
1077 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_Rescale",_kwnames,&_argo0,&_arg1,&_arg2))
1078 return NULL;
1079 if (_argo0) {
1080 if (_argo0 == Py_None) { _arg0 = NULL; }
1081 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1082 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1083 return NULL;
1084 }
1085 }
1086 {
1087 wxPy_BEGIN_ALLOW_THREADS;
1088 wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2);
1089 _result = (wxImage *) &_result_ref;
1090
1091 wxPy_END_ALLOW_THREADS;
1092 } if (_result) {
1093 SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
1094 _resultobj = Py_BuildValue("s",_ptemp);
1095 } else {
1096 Py_INCREF(Py_None);
1097 _resultobj = Py_None;
1098 }
1099 return _resultobj;
1100 }
1101
1102 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1103 static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args, PyObject *kwargs) {
1104 PyObject * _resultobj;
1105 wxImage * _arg0;
1106 int _arg1;
1107 int _arg2;
1108 unsigned char _arg3;
1109 unsigned char _arg4;
1110 unsigned char _arg5;
1111 PyObject * _argo0 = 0;
1112 char *_kwnames[] = { "self","x","y","r","g","b", NULL };
1113
1114 self = self;
1115 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiibbb:wxImage_SetRGB",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5))
1116 return NULL;
1117 if (_argo0) {
1118 if (_argo0 == Py_None) { _arg0 = NULL; }
1119 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1120 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1121 return NULL;
1122 }
1123 }
1124 {
1125 wxPy_BEGIN_ALLOW_THREADS;
1126 wxImage_SetRGB(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
1127
1128 wxPy_END_ALLOW_THREADS;
1129 } Py_INCREF(Py_None);
1130 _resultobj = Py_None;
1131 return _resultobj;
1132 }
1133
1134 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1135 static PyObject *_wrap_wxImage_GetRed(PyObject *self, PyObject *args, PyObject *kwargs) {
1136 PyObject * _resultobj;
1137 unsigned char _result;
1138 wxImage * _arg0;
1139 int _arg1;
1140 int _arg2;
1141 PyObject * _argo0 = 0;
1142 char *_kwnames[] = { "self","x","y", NULL };
1143
1144 self = self;
1145 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_GetRed",_kwnames,&_argo0,&_arg1,&_arg2))
1146 return NULL;
1147 if (_argo0) {
1148 if (_argo0 == Py_None) { _arg0 = NULL; }
1149 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1150 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1151 return NULL;
1152 }
1153 }
1154 {
1155 wxPy_BEGIN_ALLOW_THREADS;
1156 _result = (unsigned char )wxImage_GetRed(_arg0,_arg1,_arg2);
1157
1158 wxPy_END_ALLOW_THREADS;
1159 } _resultobj = Py_BuildValue("b",_result);
1160 return _resultobj;
1161 }
1162
1163 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1164 static PyObject *_wrap_wxImage_GetGreen(PyObject *self, PyObject *args, PyObject *kwargs) {
1165 PyObject * _resultobj;
1166 unsigned char _result;
1167 wxImage * _arg0;
1168 int _arg1;
1169 int _arg2;
1170 PyObject * _argo0 = 0;
1171 char *_kwnames[] = { "self","x","y", NULL };
1172
1173 self = self;
1174 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_GetGreen",_kwnames,&_argo0,&_arg1,&_arg2))
1175 return NULL;
1176 if (_argo0) {
1177 if (_argo0 == Py_None) { _arg0 = NULL; }
1178 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1179 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1180 return NULL;
1181 }
1182 }
1183 {
1184 wxPy_BEGIN_ALLOW_THREADS;
1185 _result = (unsigned char )wxImage_GetGreen(_arg0,_arg1,_arg2);
1186
1187 wxPy_END_ALLOW_THREADS;
1188 } _resultobj = Py_BuildValue("b",_result);
1189 return _resultobj;
1190 }
1191
1192 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1193 static PyObject *_wrap_wxImage_GetBlue(PyObject *self, PyObject *args, PyObject *kwargs) {
1194 PyObject * _resultobj;
1195 unsigned char _result;
1196 wxImage * _arg0;
1197 int _arg1;
1198 int _arg2;
1199 PyObject * _argo0 = 0;
1200 char *_kwnames[] = { "self","x","y", NULL };
1201
1202 self = self;
1203 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_GetBlue",_kwnames,&_argo0,&_arg1,&_arg2))
1204 return NULL;
1205 if (_argo0) {
1206 if (_argo0 == Py_None) { _arg0 = NULL; }
1207 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1208 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1209 return NULL;
1210 }
1211 }
1212 {
1213 wxPy_BEGIN_ALLOW_THREADS;
1214 _result = (unsigned char )wxImage_GetBlue(_arg0,_arg1,_arg2);
1215
1216 wxPy_END_ALLOW_THREADS;
1217 } _resultobj = Py_BuildValue("b",_result);
1218 return _resultobj;
1219 }
1220
1221 static PyObject *_wrap_wxImage_CanRead(PyObject *self, PyObject *args, PyObject *kwargs) {
1222 PyObject * _resultobj;
1223 bool _result;
1224 wxString * _arg0;
1225 PyObject * _obj0 = 0;
1226 char *_kwnames[] = { "name", NULL };
1227
1228 self = self;
1229 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_CanRead",_kwnames,&_obj0))
1230 return NULL;
1231 {
1232 #if PYTHON_API_VERSION >= 1009
1233 char* tmpPtr; int tmpSize;
1234 if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
1235 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1236 return NULL;
1237 }
1238 if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
1239 return NULL;
1240 _arg0 = new wxString(tmpPtr, tmpSize);
1241 #else
1242 if (!PyString_Check(_obj0)) {
1243 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1244 return NULL;
1245 }
1246 _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
1247 #endif
1248 }
1249 {
1250 wxPy_BEGIN_ALLOW_THREADS;
1251 _result = (bool )wxImage::CanRead(*_arg0);
1252
1253 wxPy_END_ALLOW_THREADS;
1254 } _resultobj = Py_BuildValue("i",_result);
1255 {
1256 if (_obj0)
1257 delete _arg0;
1258 }
1259 return _resultobj;
1260 }
1261
1262 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1))
1263 static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject *kwargs) {
1264 PyObject * _resultobj;
1265 bool _result;
1266 wxImage * _arg0;
1267 wxString * _arg1;
1268 long _arg2 = (long ) wxBITMAP_TYPE_ANY;
1269 PyObject * _argo0 = 0;
1270 PyObject * _obj1 = 0;
1271 char *_kwnames[] = { "self","name","type", NULL };
1272
1273 self = self;
1274 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxImage_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2))
1275 return NULL;
1276 if (_argo0) {
1277 if (_argo0 == Py_None) { _arg0 = NULL; }
1278 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1279 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1280 return NULL;
1281 }
1282 }
1283 {
1284 #if PYTHON_API_VERSION >= 1009
1285 char* tmpPtr; int tmpSize;
1286 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
1287 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1288 return NULL;
1289 }
1290 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
1291 return NULL;
1292 _arg1 = new wxString(tmpPtr, tmpSize);
1293 #else
1294 if (!PyString_Check(_obj1)) {
1295 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1296 return NULL;
1297 }
1298 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
1299 #endif
1300 }
1301 {
1302 wxPy_BEGIN_ALLOW_THREADS;
1303 _result = (bool )wxImage_LoadFile(_arg0,*_arg1,_arg2);
1304
1305 wxPy_END_ALLOW_THREADS;
1306 } _resultobj = Py_BuildValue("i",_result);
1307 {
1308 if (_obj1)
1309 delete _arg1;
1310 }
1311 return _resultobj;
1312 }
1313
1314 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1))
1315 static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyObject *kwargs) {
1316 PyObject * _resultobj;
1317 bool _result;
1318 wxImage * _arg0;
1319 wxString * _arg1;
1320 wxString * _arg2;
1321 PyObject * _argo0 = 0;
1322 PyObject * _obj1 = 0;
1323 PyObject * _obj2 = 0;
1324 char *_kwnames[] = { "self","name","mimetype", NULL };
1325
1326 self = self;
1327 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxImage_LoadMimeFile",_kwnames,&_argo0,&_obj1,&_obj2))
1328 return NULL;
1329 if (_argo0) {
1330 if (_argo0 == Py_None) { _arg0 = NULL; }
1331 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1332 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1333 return NULL;
1334 }
1335 }
1336 {
1337 #if PYTHON_API_VERSION >= 1009
1338 char* tmpPtr; int tmpSize;
1339 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
1340 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1341 return NULL;
1342 }
1343 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
1344 return NULL;
1345 _arg1 = new wxString(tmpPtr, tmpSize);
1346 #else
1347 if (!PyString_Check(_obj1)) {
1348 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1349 return NULL;
1350 }
1351 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
1352 #endif
1353 }
1354 {
1355 #if PYTHON_API_VERSION >= 1009
1356 char* tmpPtr; int tmpSize;
1357 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
1358 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1359 return NULL;
1360 }
1361 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
1362 return NULL;
1363 _arg2 = new wxString(tmpPtr, tmpSize);
1364 #else
1365 if (!PyString_Check(_obj2)) {
1366 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1367 return NULL;
1368 }
1369 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
1370 #endif
1371 }
1372 {
1373 wxPy_BEGIN_ALLOW_THREADS;
1374 _result = (bool )wxImage_LoadMimeFile(_arg0,*_arg1,*_arg2);
1375
1376 wxPy_END_ALLOW_THREADS;
1377 } _resultobj = Py_BuildValue("i",_result);
1378 {
1379 if (_obj1)
1380 delete _arg1;
1381 }
1382 {
1383 if (_obj2)
1384 delete _arg2;
1385 }
1386 return _resultobj;
1387 }
1388
1389 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1390 static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject *kwargs) {
1391 PyObject * _resultobj;
1392 bool _result;
1393 wxImage * _arg0;
1394 wxString * _arg1;
1395 int _arg2;
1396 PyObject * _argo0 = 0;
1397 PyObject * _obj1 = 0;
1398 char *_kwnames[] = { "self","name","type", NULL };
1399
1400 self = self;
1401 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxImage_SaveFile",_kwnames,&_argo0,&_obj1,&_arg2))
1402 return NULL;
1403 if (_argo0) {
1404 if (_argo0 == Py_None) { _arg0 = NULL; }
1405 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1406 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1407 return NULL;
1408 }
1409 }
1410 {
1411 #if PYTHON_API_VERSION >= 1009
1412 char* tmpPtr; int tmpSize;
1413 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
1414 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1415 return NULL;
1416 }
1417 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
1418 return NULL;
1419 _arg1 = new wxString(tmpPtr, tmpSize);
1420 #else
1421 if (!PyString_Check(_obj1)) {
1422 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1423 return NULL;
1424 }
1425 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
1426 #endif
1427 }
1428 {
1429 wxPy_BEGIN_ALLOW_THREADS;
1430 _result = (bool )wxImage_SaveFile(_arg0,*_arg1,_arg2);
1431
1432 wxPy_END_ALLOW_THREADS;
1433 } _resultobj = Py_BuildValue("i",_result);
1434 {
1435 if (_obj1)
1436 delete _arg1;
1437 }
1438 return _resultobj;
1439 }
1440
1441 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1442 static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyObject *kwargs) {
1443 PyObject * _resultobj;
1444 bool _result;
1445 wxImage * _arg0;
1446 wxString * _arg1;
1447 wxString * _arg2;
1448 PyObject * _argo0 = 0;
1449 PyObject * _obj1 = 0;
1450 PyObject * _obj2 = 0;
1451 char *_kwnames[] = { "self","name","mimetype", NULL };
1452
1453 self = self;
1454 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxImage_SaveMimeFile",_kwnames,&_argo0,&_obj1,&_obj2))
1455 return NULL;
1456 if (_argo0) {
1457 if (_argo0 == Py_None) { _arg0 = NULL; }
1458 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1459 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
1460 return NULL;
1461 }
1462 }
1463 {
1464 #if PYTHON_API_VERSION >= 1009
1465 char* tmpPtr; int tmpSize;
1466 if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
1467 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1468 return NULL;
1469 }
1470 if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
1471 return NULL;
1472 _arg1 = new wxString(tmpPtr, tmpSize);
1473 #else
1474 if (!PyString_Check(_obj1)) {
1475 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1476 return NULL;
1477 }
1478 _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
1479 #endif
1480 }
1481 {
1482 #if PYTHON_API_VERSION >= 1009
1483 char* tmpPtr; int tmpSize;
1484 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
1485 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1486 return NULL;
1487 }
1488 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
1489 return NULL;
1490 _arg2 = new wxString(tmpPtr, tmpSize);
1491 #else
1492 if (!PyString_Check(_obj2)) {
1493 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
1494 return NULL;
1495 }
1496 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
1497 #endif
1498 }
1499 {
1500 wxPy_BEGIN_ALLOW_THREADS;
1501 _result = (bool )wxImage_SaveMimeFile(_arg0,*_arg1,*_arg2);
1502
1503 wxPy_END_ALLOW_THREADS;
1504 } _resultobj = Py_BuildValue("i",_result);
1505 {
1506 if (_obj1)
1507 delete _arg1;
1508 }
1509 {
1510 if (_obj2)
1511 delete _arg2;
1512 }
1513 return _resultobj;
1514 }
1515
1516 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
1517 static PyObject *_wrap_wxImage_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
1518 PyObject * _resultobj;
1519 bool _result;
1520 wxImage * _arg0;
1521 PyObject * _argo0 = 0;
1522 char *_kwnames[] = { "self", NULL };
1523
1524 self = self;
1525 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_Ok",_kwnames,&_argo0))
1526 return NULL;
1527 if (_argo0) {
1528 if (_argo0 == Py_None) { _arg0 = NULL; }
1529 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1530 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
1531 return NULL;
1532 }
1533 }
1534 {
1535 wxPy_BEGIN_ALLOW_THREADS;
1536 _result = (bool )wxImage_Ok(_arg0);
1537
1538 wxPy_END_ALLOW_THREADS;
1539 } _resultobj = Py_BuildValue("i",_result);
1540 return _resultobj;
1541 }
1542
1543 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
1544 static PyObject *_wrap_wxImage_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
1545 PyObject * _resultobj;
1546 int _result;
1547 wxImage * _arg0;
1548 PyObject * _argo0 = 0;
1549 char *_kwnames[] = { "self", NULL };
1550
1551 self = self;
1552 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetWidth",_kwnames,&_argo0))
1553 return NULL;
1554 if (_argo0) {
1555 if (_argo0 == Py_None) { _arg0 = NULL; }
1556 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1557 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetWidth. Expected _wxImage_p.");
1558 return NULL;
1559 }
1560 }
1561 {
1562 wxPy_BEGIN_ALLOW_THREADS;
1563 _result = (int )wxImage_GetWidth(_arg0);
1564
1565 wxPy_END_ALLOW_THREADS;
1566 } _resultobj = Py_BuildValue("i",_result);
1567 return _resultobj;
1568 }
1569
1570 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
1571 static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) {
1572 PyObject * _resultobj;
1573 int _result;
1574 wxImage * _arg0;
1575 PyObject * _argo0 = 0;
1576 char *_kwnames[] = { "self", NULL };
1577
1578 self = self;
1579 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetHeight",_kwnames,&_argo0))
1580 return NULL;
1581 if (_argo0) {
1582 if (_argo0 == Py_None) { _arg0 = NULL; }
1583 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1584 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
1585 return NULL;
1586 }
1587 }
1588 {
1589 wxPy_BEGIN_ALLOW_THREADS;
1590 _result = (int )wxImage_GetHeight(_arg0);
1591
1592 wxPy_END_ALLOW_THREADS;
1593 } _resultobj = Py_BuildValue("i",_result);
1594 return _resultobj;
1595 }
1596
1597 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
1598 static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObject *kwargs) {
1599 PyObject * _resultobj;
1600 wxImage * _result;
1601 wxImage * _arg0;
1602 wxRect * _arg1;
1603 PyObject * _argo0 = 0;
1604 wxRect temp;
1605 PyObject * _obj1 = 0;
1606 char *_kwnames[] = { "self","rect", NULL };
1607 char _ptemp[128];
1608
1609 self = self;
1610 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_GetSubImage",_kwnames,&_argo0,&_obj1))
1611 return NULL;
1612 if (_argo0) {
1613 if (_argo0 == Py_None) { _arg0 = NULL; }
1614 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1615 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
1616 return NULL;
1617 }
1618 }
1619 {
1620 _arg1 = &temp;
1621 if (! wxRect_helper(_obj1, &_arg1))
1622 return NULL;
1623 }
1624 {
1625 wxPy_BEGIN_ALLOW_THREADS;
1626 _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1));
1627
1628 wxPy_END_ALLOW_THREADS;
1629 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
1630 _resultobj = Py_BuildValue("s",_ptemp);
1631 return _resultobj;
1632 }
1633
1634 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
1635 static PyObject *_wrap_wxImage_Copy(PyObject *self, PyObject *args, PyObject *kwargs) {
1636 PyObject * _resultobj;
1637 wxImage * _result;
1638 wxImage * _arg0;
1639 PyObject * _argo0 = 0;
1640 char *_kwnames[] = { "self", NULL };
1641 char _ptemp[128];
1642
1643 self = self;
1644 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_Copy",_kwnames,&_argo0))
1645 return NULL;
1646 if (_argo0) {
1647 if (_argo0 == Py_None) { _arg0 = NULL; }
1648 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1649 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
1650 return NULL;
1651 }
1652 }
1653 {
1654 wxPy_BEGIN_ALLOW_THREADS;
1655 _result = new wxImage (wxImage_Copy(_arg0));
1656
1657 wxPy_END_ALLOW_THREADS;
1658 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
1659 _resultobj = Py_BuildValue("s",_ptemp);
1660 return _resultobj;
1661 }
1662
1663 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
1664 static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *kwargs) {
1665 PyObject * _resultobj;
1666 wxImage * _arg0;
1667 wxImage * _arg1;
1668 int _arg2;
1669 int _arg3;
1670 PyObject * _argo0 = 0;
1671 PyObject * _argo1 = 0;
1672 char *_kwnames[] = { "self","image","x","y", NULL };
1673
1674 self = self;
1675 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxImage_Paste",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3))
1676 return NULL;
1677 if (_argo0) {
1678 if (_argo0 == Py_None) { _arg0 = NULL; }
1679 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1680 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
1681 return NULL;
1682 }
1683 }
1684 if (_argo1) {
1685 if (_argo1 == Py_None) { _arg1 = NULL; }
1686 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
1687 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
1688 return NULL;
1689 }
1690 }
1691 {
1692 wxPy_BEGIN_ALLOW_THREADS;
1693 wxImage_Paste(_arg0,*_arg1,_arg2,_arg3);
1694
1695 wxPy_END_ALLOW_THREADS;
1696 } Py_INCREF(Py_None);
1697 _resultobj = Py_None;
1698 return _resultobj;
1699 }
1700
1701 static PyObject * wxImage_GetData(wxImage *self) {
1702 unsigned char* data = self->GetData();
1703 int len = self->GetWidth() * self->GetHeight() * 3;
1704 return PyString_FromStringAndSize((char*)data, len);
1705 }
1706 static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args, PyObject *kwargs) {
1707 PyObject * _resultobj;
1708 PyObject * _result;
1709 wxImage * _arg0;
1710 PyObject * _argo0 = 0;
1711 char *_kwnames[] = { "self", NULL };
1712
1713 self = self;
1714 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetData",_kwnames,&_argo0))
1715 return NULL;
1716 if (_argo0) {
1717 if (_argo0 == Py_None) { _arg0 = NULL; }
1718 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1719 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
1720 return NULL;
1721 }
1722 }
1723 {
1724 wxPy_BEGIN_ALLOW_THREADS;
1725 _result = (PyObject *)wxImage_GetData(_arg0);
1726
1727 wxPy_END_ALLOW_THREADS;
1728 }{
1729 _resultobj = _result;
1730 }
1731 return _resultobj;
1732 }
1733
1734 static void wxImage_SetData(wxImage *self,PyObject * data) {
1735 unsigned char* dataPtr;
1736
1737 if (! PyString_Check(data)) {
1738 PyErr_SetString(PyExc_TypeError, "Expected string object");
1739 return /* NULL */ ;
1740 }
1741
1742 size_t len = self->GetWidth() * self->GetHeight() * 3;
1743 dataPtr = (unsigned char*) malloc(len);
1744 memcpy(dataPtr, PyString_AsString(data), len);
1745 self->SetData(dataPtr);
1746 }
1747 static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
1748 PyObject * _resultobj;
1749 wxImage * _arg0;
1750 PyObject * _arg1;
1751 PyObject * _argo0 = 0;
1752 PyObject * _obj1 = 0;
1753 char *_kwnames[] = { "self","data", NULL };
1754
1755 self = self;
1756 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_SetData",_kwnames,&_argo0,&_obj1))
1757 return NULL;
1758 if (_argo0) {
1759 if (_argo0 == Py_None) { _arg0 = NULL; }
1760 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1761 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
1762 return NULL;
1763 }
1764 }
1765 {
1766 _arg1 = _obj1;
1767 }
1768 {
1769 wxPy_BEGIN_ALLOW_THREADS;
1770 wxImage_SetData(_arg0,_arg1);
1771
1772 wxPy_END_ALLOW_THREADS;
1773 } Py_INCREF(Py_None);
1774 _resultobj = Py_None;
1775 return _resultobj;
1776 }
1777
1778 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
1779 static PyObject *_wrap_wxImage_SetMaskColour(PyObject *self, PyObject *args, PyObject *kwargs) {
1780 PyObject * _resultobj;
1781 wxImage * _arg0;
1782 unsigned char _arg1;
1783 unsigned char _arg2;
1784 unsigned char _arg3;
1785 PyObject * _argo0 = 0;
1786 char *_kwnames[] = { "self","r","g","b", NULL };
1787
1788 self = self;
1789 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxImage_SetMaskColour",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
1790 return NULL;
1791 if (_argo0) {
1792 if (_argo0 == Py_None) { _arg0 = NULL; }
1793 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1794 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
1795 return NULL;
1796 }
1797 }
1798 {
1799 wxPy_BEGIN_ALLOW_THREADS;
1800 wxImage_SetMaskColour(_arg0,_arg1,_arg2,_arg3);
1801
1802 wxPy_END_ALLOW_THREADS;
1803 } Py_INCREF(Py_None);
1804 _resultobj = Py_None;
1805 return _resultobj;
1806 }
1807
1808 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
1809 static PyObject *_wrap_wxImage_GetMaskRed(PyObject *self, PyObject *args, PyObject *kwargs) {
1810 PyObject * _resultobj;
1811 unsigned char _result;
1812 wxImage * _arg0;
1813 PyObject * _argo0 = 0;
1814 char *_kwnames[] = { "self", NULL };
1815
1816 self = self;
1817 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetMaskRed",_kwnames,&_argo0))
1818 return NULL;
1819 if (_argo0) {
1820 if (_argo0 == Py_None) { _arg0 = NULL; }
1821 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1822 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
1823 return NULL;
1824 }
1825 }
1826 {
1827 wxPy_BEGIN_ALLOW_THREADS;
1828 _result = (unsigned char )wxImage_GetMaskRed(_arg0);
1829
1830 wxPy_END_ALLOW_THREADS;
1831 } _resultobj = Py_BuildValue("b",_result);
1832 return _resultobj;
1833 }
1834
1835 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
1836 static PyObject *_wrap_wxImage_GetMaskGreen(PyObject *self, PyObject *args, PyObject *kwargs) {
1837 PyObject * _resultobj;
1838 unsigned char _result;
1839 wxImage * _arg0;
1840 PyObject * _argo0 = 0;
1841 char *_kwnames[] = { "self", NULL };
1842
1843 self = self;
1844 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetMaskGreen",_kwnames,&_argo0))
1845 return NULL;
1846 if (_argo0) {
1847 if (_argo0 == Py_None) { _arg0 = NULL; }
1848 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1849 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
1850 return NULL;
1851 }
1852 }
1853 {
1854 wxPy_BEGIN_ALLOW_THREADS;
1855 _result = (unsigned char )wxImage_GetMaskGreen(_arg0);
1856
1857 wxPy_END_ALLOW_THREADS;
1858 } _resultobj = Py_BuildValue("b",_result);
1859 return _resultobj;
1860 }
1861
1862 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
1863 static PyObject *_wrap_wxImage_GetMaskBlue(PyObject *self, PyObject *args, PyObject *kwargs) {
1864 PyObject * _resultobj;
1865 unsigned char _result;
1866 wxImage * _arg0;
1867 PyObject * _argo0 = 0;
1868 char *_kwnames[] = { "self", NULL };
1869
1870 self = self;
1871 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetMaskBlue",_kwnames,&_argo0))
1872 return NULL;
1873 if (_argo0) {
1874 if (_argo0 == Py_None) { _arg0 = NULL; }
1875 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1876 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
1877 return NULL;
1878 }
1879 }
1880 {
1881 wxPy_BEGIN_ALLOW_THREADS;
1882 _result = (unsigned char )wxImage_GetMaskBlue(_arg0);
1883
1884 wxPy_END_ALLOW_THREADS;
1885 } _resultobj = Py_BuildValue("b",_result);
1886 return _resultobj;
1887 }
1888
1889 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
1890 static PyObject *_wrap_wxImage_SetMask(PyObject *self, PyObject *args, PyObject *kwargs) {
1891 PyObject * _resultobj;
1892 wxImage * _arg0;
1893 bool _arg1 = (bool ) TRUE;
1894 PyObject * _argo0 = 0;
1895 int tempbool1 = (int) TRUE;
1896 char *_kwnames[] = { "self","mask", NULL };
1897
1898 self = self;
1899 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_SetMask",_kwnames,&_argo0,&tempbool1))
1900 return NULL;
1901 if (_argo0) {
1902 if (_argo0 == Py_None) { _arg0 = NULL; }
1903 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1904 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
1905 return NULL;
1906 }
1907 }
1908 _arg1 = (bool ) tempbool1;
1909 {
1910 wxPy_BEGIN_ALLOW_THREADS;
1911 wxImage_SetMask(_arg0,_arg1);
1912
1913 wxPy_END_ALLOW_THREADS;
1914 } Py_INCREF(Py_None);
1915 _resultobj = Py_None;
1916 return _resultobj;
1917 }
1918
1919 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
1920 static PyObject *_wrap_wxImage_HasMask(PyObject *self, PyObject *args, PyObject *kwargs) {
1921 PyObject * _resultobj;
1922 bool _result;
1923 wxImage * _arg0;
1924 PyObject * _argo0 = 0;
1925 char *_kwnames[] = { "self", NULL };
1926
1927 self = self;
1928 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_HasMask",_kwnames,&_argo0))
1929 return NULL;
1930 if (_argo0) {
1931 if (_argo0 == Py_None) { _arg0 = NULL; }
1932 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1933 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
1934 return NULL;
1935 }
1936 }
1937 {
1938 wxPy_BEGIN_ALLOW_THREADS;
1939 _result = (bool )wxImage_HasMask(_arg0);
1940
1941 wxPy_END_ALLOW_THREADS;
1942 } _resultobj = Py_BuildValue("i",_result);
1943 return _resultobj;
1944 }
1945
1946 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
1947 static PyObject *_wrap_wxImage_Rotate(PyObject *self, PyObject *args, PyObject *kwargs) {
1948 PyObject * _resultobj;
1949 wxImage * _result;
1950 wxImage * _arg0;
1951 double _arg1;
1952 wxPoint * _arg2;
1953 bool _arg3 = (bool ) TRUE;
1954 wxPoint * _arg4 = (wxPoint *) NULL;
1955 PyObject * _argo0 = 0;
1956 wxPoint temp;
1957 PyObject * _obj2 = 0;
1958 int tempbool3 = (int) TRUE;
1959 wxPoint temp0;
1960 PyObject * _obj4 = 0;
1961 char *_kwnames[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL };
1962 char _ptemp[128];
1963
1964 self = self;
1965 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OdO|iO:wxImage_Rotate",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3,&_obj4))
1966 return NULL;
1967 if (_argo0) {
1968 if (_argo0 == Py_None) { _arg0 = NULL; }
1969 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
1970 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
1971 return NULL;
1972 }
1973 }
1974 {
1975 _arg2 = &temp;
1976 if (! wxPoint_helper(_obj2, &_arg2))
1977 return NULL;
1978 }
1979 _arg3 = (bool ) tempbool3;
1980 if (_obj4)
1981 {
1982 _arg4 = &temp0;
1983 if (! wxPoint_helper(_obj4, &_arg4))
1984 return NULL;
1985 }
1986 {
1987 wxPy_BEGIN_ALLOW_THREADS;
1988 _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4));
1989
1990 wxPy_END_ALLOW_THREADS;
1991 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
1992 _resultobj = Py_BuildValue("s",_ptemp);
1993 return _resultobj;
1994 }
1995
1996 #define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
1997 static PyObject *_wrap_wxImage_Rotate90(PyObject *self, PyObject *args, PyObject *kwargs) {
1998 PyObject * _resultobj;
1999 wxImage * _result;
2000 wxImage * _arg0;
2001 bool _arg1 = (bool ) TRUE;
2002 PyObject * _argo0 = 0;
2003 int tempbool1 = (int) TRUE;
2004 char *_kwnames[] = { "self","clockwise", NULL };
2005 char _ptemp[128];
2006
2007 self = self;
2008 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Rotate90",_kwnames,&_argo0,&tempbool1))
2009 return NULL;
2010 if (_argo0) {
2011 if (_argo0 == Py_None) { _arg0 = NULL; }
2012 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
2013 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p.");
2014 return NULL;
2015 }
2016 }
2017 _arg1 = (bool ) tempbool1;
2018 {
2019 wxPy_BEGIN_ALLOW_THREADS;
2020 _result = new wxImage (wxImage_Rotate90(_arg0,_arg1));
2021
2022 wxPy_END_ALLOW_THREADS;
2023 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
2024 _resultobj = Py_BuildValue("s",_ptemp);
2025 return _resultobj;
2026 }
2027
2028 #define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2029 static PyObject *_wrap_wxImage_Mirror(PyObject *self, PyObject *args, PyObject *kwargs) {
2030 PyObject * _resultobj;
2031 wxImage * _result;
2032 wxImage * _arg0;
2033 bool _arg1 = (bool ) TRUE;
2034 PyObject * _argo0 = 0;
2035 int tempbool1 = (int) TRUE;
2036 char *_kwnames[] = { "self","horizontally", NULL };
2037 char _ptemp[128];
2038
2039 self = self;
2040 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Mirror",_kwnames,&_argo0,&tempbool1))
2041 return NULL;
2042 if (_argo0) {
2043 if (_argo0 == Py_None) { _arg0 = NULL; }
2044 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
2045 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2046 return NULL;
2047 }
2048 }
2049 _arg1 = (bool ) tempbool1;
2050 {
2051 wxPy_BEGIN_ALLOW_THREADS;
2052 _result = new wxImage (wxImage_Mirror(_arg0,_arg1));
2053
2054 wxPy_END_ALLOW_THREADS;
2055 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
2056 _resultobj = Py_BuildValue("s",_ptemp);
2057 return _resultobj;
2058 }
2059
2060 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2061 static PyObject *_wrap_wxImage_Replace(PyObject *self, PyObject *args, PyObject *kwargs) {
2062 PyObject * _resultobj;
2063 wxImage * _arg0;
2064 unsigned char _arg1;
2065 unsigned char _arg2;
2066 unsigned char _arg3;
2067 unsigned char _arg4;
2068 unsigned char _arg5;
2069 unsigned char _arg6;
2070 PyObject * _argo0 = 0;
2071 char *_kwnames[] = { "self","r1","g1","b1","r2","g2","b2", NULL };
2072
2073 self = self;
2074 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbbbbb:wxImage_Replace",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6))
2075 return NULL;
2076 if (_argo0) {
2077 if (_argo0 == Py_None) { _arg0 = NULL; }
2078 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
2079 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p.");
2080 return NULL;
2081 }
2082 }
2083 {
2084 wxPy_BEGIN_ALLOW_THREADS;
2085 wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
2086
2087 wxPy_END_ALLOW_THREADS;
2088 } Py_INCREF(Py_None);
2089 _resultobj = Py_None;
2090 return _resultobj;
2091 }
2092
2093 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
2094 static PyObject *_wrap_wxImage_CountColours(PyObject *self, PyObject *args, PyObject *kwargs) {
2095 PyObject * _resultobj;
2096 unsigned long _result;
2097 wxImage * _arg0;
2098 unsigned long _arg1 = (unsigned long ) (unsigned long)-1;
2099 PyObject * _argo0 = 0;
2100 char *_kwnames[] = { "self","stopafter", NULL };
2101
2102 self = self;
2103 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxImage_CountColours",_kwnames,&_argo0,&_arg1))
2104 return NULL;
2105 if (_argo0) {
2106 if (_argo0 == Py_None) { _arg0 = NULL; }
2107 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
2108 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
2109 return NULL;
2110 }
2111 }
2112 {
2113 wxPy_BEGIN_ALLOW_THREADS;
2114 _result = (unsigned long )wxImage_CountColours(_arg0,_arg1);
2115
2116 wxPy_END_ALLOW_THREADS;
2117 } _resultobj = Py_BuildValue("l",_result);
2118 return _resultobj;
2119 }
2120
2121 static PyObject *_wrap_wxImage_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
2122 PyObject * _resultobj;
2123 wxImageHandler * _arg0;
2124 PyObject * _argo0 = 0;
2125 char *_kwnames[] = { "handler", NULL };
2126
2127 self = self;
2128 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_AddHandler",_kwnames,&_argo0))
2129 return NULL;
2130 if (_argo0) {
2131 if (_argo0 == Py_None) { _arg0 = NULL; }
2132 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
2133 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
2134 return NULL;
2135 }
2136 }
2137 {
2138 wxPy_BEGIN_ALLOW_THREADS;
2139 wxImage::AddHandler(_arg0);
2140
2141 wxPy_END_ALLOW_THREADS;
2142 } Py_INCREF(Py_None);
2143 _resultobj = Py_None;
2144 return _resultobj;
2145 }
2146
2147 static PyObject *_wrap_wxImage_InsertHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
2148 PyObject * _resultobj;
2149 wxImageHandler * _arg0;
2150 PyObject * _argo0 = 0;
2151 char *_kwnames[] = { "handler", NULL };
2152
2153 self = self;
2154 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_InsertHandler",_kwnames,&_argo0))
2155 return NULL;
2156 if (_argo0) {
2157 if (_argo0 == Py_None) { _arg0 = NULL; }
2158 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageHandler_p")) {
2159 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
2160 return NULL;
2161 }
2162 }
2163 {
2164 wxPy_BEGIN_ALLOW_THREADS;
2165 wxImage::InsertHandler(_arg0);
2166
2167 wxPy_END_ALLOW_THREADS;
2168 } Py_INCREF(Py_None);
2169 _resultobj = Py_None;
2170 return _resultobj;
2171 }
2172
2173 static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
2174 PyObject * _resultobj;
2175 bool _result;
2176 wxString * _arg0;
2177 PyObject * _obj0 = 0;
2178 char *_kwnames[] = { "name", NULL };
2179
2180 self = self;
2181 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_RemoveHandler",_kwnames,&_obj0))
2182 return NULL;
2183 {
2184 #if PYTHON_API_VERSION >= 1009
2185 char* tmpPtr; int tmpSize;
2186 if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
2187 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
2188 return NULL;
2189 }
2190 if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
2191 return NULL;
2192 _arg0 = new wxString(tmpPtr, tmpSize);
2193 #else
2194 if (!PyString_Check(_obj0)) {
2195 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
2196 return NULL;
2197 }
2198 _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
2199 #endif
2200 }
2201 {
2202 wxPy_BEGIN_ALLOW_THREADS;
2203 _result = (bool )wxImage::RemoveHandler(*_arg0);
2204
2205 wxPy_END_ALLOW_THREADS;
2206 } _resultobj = Py_BuildValue("i",_result);
2207 {
2208 if (_obj0)
2209 delete _arg0;
2210 }
2211 return _resultobj;
2212 }
2213
2214 static PyMethodDef imagecMethods[] = {
2215 { "wxImage_RemoveHandler", (PyCFunction) _wrap_wxImage_RemoveHandler, METH_VARARGS | METH_KEYWORDS },
2216 { "wxImage_InsertHandler", (PyCFunction) _wrap_wxImage_InsertHandler, METH_VARARGS | METH_KEYWORDS },
2217 { "wxImage_AddHandler", (PyCFunction) _wrap_wxImage_AddHandler, METH_VARARGS | METH_KEYWORDS },
2218 { "wxImage_CountColours", (PyCFunction) _wrap_wxImage_CountColours, METH_VARARGS | METH_KEYWORDS },
2219 { "wxImage_Replace", (PyCFunction) _wrap_wxImage_Replace, METH_VARARGS | METH_KEYWORDS },
2220 { "wxImage_Mirror", (PyCFunction) _wrap_wxImage_Mirror, METH_VARARGS | METH_KEYWORDS },
2221 { "wxImage_Rotate90", (PyCFunction) _wrap_wxImage_Rotate90, METH_VARARGS | METH_KEYWORDS },
2222 { "wxImage_Rotate", (PyCFunction) _wrap_wxImage_Rotate, METH_VARARGS | METH_KEYWORDS },
2223 { "wxImage_HasMask", (PyCFunction) _wrap_wxImage_HasMask, METH_VARARGS | METH_KEYWORDS },
2224 { "wxImage_SetMask", (PyCFunction) _wrap_wxImage_SetMask, METH_VARARGS | METH_KEYWORDS },
2225 { "wxImage_GetMaskBlue", (PyCFunction) _wrap_wxImage_GetMaskBlue, METH_VARARGS | METH_KEYWORDS },
2226 { "wxImage_GetMaskGreen", (PyCFunction) _wrap_wxImage_GetMaskGreen, METH_VARARGS | METH_KEYWORDS },
2227 { "wxImage_GetMaskRed", (PyCFunction) _wrap_wxImage_GetMaskRed, METH_VARARGS | METH_KEYWORDS },
2228 { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS },
2229 { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS },
2230 { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS },
2231 { "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS },
2232 { "wxImage_Copy", (PyCFunction) _wrap_wxImage_Copy, METH_VARARGS | METH_KEYWORDS },
2233 { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS },
2234 { "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS },
2235 { "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS },
2236 { "wxImage_Ok", (PyCFunction) _wrap_wxImage_Ok, METH_VARARGS | METH_KEYWORDS },
2237 { "wxImage_SaveMimeFile", (PyCFunction) _wrap_wxImage_SaveMimeFile, METH_VARARGS | METH_KEYWORDS },
2238 { "wxImage_SaveFile", (PyCFunction) _wrap_wxImage_SaveFile, METH_VARARGS | METH_KEYWORDS },
2239 { "wxImage_LoadMimeFile", (PyCFunction) _wrap_wxImage_LoadMimeFile, METH_VARARGS | METH_KEYWORDS },
2240 { "wxImage_LoadFile", (PyCFunction) _wrap_wxImage_LoadFile, METH_VARARGS | METH_KEYWORDS },
2241 { "wxImage_CanRead", (PyCFunction) _wrap_wxImage_CanRead, METH_VARARGS | METH_KEYWORDS },
2242 { "wxImage_GetBlue", (PyCFunction) _wrap_wxImage_GetBlue, METH_VARARGS | METH_KEYWORDS },
2243 { "wxImage_GetGreen", (PyCFunction) _wrap_wxImage_GetGreen, METH_VARARGS | METH_KEYWORDS },
2244 { "wxImage_GetRed", (PyCFunction) _wrap_wxImage_GetRed, METH_VARARGS | METH_KEYWORDS },
2245 { "wxImage_SetRGB", (PyCFunction) _wrap_wxImage_SetRGB, METH_VARARGS | METH_KEYWORDS },
2246 { "wxImage_Rescale", (PyCFunction) _wrap_wxImage_Rescale, METH_VARARGS | METH_KEYWORDS },
2247 { "wxImage_Scale", (PyCFunction) _wrap_wxImage_Scale, METH_VARARGS | METH_KEYWORDS },
2248 { "wxImage_Destroy", (PyCFunction) _wrap_wxImage_Destroy, METH_VARARGS | METH_KEYWORDS },
2249 { "wxImage_Create", (PyCFunction) _wrap_wxImage_Create, METH_VARARGS | METH_KEYWORDS },
2250 { "wxImage_ConvertToBitmap", (PyCFunction) _wrap_wxImage_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS },
2251 { "delete_wxImage", (PyCFunction) _wrap_delete_wxImage, METH_VARARGS | METH_KEYWORDS },
2252 { "new_wxImage", (PyCFunction) _wrap_new_wxImage, METH_VARARGS | METH_KEYWORDS },
2253 { "new_wxTIFFHandler", (PyCFunction) _wrap_new_wxTIFFHandler, METH_VARARGS | METH_KEYWORDS },
2254 { "new_wxPCXHandler", (PyCFunction) _wrap_new_wxPCXHandler, METH_VARARGS | METH_KEYWORDS },
2255 { "new_wxPNMHandler", (PyCFunction) _wrap_new_wxPNMHandler, METH_VARARGS | METH_KEYWORDS },
2256 { "new_wxGIFHandler", (PyCFunction) _wrap_new_wxGIFHandler, METH_VARARGS | METH_KEYWORDS },
2257 { "new_wxBMPHandler", (PyCFunction) _wrap_new_wxBMPHandler, METH_VARARGS | METH_KEYWORDS },
2258 { "new_wxJPEGHandler", (PyCFunction) _wrap_new_wxJPEGHandler, METH_VARARGS | METH_KEYWORDS },
2259 { "new_wxPNGHandler", (PyCFunction) _wrap_new_wxPNGHandler, METH_VARARGS | METH_KEYWORDS },
2260 { "wxImageHandler_SetMimeType", (PyCFunction) _wrap_wxImageHandler_SetMimeType, METH_VARARGS | METH_KEYWORDS },
2261 { "wxImageHandler_SetType", (PyCFunction) _wrap_wxImageHandler_SetType, METH_VARARGS | METH_KEYWORDS },
2262 { "wxImageHandler_SetExtension", (PyCFunction) _wrap_wxImageHandler_SetExtension, METH_VARARGS | METH_KEYWORDS },
2263 { "wxImageHandler_SetName", (PyCFunction) _wrap_wxImageHandler_SetName, METH_VARARGS | METH_KEYWORDS },
2264 { "wxImageHandler_GetMimeType", (PyCFunction) _wrap_wxImageHandler_GetMimeType, METH_VARARGS | METH_KEYWORDS },
2265 { "wxImageHandler_GetType", (PyCFunction) _wrap_wxImageHandler_GetType, METH_VARARGS | METH_KEYWORDS },
2266 { "wxImageHandler_GetExtension", (PyCFunction) _wrap_wxImageHandler_GetExtension, METH_VARARGS | METH_KEYWORDS },
2267 { "wxImageHandler_GetName", (PyCFunction) _wrap_wxImageHandler_GetName, METH_VARARGS | METH_KEYWORDS },
2268 { "wxBitmapFromImage", (PyCFunction) _wrap_wxBitmapFromImage, METH_VARARGS | METH_KEYWORDS },
2269 { "wxInitAllImageHandlers", (PyCFunction) _wrap_wxInitAllImageHandlers, METH_VARARGS | METH_KEYWORDS },
2270 { "wxImageFromBitmap", (PyCFunction) _wrap_wxImageFromBitmap, METH_VARARGS | METH_KEYWORDS },
2271 { "wxImageFromMime", (PyCFunction) _wrap_wxImageFromMime, METH_VARARGS | METH_KEYWORDS },
2272 { "wxEmptyImage", (PyCFunction) _wrap_wxEmptyImage, METH_VARARGS | METH_KEYWORDS },
2273 { NULL, NULL }
2274 };
2275 #ifdef __cplusplus
2276 }
2277 #endif
2278 /*
2279 * This table is used by the pointer type-checker
2280 */
2281 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
2282 { "_wxAcceleratorTable","_class_wxAcceleratorTable",0},
2283 { "_signed_long","_long",0},
2284 { "_class_wxJPEGHandler","_wxJPEGHandler",0},
2285 { "_wxBMPHandler","_class_wxBMPHandler",0},
2286 { "_wxImage","_class_wxImage",0},
2287 { "_wxPrintQuality","_wxCoord",0},
2288 { "_wxPrintQuality","_int",0},
2289 { "_wxPrintQuality","_signed_int",0},
2290 { "_wxPrintQuality","_unsigned_int",0},
2291 { "_wxPrintQuality","_wxWindowID",0},
2292 { "_wxPrintQuality","_uint",0},
2293 { "_wxPrintQuality","_EBool",0},
2294 { "_wxPrintQuality","_size_t",0},
2295 { "_wxPrintQuality","_time_t",0},
2296 { "_class_wxRegionIterator","_wxRegionIterator",0},
2297 { "_wxGIFHandler","_class_wxGIFHandler",0},
2298 { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0},
2299 { "_wxCursor","_class_wxCursor",0},
2300 { "_wxImageHandler","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler},
2301 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler},
2302 { "_wxImageHandler","_class_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler},
2303 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler},
2304 { "_wxImageHandler","_class_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler},
2305 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler},
2306 { "_wxImageHandler","_class_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler},
2307 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler},
2308 { "_wxImageHandler","_class_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler},
2309 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler},
2310 { "_wxImageHandler","_class_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler},
2311 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler},
2312 { "_wxImageHandler","_class_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler},
2313 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler},
2314 { "_wxImageHandler","_class_wxImageHandler",0},
2315 { "_wxMask","_class_wxMask",0},
2316 { "_wxPNGHandler","_class_wxPNGHandler",0},
2317 { "_wxPen","_class_wxPen",0},
2318 { "_byte","_unsigned_char",0},
2319 { "_wxColourDatabase","_class_wxColourDatabase",0},
2320 { "_long","_unsigned_long",0},
2321 { "_long","_signed_long",0},
2322 { "_wxImageList","_class_wxImageList",0},
2323 { "_class_wxTIFFHandler","_wxTIFFHandler",0},
2324 { "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
2325 { "_wxDC","_class_wxDC",0},
2326 { "_class_wxBMPHandler","_wxBMPHandler",0},
2327 { "_size_t","_wxCoord",0},
2328 { "_size_t","_wxPrintQuality",0},
2329 { "_size_t","_time_t",0},
2330 { "_size_t","_unsigned_int",0},
2331 { "_size_t","_int",0},
2332 { "_size_t","_wxWindowID",0},
2333 { "_size_t","_uint",0},
2334 { "_class_wxRealPoint","_wxRealPoint",0},
2335 { "_wxPNMHandler","_class_wxPNMHandler",0},
2336 { "_class_wxGIFHandler","_wxGIFHandler",0},
2337 { "_class_wxMask","_wxMask",0},
2338 { "_class_wxPNGHandler","_wxPNGHandler",0},
2339 { "_wxColour","_class_wxColour",0},
2340 { "_wxBrush","_class_wxBrush",0},
2341 { "_uint","_wxCoord",0},
2342 { "_uint","_wxPrintQuality",0},
2343 { "_uint","_time_t",0},
2344 { "_uint","_size_t",0},
2345 { "_uint","_unsigned_int",0},
2346 { "_uint","_int",0},
2347 { "_uint","_wxWindowID",0},
2348 { "_wxChar","_char",0},
2349 { "_wxRect","_class_wxRect",0},
2350 { "_class_wxImage","_wxImage",0},
2351 { "_wxPoint","_class_wxPoint",0},
2352 { "_class_wxPNMHandler","_wxPNMHandler",0},
2353 { "_char","_wxChar",0},
2354 { "_wxBitmap","_class_wxBitmap",0},
2355 { "_wxPenList","_class_wxPenList",0},
2356 { "_wxWindowDC","_class_wxWindowDC",0},
2357 { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
2358 { "_class_wxColourDatabase","_wxColourDatabase",0},
2359 { "_EBool","_wxCoord",0},
2360 { "_EBool","_wxPrintQuality",0},
2361 { "_EBool","_signed_int",0},
2362 { "_EBool","_int",0},
2363 { "_EBool","_wxWindowID",0},
2364 { "_class_wxRegion","_wxRegion",0},
2365 { "_wxFont","_class_wxFont",0},
2366 { "_unsigned_long","_long",0},
2367 { "_class_wxRect","_wxRect",0},
2368 { "_class_wxDC","_wxDC",0},
2369 { "_class_wxBrushList","_wxBrushList",0},
2370 { "_class_wxPenList","_wxPenList",0},
2371 { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0},
2372 { "_signed_int","_wxCoord",0},
2373 { "_signed_int","_wxPrintQuality",0},
2374 { "_signed_int","_EBool",0},
2375 { "_signed_int","_wxWindowID",0},
2376 { "_signed_int","_int",0},
2377 { "_wxLayoutConstraints","_class_wxLayoutConstraints",0},
2378 { "_wxMetaFileDC","_class_wxMetaFileDC",0},
2379 { "_wxScreenDC","_class_wxScreenDC",0},
2380 { "_WXTYPE","_short",0},
2381 { "_WXTYPE","_signed_short",0},
2382 { "_WXTYPE","_unsigned_short",0},
2383 { "_class_wxBrush","_wxBrush",0},
2384 { "_unsigned_short","_WXTYPE",0},
2385 { "_unsigned_short","_short",0},
2386 { "_class_wxFont","_wxFont",0},
2387 { "_wxBusyInfo","_class_wxBusyInfo",0},
2388 { "_wxFontList","_class_wxFontList",0},
2389 { "_wxClientDC","_class_wxClientDC",0},
2390 { "_class_wxPoint","_wxPoint",0},
2391 { "_wxRealPoint","_class_wxRealPoint",0},
2392 { "_signed_short","_WXTYPE",0},
2393 { "_signed_short","_short",0},
2394 { "_wxMemoryDC","_class_wxMemoryDC",0},
2395 { "_wxPaintDC","_class_wxPaintDC",0},
2396 { "_class_wxWindowDC","_wxWindowDC",0},
2397 { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0},
2398 { "_class_wxCursor","_wxCursor",0},
2399 { "_class_wxImageHandler","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler},
2400 { "_class_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler},
2401 { "_class_wxImageHandler","_class_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler},
2402 { "_class_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler},
2403 { "_class_wxImageHandler","_class_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler},
2404 { "_class_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler},
2405 { "_class_wxImageHandler","_class_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler},
2406 { "_class_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler},
2407 { "_class_wxImageHandler","_class_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler},
2408 { "_class_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler},
2409 { "_class_wxImageHandler","_class_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler},
2410 { "_class_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler},
2411 { "_class_wxImageHandler","_class_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler},
2412 { "_class_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler},
2413 { "_class_wxImageHandler","_wxImageHandler",0},
2414 { "_unsigned_char","_byte",0},
2415 { "_class_wxMetaFileDC","_wxMetaFileDC",0},
2416 { "_unsigned_int","_wxCoord",0},
2417 { "_unsigned_int","_wxPrintQuality",0},
2418 { "_unsigned_int","_time_t",0},
2419 { "_unsigned_int","_size_t",0},
2420 { "_unsigned_int","_uint",0},
2421 { "_unsigned_int","_wxWindowID",0},
2422 { "_unsigned_int","_int",0},
2423 { "_wxIcon","_class_wxIcon",0},
2424 { "_class_wxPen","_wxPen",0},
2425 { "_short","_WXTYPE",0},
2426 { "_short","_unsigned_short",0},
2427 { "_short","_signed_short",0},
2428 { "_class_wxImageList","_wxImageList",0},
2429 { "_wxPCXHandler","_class_wxPCXHandler",0},
2430 { "_wxJPEGHandler","_class_wxJPEGHandler",0},
2431 { "_wxWindowID","_wxCoord",0},
2432 { "_wxWindowID","_wxPrintQuality",0},
2433 { "_wxWindowID","_time_t",0},
2434 { "_wxWindowID","_size_t",0},
2435 { "_wxWindowID","_EBool",0},
2436 { "_wxWindowID","_uint",0},
2437 { "_wxWindowID","_int",0},
2438 { "_wxWindowID","_signed_int",0},
2439 { "_wxWindowID","_unsigned_int",0},
2440 { "_int","_wxCoord",0},
2441 { "_int","_wxPrintQuality",0},
2442 { "_int","_time_t",0},
2443 { "_int","_size_t",0},
2444 { "_int","_EBool",0},
2445 { "_int","_uint",0},
2446 { "_int","_wxWindowID",0},
2447 { "_int","_unsigned_int",0},
2448 { "_int","_signed_int",0},
2449 { "_time_t","_wxCoord",0},
2450 { "_time_t","_wxPrintQuality",0},
2451 { "_time_t","_unsigned_int",0},
2452 { "_time_t","_int",0},
2453 { "_time_t","_wxWindowID",0},
2454 { "_time_t","_uint",0},
2455 { "_time_t","_size_t",0},
2456 { "_wxSize","_class_wxSize",0},
2457 { "_wxRegionIterator","_class_wxRegionIterator",0},
2458 { "_class_wxPaintDC","_wxPaintDC",0},
2459 { "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
2460 { "_class_wxIcon","_wxIcon",0},
2461 { "_class_wxColour","_wxColour",0},
2462 { "_class_wxScreenDC","_wxScreenDC",0},
2463 { "_wxPalette","_class_wxPalette",0},
2464 { "_wxCoord","_int",0},
2465 { "_wxCoord","_signed_int",0},
2466 { "_wxCoord","_unsigned_int",0},
2467 { "_wxCoord","_wxWindowID",0},
2468 { "_wxCoord","_uint",0},
2469 { "_wxCoord","_EBool",0},
2470 { "_wxCoord","_size_t",0},
2471 { "_wxCoord","_time_t",0},
2472 { "_wxCoord","_wxPrintQuality",0},
2473 { "_wxRegion","_class_wxRegion",0},
2474 { "_class_wxPCXHandler","_wxPCXHandler",0},
2475 { "_wxTIFFHandler","_class_wxTIFFHandler",0},
2476 { "_class_wxBusyInfo","_wxBusyInfo",0},
2477 { "_class_wxFontList","_wxFontList",0},
2478 { "_class_wxClientDC","_wxClientDC",0},
2479 { "_wxBrushList","_class_wxBrushList",0},
2480 { "_class_wxSize","_wxSize",0},
2481 { "_class_wxBitmap","_wxBitmap",0},
2482 { "_class_wxMemoryDC","_wxMemoryDC",0},
2483 { "_class_wxPalette","_wxPalette",0},
2484 {0,0,0}};
2485
2486 static PyObject *SWIG_globals;
2487 #ifdef __cplusplus
2488 extern "C"
2489 #endif
2490 SWIGEXPORT(void) initimagec() {
2491 PyObject *m, *d;
2492 SWIG_globals = SWIG_newvarlink();
2493 m = Py_InitModule("imagec", imagecMethods);
2494 d = PyModule_GetDict(m);
2495 PyDict_SetItemString(d,"cvar", SWIG_globals);
2496 SWIG_addvarlink(SWIG_globals,"wxNullImage",_wrap_wxNullImage_get, _wrap_wxNullImage_set);
2497 {
2498 int i;
2499 for (i = 0; _swig_mapping[i].n1; i++)
2500 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
2501 }
2502 }