2 * FILE : src/gtk/image.cpp
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
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.
13 * Do not make changes to this file--changes will be lost!
19 /* Implementation : PYTHON */
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
32 # define SWIGEXPORT(a) a
36 # define SWIGEXPORT(a) a
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);
54 #define SWIG_init initimagec
56 #define SWIG_name "imagec"
62 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
68 } else if (target
== Py_None
) {
72 if (!PyTuple_Check(target
)) {
74 target
= PyTuple_New(1);
75 PyTuple_SetItem(target
, 0, o2
);
78 PyTuple_SetItem(o3
, 0, o
);
81 target
= PySequence_Concat(o2
, o3
);
88 #if PYTHON_API_VERSION >= 1009
89 static char* wxStringErrorMsg
= "String or Unicode type required";
91 static char* wxStringErrorMsg
= "String type required";
94 wxImage
* wxEmptyImage(int width
=0, int height
=0) {
95 if (width
== 0 && height
== 0)
98 return new wxImage(width
, height
);
101 wxImage
* wxImageFromMime(const wxString
& name
, const wxString
& mimetype
) {
102 return new wxImage(name
, mimetype
);
105 wxImage
* wxImageFromBitmap(const wxBitmap
&bitmap
) {
106 return new wxImage(bitmap
);
110 extern wxImage wxNullImage
;
114 wxBitmap
* wxBitmapFromImage(const wxImage
& img
, int depth
=-1) {
115 return new wxBitmap(img
, depth
);
121 static PyObject
*_wrap_wxEmptyImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
122 PyObject
* _resultobj
;
124 int _arg0
= (int ) 0;
125 int _arg1
= (int ) 0;
126 char *_kwnames
[] = { "width","height", NULL
};
130 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"|ii:wxEmptyImage",_kwnames
,&_arg0
,&_arg1
))
133 wxPy_BEGIN_ALLOW_THREADS
;
134 _result
= (wxImage
*)wxEmptyImage(_arg0
,_arg1
);
136 wxPy_END_ALLOW_THREADS
;
137 if (PyErr_Occurred()) return NULL
;
139 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
140 _resultobj
= Py_BuildValue("s",_ptemp
);
143 _resultobj
= Py_None
;
148 static PyObject
*_wrap_wxImageFromMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
149 PyObject
* _resultobj
;
153 PyObject
* _obj0
= 0;
154 PyObject
* _obj1
= 0;
155 char *_kwnames
[] = { "name","mimetype", NULL
};
159 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageFromMime",_kwnames
,&_obj0
,&_obj1
))
162 #if PYTHON_API_VERSION >= 1009
163 char* tmpPtr
; int tmpSize
;
164 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
165 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
168 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
170 _arg0
= new wxString(tmpPtr
, tmpSize
);
172 if (!PyString_Check(_obj0
)) {
173 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
176 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
180 #if PYTHON_API_VERSION >= 1009
181 char* tmpPtr
; int tmpSize
;
182 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
183 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
186 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
188 _arg1
= new wxString(tmpPtr
, tmpSize
);
190 if (!PyString_Check(_obj1
)) {
191 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
194 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
198 wxPy_BEGIN_ALLOW_THREADS
;
199 _result
= (wxImage
*)wxImageFromMime(*_arg0
,*_arg1
);
201 wxPy_END_ALLOW_THREADS
;
202 if (PyErr_Occurred()) return NULL
;
204 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
205 _resultobj
= Py_BuildValue("s",_ptemp
);
208 _resultobj
= Py_None
;
221 static PyObject
*_wrap_wxImageFromBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
222 PyObject
* _resultobj
;
225 PyObject
* _argo0
= 0;
226 char *_kwnames
[] = { "bitmap", NULL
};
230 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageFromBitmap",_kwnames
,&_argo0
))
233 if (_argo0
== Py_None
) { _arg0
= NULL
; }
234 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxBitmap_p")) {
235 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
240 wxPy_BEGIN_ALLOW_THREADS
;
241 _result
= (wxImage
*)wxImageFromBitmap(*_arg0
);
243 wxPy_END_ALLOW_THREADS
;
244 if (PyErr_Occurred()) return NULL
;
246 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
247 _resultobj
= Py_BuildValue("s",_ptemp
);
250 _resultobj
= Py_None
;
255 static PyObject
*_wrap_wxInitAllImageHandlers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
256 PyObject
* _resultobj
;
257 char *_kwnames
[] = { NULL
};
260 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":wxInitAllImageHandlers",_kwnames
))
263 wxPy_BEGIN_ALLOW_THREADS
;
264 wxInitAllImageHandlers();
266 wxPy_END_ALLOW_THREADS
;
267 if (PyErr_Occurred()) return NULL
;
268 } Py_INCREF(Py_None
);
269 _resultobj
= Py_None
;
273 static int _wrap_wxNullImage_set(PyObject
*val
) {
275 PyErr_SetString(PyExc_TypeError
,"Variable wxNullImage is read-only.");
279 static PyObject
*_wrap_wxNullImage_get() {
283 SWIG_MakePtr(ptemp
,(char *) &wxNullImage
,"_wxImage_p");
284 pyobj
= PyString_FromString(ptemp
);
288 static PyObject
*_wrap_wxBitmapFromImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
289 PyObject
* _resultobj
;
292 int _arg1
= (int ) -1;
293 PyObject
* _argo0
= 0;
294 char *_kwnames
[] = { "img","depth", NULL
};
298 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxBitmapFromImage",_kwnames
,&_argo0
,&_arg1
))
301 if (_argo0
== Py_None
) { _arg0
= NULL
; }
302 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
303 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
308 wxPy_BEGIN_ALLOW_THREADS
;
309 _result
= (wxBitmap
*)wxBitmapFromImage(*_arg0
,_arg1
);
311 wxPy_END_ALLOW_THREADS
;
312 if (PyErr_Occurred()) return NULL
;
314 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBitmap_p");
315 _resultobj
= Py_BuildValue("s",_ptemp
);
318 _resultobj
= Py_None
;
323 static void *SwigwxImageHandlerTowxObject(void *ptr
) {
326 src
= (wxImageHandler
*) ptr
;
327 dest
= (wxObject
*) src
;
328 return (void *) dest
;
331 #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
332 static PyObject
*_wrap_wxImageHandler_GetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
333 PyObject
* _resultobj
;
335 wxImageHandler
* _arg0
;
336 PyObject
* _argo0
= 0;
337 char *_kwnames
[] = { "self", NULL
};
340 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetName",_kwnames
,&_argo0
))
343 if (_argo0
== Py_None
) { _arg0
= NULL
; }
344 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
345 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetName. Expected _wxImageHandler_p.");
350 wxPy_BEGIN_ALLOW_THREADS
;
351 _result
= new wxString (wxImageHandler_GetName(_arg0
));
353 wxPy_END_ALLOW_THREADS
;
354 if (PyErr_Occurred()) return NULL
;
356 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
364 #define wxImageHandler_GetExtension(_swigobj) (_swigobj->GetExtension())
365 static PyObject
*_wrap_wxImageHandler_GetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
366 PyObject
* _resultobj
;
368 wxImageHandler
* _arg0
;
369 PyObject
* _argo0
= 0;
370 char *_kwnames
[] = { "self", NULL
};
373 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetExtension",_kwnames
,&_argo0
))
376 if (_argo0
== Py_None
) { _arg0
= NULL
; }
377 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
378 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetExtension. Expected _wxImageHandler_p.");
383 wxPy_BEGIN_ALLOW_THREADS
;
384 _result
= new wxString (wxImageHandler_GetExtension(_arg0
));
386 wxPy_END_ALLOW_THREADS
;
387 if (PyErr_Occurred()) return NULL
;
389 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
397 #define wxImageHandler_GetType(_swigobj) (_swigobj->GetType())
398 static PyObject
*_wrap_wxImageHandler_GetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
399 PyObject
* _resultobj
;
401 wxImageHandler
* _arg0
;
402 PyObject
* _argo0
= 0;
403 char *_kwnames
[] = { "self", NULL
};
406 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetType",_kwnames
,&_argo0
))
409 if (_argo0
== Py_None
) { _arg0
= NULL
; }
410 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
411 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetType. Expected _wxImageHandler_p.");
416 wxPy_BEGIN_ALLOW_THREADS
;
417 _result
= (long )wxImageHandler_GetType(_arg0
);
419 wxPy_END_ALLOW_THREADS
;
420 if (PyErr_Occurred()) return NULL
;
421 } _resultobj
= Py_BuildValue("l",_result
);
425 #define wxImageHandler_GetMimeType(_swigobj) (_swigobj->GetMimeType())
426 static PyObject
*_wrap_wxImageHandler_GetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
427 PyObject
* _resultobj
;
429 wxImageHandler
* _arg0
;
430 PyObject
* _argo0
= 0;
431 char *_kwnames
[] = { "self", NULL
};
434 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetMimeType",_kwnames
,&_argo0
))
437 if (_argo0
== Py_None
) { _arg0
= NULL
; }
438 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
439 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetMimeType. Expected _wxImageHandler_p.");
444 wxPy_BEGIN_ALLOW_THREADS
;
445 _result
= new wxString (wxImageHandler_GetMimeType(_arg0
));
447 wxPy_END_ALLOW_THREADS
;
448 if (PyErr_Occurred()) return NULL
;
450 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
458 #define wxImageHandler_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
459 static PyObject
*_wrap_wxImageHandler_SetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
460 PyObject
* _resultobj
;
461 wxImageHandler
* _arg0
;
463 PyObject
* _argo0
= 0;
464 PyObject
* _obj1
= 0;
465 char *_kwnames
[] = { "self","name", NULL
};
468 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetName",_kwnames
,&_argo0
,&_obj1
))
471 if (_argo0
== Py_None
) { _arg0
= NULL
; }
472 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
473 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetName. Expected _wxImageHandler_p.");
478 #if PYTHON_API_VERSION >= 1009
479 char* tmpPtr
; int tmpSize
;
480 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
481 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
484 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
486 _arg1
= new wxString(tmpPtr
, tmpSize
);
488 if (!PyString_Check(_obj1
)) {
489 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
492 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
496 wxPy_BEGIN_ALLOW_THREADS
;
497 wxImageHandler_SetName(_arg0
,*_arg1
);
499 wxPy_END_ALLOW_THREADS
;
500 if (PyErr_Occurred()) return NULL
;
501 } Py_INCREF(Py_None
);
502 _resultobj
= Py_None
;
510 #define wxImageHandler_SetExtension(_swigobj,_swigarg0) (_swigobj->SetExtension(_swigarg0))
511 static PyObject
*_wrap_wxImageHandler_SetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
512 PyObject
* _resultobj
;
513 wxImageHandler
* _arg0
;
515 PyObject
* _argo0
= 0;
516 PyObject
* _obj1
= 0;
517 char *_kwnames
[] = { "self","extension", NULL
};
520 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetExtension",_kwnames
,&_argo0
,&_obj1
))
523 if (_argo0
== Py_None
) { _arg0
= NULL
; }
524 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
525 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetExtension. Expected _wxImageHandler_p.");
530 #if PYTHON_API_VERSION >= 1009
531 char* tmpPtr
; int tmpSize
;
532 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
533 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
536 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
538 _arg1
= new wxString(tmpPtr
, tmpSize
);
540 if (!PyString_Check(_obj1
)) {
541 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
544 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
548 wxPy_BEGIN_ALLOW_THREADS
;
549 wxImageHandler_SetExtension(_arg0
,*_arg1
);
551 wxPy_END_ALLOW_THREADS
;
552 if (PyErr_Occurred()) return NULL
;
553 } Py_INCREF(Py_None
);
554 _resultobj
= Py_None
;
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
;
567 PyObject
* _argo0
= 0;
568 char *_kwnames
[] = { "self","type", NULL
};
571 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Ol:wxImageHandler_SetType",_kwnames
,&_argo0
,&_arg1
))
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.");
581 wxPy_BEGIN_ALLOW_THREADS
;
582 wxImageHandler_SetType(_arg0
,_arg1
);
584 wxPy_END_ALLOW_THREADS
;
585 if (PyErr_Occurred()) return NULL
;
586 } Py_INCREF(Py_None
);
587 _resultobj
= Py_None
;
591 #define wxImageHandler_SetMimeType(_swigobj,_swigarg0) (_swigobj->SetMimeType(_swigarg0))
592 static PyObject
*_wrap_wxImageHandler_SetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
593 PyObject
* _resultobj
;
594 wxImageHandler
* _arg0
;
596 PyObject
* _argo0
= 0;
597 PyObject
* _obj1
= 0;
598 char *_kwnames
[] = { "self","mimetype", NULL
};
601 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetMimeType",_kwnames
,&_argo0
,&_obj1
))
604 if (_argo0
== Py_None
) { _arg0
= NULL
; }
605 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
606 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetMimeType. Expected _wxImageHandler_p.");
611 #if PYTHON_API_VERSION >= 1009
612 char* tmpPtr
; int tmpSize
;
613 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
614 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
617 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
619 _arg1
= new wxString(tmpPtr
, tmpSize
);
621 if (!PyString_Check(_obj1
)) {
622 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
625 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
629 wxPy_BEGIN_ALLOW_THREADS
;
630 wxImageHandler_SetMimeType(_arg0
,*_arg1
);
632 wxPy_END_ALLOW_THREADS
;
633 if (PyErr_Occurred()) return NULL
;
634 } Py_INCREF(Py_None
);
635 _resultobj
= Py_None
;
643 static void *SwigwxPNGHandlerTowxImageHandler(void *ptr
) {
645 wxImageHandler
*dest
;
646 src
= (wxPNGHandler
*) ptr
;
647 dest
= (wxImageHandler
*) src
;
648 return (void *) dest
;
651 static void *SwigwxPNGHandlerTowxObject(void *ptr
) {
654 src
= (wxPNGHandler
*) ptr
;
655 dest
= (wxObject
*) src
;
656 return (void *) dest
;
659 #define new_wxPNGHandler() (new wxPNGHandler())
660 static PyObject
*_wrap_new_wxPNGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
661 PyObject
* _resultobj
;
662 wxPNGHandler
* _result
;
663 char *_kwnames
[] = { NULL
};
667 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNGHandler",_kwnames
))
670 wxPy_BEGIN_ALLOW_THREADS
;
671 _result
= (wxPNGHandler
*)new_wxPNGHandler();
673 wxPy_END_ALLOW_THREADS
;
674 if (PyErr_Occurred()) return NULL
;
676 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNGHandler_p");
677 _resultobj
= Py_BuildValue("s",_ptemp
);
680 _resultobj
= Py_None
;
685 static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr
) {
687 wxImageHandler
*dest
;
688 src
= (wxJPEGHandler
*) ptr
;
689 dest
= (wxImageHandler
*) src
;
690 return (void *) dest
;
693 static void *SwigwxJPEGHandlerTowxObject(void *ptr
) {
696 src
= (wxJPEGHandler
*) ptr
;
697 dest
= (wxObject
*) src
;
698 return (void *) dest
;
701 #define new_wxJPEGHandler() (new wxJPEGHandler())
702 static PyObject
*_wrap_new_wxJPEGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
703 PyObject
* _resultobj
;
704 wxJPEGHandler
* _result
;
705 char *_kwnames
[] = { NULL
};
709 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxJPEGHandler",_kwnames
))
712 wxPy_BEGIN_ALLOW_THREADS
;
713 _result
= (wxJPEGHandler
*)new_wxJPEGHandler();
715 wxPy_END_ALLOW_THREADS
;
716 if (PyErr_Occurred()) return NULL
;
718 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxJPEGHandler_p");
719 _resultobj
= Py_BuildValue("s",_ptemp
);
722 _resultobj
= Py_None
;
727 static void *SwigwxBMPHandlerTowxImageHandler(void *ptr
) {
729 wxImageHandler
*dest
;
730 src
= (wxBMPHandler
*) ptr
;
731 dest
= (wxImageHandler
*) src
;
732 return (void *) dest
;
735 static void *SwigwxBMPHandlerTowxObject(void *ptr
) {
738 src
= (wxBMPHandler
*) ptr
;
739 dest
= (wxObject
*) src
;
740 return (void *) dest
;
743 #define new_wxBMPHandler() (new wxBMPHandler())
744 static PyObject
*_wrap_new_wxBMPHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
745 PyObject
* _resultobj
;
746 wxBMPHandler
* _result
;
747 char *_kwnames
[] = { NULL
};
751 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxBMPHandler",_kwnames
))
754 wxPy_BEGIN_ALLOW_THREADS
;
755 _result
= (wxBMPHandler
*)new_wxBMPHandler();
757 wxPy_END_ALLOW_THREADS
;
758 if (PyErr_Occurred()) return NULL
;
760 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBMPHandler_p");
761 _resultobj
= Py_BuildValue("s",_ptemp
);
764 _resultobj
= Py_None
;
769 static void *SwigwxGIFHandlerTowxImageHandler(void *ptr
) {
771 wxImageHandler
*dest
;
772 src
= (wxGIFHandler
*) ptr
;
773 dest
= (wxImageHandler
*) src
;
774 return (void *) dest
;
777 static void *SwigwxGIFHandlerTowxObject(void *ptr
) {
780 src
= (wxGIFHandler
*) ptr
;
781 dest
= (wxObject
*) src
;
782 return (void *) dest
;
785 #define new_wxGIFHandler() (new wxGIFHandler())
786 static PyObject
*_wrap_new_wxGIFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
787 PyObject
* _resultobj
;
788 wxGIFHandler
* _result
;
789 char *_kwnames
[] = { NULL
};
793 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxGIFHandler",_kwnames
))
796 wxPy_BEGIN_ALLOW_THREADS
;
797 _result
= (wxGIFHandler
*)new_wxGIFHandler();
799 wxPy_END_ALLOW_THREADS
;
800 if (PyErr_Occurred()) return NULL
;
802 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGIFHandler_p");
803 _resultobj
= Py_BuildValue("s",_ptemp
);
806 _resultobj
= Py_None
;
811 static void *SwigwxPNMHandlerTowxImageHandler(void *ptr
) {
813 wxImageHandler
*dest
;
814 src
= (wxPNMHandler
*) ptr
;
815 dest
= (wxImageHandler
*) src
;
816 return (void *) dest
;
819 static void *SwigwxPNMHandlerTowxObject(void *ptr
) {
822 src
= (wxPNMHandler
*) ptr
;
823 dest
= (wxObject
*) src
;
824 return (void *) dest
;
827 #define new_wxPNMHandler() (new wxPNMHandler())
828 static PyObject
*_wrap_new_wxPNMHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
829 PyObject
* _resultobj
;
830 wxPNMHandler
* _result
;
831 char *_kwnames
[] = { NULL
};
835 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNMHandler",_kwnames
))
838 wxPy_BEGIN_ALLOW_THREADS
;
839 _result
= (wxPNMHandler
*)new_wxPNMHandler();
841 wxPy_END_ALLOW_THREADS
;
842 if (PyErr_Occurred()) return NULL
;
844 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNMHandler_p");
845 _resultobj
= Py_BuildValue("s",_ptemp
);
848 _resultobj
= Py_None
;
853 static void *SwigwxPCXHandlerTowxImageHandler(void *ptr
) {
855 wxImageHandler
*dest
;
856 src
= (wxPCXHandler
*) ptr
;
857 dest
= (wxImageHandler
*) src
;
858 return (void *) dest
;
861 static void *SwigwxPCXHandlerTowxObject(void *ptr
) {
864 src
= (wxPCXHandler
*) ptr
;
865 dest
= (wxObject
*) src
;
866 return (void *) dest
;
869 #define new_wxPCXHandler() (new wxPCXHandler())
870 static PyObject
*_wrap_new_wxPCXHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
871 PyObject
* _resultobj
;
872 wxPCXHandler
* _result
;
873 char *_kwnames
[] = { NULL
};
877 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPCXHandler",_kwnames
))
880 wxPy_BEGIN_ALLOW_THREADS
;
881 _result
= (wxPCXHandler
*)new_wxPCXHandler();
883 wxPy_END_ALLOW_THREADS
;
884 if (PyErr_Occurred()) return NULL
;
886 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPCXHandler_p");
887 _resultobj
= Py_BuildValue("s",_ptemp
);
890 _resultobj
= Py_None
;
895 static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr
) {
897 wxImageHandler
*dest
;
898 src
= (wxTIFFHandler
*) ptr
;
899 dest
= (wxImageHandler
*) src
;
900 return (void *) dest
;
903 static void *SwigwxTIFFHandlerTowxObject(void *ptr
) {
906 src
= (wxTIFFHandler
*) ptr
;
907 dest
= (wxObject
*) src
;
908 return (void *) dest
;
911 #define new_wxTIFFHandler() (new wxTIFFHandler())
912 static PyObject
*_wrap_new_wxTIFFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
913 PyObject
* _resultobj
;
914 wxTIFFHandler
* _result
;
915 char *_kwnames
[] = { NULL
};
919 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxTIFFHandler",_kwnames
))
922 wxPy_BEGIN_ALLOW_THREADS
;
923 _result
= (wxTIFFHandler
*)new_wxTIFFHandler();
925 wxPy_END_ALLOW_THREADS
;
926 if (PyErr_Occurred()) return NULL
;
928 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxTIFFHandler_p");
929 _resultobj
= Py_BuildValue("s",_ptemp
);
932 _resultobj
= Py_None
;
937 static void *SwigwxImageTowxObject(void *ptr
) {
940 src
= (wxImage
*) ptr
;
941 dest
= (wxObject
*) src
;
942 return (void *) dest
;
945 #define new_wxImage(_swigarg0,_swigarg1) (new wxImage(_swigarg0,_swigarg1))
946 static PyObject
*_wrap_new_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
947 PyObject
* _resultobj
;
950 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
951 PyObject
* _obj0
= 0;
952 char *_kwnames
[] = { "name","type", NULL
};
956 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:new_wxImage",_kwnames
,&_obj0
,&_arg1
))
959 #if PYTHON_API_VERSION >= 1009
960 char* tmpPtr
; int tmpSize
;
961 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
962 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
965 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
967 _arg0
= new wxString(tmpPtr
, tmpSize
);
969 if (!PyString_Check(_obj0
)) {
970 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
973 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
977 wxPy_BEGIN_ALLOW_THREADS
;
978 _result
= (wxImage
*)new_wxImage(*_arg0
,_arg1
);
980 wxPy_END_ALLOW_THREADS
;
981 if (PyErr_Occurred()) return NULL
;
983 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
984 _resultobj
= Py_BuildValue("s",_ptemp
);
987 _resultobj
= Py_None
;
996 #define delete_wxImage(_swigobj) (delete _swigobj)
997 static PyObject
*_wrap_delete_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
998 PyObject
* _resultobj
;
1000 PyObject
* _argo0
= 0;
1001 char *_kwnames
[] = { "self", NULL
};
1004 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxImage",_kwnames
,&_argo0
))
1007 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1008 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1009 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxImage. Expected _wxImage_p.");
1014 wxPy_BEGIN_ALLOW_THREADS
;
1015 delete_wxImage(_arg0
);
1017 wxPy_END_ALLOW_THREADS
;
1018 if (PyErr_Occurred()) return NULL
;
1019 } Py_INCREF(Py_None
);
1020 _resultobj
= Py_None
;
1024 #define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
1025 static PyObject
*_wrap_wxImage_ConvertToBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1026 PyObject
* _resultobj
;
1029 PyObject
* _argo0
= 0;
1030 char *_kwnames
[] = { "self", NULL
};
1034 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_ConvertToBitmap",_kwnames
,&_argo0
))
1037 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1038 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1039 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
1044 wxPy_BEGIN_ALLOW_THREADS
;
1045 _result
= new wxBitmap (wxImage_ConvertToBitmap(_arg0
));
1047 wxPy_END_ALLOW_THREADS
;
1048 if (PyErr_Occurred()) return NULL
;
1049 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1050 _resultobj
= Py_BuildValue("s",_ptemp
);
1054 #define wxImage_ConvertToMonoBitmap(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMonoBitmap(_swigarg0,_swigarg1,_swigarg2))
1055 static PyObject
*_wrap_wxImage_ConvertToMonoBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1056 PyObject
* _resultobj
;
1059 unsigned char _arg1
;
1060 unsigned char _arg2
;
1061 unsigned char _arg3
;
1062 PyObject
* _argo0
= 0;
1063 char *_kwnames
[] = { "self","red","green","blue", NULL
};
1067 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMonoBitmap",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
1070 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1071 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1072 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMonoBitmap. Expected _wxImage_p.");
1077 wxPy_BEGIN_ALLOW_THREADS
;
1078 _result
= new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0
,_arg1
,_arg2
,_arg3
));
1080 wxPy_END_ALLOW_THREADS
;
1081 if (PyErr_Occurred()) return NULL
;
1082 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1083 _resultobj
= Py_BuildValue("s",_ptemp
);
1087 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
1088 static PyObject
*_wrap_wxImage_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1089 PyObject
* _resultobj
;
1093 PyObject
* _argo0
= 0;
1094 char *_kwnames
[] = { "self","width","height", NULL
};
1097 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Create",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1100 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1101 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1102 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
1107 wxPy_BEGIN_ALLOW_THREADS
;
1108 wxImage_Create(_arg0
,_arg1
,_arg2
);
1110 wxPy_END_ALLOW_THREADS
;
1111 if (PyErr_Occurred()) return NULL
;
1112 } Py_INCREF(Py_None
);
1113 _resultobj
= Py_None
;
1117 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1118 static PyObject
*_wrap_wxImage_Destroy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1119 PyObject
* _resultobj
;
1121 PyObject
* _argo0
= 0;
1122 char *_kwnames
[] = { "self", NULL
};
1125 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Destroy",_kwnames
,&_argo0
))
1128 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1129 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1130 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1135 wxPy_BEGIN_ALLOW_THREADS
;
1136 wxImage_Destroy(_arg0
);
1138 wxPy_END_ALLOW_THREADS
;
1139 if (PyErr_Occurred()) return NULL
;
1140 } Py_INCREF(Py_None
);
1141 _resultobj
= Py_None
;
1145 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1146 static PyObject
*_wrap_wxImage_Scale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1147 PyObject
* _resultobj
;
1152 PyObject
* _argo0
= 0;
1153 char *_kwnames
[] = { "self","width","height", NULL
};
1157 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Scale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1160 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1161 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1162 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1167 wxPy_BEGIN_ALLOW_THREADS
;
1168 _result
= new wxImage (wxImage_Scale(_arg0
,_arg1
,_arg2
));
1170 wxPy_END_ALLOW_THREADS
;
1171 if (PyErr_Occurred()) return NULL
;
1172 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1173 _resultobj
= Py_BuildValue("s",_ptemp
);
1177 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1178 static PyObject
*_wrap_wxImage_Rescale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1179 PyObject
* _resultobj
;
1184 PyObject
* _argo0
= 0;
1185 char *_kwnames
[] = { "self","width","height", NULL
};
1189 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Rescale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1192 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1193 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1194 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1199 wxPy_BEGIN_ALLOW_THREADS
;
1200 wxImage
& _result_ref
= wxImage_Rescale(_arg0
,_arg1
,_arg2
);
1201 _result
= (wxImage
*) &_result_ref
;
1203 wxPy_END_ALLOW_THREADS
;
1204 if (PyErr_Occurred()) return NULL
;
1206 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1207 _resultobj
= Py_BuildValue("s",_ptemp
);
1210 _resultobj
= Py_None
;
1215 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1216 static PyObject
*_wrap_wxImage_SetRGB(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1217 PyObject
* _resultobj
;
1221 unsigned char _arg3
;
1222 unsigned char _arg4
;
1223 unsigned char _arg5
;
1224 PyObject
* _argo0
= 0;
1225 char *_kwnames
[] = { "self","x","y","r","g","b", NULL
};
1228 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oiibbb:wxImage_SetRGB",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
))
1231 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1232 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1233 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1238 wxPy_BEGIN_ALLOW_THREADS
;
1239 wxImage_SetRGB(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
);
1241 wxPy_END_ALLOW_THREADS
;
1242 if (PyErr_Occurred()) return NULL
;
1243 } Py_INCREF(Py_None
);
1244 _resultobj
= Py_None
;
1248 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1249 static PyObject
*_wrap_wxImage_GetRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1250 PyObject
* _resultobj
;
1251 unsigned char _result
;
1255 PyObject
* _argo0
= 0;
1256 char *_kwnames
[] = { "self","x","y", NULL
};
1259 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetRed",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1262 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1263 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1264 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1269 wxPy_BEGIN_ALLOW_THREADS
;
1270 _result
= (unsigned char )wxImage_GetRed(_arg0
,_arg1
,_arg2
);
1272 wxPy_END_ALLOW_THREADS
;
1273 if (PyErr_Occurred()) return NULL
;
1274 } _resultobj
= Py_BuildValue("b",_result
);
1278 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1279 static PyObject
*_wrap_wxImage_GetGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1280 PyObject
* _resultobj
;
1281 unsigned char _result
;
1285 PyObject
* _argo0
= 0;
1286 char *_kwnames
[] = { "self","x","y", NULL
};
1289 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetGreen",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1292 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1293 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1294 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1299 wxPy_BEGIN_ALLOW_THREADS
;
1300 _result
= (unsigned char )wxImage_GetGreen(_arg0
,_arg1
,_arg2
);
1302 wxPy_END_ALLOW_THREADS
;
1303 if (PyErr_Occurred()) return NULL
;
1304 } _resultobj
= Py_BuildValue("b",_result
);
1308 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1309 static PyObject
*_wrap_wxImage_GetBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1310 PyObject
* _resultobj
;
1311 unsigned char _result
;
1315 PyObject
* _argo0
= 0;
1316 char *_kwnames
[] = { "self","x","y", NULL
};
1319 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetBlue",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1322 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1323 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1324 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1329 wxPy_BEGIN_ALLOW_THREADS
;
1330 _result
= (unsigned char )wxImage_GetBlue(_arg0
,_arg1
,_arg2
);
1332 wxPy_END_ALLOW_THREADS
;
1333 if (PyErr_Occurred()) return NULL
;
1334 } _resultobj
= Py_BuildValue("b",_result
);
1338 static PyObject
*_wrap_wxImage_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1339 PyObject
* _resultobj
;
1342 PyObject
* _obj0
= 0;
1343 char *_kwnames
[] = { "name", NULL
};
1346 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanRead",_kwnames
,&_obj0
))
1349 #if PYTHON_API_VERSION >= 1009
1350 char* tmpPtr
; int tmpSize
;
1351 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1352 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1355 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1357 _arg0
= new wxString(tmpPtr
, tmpSize
);
1359 if (!PyString_Check(_obj0
)) {
1360 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1363 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1367 wxPy_BEGIN_ALLOW_THREADS
;
1368 _result
= (bool )wxImage::CanRead(*_arg0
);
1370 wxPy_END_ALLOW_THREADS
;
1371 if (PyErr_Occurred()) return NULL
;
1372 } _resultobj
= Py_BuildValue("i",_result
);
1380 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1))
1381 static PyObject
*_wrap_wxImage_LoadFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1382 PyObject
* _resultobj
;
1386 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
1387 PyObject
* _argo0
= 0;
1388 PyObject
* _obj1
= 0;
1389 char *_kwnames
[] = { "self","name","type", NULL
};
1392 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|l:wxImage_LoadFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1395 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1396 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1397 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1402 #if PYTHON_API_VERSION >= 1009
1403 char* tmpPtr
; int tmpSize
;
1404 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1405 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1408 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1410 _arg1
= new wxString(tmpPtr
, tmpSize
);
1412 if (!PyString_Check(_obj1
)) {
1413 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1416 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1420 wxPy_BEGIN_ALLOW_THREADS
;
1421 _result
= (bool )wxImage_LoadFile(_arg0
,*_arg1
,_arg2
);
1423 wxPy_END_ALLOW_THREADS
;
1424 if (PyErr_Occurred()) return NULL
;
1425 } _resultobj
= Py_BuildValue("i",_result
);
1433 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1))
1434 static PyObject
*_wrap_wxImage_LoadMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1435 PyObject
* _resultobj
;
1440 PyObject
* _argo0
= 0;
1441 PyObject
* _obj1
= 0;
1442 PyObject
* _obj2
= 0;
1443 char *_kwnames
[] = { "self","name","mimetype", NULL
};
1446 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_LoadMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
1449 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1450 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1451 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1456 #if PYTHON_API_VERSION >= 1009
1457 char* tmpPtr
; int tmpSize
;
1458 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1459 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1462 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1464 _arg1
= new wxString(tmpPtr
, tmpSize
);
1466 if (!PyString_Check(_obj1
)) {
1467 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1470 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1474 #if PYTHON_API_VERSION >= 1009
1475 char* tmpPtr
; int tmpSize
;
1476 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1477 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1480 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1482 _arg2
= new wxString(tmpPtr
, tmpSize
);
1484 if (!PyString_Check(_obj2
)) {
1485 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1488 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1492 wxPy_BEGIN_ALLOW_THREADS
;
1493 _result
= (bool )wxImage_LoadMimeFile(_arg0
,*_arg1
,*_arg2
);
1495 wxPy_END_ALLOW_THREADS
;
1496 if (PyErr_Occurred()) return NULL
;
1497 } _resultobj
= Py_BuildValue("i",_result
);
1509 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1510 static PyObject
*_wrap_wxImage_SaveFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1511 PyObject
* _resultobj
;
1516 PyObject
* _argo0
= 0;
1517 PyObject
* _obj1
= 0;
1518 char *_kwnames
[] = { "self","name","type", NULL
};
1521 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SaveFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1524 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1525 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1526 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1531 #if PYTHON_API_VERSION >= 1009
1532 char* tmpPtr
; int tmpSize
;
1533 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1534 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1537 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1539 _arg1
= new wxString(tmpPtr
, tmpSize
);
1541 if (!PyString_Check(_obj1
)) {
1542 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1545 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1549 wxPy_BEGIN_ALLOW_THREADS
;
1550 _result
= (bool )wxImage_SaveFile(_arg0
,*_arg1
,_arg2
);
1552 wxPy_END_ALLOW_THREADS
;
1553 if (PyErr_Occurred()) return NULL
;
1554 } _resultobj
= Py_BuildValue("i",_result
);
1562 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1563 static PyObject
*_wrap_wxImage_SaveMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1564 PyObject
* _resultobj
;
1569 PyObject
* _argo0
= 0;
1570 PyObject
* _obj1
= 0;
1571 PyObject
* _obj2
= 0;
1572 char *_kwnames
[] = { "self","name","mimetype", NULL
};
1575 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SaveMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
1578 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1579 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1580 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
1585 #if PYTHON_API_VERSION >= 1009
1586 char* tmpPtr
; int tmpSize
;
1587 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1588 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1591 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1593 _arg1
= new wxString(tmpPtr
, tmpSize
);
1595 if (!PyString_Check(_obj1
)) {
1596 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1599 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1603 #if PYTHON_API_VERSION >= 1009
1604 char* tmpPtr
; int tmpSize
;
1605 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1606 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1609 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1611 _arg2
= new wxString(tmpPtr
, tmpSize
);
1613 if (!PyString_Check(_obj2
)) {
1614 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1617 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1621 wxPy_BEGIN_ALLOW_THREADS
;
1622 _result
= (bool )wxImage_SaveMimeFile(_arg0
,*_arg1
,*_arg2
);
1624 wxPy_END_ALLOW_THREADS
;
1625 if (PyErr_Occurred()) return NULL
;
1626 } _resultobj
= Py_BuildValue("i",_result
);
1638 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
1639 static PyObject
*_wrap_wxImage_Ok(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1640 PyObject
* _resultobj
;
1643 PyObject
* _argo0
= 0;
1644 char *_kwnames
[] = { "self", NULL
};
1647 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Ok",_kwnames
,&_argo0
))
1650 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1651 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1652 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
1657 wxPy_BEGIN_ALLOW_THREADS
;
1658 _result
= (bool )wxImage_Ok(_arg0
);
1660 wxPy_END_ALLOW_THREADS
;
1661 if (PyErr_Occurred()) return NULL
;
1662 } _resultobj
= Py_BuildValue("i",_result
);
1666 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
1667 static PyObject
*_wrap_wxImage_GetWidth(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1668 PyObject
* _resultobj
;
1671 PyObject
* _argo0
= 0;
1672 char *_kwnames
[] = { "self", NULL
};
1675 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetWidth",_kwnames
,&_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_GetWidth. Expected _wxImage_p.");
1685 wxPy_BEGIN_ALLOW_THREADS
;
1686 _result
= (int )wxImage_GetWidth(_arg0
);
1688 wxPy_END_ALLOW_THREADS
;
1689 if (PyErr_Occurred()) return NULL
;
1690 } _resultobj
= Py_BuildValue("i",_result
);
1694 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
1695 static PyObject
*_wrap_wxImage_GetHeight(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1696 PyObject
* _resultobj
;
1699 PyObject
* _argo0
= 0;
1700 char *_kwnames
[] = { "self", NULL
};
1703 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetHeight",_kwnames
,&_argo0
))
1706 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1707 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1708 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
1713 wxPy_BEGIN_ALLOW_THREADS
;
1714 _result
= (int )wxImage_GetHeight(_arg0
);
1716 wxPy_END_ALLOW_THREADS
;
1717 if (PyErr_Occurred()) return NULL
;
1718 } _resultobj
= Py_BuildValue("i",_result
);
1722 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
1723 static PyObject
*_wrap_wxImage_GetSubImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1724 PyObject
* _resultobj
;
1728 PyObject
* _argo0
= 0;
1730 PyObject
* _obj1
= 0;
1731 char *_kwnames
[] = { "self","rect", NULL
};
1735 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetSubImage",_kwnames
,&_argo0
,&_obj1
))
1738 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1739 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1740 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
1746 if (! wxRect_helper(_obj1
, &_arg1
))
1750 wxPy_BEGIN_ALLOW_THREADS
;
1751 _result
= new wxImage (wxImage_GetSubImage(_arg0
,*_arg1
));
1753 wxPy_END_ALLOW_THREADS
;
1754 if (PyErr_Occurred()) return NULL
;
1755 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1756 _resultobj
= Py_BuildValue("s",_ptemp
);
1760 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
1761 static PyObject
*_wrap_wxImage_Copy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1762 PyObject
* _resultobj
;
1765 PyObject
* _argo0
= 0;
1766 char *_kwnames
[] = { "self", NULL
};
1770 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Copy",_kwnames
,&_argo0
))
1773 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1774 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1775 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
1780 wxPy_BEGIN_ALLOW_THREADS
;
1781 _result
= new wxImage (wxImage_Copy(_arg0
));
1783 wxPy_END_ALLOW_THREADS
;
1784 if (PyErr_Occurred()) return NULL
;
1785 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1786 _resultobj
= Py_BuildValue("s",_ptemp
);
1790 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
1791 static PyObject
*_wrap_wxImage_Paste(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1792 PyObject
* _resultobj
;
1797 PyObject
* _argo0
= 0;
1798 PyObject
* _argo1
= 0;
1799 char *_kwnames
[] = { "self","image","x","y", NULL
};
1802 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOii:wxImage_Paste",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_arg3
))
1805 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1806 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1807 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
1812 if (_argo1
== Py_None
) { _arg1
= NULL
; }
1813 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxImage_p")) {
1814 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
1819 wxPy_BEGIN_ALLOW_THREADS
;
1820 wxImage_Paste(_arg0
,*_arg1
,_arg2
,_arg3
);
1822 wxPy_END_ALLOW_THREADS
;
1823 if (PyErr_Occurred()) return NULL
;
1824 } Py_INCREF(Py_None
);
1825 _resultobj
= Py_None
;
1829 static PyObject
* wxImage_GetData(wxImage
*self
) {
1830 unsigned char* data
= self
->GetData();
1831 int len
= self
->GetWidth() * self
->GetHeight() * 3;
1832 return PyString_FromStringAndSize((char*)data
, len
);
1834 static PyObject
*_wrap_wxImage_GetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1835 PyObject
* _resultobj
;
1838 PyObject
* _argo0
= 0;
1839 char *_kwnames
[] = { "self", NULL
};
1842 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetData",_kwnames
,&_argo0
))
1845 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1846 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1847 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
1852 wxPy_BEGIN_ALLOW_THREADS
;
1853 _result
= (PyObject
*)wxImage_GetData(_arg0
);
1855 wxPy_END_ALLOW_THREADS
;
1856 if (PyErr_Occurred()) return NULL
;
1858 _resultobj
= _result
;
1863 static void wxImage_SetData(wxImage
*self
,PyObject
* data
) {
1864 unsigned char* dataPtr
;
1866 if (! PyString_Check(data
)) {
1867 PyErr_SetString(PyExc_TypeError
, "Expected string object");
1871 size_t len
= self
->GetWidth() * self
->GetHeight() * 3;
1872 dataPtr
= (unsigned char*) malloc(len
);
1873 memcpy(dataPtr
, PyString_AsString(data
), len
);
1874 self
->SetData(dataPtr
);
1876 static PyObject
*_wrap_wxImage_SetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1877 PyObject
* _resultobj
;
1880 PyObject
* _argo0
= 0;
1881 PyObject
* _obj1
= 0;
1882 char *_kwnames
[] = { "self","data", NULL
};
1885 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_SetData",_kwnames
,&_argo0
,&_obj1
))
1888 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1889 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1890 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
1898 wxPy_BEGIN_ALLOW_THREADS
;
1899 wxImage_SetData(_arg0
,_arg1
);
1901 wxPy_END_ALLOW_THREADS
;
1902 if (PyErr_Occurred()) return NULL
;
1903 } Py_INCREF(Py_None
);
1904 _resultobj
= Py_None
;
1908 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
1909 static PyObject
*_wrap_wxImage_SetMaskColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1910 PyObject
* _resultobj
;
1912 unsigned char _arg1
;
1913 unsigned char _arg2
;
1914 unsigned char _arg3
;
1915 PyObject
* _argo0
= 0;
1916 char *_kwnames
[] = { "self","r","g","b", NULL
};
1919 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_SetMaskColour",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
1922 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1923 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1924 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
1929 wxPy_BEGIN_ALLOW_THREADS
;
1930 wxImage_SetMaskColour(_arg0
,_arg1
,_arg2
,_arg3
);
1932 wxPy_END_ALLOW_THREADS
;
1933 if (PyErr_Occurred()) return NULL
;
1934 } Py_INCREF(Py_None
);
1935 _resultobj
= Py_None
;
1939 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
1940 static PyObject
*_wrap_wxImage_GetMaskRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1941 PyObject
* _resultobj
;
1942 unsigned char _result
;
1944 PyObject
* _argo0
= 0;
1945 char *_kwnames
[] = { "self", NULL
};
1948 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskRed",_kwnames
,&_argo0
))
1951 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1952 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1953 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
1958 wxPy_BEGIN_ALLOW_THREADS
;
1959 _result
= (unsigned char )wxImage_GetMaskRed(_arg0
);
1961 wxPy_END_ALLOW_THREADS
;
1962 if (PyErr_Occurred()) return NULL
;
1963 } _resultobj
= Py_BuildValue("b",_result
);
1967 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
1968 static PyObject
*_wrap_wxImage_GetMaskGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1969 PyObject
* _resultobj
;
1970 unsigned char _result
;
1972 PyObject
* _argo0
= 0;
1973 char *_kwnames
[] = { "self", NULL
};
1976 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskGreen",_kwnames
,&_argo0
))
1979 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1980 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1981 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
1986 wxPy_BEGIN_ALLOW_THREADS
;
1987 _result
= (unsigned char )wxImage_GetMaskGreen(_arg0
);
1989 wxPy_END_ALLOW_THREADS
;
1990 if (PyErr_Occurred()) return NULL
;
1991 } _resultobj
= Py_BuildValue("b",_result
);
1995 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
1996 static PyObject
*_wrap_wxImage_GetMaskBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1997 PyObject
* _resultobj
;
1998 unsigned char _result
;
2000 PyObject
* _argo0
= 0;
2001 char *_kwnames
[] = { "self", NULL
};
2004 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskBlue",_kwnames
,&_argo0
))
2007 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2008 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2009 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
2014 wxPy_BEGIN_ALLOW_THREADS
;
2015 _result
= (unsigned char )wxImage_GetMaskBlue(_arg0
);
2017 wxPy_END_ALLOW_THREADS
;
2018 if (PyErr_Occurred()) return NULL
;
2019 } _resultobj
= Py_BuildValue("b",_result
);
2023 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
2024 static PyObject
*_wrap_wxImage_SetMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2025 PyObject
* _resultobj
;
2027 bool _arg1
= (bool ) TRUE
;
2028 PyObject
* _argo0
= 0;
2029 int tempbool1
= (int) TRUE
;
2030 char *_kwnames
[] = { "self","mask", NULL
};
2033 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_SetMask",_kwnames
,&_argo0
,&tempbool1
))
2036 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2037 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2038 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
2042 _arg1
= (bool ) tempbool1
;
2044 wxPy_BEGIN_ALLOW_THREADS
;
2045 wxImage_SetMask(_arg0
,_arg1
);
2047 wxPy_END_ALLOW_THREADS
;
2048 if (PyErr_Occurred()) return NULL
;
2049 } Py_INCREF(Py_None
);
2050 _resultobj
= Py_None
;
2054 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
2055 static PyObject
*_wrap_wxImage_HasMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2056 PyObject
* _resultobj
;
2059 PyObject
* _argo0
= 0;
2060 char *_kwnames
[] = { "self", NULL
};
2063 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_HasMask",_kwnames
,&_argo0
))
2066 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2067 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2068 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
2073 wxPy_BEGIN_ALLOW_THREADS
;
2074 _result
= (bool )wxImage_HasMask(_arg0
);
2076 wxPy_END_ALLOW_THREADS
;
2077 if (PyErr_Occurred()) return NULL
;
2078 } _resultobj
= Py_BuildValue("i",_result
);
2082 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
2083 static PyObject
*_wrap_wxImage_Rotate(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2084 PyObject
* _resultobj
;
2089 bool _arg3
= (bool ) TRUE
;
2090 wxPoint
* _arg4
= (wxPoint
*) NULL
;
2091 PyObject
* _argo0
= 0;
2093 PyObject
* _obj2
= 0;
2094 int tempbool3
= (int) TRUE
;
2096 PyObject
* _obj4
= 0;
2097 char *_kwnames
[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL
};
2101 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OdO|iO:wxImage_Rotate",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&tempbool3
,&_obj4
))
2104 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2105 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2106 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
2112 if (! wxPoint_helper(_obj2
, &_arg2
))
2115 _arg3
= (bool ) tempbool3
;
2119 if (! wxPoint_helper(_obj4
, &_arg4
))
2123 wxPy_BEGIN_ALLOW_THREADS
;
2124 _result
= new wxImage (wxImage_Rotate(_arg0
,_arg1
,*_arg2
,_arg3
,_arg4
));
2126 wxPy_END_ALLOW_THREADS
;
2127 if (PyErr_Occurred()) return NULL
;
2128 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2129 _resultobj
= Py_BuildValue("s",_ptemp
);
2133 #define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
2134 static PyObject
*_wrap_wxImage_Rotate90(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2135 PyObject
* _resultobj
;
2138 bool _arg1
= (bool ) TRUE
;
2139 PyObject
* _argo0
= 0;
2140 int tempbool1
= (int) TRUE
;
2141 char *_kwnames
[] = { "self","clockwise", NULL
};
2145 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Rotate90",_kwnames
,&_argo0
,&tempbool1
))
2148 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2149 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2150 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p.");
2154 _arg1
= (bool ) tempbool1
;
2156 wxPy_BEGIN_ALLOW_THREADS
;
2157 _result
= new wxImage (wxImage_Rotate90(_arg0
,_arg1
));
2159 wxPy_END_ALLOW_THREADS
;
2160 if (PyErr_Occurred()) return NULL
;
2161 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2162 _resultobj
= Py_BuildValue("s",_ptemp
);
2166 #define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2167 static PyObject
*_wrap_wxImage_Mirror(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2168 PyObject
* _resultobj
;
2171 bool _arg1
= (bool ) TRUE
;
2172 PyObject
* _argo0
= 0;
2173 int tempbool1
= (int) TRUE
;
2174 char *_kwnames
[] = { "self","horizontally", NULL
};
2178 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Mirror",_kwnames
,&_argo0
,&tempbool1
))
2181 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2182 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2183 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2187 _arg1
= (bool ) tempbool1
;
2189 wxPy_BEGIN_ALLOW_THREADS
;
2190 _result
= new wxImage (wxImage_Mirror(_arg0
,_arg1
));
2192 wxPy_END_ALLOW_THREADS
;
2193 if (PyErr_Occurred()) return NULL
;
2194 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2195 _resultobj
= Py_BuildValue("s",_ptemp
);
2199 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2200 static PyObject
*_wrap_wxImage_Replace(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2201 PyObject
* _resultobj
;
2203 unsigned char _arg1
;
2204 unsigned char _arg2
;
2205 unsigned char _arg3
;
2206 unsigned char _arg4
;
2207 unsigned char _arg5
;
2208 unsigned char _arg6
;
2209 PyObject
* _argo0
= 0;
2210 char *_kwnames
[] = { "self","r1","g1","b1","r2","g2","b2", NULL
};
2213 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbbbbb:wxImage_Replace",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
,&_arg6
))
2216 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2217 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2218 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p.");
2223 wxPy_BEGIN_ALLOW_THREADS
;
2224 wxImage_Replace(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
,_arg6
);
2226 wxPy_END_ALLOW_THREADS
;
2227 if (PyErr_Occurred()) return NULL
;
2228 } Py_INCREF(Py_None
);
2229 _resultobj
= Py_None
;
2233 #define wxImage_ConvertToMono(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMono(_swigarg0,_swigarg1,_swigarg2))
2234 static PyObject
*_wrap_wxImage_ConvertToMono(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2235 PyObject
* _resultobj
;
2238 unsigned char _arg1
;
2239 unsigned char _arg2
;
2240 unsigned char _arg3
;
2241 PyObject
* _argo0
= 0;
2242 char *_kwnames
[] = { "self","r","g","b", NULL
};
2246 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMono",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2249 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2250 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2251 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMono. Expected _wxImage_p.");
2256 wxPy_BEGIN_ALLOW_THREADS
;
2257 _result
= new wxImage (wxImage_ConvertToMono(_arg0
,_arg1
,_arg2
,_arg3
));
2259 wxPy_END_ALLOW_THREADS
;
2260 if (PyErr_Occurred()) return NULL
;
2261 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2262 _resultobj
= Py_BuildValue("s",_ptemp
);
2266 #define wxImage_SetOption(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2267 static PyObject
*_wrap_wxImage_SetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2268 PyObject
* _resultobj
;
2272 PyObject
* _argo0
= 0;
2273 PyObject
* _obj1
= 0;
2274 PyObject
* _obj2
= 0;
2275 char *_kwnames
[] = { "self","name","value", NULL
};
2278 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SetOption",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2281 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2282 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2283 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOption. Expected _wxImage_p.");
2288 #if PYTHON_API_VERSION >= 1009
2289 char* tmpPtr
; int tmpSize
;
2290 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2291 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2294 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2296 _arg1
= new wxString(tmpPtr
, tmpSize
);
2298 if (!PyString_Check(_obj1
)) {
2299 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2302 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2306 #if PYTHON_API_VERSION >= 1009
2307 char* tmpPtr
; int tmpSize
;
2308 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2309 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2312 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2314 _arg2
= new wxString(tmpPtr
, tmpSize
);
2316 if (!PyString_Check(_obj2
)) {
2317 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2320 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2324 wxPy_BEGIN_ALLOW_THREADS
;
2325 wxImage_SetOption(_arg0
,*_arg1
,*_arg2
);
2327 wxPy_END_ALLOW_THREADS
;
2328 if (PyErr_Occurred()) return NULL
;
2329 } Py_INCREF(Py_None
);
2330 _resultobj
= Py_None
;
2342 #define wxImage_SetOptionInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2343 static PyObject
*_wrap_wxImage_SetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2344 PyObject
* _resultobj
;
2348 PyObject
* _argo0
= 0;
2349 PyObject
* _obj1
= 0;
2350 char *_kwnames
[] = { "self","name","value", NULL
};
2353 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SetOptionInt",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
2356 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2357 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2358 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOptionInt. Expected _wxImage_p.");
2363 #if PYTHON_API_VERSION >= 1009
2364 char* tmpPtr
; int tmpSize
;
2365 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2366 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2369 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2371 _arg1
= new wxString(tmpPtr
, tmpSize
);
2373 if (!PyString_Check(_obj1
)) {
2374 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2377 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2381 wxPy_BEGIN_ALLOW_THREADS
;
2382 wxImage_SetOptionInt(_arg0
,*_arg1
,_arg2
);
2384 wxPy_END_ALLOW_THREADS
;
2385 if (PyErr_Occurred()) return NULL
;
2386 } Py_INCREF(Py_None
);
2387 _resultobj
= Py_None
;
2395 #define wxImage_GetOption(_swigobj,_swigarg0) (_swigobj->GetOption(_swigarg0))
2396 static PyObject
*_wrap_wxImage_GetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2397 PyObject
* _resultobj
;
2401 PyObject
* _argo0
= 0;
2402 PyObject
* _obj1
= 0;
2403 char *_kwnames
[] = { "self","name", NULL
};
2406 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOption",_kwnames
,&_argo0
,&_obj1
))
2409 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2410 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2411 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOption. Expected _wxImage_p.");
2416 #if PYTHON_API_VERSION >= 1009
2417 char* tmpPtr
; int tmpSize
;
2418 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2419 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2422 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2424 _arg1
= new wxString(tmpPtr
, tmpSize
);
2426 if (!PyString_Check(_obj1
)) {
2427 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2430 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2434 wxPy_BEGIN_ALLOW_THREADS
;
2435 _result
= new wxString (wxImage_GetOption(_arg0
,*_arg1
));
2437 wxPy_END_ALLOW_THREADS
;
2438 if (PyErr_Occurred()) return NULL
;
2440 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
2452 #define wxImage_GetOptionInt(_swigobj,_swigarg0) (_swigobj->GetOptionInt(_swigarg0))
2453 static PyObject
*_wrap_wxImage_GetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2454 PyObject
* _resultobj
;
2458 PyObject
* _argo0
= 0;
2459 PyObject
* _obj1
= 0;
2460 char *_kwnames
[] = { "self","name", NULL
};
2463 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOptionInt",_kwnames
,&_argo0
,&_obj1
))
2466 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2467 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2468 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOptionInt. Expected _wxImage_p.");
2473 #if PYTHON_API_VERSION >= 1009
2474 char* tmpPtr
; int tmpSize
;
2475 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2476 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2479 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2481 _arg1
= new wxString(tmpPtr
, tmpSize
);
2483 if (!PyString_Check(_obj1
)) {
2484 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2487 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2491 wxPy_BEGIN_ALLOW_THREADS
;
2492 _result
= (int )wxImage_GetOptionInt(_arg0
,*_arg1
);
2494 wxPy_END_ALLOW_THREADS
;
2495 if (PyErr_Occurred()) return NULL
;
2496 } _resultobj
= Py_BuildValue("i",_result
);
2504 #define wxImage_HasOption(_swigobj,_swigarg0) (_swigobj->HasOption(_swigarg0))
2505 static PyObject
*_wrap_wxImage_HasOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2506 PyObject
* _resultobj
;
2510 PyObject
* _argo0
= 0;
2511 PyObject
* _obj1
= 0;
2512 char *_kwnames
[] = { "self","name", NULL
};
2515 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_HasOption",_kwnames
,&_argo0
,&_obj1
))
2518 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2519 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2520 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasOption. Expected _wxImage_p.");
2525 #if PYTHON_API_VERSION >= 1009
2526 char* tmpPtr
; int tmpSize
;
2527 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2528 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2531 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2533 _arg1
= new wxString(tmpPtr
, tmpSize
);
2535 if (!PyString_Check(_obj1
)) {
2536 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2539 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2543 wxPy_BEGIN_ALLOW_THREADS
;
2544 _result
= (bool )wxImage_HasOption(_arg0
,*_arg1
);
2546 wxPy_END_ALLOW_THREADS
;
2547 if (PyErr_Occurred()) return NULL
;
2548 } _resultobj
= Py_BuildValue("i",_result
);
2556 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
2557 static PyObject
*_wrap_wxImage_CountColours(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2558 PyObject
* _resultobj
;
2559 unsigned long _result
;
2561 unsigned long _arg1
= (unsigned long ) (unsigned long)-1;
2562 PyObject
* _argo0
= 0;
2563 char *_kwnames
[] = { "self","stopafter", NULL
};
2566 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_CountColours",_kwnames
,&_argo0
,&_arg1
))
2569 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2570 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2571 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
2576 wxPy_BEGIN_ALLOW_THREADS
;
2577 _result
= (unsigned long )wxImage_CountColours(_arg0
,_arg1
);
2579 wxPy_END_ALLOW_THREADS
;
2580 if (PyErr_Occurred()) return NULL
;
2581 } _resultobj
= Py_BuildValue("l",_result
);
2585 static PyObject
*_wrap_wxImage_AddHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2586 PyObject
* _resultobj
;
2587 wxImageHandler
* _arg0
;
2588 PyObject
* _argo0
= 0;
2589 char *_kwnames
[] = { "handler", NULL
};
2592 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_AddHandler",_kwnames
,&_argo0
))
2595 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2596 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
2597 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
2602 wxPy_BEGIN_ALLOW_THREADS
;
2603 wxImage::AddHandler(_arg0
);
2605 wxPy_END_ALLOW_THREADS
;
2606 if (PyErr_Occurred()) return NULL
;
2607 } Py_INCREF(Py_None
);
2608 _resultobj
= Py_None
;
2612 static PyObject
*_wrap_wxImage_InsertHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2613 PyObject
* _resultobj
;
2614 wxImageHandler
* _arg0
;
2615 PyObject
* _argo0
= 0;
2616 char *_kwnames
[] = { "handler", NULL
};
2619 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_InsertHandler",_kwnames
,&_argo0
))
2622 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2623 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
2624 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
2629 wxPy_BEGIN_ALLOW_THREADS
;
2630 wxImage::InsertHandler(_arg0
);
2632 wxPy_END_ALLOW_THREADS
;
2633 if (PyErr_Occurred()) return NULL
;
2634 } Py_INCREF(Py_None
);
2635 _resultobj
= Py_None
;
2639 static PyObject
*_wrap_wxImage_RemoveHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2640 PyObject
* _resultobj
;
2643 PyObject
* _obj0
= 0;
2644 char *_kwnames
[] = { "name", NULL
};
2647 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_RemoveHandler",_kwnames
,&_obj0
))
2650 #if PYTHON_API_VERSION >= 1009
2651 char* tmpPtr
; int tmpSize
;
2652 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
2653 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2656 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
2658 _arg0
= new wxString(tmpPtr
, tmpSize
);
2660 if (!PyString_Check(_obj0
)) {
2661 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2664 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
2668 wxPy_BEGIN_ALLOW_THREADS
;
2669 _result
= (bool )wxImage::RemoveHandler(*_arg0
);
2671 wxPy_END_ALLOW_THREADS
;
2672 if (PyErr_Occurred()) return NULL
;
2673 } _resultobj
= Py_BuildValue("i",_result
);
2681 static PyMethodDef imagecMethods
[] = {
2682 { "wxImage_RemoveHandler", (PyCFunction
) _wrap_wxImage_RemoveHandler
, METH_VARARGS
| METH_KEYWORDS
},
2683 { "wxImage_InsertHandler", (PyCFunction
) _wrap_wxImage_InsertHandler
, METH_VARARGS
| METH_KEYWORDS
},
2684 { "wxImage_AddHandler", (PyCFunction
) _wrap_wxImage_AddHandler
, METH_VARARGS
| METH_KEYWORDS
},
2685 { "wxImage_CountColours", (PyCFunction
) _wrap_wxImage_CountColours
, METH_VARARGS
| METH_KEYWORDS
},
2686 { "wxImage_HasOption", (PyCFunction
) _wrap_wxImage_HasOption
, METH_VARARGS
| METH_KEYWORDS
},
2687 { "wxImage_GetOptionInt", (PyCFunction
) _wrap_wxImage_GetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
2688 { "wxImage_GetOption", (PyCFunction
) _wrap_wxImage_GetOption
, METH_VARARGS
| METH_KEYWORDS
},
2689 { "wxImage_SetOptionInt", (PyCFunction
) _wrap_wxImage_SetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
2690 { "wxImage_SetOption", (PyCFunction
) _wrap_wxImage_SetOption
, METH_VARARGS
| METH_KEYWORDS
},
2691 { "wxImage_ConvertToMono", (PyCFunction
) _wrap_wxImage_ConvertToMono
, METH_VARARGS
| METH_KEYWORDS
},
2692 { "wxImage_Replace", (PyCFunction
) _wrap_wxImage_Replace
, METH_VARARGS
| METH_KEYWORDS
},
2693 { "wxImage_Mirror", (PyCFunction
) _wrap_wxImage_Mirror
, METH_VARARGS
| METH_KEYWORDS
},
2694 { "wxImage_Rotate90", (PyCFunction
) _wrap_wxImage_Rotate90
, METH_VARARGS
| METH_KEYWORDS
},
2695 { "wxImage_Rotate", (PyCFunction
) _wrap_wxImage_Rotate
, METH_VARARGS
| METH_KEYWORDS
},
2696 { "wxImage_HasMask", (PyCFunction
) _wrap_wxImage_HasMask
, METH_VARARGS
| METH_KEYWORDS
},
2697 { "wxImage_SetMask", (PyCFunction
) _wrap_wxImage_SetMask
, METH_VARARGS
| METH_KEYWORDS
},
2698 { "wxImage_GetMaskBlue", (PyCFunction
) _wrap_wxImage_GetMaskBlue
, METH_VARARGS
| METH_KEYWORDS
},
2699 { "wxImage_GetMaskGreen", (PyCFunction
) _wrap_wxImage_GetMaskGreen
, METH_VARARGS
| METH_KEYWORDS
},
2700 { "wxImage_GetMaskRed", (PyCFunction
) _wrap_wxImage_GetMaskRed
, METH_VARARGS
| METH_KEYWORDS
},
2701 { "wxImage_SetMaskColour", (PyCFunction
) _wrap_wxImage_SetMaskColour
, METH_VARARGS
| METH_KEYWORDS
},
2702 { "wxImage_SetData", (PyCFunction
) _wrap_wxImage_SetData
, METH_VARARGS
| METH_KEYWORDS
},
2703 { "wxImage_GetData", (PyCFunction
) _wrap_wxImage_GetData
, METH_VARARGS
| METH_KEYWORDS
},
2704 { "wxImage_Paste", (PyCFunction
) _wrap_wxImage_Paste
, METH_VARARGS
| METH_KEYWORDS
},
2705 { "wxImage_Copy", (PyCFunction
) _wrap_wxImage_Copy
, METH_VARARGS
| METH_KEYWORDS
},
2706 { "wxImage_GetSubImage", (PyCFunction
) _wrap_wxImage_GetSubImage
, METH_VARARGS
| METH_KEYWORDS
},
2707 { "wxImage_GetHeight", (PyCFunction
) _wrap_wxImage_GetHeight
, METH_VARARGS
| METH_KEYWORDS
},
2708 { "wxImage_GetWidth", (PyCFunction
) _wrap_wxImage_GetWidth
, METH_VARARGS
| METH_KEYWORDS
},
2709 { "wxImage_Ok", (PyCFunction
) _wrap_wxImage_Ok
, METH_VARARGS
| METH_KEYWORDS
},
2710 { "wxImage_SaveMimeFile", (PyCFunction
) _wrap_wxImage_SaveMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
2711 { "wxImage_SaveFile", (PyCFunction
) _wrap_wxImage_SaveFile
, METH_VARARGS
| METH_KEYWORDS
},
2712 { "wxImage_LoadMimeFile", (PyCFunction
) _wrap_wxImage_LoadMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
2713 { "wxImage_LoadFile", (PyCFunction
) _wrap_wxImage_LoadFile
, METH_VARARGS
| METH_KEYWORDS
},
2714 { "wxImage_CanRead", (PyCFunction
) _wrap_wxImage_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
2715 { "wxImage_GetBlue", (PyCFunction
) _wrap_wxImage_GetBlue
, METH_VARARGS
| METH_KEYWORDS
},
2716 { "wxImage_GetGreen", (PyCFunction
) _wrap_wxImage_GetGreen
, METH_VARARGS
| METH_KEYWORDS
},
2717 { "wxImage_GetRed", (PyCFunction
) _wrap_wxImage_GetRed
, METH_VARARGS
| METH_KEYWORDS
},
2718 { "wxImage_SetRGB", (PyCFunction
) _wrap_wxImage_SetRGB
, METH_VARARGS
| METH_KEYWORDS
},
2719 { "wxImage_Rescale", (PyCFunction
) _wrap_wxImage_Rescale
, METH_VARARGS
| METH_KEYWORDS
},
2720 { "wxImage_Scale", (PyCFunction
) _wrap_wxImage_Scale
, METH_VARARGS
| METH_KEYWORDS
},
2721 { "wxImage_Destroy", (PyCFunction
) _wrap_wxImage_Destroy
, METH_VARARGS
| METH_KEYWORDS
},
2722 { "wxImage_Create", (PyCFunction
) _wrap_wxImage_Create
, METH_VARARGS
| METH_KEYWORDS
},
2723 { "wxImage_ConvertToMonoBitmap", (PyCFunction
) _wrap_wxImage_ConvertToMonoBitmap
, METH_VARARGS
| METH_KEYWORDS
},
2724 { "wxImage_ConvertToBitmap", (PyCFunction
) _wrap_wxImage_ConvertToBitmap
, METH_VARARGS
| METH_KEYWORDS
},
2725 { "delete_wxImage", (PyCFunction
) _wrap_delete_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
2726 { "new_wxImage", (PyCFunction
) _wrap_new_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
2727 { "new_wxTIFFHandler", (PyCFunction
) _wrap_new_wxTIFFHandler
, METH_VARARGS
| METH_KEYWORDS
},
2728 { "new_wxPCXHandler", (PyCFunction
) _wrap_new_wxPCXHandler
, METH_VARARGS
| METH_KEYWORDS
},
2729 { "new_wxPNMHandler", (PyCFunction
) _wrap_new_wxPNMHandler
, METH_VARARGS
| METH_KEYWORDS
},
2730 { "new_wxGIFHandler", (PyCFunction
) _wrap_new_wxGIFHandler
, METH_VARARGS
| METH_KEYWORDS
},
2731 { "new_wxBMPHandler", (PyCFunction
) _wrap_new_wxBMPHandler
, METH_VARARGS
| METH_KEYWORDS
},
2732 { "new_wxJPEGHandler", (PyCFunction
) _wrap_new_wxJPEGHandler
, METH_VARARGS
| METH_KEYWORDS
},
2733 { "new_wxPNGHandler", (PyCFunction
) _wrap_new_wxPNGHandler
, METH_VARARGS
| METH_KEYWORDS
},
2734 { "wxImageHandler_SetMimeType", (PyCFunction
) _wrap_wxImageHandler_SetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
2735 { "wxImageHandler_SetType", (PyCFunction
) _wrap_wxImageHandler_SetType
, METH_VARARGS
| METH_KEYWORDS
},
2736 { "wxImageHandler_SetExtension", (PyCFunction
) _wrap_wxImageHandler_SetExtension
, METH_VARARGS
| METH_KEYWORDS
},
2737 { "wxImageHandler_SetName", (PyCFunction
) _wrap_wxImageHandler_SetName
, METH_VARARGS
| METH_KEYWORDS
},
2738 { "wxImageHandler_GetMimeType", (PyCFunction
) _wrap_wxImageHandler_GetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
2739 { "wxImageHandler_GetType", (PyCFunction
) _wrap_wxImageHandler_GetType
, METH_VARARGS
| METH_KEYWORDS
},
2740 { "wxImageHandler_GetExtension", (PyCFunction
) _wrap_wxImageHandler_GetExtension
, METH_VARARGS
| METH_KEYWORDS
},
2741 { "wxImageHandler_GetName", (PyCFunction
) _wrap_wxImageHandler_GetName
, METH_VARARGS
| METH_KEYWORDS
},
2742 { "wxBitmapFromImage", (PyCFunction
) _wrap_wxBitmapFromImage
, METH_VARARGS
| METH_KEYWORDS
},
2743 { "wxInitAllImageHandlers", (PyCFunction
) _wrap_wxInitAllImageHandlers
, METH_VARARGS
| METH_KEYWORDS
},
2744 { "wxImageFromBitmap", (PyCFunction
) _wrap_wxImageFromBitmap
, METH_VARARGS
| METH_KEYWORDS
},
2745 { "wxImageFromMime", (PyCFunction
) _wrap_wxImageFromMime
, METH_VARARGS
| METH_KEYWORDS
},
2746 { "wxEmptyImage", (PyCFunction
) _wrap_wxEmptyImage
, METH_VARARGS
| METH_KEYWORDS
},
2753 * This table is used by the pointer type-checker
2755 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
2756 { "_signed_long","_long",0},
2757 { "_wxPrintQuality","_wxCoord",0},
2758 { "_wxPrintQuality","_int",0},
2759 { "_wxPrintQuality","_signed_int",0},
2760 { "_wxPrintQuality","_unsigned_int",0},
2761 { "_wxPrintQuality","_wxWindowID",0},
2762 { "_wxPrintQuality","_uint",0},
2763 { "_wxPrintQuality","_EBool",0},
2764 { "_wxPrintQuality","_size_t",0},
2765 { "_wxPrintQuality","_time_t",0},
2766 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler
},
2767 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler
},
2768 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler
},
2769 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler
},
2770 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler
},
2771 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler
},
2772 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler
},
2773 { "_byte","_unsigned_char",0},
2774 { "_long","_unsigned_long",0},
2775 { "_long","_signed_long",0},
2776 { "_size_t","_wxCoord",0},
2777 { "_size_t","_wxPrintQuality",0},
2778 { "_size_t","_time_t",0},
2779 { "_size_t","_unsigned_int",0},
2780 { "_size_t","_int",0},
2781 { "_size_t","_wxWindowID",0},
2782 { "_size_t","_uint",0},
2783 { "_uint","_wxCoord",0},
2784 { "_uint","_wxPrintQuality",0},
2785 { "_uint","_time_t",0},
2786 { "_uint","_size_t",0},
2787 { "_uint","_unsigned_int",0},
2788 { "_uint","_int",0},
2789 { "_uint","_wxWindowID",0},
2790 { "_wxChar","_char",0},
2791 { "_char","_wxChar",0},
2792 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
2793 { "_EBool","_wxCoord",0},
2794 { "_EBool","_wxPrintQuality",0},
2795 { "_EBool","_signed_int",0},
2796 { "_EBool","_int",0},
2797 { "_EBool","_wxWindowID",0},
2798 { "_unsigned_long","_long",0},
2799 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
2800 { "_signed_int","_wxCoord",0},
2801 { "_signed_int","_wxPrintQuality",0},
2802 { "_signed_int","_EBool",0},
2803 { "_signed_int","_wxWindowID",0},
2804 { "_signed_int","_int",0},
2805 { "_WXTYPE","_short",0},
2806 { "_WXTYPE","_signed_short",0},
2807 { "_WXTYPE","_unsigned_short",0},
2808 { "_unsigned_short","_WXTYPE",0},
2809 { "_unsigned_short","_short",0},
2810 { "_wxObject","_wxImage",SwigwxImageTowxObject
},
2811 { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject
},
2812 { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject
},
2813 { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject
},
2814 { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject
},
2815 { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject
},
2816 { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject
},
2817 { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject
},
2818 { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject
},
2819 { "_signed_short","_WXTYPE",0},
2820 { "_signed_short","_short",0},
2821 { "_unsigned_char","_byte",0},
2822 { "_unsigned_int","_wxCoord",0},
2823 { "_unsigned_int","_wxPrintQuality",0},
2824 { "_unsigned_int","_time_t",0},
2825 { "_unsigned_int","_size_t",0},
2826 { "_unsigned_int","_uint",0},
2827 { "_unsigned_int","_wxWindowID",0},
2828 { "_unsigned_int","_int",0},
2829 { "_short","_WXTYPE",0},
2830 { "_short","_unsigned_short",0},
2831 { "_short","_signed_short",0},
2832 { "_wxWindowID","_wxCoord",0},
2833 { "_wxWindowID","_wxPrintQuality",0},
2834 { "_wxWindowID","_time_t",0},
2835 { "_wxWindowID","_size_t",0},
2836 { "_wxWindowID","_EBool",0},
2837 { "_wxWindowID","_uint",0},
2838 { "_wxWindowID","_int",0},
2839 { "_wxWindowID","_signed_int",0},
2840 { "_wxWindowID","_unsigned_int",0},
2841 { "_int","_wxCoord",0},
2842 { "_int","_wxPrintQuality",0},
2843 { "_int","_time_t",0},
2844 { "_int","_size_t",0},
2845 { "_int","_EBool",0},
2846 { "_int","_uint",0},
2847 { "_int","_wxWindowID",0},
2848 { "_int","_unsigned_int",0},
2849 { "_int","_signed_int",0},
2850 { "_time_t","_wxCoord",0},
2851 { "_time_t","_wxPrintQuality",0},
2852 { "_time_t","_unsigned_int",0},
2853 { "_time_t","_int",0},
2854 { "_time_t","_wxWindowID",0},
2855 { "_time_t","_uint",0},
2856 { "_time_t","_size_t",0},
2857 { "_wxCoord","_int",0},
2858 { "_wxCoord","_signed_int",0},
2859 { "_wxCoord","_unsigned_int",0},
2860 { "_wxCoord","_wxWindowID",0},
2861 { "_wxCoord","_uint",0},
2862 { "_wxCoord","_EBool",0},
2863 { "_wxCoord","_size_t",0},
2864 { "_wxCoord","_time_t",0},
2865 { "_wxCoord","_wxPrintQuality",0},
2868 static PyObject
*SWIG_globals
;
2872 SWIGEXPORT(void) initimagec() {
2874 SWIG_globals
= SWIG_newvarlink();
2875 m
= Py_InitModule("imagec", imagecMethods
);
2876 d
= PyModule_GetDict(m
);
2877 PyDict_SetItemString(d
,"cvar", SWIG_globals
);
2878 SWIG_addvarlink(SWIG_globals
,"wxNullImage",_wrap_wxNullImage_get
, _wrap_wxNullImage_set
);
2881 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
2882 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);