2 * FILE : src/msw/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
);
102 wxImage
* wxImageFromMime(const wxString
& name
, const wxString
& mimetype
, int index
) {
103 return new wxImage(name
, mimetype
, index
);
107 wxImage
* wxImageFromBitmap(const wxBitmap
&bitmap
) {
108 return new wxImage(bitmap
);
112 wxImage
* wxImageFromData(int width
, int height
, unsigned char* data
) {
113 // Copy the source data so the wxImage can clean it up later
114 unsigned char* copy
= (unsigned char*)malloc(width
*height
*3);
119 memcpy(copy
, data
, width
*height
*3);
120 return new wxImage(width
, height
, copy
, FALSE
);
124 wxImage
* wxImageFromStream(wxInputStream
& stream
,
125 long type
= wxBITMAP_TYPE_ANY
, int index
= -1) {
126 return new wxImage(stream
, type
, index
);
130 wxImage
* wxImageFromStreamMime(wxInputStream
& stream
,
131 const wxString
& mimetype
, int index
= -1 ) {
132 return new wxImage(stream
, mimetype
, index
);
136 extern wxImage wxNullImage
;
140 wxBitmap
* wxBitmapFromImage(const wxImage
& img
, int depth
=-1) {
141 return new wxBitmap(img
, depth
);
147 static PyObject
*_wrap_wxEmptyImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
148 PyObject
* _resultobj
;
150 int _arg0
= (int ) 0;
151 int _arg1
= (int ) 0;
152 char *_kwnames
[] = { "width","height", NULL
};
156 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"|ii:wxEmptyImage",_kwnames
,&_arg0
,&_arg1
))
159 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
160 _result
= (wxImage
*)wxEmptyImage(_arg0
,_arg1
);
162 wxPyEndAllowThreads(__tstate
);
163 if (PyErr_Occurred()) return NULL
;
165 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
166 _resultobj
= Py_BuildValue("s",_ptemp
);
169 _resultobj
= Py_None
;
174 static PyObject
*_wrap_wxImageFromMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
175 PyObject
* _resultobj
;
179 int _arg2
= (int ) -1;
180 PyObject
* _obj0
= 0;
181 PyObject
* _obj1
= 0;
182 char *_kwnames
[] = { "name","mimetype","index", NULL
};
186 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
189 #if PYTHON_API_VERSION >= 1009
190 char* tmpPtr
; int tmpSize
;
191 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
192 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
195 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
197 _arg0
= new wxString(tmpPtr
, tmpSize
);
199 if (!PyString_Check(_obj0
)) {
200 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
203 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
207 #if PYTHON_API_VERSION >= 1009
208 char* tmpPtr
; int tmpSize
;
209 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
210 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
213 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
215 _arg1
= new wxString(tmpPtr
, tmpSize
);
217 if (!PyString_Check(_obj1
)) {
218 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
221 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
225 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
226 _result
= (wxImage
*)wxImageFromMime(*_arg0
,*_arg1
,_arg2
);
228 wxPyEndAllowThreads(__tstate
);
229 if (PyErr_Occurred()) return NULL
;
231 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
232 _resultobj
= Py_BuildValue("s",_ptemp
);
235 _resultobj
= Py_None
;
248 static PyObject
*_wrap_wxImageFromBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
249 PyObject
* _resultobj
;
252 PyObject
* _argo0
= 0;
253 char *_kwnames
[] = { "bitmap", NULL
};
257 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageFromBitmap",_kwnames
,&_argo0
))
260 if (_argo0
== Py_None
) { _arg0
= NULL
; }
261 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxBitmap_p")) {
262 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
267 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
268 _result
= (wxImage
*)wxImageFromBitmap(*_arg0
);
270 wxPyEndAllowThreads(__tstate
);
271 if (PyErr_Occurred()) return NULL
;
273 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
274 _resultobj
= Py_BuildValue("s",_ptemp
);
277 _resultobj
= Py_None
;
282 static PyObject
*_wrap_wxImageFromData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
283 PyObject
* _resultobj
;
287 unsigned char * _arg2
;
288 PyObject
* _argo2
= 0;
289 char *_kwnames
[] = { "width","height","data", NULL
};
293 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iiO:wxImageFromData",_kwnames
,&_arg0
,&_arg1
,&_argo2
))
296 if (_argo2
== Py_None
) { _arg2
= NULL
; }
297 else if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_unsigned_char_p")) {
298 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of wxImageFromData. Expected _unsigned_char_p.");
303 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
304 _result
= (wxImage
*)wxImageFromData(_arg0
,_arg1
,_arg2
);
306 wxPyEndAllowThreads(__tstate
);
307 if (PyErr_Occurred()) return NULL
;
309 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
310 _resultobj
= Py_BuildValue("s",_ptemp
);
313 _resultobj
= Py_None
;
318 static PyObject
*_wrap_wxImageFromStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
319 PyObject
* _resultobj
;
321 wxInputStream
* _arg0
;
322 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
323 int _arg2
= (int ) -1;
324 wxPyInputStream
* temp
;
326 PyObject
* _obj0
= 0;
327 char *_kwnames
[] = { "stream","type","index", NULL
};
331 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:wxImageFromStream",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
334 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
335 _arg0
= temp
->m_wxis
;
338 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
340 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
347 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
348 _result
= (wxImage
*)wxImageFromStream(*_arg0
,_arg1
,_arg2
);
350 wxPyEndAllowThreads(__tstate
);
351 if (PyErr_Occurred()) return NULL
;
353 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
354 _resultobj
= Py_BuildValue("s",_ptemp
);
357 _resultobj
= Py_None
;
366 static PyObject
*_wrap_wxImageFromStreamMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
367 PyObject
* _resultobj
;
369 wxInputStream
* _arg0
;
371 int _arg2
= (int ) -1;
372 wxPyInputStream
* temp
;
374 PyObject
* _obj0
= 0;
375 PyObject
* _obj1
= 0;
376 char *_kwnames
[] = { "stream","mimetype","index", NULL
};
380 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromStreamMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
383 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
384 _arg0
= temp
->m_wxis
;
387 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
389 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
396 #if PYTHON_API_VERSION >= 1009
397 char* tmpPtr
; int tmpSize
;
398 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
399 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
402 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
404 _arg1
= new wxString(tmpPtr
, tmpSize
);
406 if (!PyString_Check(_obj1
)) {
407 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
410 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
414 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
415 _result
= (wxImage
*)wxImageFromStreamMime(*_arg0
,*_arg1
,_arg2
);
417 wxPyEndAllowThreads(__tstate
);
418 if (PyErr_Occurred()) return NULL
;
420 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
421 _resultobj
= Py_BuildValue("s",_ptemp
);
424 _resultobj
= Py_None
;
437 static PyObject
*_wrap_wxInitAllImageHandlers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
438 PyObject
* _resultobj
;
439 char *_kwnames
[] = { NULL
};
442 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":wxInitAllImageHandlers",_kwnames
))
445 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
446 wxInitAllImageHandlers();
448 wxPyEndAllowThreads(__tstate
);
449 if (PyErr_Occurred()) return NULL
;
450 } Py_INCREF(Py_None
);
451 _resultobj
= Py_None
;
455 static int _wrap_wxNullImage_set(PyObject
*val
) {
457 PyErr_SetString(PyExc_TypeError
,"Variable wxNullImage is read-only.");
461 static PyObject
*_wrap_wxNullImage_get() {
465 SWIG_MakePtr(ptemp
,(char *) &wxNullImage
,"_wxImage_p");
466 pyobj
= PyString_FromString(ptemp
);
470 static PyObject
*_wrap_wxBitmapFromImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
471 PyObject
* _resultobj
;
474 int _arg1
= (int ) -1;
475 PyObject
* _argo0
= 0;
476 char *_kwnames
[] = { "img","depth", NULL
};
480 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxBitmapFromImage",_kwnames
,&_argo0
,&_arg1
))
483 if (_argo0
== Py_None
) { _arg0
= NULL
; }
484 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
485 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
490 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
491 _result
= (wxBitmap
*)wxBitmapFromImage(*_arg0
,_arg1
);
493 wxPyEndAllowThreads(__tstate
);
494 if (PyErr_Occurred()) return NULL
;
496 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBitmap_p");
497 _resultobj
= Py_BuildValue("s",_ptemp
);
500 _resultobj
= Py_None
;
505 static void *SwigwxImageHandlerTowxObject(void *ptr
) {
508 src
= (wxImageHandler
*) ptr
;
509 dest
= (wxObject
*) src
;
510 return (void *) dest
;
513 #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
514 static PyObject
*_wrap_wxImageHandler_GetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
515 PyObject
* _resultobj
;
517 wxImageHandler
* _arg0
;
518 PyObject
* _argo0
= 0;
519 char *_kwnames
[] = { "self", NULL
};
522 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetName",_kwnames
,&_argo0
))
525 if (_argo0
== Py_None
) { _arg0
= NULL
; }
526 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
527 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetName. Expected _wxImageHandler_p.");
532 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
533 _result
= new wxString (wxImageHandler_GetName(_arg0
));
535 wxPyEndAllowThreads(__tstate
);
536 if (PyErr_Occurred()) return NULL
;
538 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
546 #define wxImageHandler_GetExtension(_swigobj) (_swigobj->GetExtension())
547 static PyObject
*_wrap_wxImageHandler_GetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
548 PyObject
* _resultobj
;
550 wxImageHandler
* _arg0
;
551 PyObject
* _argo0
= 0;
552 char *_kwnames
[] = { "self", NULL
};
555 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetExtension",_kwnames
,&_argo0
))
558 if (_argo0
== Py_None
) { _arg0
= NULL
; }
559 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
560 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetExtension. Expected _wxImageHandler_p.");
565 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
566 _result
= new wxString (wxImageHandler_GetExtension(_arg0
));
568 wxPyEndAllowThreads(__tstate
);
569 if (PyErr_Occurred()) return NULL
;
571 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
579 #define wxImageHandler_GetType(_swigobj) (_swigobj->GetType())
580 static PyObject
*_wrap_wxImageHandler_GetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
581 PyObject
* _resultobj
;
583 wxImageHandler
* _arg0
;
584 PyObject
* _argo0
= 0;
585 char *_kwnames
[] = { "self", NULL
};
588 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetType",_kwnames
,&_argo0
))
591 if (_argo0
== Py_None
) { _arg0
= NULL
; }
592 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
593 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetType. Expected _wxImageHandler_p.");
598 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
599 _result
= (long )wxImageHandler_GetType(_arg0
);
601 wxPyEndAllowThreads(__tstate
);
602 if (PyErr_Occurred()) return NULL
;
603 } _resultobj
= Py_BuildValue("l",_result
);
607 #define wxImageHandler_GetMimeType(_swigobj) (_swigobj->GetMimeType())
608 static PyObject
*_wrap_wxImageHandler_GetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
609 PyObject
* _resultobj
;
611 wxImageHandler
* _arg0
;
612 PyObject
* _argo0
= 0;
613 char *_kwnames
[] = { "self", NULL
};
616 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetMimeType",_kwnames
,&_argo0
))
619 if (_argo0
== Py_None
) { _arg0
= NULL
; }
620 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
621 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetMimeType. Expected _wxImageHandler_p.");
626 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
627 _result
= new wxString (wxImageHandler_GetMimeType(_arg0
));
629 wxPyEndAllowThreads(__tstate
);
630 if (PyErr_Occurred()) return NULL
;
632 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
640 #define wxImageHandler_CanRead(_swigobj,_swigarg0) (_swigobj->CanRead(_swigarg0))
641 static PyObject
*_wrap_wxImageHandler_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
642 PyObject
* _resultobj
;
644 wxImageHandler
* _arg0
;
646 PyObject
* _argo0
= 0;
647 PyObject
* _obj1
= 0;
648 char *_kwnames
[] = { "self","name", NULL
};
651 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_CanRead",_kwnames
,&_argo0
,&_obj1
))
654 if (_argo0
== Py_None
) { _arg0
= NULL
; }
655 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
656 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_CanRead. Expected _wxImageHandler_p.");
661 #if PYTHON_API_VERSION >= 1009
662 char* tmpPtr
; int tmpSize
;
663 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
664 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
667 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
669 _arg1
= new wxString(tmpPtr
, tmpSize
);
671 if (!PyString_Check(_obj1
)) {
672 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
675 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
679 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
680 _result
= (bool )wxImageHandler_CanRead(_arg0
,*_arg1
);
682 wxPyEndAllowThreads(__tstate
);
683 if (PyErr_Occurred()) return NULL
;
684 } _resultobj
= Py_BuildValue("i",_result
);
692 #define wxImageHandler_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
693 static PyObject
*_wrap_wxImageHandler_SetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
694 PyObject
* _resultobj
;
695 wxImageHandler
* _arg0
;
697 PyObject
* _argo0
= 0;
698 PyObject
* _obj1
= 0;
699 char *_kwnames
[] = { "self","name", NULL
};
702 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetName",_kwnames
,&_argo0
,&_obj1
))
705 if (_argo0
== Py_None
) { _arg0
= NULL
; }
706 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
707 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetName. Expected _wxImageHandler_p.");
712 #if PYTHON_API_VERSION >= 1009
713 char* tmpPtr
; int tmpSize
;
714 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
715 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
718 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
720 _arg1
= new wxString(tmpPtr
, tmpSize
);
722 if (!PyString_Check(_obj1
)) {
723 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
726 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
730 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
731 wxImageHandler_SetName(_arg0
,*_arg1
);
733 wxPyEndAllowThreads(__tstate
);
734 if (PyErr_Occurred()) return NULL
;
735 } Py_INCREF(Py_None
);
736 _resultobj
= Py_None
;
744 #define wxImageHandler_SetExtension(_swigobj,_swigarg0) (_swigobj->SetExtension(_swigarg0))
745 static PyObject
*_wrap_wxImageHandler_SetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
746 PyObject
* _resultobj
;
747 wxImageHandler
* _arg0
;
749 PyObject
* _argo0
= 0;
750 PyObject
* _obj1
= 0;
751 char *_kwnames
[] = { "self","extension", NULL
};
754 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetExtension",_kwnames
,&_argo0
,&_obj1
))
757 if (_argo0
== Py_None
) { _arg0
= NULL
; }
758 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
759 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetExtension. Expected _wxImageHandler_p.");
764 #if PYTHON_API_VERSION >= 1009
765 char* tmpPtr
; int tmpSize
;
766 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
767 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
770 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
772 _arg1
= new wxString(tmpPtr
, tmpSize
);
774 if (!PyString_Check(_obj1
)) {
775 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
778 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
782 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
783 wxImageHandler_SetExtension(_arg0
,*_arg1
);
785 wxPyEndAllowThreads(__tstate
);
786 if (PyErr_Occurred()) return NULL
;
787 } Py_INCREF(Py_None
);
788 _resultobj
= Py_None
;
796 #define wxImageHandler_SetType(_swigobj,_swigarg0) (_swigobj->SetType(_swigarg0))
797 static PyObject
*_wrap_wxImageHandler_SetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
798 PyObject
* _resultobj
;
799 wxImageHandler
* _arg0
;
801 PyObject
* _argo0
= 0;
802 char *_kwnames
[] = { "self","type", NULL
};
805 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Ol:wxImageHandler_SetType",_kwnames
,&_argo0
,&_arg1
))
808 if (_argo0
== Py_None
) { _arg0
= NULL
; }
809 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
810 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetType. Expected _wxImageHandler_p.");
815 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
816 wxImageHandler_SetType(_arg0
,_arg1
);
818 wxPyEndAllowThreads(__tstate
);
819 if (PyErr_Occurred()) return NULL
;
820 } Py_INCREF(Py_None
);
821 _resultobj
= Py_None
;
825 #define wxImageHandler_SetMimeType(_swigobj,_swigarg0) (_swigobj->SetMimeType(_swigarg0))
826 static PyObject
*_wrap_wxImageHandler_SetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
827 PyObject
* _resultobj
;
828 wxImageHandler
* _arg0
;
830 PyObject
* _argo0
= 0;
831 PyObject
* _obj1
= 0;
832 char *_kwnames
[] = { "self","mimetype", NULL
};
835 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetMimeType",_kwnames
,&_argo0
,&_obj1
))
838 if (_argo0
== Py_None
) { _arg0
= NULL
; }
839 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
840 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetMimeType. Expected _wxImageHandler_p.");
845 #if PYTHON_API_VERSION >= 1009
846 char* tmpPtr
; int tmpSize
;
847 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
848 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
851 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
853 _arg1
= new wxString(tmpPtr
, tmpSize
);
855 if (!PyString_Check(_obj1
)) {
856 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
859 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
863 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
864 wxImageHandler_SetMimeType(_arg0
,*_arg1
);
866 wxPyEndAllowThreads(__tstate
);
867 if (PyErr_Occurred()) return NULL
;
868 } Py_INCREF(Py_None
);
869 _resultobj
= Py_None
;
877 static void *SwigwxPNGHandlerTowxImageHandler(void *ptr
) {
879 wxImageHandler
*dest
;
880 src
= (wxPNGHandler
*) ptr
;
881 dest
= (wxImageHandler
*) src
;
882 return (void *) dest
;
885 static void *SwigwxPNGHandlerTowxObject(void *ptr
) {
888 src
= (wxPNGHandler
*) ptr
;
889 dest
= (wxObject
*) src
;
890 return (void *) dest
;
893 #define new_wxPNGHandler() (new wxPNGHandler())
894 static PyObject
*_wrap_new_wxPNGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
895 PyObject
* _resultobj
;
896 wxPNGHandler
* _result
;
897 char *_kwnames
[] = { NULL
};
901 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNGHandler",_kwnames
))
904 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
905 _result
= (wxPNGHandler
*)new_wxPNGHandler();
907 wxPyEndAllowThreads(__tstate
);
908 if (PyErr_Occurred()) return NULL
;
910 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNGHandler_p");
911 _resultobj
= Py_BuildValue("s",_ptemp
);
914 _resultobj
= Py_None
;
919 static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr
) {
921 wxImageHandler
*dest
;
922 src
= (wxJPEGHandler
*) ptr
;
923 dest
= (wxImageHandler
*) src
;
924 return (void *) dest
;
927 static void *SwigwxJPEGHandlerTowxObject(void *ptr
) {
930 src
= (wxJPEGHandler
*) ptr
;
931 dest
= (wxObject
*) src
;
932 return (void *) dest
;
935 #define new_wxJPEGHandler() (new wxJPEGHandler())
936 static PyObject
*_wrap_new_wxJPEGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
937 PyObject
* _resultobj
;
938 wxJPEGHandler
* _result
;
939 char *_kwnames
[] = { NULL
};
943 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxJPEGHandler",_kwnames
))
946 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
947 _result
= (wxJPEGHandler
*)new_wxJPEGHandler();
949 wxPyEndAllowThreads(__tstate
);
950 if (PyErr_Occurred()) return NULL
;
952 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxJPEGHandler_p");
953 _resultobj
= Py_BuildValue("s",_ptemp
);
956 _resultobj
= Py_None
;
961 static void *SwigwxBMPHandlerTowxImageHandler(void *ptr
) {
963 wxImageHandler
*dest
;
964 src
= (wxBMPHandler
*) ptr
;
965 dest
= (wxImageHandler
*) src
;
966 return (void *) dest
;
969 static void *SwigwxBMPHandlerTowxObject(void *ptr
) {
972 src
= (wxBMPHandler
*) ptr
;
973 dest
= (wxObject
*) src
;
974 return (void *) dest
;
977 #define new_wxBMPHandler() (new wxBMPHandler())
978 static PyObject
*_wrap_new_wxBMPHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
979 PyObject
* _resultobj
;
980 wxBMPHandler
* _result
;
981 char *_kwnames
[] = { NULL
};
985 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxBMPHandler",_kwnames
))
988 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
989 _result
= (wxBMPHandler
*)new_wxBMPHandler();
991 wxPyEndAllowThreads(__tstate
);
992 if (PyErr_Occurred()) return NULL
;
994 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBMPHandler_p");
995 _resultobj
= Py_BuildValue("s",_ptemp
);
998 _resultobj
= Py_None
;
1003 static void *SwigwxICOHandlerTowxBMPHandler(void *ptr
) {
1006 src
= (wxICOHandler
*) ptr
;
1007 dest
= (wxBMPHandler
*) src
;
1008 return (void *) dest
;
1011 static void *SwigwxICOHandlerTowxImageHandler(void *ptr
) {
1013 wxImageHandler
*dest
;
1014 src
= (wxICOHandler
*) ptr
;
1015 dest
= (wxImageHandler
*) src
;
1016 return (void *) dest
;
1019 static void *SwigwxICOHandlerTowxObject(void *ptr
) {
1022 src
= (wxICOHandler
*) ptr
;
1023 dest
= (wxObject
*) src
;
1024 return (void *) dest
;
1027 #define new_wxICOHandler() (new wxICOHandler())
1028 static PyObject
*_wrap_new_wxICOHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1029 PyObject
* _resultobj
;
1030 wxICOHandler
* _result
;
1031 char *_kwnames
[] = { NULL
};
1035 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxICOHandler",_kwnames
))
1038 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1039 _result
= (wxICOHandler
*)new_wxICOHandler();
1041 wxPyEndAllowThreads(__tstate
);
1042 if (PyErr_Occurred()) return NULL
;
1044 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxICOHandler_p");
1045 _resultobj
= Py_BuildValue("s",_ptemp
);
1048 _resultobj
= Py_None
;
1053 static void *SwigwxCURHandlerTowxICOHandler(void *ptr
) {
1056 src
= (wxCURHandler
*) ptr
;
1057 dest
= (wxICOHandler
*) src
;
1058 return (void *) dest
;
1061 static void *SwigwxCURHandlerTowxBMPHandler(void *ptr
) {
1064 src
= (wxCURHandler
*) ptr
;
1065 dest
= (wxBMPHandler
*) src
;
1066 return (void *) dest
;
1069 static void *SwigwxCURHandlerTowxImageHandler(void *ptr
) {
1071 wxImageHandler
*dest
;
1072 src
= (wxCURHandler
*) ptr
;
1073 dest
= (wxImageHandler
*) src
;
1074 return (void *) dest
;
1077 static void *SwigwxCURHandlerTowxObject(void *ptr
) {
1080 src
= (wxCURHandler
*) ptr
;
1081 dest
= (wxObject
*) src
;
1082 return (void *) dest
;
1085 #define new_wxCURHandler() (new wxCURHandler())
1086 static PyObject
*_wrap_new_wxCURHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1087 PyObject
* _resultobj
;
1088 wxCURHandler
* _result
;
1089 char *_kwnames
[] = { NULL
};
1093 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxCURHandler",_kwnames
))
1096 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1097 _result
= (wxCURHandler
*)new_wxCURHandler();
1099 wxPyEndAllowThreads(__tstate
);
1100 if (PyErr_Occurred()) return NULL
;
1102 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxCURHandler_p");
1103 _resultobj
= Py_BuildValue("s",_ptemp
);
1106 _resultobj
= Py_None
;
1111 static void *SwigwxANIHandlerTowxCURHandler(void *ptr
) {
1114 src
= (wxANIHandler
*) ptr
;
1115 dest
= (wxCURHandler
*) src
;
1116 return (void *) dest
;
1119 static void *SwigwxANIHandlerTowxICOHandler(void *ptr
) {
1122 src
= (wxANIHandler
*) ptr
;
1123 dest
= (wxICOHandler
*) src
;
1124 return (void *) dest
;
1127 static void *SwigwxANIHandlerTowxBMPHandler(void *ptr
) {
1130 src
= (wxANIHandler
*) ptr
;
1131 dest
= (wxBMPHandler
*) src
;
1132 return (void *) dest
;
1135 static void *SwigwxANIHandlerTowxImageHandler(void *ptr
) {
1137 wxImageHandler
*dest
;
1138 src
= (wxANIHandler
*) ptr
;
1139 dest
= (wxImageHandler
*) src
;
1140 return (void *) dest
;
1143 static void *SwigwxANIHandlerTowxObject(void *ptr
) {
1146 src
= (wxANIHandler
*) ptr
;
1147 dest
= (wxObject
*) src
;
1148 return (void *) dest
;
1151 #define new_wxANIHandler() (new wxANIHandler())
1152 static PyObject
*_wrap_new_wxANIHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1153 PyObject
* _resultobj
;
1154 wxANIHandler
* _result
;
1155 char *_kwnames
[] = { NULL
};
1159 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxANIHandler",_kwnames
))
1162 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1163 _result
= (wxANIHandler
*)new_wxANIHandler();
1165 wxPyEndAllowThreads(__tstate
);
1166 if (PyErr_Occurred()) return NULL
;
1168 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxANIHandler_p");
1169 _resultobj
= Py_BuildValue("s",_ptemp
);
1172 _resultobj
= Py_None
;
1177 static void *SwigwxGIFHandlerTowxImageHandler(void *ptr
) {
1179 wxImageHandler
*dest
;
1180 src
= (wxGIFHandler
*) ptr
;
1181 dest
= (wxImageHandler
*) src
;
1182 return (void *) dest
;
1185 static void *SwigwxGIFHandlerTowxObject(void *ptr
) {
1188 src
= (wxGIFHandler
*) ptr
;
1189 dest
= (wxObject
*) src
;
1190 return (void *) dest
;
1193 #define new_wxGIFHandler() (new wxGIFHandler())
1194 static PyObject
*_wrap_new_wxGIFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1195 PyObject
* _resultobj
;
1196 wxGIFHandler
* _result
;
1197 char *_kwnames
[] = { NULL
};
1201 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxGIFHandler",_kwnames
))
1204 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1205 _result
= (wxGIFHandler
*)new_wxGIFHandler();
1207 wxPyEndAllowThreads(__tstate
);
1208 if (PyErr_Occurred()) return NULL
;
1210 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGIFHandler_p");
1211 _resultobj
= Py_BuildValue("s",_ptemp
);
1214 _resultobj
= Py_None
;
1219 static void *SwigwxPNMHandlerTowxImageHandler(void *ptr
) {
1221 wxImageHandler
*dest
;
1222 src
= (wxPNMHandler
*) ptr
;
1223 dest
= (wxImageHandler
*) src
;
1224 return (void *) dest
;
1227 static void *SwigwxPNMHandlerTowxObject(void *ptr
) {
1230 src
= (wxPNMHandler
*) ptr
;
1231 dest
= (wxObject
*) src
;
1232 return (void *) dest
;
1235 #define new_wxPNMHandler() (new wxPNMHandler())
1236 static PyObject
*_wrap_new_wxPNMHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1237 PyObject
* _resultobj
;
1238 wxPNMHandler
* _result
;
1239 char *_kwnames
[] = { NULL
};
1243 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNMHandler",_kwnames
))
1246 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1247 _result
= (wxPNMHandler
*)new_wxPNMHandler();
1249 wxPyEndAllowThreads(__tstate
);
1250 if (PyErr_Occurred()) return NULL
;
1252 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNMHandler_p");
1253 _resultobj
= Py_BuildValue("s",_ptemp
);
1256 _resultobj
= Py_None
;
1261 static void *SwigwxPCXHandlerTowxImageHandler(void *ptr
) {
1263 wxImageHandler
*dest
;
1264 src
= (wxPCXHandler
*) ptr
;
1265 dest
= (wxImageHandler
*) src
;
1266 return (void *) dest
;
1269 static void *SwigwxPCXHandlerTowxObject(void *ptr
) {
1272 src
= (wxPCXHandler
*) ptr
;
1273 dest
= (wxObject
*) src
;
1274 return (void *) dest
;
1277 #define new_wxPCXHandler() (new wxPCXHandler())
1278 static PyObject
*_wrap_new_wxPCXHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1279 PyObject
* _resultobj
;
1280 wxPCXHandler
* _result
;
1281 char *_kwnames
[] = { NULL
};
1285 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPCXHandler",_kwnames
))
1288 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1289 _result
= (wxPCXHandler
*)new_wxPCXHandler();
1291 wxPyEndAllowThreads(__tstate
);
1292 if (PyErr_Occurred()) return NULL
;
1294 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPCXHandler_p");
1295 _resultobj
= Py_BuildValue("s",_ptemp
);
1298 _resultobj
= Py_None
;
1303 static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr
) {
1305 wxImageHandler
*dest
;
1306 src
= (wxTIFFHandler
*) ptr
;
1307 dest
= (wxImageHandler
*) src
;
1308 return (void *) dest
;
1311 static void *SwigwxTIFFHandlerTowxObject(void *ptr
) {
1314 src
= (wxTIFFHandler
*) ptr
;
1315 dest
= (wxObject
*) src
;
1316 return (void *) dest
;
1319 #define new_wxTIFFHandler() (new wxTIFFHandler())
1320 static PyObject
*_wrap_new_wxTIFFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1321 PyObject
* _resultobj
;
1322 wxTIFFHandler
* _result
;
1323 char *_kwnames
[] = { NULL
};
1327 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxTIFFHandler",_kwnames
))
1330 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1331 _result
= (wxTIFFHandler
*)new_wxTIFFHandler();
1333 wxPyEndAllowThreads(__tstate
);
1334 if (PyErr_Occurred()) return NULL
;
1336 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxTIFFHandler_p");
1337 _resultobj
= Py_BuildValue("s",_ptemp
);
1340 _resultobj
= Py_None
;
1345 static void *SwigwxImageTowxObject(void *ptr
) {
1348 src
= (wxImage
*) ptr
;
1349 dest
= (wxObject
*) src
;
1350 return (void *) dest
;
1353 #define new_wxImage(_swigarg0,_swigarg1,_swigarg2) (new wxImage(_swigarg0,_swigarg1,_swigarg2))
1354 static PyObject
*_wrap_new_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1355 PyObject
* _resultobj
;
1358 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1359 int _arg2
= (int ) -1;
1360 PyObject
* _obj0
= 0;
1361 char *_kwnames
[] = { "name","type","index", NULL
};
1365 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:new_wxImage",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
1368 #if PYTHON_API_VERSION >= 1009
1369 char* tmpPtr
; int tmpSize
;
1370 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1371 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1374 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1376 _arg0
= new wxString(tmpPtr
, tmpSize
);
1378 if (!PyString_Check(_obj0
)) {
1379 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1382 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1386 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1387 _result
= (wxImage
*)new_wxImage(*_arg0
,_arg1
,_arg2
);
1389 wxPyEndAllowThreads(__tstate
);
1390 if (PyErr_Occurred()) return NULL
;
1392 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1393 _resultobj
= Py_BuildValue("s",_ptemp
);
1396 _resultobj
= Py_None
;
1405 #define delete_wxImage(_swigobj) (delete _swigobj)
1406 static PyObject
*_wrap_delete_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1407 PyObject
* _resultobj
;
1409 PyObject
* _argo0
= 0;
1410 char *_kwnames
[] = { "self", NULL
};
1413 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxImage",_kwnames
,&_argo0
))
1416 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1417 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1418 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxImage. Expected _wxImage_p.");
1423 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1424 delete_wxImage(_arg0
);
1426 wxPyEndAllowThreads(__tstate
);
1427 if (PyErr_Occurred()) return NULL
;
1428 } Py_INCREF(Py_None
);
1429 _resultobj
= Py_None
;
1433 #define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
1434 static PyObject
*_wrap_wxImage_ConvertToBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1435 PyObject
* _resultobj
;
1438 PyObject
* _argo0
= 0;
1439 char *_kwnames
[] = { "self", NULL
};
1443 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_ConvertToBitmap",_kwnames
,&_argo0
))
1446 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1447 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1448 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
1453 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1454 _result
= new wxBitmap (wxImage_ConvertToBitmap(_arg0
));
1456 wxPyEndAllowThreads(__tstate
);
1457 if (PyErr_Occurred()) return NULL
;
1458 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1459 _resultobj
= Py_BuildValue("s",_ptemp
);
1463 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
1464 static PyObject
*_wrap_wxImage_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1465 PyObject
* _resultobj
;
1469 PyObject
* _argo0
= 0;
1470 char *_kwnames
[] = { "self","width","height", NULL
};
1473 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Create",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1476 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1477 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1478 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
1483 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1484 wxImage_Create(_arg0
,_arg1
,_arg2
);
1486 wxPyEndAllowThreads(__tstate
);
1487 if (PyErr_Occurred()) return NULL
;
1488 } Py_INCREF(Py_None
);
1489 _resultobj
= Py_None
;
1493 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1494 static PyObject
*_wrap_wxImage_Destroy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1495 PyObject
* _resultobj
;
1497 PyObject
* _argo0
= 0;
1498 char *_kwnames
[] = { "self", NULL
};
1501 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Destroy",_kwnames
,&_argo0
))
1504 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1505 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1506 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1511 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1512 wxImage_Destroy(_arg0
);
1514 wxPyEndAllowThreads(__tstate
);
1515 if (PyErr_Occurred()) return NULL
;
1516 } Py_INCREF(Py_None
);
1517 _resultobj
= Py_None
;
1521 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1522 static PyObject
*_wrap_wxImage_Scale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1523 PyObject
* _resultobj
;
1528 PyObject
* _argo0
= 0;
1529 char *_kwnames
[] = { "self","width","height", NULL
};
1533 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Scale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1536 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1537 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1538 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1543 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1544 _result
= new wxImage (wxImage_Scale(_arg0
,_arg1
,_arg2
));
1546 wxPyEndAllowThreads(__tstate
);
1547 if (PyErr_Occurred()) return NULL
;
1548 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1549 _resultobj
= Py_BuildValue("s",_ptemp
);
1553 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1554 static PyObject
*_wrap_wxImage_Rescale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1555 PyObject
* _resultobj
;
1560 PyObject
* _argo0
= 0;
1561 char *_kwnames
[] = { "self","width","height", NULL
};
1565 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Rescale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1568 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1569 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1570 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1575 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1576 wxImage
& _result_ref
= wxImage_Rescale(_arg0
,_arg1
,_arg2
);
1577 _result
= (wxImage
*) &_result_ref
;
1579 wxPyEndAllowThreads(__tstate
);
1580 if (PyErr_Occurred()) return NULL
;
1582 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1583 _resultobj
= Py_BuildValue("s",_ptemp
);
1586 _resultobj
= Py_None
;
1591 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1592 static PyObject
*_wrap_wxImage_SetRGB(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1593 PyObject
* _resultobj
;
1597 unsigned char _arg3
;
1598 unsigned char _arg4
;
1599 unsigned char _arg5
;
1600 PyObject
* _argo0
= 0;
1601 char *_kwnames
[] = { "self","x","y","r","g","b", NULL
};
1604 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oiibbb:wxImage_SetRGB",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
))
1607 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1608 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1609 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1614 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1615 wxImage_SetRGB(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
);
1617 wxPyEndAllowThreads(__tstate
);
1618 if (PyErr_Occurred()) return NULL
;
1619 } Py_INCREF(Py_None
);
1620 _resultobj
= Py_None
;
1624 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1625 static PyObject
*_wrap_wxImage_GetRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1626 PyObject
* _resultobj
;
1627 unsigned char _result
;
1631 PyObject
* _argo0
= 0;
1632 char *_kwnames
[] = { "self","x","y", NULL
};
1635 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetRed",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1638 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1639 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1640 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1645 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1646 _result
= (unsigned char )wxImage_GetRed(_arg0
,_arg1
,_arg2
);
1648 wxPyEndAllowThreads(__tstate
);
1649 if (PyErr_Occurred()) return NULL
;
1650 } _resultobj
= Py_BuildValue("b",_result
);
1654 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1655 static PyObject
*_wrap_wxImage_GetGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1656 PyObject
* _resultobj
;
1657 unsigned char _result
;
1661 PyObject
* _argo0
= 0;
1662 char *_kwnames
[] = { "self","x","y", NULL
};
1665 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetGreen",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1668 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1669 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1670 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1675 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1676 _result
= (unsigned char )wxImage_GetGreen(_arg0
,_arg1
,_arg2
);
1678 wxPyEndAllowThreads(__tstate
);
1679 if (PyErr_Occurred()) return NULL
;
1680 } _resultobj
= Py_BuildValue("b",_result
);
1684 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1685 static PyObject
*_wrap_wxImage_GetBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1686 PyObject
* _resultobj
;
1687 unsigned char _result
;
1691 PyObject
* _argo0
= 0;
1692 char *_kwnames
[] = { "self","x","y", NULL
};
1695 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetBlue",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1698 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1699 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1700 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1705 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1706 _result
= (unsigned char )wxImage_GetBlue(_arg0
,_arg1
,_arg2
);
1708 wxPyEndAllowThreads(__tstate
);
1709 if (PyErr_Occurred()) return NULL
;
1710 } _resultobj
= Py_BuildValue("b",_result
);
1714 static PyObject
*_wrap_wxImage_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1715 PyObject
* _resultobj
;
1718 PyObject
* _obj0
= 0;
1719 char *_kwnames
[] = { "name", NULL
};
1722 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanRead",_kwnames
,&_obj0
))
1725 #if PYTHON_API_VERSION >= 1009
1726 char* tmpPtr
; int tmpSize
;
1727 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1728 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1731 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1733 _arg0
= new wxString(tmpPtr
, tmpSize
);
1735 if (!PyString_Check(_obj0
)) {
1736 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1739 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1743 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1744 _result
= (bool )wxImage::CanRead(*_arg0
);
1746 wxPyEndAllowThreads(__tstate
);
1747 if (PyErr_Occurred()) return NULL
;
1748 } _resultobj
= Py_BuildValue("i",_result
);
1756 static PyObject
*_wrap_wxImage_GetImageCount(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1757 PyObject
* _resultobj
;
1760 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1761 PyObject
* _obj0
= 0;
1762 char *_kwnames
[] = { "name","type", NULL
};
1765 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_GetImageCount",_kwnames
,&_obj0
,&_arg1
))
1768 #if PYTHON_API_VERSION >= 1009
1769 char* tmpPtr
; int tmpSize
;
1770 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1771 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1774 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1776 _arg0
= new wxString(tmpPtr
, tmpSize
);
1778 if (!PyString_Check(_obj0
)) {
1779 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1782 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1786 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1787 _result
= (int )wxImage::GetImageCount(*_arg0
,_arg1
);
1789 wxPyEndAllowThreads(__tstate
);
1790 if (PyErr_Occurred()) return NULL
;
1791 } _resultobj
= Py_BuildValue("i",_result
);
1799 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1800 static PyObject
*_wrap_wxImage_LoadFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1801 PyObject
* _resultobj
;
1805 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
1806 int _arg3
= (int ) -1;
1807 PyObject
* _argo0
= 0;
1808 PyObject
* _obj1
= 0;
1809 char *_kwnames
[] = { "self","name","type","index", NULL
};
1812 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
1815 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1816 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1817 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1822 #if PYTHON_API_VERSION >= 1009
1823 char* tmpPtr
; int tmpSize
;
1824 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1825 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1828 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1830 _arg1
= new wxString(tmpPtr
, tmpSize
);
1832 if (!PyString_Check(_obj1
)) {
1833 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1836 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1840 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1841 _result
= (bool )wxImage_LoadFile(_arg0
,*_arg1
,_arg2
,_arg3
);
1843 wxPyEndAllowThreads(__tstate
);
1844 if (PyErr_Occurred()) return NULL
;
1845 } _resultobj
= Py_BuildValue("i",_result
);
1853 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1854 static PyObject
*_wrap_wxImage_LoadMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1855 PyObject
* _resultobj
;
1860 int _arg3
= (int ) -1;
1861 PyObject
* _argo0
= 0;
1862 PyObject
* _obj1
= 0;
1863 PyObject
* _obj2
= 0;
1864 char *_kwnames
[] = { "self","name","mimetype","index", NULL
};
1867 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
1870 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1871 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1872 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1877 #if PYTHON_API_VERSION >= 1009
1878 char* tmpPtr
; int tmpSize
;
1879 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1880 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1883 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1885 _arg1
= new wxString(tmpPtr
, tmpSize
);
1887 if (!PyString_Check(_obj1
)) {
1888 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1891 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1895 #if PYTHON_API_VERSION >= 1009
1896 char* tmpPtr
; int tmpSize
;
1897 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1898 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1901 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1903 _arg2
= new wxString(tmpPtr
, tmpSize
);
1905 if (!PyString_Check(_obj2
)) {
1906 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1909 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1913 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1914 _result
= (bool )wxImage_LoadMimeFile(_arg0
,*_arg1
,*_arg2
,_arg3
);
1916 wxPyEndAllowThreads(__tstate
);
1917 if (PyErr_Occurred()) return NULL
;
1918 } _resultobj
= Py_BuildValue("i",_result
);
1930 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1931 static PyObject
*_wrap_wxImage_SaveFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1932 PyObject
* _resultobj
;
1937 PyObject
* _argo0
= 0;
1938 PyObject
* _obj1
= 0;
1939 char *_kwnames
[] = { "self","name","type", NULL
};
1942 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SaveFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1945 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1946 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1947 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1952 #if PYTHON_API_VERSION >= 1009
1953 char* tmpPtr
; int tmpSize
;
1954 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1955 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1958 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1960 _arg1
= new wxString(tmpPtr
, tmpSize
);
1962 if (!PyString_Check(_obj1
)) {
1963 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1966 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1970 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1971 _result
= (bool )wxImage_SaveFile(_arg0
,*_arg1
,_arg2
);
1973 wxPyEndAllowThreads(__tstate
);
1974 if (PyErr_Occurred()) return NULL
;
1975 } _resultobj
= Py_BuildValue("i",_result
);
1983 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1984 static PyObject
*_wrap_wxImage_SaveMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1985 PyObject
* _resultobj
;
1990 PyObject
* _argo0
= 0;
1991 PyObject
* _obj1
= 0;
1992 PyObject
* _obj2
= 0;
1993 char *_kwnames
[] = { "self","name","mimetype", NULL
};
1996 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SaveMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
1999 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2000 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2001 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
2006 #if PYTHON_API_VERSION >= 1009
2007 char* tmpPtr
; int tmpSize
;
2008 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2009 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2012 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2014 _arg1
= new wxString(tmpPtr
, tmpSize
);
2016 if (!PyString_Check(_obj1
)) {
2017 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2020 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2024 #if PYTHON_API_VERSION >= 1009
2025 char* tmpPtr
; int tmpSize
;
2026 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2027 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2030 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2032 _arg2
= new wxString(tmpPtr
, tmpSize
);
2034 if (!PyString_Check(_obj2
)) {
2035 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2038 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2042 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2043 _result
= (bool )wxImage_SaveMimeFile(_arg0
,*_arg1
,*_arg2
);
2045 wxPyEndAllowThreads(__tstate
);
2046 if (PyErr_Occurred()) return NULL
;
2047 } _resultobj
= Py_BuildValue("i",_result
);
2059 static PyObject
*_wrap_wxImage_CanReadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2060 PyObject
* _resultobj
;
2062 wxInputStream
* _arg0
;
2063 wxPyInputStream
* temp
;
2065 PyObject
* _obj0
= 0;
2066 char *_kwnames
[] = { "stream", NULL
};
2069 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanReadStream",_kwnames
,&_obj0
))
2072 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2073 _arg0
= temp
->m_wxis
;
2076 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
2077 if (_arg0
== NULL
) {
2078 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2085 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2086 _result
= (bool )wxImage::CanRead(*_arg0
);
2088 wxPyEndAllowThreads(__tstate
);
2089 if (PyErr_Occurred()) return NULL
;
2090 } _resultobj
= Py_BuildValue("i",_result
);
2098 #define wxImage_LoadStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2099 static PyObject
*_wrap_wxImage_LoadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2100 PyObject
* _resultobj
;
2103 wxInputStream
* _arg1
;
2104 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
2105 int _arg3
= (int ) -1;
2106 PyObject
* _argo0
= 0;
2107 wxPyInputStream
* temp
;
2109 PyObject
* _obj1
= 0;
2110 char *_kwnames
[] = { "self","stream","type","index", NULL
};
2113 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadStream",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
2116 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2117 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2118 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadStream. Expected _wxImage_p.");
2123 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2124 _arg1
= temp
->m_wxis
;
2127 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2128 if (_arg1
== NULL
) {
2129 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2136 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2137 _result
= (bool )wxImage_LoadStream(_arg0
,*_arg1
,_arg2
,_arg3
);
2139 wxPyEndAllowThreads(__tstate
);
2140 if (PyErr_Occurred()) return NULL
;
2141 } _resultobj
= Py_BuildValue("i",_result
);
2149 #define wxImage_LoadMimeStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2150 static PyObject
*_wrap_wxImage_LoadMimeStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2151 PyObject
* _resultobj
;
2154 wxInputStream
* _arg1
;
2156 int _arg3
= (int ) -1;
2157 PyObject
* _argo0
= 0;
2158 wxPyInputStream
* temp
;
2160 PyObject
* _obj1
= 0;
2161 PyObject
* _obj2
= 0;
2162 char *_kwnames
[] = { "self","stream","mimetype","index", NULL
};
2165 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeStream",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
2168 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2169 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2170 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeStream. Expected _wxImage_p.");
2175 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2176 _arg1
= temp
->m_wxis
;
2179 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2180 if (_arg1
== NULL
) {
2181 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2188 #if PYTHON_API_VERSION >= 1009
2189 char* tmpPtr
; int tmpSize
;
2190 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2191 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2194 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2196 _arg2
= new wxString(tmpPtr
, tmpSize
);
2198 if (!PyString_Check(_obj2
)) {
2199 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2202 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2206 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2207 _result
= (bool )wxImage_LoadMimeStream(_arg0
,*_arg1
,*_arg2
,_arg3
);
2209 wxPyEndAllowThreads(__tstate
);
2210 if (PyErr_Occurred()) return NULL
;
2211 } _resultobj
= Py_BuildValue("i",_result
);
2223 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
2224 static PyObject
*_wrap_wxImage_Ok(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2225 PyObject
* _resultobj
;
2228 PyObject
* _argo0
= 0;
2229 char *_kwnames
[] = { "self", NULL
};
2232 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Ok",_kwnames
,&_argo0
))
2235 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2236 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2237 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
2242 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2243 _result
= (bool )wxImage_Ok(_arg0
);
2245 wxPyEndAllowThreads(__tstate
);
2246 if (PyErr_Occurred()) return NULL
;
2247 } _resultobj
= Py_BuildValue("i",_result
);
2251 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
2252 static PyObject
*_wrap_wxImage_GetWidth(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2253 PyObject
* _resultobj
;
2256 PyObject
* _argo0
= 0;
2257 char *_kwnames
[] = { "self", NULL
};
2260 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetWidth",_kwnames
,&_argo0
))
2263 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2264 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2265 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetWidth. Expected _wxImage_p.");
2270 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2271 _result
= (int )wxImage_GetWidth(_arg0
);
2273 wxPyEndAllowThreads(__tstate
);
2274 if (PyErr_Occurred()) return NULL
;
2275 } _resultobj
= Py_BuildValue("i",_result
);
2279 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
2280 static PyObject
*_wrap_wxImage_GetHeight(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2281 PyObject
* _resultobj
;
2284 PyObject
* _argo0
= 0;
2285 char *_kwnames
[] = { "self", NULL
};
2288 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetHeight",_kwnames
,&_argo0
))
2291 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2292 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2293 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
2298 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2299 _result
= (int )wxImage_GetHeight(_arg0
);
2301 wxPyEndAllowThreads(__tstate
);
2302 if (PyErr_Occurred()) return NULL
;
2303 } _resultobj
= Py_BuildValue("i",_result
);
2307 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
2308 static PyObject
*_wrap_wxImage_GetSubImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2309 PyObject
* _resultobj
;
2313 PyObject
* _argo0
= 0;
2315 PyObject
* _obj1
= 0;
2316 char *_kwnames
[] = { "self","rect", NULL
};
2320 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetSubImage",_kwnames
,&_argo0
,&_obj1
))
2323 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2324 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2325 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
2331 if (! wxRect_helper(_obj1
, &_arg1
))
2335 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2336 _result
= new wxImage (wxImage_GetSubImage(_arg0
,*_arg1
));
2338 wxPyEndAllowThreads(__tstate
);
2339 if (PyErr_Occurred()) return NULL
;
2340 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2341 _resultobj
= Py_BuildValue("s",_ptemp
);
2345 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
2346 static PyObject
*_wrap_wxImage_Copy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2347 PyObject
* _resultobj
;
2350 PyObject
* _argo0
= 0;
2351 char *_kwnames
[] = { "self", NULL
};
2355 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Copy",_kwnames
,&_argo0
))
2358 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2359 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2360 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
2365 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2366 _result
= new wxImage (wxImage_Copy(_arg0
));
2368 wxPyEndAllowThreads(__tstate
);
2369 if (PyErr_Occurred()) return NULL
;
2370 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2371 _resultobj
= Py_BuildValue("s",_ptemp
);
2375 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
2376 static PyObject
*_wrap_wxImage_Paste(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2377 PyObject
* _resultobj
;
2382 PyObject
* _argo0
= 0;
2383 PyObject
* _argo1
= 0;
2384 char *_kwnames
[] = { "self","image","x","y", NULL
};
2387 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOii:wxImage_Paste",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_arg3
))
2390 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2391 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2392 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
2397 if (_argo1
== Py_None
) { _arg1
= NULL
; }
2398 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxImage_p")) {
2399 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
2404 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2405 wxImage_Paste(_arg0
,*_arg1
,_arg2
,_arg3
);
2407 wxPyEndAllowThreads(__tstate
);
2408 if (PyErr_Occurred()) return NULL
;
2409 } Py_INCREF(Py_None
);
2410 _resultobj
= Py_None
;
2414 static PyObject
* wxImage_GetData(wxImage
*self
) {
2415 unsigned char* data
= self
->GetData();
2416 int len
= self
->GetWidth() * self
->GetHeight() * 3;
2417 return PyString_FromStringAndSize((char*)data
, len
);
2419 static PyObject
*_wrap_wxImage_GetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2420 PyObject
* _resultobj
;
2423 PyObject
* _argo0
= 0;
2424 char *_kwnames
[] = { "self", NULL
};
2427 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetData",_kwnames
,&_argo0
))
2430 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2431 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2432 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
2437 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2438 _result
= (PyObject
*)wxImage_GetData(_arg0
);
2440 wxPyEndAllowThreads(__tstate
);
2441 if (PyErr_Occurred()) return NULL
;
2443 _resultobj
= _result
;
2448 static void wxImage_SetData(wxImage
*self
,PyObject
* data
) {
2449 unsigned char* dataPtr
;
2451 if (! PyString_Check(data
)) {
2452 PyErr_SetString(PyExc_TypeError
, "Expected string object");
2456 size_t len
= self
->GetWidth() * self
->GetHeight() * 3;
2457 dataPtr
= (unsigned char*) malloc(len
);
2458 memcpy(dataPtr
, PyString_AsString(data
), len
);
2459 self
->SetData(dataPtr
);
2461 static PyObject
*_wrap_wxImage_SetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2462 PyObject
* _resultobj
;
2465 PyObject
* _argo0
= 0;
2466 PyObject
* _obj1
= 0;
2467 char *_kwnames
[] = { "self","data", NULL
};
2470 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_SetData",_kwnames
,&_argo0
,&_obj1
))
2473 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2474 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2475 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
2483 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2484 wxImage_SetData(_arg0
,_arg1
);
2486 wxPyEndAllowThreads(__tstate
);
2487 if (PyErr_Occurred()) return NULL
;
2488 } Py_INCREF(Py_None
);
2489 _resultobj
= Py_None
;
2493 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
2494 static PyObject
*_wrap_wxImage_SetMaskColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2495 PyObject
* _resultobj
;
2497 unsigned char _arg1
;
2498 unsigned char _arg2
;
2499 unsigned char _arg3
;
2500 PyObject
* _argo0
= 0;
2501 char *_kwnames
[] = { "self","r","g","b", NULL
};
2504 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_SetMaskColour",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2507 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2508 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2509 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
2514 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2515 wxImage_SetMaskColour(_arg0
,_arg1
,_arg2
,_arg3
);
2517 wxPyEndAllowThreads(__tstate
);
2518 if (PyErr_Occurred()) return NULL
;
2519 } Py_INCREF(Py_None
);
2520 _resultobj
= Py_None
;
2524 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
2525 static PyObject
*_wrap_wxImage_GetMaskRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2526 PyObject
* _resultobj
;
2527 unsigned char _result
;
2529 PyObject
* _argo0
= 0;
2530 char *_kwnames
[] = { "self", NULL
};
2533 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskRed",_kwnames
,&_argo0
))
2536 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2537 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2538 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
2543 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2544 _result
= (unsigned char )wxImage_GetMaskRed(_arg0
);
2546 wxPyEndAllowThreads(__tstate
);
2547 if (PyErr_Occurred()) return NULL
;
2548 } _resultobj
= Py_BuildValue("b",_result
);
2552 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
2553 static PyObject
*_wrap_wxImage_GetMaskGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2554 PyObject
* _resultobj
;
2555 unsigned char _result
;
2557 PyObject
* _argo0
= 0;
2558 char *_kwnames
[] = { "self", NULL
};
2561 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskGreen",_kwnames
,&_argo0
))
2564 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2565 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2566 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
2571 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2572 _result
= (unsigned char )wxImage_GetMaskGreen(_arg0
);
2574 wxPyEndAllowThreads(__tstate
);
2575 if (PyErr_Occurred()) return NULL
;
2576 } _resultobj
= Py_BuildValue("b",_result
);
2580 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
2581 static PyObject
*_wrap_wxImage_GetMaskBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2582 PyObject
* _resultobj
;
2583 unsigned char _result
;
2585 PyObject
* _argo0
= 0;
2586 char *_kwnames
[] = { "self", NULL
};
2589 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskBlue",_kwnames
,&_argo0
))
2592 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2593 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2594 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
2599 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2600 _result
= (unsigned char )wxImage_GetMaskBlue(_arg0
);
2602 wxPyEndAllowThreads(__tstate
);
2603 if (PyErr_Occurred()) return NULL
;
2604 } _resultobj
= Py_BuildValue("b",_result
);
2608 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
2609 static PyObject
*_wrap_wxImage_SetMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2610 PyObject
* _resultobj
;
2612 bool _arg1
= (bool ) TRUE
;
2613 PyObject
* _argo0
= 0;
2614 int tempbool1
= (int) TRUE
;
2615 char *_kwnames
[] = { "self","mask", NULL
};
2618 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_SetMask",_kwnames
,&_argo0
,&tempbool1
))
2621 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2622 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2623 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
2627 _arg1
= (bool ) tempbool1
;
2629 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2630 wxImage_SetMask(_arg0
,_arg1
);
2632 wxPyEndAllowThreads(__tstate
);
2633 if (PyErr_Occurred()) return NULL
;
2634 } Py_INCREF(Py_None
);
2635 _resultobj
= Py_None
;
2639 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
2640 static PyObject
*_wrap_wxImage_HasMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2641 PyObject
* _resultobj
;
2644 PyObject
* _argo0
= 0;
2645 char *_kwnames
[] = { "self", NULL
};
2648 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_HasMask",_kwnames
,&_argo0
))
2651 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2652 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2653 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
2658 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2659 _result
= (bool )wxImage_HasMask(_arg0
);
2661 wxPyEndAllowThreads(__tstate
);
2662 if (PyErr_Occurred()) return NULL
;
2663 } _resultobj
= Py_BuildValue("i",_result
);
2667 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
2668 static PyObject
*_wrap_wxImage_Rotate(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2669 PyObject
* _resultobj
;
2674 bool _arg3
= (bool ) TRUE
;
2675 wxPoint
* _arg4
= (wxPoint
*) NULL
;
2676 PyObject
* _argo0
= 0;
2678 PyObject
* _obj2
= 0;
2679 int tempbool3
= (int) TRUE
;
2681 PyObject
* _obj4
= 0;
2682 char *_kwnames
[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL
};
2686 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OdO|iO:wxImage_Rotate",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&tempbool3
,&_obj4
))
2689 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2690 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2691 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
2697 if (! wxPoint_helper(_obj2
, &_arg2
))
2700 _arg3
= (bool ) tempbool3
;
2704 if (! wxPoint_helper(_obj4
, &_arg4
))
2708 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2709 _result
= new wxImage (wxImage_Rotate(_arg0
,_arg1
,*_arg2
,_arg3
,_arg4
));
2711 wxPyEndAllowThreads(__tstate
);
2712 if (PyErr_Occurred()) return NULL
;
2713 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2714 _resultobj
= Py_BuildValue("s",_ptemp
);
2718 #define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
2719 static PyObject
*_wrap_wxImage_Rotate90(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2720 PyObject
* _resultobj
;
2723 bool _arg1
= (bool ) TRUE
;
2724 PyObject
* _argo0
= 0;
2725 int tempbool1
= (int) TRUE
;
2726 char *_kwnames
[] = { "self","clockwise", NULL
};
2730 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Rotate90",_kwnames
,&_argo0
,&tempbool1
))
2733 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2734 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2735 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p.");
2739 _arg1
= (bool ) tempbool1
;
2741 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2742 _result
= new wxImage (wxImage_Rotate90(_arg0
,_arg1
));
2744 wxPyEndAllowThreads(__tstate
);
2745 if (PyErr_Occurred()) return NULL
;
2746 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2747 _resultobj
= Py_BuildValue("s",_ptemp
);
2751 #define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2752 static PyObject
*_wrap_wxImage_Mirror(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2753 PyObject
* _resultobj
;
2756 bool _arg1
= (bool ) TRUE
;
2757 PyObject
* _argo0
= 0;
2758 int tempbool1
= (int) TRUE
;
2759 char *_kwnames
[] = { "self","horizontally", NULL
};
2763 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Mirror",_kwnames
,&_argo0
,&tempbool1
))
2766 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2767 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2768 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2772 _arg1
= (bool ) tempbool1
;
2774 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2775 _result
= new wxImage (wxImage_Mirror(_arg0
,_arg1
));
2777 wxPyEndAllowThreads(__tstate
);
2778 if (PyErr_Occurred()) return NULL
;
2779 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2780 _resultobj
= Py_BuildValue("s",_ptemp
);
2784 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2785 static PyObject
*_wrap_wxImage_Replace(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2786 PyObject
* _resultobj
;
2788 unsigned char _arg1
;
2789 unsigned char _arg2
;
2790 unsigned char _arg3
;
2791 unsigned char _arg4
;
2792 unsigned char _arg5
;
2793 unsigned char _arg6
;
2794 PyObject
* _argo0
= 0;
2795 char *_kwnames
[] = { "self","r1","g1","b1","r2","g2","b2", NULL
};
2798 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbbbbb:wxImage_Replace",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
,&_arg6
))
2801 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2802 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2803 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p.");
2808 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2809 wxImage_Replace(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
,_arg6
);
2811 wxPyEndAllowThreads(__tstate
);
2812 if (PyErr_Occurred()) return NULL
;
2813 } Py_INCREF(Py_None
);
2814 _resultobj
= Py_None
;
2818 #define wxImage_ConvertToMono(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMono(_swigarg0,_swigarg1,_swigarg2))
2819 static PyObject
*_wrap_wxImage_ConvertToMono(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2820 PyObject
* _resultobj
;
2823 unsigned char _arg1
;
2824 unsigned char _arg2
;
2825 unsigned char _arg3
;
2826 PyObject
* _argo0
= 0;
2827 char *_kwnames
[] = { "self","r","g","b", NULL
};
2831 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMono",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2834 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2835 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2836 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMono. Expected _wxImage_p.");
2841 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2842 _result
= new wxImage (wxImage_ConvertToMono(_arg0
,_arg1
,_arg2
,_arg3
));
2844 wxPyEndAllowThreads(__tstate
);
2845 if (PyErr_Occurred()) return NULL
;
2846 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2847 _resultobj
= Py_BuildValue("s",_ptemp
);
2851 #define wxImage_SetOption(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2852 static PyObject
*_wrap_wxImage_SetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2853 PyObject
* _resultobj
;
2857 PyObject
* _argo0
= 0;
2858 PyObject
* _obj1
= 0;
2859 PyObject
* _obj2
= 0;
2860 char *_kwnames
[] = { "self","name","value", NULL
};
2863 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SetOption",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2866 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2867 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2868 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOption. Expected _wxImage_p.");
2873 #if PYTHON_API_VERSION >= 1009
2874 char* tmpPtr
; int tmpSize
;
2875 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2876 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2879 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2881 _arg1
= new wxString(tmpPtr
, tmpSize
);
2883 if (!PyString_Check(_obj1
)) {
2884 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2887 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2891 #if PYTHON_API_VERSION >= 1009
2892 char* tmpPtr
; int tmpSize
;
2893 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2894 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2897 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2899 _arg2
= new wxString(tmpPtr
, tmpSize
);
2901 if (!PyString_Check(_obj2
)) {
2902 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2905 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2909 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2910 wxImage_SetOption(_arg0
,*_arg1
,*_arg2
);
2912 wxPyEndAllowThreads(__tstate
);
2913 if (PyErr_Occurred()) return NULL
;
2914 } Py_INCREF(Py_None
);
2915 _resultobj
= Py_None
;
2927 #define wxImage_SetOptionInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2928 static PyObject
*_wrap_wxImage_SetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2929 PyObject
* _resultobj
;
2933 PyObject
* _argo0
= 0;
2934 PyObject
* _obj1
= 0;
2935 char *_kwnames
[] = { "self","name","value", NULL
};
2938 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SetOptionInt",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
2941 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2942 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2943 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOptionInt. Expected _wxImage_p.");
2948 #if PYTHON_API_VERSION >= 1009
2949 char* tmpPtr
; int tmpSize
;
2950 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2951 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2954 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2956 _arg1
= new wxString(tmpPtr
, tmpSize
);
2958 if (!PyString_Check(_obj1
)) {
2959 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2962 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2966 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2967 wxImage_SetOptionInt(_arg0
,*_arg1
,_arg2
);
2969 wxPyEndAllowThreads(__tstate
);
2970 if (PyErr_Occurred()) return NULL
;
2971 } Py_INCREF(Py_None
);
2972 _resultobj
= Py_None
;
2980 #define wxImage_GetOption(_swigobj,_swigarg0) (_swigobj->GetOption(_swigarg0))
2981 static PyObject
*_wrap_wxImage_GetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2982 PyObject
* _resultobj
;
2986 PyObject
* _argo0
= 0;
2987 PyObject
* _obj1
= 0;
2988 char *_kwnames
[] = { "self","name", NULL
};
2991 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOption",_kwnames
,&_argo0
,&_obj1
))
2994 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2995 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2996 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOption. Expected _wxImage_p.");
3001 #if PYTHON_API_VERSION >= 1009
3002 char* tmpPtr
; int tmpSize
;
3003 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3004 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3007 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3009 _arg1
= new wxString(tmpPtr
, tmpSize
);
3011 if (!PyString_Check(_obj1
)) {
3012 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3015 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3019 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3020 _result
= new wxString (wxImage_GetOption(_arg0
,*_arg1
));
3022 wxPyEndAllowThreads(__tstate
);
3023 if (PyErr_Occurred()) return NULL
;
3025 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
3037 #define wxImage_GetOptionInt(_swigobj,_swigarg0) (_swigobj->GetOptionInt(_swigarg0))
3038 static PyObject
*_wrap_wxImage_GetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3039 PyObject
* _resultobj
;
3043 PyObject
* _argo0
= 0;
3044 PyObject
* _obj1
= 0;
3045 char *_kwnames
[] = { "self","name", NULL
};
3048 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOptionInt",_kwnames
,&_argo0
,&_obj1
))
3051 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3052 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3053 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOptionInt. Expected _wxImage_p.");
3058 #if PYTHON_API_VERSION >= 1009
3059 char* tmpPtr
; int tmpSize
;
3060 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3061 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3064 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3066 _arg1
= new wxString(tmpPtr
, tmpSize
);
3068 if (!PyString_Check(_obj1
)) {
3069 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3072 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3076 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3077 _result
= (int )wxImage_GetOptionInt(_arg0
,*_arg1
);
3079 wxPyEndAllowThreads(__tstate
);
3080 if (PyErr_Occurred()) return NULL
;
3081 } _resultobj
= Py_BuildValue("i",_result
);
3089 #define wxImage_HasOption(_swigobj,_swigarg0) (_swigobj->HasOption(_swigarg0))
3090 static PyObject
*_wrap_wxImage_HasOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3091 PyObject
* _resultobj
;
3095 PyObject
* _argo0
= 0;
3096 PyObject
* _obj1
= 0;
3097 char *_kwnames
[] = { "self","name", NULL
};
3100 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_HasOption",_kwnames
,&_argo0
,&_obj1
))
3103 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3104 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3105 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasOption. Expected _wxImage_p.");
3110 #if PYTHON_API_VERSION >= 1009
3111 char* tmpPtr
; int tmpSize
;
3112 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3113 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3116 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3118 _arg1
= new wxString(tmpPtr
, tmpSize
);
3120 if (!PyString_Check(_obj1
)) {
3121 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3124 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3128 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3129 _result
= (bool )wxImage_HasOption(_arg0
,*_arg1
);
3131 wxPyEndAllowThreads(__tstate
);
3132 if (PyErr_Occurred()) return NULL
;
3133 } _resultobj
= Py_BuildValue("i",_result
);
3141 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
3142 static PyObject
*_wrap_wxImage_CountColours(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3143 PyObject
* _resultobj
;
3144 unsigned long _result
;
3146 unsigned long _arg1
= (unsigned long ) (unsigned long)-1;
3147 PyObject
* _argo0
= 0;
3148 char *_kwnames
[] = { "self","stopafter", NULL
};
3151 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_CountColours",_kwnames
,&_argo0
,&_arg1
))
3154 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3155 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3156 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
3161 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3162 _result
= (unsigned long )wxImage_CountColours(_arg0
,_arg1
);
3164 wxPyEndAllowThreads(__tstate
);
3165 if (PyErr_Occurred()) return NULL
;
3166 } _resultobj
= Py_BuildValue("l",_result
);
3170 static PyObject
*_wrap_wxImage_AddHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3171 PyObject
* _resultobj
;
3172 wxImageHandler
* _arg0
;
3173 PyObject
* _argo0
= 0;
3174 char *_kwnames
[] = { "handler", NULL
};
3177 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_AddHandler",_kwnames
,&_argo0
))
3180 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3181 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3182 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
3187 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3188 wxImage::AddHandler(_arg0
);
3190 wxPyEndAllowThreads(__tstate
);
3191 if (PyErr_Occurred()) return NULL
;
3192 } Py_INCREF(Py_None
);
3193 _resultobj
= Py_None
;
3197 static PyObject
*_wrap_wxImage_InsertHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3198 PyObject
* _resultobj
;
3199 wxImageHandler
* _arg0
;
3200 PyObject
* _argo0
= 0;
3201 char *_kwnames
[] = { "handler", NULL
};
3204 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_InsertHandler",_kwnames
,&_argo0
))
3207 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3208 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3209 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
3214 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3215 wxImage::InsertHandler(_arg0
);
3217 wxPyEndAllowThreads(__tstate
);
3218 if (PyErr_Occurred()) return NULL
;
3219 } Py_INCREF(Py_None
);
3220 _resultobj
= Py_None
;
3224 static PyObject
*_wrap_wxImage_RemoveHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3225 PyObject
* _resultobj
;
3228 PyObject
* _obj0
= 0;
3229 char *_kwnames
[] = { "name", NULL
};
3232 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_RemoveHandler",_kwnames
,&_obj0
))
3235 #if PYTHON_API_VERSION >= 1009
3236 char* tmpPtr
; int tmpSize
;
3237 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
3238 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3241 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
3243 _arg0
= new wxString(tmpPtr
, tmpSize
);
3245 if (!PyString_Check(_obj0
)) {
3246 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3249 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
3253 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3254 _result
= (bool )wxImage::RemoveHandler(*_arg0
);
3256 wxPyEndAllowThreads(__tstate
);
3257 if (PyErr_Occurred()) return NULL
;
3258 } _resultobj
= Py_BuildValue("i",_result
);
3266 static PyMethodDef imagecMethods
[] = {
3267 { "wxImage_RemoveHandler", (PyCFunction
) _wrap_wxImage_RemoveHandler
, METH_VARARGS
| METH_KEYWORDS
},
3268 { "wxImage_InsertHandler", (PyCFunction
) _wrap_wxImage_InsertHandler
, METH_VARARGS
| METH_KEYWORDS
},
3269 { "wxImage_AddHandler", (PyCFunction
) _wrap_wxImage_AddHandler
, METH_VARARGS
| METH_KEYWORDS
},
3270 { "wxImage_CountColours", (PyCFunction
) _wrap_wxImage_CountColours
, METH_VARARGS
| METH_KEYWORDS
},
3271 { "wxImage_HasOption", (PyCFunction
) _wrap_wxImage_HasOption
, METH_VARARGS
| METH_KEYWORDS
},
3272 { "wxImage_GetOptionInt", (PyCFunction
) _wrap_wxImage_GetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3273 { "wxImage_GetOption", (PyCFunction
) _wrap_wxImage_GetOption
, METH_VARARGS
| METH_KEYWORDS
},
3274 { "wxImage_SetOptionInt", (PyCFunction
) _wrap_wxImage_SetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3275 { "wxImage_SetOption", (PyCFunction
) _wrap_wxImage_SetOption
, METH_VARARGS
| METH_KEYWORDS
},
3276 { "wxImage_ConvertToMono", (PyCFunction
) _wrap_wxImage_ConvertToMono
, METH_VARARGS
| METH_KEYWORDS
},
3277 { "wxImage_Replace", (PyCFunction
) _wrap_wxImage_Replace
, METH_VARARGS
| METH_KEYWORDS
},
3278 { "wxImage_Mirror", (PyCFunction
) _wrap_wxImage_Mirror
, METH_VARARGS
| METH_KEYWORDS
},
3279 { "wxImage_Rotate90", (PyCFunction
) _wrap_wxImage_Rotate90
, METH_VARARGS
| METH_KEYWORDS
},
3280 { "wxImage_Rotate", (PyCFunction
) _wrap_wxImage_Rotate
, METH_VARARGS
| METH_KEYWORDS
},
3281 { "wxImage_HasMask", (PyCFunction
) _wrap_wxImage_HasMask
, METH_VARARGS
| METH_KEYWORDS
},
3282 { "wxImage_SetMask", (PyCFunction
) _wrap_wxImage_SetMask
, METH_VARARGS
| METH_KEYWORDS
},
3283 { "wxImage_GetMaskBlue", (PyCFunction
) _wrap_wxImage_GetMaskBlue
, METH_VARARGS
| METH_KEYWORDS
},
3284 { "wxImage_GetMaskGreen", (PyCFunction
) _wrap_wxImage_GetMaskGreen
, METH_VARARGS
| METH_KEYWORDS
},
3285 { "wxImage_GetMaskRed", (PyCFunction
) _wrap_wxImage_GetMaskRed
, METH_VARARGS
| METH_KEYWORDS
},
3286 { "wxImage_SetMaskColour", (PyCFunction
) _wrap_wxImage_SetMaskColour
, METH_VARARGS
| METH_KEYWORDS
},
3287 { "wxImage_SetData", (PyCFunction
) _wrap_wxImage_SetData
, METH_VARARGS
| METH_KEYWORDS
},
3288 { "wxImage_GetData", (PyCFunction
) _wrap_wxImage_GetData
, METH_VARARGS
| METH_KEYWORDS
},
3289 { "wxImage_Paste", (PyCFunction
) _wrap_wxImage_Paste
, METH_VARARGS
| METH_KEYWORDS
},
3290 { "wxImage_Copy", (PyCFunction
) _wrap_wxImage_Copy
, METH_VARARGS
| METH_KEYWORDS
},
3291 { "wxImage_GetSubImage", (PyCFunction
) _wrap_wxImage_GetSubImage
, METH_VARARGS
| METH_KEYWORDS
},
3292 { "wxImage_GetHeight", (PyCFunction
) _wrap_wxImage_GetHeight
, METH_VARARGS
| METH_KEYWORDS
},
3293 { "wxImage_GetWidth", (PyCFunction
) _wrap_wxImage_GetWidth
, METH_VARARGS
| METH_KEYWORDS
},
3294 { "wxImage_Ok", (PyCFunction
) _wrap_wxImage_Ok
, METH_VARARGS
| METH_KEYWORDS
},
3295 { "wxImage_LoadMimeStream", (PyCFunction
) _wrap_wxImage_LoadMimeStream
, METH_VARARGS
| METH_KEYWORDS
},
3296 { "wxImage_LoadStream", (PyCFunction
) _wrap_wxImage_LoadStream
, METH_VARARGS
| METH_KEYWORDS
},
3297 { "wxImage_CanReadStream", (PyCFunction
) _wrap_wxImage_CanReadStream
, METH_VARARGS
| METH_KEYWORDS
},
3298 { "wxImage_SaveMimeFile", (PyCFunction
) _wrap_wxImage_SaveMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3299 { "wxImage_SaveFile", (PyCFunction
) _wrap_wxImage_SaveFile
, METH_VARARGS
| METH_KEYWORDS
},
3300 { "wxImage_LoadMimeFile", (PyCFunction
) _wrap_wxImage_LoadMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3301 { "wxImage_LoadFile", (PyCFunction
) _wrap_wxImage_LoadFile
, METH_VARARGS
| METH_KEYWORDS
},
3302 { "wxImage_GetImageCount", (PyCFunction
) _wrap_wxImage_GetImageCount
, METH_VARARGS
| METH_KEYWORDS
},
3303 { "wxImage_CanRead", (PyCFunction
) _wrap_wxImage_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3304 { "wxImage_GetBlue", (PyCFunction
) _wrap_wxImage_GetBlue
, METH_VARARGS
| METH_KEYWORDS
},
3305 { "wxImage_GetGreen", (PyCFunction
) _wrap_wxImage_GetGreen
, METH_VARARGS
| METH_KEYWORDS
},
3306 { "wxImage_GetRed", (PyCFunction
) _wrap_wxImage_GetRed
, METH_VARARGS
| METH_KEYWORDS
},
3307 { "wxImage_SetRGB", (PyCFunction
) _wrap_wxImage_SetRGB
, METH_VARARGS
| METH_KEYWORDS
},
3308 { "wxImage_Rescale", (PyCFunction
) _wrap_wxImage_Rescale
, METH_VARARGS
| METH_KEYWORDS
},
3309 { "wxImage_Scale", (PyCFunction
) _wrap_wxImage_Scale
, METH_VARARGS
| METH_KEYWORDS
},
3310 { "wxImage_Destroy", (PyCFunction
) _wrap_wxImage_Destroy
, METH_VARARGS
| METH_KEYWORDS
},
3311 { "wxImage_Create", (PyCFunction
) _wrap_wxImage_Create
, METH_VARARGS
| METH_KEYWORDS
},
3312 { "wxImage_ConvertToBitmap", (PyCFunction
) _wrap_wxImage_ConvertToBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3313 { "delete_wxImage", (PyCFunction
) _wrap_delete_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3314 { "new_wxImage", (PyCFunction
) _wrap_new_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3315 { "new_wxTIFFHandler", (PyCFunction
) _wrap_new_wxTIFFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3316 { "new_wxPCXHandler", (PyCFunction
) _wrap_new_wxPCXHandler
, METH_VARARGS
| METH_KEYWORDS
},
3317 { "new_wxPNMHandler", (PyCFunction
) _wrap_new_wxPNMHandler
, METH_VARARGS
| METH_KEYWORDS
},
3318 { "new_wxGIFHandler", (PyCFunction
) _wrap_new_wxGIFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3319 { "new_wxANIHandler", (PyCFunction
) _wrap_new_wxANIHandler
, METH_VARARGS
| METH_KEYWORDS
},
3320 { "new_wxCURHandler", (PyCFunction
) _wrap_new_wxCURHandler
, METH_VARARGS
| METH_KEYWORDS
},
3321 { "new_wxICOHandler", (PyCFunction
) _wrap_new_wxICOHandler
, METH_VARARGS
| METH_KEYWORDS
},
3322 { "new_wxBMPHandler", (PyCFunction
) _wrap_new_wxBMPHandler
, METH_VARARGS
| METH_KEYWORDS
},
3323 { "new_wxJPEGHandler", (PyCFunction
) _wrap_new_wxJPEGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3324 { "new_wxPNGHandler", (PyCFunction
) _wrap_new_wxPNGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3325 { "wxImageHandler_SetMimeType", (PyCFunction
) _wrap_wxImageHandler_SetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3326 { "wxImageHandler_SetType", (PyCFunction
) _wrap_wxImageHandler_SetType
, METH_VARARGS
| METH_KEYWORDS
},
3327 { "wxImageHandler_SetExtension", (PyCFunction
) _wrap_wxImageHandler_SetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3328 { "wxImageHandler_SetName", (PyCFunction
) _wrap_wxImageHandler_SetName
, METH_VARARGS
| METH_KEYWORDS
},
3329 { "wxImageHandler_CanRead", (PyCFunction
) _wrap_wxImageHandler_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3330 { "wxImageHandler_GetMimeType", (PyCFunction
) _wrap_wxImageHandler_GetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3331 { "wxImageHandler_GetType", (PyCFunction
) _wrap_wxImageHandler_GetType
, METH_VARARGS
| METH_KEYWORDS
},
3332 { "wxImageHandler_GetExtension", (PyCFunction
) _wrap_wxImageHandler_GetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3333 { "wxImageHandler_GetName", (PyCFunction
) _wrap_wxImageHandler_GetName
, METH_VARARGS
| METH_KEYWORDS
},
3334 { "wxBitmapFromImage", (PyCFunction
) _wrap_wxBitmapFromImage
, METH_VARARGS
| METH_KEYWORDS
},
3335 { "wxInitAllImageHandlers", (PyCFunction
) _wrap_wxInitAllImageHandlers
, METH_VARARGS
| METH_KEYWORDS
},
3336 { "wxImageFromStreamMime", (PyCFunction
) _wrap_wxImageFromStreamMime
, METH_VARARGS
| METH_KEYWORDS
},
3337 { "wxImageFromStream", (PyCFunction
) _wrap_wxImageFromStream
, METH_VARARGS
| METH_KEYWORDS
},
3338 { "wxImageFromData", (PyCFunction
) _wrap_wxImageFromData
, METH_VARARGS
| METH_KEYWORDS
},
3339 { "wxImageFromBitmap", (PyCFunction
) _wrap_wxImageFromBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3340 { "wxImageFromMime", (PyCFunction
) _wrap_wxImageFromMime
, METH_VARARGS
| METH_KEYWORDS
},
3341 { "wxEmptyImage", (PyCFunction
) _wrap_wxEmptyImage
, METH_VARARGS
| METH_KEYWORDS
},
3348 * This table is used by the pointer type-checker
3350 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
3351 { "_signed_long","_long",0},
3352 { "_wxBMPHandler","_wxANIHandler",SwigwxANIHandlerTowxBMPHandler
},
3353 { "_wxBMPHandler","_wxCURHandler",SwigwxCURHandlerTowxBMPHandler
},
3354 { "_wxBMPHandler","_wxICOHandler",SwigwxICOHandlerTowxBMPHandler
},
3355 { "_wxICOHandler","_wxANIHandler",SwigwxANIHandlerTowxICOHandler
},
3356 { "_wxICOHandler","_wxCURHandler",SwigwxCURHandlerTowxICOHandler
},
3357 { "_wxPrintQuality","_wxCoord",0},
3358 { "_wxPrintQuality","_int",0},
3359 { "_wxPrintQuality","_signed_int",0},
3360 { "_wxPrintQuality","_unsigned_int",0},
3361 { "_wxPrintQuality","_wxWindowID",0},
3362 { "_wxPrintQuality","_uint",0},
3363 { "_wxPrintQuality","_EBool",0},
3364 { "_wxPrintQuality","_size_t",0},
3365 { "_wxPrintQuality","_time_t",0},
3366 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler
},
3367 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler
},
3368 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler
},
3369 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler
},
3370 { "_wxImageHandler","_wxANIHandler",SwigwxANIHandlerTowxImageHandler
},
3371 { "_wxImageHandler","_wxCURHandler",SwigwxCURHandlerTowxImageHandler
},
3372 { "_wxImageHandler","_wxICOHandler",SwigwxICOHandlerTowxImageHandler
},
3373 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler
},
3374 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler
},
3375 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler
},
3376 { "_byte","_unsigned_char",0},
3377 { "_long","_unsigned_long",0},
3378 { "_long","_signed_long",0},
3379 { "_size_t","_wxCoord",0},
3380 { "_size_t","_wxPrintQuality",0},
3381 { "_size_t","_time_t",0},
3382 { "_size_t","_unsigned_int",0},
3383 { "_size_t","_int",0},
3384 { "_size_t","_wxWindowID",0},
3385 { "_size_t","_uint",0},
3386 { "_uint","_wxCoord",0},
3387 { "_uint","_wxPrintQuality",0},
3388 { "_uint","_time_t",0},
3389 { "_uint","_size_t",0},
3390 { "_uint","_unsigned_int",0},
3391 { "_uint","_int",0},
3392 { "_uint","_wxWindowID",0},
3393 { "_wxChar","_char",0},
3394 { "_char","_wxChar",0},
3395 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
3396 { "_EBool","_wxCoord",0},
3397 { "_EBool","_wxPrintQuality",0},
3398 { "_EBool","_signed_int",0},
3399 { "_EBool","_int",0},
3400 { "_EBool","_wxWindowID",0},
3401 { "_unsigned_long","_long",0},
3402 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
3403 { "_signed_int","_wxCoord",0},
3404 { "_signed_int","_wxPrintQuality",0},
3405 { "_signed_int","_EBool",0},
3406 { "_signed_int","_wxWindowID",0},
3407 { "_signed_int","_int",0},
3408 { "_WXTYPE","_short",0},
3409 { "_WXTYPE","_signed_short",0},
3410 { "_WXTYPE","_unsigned_short",0},
3411 { "_unsigned_short","_WXTYPE",0},
3412 { "_unsigned_short","_short",0},
3413 { "_wxObject","_wxImage",SwigwxImageTowxObject
},
3414 { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject
},
3415 { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject
},
3416 { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject
},
3417 { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject
},
3418 { "_wxObject","_wxANIHandler",SwigwxANIHandlerTowxObject
},
3419 { "_wxObject","_wxCURHandler",SwigwxCURHandlerTowxObject
},
3420 { "_wxObject","_wxICOHandler",SwigwxICOHandlerTowxObject
},
3421 { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject
},
3422 { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject
},
3423 { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject
},
3424 { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject
},
3425 { "_signed_short","_WXTYPE",0},
3426 { "_signed_short","_short",0},
3427 { "_wxCURHandler","_wxANIHandler",SwigwxANIHandlerTowxCURHandler
},
3428 { "_unsigned_char","_byte",0},
3429 { "_unsigned_int","_wxCoord",0},
3430 { "_unsigned_int","_wxPrintQuality",0},
3431 { "_unsigned_int","_time_t",0},
3432 { "_unsigned_int","_size_t",0},
3433 { "_unsigned_int","_uint",0},
3434 { "_unsigned_int","_wxWindowID",0},
3435 { "_unsigned_int","_int",0},
3436 { "_short","_WXTYPE",0},
3437 { "_short","_unsigned_short",0},
3438 { "_short","_signed_short",0},
3439 { "_wxWindowID","_wxCoord",0},
3440 { "_wxWindowID","_wxPrintQuality",0},
3441 { "_wxWindowID","_time_t",0},
3442 { "_wxWindowID","_size_t",0},
3443 { "_wxWindowID","_EBool",0},
3444 { "_wxWindowID","_uint",0},
3445 { "_wxWindowID","_int",0},
3446 { "_wxWindowID","_signed_int",0},
3447 { "_wxWindowID","_unsigned_int",0},
3448 { "_int","_wxCoord",0},
3449 { "_int","_wxPrintQuality",0},
3450 { "_int","_time_t",0},
3451 { "_int","_size_t",0},
3452 { "_int","_EBool",0},
3453 { "_int","_uint",0},
3454 { "_int","_wxWindowID",0},
3455 { "_int","_unsigned_int",0},
3456 { "_int","_signed_int",0},
3457 { "_time_t","_wxCoord",0},
3458 { "_time_t","_wxPrintQuality",0},
3459 { "_time_t","_unsigned_int",0},
3460 { "_time_t","_int",0},
3461 { "_time_t","_wxWindowID",0},
3462 { "_time_t","_uint",0},
3463 { "_time_t","_size_t",0},
3464 { "_wxCoord","_int",0},
3465 { "_wxCoord","_signed_int",0},
3466 { "_wxCoord","_unsigned_int",0},
3467 { "_wxCoord","_wxWindowID",0},
3468 { "_wxCoord","_uint",0},
3469 { "_wxCoord","_EBool",0},
3470 { "_wxCoord","_size_t",0},
3471 { "_wxCoord","_time_t",0},
3472 { "_wxCoord","_wxPrintQuality",0},
3475 static PyObject
*SWIG_globals
;
3479 SWIGEXPORT(void) initimagec() {
3481 SWIG_globals
= SWIG_newvarlink();
3482 m
= Py_InitModule("imagec", imagecMethods
);
3483 d
= PyModule_GetDict(m
);
3484 PyDict_SetItemString(d
,"cvar", SWIG_globals
);
3485 SWIG_addvarlink(SWIG_globals
,"wxNullImage",_wrap_wxNullImage_get
, _wrap_wxNullImage_set
);
3488 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
3489 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);