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"
59 #include "pyistream.h"
63 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
69 } else if (target
== Py_None
) {
73 if (!PyTuple_Check(target
)) {
75 target
= PyTuple_New(1);
76 PyTuple_SetItem(target
, 0, o2
);
79 PyTuple_SetItem(o3
, 0, o
);
82 target
= PySequence_Concat(o2
, o3
);
89 #if PYTHON_API_VERSION >= 1009
90 static char* wxStringErrorMsg
= "String or Unicode type required";
92 static char* wxStringErrorMsg
= "String type required";
95 wxImage
* wxEmptyImage(int width
=0, int height
=0) {
96 if (width
== 0 && height
== 0)
99 return new wxImage(width
, height
);
103 wxImage
* wxImageFromMime(const wxString
& name
, const wxString
& mimetype
, int index
) {
104 return new wxImage(name
, mimetype
, index
);
108 wxImage
* wxImageFromBitmap(const wxBitmap
&bitmap
) {
109 return new wxImage(bitmap
);
113 wxImage
* wxImageFromData(int width
, int height
, unsigned char* data
) {
114 // Copy the source data so the wxImage can clean it up later
115 unsigned char* copy
= (unsigned char*)malloc(width
*height
*3);
120 memcpy(copy
, data
, width
*height
*3);
121 return new wxImage(width
, height
, copy
, FALSE
);
125 wxImage
* wxImageFromStream(wxInputStream
& stream
,
126 long type
= wxBITMAP_TYPE_ANY
, int index
= -1) {
127 return new wxImage(stream
, type
, index
);
131 wxImage
* wxImageFromStreamMime(wxInputStream
& stream
,
132 const wxString
& mimetype
, int index
= -1 ) {
133 return new wxImage(stream
, mimetype
, index
);
137 extern wxImage wxNullImage
;
141 wxBitmap
* wxBitmapFromImage(const wxImage
& img
, int depth
=-1) {
142 return new wxBitmap(img
, depth
);
148 static PyObject
*_wrap_wxEmptyImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
149 PyObject
* _resultobj
;
151 int _arg0
= (int ) 0;
152 int _arg1
= (int ) 0;
153 char *_kwnames
[] = { "width","height", NULL
};
157 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"|ii:wxEmptyImage",_kwnames
,&_arg0
,&_arg1
))
160 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
161 _result
= (wxImage
*)wxEmptyImage(_arg0
,_arg1
);
163 wxPyEndAllowThreads(__tstate
);
164 if (PyErr_Occurred()) return NULL
;
166 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
167 _resultobj
= Py_BuildValue("s",_ptemp
);
170 _resultobj
= Py_None
;
175 static PyObject
*_wrap_wxImageFromMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
176 PyObject
* _resultobj
;
180 int _arg2
= (int ) -1;
181 PyObject
* _obj0
= 0;
182 PyObject
* _obj1
= 0;
183 char *_kwnames
[] = { "name","mimetype","index", NULL
};
187 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
190 #if PYTHON_API_VERSION >= 1009
191 char* tmpPtr
; int tmpSize
;
192 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
193 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
196 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
198 _arg0
= new wxString(tmpPtr
, tmpSize
);
200 if (!PyString_Check(_obj0
)) {
201 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
204 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
208 #if PYTHON_API_VERSION >= 1009
209 char* tmpPtr
; int tmpSize
;
210 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
211 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
214 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
216 _arg1
= new wxString(tmpPtr
, tmpSize
);
218 if (!PyString_Check(_obj1
)) {
219 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
222 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
226 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
227 _result
= (wxImage
*)wxImageFromMime(*_arg0
,*_arg1
,_arg2
);
229 wxPyEndAllowThreads(__tstate
);
230 if (PyErr_Occurred()) return NULL
;
232 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
233 _resultobj
= Py_BuildValue("s",_ptemp
);
236 _resultobj
= Py_None
;
249 static PyObject
*_wrap_wxImageFromBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
250 PyObject
* _resultobj
;
253 PyObject
* _argo0
= 0;
254 char *_kwnames
[] = { "bitmap", NULL
};
258 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageFromBitmap",_kwnames
,&_argo0
))
261 if (_argo0
== Py_None
) { _arg0
= NULL
; }
262 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxBitmap_p")) {
263 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
268 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
269 _result
= (wxImage
*)wxImageFromBitmap(*_arg0
);
271 wxPyEndAllowThreads(__tstate
);
272 if (PyErr_Occurred()) return NULL
;
274 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
275 _resultobj
= Py_BuildValue("s",_ptemp
);
278 _resultobj
= Py_None
;
283 static PyObject
*_wrap_wxImageFromData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
284 PyObject
* _resultobj
;
288 unsigned char * _arg2
;
289 PyObject
* _argo2
= 0;
290 char *_kwnames
[] = { "width","height","data", NULL
};
294 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iiO:wxImageFromData",_kwnames
,&_arg0
,&_arg1
,&_argo2
))
297 if (_argo2
== Py_None
) { _arg2
= NULL
; }
298 else if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_unsigned_char_p")) {
299 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of wxImageFromData. Expected _unsigned_char_p.");
304 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
305 _result
= (wxImage
*)wxImageFromData(_arg0
,_arg1
,_arg2
);
307 wxPyEndAllowThreads(__tstate
);
308 if (PyErr_Occurred()) return NULL
;
310 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
311 _resultobj
= Py_BuildValue("s",_ptemp
);
314 _resultobj
= Py_None
;
319 static PyObject
*_wrap_wxImageFromStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
320 PyObject
* _resultobj
;
322 wxInputStream
* _arg0
;
323 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
324 int _arg2
= (int ) -1;
325 wxPyInputStream
* temp
;
327 PyObject
* _obj0
= 0;
328 char *_kwnames
[] = { "stream","type","index", NULL
};
332 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:wxImageFromStream",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
335 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
336 _arg0
= temp
->m_wxis
;
339 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
341 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
348 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
349 _result
= (wxImage
*)wxImageFromStream(*_arg0
,_arg1
,_arg2
);
351 wxPyEndAllowThreads(__tstate
);
352 if (PyErr_Occurred()) return NULL
;
354 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
355 _resultobj
= Py_BuildValue("s",_ptemp
);
358 _resultobj
= Py_None
;
367 static PyObject
*_wrap_wxImageFromStreamMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
368 PyObject
* _resultobj
;
370 wxInputStream
* _arg0
;
372 int _arg2
= (int ) -1;
373 wxPyInputStream
* temp
;
375 PyObject
* _obj0
= 0;
376 PyObject
* _obj1
= 0;
377 char *_kwnames
[] = { "stream","mimetype","index", NULL
};
381 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromStreamMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
384 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
385 _arg0
= temp
->m_wxis
;
388 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
390 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
397 #if PYTHON_API_VERSION >= 1009
398 char* tmpPtr
; int tmpSize
;
399 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
400 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
403 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
405 _arg1
= new wxString(tmpPtr
, tmpSize
);
407 if (!PyString_Check(_obj1
)) {
408 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
411 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
415 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
416 _result
= (wxImage
*)wxImageFromStreamMime(*_arg0
,*_arg1
,_arg2
);
418 wxPyEndAllowThreads(__tstate
);
419 if (PyErr_Occurred()) return NULL
;
421 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
422 _resultobj
= Py_BuildValue("s",_ptemp
);
425 _resultobj
= Py_None
;
438 static PyObject
*_wrap_wxInitAllImageHandlers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
439 PyObject
* _resultobj
;
440 char *_kwnames
[] = { NULL
};
443 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":wxInitAllImageHandlers",_kwnames
))
446 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
447 wxInitAllImageHandlers();
449 wxPyEndAllowThreads(__tstate
);
450 if (PyErr_Occurred()) return NULL
;
451 } Py_INCREF(Py_None
);
452 _resultobj
= Py_None
;
456 static int _wrap_wxNullImage_set(PyObject
*val
) {
458 PyErr_SetString(PyExc_TypeError
,"Variable wxNullImage is read-only.");
462 static PyObject
*_wrap_wxNullImage_get() {
466 SWIG_MakePtr(ptemp
,(char *) &wxNullImage
,"_wxImage_p");
467 pyobj
= PyString_FromString(ptemp
);
471 static PyObject
*_wrap_wxBitmapFromImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
472 PyObject
* _resultobj
;
475 int _arg1
= (int ) -1;
476 PyObject
* _argo0
= 0;
477 char *_kwnames
[] = { "img","depth", NULL
};
481 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxBitmapFromImage",_kwnames
,&_argo0
,&_arg1
))
484 if (_argo0
== Py_None
) { _arg0
= NULL
; }
485 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
486 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
491 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
492 _result
= (wxBitmap
*)wxBitmapFromImage(*_arg0
,_arg1
);
494 wxPyEndAllowThreads(__tstate
);
495 if (PyErr_Occurred()) return NULL
;
497 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBitmap_p");
498 _resultobj
= Py_BuildValue("s",_ptemp
);
501 _resultobj
= Py_None
;
506 static void *SwigwxImageHandlerTowxObject(void *ptr
) {
509 src
= (wxImageHandler
*) ptr
;
510 dest
= (wxObject
*) src
;
511 return (void *) dest
;
514 #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
515 static PyObject
*_wrap_wxImageHandler_GetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
516 PyObject
* _resultobj
;
518 wxImageHandler
* _arg0
;
519 PyObject
* _argo0
= 0;
520 char *_kwnames
[] = { "self", NULL
};
523 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetName",_kwnames
,&_argo0
))
526 if (_argo0
== Py_None
) { _arg0
= NULL
; }
527 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
528 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetName. Expected _wxImageHandler_p.");
533 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
534 _result
= new wxString (wxImageHandler_GetName(_arg0
));
536 wxPyEndAllowThreads(__tstate
);
537 if (PyErr_Occurred()) return NULL
;
539 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
547 #define wxImageHandler_GetExtension(_swigobj) (_swigobj->GetExtension())
548 static PyObject
*_wrap_wxImageHandler_GetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
549 PyObject
* _resultobj
;
551 wxImageHandler
* _arg0
;
552 PyObject
* _argo0
= 0;
553 char *_kwnames
[] = { "self", NULL
};
556 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetExtension",_kwnames
,&_argo0
))
559 if (_argo0
== Py_None
) { _arg0
= NULL
; }
560 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
561 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetExtension. Expected _wxImageHandler_p.");
566 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
567 _result
= new wxString (wxImageHandler_GetExtension(_arg0
));
569 wxPyEndAllowThreads(__tstate
);
570 if (PyErr_Occurred()) return NULL
;
572 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
580 #define wxImageHandler_GetType(_swigobj) (_swigobj->GetType())
581 static PyObject
*_wrap_wxImageHandler_GetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
582 PyObject
* _resultobj
;
584 wxImageHandler
* _arg0
;
585 PyObject
* _argo0
= 0;
586 char *_kwnames
[] = { "self", NULL
};
589 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetType",_kwnames
,&_argo0
))
592 if (_argo0
== Py_None
) { _arg0
= NULL
; }
593 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
594 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetType. Expected _wxImageHandler_p.");
599 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
600 _result
= (long )wxImageHandler_GetType(_arg0
);
602 wxPyEndAllowThreads(__tstate
);
603 if (PyErr_Occurred()) return NULL
;
604 } _resultobj
= Py_BuildValue("l",_result
);
608 #define wxImageHandler_GetMimeType(_swigobj) (_swigobj->GetMimeType())
609 static PyObject
*_wrap_wxImageHandler_GetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
610 PyObject
* _resultobj
;
612 wxImageHandler
* _arg0
;
613 PyObject
* _argo0
= 0;
614 char *_kwnames
[] = { "self", NULL
};
617 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetMimeType",_kwnames
,&_argo0
))
620 if (_argo0
== Py_None
) { _arg0
= NULL
; }
621 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
622 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetMimeType. Expected _wxImageHandler_p.");
627 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
628 _result
= new wxString (wxImageHandler_GetMimeType(_arg0
));
630 wxPyEndAllowThreads(__tstate
);
631 if (PyErr_Occurred()) return NULL
;
633 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
641 #define wxImageHandler_CanRead(_swigobj,_swigarg0) (_swigobj->CanRead(_swigarg0))
642 static PyObject
*_wrap_wxImageHandler_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
643 PyObject
* _resultobj
;
645 wxImageHandler
* _arg0
;
647 PyObject
* _argo0
= 0;
648 PyObject
* _obj1
= 0;
649 char *_kwnames
[] = { "self","name", NULL
};
652 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_CanRead",_kwnames
,&_argo0
,&_obj1
))
655 if (_argo0
== Py_None
) { _arg0
= NULL
; }
656 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
657 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_CanRead. Expected _wxImageHandler_p.");
662 #if PYTHON_API_VERSION >= 1009
663 char* tmpPtr
; int tmpSize
;
664 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
665 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
668 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
670 _arg1
= new wxString(tmpPtr
, tmpSize
);
672 if (!PyString_Check(_obj1
)) {
673 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
676 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
680 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
681 _result
= (bool )wxImageHandler_CanRead(_arg0
,*_arg1
);
683 wxPyEndAllowThreads(__tstate
);
684 if (PyErr_Occurred()) return NULL
;
685 } _resultobj
= Py_BuildValue("i",_result
);
693 #define wxImageHandler_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
694 static PyObject
*_wrap_wxImageHandler_SetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
695 PyObject
* _resultobj
;
696 wxImageHandler
* _arg0
;
698 PyObject
* _argo0
= 0;
699 PyObject
* _obj1
= 0;
700 char *_kwnames
[] = { "self","name", NULL
};
703 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetName",_kwnames
,&_argo0
,&_obj1
))
706 if (_argo0
== Py_None
) { _arg0
= NULL
; }
707 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
708 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetName. Expected _wxImageHandler_p.");
713 #if PYTHON_API_VERSION >= 1009
714 char* tmpPtr
; int tmpSize
;
715 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
716 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
719 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
721 _arg1
= new wxString(tmpPtr
, tmpSize
);
723 if (!PyString_Check(_obj1
)) {
724 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
727 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
731 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
732 wxImageHandler_SetName(_arg0
,*_arg1
);
734 wxPyEndAllowThreads(__tstate
);
735 if (PyErr_Occurred()) return NULL
;
736 } Py_INCREF(Py_None
);
737 _resultobj
= Py_None
;
745 #define wxImageHandler_SetExtension(_swigobj,_swigarg0) (_swigobj->SetExtension(_swigarg0))
746 static PyObject
*_wrap_wxImageHandler_SetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
747 PyObject
* _resultobj
;
748 wxImageHandler
* _arg0
;
750 PyObject
* _argo0
= 0;
751 PyObject
* _obj1
= 0;
752 char *_kwnames
[] = { "self","extension", NULL
};
755 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetExtension",_kwnames
,&_argo0
,&_obj1
))
758 if (_argo0
== Py_None
) { _arg0
= NULL
; }
759 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
760 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetExtension. Expected _wxImageHandler_p.");
765 #if PYTHON_API_VERSION >= 1009
766 char* tmpPtr
; int tmpSize
;
767 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
768 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
771 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
773 _arg1
= new wxString(tmpPtr
, tmpSize
);
775 if (!PyString_Check(_obj1
)) {
776 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
779 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
783 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
784 wxImageHandler_SetExtension(_arg0
,*_arg1
);
786 wxPyEndAllowThreads(__tstate
);
787 if (PyErr_Occurred()) return NULL
;
788 } Py_INCREF(Py_None
);
789 _resultobj
= Py_None
;
797 #define wxImageHandler_SetType(_swigobj,_swigarg0) (_swigobj->SetType(_swigarg0))
798 static PyObject
*_wrap_wxImageHandler_SetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
799 PyObject
* _resultobj
;
800 wxImageHandler
* _arg0
;
802 PyObject
* _argo0
= 0;
803 char *_kwnames
[] = { "self","type", NULL
};
806 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Ol:wxImageHandler_SetType",_kwnames
,&_argo0
,&_arg1
))
809 if (_argo0
== Py_None
) { _arg0
= NULL
; }
810 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
811 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetType. Expected _wxImageHandler_p.");
816 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
817 wxImageHandler_SetType(_arg0
,_arg1
);
819 wxPyEndAllowThreads(__tstate
);
820 if (PyErr_Occurred()) return NULL
;
821 } Py_INCREF(Py_None
);
822 _resultobj
= Py_None
;
826 #define wxImageHandler_SetMimeType(_swigobj,_swigarg0) (_swigobj->SetMimeType(_swigarg0))
827 static PyObject
*_wrap_wxImageHandler_SetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
828 PyObject
* _resultobj
;
829 wxImageHandler
* _arg0
;
831 PyObject
* _argo0
= 0;
832 PyObject
* _obj1
= 0;
833 char *_kwnames
[] = { "self","mimetype", NULL
};
836 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetMimeType",_kwnames
,&_argo0
,&_obj1
))
839 if (_argo0
== Py_None
) { _arg0
= NULL
; }
840 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
841 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetMimeType. Expected _wxImageHandler_p.");
846 #if PYTHON_API_VERSION >= 1009
847 char* tmpPtr
; int tmpSize
;
848 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
849 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
852 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
854 _arg1
= new wxString(tmpPtr
, tmpSize
);
856 if (!PyString_Check(_obj1
)) {
857 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
860 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
864 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
865 wxImageHandler_SetMimeType(_arg0
,*_arg1
);
867 wxPyEndAllowThreads(__tstate
);
868 if (PyErr_Occurred()) return NULL
;
869 } Py_INCREF(Py_None
);
870 _resultobj
= Py_None
;
878 static void *SwigwxPNGHandlerTowxImageHandler(void *ptr
) {
880 wxImageHandler
*dest
;
881 src
= (wxPNGHandler
*) ptr
;
882 dest
= (wxImageHandler
*) src
;
883 return (void *) dest
;
886 static void *SwigwxPNGHandlerTowxObject(void *ptr
) {
889 src
= (wxPNGHandler
*) ptr
;
890 dest
= (wxObject
*) src
;
891 return (void *) dest
;
894 #define new_wxPNGHandler() (new wxPNGHandler())
895 static PyObject
*_wrap_new_wxPNGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
896 PyObject
* _resultobj
;
897 wxPNGHandler
* _result
;
898 char *_kwnames
[] = { NULL
};
902 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNGHandler",_kwnames
))
905 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
906 _result
= (wxPNGHandler
*)new_wxPNGHandler();
908 wxPyEndAllowThreads(__tstate
);
909 if (PyErr_Occurred()) return NULL
;
911 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNGHandler_p");
912 _resultobj
= Py_BuildValue("s",_ptemp
);
915 _resultobj
= Py_None
;
920 static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr
) {
922 wxImageHandler
*dest
;
923 src
= (wxJPEGHandler
*) ptr
;
924 dest
= (wxImageHandler
*) src
;
925 return (void *) dest
;
928 static void *SwigwxJPEGHandlerTowxObject(void *ptr
) {
931 src
= (wxJPEGHandler
*) ptr
;
932 dest
= (wxObject
*) src
;
933 return (void *) dest
;
936 #define new_wxJPEGHandler() (new wxJPEGHandler())
937 static PyObject
*_wrap_new_wxJPEGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
938 PyObject
* _resultobj
;
939 wxJPEGHandler
* _result
;
940 char *_kwnames
[] = { NULL
};
944 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxJPEGHandler",_kwnames
))
947 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
948 _result
= (wxJPEGHandler
*)new_wxJPEGHandler();
950 wxPyEndAllowThreads(__tstate
);
951 if (PyErr_Occurred()) return NULL
;
953 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxJPEGHandler_p");
954 _resultobj
= Py_BuildValue("s",_ptemp
);
957 _resultobj
= Py_None
;
962 static void *SwigwxBMPHandlerTowxImageHandler(void *ptr
) {
964 wxImageHandler
*dest
;
965 src
= (wxBMPHandler
*) ptr
;
966 dest
= (wxImageHandler
*) src
;
967 return (void *) dest
;
970 static void *SwigwxBMPHandlerTowxObject(void *ptr
) {
973 src
= (wxBMPHandler
*) ptr
;
974 dest
= (wxObject
*) src
;
975 return (void *) dest
;
978 #define new_wxBMPHandler() (new wxBMPHandler())
979 static PyObject
*_wrap_new_wxBMPHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
980 PyObject
* _resultobj
;
981 wxBMPHandler
* _result
;
982 char *_kwnames
[] = { NULL
};
986 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxBMPHandler",_kwnames
))
989 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
990 _result
= (wxBMPHandler
*)new_wxBMPHandler();
992 wxPyEndAllowThreads(__tstate
);
993 if (PyErr_Occurred()) return NULL
;
995 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBMPHandler_p");
996 _resultobj
= Py_BuildValue("s",_ptemp
);
999 _resultobj
= Py_None
;
1004 static void *SwigwxICOHandlerTowxBMPHandler(void *ptr
) {
1007 src
= (wxICOHandler
*) ptr
;
1008 dest
= (wxBMPHandler
*) src
;
1009 return (void *) dest
;
1012 static void *SwigwxICOHandlerTowxImageHandler(void *ptr
) {
1014 wxImageHandler
*dest
;
1015 src
= (wxICOHandler
*) ptr
;
1016 dest
= (wxImageHandler
*) src
;
1017 return (void *) dest
;
1020 static void *SwigwxICOHandlerTowxObject(void *ptr
) {
1023 src
= (wxICOHandler
*) ptr
;
1024 dest
= (wxObject
*) src
;
1025 return (void *) dest
;
1028 #define new_wxICOHandler() (new wxICOHandler())
1029 static PyObject
*_wrap_new_wxICOHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1030 PyObject
* _resultobj
;
1031 wxICOHandler
* _result
;
1032 char *_kwnames
[] = { NULL
};
1036 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxICOHandler",_kwnames
))
1039 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1040 _result
= (wxICOHandler
*)new_wxICOHandler();
1042 wxPyEndAllowThreads(__tstate
);
1043 if (PyErr_Occurred()) return NULL
;
1045 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxICOHandler_p");
1046 _resultobj
= Py_BuildValue("s",_ptemp
);
1049 _resultobj
= Py_None
;
1054 static void *SwigwxCURHandlerTowxICOHandler(void *ptr
) {
1057 src
= (wxCURHandler
*) ptr
;
1058 dest
= (wxICOHandler
*) src
;
1059 return (void *) dest
;
1062 static void *SwigwxCURHandlerTowxBMPHandler(void *ptr
) {
1065 src
= (wxCURHandler
*) ptr
;
1066 dest
= (wxBMPHandler
*) src
;
1067 return (void *) dest
;
1070 static void *SwigwxCURHandlerTowxImageHandler(void *ptr
) {
1072 wxImageHandler
*dest
;
1073 src
= (wxCURHandler
*) ptr
;
1074 dest
= (wxImageHandler
*) src
;
1075 return (void *) dest
;
1078 static void *SwigwxCURHandlerTowxObject(void *ptr
) {
1081 src
= (wxCURHandler
*) ptr
;
1082 dest
= (wxObject
*) src
;
1083 return (void *) dest
;
1086 #define new_wxCURHandler() (new wxCURHandler())
1087 static PyObject
*_wrap_new_wxCURHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1088 PyObject
* _resultobj
;
1089 wxCURHandler
* _result
;
1090 char *_kwnames
[] = { NULL
};
1094 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxCURHandler",_kwnames
))
1097 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1098 _result
= (wxCURHandler
*)new_wxCURHandler();
1100 wxPyEndAllowThreads(__tstate
);
1101 if (PyErr_Occurred()) return NULL
;
1103 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxCURHandler_p");
1104 _resultobj
= Py_BuildValue("s",_ptemp
);
1107 _resultobj
= Py_None
;
1112 static void *SwigwxANIHandlerTowxCURHandler(void *ptr
) {
1115 src
= (wxANIHandler
*) ptr
;
1116 dest
= (wxCURHandler
*) src
;
1117 return (void *) dest
;
1120 static void *SwigwxANIHandlerTowxICOHandler(void *ptr
) {
1123 src
= (wxANIHandler
*) ptr
;
1124 dest
= (wxICOHandler
*) src
;
1125 return (void *) dest
;
1128 static void *SwigwxANIHandlerTowxBMPHandler(void *ptr
) {
1131 src
= (wxANIHandler
*) ptr
;
1132 dest
= (wxBMPHandler
*) src
;
1133 return (void *) dest
;
1136 static void *SwigwxANIHandlerTowxImageHandler(void *ptr
) {
1138 wxImageHandler
*dest
;
1139 src
= (wxANIHandler
*) ptr
;
1140 dest
= (wxImageHandler
*) src
;
1141 return (void *) dest
;
1144 static void *SwigwxANIHandlerTowxObject(void *ptr
) {
1147 src
= (wxANIHandler
*) ptr
;
1148 dest
= (wxObject
*) src
;
1149 return (void *) dest
;
1152 #define new_wxANIHandler() (new wxANIHandler())
1153 static PyObject
*_wrap_new_wxANIHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1154 PyObject
* _resultobj
;
1155 wxANIHandler
* _result
;
1156 char *_kwnames
[] = { NULL
};
1160 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxANIHandler",_kwnames
))
1163 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1164 _result
= (wxANIHandler
*)new_wxANIHandler();
1166 wxPyEndAllowThreads(__tstate
);
1167 if (PyErr_Occurred()) return NULL
;
1169 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxANIHandler_p");
1170 _resultobj
= Py_BuildValue("s",_ptemp
);
1173 _resultobj
= Py_None
;
1178 static void *SwigwxGIFHandlerTowxImageHandler(void *ptr
) {
1180 wxImageHandler
*dest
;
1181 src
= (wxGIFHandler
*) ptr
;
1182 dest
= (wxImageHandler
*) src
;
1183 return (void *) dest
;
1186 static void *SwigwxGIFHandlerTowxObject(void *ptr
) {
1189 src
= (wxGIFHandler
*) ptr
;
1190 dest
= (wxObject
*) src
;
1191 return (void *) dest
;
1194 #define new_wxGIFHandler() (new wxGIFHandler())
1195 static PyObject
*_wrap_new_wxGIFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1196 PyObject
* _resultobj
;
1197 wxGIFHandler
* _result
;
1198 char *_kwnames
[] = { NULL
};
1202 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxGIFHandler",_kwnames
))
1205 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1206 _result
= (wxGIFHandler
*)new_wxGIFHandler();
1208 wxPyEndAllowThreads(__tstate
);
1209 if (PyErr_Occurred()) return NULL
;
1211 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGIFHandler_p");
1212 _resultobj
= Py_BuildValue("s",_ptemp
);
1215 _resultobj
= Py_None
;
1220 static void *SwigwxPNMHandlerTowxImageHandler(void *ptr
) {
1222 wxImageHandler
*dest
;
1223 src
= (wxPNMHandler
*) ptr
;
1224 dest
= (wxImageHandler
*) src
;
1225 return (void *) dest
;
1228 static void *SwigwxPNMHandlerTowxObject(void *ptr
) {
1231 src
= (wxPNMHandler
*) ptr
;
1232 dest
= (wxObject
*) src
;
1233 return (void *) dest
;
1236 #define new_wxPNMHandler() (new wxPNMHandler())
1237 static PyObject
*_wrap_new_wxPNMHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1238 PyObject
* _resultobj
;
1239 wxPNMHandler
* _result
;
1240 char *_kwnames
[] = { NULL
};
1244 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNMHandler",_kwnames
))
1247 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1248 _result
= (wxPNMHandler
*)new_wxPNMHandler();
1250 wxPyEndAllowThreads(__tstate
);
1251 if (PyErr_Occurred()) return NULL
;
1253 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNMHandler_p");
1254 _resultobj
= Py_BuildValue("s",_ptemp
);
1257 _resultobj
= Py_None
;
1262 static void *SwigwxPCXHandlerTowxImageHandler(void *ptr
) {
1264 wxImageHandler
*dest
;
1265 src
= (wxPCXHandler
*) ptr
;
1266 dest
= (wxImageHandler
*) src
;
1267 return (void *) dest
;
1270 static void *SwigwxPCXHandlerTowxObject(void *ptr
) {
1273 src
= (wxPCXHandler
*) ptr
;
1274 dest
= (wxObject
*) src
;
1275 return (void *) dest
;
1278 #define new_wxPCXHandler() (new wxPCXHandler())
1279 static PyObject
*_wrap_new_wxPCXHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1280 PyObject
* _resultobj
;
1281 wxPCXHandler
* _result
;
1282 char *_kwnames
[] = { NULL
};
1286 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPCXHandler",_kwnames
))
1289 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1290 _result
= (wxPCXHandler
*)new_wxPCXHandler();
1292 wxPyEndAllowThreads(__tstate
);
1293 if (PyErr_Occurred()) return NULL
;
1295 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPCXHandler_p");
1296 _resultobj
= Py_BuildValue("s",_ptemp
);
1299 _resultobj
= Py_None
;
1304 static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr
) {
1306 wxImageHandler
*dest
;
1307 src
= (wxTIFFHandler
*) ptr
;
1308 dest
= (wxImageHandler
*) src
;
1309 return (void *) dest
;
1312 static void *SwigwxTIFFHandlerTowxObject(void *ptr
) {
1315 src
= (wxTIFFHandler
*) ptr
;
1316 dest
= (wxObject
*) src
;
1317 return (void *) dest
;
1320 #define new_wxTIFFHandler() (new wxTIFFHandler())
1321 static PyObject
*_wrap_new_wxTIFFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1322 PyObject
* _resultobj
;
1323 wxTIFFHandler
* _result
;
1324 char *_kwnames
[] = { NULL
};
1328 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxTIFFHandler",_kwnames
))
1331 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1332 _result
= (wxTIFFHandler
*)new_wxTIFFHandler();
1334 wxPyEndAllowThreads(__tstate
);
1335 if (PyErr_Occurred()) return NULL
;
1337 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxTIFFHandler_p");
1338 _resultobj
= Py_BuildValue("s",_ptemp
);
1341 _resultobj
= Py_None
;
1346 static void *SwigwxImageTowxObject(void *ptr
) {
1349 src
= (wxImage
*) ptr
;
1350 dest
= (wxObject
*) src
;
1351 return (void *) dest
;
1354 #define new_wxImage(_swigarg0,_swigarg1,_swigarg2) (new wxImage(_swigarg0,_swigarg1,_swigarg2))
1355 static PyObject
*_wrap_new_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1356 PyObject
* _resultobj
;
1359 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1360 int _arg2
= (int ) -1;
1361 PyObject
* _obj0
= 0;
1362 char *_kwnames
[] = { "name","type","index", NULL
};
1366 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:new_wxImage",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
1369 #if PYTHON_API_VERSION >= 1009
1370 char* tmpPtr
; int tmpSize
;
1371 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1372 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1375 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1377 _arg0
= new wxString(tmpPtr
, tmpSize
);
1379 if (!PyString_Check(_obj0
)) {
1380 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1383 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1387 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1388 _result
= (wxImage
*)new_wxImage(*_arg0
,_arg1
,_arg2
);
1390 wxPyEndAllowThreads(__tstate
);
1391 if (PyErr_Occurred()) return NULL
;
1393 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1394 _resultobj
= Py_BuildValue("s",_ptemp
);
1397 _resultobj
= Py_None
;
1406 #define delete_wxImage(_swigobj) (delete _swigobj)
1407 static PyObject
*_wrap_delete_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1408 PyObject
* _resultobj
;
1410 PyObject
* _argo0
= 0;
1411 char *_kwnames
[] = { "self", NULL
};
1414 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxImage",_kwnames
,&_argo0
))
1417 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1418 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1419 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxImage. Expected _wxImage_p.");
1424 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1425 delete_wxImage(_arg0
);
1427 wxPyEndAllowThreads(__tstate
);
1428 if (PyErr_Occurred()) return NULL
;
1429 } Py_INCREF(Py_None
);
1430 _resultobj
= Py_None
;
1434 #define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
1435 static PyObject
*_wrap_wxImage_ConvertToBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1436 PyObject
* _resultobj
;
1439 PyObject
* _argo0
= 0;
1440 char *_kwnames
[] = { "self", NULL
};
1444 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_ConvertToBitmap",_kwnames
,&_argo0
))
1447 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1448 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1449 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
1454 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1455 _result
= new wxBitmap (wxImage_ConvertToBitmap(_arg0
));
1457 wxPyEndAllowThreads(__tstate
);
1458 if (PyErr_Occurred()) return NULL
;
1459 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1460 _resultobj
= Py_BuildValue("s",_ptemp
);
1464 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
1465 static PyObject
*_wrap_wxImage_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1466 PyObject
* _resultobj
;
1470 PyObject
* _argo0
= 0;
1471 char *_kwnames
[] = { "self","width","height", NULL
};
1474 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Create",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1477 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1478 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1479 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
1484 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1485 wxImage_Create(_arg0
,_arg1
,_arg2
);
1487 wxPyEndAllowThreads(__tstate
);
1488 if (PyErr_Occurred()) return NULL
;
1489 } Py_INCREF(Py_None
);
1490 _resultobj
= Py_None
;
1494 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1495 static PyObject
*_wrap_wxImage_Destroy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1496 PyObject
* _resultobj
;
1498 PyObject
* _argo0
= 0;
1499 char *_kwnames
[] = { "self", NULL
};
1502 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Destroy",_kwnames
,&_argo0
))
1505 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1506 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1507 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1512 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1513 wxImage_Destroy(_arg0
);
1515 wxPyEndAllowThreads(__tstate
);
1516 if (PyErr_Occurred()) return NULL
;
1517 } Py_INCREF(Py_None
);
1518 _resultobj
= Py_None
;
1522 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1523 static PyObject
*_wrap_wxImage_Scale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1524 PyObject
* _resultobj
;
1529 PyObject
* _argo0
= 0;
1530 char *_kwnames
[] = { "self","width","height", NULL
};
1534 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Scale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1537 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1538 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1539 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1544 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1545 _result
= new wxImage (wxImage_Scale(_arg0
,_arg1
,_arg2
));
1547 wxPyEndAllowThreads(__tstate
);
1548 if (PyErr_Occurred()) return NULL
;
1549 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1550 _resultobj
= Py_BuildValue("s",_ptemp
);
1554 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1555 static PyObject
*_wrap_wxImage_Rescale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1556 PyObject
* _resultobj
;
1561 PyObject
* _argo0
= 0;
1562 char *_kwnames
[] = { "self","width","height", NULL
};
1566 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Rescale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1569 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1570 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1571 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1576 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1577 wxImage
& _result_ref
= wxImage_Rescale(_arg0
,_arg1
,_arg2
);
1578 _result
= (wxImage
*) &_result_ref
;
1580 wxPyEndAllowThreads(__tstate
);
1581 if (PyErr_Occurred()) return NULL
;
1583 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1584 _resultobj
= Py_BuildValue("s",_ptemp
);
1587 _resultobj
= Py_None
;
1592 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1593 static PyObject
*_wrap_wxImage_SetRGB(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1594 PyObject
* _resultobj
;
1598 unsigned char _arg3
;
1599 unsigned char _arg4
;
1600 unsigned char _arg5
;
1601 PyObject
* _argo0
= 0;
1602 char *_kwnames
[] = { "self","x","y","r","g","b", NULL
};
1605 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oiibbb:wxImage_SetRGB",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
))
1608 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1609 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1610 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1615 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1616 wxImage_SetRGB(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
);
1618 wxPyEndAllowThreads(__tstate
);
1619 if (PyErr_Occurred()) return NULL
;
1620 } Py_INCREF(Py_None
);
1621 _resultobj
= Py_None
;
1625 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1626 static PyObject
*_wrap_wxImage_GetRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1627 PyObject
* _resultobj
;
1628 unsigned char _result
;
1632 PyObject
* _argo0
= 0;
1633 char *_kwnames
[] = { "self","x","y", NULL
};
1636 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetRed",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1639 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1640 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1641 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1646 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1647 _result
= (unsigned char )wxImage_GetRed(_arg0
,_arg1
,_arg2
);
1649 wxPyEndAllowThreads(__tstate
);
1650 if (PyErr_Occurred()) return NULL
;
1651 } _resultobj
= Py_BuildValue("b",_result
);
1655 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1656 static PyObject
*_wrap_wxImage_GetGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1657 PyObject
* _resultobj
;
1658 unsigned char _result
;
1662 PyObject
* _argo0
= 0;
1663 char *_kwnames
[] = { "self","x","y", NULL
};
1666 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetGreen",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1669 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1670 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1671 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1676 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1677 _result
= (unsigned char )wxImage_GetGreen(_arg0
,_arg1
,_arg2
);
1679 wxPyEndAllowThreads(__tstate
);
1680 if (PyErr_Occurred()) return NULL
;
1681 } _resultobj
= Py_BuildValue("b",_result
);
1685 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1686 static PyObject
*_wrap_wxImage_GetBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1687 PyObject
* _resultobj
;
1688 unsigned char _result
;
1692 PyObject
* _argo0
= 0;
1693 char *_kwnames
[] = { "self","x","y", NULL
};
1696 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetBlue",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1699 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1700 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1701 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1706 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1707 _result
= (unsigned char )wxImage_GetBlue(_arg0
,_arg1
,_arg2
);
1709 wxPyEndAllowThreads(__tstate
);
1710 if (PyErr_Occurred()) return NULL
;
1711 } _resultobj
= Py_BuildValue("b",_result
);
1715 static PyObject
*_wrap_wxImage_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1716 PyObject
* _resultobj
;
1719 PyObject
* _obj0
= 0;
1720 char *_kwnames
[] = { "name", NULL
};
1723 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanRead",_kwnames
,&_obj0
))
1726 #if PYTHON_API_VERSION >= 1009
1727 char* tmpPtr
; int tmpSize
;
1728 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1729 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1732 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1734 _arg0
= new wxString(tmpPtr
, tmpSize
);
1736 if (!PyString_Check(_obj0
)) {
1737 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1740 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1744 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1745 _result
= (bool )wxImage::CanRead(*_arg0
);
1747 wxPyEndAllowThreads(__tstate
);
1748 if (PyErr_Occurred()) return NULL
;
1749 } _resultobj
= Py_BuildValue("i",_result
);
1757 static PyObject
*_wrap_wxImage_GetImageCount(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1758 PyObject
* _resultobj
;
1761 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1762 PyObject
* _obj0
= 0;
1763 char *_kwnames
[] = { "name","type", NULL
};
1766 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_GetImageCount",_kwnames
,&_obj0
,&_arg1
))
1769 #if PYTHON_API_VERSION >= 1009
1770 char* tmpPtr
; int tmpSize
;
1771 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1772 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1775 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1777 _arg0
= new wxString(tmpPtr
, tmpSize
);
1779 if (!PyString_Check(_obj0
)) {
1780 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1783 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1787 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1788 _result
= (int )wxImage::GetImageCount(*_arg0
,_arg1
);
1790 wxPyEndAllowThreads(__tstate
);
1791 if (PyErr_Occurred()) return NULL
;
1792 } _resultobj
= Py_BuildValue("i",_result
);
1800 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1801 static PyObject
*_wrap_wxImage_LoadFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1802 PyObject
* _resultobj
;
1806 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
1807 int _arg3
= (int ) -1;
1808 PyObject
* _argo0
= 0;
1809 PyObject
* _obj1
= 0;
1810 char *_kwnames
[] = { "self","name","type","index", NULL
};
1813 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
1816 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1817 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1818 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1823 #if PYTHON_API_VERSION >= 1009
1824 char* tmpPtr
; int tmpSize
;
1825 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1826 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1829 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1831 _arg1
= new wxString(tmpPtr
, tmpSize
);
1833 if (!PyString_Check(_obj1
)) {
1834 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1837 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1841 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1842 _result
= (bool )wxImage_LoadFile(_arg0
,*_arg1
,_arg2
,_arg3
);
1844 wxPyEndAllowThreads(__tstate
);
1845 if (PyErr_Occurred()) return NULL
;
1846 } _resultobj
= Py_BuildValue("i",_result
);
1854 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1855 static PyObject
*_wrap_wxImage_LoadMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1856 PyObject
* _resultobj
;
1861 int _arg3
= (int ) -1;
1862 PyObject
* _argo0
= 0;
1863 PyObject
* _obj1
= 0;
1864 PyObject
* _obj2
= 0;
1865 char *_kwnames
[] = { "self","name","mimetype","index", NULL
};
1868 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
1871 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1872 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1873 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1878 #if PYTHON_API_VERSION >= 1009
1879 char* tmpPtr
; int tmpSize
;
1880 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1881 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1884 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1886 _arg1
= new wxString(tmpPtr
, tmpSize
);
1888 if (!PyString_Check(_obj1
)) {
1889 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1892 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1896 #if PYTHON_API_VERSION >= 1009
1897 char* tmpPtr
; int tmpSize
;
1898 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1899 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1902 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1904 _arg2
= new wxString(tmpPtr
, tmpSize
);
1906 if (!PyString_Check(_obj2
)) {
1907 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1910 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1914 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1915 _result
= (bool )wxImage_LoadMimeFile(_arg0
,*_arg1
,*_arg2
,_arg3
);
1917 wxPyEndAllowThreads(__tstate
);
1918 if (PyErr_Occurred()) return NULL
;
1919 } _resultobj
= Py_BuildValue("i",_result
);
1931 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1932 static PyObject
*_wrap_wxImage_SaveFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1933 PyObject
* _resultobj
;
1938 PyObject
* _argo0
= 0;
1939 PyObject
* _obj1
= 0;
1940 char *_kwnames
[] = { "self","name","type", NULL
};
1943 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SaveFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1946 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1947 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1948 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1953 #if PYTHON_API_VERSION >= 1009
1954 char* tmpPtr
; int tmpSize
;
1955 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1956 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1959 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1961 _arg1
= new wxString(tmpPtr
, tmpSize
);
1963 if (!PyString_Check(_obj1
)) {
1964 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1967 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1971 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1972 _result
= (bool )wxImage_SaveFile(_arg0
,*_arg1
,_arg2
);
1974 wxPyEndAllowThreads(__tstate
);
1975 if (PyErr_Occurred()) return NULL
;
1976 } _resultobj
= Py_BuildValue("i",_result
);
1984 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1985 static PyObject
*_wrap_wxImage_SaveMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1986 PyObject
* _resultobj
;
1991 PyObject
* _argo0
= 0;
1992 PyObject
* _obj1
= 0;
1993 PyObject
* _obj2
= 0;
1994 char *_kwnames
[] = { "self","name","mimetype", NULL
};
1997 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SaveMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2000 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2001 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2002 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
2007 #if PYTHON_API_VERSION >= 1009
2008 char* tmpPtr
; int tmpSize
;
2009 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2010 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2013 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2015 _arg1
= new wxString(tmpPtr
, tmpSize
);
2017 if (!PyString_Check(_obj1
)) {
2018 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2021 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2025 #if PYTHON_API_VERSION >= 1009
2026 char* tmpPtr
; int tmpSize
;
2027 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2028 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2031 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2033 _arg2
= new wxString(tmpPtr
, tmpSize
);
2035 if (!PyString_Check(_obj2
)) {
2036 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2039 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2043 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2044 _result
= (bool )wxImage_SaveMimeFile(_arg0
,*_arg1
,*_arg2
);
2046 wxPyEndAllowThreads(__tstate
);
2047 if (PyErr_Occurred()) return NULL
;
2048 } _resultobj
= Py_BuildValue("i",_result
);
2060 static PyObject
*_wrap_wxImage_CanReadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2061 PyObject
* _resultobj
;
2063 wxInputStream
* _arg0
;
2064 wxPyInputStream
* temp
;
2066 PyObject
* _obj0
= 0;
2067 char *_kwnames
[] = { "stream", NULL
};
2070 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanReadStream",_kwnames
,&_obj0
))
2073 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2074 _arg0
= temp
->m_wxis
;
2077 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
2078 if (_arg0
== NULL
) {
2079 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2086 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2087 _result
= (bool )wxImage::CanRead(*_arg0
);
2089 wxPyEndAllowThreads(__tstate
);
2090 if (PyErr_Occurred()) return NULL
;
2091 } _resultobj
= Py_BuildValue("i",_result
);
2099 #define wxImage_LoadStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2100 static PyObject
*_wrap_wxImage_LoadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2101 PyObject
* _resultobj
;
2104 wxInputStream
* _arg1
;
2105 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
2106 int _arg3
= (int ) -1;
2107 PyObject
* _argo0
= 0;
2108 wxPyInputStream
* temp
;
2110 PyObject
* _obj1
= 0;
2111 char *_kwnames
[] = { "self","stream","type","index", NULL
};
2114 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadStream",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
2117 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2118 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2119 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadStream. Expected _wxImage_p.");
2124 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2125 _arg1
= temp
->m_wxis
;
2128 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2129 if (_arg1
== NULL
) {
2130 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2137 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2138 _result
= (bool )wxImage_LoadStream(_arg0
,*_arg1
,_arg2
,_arg3
);
2140 wxPyEndAllowThreads(__tstate
);
2141 if (PyErr_Occurred()) return NULL
;
2142 } _resultobj
= Py_BuildValue("i",_result
);
2150 #define wxImage_LoadMimeStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2151 static PyObject
*_wrap_wxImage_LoadMimeStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2152 PyObject
* _resultobj
;
2155 wxInputStream
* _arg1
;
2157 int _arg3
= (int ) -1;
2158 PyObject
* _argo0
= 0;
2159 wxPyInputStream
* temp
;
2161 PyObject
* _obj1
= 0;
2162 PyObject
* _obj2
= 0;
2163 char *_kwnames
[] = { "self","stream","mimetype","index", NULL
};
2166 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeStream",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
2169 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2170 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2171 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeStream. Expected _wxImage_p.");
2176 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2177 _arg1
= temp
->m_wxis
;
2180 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2181 if (_arg1
== NULL
) {
2182 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2189 #if PYTHON_API_VERSION >= 1009
2190 char* tmpPtr
; int tmpSize
;
2191 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2192 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2195 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2197 _arg2
= new wxString(tmpPtr
, tmpSize
);
2199 if (!PyString_Check(_obj2
)) {
2200 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2203 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2207 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2208 _result
= (bool )wxImage_LoadMimeStream(_arg0
,*_arg1
,*_arg2
,_arg3
);
2210 wxPyEndAllowThreads(__tstate
);
2211 if (PyErr_Occurred()) return NULL
;
2212 } _resultobj
= Py_BuildValue("i",_result
);
2224 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
2225 static PyObject
*_wrap_wxImage_Ok(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2226 PyObject
* _resultobj
;
2229 PyObject
* _argo0
= 0;
2230 char *_kwnames
[] = { "self", NULL
};
2233 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Ok",_kwnames
,&_argo0
))
2236 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2237 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2238 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
2243 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2244 _result
= (bool )wxImage_Ok(_arg0
);
2246 wxPyEndAllowThreads(__tstate
);
2247 if (PyErr_Occurred()) return NULL
;
2248 } _resultobj
= Py_BuildValue("i",_result
);
2252 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
2253 static PyObject
*_wrap_wxImage_GetWidth(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2254 PyObject
* _resultobj
;
2257 PyObject
* _argo0
= 0;
2258 char *_kwnames
[] = { "self", NULL
};
2261 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetWidth",_kwnames
,&_argo0
))
2264 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2265 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2266 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetWidth. Expected _wxImage_p.");
2271 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2272 _result
= (int )wxImage_GetWidth(_arg0
);
2274 wxPyEndAllowThreads(__tstate
);
2275 if (PyErr_Occurred()) return NULL
;
2276 } _resultobj
= Py_BuildValue("i",_result
);
2280 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
2281 static PyObject
*_wrap_wxImage_GetHeight(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2282 PyObject
* _resultobj
;
2285 PyObject
* _argo0
= 0;
2286 char *_kwnames
[] = { "self", NULL
};
2289 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetHeight",_kwnames
,&_argo0
))
2292 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2293 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2294 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
2299 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2300 _result
= (int )wxImage_GetHeight(_arg0
);
2302 wxPyEndAllowThreads(__tstate
);
2303 if (PyErr_Occurred()) return NULL
;
2304 } _resultobj
= Py_BuildValue("i",_result
);
2308 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
2309 static PyObject
*_wrap_wxImage_GetSubImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2310 PyObject
* _resultobj
;
2314 PyObject
* _argo0
= 0;
2316 PyObject
* _obj1
= 0;
2317 char *_kwnames
[] = { "self","rect", NULL
};
2321 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetSubImage",_kwnames
,&_argo0
,&_obj1
))
2324 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2325 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2326 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
2332 if (! wxRect_helper(_obj1
, &_arg1
))
2336 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2337 _result
= new wxImage (wxImage_GetSubImage(_arg0
,*_arg1
));
2339 wxPyEndAllowThreads(__tstate
);
2340 if (PyErr_Occurred()) return NULL
;
2341 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2342 _resultobj
= Py_BuildValue("s",_ptemp
);
2346 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
2347 static PyObject
*_wrap_wxImage_Copy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2348 PyObject
* _resultobj
;
2351 PyObject
* _argo0
= 0;
2352 char *_kwnames
[] = { "self", NULL
};
2356 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Copy",_kwnames
,&_argo0
))
2359 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2360 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2361 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
2366 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2367 _result
= new wxImage (wxImage_Copy(_arg0
));
2369 wxPyEndAllowThreads(__tstate
);
2370 if (PyErr_Occurred()) return NULL
;
2371 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2372 _resultobj
= Py_BuildValue("s",_ptemp
);
2376 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
2377 static PyObject
*_wrap_wxImage_Paste(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2378 PyObject
* _resultobj
;
2383 PyObject
* _argo0
= 0;
2384 PyObject
* _argo1
= 0;
2385 char *_kwnames
[] = { "self","image","x","y", NULL
};
2388 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOii:wxImage_Paste",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_arg3
))
2391 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2392 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2393 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
2398 if (_argo1
== Py_None
) { _arg1
= NULL
; }
2399 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxImage_p")) {
2400 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
2405 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2406 wxImage_Paste(_arg0
,*_arg1
,_arg2
,_arg3
);
2408 wxPyEndAllowThreads(__tstate
);
2409 if (PyErr_Occurred()) return NULL
;
2410 } Py_INCREF(Py_None
);
2411 _resultobj
= Py_None
;
2415 static PyObject
* wxImage_GetData(wxImage
*self
) {
2416 unsigned char* data
= self
->GetData();
2417 int len
= self
->GetWidth() * self
->GetHeight() * 3;
2418 return PyString_FromStringAndSize((char*)data
, len
);
2420 static PyObject
*_wrap_wxImage_GetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2421 PyObject
* _resultobj
;
2424 PyObject
* _argo0
= 0;
2425 char *_kwnames
[] = { "self", NULL
};
2428 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetData",_kwnames
,&_argo0
))
2431 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2432 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2433 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
2438 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2439 _result
= (PyObject
*)wxImage_GetData(_arg0
);
2441 wxPyEndAllowThreads(__tstate
);
2442 if (PyErr_Occurred()) return NULL
;
2444 _resultobj
= _result
;
2449 static void wxImage_SetData(wxImage
*self
,PyObject
* data
) {
2450 unsigned char* dataPtr
;
2452 if (! PyString_Check(data
)) {
2453 PyErr_SetString(PyExc_TypeError
, "Expected string object");
2457 size_t len
= self
->GetWidth() * self
->GetHeight() * 3;
2458 dataPtr
= (unsigned char*) malloc(len
);
2459 memcpy(dataPtr
, PyString_AsString(data
), len
);
2460 self
->SetData(dataPtr
);
2462 static PyObject
*_wrap_wxImage_SetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2463 PyObject
* _resultobj
;
2466 PyObject
* _argo0
= 0;
2467 PyObject
* _obj1
= 0;
2468 char *_kwnames
[] = { "self","data", NULL
};
2471 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_SetData",_kwnames
,&_argo0
,&_obj1
))
2474 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2475 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2476 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
2484 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2485 wxImage_SetData(_arg0
,_arg1
);
2487 wxPyEndAllowThreads(__tstate
);
2488 if (PyErr_Occurred()) return NULL
;
2489 } Py_INCREF(Py_None
);
2490 _resultobj
= Py_None
;
2494 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
2495 static PyObject
*_wrap_wxImage_SetMaskColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2496 PyObject
* _resultobj
;
2498 unsigned char _arg1
;
2499 unsigned char _arg2
;
2500 unsigned char _arg3
;
2501 PyObject
* _argo0
= 0;
2502 char *_kwnames
[] = { "self","r","g","b", NULL
};
2505 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_SetMaskColour",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2508 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2509 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2510 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
2515 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2516 wxImage_SetMaskColour(_arg0
,_arg1
,_arg2
,_arg3
);
2518 wxPyEndAllowThreads(__tstate
);
2519 if (PyErr_Occurred()) return NULL
;
2520 } Py_INCREF(Py_None
);
2521 _resultobj
= Py_None
;
2525 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
2526 static PyObject
*_wrap_wxImage_GetMaskRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2527 PyObject
* _resultobj
;
2528 unsigned char _result
;
2530 PyObject
* _argo0
= 0;
2531 char *_kwnames
[] = { "self", NULL
};
2534 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskRed",_kwnames
,&_argo0
))
2537 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2538 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2539 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
2544 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2545 _result
= (unsigned char )wxImage_GetMaskRed(_arg0
);
2547 wxPyEndAllowThreads(__tstate
);
2548 if (PyErr_Occurred()) return NULL
;
2549 } _resultobj
= Py_BuildValue("b",_result
);
2553 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
2554 static PyObject
*_wrap_wxImage_GetMaskGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2555 PyObject
* _resultobj
;
2556 unsigned char _result
;
2558 PyObject
* _argo0
= 0;
2559 char *_kwnames
[] = { "self", NULL
};
2562 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskGreen",_kwnames
,&_argo0
))
2565 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2566 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2567 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
2572 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2573 _result
= (unsigned char )wxImage_GetMaskGreen(_arg0
);
2575 wxPyEndAllowThreads(__tstate
);
2576 if (PyErr_Occurred()) return NULL
;
2577 } _resultobj
= Py_BuildValue("b",_result
);
2581 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
2582 static PyObject
*_wrap_wxImage_GetMaskBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2583 PyObject
* _resultobj
;
2584 unsigned char _result
;
2586 PyObject
* _argo0
= 0;
2587 char *_kwnames
[] = { "self", NULL
};
2590 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskBlue",_kwnames
,&_argo0
))
2593 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2594 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2595 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
2600 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2601 _result
= (unsigned char )wxImage_GetMaskBlue(_arg0
);
2603 wxPyEndAllowThreads(__tstate
);
2604 if (PyErr_Occurred()) return NULL
;
2605 } _resultobj
= Py_BuildValue("b",_result
);
2609 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
2610 static PyObject
*_wrap_wxImage_SetMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2611 PyObject
* _resultobj
;
2613 bool _arg1
= (bool ) TRUE
;
2614 PyObject
* _argo0
= 0;
2615 int tempbool1
= (int) TRUE
;
2616 char *_kwnames
[] = { "self","mask", NULL
};
2619 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_SetMask",_kwnames
,&_argo0
,&tempbool1
))
2622 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2623 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2624 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
2628 _arg1
= (bool ) tempbool1
;
2630 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2631 wxImage_SetMask(_arg0
,_arg1
);
2633 wxPyEndAllowThreads(__tstate
);
2634 if (PyErr_Occurred()) return NULL
;
2635 } Py_INCREF(Py_None
);
2636 _resultobj
= Py_None
;
2640 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
2641 static PyObject
*_wrap_wxImage_HasMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2642 PyObject
* _resultobj
;
2645 PyObject
* _argo0
= 0;
2646 char *_kwnames
[] = { "self", NULL
};
2649 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_HasMask",_kwnames
,&_argo0
))
2652 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2653 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2654 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
2659 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2660 _result
= (bool )wxImage_HasMask(_arg0
);
2662 wxPyEndAllowThreads(__tstate
);
2663 if (PyErr_Occurred()) return NULL
;
2664 } _resultobj
= Py_BuildValue("i",_result
);
2668 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
2669 static PyObject
*_wrap_wxImage_Rotate(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2670 PyObject
* _resultobj
;
2675 bool _arg3
= (bool ) TRUE
;
2676 wxPoint
* _arg4
= (wxPoint
*) NULL
;
2677 PyObject
* _argo0
= 0;
2679 PyObject
* _obj2
= 0;
2680 int tempbool3
= (int) TRUE
;
2682 PyObject
* _obj4
= 0;
2683 char *_kwnames
[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL
};
2687 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OdO|iO:wxImage_Rotate",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&tempbool3
,&_obj4
))
2690 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2691 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2692 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
2698 if (! wxPoint_helper(_obj2
, &_arg2
))
2701 _arg3
= (bool ) tempbool3
;
2705 if (! wxPoint_helper(_obj4
, &_arg4
))
2709 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2710 _result
= new wxImage (wxImage_Rotate(_arg0
,_arg1
,*_arg2
,_arg3
,_arg4
));
2712 wxPyEndAllowThreads(__tstate
);
2713 if (PyErr_Occurred()) return NULL
;
2714 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2715 _resultobj
= Py_BuildValue("s",_ptemp
);
2719 #define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
2720 static PyObject
*_wrap_wxImage_Rotate90(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2721 PyObject
* _resultobj
;
2724 bool _arg1
= (bool ) TRUE
;
2725 PyObject
* _argo0
= 0;
2726 int tempbool1
= (int) TRUE
;
2727 char *_kwnames
[] = { "self","clockwise", NULL
};
2731 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Rotate90",_kwnames
,&_argo0
,&tempbool1
))
2734 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2735 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2736 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p.");
2740 _arg1
= (bool ) tempbool1
;
2742 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2743 _result
= new wxImage (wxImage_Rotate90(_arg0
,_arg1
));
2745 wxPyEndAllowThreads(__tstate
);
2746 if (PyErr_Occurred()) return NULL
;
2747 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2748 _resultobj
= Py_BuildValue("s",_ptemp
);
2752 #define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2753 static PyObject
*_wrap_wxImage_Mirror(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2754 PyObject
* _resultobj
;
2757 bool _arg1
= (bool ) TRUE
;
2758 PyObject
* _argo0
= 0;
2759 int tempbool1
= (int) TRUE
;
2760 char *_kwnames
[] = { "self","horizontally", NULL
};
2764 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Mirror",_kwnames
,&_argo0
,&tempbool1
))
2767 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2768 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2769 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2773 _arg1
= (bool ) tempbool1
;
2775 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2776 _result
= new wxImage (wxImage_Mirror(_arg0
,_arg1
));
2778 wxPyEndAllowThreads(__tstate
);
2779 if (PyErr_Occurred()) return NULL
;
2780 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2781 _resultobj
= Py_BuildValue("s",_ptemp
);
2785 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2786 static PyObject
*_wrap_wxImage_Replace(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2787 PyObject
* _resultobj
;
2789 unsigned char _arg1
;
2790 unsigned char _arg2
;
2791 unsigned char _arg3
;
2792 unsigned char _arg4
;
2793 unsigned char _arg5
;
2794 unsigned char _arg6
;
2795 PyObject
* _argo0
= 0;
2796 char *_kwnames
[] = { "self","r1","g1","b1","r2","g2","b2", NULL
};
2799 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbbbbb:wxImage_Replace",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
,&_arg6
))
2802 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2803 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2804 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p.");
2809 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2810 wxImage_Replace(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
,_arg6
);
2812 wxPyEndAllowThreads(__tstate
);
2813 if (PyErr_Occurred()) return NULL
;
2814 } Py_INCREF(Py_None
);
2815 _resultobj
= Py_None
;
2819 #define wxImage_ConvertToMono(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMono(_swigarg0,_swigarg1,_swigarg2))
2820 static PyObject
*_wrap_wxImage_ConvertToMono(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2821 PyObject
* _resultobj
;
2824 unsigned char _arg1
;
2825 unsigned char _arg2
;
2826 unsigned char _arg3
;
2827 PyObject
* _argo0
= 0;
2828 char *_kwnames
[] = { "self","r","g","b", NULL
};
2832 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMono",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2835 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2836 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2837 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMono. Expected _wxImage_p.");
2842 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2843 _result
= new wxImage (wxImage_ConvertToMono(_arg0
,_arg1
,_arg2
,_arg3
));
2845 wxPyEndAllowThreads(__tstate
);
2846 if (PyErr_Occurred()) return NULL
;
2847 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2848 _resultobj
= Py_BuildValue("s",_ptemp
);
2852 #define wxImage_SetOption(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2853 static PyObject
*_wrap_wxImage_SetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2854 PyObject
* _resultobj
;
2858 PyObject
* _argo0
= 0;
2859 PyObject
* _obj1
= 0;
2860 PyObject
* _obj2
= 0;
2861 char *_kwnames
[] = { "self","name","value", NULL
};
2864 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SetOption",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2867 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2868 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2869 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOption. Expected _wxImage_p.");
2874 #if PYTHON_API_VERSION >= 1009
2875 char* tmpPtr
; int tmpSize
;
2876 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2877 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2880 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2882 _arg1
= new wxString(tmpPtr
, tmpSize
);
2884 if (!PyString_Check(_obj1
)) {
2885 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2888 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2892 #if PYTHON_API_VERSION >= 1009
2893 char* tmpPtr
; int tmpSize
;
2894 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2895 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2898 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2900 _arg2
= new wxString(tmpPtr
, tmpSize
);
2902 if (!PyString_Check(_obj2
)) {
2903 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2906 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2910 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2911 wxImage_SetOption(_arg0
,*_arg1
,*_arg2
);
2913 wxPyEndAllowThreads(__tstate
);
2914 if (PyErr_Occurred()) return NULL
;
2915 } Py_INCREF(Py_None
);
2916 _resultobj
= Py_None
;
2928 #define wxImage_SetOptionInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2929 static PyObject
*_wrap_wxImage_SetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2930 PyObject
* _resultobj
;
2934 PyObject
* _argo0
= 0;
2935 PyObject
* _obj1
= 0;
2936 char *_kwnames
[] = { "self","name","value", NULL
};
2939 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SetOptionInt",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
2942 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2943 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2944 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOptionInt. Expected _wxImage_p.");
2949 #if PYTHON_API_VERSION >= 1009
2950 char* tmpPtr
; int tmpSize
;
2951 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2952 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2955 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2957 _arg1
= new wxString(tmpPtr
, tmpSize
);
2959 if (!PyString_Check(_obj1
)) {
2960 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2963 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2967 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2968 wxImage_SetOptionInt(_arg0
,*_arg1
,_arg2
);
2970 wxPyEndAllowThreads(__tstate
);
2971 if (PyErr_Occurred()) return NULL
;
2972 } Py_INCREF(Py_None
);
2973 _resultobj
= Py_None
;
2981 #define wxImage_GetOption(_swigobj,_swigarg0) (_swigobj->GetOption(_swigarg0))
2982 static PyObject
*_wrap_wxImage_GetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2983 PyObject
* _resultobj
;
2987 PyObject
* _argo0
= 0;
2988 PyObject
* _obj1
= 0;
2989 char *_kwnames
[] = { "self","name", NULL
};
2992 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOption",_kwnames
,&_argo0
,&_obj1
))
2995 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2996 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2997 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOption. Expected _wxImage_p.");
3002 #if PYTHON_API_VERSION >= 1009
3003 char* tmpPtr
; int tmpSize
;
3004 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3005 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3008 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3010 _arg1
= new wxString(tmpPtr
, tmpSize
);
3012 if (!PyString_Check(_obj1
)) {
3013 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3016 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3020 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3021 _result
= new wxString (wxImage_GetOption(_arg0
,*_arg1
));
3023 wxPyEndAllowThreads(__tstate
);
3024 if (PyErr_Occurred()) return NULL
;
3026 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
3038 #define wxImage_GetOptionInt(_swigobj,_swigarg0) (_swigobj->GetOptionInt(_swigarg0))
3039 static PyObject
*_wrap_wxImage_GetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3040 PyObject
* _resultobj
;
3044 PyObject
* _argo0
= 0;
3045 PyObject
* _obj1
= 0;
3046 char *_kwnames
[] = { "self","name", NULL
};
3049 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOptionInt",_kwnames
,&_argo0
,&_obj1
))
3052 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3053 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3054 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOptionInt. Expected _wxImage_p.");
3059 #if PYTHON_API_VERSION >= 1009
3060 char* tmpPtr
; int tmpSize
;
3061 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3062 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3065 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3067 _arg1
= new wxString(tmpPtr
, tmpSize
);
3069 if (!PyString_Check(_obj1
)) {
3070 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3073 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3077 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3078 _result
= (int )wxImage_GetOptionInt(_arg0
,*_arg1
);
3080 wxPyEndAllowThreads(__tstate
);
3081 if (PyErr_Occurred()) return NULL
;
3082 } _resultobj
= Py_BuildValue("i",_result
);
3090 #define wxImage_HasOption(_swigobj,_swigarg0) (_swigobj->HasOption(_swigarg0))
3091 static PyObject
*_wrap_wxImage_HasOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3092 PyObject
* _resultobj
;
3096 PyObject
* _argo0
= 0;
3097 PyObject
* _obj1
= 0;
3098 char *_kwnames
[] = { "self","name", NULL
};
3101 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_HasOption",_kwnames
,&_argo0
,&_obj1
))
3104 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3105 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3106 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasOption. Expected _wxImage_p.");
3111 #if PYTHON_API_VERSION >= 1009
3112 char* tmpPtr
; int tmpSize
;
3113 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3114 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3117 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3119 _arg1
= new wxString(tmpPtr
, tmpSize
);
3121 if (!PyString_Check(_obj1
)) {
3122 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3125 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3129 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3130 _result
= (bool )wxImage_HasOption(_arg0
,*_arg1
);
3132 wxPyEndAllowThreads(__tstate
);
3133 if (PyErr_Occurred()) return NULL
;
3134 } _resultobj
= Py_BuildValue("i",_result
);
3142 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
3143 static PyObject
*_wrap_wxImage_CountColours(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3144 PyObject
* _resultobj
;
3145 unsigned long _result
;
3147 unsigned long _arg1
= (unsigned long ) (unsigned long)-1;
3148 PyObject
* _argo0
= 0;
3149 char *_kwnames
[] = { "self","stopafter", NULL
};
3152 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_CountColours",_kwnames
,&_argo0
,&_arg1
))
3155 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3156 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3157 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
3162 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3163 _result
= (unsigned long )wxImage_CountColours(_arg0
,_arg1
);
3165 wxPyEndAllowThreads(__tstate
);
3166 if (PyErr_Occurred()) return NULL
;
3167 } _resultobj
= Py_BuildValue("l",_result
);
3171 static PyObject
*_wrap_wxImage_AddHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3172 PyObject
* _resultobj
;
3173 wxImageHandler
* _arg0
;
3174 PyObject
* _argo0
= 0;
3175 char *_kwnames
[] = { "handler", NULL
};
3178 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_AddHandler",_kwnames
,&_argo0
))
3181 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3182 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3183 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
3188 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3189 wxImage::AddHandler(_arg0
);
3191 wxPyEndAllowThreads(__tstate
);
3192 if (PyErr_Occurred()) return NULL
;
3193 } Py_INCREF(Py_None
);
3194 _resultobj
= Py_None
;
3198 static PyObject
*_wrap_wxImage_InsertHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3199 PyObject
* _resultobj
;
3200 wxImageHandler
* _arg0
;
3201 PyObject
* _argo0
= 0;
3202 char *_kwnames
[] = { "handler", NULL
};
3205 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_InsertHandler",_kwnames
,&_argo0
))
3208 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3209 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3210 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
3215 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3216 wxImage::InsertHandler(_arg0
);
3218 wxPyEndAllowThreads(__tstate
);
3219 if (PyErr_Occurred()) return NULL
;
3220 } Py_INCREF(Py_None
);
3221 _resultobj
= Py_None
;
3225 static PyObject
*_wrap_wxImage_RemoveHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3226 PyObject
* _resultobj
;
3229 PyObject
* _obj0
= 0;
3230 char *_kwnames
[] = { "name", NULL
};
3233 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_RemoveHandler",_kwnames
,&_obj0
))
3236 #if PYTHON_API_VERSION >= 1009
3237 char* tmpPtr
; int tmpSize
;
3238 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
3239 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3242 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
3244 _arg0
= new wxString(tmpPtr
, tmpSize
);
3246 if (!PyString_Check(_obj0
)) {
3247 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3250 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
3254 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3255 _result
= (bool )wxImage::RemoveHandler(*_arg0
);
3257 wxPyEndAllowThreads(__tstate
);
3258 if (PyErr_Occurred()) return NULL
;
3259 } _resultobj
= Py_BuildValue("i",_result
);
3267 static PyMethodDef imagecMethods
[] = {
3268 { "wxImage_RemoveHandler", (PyCFunction
) _wrap_wxImage_RemoveHandler
, METH_VARARGS
| METH_KEYWORDS
},
3269 { "wxImage_InsertHandler", (PyCFunction
) _wrap_wxImage_InsertHandler
, METH_VARARGS
| METH_KEYWORDS
},
3270 { "wxImage_AddHandler", (PyCFunction
) _wrap_wxImage_AddHandler
, METH_VARARGS
| METH_KEYWORDS
},
3271 { "wxImage_CountColours", (PyCFunction
) _wrap_wxImage_CountColours
, METH_VARARGS
| METH_KEYWORDS
},
3272 { "wxImage_HasOption", (PyCFunction
) _wrap_wxImage_HasOption
, METH_VARARGS
| METH_KEYWORDS
},
3273 { "wxImage_GetOptionInt", (PyCFunction
) _wrap_wxImage_GetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3274 { "wxImage_GetOption", (PyCFunction
) _wrap_wxImage_GetOption
, METH_VARARGS
| METH_KEYWORDS
},
3275 { "wxImage_SetOptionInt", (PyCFunction
) _wrap_wxImage_SetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3276 { "wxImage_SetOption", (PyCFunction
) _wrap_wxImage_SetOption
, METH_VARARGS
| METH_KEYWORDS
},
3277 { "wxImage_ConvertToMono", (PyCFunction
) _wrap_wxImage_ConvertToMono
, METH_VARARGS
| METH_KEYWORDS
},
3278 { "wxImage_Replace", (PyCFunction
) _wrap_wxImage_Replace
, METH_VARARGS
| METH_KEYWORDS
},
3279 { "wxImage_Mirror", (PyCFunction
) _wrap_wxImage_Mirror
, METH_VARARGS
| METH_KEYWORDS
},
3280 { "wxImage_Rotate90", (PyCFunction
) _wrap_wxImage_Rotate90
, METH_VARARGS
| METH_KEYWORDS
},
3281 { "wxImage_Rotate", (PyCFunction
) _wrap_wxImage_Rotate
, METH_VARARGS
| METH_KEYWORDS
},
3282 { "wxImage_HasMask", (PyCFunction
) _wrap_wxImage_HasMask
, METH_VARARGS
| METH_KEYWORDS
},
3283 { "wxImage_SetMask", (PyCFunction
) _wrap_wxImage_SetMask
, METH_VARARGS
| METH_KEYWORDS
},
3284 { "wxImage_GetMaskBlue", (PyCFunction
) _wrap_wxImage_GetMaskBlue
, METH_VARARGS
| METH_KEYWORDS
},
3285 { "wxImage_GetMaskGreen", (PyCFunction
) _wrap_wxImage_GetMaskGreen
, METH_VARARGS
| METH_KEYWORDS
},
3286 { "wxImage_GetMaskRed", (PyCFunction
) _wrap_wxImage_GetMaskRed
, METH_VARARGS
| METH_KEYWORDS
},
3287 { "wxImage_SetMaskColour", (PyCFunction
) _wrap_wxImage_SetMaskColour
, METH_VARARGS
| METH_KEYWORDS
},
3288 { "wxImage_SetData", (PyCFunction
) _wrap_wxImage_SetData
, METH_VARARGS
| METH_KEYWORDS
},
3289 { "wxImage_GetData", (PyCFunction
) _wrap_wxImage_GetData
, METH_VARARGS
| METH_KEYWORDS
},
3290 { "wxImage_Paste", (PyCFunction
) _wrap_wxImage_Paste
, METH_VARARGS
| METH_KEYWORDS
},
3291 { "wxImage_Copy", (PyCFunction
) _wrap_wxImage_Copy
, METH_VARARGS
| METH_KEYWORDS
},
3292 { "wxImage_GetSubImage", (PyCFunction
) _wrap_wxImage_GetSubImage
, METH_VARARGS
| METH_KEYWORDS
},
3293 { "wxImage_GetHeight", (PyCFunction
) _wrap_wxImage_GetHeight
, METH_VARARGS
| METH_KEYWORDS
},
3294 { "wxImage_GetWidth", (PyCFunction
) _wrap_wxImage_GetWidth
, METH_VARARGS
| METH_KEYWORDS
},
3295 { "wxImage_Ok", (PyCFunction
) _wrap_wxImage_Ok
, METH_VARARGS
| METH_KEYWORDS
},
3296 { "wxImage_LoadMimeStream", (PyCFunction
) _wrap_wxImage_LoadMimeStream
, METH_VARARGS
| METH_KEYWORDS
},
3297 { "wxImage_LoadStream", (PyCFunction
) _wrap_wxImage_LoadStream
, METH_VARARGS
| METH_KEYWORDS
},
3298 { "wxImage_CanReadStream", (PyCFunction
) _wrap_wxImage_CanReadStream
, METH_VARARGS
| METH_KEYWORDS
},
3299 { "wxImage_SaveMimeFile", (PyCFunction
) _wrap_wxImage_SaveMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3300 { "wxImage_SaveFile", (PyCFunction
) _wrap_wxImage_SaveFile
, METH_VARARGS
| METH_KEYWORDS
},
3301 { "wxImage_LoadMimeFile", (PyCFunction
) _wrap_wxImage_LoadMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3302 { "wxImage_LoadFile", (PyCFunction
) _wrap_wxImage_LoadFile
, METH_VARARGS
| METH_KEYWORDS
},
3303 { "wxImage_GetImageCount", (PyCFunction
) _wrap_wxImage_GetImageCount
, METH_VARARGS
| METH_KEYWORDS
},
3304 { "wxImage_CanRead", (PyCFunction
) _wrap_wxImage_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3305 { "wxImage_GetBlue", (PyCFunction
) _wrap_wxImage_GetBlue
, METH_VARARGS
| METH_KEYWORDS
},
3306 { "wxImage_GetGreen", (PyCFunction
) _wrap_wxImage_GetGreen
, METH_VARARGS
| METH_KEYWORDS
},
3307 { "wxImage_GetRed", (PyCFunction
) _wrap_wxImage_GetRed
, METH_VARARGS
| METH_KEYWORDS
},
3308 { "wxImage_SetRGB", (PyCFunction
) _wrap_wxImage_SetRGB
, METH_VARARGS
| METH_KEYWORDS
},
3309 { "wxImage_Rescale", (PyCFunction
) _wrap_wxImage_Rescale
, METH_VARARGS
| METH_KEYWORDS
},
3310 { "wxImage_Scale", (PyCFunction
) _wrap_wxImage_Scale
, METH_VARARGS
| METH_KEYWORDS
},
3311 { "wxImage_Destroy", (PyCFunction
) _wrap_wxImage_Destroy
, METH_VARARGS
| METH_KEYWORDS
},
3312 { "wxImage_Create", (PyCFunction
) _wrap_wxImage_Create
, METH_VARARGS
| METH_KEYWORDS
},
3313 { "wxImage_ConvertToBitmap", (PyCFunction
) _wrap_wxImage_ConvertToBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3314 { "delete_wxImage", (PyCFunction
) _wrap_delete_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3315 { "new_wxImage", (PyCFunction
) _wrap_new_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3316 { "new_wxTIFFHandler", (PyCFunction
) _wrap_new_wxTIFFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3317 { "new_wxPCXHandler", (PyCFunction
) _wrap_new_wxPCXHandler
, METH_VARARGS
| METH_KEYWORDS
},
3318 { "new_wxPNMHandler", (PyCFunction
) _wrap_new_wxPNMHandler
, METH_VARARGS
| METH_KEYWORDS
},
3319 { "new_wxGIFHandler", (PyCFunction
) _wrap_new_wxGIFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3320 { "new_wxANIHandler", (PyCFunction
) _wrap_new_wxANIHandler
, METH_VARARGS
| METH_KEYWORDS
},
3321 { "new_wxCURHandler", (PyCFunction
) _wrap_new_wxCURHandler
, METH_VARARGS
| METH_KEYWORDS
},
3322 { "new_wxICOHandler", (PyCFunction
) _wrap_new_wxICOHandler
, METH_VARARGS
| METH_KEYWORDS
},
3323 { "new_wxBMPHandler", (PyCFunction
) _wrap_new_wxBMPHandler
, METH_VARARGS
| METH_KEYWORDS
},
3324 { "new_wxJPEGHandler", (PyCFunction
) _wrap_new_wxJPEGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3325 { "new_wxPNGHandler", (PyCFunction
) _wrap_new_wxPNGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3326 { "wxImageHandler_SetMimeType", (PyCFunction
) _wrap_wxImageHandler_SetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3327 { "wxImageHandler_SetType", (PyCFunction
) _wrap_wxImageHandler_SetType
, METH_VARARGS
| METH_KEYWORDS
},
3328 { "wxImageHandler_SetExtension", (PyCFunction
) _wrap_wxImageHandler_SetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3329 { "wxImageHandler_SetName", (PyCFunction
) _wrap_wxImageHandler_SetName
, METH_VARARGS
| METH_KEYWORDS
},
3330 { "wxImageHandler_CanRead", (PyCFunction
) _wrap_wxImageHandler_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3331 { "wxImageHandler_GetMimeType", (PyCFunction
) _wrap_wxImageHandler_GetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3332 { "wxImageHandler_GetType", (PyCFunction
) _wrap_wxImageHandler_GetType
, METH_VARARGS
| METH_KEYWORDS
},
3333 { "wxImageHandler_GetExtension", (PyCFunction
) _wrap_wxImageHandler_GetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3334 { "wxImageHandler_GetName", (PyCFunction
) _wrap_wxImageHandler_GetName
, METH_VARARGS
| METH_KEYWORDS
},
3335 { "wxBitmapFromImage", (PyCFunction
) _wrap_wxBitmapFromImage
, METH_VARARGS
| METH_KEYWORDS
},
3336 { "wxInitAllImageHandlers", (PyCFunction
) _wrap_wxInitAllImageHandlers
, METH_VARARGS
| METH_KEYWORDS
},
3337 { "wxImageFromStreamMime", (PyCFunction
) _wrap_wxImageFromStreamMime
, METH_VARARGS
| METH_KEYWORDS
},
3338 { "wxImageFromStream", (PyCFunction
) _wrap_wxImageFromStream
, METH_VARARGS
| METH_KEYWORDS
},
3339 { "wxImageFromData", (PyCFunction
) _wrap_wxImageFromData
, METH_VARARGS
| METH_KEYWORDS
},
3340 { "wxImageFromBitmap", (PyCFunction
) _wrap_wxImageFromBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3341 { "wxImageFromMime", (PyCFunction
) _wrap_wxImageFromMime
, METH_VARARGS
| METH_KEYWORDS
},
3342 { "wxEmptyImage", (PyCFunction
) _wrap_wxEmptyImage
, METH_VARARGS
| METH_KEYWORDS
},
3349 * This table is used by the pointer type-checker
3351 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
3352 { "_signed_long","_long",0},
3353 { "_wxBMPHandler","_wxANIHandler",SwigwxANIHandlerTowxBMPHandler
},
3354 { "_wxBMPHandler","_wxCURHandler",SwigwxCURHandlerTowxBMPHandler
},
3355 { "_wxBMPHandler","_wxICOHandler",SwigwxICOHandlerTowxBMPHandler
},
3356 { "_wxICOHandler","_wxANIHandler",SwigwxANIHandlerTowxICOHandler
},
3357 { "_wxICOHandler","_wxCURHandler",SwigwxCURHandlerTowxICOHandler
},
3358 { "_wxPrintQuality","_wxCoord",0},
3359 { "_wxPrintQuality","_int",0},
3360 { "_wxPrintQuality","_signed_int",0},
3361 { "_wxPrintQuality","_unsigned_int",0},
3362 { "_wxPrintQuality","_wxWindowID",0},
3363 { "_wxPrintQuality","_uint",0},
3364 { "_wxPrintQuality","_EBool",0},
3365 { "_wxPrintQuality","_size_t",0},
3366 { "_wxPrintQuality","_time_t",0},
3367 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler
},
3368 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler
},
3369 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler
},
3370 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler
},
3371 { "_wxImageHandler","_wxANIHandler",SwigwxANIHandlerTowxImageHandler
},
3372 { "_wxImageHandler","_wxCURHandler",SwigwxCURHandlerTowxImageHandler
},
3373 { "_wxImageHandler","_wxICOHandler",SwigwxICOHandlerTowxImageHandler
},
3374 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler
},
3375 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler
},
3376 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler
},
3377 { "_byte","_unsigned_char",0},
3378 { "_long","_unsigned_long",0},
3379 { "_long","_signed_long",0},
3380 { "_size_t","_wxCoord",0},
3381 { "_size_t","_wxPrintQuality",0},
3382 { "_size_t","_time_t",0},
3383 { "_size_t","_unsigned_int",0},
3384 { "_size_t","_int",0},
3385 { "_size_t","_wxWindowID",0},
3386 { "_size_t","_uint",0},
3387 { "_uint","_wxCoord",0},
3388 { "_uint","_wxPrintQuality",0},
3389 { "_uint","_time_t",0},
3390 { "_uint","_size_t",0},
3391 { "_uint","_unsigned_int",0},
3392 { "_uint","_int",0},
3393 { "_uint","_wxWindowID",0},
3394 { "_wxChar","_char",0},
3395 { "_char","_wxChar",0},
3396 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
3397 { "_EBool","_wxCoord",0},
3398 { "_EBool","_wxPrintQuality",0},
3399 { "_EBool","_signed_int",0},
3400 { "_EBool","_int",0},
3401 { "_EBool","_wxWindowID",0},
3402 { "_unsigned_long","_long",0},
3403 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
3404 { "_signed_int","_wxCoord",0},
3405 { "_signed_int","_wxPrintQuality",0},
3406 { "_signed_int","_EBool",0},
3407 { "_signed_int","_wxWindowID",0},
3408 { "_signed_int","_int",0},
3409 { "_WXTYPE","_short",0},
3410 { "_WXTYPE","_signed_short",0},
3411 { "_WXTYPE","_unsigned_short",0},
3412 { "_unsigned_short","_WXTYPE",0},
3413 { "_unsigned_short","_short",0},
3414 { "_wxObject","_wxImage",SwigwxImageTowxObject
},
3415 { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject
},
3416 { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject
},
3417 { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject
},
3418 { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject
},
3419 { "_wxObject","_wxANIHandler",SwigwxANIHandlerTowxObject
},
3420 { "_wxObject","_wxCURHandler",SwigwxCURHandlerTowxObject
},
3421 { "_wxObject","_wxICOHandler",SwigwxICOHandlerTowxObject
},
3422 { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject
},
3423 { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject
},
3424 { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject
},
3425 { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject
},
3426 { "_signed_short","_WXTYPE",0},
3427 { "_signed_short","_short",0},
3428 { "_wxCURHandler","_wxANIHandler",SwigwxANIHandlerTowxCURHandler
},
3429 { "_unsigned_char","_byte",0},
3430 { "_unsigned_int","_wxCoord",0},
3431 { "_unsigned_int","_wxPrintQuality",0},
3432 { "_unsigned_int","_time_t",0},
3433 { "_unsigned_int","_size_t",0},
3434 { "_unsigned_int","_uint",0},
3435 { "_unsigned_int","_wxWindowID",0},
3436 { "_unsigned_int","_int",0},
3437 { "_short","_WXTYPE",0},
3438 { "_short","_unsigned_short",0},
3439 { "_short","_signed_short",0},
3440 { "_wxWindowID","_wxCoord",0},
3441 { "_wxWindowID","_wxPrintQuality",0},
3442 { "_wxWindowID","_time_t",0},
3443 { "_wxWindowID","_size_t",0},
3444 { "_wxWindowID","_EBool",0},
3445 { "_wxWindowID","_uint",0},
3446 { "_wxWindowID","_int",0},
3447 { "_wxWindowID","_signed_int",0},
3448 { "_wxWindowID","_unsigned_int",0},
3449 { "_int","_wxCoord",0},
3450 { "_int","_wxPrintQuality",0},
3451 { "_int","_time_t",0},
3452 { "_int","_size_t",0},
3453 { "_int","_EBool",0},
3454 { "_int","_uint",0},
3455 { "_int","_wxWindowID",0},
3456 { "_int","_unsigned_int",0},
3457 { "_int","_signed_int",0},
3458 { "_time_t","_wxCoord",0},
3459 { "_time_t","_wxPrintQuality",0},
3460 { "_time_t","_unsigned_int",0},
3461 { "_time_t","_int",0},
3462 { "_time_t","_wxWindowID",0},
3463 { "_time_t","_uint",0},
3464 { "_time_t","_size_t",0},
3465 { "_wxCoord","_int",0},
3466 { "_wxCoord","_signed_int",0},
3467 { "_wxCoord","_unsigned_int",0},
3468 { "_wxCoord","_wxWindowID",0},
3469 { "_wxCoord","_uint",0},
3470 { "_wxCoord","_EBool",0},
3471 { "_wxCoord","_size_t",0},
3472 { "_wxCoord","_time_t",0},
3473 { "_wxCoord","_wxPrintQuality",0},
3476 static PyObject
*SWIG_globals
;
3480 SWIGEXPORT(void) initimagec() {
3482 SWIG_globals
= SWIG_newvarlink();
3483 m
= Py_InitModule("imagec", imagecMethods
);
3484 d
= PyModule_GetDict(m
);
3485 PyDict_SetItemString(d
,"cvar", SWIG_globals
);
3486 SWIG_addvarlink(SWIG_globals
,"wxNullImage",_wrap_wxNullImage_get
, _wrap_wxNullImage_set
);
3489 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
3490 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);