2 * FILE : src/gtk/image.cpp
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
8 * Portions Copyright (c) 1995-1998
9 * The University of Utah and The Regents of the University of California.
10 * Permission is granted to distribute this file in any manner provided
11 * this notice remains intact.
13 * Do not make changes to this file--changes will be lost!
19 /* Implementation : PYTHON */
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
32 # define SWIGEXPORT(a) a
36 # define SWIGEXPORT(a) a
45 extern void SWIG_MakePtr(char *, void *, char *);
46 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47 extern char *SWIG_GetPtr(char *, void **, char *);
48 extern char *SWIG_GetPtrObj(PyObject
*, void **, char *);
49 extern void SWIG_addvarlink(PyObject
*, char *, PyObject
*(*)(void), int (*)(PyObject
*));
50 extern PyObject
*SWIG_newvarlink(void);
54 #define SWIG_init initimagec
56 #define SWIG_name "imagec"
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_ConvertToMonoBitmap(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMonoBitmap(_swigarg0,_swigarg1,_swigarg2))
1465 static PyObject
*_wrap_wxImage_ConvertToMonoBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1466 PyObject
* _resultobj
;
1469 unsigned char _arg1
;
1470 unsigned char _arg2
;
1471 unsigned char _arg3
;
1472 PyObject
* _argo0
= 0;
1473 char *_kwnames
[] = { "self","red","green","blue", NULL
};
1477 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMonoBitmap",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
1480 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1481 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1482 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMonoBitmap. Expected _wxImage_p.");
1487 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1488 _result
= new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0
,_arg1
,_arg2
,_arg3
));
1490 wxPyEndAllowThreads(__tstate
);
1491 if (PyErr_Occurred()) return NULL
;
1492 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1493 _resultobj
= Py_BuildValue("s",_ptemp
);
1497 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
1498 static PyObject
*_wrap_wxImage_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1499 PyObject
* _resultobj
;
1503 PyObject
* _argo0
= 0;
1504 char *_kwnames
[] = { "self","width","height", NULL
};
1507 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Create",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1510 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1511 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1512 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
1517 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1518 wxImage_Create(_arg0
,_arg1
,_arg2
);
1520 wxPyEndAllowThreads(__tstate
);
1521 if (PyErr_Occurred()) return NULL
;
1522 } Py_INCREF(Py_None
);
1523 _resultobj
= Py_None
;
1527 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1528 static PyObject
*_wrap_wxImage_Destroy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1529 PyObject
* _resultobj
;
1531 PyObject
* _argo0
= 0;
1532 char *_kwnames
[] = { "self", NULL
};
1535 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Destroy",_kwnames
,&_argo0
))
1538 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1539 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1540 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1545 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1546 wxImage_Destroy(_arg0
);
1548 wxPyEndAllowThreads(__tstate
);
1549 if (PyErr_Occurred()) return NULL
;
1550 } Py_INCREF(Py_None
);
1551 _resultobj
= Py_None
;
1555 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1556 static PyObject
*_wrap_wxImage_Scale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1557 PyObject
* _resultobj
;
1562 PyObject
* _argo0
= 0;
1563 char *_kwnames
[] = { "self","width","height", NULL
};
1567 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Scale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1570 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1571 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1572 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1577 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1578 _result
= new wxImage (wxImage_Scale(_arg0
,_arg1
,_arg2
));
1580 wxPyEndAllowThreads(__tstate
);
1581 if (PyErr_Occurred()) return NULL
;
1582 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1583 _resultobj
= Py_BuildValue("s",_ptemp
);
1587 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1588 static PyObject
*_wrap_wxImage_Rescale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1589 PyObject
* _resultobj
;
1594 PyObject
* _argo0
= 0;
1595 char *_kwnames
[] = { "self","width","height", NULL
};
1599 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Rescale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1602 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1603 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1604 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1609 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1610 wxImage
& _result_ref
= wxImage_Rescale(_arg0
,_arg1
,_arg2
);
1611 _result
= (wxImage
*) &_result_ref
;
1613 wxPyEndAllowThreads(__tstate
);
1614 if (PyErr_Occurred()) return NULL
;
1616 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1617 _resultobj
= Py_BuildValue("s",_ptemp
);
1620 _resultobj
= Py_None
;
1625 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1626 static PyObject
*_wrap_wxImage_SetRGB(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1627 PyObject
* _resultobj
;
1631 unsigned char _arg3
;
1632 unsigned char _arg4
;
1633 unsigned char _arg5
;
1634 PyObject
* _argo0
= 0;
1635 char *_kwnames
[] = { "self","x","y","r","g","b", NULL
};
1638 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oiibbb:wxImage_SetRGB",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
))
1641 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1642 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1643 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1648 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1649 wxImage_SetRGB(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
);
1651 wxPyEndAllowThreads(__tstate
);
1652 if (PyErr_Occurred()) return NULL
;
1653 } Py_INCREF(Py_None
);
1654 _resultobj
= Py_None
;
1658 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1659 static PyObject
*_wrap_wxImage_GetRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1660 PyObject
* _resultobj
;
1661 unsigned char _result
;
1665 PyObject
* _argo0
= 0;
1666 char *_kwnames
[] = { "self","x","y", NULL
};
1669 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetRed",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1672 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1673 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1674 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1679 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1680 _result
= (unsigned char )wxImage_GetRed(_arg0
,_arg1
,_arg2
);
1682 wxPyEndAllowThreads(__tstate
);
1683 if (PyErr_Occurred()) return NULL
;
1684 } _resultobj
= Py_BuildValue("b",_result
);
1688 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1689 static PyObject
*_wrap_wxImage_GetGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1690 PyObject
* _resultobj
;
1691 unsigned char _result
;
1695 PyObject
* _argo0
= 0;
1696 char *_kwnames
[] = { "self","x","y", NULL
};
1699 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetGreen",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1702 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1703 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1704 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1709 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1710 _result
= (unsigned char )wxImage_GetGreen(_arg0
,_arg1
,_arg2
);
1712 wxPyEndAllowThreads(__tstate
);
1713 if (PyErr_Occurred()) return NULL
;
1714 } _resultobj
= Py_BuildValue("b",_result
);
1718 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1719 static PyObject
*_wrap_wxImage_GetBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1720 PyObject
* _resultobj
;
1721 unsigned char _result
;
1725 PyObject
* _argo0
= 0;
1726 char *_kwnames
[] = { "self","x","y", NULL
};
1729 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetBlue",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1732 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1733 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1734 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1739 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1740 _result
= (unsigned char )wxImage_GetBlue(_arg0
,_arg1
,_arg2
);
1742 wxPyEndAllowThreads(__tstate
);
1743 if (PyErr_Occurred()) return NULL
;
1744 } _resultobj
= Py_BuildValue("b",_result
);
1748 static PyObject
*_wrap_wxImage_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1749 PyObject
* _resultobj
;
1752 PyObject
* _obj0
= 0;
1753 char *_kwnames
[] = { "name", NULL
};
1756 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanRead",_kwnames
,&_obj0
))
1759 #if PYTHON_API_VERSION >= 1009
1760 char* tmpPtr
; int tmpSize
;
1761 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1762 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1765 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1767 _arg0
= new wxString(tmpPtr
, tmpSize
);
1769 if (!PyString_Check(_obj0
)) {
1770 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1773 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1777 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1778 _result
= (bool )wxImage::CanRead(*_arg0
);
1780 wxPyEndAllowThreads(__tstate
);
1781 if (PyErr_Occurred()) return NULL
;
1782 } _resultobj
= Py_BuildValue("i",_result
);
1790 static PyObject
*_wrap_wxImage_GetImageCount(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1791 PyObject
* _resultobj
;
1794 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1795 PyObject
* _obj0
= 0;
1796 char *_kwnames
[] = { "name","type", NULL
};
1799 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_GetImageCount",_kwnames
,&_obj0
,&_arg1
))
1802 #if PYTHON_API_VERSION >= 1009
1803 char* tmpPtr
; int tmpSize
;
1804 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1805 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1808 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1810 _arg0
= new wxString(tmpPtr
, tmpSize
);
1812 if (!PyString_Check(_obj0
)) {
1813 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1816 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1820 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1821 _result
= (int )wxImage::GetImageCount(*_arg0
,_arg1
);
1823 wxPyEndAllowThreads(__tstate
);
1824 if (PyErr_Occurred()) return NULL
;
1825 } _resultobj
= Py_BuildValue("i",_result
);
1833 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1834 static PyObject
*_wrap_wxImage_LoadFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1835 PyObject
* _resultobj
;
1839 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
1840 int _arg3
= (int ) -1;
1841 PyObject
* _argo0
= 0;
1842 PyObject
* _obj1
= 0;
1843 char *_kwnames
[] = { "self","name","type","index", NULL
};
1846 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
1849 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1850 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1851 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1856 #if PYTHON_API_VERSION >= 1009
1857 char* tmpPtr
; int tmpSize
;
1858 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1859 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1862 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1864 _arg1
= new wxString(tmpPtr
, tmpSize
);
1866 if (!PyString_Check(_obj1
)) {
1867 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1870 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1874 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1875 _result
= (bool )wxImage_LoadFile(_arg0
,*_arg1
,_arg2
,_arg3
);
1877 wxPyEndAllowThreads(__tstate
);
1878 if (PyErr_Occurred()) return NULL
;
1879 } _resultobj
= Py_BuildValue("i",_result
);
1887 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1888 static PyObject
*_wrap_wxImage_LoadMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1889 PyObject
* _resultobj
;
1894 int _arg3
= (int ) -1;
1895 PyObject
* _argo0
= 0;
1896 PyObject
* _obj1
= 0;
1897 PyObject
* _obj2
= 0;
1898 char *_kwnames
[] = { "self","name","mimetype","index", NULL
};
1901 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
1904 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1905 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1906 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1911 #if PYTHON_API_VERSION >= 1009
1912 char* tmpPtr
; int tmpSize
;
1913 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1914 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1917 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1919 _arg1
= new wxString(tmpPtr
, tmpSize
);
1921 if (!PyString_Check(_obj1
)) {
1922 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1925 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1929 #if PYTHON_API_VERSION >= 1009
1930 char* tmpPtr
; int tmpSize
;
1931 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1932 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1935 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1937 _arg2
= new wxString(tmpPtr
, tmpSize
);
1939 if (!PyString_Check(_obj2
)) {
1940 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1943 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1947 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1948 _result
= (bool )wxImage_LoadMimeFile(_arg0
,*_arg1
,*_arg2
,_arg3
);
1950 wxPyEndAllowThreads(__tstate
);
1951 if (PyErr_Occurred()) return NULL
;
1952 } _resultobj
= Py_BuildValue("i",_result
);
1964 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1965 static PyObject
*_wrap_wxImage_SaveFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1966 PyObject
* _resultobj
;
1971 PyObject
* _argo0
= 0;
1972 PyObject
* _obj1
= 0;
1973 char *_kwnames
[] = { "self","name","type", NULL
};
1976 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SaveFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1979 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1980 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1981 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1986 #if PYTHON_API_VERSION >= 1009
1987 char* tmpPtr
; int tmpSize
;
1988 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1989 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1992 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1994 _arg1
= new wxString(tmpPtr
, tmpSize
);
1996 if (!PyString_Check(_obj1
)) {
1997 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2000 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2004 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2005 _result
= (bool )wxImage_SaveFile(_arg0
,*_arg1
,_arg2
);
2007 wxPyEndAllowThreads(__tstate
);
2008 if (PyErr_Occurred()) return NULL
;
2009 } _resultobj
= Py_BuildValue("i",_result
);
2017 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
2018 static PyObject
*_wrap_wxImage_SaveMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2019 PyObject
* _resultobj
;
2024 PyObject
* _argo0
= 0;
2025 PyObject
* _obj1
= 0;
2026 PyObject
* _obj2
= 0;
2027 char *_kwnames
[] = { "self","name","mimetype", NULL
};
2030 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SaveMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2033 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2034 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2035 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
2040 #if PYTHON_API_VERSION >= 1009
2041 char* tmpPtr
; int tmpSize
;
2042 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2043 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2046 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2048 _arg1
= new wxString(tmpPtr
, tmpSize
);
2050 if (!PyString_Check(_obj1
)) {
2051 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2054 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2058 #if PYTHON_API_VERSION >= 1009
2059 char* tmpPtr
; int tmpSize
;
2060 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2061 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2064 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2066 _arg2
= new wxString(tmpPtr
, tmpSize
);
2068 if (!PyString_Check(_obj2
)) {
2069 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2072 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2076 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2077 _result
= (bool )wxImage_SaveMimeFile(_arg0
,*_arg1
,*_arg2
);
2079 wxPyEndAllowThreads(__tstate
);
2080 if (PyErr_Occurred()) return NULL
;
2081 } _resultobj
= Py_BuildValue("i",_result
);
2093 static PyObject
*_wrap_wxImage_CanReadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2094 PyObject
* _resultobj
;
2096 wxInputStream
* _arg0
;
2097 wxPyInputStream
* temp
;
2099 PyObject
* _obj0
= 0;
2100 char *_kwnames
[] = { "stream", NULL
};
2103 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanReadStream",_kwnames
,&_obj0
))
2106 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2107 _arg0
= temp
->m_wxis
;
2110 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
2111 if (_arg0
== NULL
) {
2112 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2119 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2120 _result
= (bool )wxImage::CanRead(*_arg0
);
2122 wxPyEndAllowThreads(__tstate
);
2123 if (PyErr_Occurred()) return NULL
;
2124 } _resultobj
= Py_BuildValue("i",_result
);
2132 #define wxImage_LoadStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2133 static PyObject
*_wrap_wxImage_LoadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2134 PyObject
* _resultobj
;
2137 wxInputStream
* _arg1
;
2138 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
2139 int _arg3
= (int ) -1;
2140 PyObject
* _argo0
= 0;
2141 wxPyInputStream
* temp
;
2143 PyObject
* _obj1
= 0;
2144 char *_kwnames
[] = { "self","stream","type","index", NULL
};
2147 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadStream",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
2150 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2151 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2152 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadStream. Expected _wxImage_p.");
2157 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2158 _arg1
= temp
->m_wxis
;
2161 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2162 if (_arg1
== NULL
) {
2163 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2170 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2171 _result
= (bool )wxImage_LoadStream(_arg0
,*_arg1
,_arg2
,_arg3
);
2173 wxPyEndAllowThreads(__tstate
);
2174 if (PyErr_Occurred()) return NULL
;
2175 } _resultobj
= Py_BuildValue("i",_result
);
2183 #define wxImage_LoadMimeStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2184 static PyObject
*_wrap_wxImage_LoadMimeStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2185 PyObject
* _resultobj
;
2188 wxInputStream
* _arg1
;
2190 int _arg3
= (int ) -1;
2191 PyObject
* _argo0
= 0;
2192 wxPyInputStream
* temp
;
2194 PyObject
* _obj1
= 0;
2195 PyObject
* _obj2
= 0;
2196 char *_kwnames
[] = { "self","stream","mimetype","index", NULL
};
2199 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeStream",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
2202 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2203 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2204 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeStream. Expected _wxImage_p.");
2209 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2210 _arg1
= temp
->m_wxis
;
2213 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2214 if (_arg1
== NULL
) {
2215 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2222 #if PYTHON_API_VERSION >= 1009
2223 char* tmpPtr
; int tmpSize
;
2224 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2225 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2228 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2230 _arg2
= new wxString(tmpPtr
, tmpSize
);
2232 if (!PyString_Check(_obj2
)) {
2233 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2236 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2240 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2241 _result
= (bool )wxImage_LoadMimeStream(_arg0
,*_arg1
,*_arg2
,_arg3
);
2243 wxPyEndAllowThreads(__tstate
);
2244 if (PyErr_Occurred()) return NULL
;
2245 } _resultobj
= Py_BuildValue("i",_result
);
2257 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
2258 static PyObject
*_wrap_wxImage_Ok(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2259 PyObject
* _resultobj
;
2262 PyObject
* _argo0
= 0;
2263 char *_kwnames
[] = { "self", NULL
};
2266 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Ok",_kwnames
,&_argo0
))
2269 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2270 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2271 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
2276 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2277 _result
= (bool )wxImage_Ok(_arg0
);
2279 wxPyEndAllowThreads(__tstate
);
2280 if (PyErr_Occurred()) return NULL
;
2281 } _resultobj
= Py_BuildValue("i",_result
);
2285 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
2286 static PyObject
*_wrap_wxImage_GetWidth(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2287 PyObject
* _resultobj
;
2290 PyObject
* _argo0
= 0;
2291 char *_kwnames
[] = { "self", NULL
};
2294 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetWidth",_kwnames
,&_argo0
))
2297 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2298 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2299 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetWidth. Expected _wxImage_p.");
2304 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2305 _result
= (int )wxImage_GetWidth(_arg0
);
2307 wxPyEndAllowThreads(__tstate
);
2308 if (PyErr_Occurred()) return NULL
;
2309 } _resultobj
= Py_BuildValue("i",_result
);
2313 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
2314 static PyObject
*_wrap_wxImage_GetHeight(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2315 PyObject
* _resultobj
;
2318 PyObject
* _argo0
= 0;
2319 char *_kwnames
[] = { "self", NULL
};
2322 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetHeight",_kwnames
,&_argo0
))
2325 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2326 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2327 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
2332 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2333 _result
= (int )wxImage_GetHeight(_arg0
);
2335 wxPyEndAllowThreads(__tstate
);
2336 if (PyErr_Occurred()) return NULL
;
2337 } _resultobj
= Py_BuildValue("i",_result
);
2341 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
2342 static PyObject
*_wrap_wxImage_GetSubImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2343 PyObject
* _resultobj
;
2347 PyObject
* _argo0
= 0;
2349 PyObject
* _obj1
= 0;
2350 char *_kwnames
[] = { "self","rect", NULL
};
2354 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetSubImage",_kwnames
,&_argo0
,&_obj1
))
2357 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2358 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2359 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
2365 if (! wxRect_helper(_obj1
, &_arg1
))
2369 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2370 _result
= new wxImage (wxImage_GetSubImage(_arg0
,*_arg1
));
2372 wxPyEndAllowThreads(__tstate
);
2373 if (PyErr_Occurred()) return NULL
;
2374 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2375 _resultobj
= Py_BuildValue("s",_ptemp
);
2379 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
2380 static PyObject
*_wrap_wxImage_Copy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2381 PyObject
* _resultobj
;
2384 PyObject
* _argo0
= 0;
2385 char *_kwnames
[] = { "self", NULL
};
2389 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Copy",_kwnames
,&_argo0
))
2392 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2393 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2394 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
2399 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2400 _result
= new wxImage (wxImage_Copy(_arg0
));
2402 wxPyEndAllowThreads(__tstate
);
2403 if (PyErr_Occurred()) return NULL
;
2404 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2405 _resultobj
= Py_BuildValue("s",_ptemp
);
2409 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
2410 static PyObject
*_wrap_wxImage_Paste(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2411 PyObject
* _resultobj
;
2416 PyObject
* _argo0
= 0;
2417 PyObject
* _argo1
= 0;
2418 char *_kwnames
[] = { "self","image","x","y", NULL
};
2421 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOii:wxImage_Paste",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_arg3
))
2424 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2425 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2426 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
2431 if (_argo1
== Py_None
) { _arg1
= NULL
; }
2432 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxImage_p")) {
2433 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
2438 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2439 wxImage_Paste(_arg0
,*_arg1
,_arg2
,_arg3
);
2441 wxPyEndAllowThreads(__tstate
);
2442 if (PyErr_Occurred()) return NULL
;
2443 } Py_INCREF(Py_None
);
2444 _resultobj
= Py_None
;
2448 static PyObject
* wxImage_GetData(wxImage
*self
) {
2449 unsigned char* data
= self
->GetData();
2450 int len
= self
->GetWidth() * self
->GetHeight() * 3;
2451 return PyString_FromStringAndSize((char*)data
, len
);
2453 static PyObject
*_wrap_wxImage_GetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2454 PyObject
* _resultobj
;
2457 PyObject
* _argo0
= 0;
2458 char *_kwnames
[] = { "self", NULL
};
2461 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetData",_kwnames
,&_argo0
))
2464 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2465 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2466 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
2471 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2472 _result
= (PyObject
*)wxImage_GetData(_arg0
);
2474 wxPyEndAllowThreads(__tstate
);
2475 if (PyErr_Occurred()) return NULL
;
2477 _resultobj
= _result
;
2482 static void wxImage_SetData(wxImage
*self
,PyObject
* data
) {
2483 unsigned char* dataPtr
;
2485 if (! PyString_Check(data
)) {
2486 PyErr_SetString(PyExc_TypeError
, "Expected string object");
2490 size_t len
= self
->GetWidth() * self
->GetHeight() * 3;
2491 dataPtr
= (unsigned char*) malloc(len
);
2492 memcpy(dataPtr
, PyString_AsString(data
), len
);
2493 self
->SetData(dataPtr
);
2495 static PyObject
*_wrap_wxImage_SetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2496 PyObject
* _resultobj
;
2499 PyObject
* _argo0
= 0;
2500 PyObject
* _obj1
= 0;
2501 char *_kwnames
[] = { "self","data", NULL
};
2504 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_SetData",_kwnames
,&_argo0
,&_obj1
))
2507 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2508 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2509 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
2517 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2518 wxImage_SetData(_arg0
,_arg1
);
2520 wxPyEndAllowThreads(__tstate
);
2521 if (PyErr_Occurred()) return NULL
;
2522 } Py_INCREF(Py_None
);
2523 _resultobj
= Py_None
;
2527 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
2528 static PyObject
*_wrap_wxImage_SetMaskColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2529 PyObject
* _resultobj
;
2531 unsigned char _arg1
;
2532 unsigned char _arg2
;
2533 unsigned char _arg3
;
2534 PyObject
* _argo0
= 0;
2535 char *_kwnames
[] = { "self","r","g","b", NULL
};
2538 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_SetMaskColour",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2541 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2542 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2543 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
2548 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2549 wxImage_SetMaskColour(_arg0
,_arg1
,_arg2
,_arg3
);
2551 wxPyEndAllowThreads(__tstate
);
2552 if (PyErr_Occurred()) return NULL
;
2553 } Py_INCREF(Py_None
);
2554 _resultobj
= Py_None
;
2558 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
2559 static PyObject
*_wrap_wxImage_GetMaskRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2560 PyObject
* _resultobj
;
2561 unsigned char _result
;
2563 PyObject
* _argo0
= 0;
2564 char *_kwnames
[] = { "self", NULL
};
2567 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskRed",_kwnames
,&_argo0
))
2570 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2571 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2572 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
2577 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2578 _result
= (unsigned char )wxImage_GetMaskRed(_arg0
);
2580 wxPyEndAllowThreads(__tstate
);
2581 if (PyErr_Occurred()) return NULL
;
2582 } _resultobj
= Py_BuildValue("b",_result
);
2586 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
2587 static PyObject
*_wrap_wxImage_GetMaskGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2588 PyObject
* _resultobj
;
2589 unsigned char _result
;
2591 PyObject
* _argo0
= 0;
2592 char *_kwnames
[] = { "self", NULL
};
2595 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskGreen",_kwnames
,&_argo0
))
2598 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2599 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2600 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
2605 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2606 _result
= (unsigned char )wxImage_GetMaskGreen(_arg0
);
2608 wxPyEndAllowThreads(__tstate
);
2609 if (PyErr_Occurred()) return NULL
;
2610 } _resultobj
= Py_BuildValue("b",_result
);
2614 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
2615 static PyObject
*_wrap_wxImage_GetMaskBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2616 PyObject
* _resultobj
;
2617 unsigned char _result
;
2619 PyObject
* _argo0
= 0;
2620 char *_kwnames
[] = { "self", NULL
};
2623 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskBlue",_kwnames
,&_argo0
))
2626 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2627 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2628 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
2633 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2634 _result
= (unsigned char )wxImage_GetMaskBlue(_arg0
);
2636 wxPyEndAllowThreads(__tstate
);
2637 if (PyErr_Occurred()) return NULL
;
2638 } _resultobj
= Py_BuildValue("b",_result
);
2642 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
2643 static PyObject
*_wrap_wxImage_SetMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2644 PyObject
* _resultobj
;
2646 bool _arg1
= (bool ) TRUE
;
2647 PyObject
* _argo0
= 0;
2648 int tempbool1
= (int) TRUE
;
2649 char *_kwnames
[] = { "self","mask", NULL
};
2652 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_SetMask",_kwnames
,&_argo0
,&tempbool1
))
2655 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2656 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2657 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
2661 _arg1
= (bool ) tempbool1
;
2663 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2664 wxImage_SetMask(_arg0
,_arg1
);
2666 wxPyEndAllowThreads(__tstate
);
2667 if (PyErr_Occurred()) return NULL
;
2668 } Py_INCREF(Py_None
);
2669 _resultobj
= Py_None
;
2673 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
2674 static PyObject
*_wrap_wxImage_HasMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2675 PyObject
* _resultobj
;
2678 PyObject
* _argo0
= 0;
2679 char *_kwnames
[] = { "self", NULL
};
2682 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_HasMask",_kwnames
,&_argo0
))
2685 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2686 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2687 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
2692 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2693 _result
= (bool )wxImage_HasMask(_arg0
);
2695 wxPyEndAllowThreads(__tstate
);
2696 if (PyErr_Occurred()) return NULL
;
2697 } _resultobj
= Py_BuildValue("i",_result
);
2701 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
2702 static PyObject
*_wrap_wxImage_Rotate(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2703 PyObject
* _resultobj
;
2708 bool _arg3
= (bool ) TRUE
;
2709 wxPoint
* _arg4
= (wxPoint
*) NULL
;
2710 PyObject
* _argo0
= 0;
2712 PyObject
* _obj2
= 0;
2713 int tempbool3
= (int) TRUE
;
2715 PyObject
* _obj4
= 0;
2716 char *_kwnames
[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL
};
2720 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OdO|iO:wxImage_Rotate",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&tempbool3
,&_obj4
))
2723 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2724 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2725 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
2731 if (! wxPoint_helper(_obj2
, &_arg2
))
2734 _arg3
= (bool ) tempbool3
;
2738 if (! wxPoint_helper(_obj4
, &_arg4
))
2742 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2743 _result
= new wxImage (wxImage_Rotate(_arg0
,_arg1
,*_arg2
,_arg3
,_arg4
));
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_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
2753 static PyObject
*_wrap_wxImage_Rotate90(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","clockwise", NULL
};
2764 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Rotate90",_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_Rotate90. Expected _wxImage_p.");
2773 _arg1
= (bool ) tempbool1
;
2775 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2776 _result
= new wxImage (wxImage_Rotate90(_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_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2786 static PyObject
*_wrap_wxImage_Mirror(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2787 PyObject
* _resultobj
;
2790 bool _arg1
= (bool ) TRUE
;
2791 PyObject
* _argo0
= 0;
2792 int tempbool1
= (int) TRUE
;
2793 char *_kwnames
[] = { "self","horizontally", NULL
};
2797 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Mirror",_kwnames
,&_argo0
,&tempbool1
))
2800 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2801 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2802 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2806 _arg1
= (bool ) tempbool1
;
2808 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2809 _result
= new wxImage (wxImage_Mirror(_arg0
,_arg1
));
2811 wxPyEndAllowThreads(__tstate
);
2812 if (PyErr_Occurred()) return NULL
;
2813 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2814 _resultobj
= Py_BuildValue("s",_ptemp
);
2818 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2819 static PyObject
*_wrap_wxImage_Replace(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2820 PyObject
* _resultobj
;
2822 unsigned char _arg1
;
2823 unsigned char _arg2
;
2824 unsigned char _arg3
;
2825 unsigned char _arg4
;
2826 unsigned char _arg5
;
2827 unsigned char _arg6
;
2828 PyObject
* _argo0
= 0;
2829 char *_kwnames
[] = { "self","r1","g1","b1","r2","g2","b2", NULL
};
2832 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbbbbb:wxImage_Replace",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
,&_arg6
))
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_Replace. Expected _wxImage_p.");
2842 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2843 wxImage_Replace(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
,_arg6
);
2845 wxPyEndAllowThreads(__tstate
);
2846 if (PyErr_Occurred()) return NULL
;
2847 } Py_INCREF(Py_None
);
2848 _resultobj
= Py_None
;
2852 #define wxImage_ConvertToMono(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMono(_swigarg0,_swigarg1,_swigarg2))
2853 static PyObject
*_wrap_wxImage_ConvertToMono(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2854 PyObject
* _resultobj
;
2857 unsigned char _arg1
;
2858 unsigned char _arg2
;
2859 unsigned char _arg3
;
2860 PyObject
* _argo0
= 0;
2861 char *_kwnames
[] = { "self","r","g","b", NULL
};
2865 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMono",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2868 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2869 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2870 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMono. Expected _wxImage_p.");
2875 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2876 _result
= new wxImage (wxImage_ConvertToMono(_arg0
,_arg1
,_arg2
,_arg3
));
2878 wxPyEndAllowThreads(__tstate
);
2879 if (PyErr_Occurred()) return NULL
;
2880 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2881 _resultobj
= Py_BuildValue("s",_ptemp
);
2885 #define wxImage_SetOption(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2886 static PyObject
*_wrap_wxImage_SetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2887 PyObject
* _resultobj
;
2891 PyObject
* _argo0
= 0;
2892 PyObject
* _obj1
= 0;
2893 PyObject
* _obj2
= 0;
2894 char *_kwnames
[] = { "self","name","value", NULL
};
2897 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SetOption",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2900 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2901 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2902 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOption. Expected _wxImage_p.");
2907 #if PYTHON_API_VERSION >= 1009
2908 char* tmpPtr
; int tmpSize
;
2909 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2910 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2913 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2915 _arg1
= new wxString(tmpPtr
, tmpSize
);
2917 if (!PyString_Check(_obj1
)) {
2918 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2921 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2925 #if PYTHON_API_VERSION >= 1009
2926 char* tmpPtr
; int tmpSize
;
2927 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2928 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2931 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2933 _arg2
= new wxString(tmpPtr
, tmpSize
);
2935 if (!PyString_Check(_obj2
)) {
2936 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2939 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2943 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2944 wxImage_SetOption(_arg0
,*_arg1
,*_arg2
);
2946 wxPyEndAllowThreads(__tstate
);
2947 if (PyErr_Occurred()) return NULL
;
2948 } Py_INCREF(Py_None
);
2949 _resultobj
= Py_None
;
2961 #define wxImage_SetOptionInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2962 static PyObject
*_wrap_wxImage_SetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2963 PyObject
* _resultobj
;
2967 PyObject
* _argo0
= 0;
2968 PyObject
* _obj1
= 0;
2969 char *_kwnames
[] = { "self","name","value", NULL
};
2972 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SetOptionInt",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
2975 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2976 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2977 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOptionInt. Expected _wxImage_p.");
2982 #if PYTHON_API_VERSION >= 1009
2983 char* tmpPtr
; int tmpSize
;
2984 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2985 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2988 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2990 _arg1
= new wxString(tmpPtr
, tmpSize
);
2992 if (!PyString_Check(_obj1
)) {
2993 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2996 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3000 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3001 wxImage_SetOptionInt(_arg0
,*_arg1
,_arg2
);
3003 wxPyEndAllowThreads(__tstate
);
3004 if (PyErr_Occurred()) return NULL
;
3005 } Py_INCREF(Py_None
);
3006 _resultobj
= Py_None
;
3014 #define wxImage_GetOption(_swigobj,_swigarg0) (_swigobj->GetOption(_swigarg0))
3015 static PyObject
*_wrap_wxImage_GetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3016 PyObject
* _resultobj
;
3020 PyObject
* _argo0
= 0;
3021 PyObject
* _obj1
= 0;
3022 char *_kwnames
[] = { "self","name", NULL
};
3025 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOption",_kwnames
,&_argo0
,&_obj1
))
3028 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3029 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3030 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOption. Expected _wxImage_p.");
3035 #if PYTHON_API_VERSION >= 1009
3036 char* tmpPtr
; int tmpSize
;
3037 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3038 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3041 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3043 _arg1
= new wxString(tmpPtr
, tmpSize
);
3045 if (!PyString_Check(_obj1
)) {
3046 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3049 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3053 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3054 _result
= new wxString (wxImage_GetOption(_arg0
,*_arg1
));
3056 wxPyEndAllowThreads(__tstate
);
3057 if (PyErr_Occurred()) return NULL
;
3059 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
3071 #define wxImage_GetOptionInt(_swigobj,_swigarg0) (_swigobj->GetOptionInt(_swigarg0))
3072 static PyObject
*_wrap_wxImage_GetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3073 PyObject
* _resultobj
;
3077 PyObject
* _argo0
= 0;
3078 PyObject
* _obj1
= 0;
3079 char *_kwnames
[] = { "self","name", NULL
};
3082 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOptionInt",_kwnames
,&_argo0
,&_obj1
))
3085 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3086 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3087 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOptionInt. Expected _wxImage_p.");
3092 #if PYTHON_API_VERSION >= 1009
3093 char* tmpPtr
; int tmpSize
;
3094 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3095 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3098 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3100 _arg1
= new wxString(tmpPtr
, tmpSize
);
3102 if (!PyString_Check(_obj1
)) {
3103 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3106 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3110 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3111 _result
= (int )wxImage_GetOptionInt(_arg0
,*_arg1
);
3113 wxPyEndAllowThreads(__tstate
);
3114 if (PyErr_Occurred()) return NULL
;
3115 } _resultobj
= Py_BuildValue("i",_result
);
3123 #define wxImage_HasOption(_swigobj,_swigarg0) (_swigobj->HasOption(_swigarg0))
3124 static PyObject
*_wrap_wxImage_HasOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3125 PyObject
* _resultobj
;
3129 PyObject
* _argo0
= 0;
3130 PyObject
* _obj1
= 0;
3131 char *_kwnames
[] = { "self","name", NULL
};
3134 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_HasOption",_kwnames
,&_argo0
,&_obj1
))
3137 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3138 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3139 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasOption. Expected _wxImage_p.");
3144 #if PYTHON_API_VERSION >= 1009
3145 char* tmpPtr
; int tmpSize
;
3146 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3147 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3150 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3152 _arg1
= new wxString(tmpPtr
, tmpSize
);
3154 if (!PyString_Check(_obj1
)) {
3155 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3158 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3162 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3163 _result
= (bool )wxImage_HasOption(_arg0
,*_arg1
);
3165 wxPyEndAllowThreads(__tstate
);
3166 if (PyErr_Occurred()) return NULL
;
3167 } _resultobj
= Py_BuildValue("i",_result
);
3175 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
3176 static PyObject
*_wrap_wxImage_CountColours(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3177 PyObject
* _resultobj
;
3178 unsigned long _result
;
3180 unsigned long _arg1
= (unsigned long ) (unsigned long)-1;
3181 PyObject
* _argo0
= 0;
3182 char *_kwnames
[] = { "self","stopafter", NULL
};
3185 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_CountColours",_kwnames
,&_argo0
,&_arg1
))
3188 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3189 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3190 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
3195 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3196 _result
= (unsigned long )wxImage_CountColours(_arg0
,_arg1
);
3198 wxPyEndAllowThreads(__tstate
);
3199 if (PyErr_Occurred()) return NULL
;
3200 } _resultobj
= Py_BuildValue("l",_result
);
3204 static PyObject
*_wrap_wxImage_AddHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3205 PyObject
* _resultobj
;
3206 wxImageHandler
* _arg0
;
3207 PyObject
* _argo0
= 0;
3208 char *_kwnames
[] = { "handler", NULL
};
3211 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_AddHandler",_kwnames
,&_argo0
))
3214 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3215 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3216 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
3221 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3222 wxImage::AddHandler(_arg0
);
3224 wxPyEndAllowThreads(__tstate
);
3225 if (PyErr_Occurred()) return NULL
;
3226 } Py_INCREF(Py_None
);
3227 _resultobj
= Py_None
;
3231 static PyObject
*_wrap_wxImage_InsertHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3232 PyObject
* _resultobj
;
3233 wxImageHandler
* _arg0
;
3234 PyObject
* _argo0
= 0;
3235 char *_kwnames
[] = { "handler", NULL
};
3238 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_InsertHandler",_kwnames
,&_argo0
))
3241 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3242 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3243 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
3248 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3249 wxImage::InsertHandler(_arg0
);
3251 wxPyEndAllowThreads(__tstate
);
3252 if (PyErr_Occurred()) return NULL
;
3253 } Py_INCREF(Py_None
);
3254 _resultobj
= Py_None
;
3258 static PyObject
*_wrap_wxImage_RemoveHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3259 PyObject
* _resultobj
;
3262 PyObject
* _obj0
= 0;
3263 char *_kwnames
[] = { "name", NULL
};
3266 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_RemoveHandler",_kwnames
,&_obj0
))
3269 #if PYTHON_API_VERSION >= 1009
3270 char* tmpPtr
; int tmpSize
;
3271 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
3272 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3275 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
3277 _arg0
= new wxString(tmpPtr
, tmpSize
);
3279 if (!PyString_Check(_obj0
)) {
3280 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3283 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
3287 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3288 _result
= (bool )wxImage::RemoveHandler(*_arg0
);
3290 wxPyEndAllowThreads(__tstate
);
3291 if (PyErr_Occurred()) return NULL
;
3292 } _resultobj
= Py_BuildValue("i",_result
);
3300 static PyMethodDef imagecMethods
[] = {
3301 { "wxImage_RemoveHandler", (PyCFunction
) _wrap_wxImage_RemoveHandler
, METH_VARARGS
| METH_KEYWORDS
},
3302 { "wxImage_InsertHandler", (PyCFunction
) _wrap_wxImage_InsertHandler
, METH_VARARGS
| METH_KEYWORDS
},
3303 { "wxImage_AddHandler", (PyCFunction
) _wrap_wxImage_AddHandler
, METH_VARARGS
| METH_KEYWORDS
},
3304 { "wxImage_CountColours", (PyCFunction
) _wrap_wxImage_CountColours
, METH_VARARGS
| METH_KEYWORDS
},
3305 { "wxImage_HasOption", (PyCFunction
) _wrap_wxImage_HasOption
, METH_VARARGS
| METH_KEYWORDS
},
3306 { "wxImage_GetOptionInt", (PyCFunction
) _wrap_wxImage_GetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3307 { "wxImage_GetOption", (PyCFunction
) _wrap_wxImage_GetOption
, METH_VARARGS
| METH_KEYWORDS
},
3308 { "wxImage_SetOptionInt", (PyCFunction
) _wrap_wxImage_SetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3309 { "wxImage_SetOption", (PyCFunction
) _wrap_wxImage_SetOption
, METH_VARARGS
| METH_KEYWORDS
},
3310 { "wxImage_ConvertToMono", (PyCFunction
) _wrap_wxImage_ConvertToMono
, METH_VARARGS
| METH_KEYWORDS
},
3311 { "wxImage_Replace", (PyCFunction
) _wrap_wxImage_Replace
, METH_VARARGS
| METH_KEYWORDS
},
3312 { "wxImage_Mirror", (PyCFunction
) _wrap_wxImage_Mirror
, METH_VARARGS
| METH_KEYWORDS
},
3313 { "wxImage_Rotate90", (PyCFunction
) _wrap_wxImage_Rotate90
, METH_VARARGS
| METH_KEYWORDS
},
3314 { "wxImage_Rotate", (PyCFunction
) _wrap_wxImage_Rotate
, METH_VARARGS
| METH_KEYWORDS
},
3315 { "wxImage_HasMask", (PyCFunction
) _wrap_wxImage_HasMask
, METH_VARARGS
| METH_KEYWORDS
},
3316 { "wxImage_SetMask", (PyCFunction
) _wrap_wxImage_SetMask
, METH_VARARGS
| METH_KEYWORDS
},
3317 { "wxImage_GetMaskBlue", (PyCFunction
) _wrap_wxImage_GetMaskBlue
, METH_VARARGS
| METH_KEYWORDS
},
3318 { "wxImage_GetMaskGreen", (PyCFunction
) _wrap_wxImage_GetMaskGreen
, METH_VARARGS
| METH_KEYWORDS
},
3319 { "wxImage_GetMaskRed", (PyCFunction
) _wrap_wxImage_GetMaskRed
, METH_VARARGS
| METH_KEYWORDS
},
3320 { "wxImage_SetMaskColour", (PyCFunction
) _wrap_wxImage_SetMaskColour
, METH_VARARGS
| METH_KEYWORDS
},
3321 { "wxImage_SetData", (PyCFunction
) _wrap_wxImage_SetData
, METH_VARARGS
| METH_KEYWORDS
},
3322 { "wxImage_GetData", (PyCFunction
) _wrap_wxImage_GetData
, METH_VARARGS
| METH_KEYWORDS
},
3323 { "wxImage_Paste", (PyCFunction
) _wrap_wxImage_Paste
, METH_VARARGS
| METH_KEYWORDS
},
3324 { "wxImage_Copy", (PyCFunction
) _wrap_wxImage_Copy
, METH_VARARGS
| METH_KEYWORDS
},
3325 { "wxImage_GetSubImage", (PyCFunction
) _wrap_wxImage_GetSubImage
, METH_VARARGS
| METH_KEYWORDS
},
3326 { "wxImage_GetHeight", (PyCFunction
) _wrap_wxImage_GetHeight
, METH_VARARGS
| METH_KEYWORDS
},
3327 { "wxImage_GetWidth", (PyCFunction
) _wrap_wxImage_GetWidth
, METH_VARARGS
| METH_KEYWORDS
},
3328 { "wxImage_Ok", (PyCFunction
) _wrap_wxImage_Ok
, METH_VARARGS
| METH_KEYWORDS
},
3329 { "wxImage_LoadMimeStream", (PyCFunction
) _wrap_wxImage_LoadMimeStream
, METH_VARARGS
| METH_KEYWORDS
},
3330 { "wxImage_LoadStream", (PyCFunction
) _wrap_wxImage_LoadStream
, METH_VARARGS
| METH_KEYWORDS
},
3331 { "wxImage_CanReadStream", (PyCFunction
) _wrap_wxImage_CanReadStream
, METH_VARARGS
| METH_KEYWORDS
},
3332 { "wxImage_SaveMimeFile", (PyCFunction
) _wrap_wxImage_SaveMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3333 { "wxImage_SaveFile", (PyCFunction
) _wrap_wxImage_SaveFile
, METH_VARARGS
| METH_KEYWORDS
},
3334 { "wxImage_LoadMimeFile", (PyCFunction
) _wrap_wxImage_LoadMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3335 { "wxImage_LoadFile", (PyCFunction
) _wrap_wxImage_LoadFile
, METH_VARARGS
| METH_KEYWORDS
},
3336 { "wxImage_GetImageCount", (PyCFunction
) _wrap_wxImage_GetImageCount
, METH_VARARGS
| METH_KEYWORDS
},
3337 { "wxImage_CanRead", (PyCFunction
) _wrap_wxImage_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3338 { "wxImage_GetBlue", (PyCFunction
) _wrap_wxImage_GetBlue
, METH_VARARGS
| METH_KEYWORDS
},
3339 { "wxImage_GetGreen", (PyCFunction
) _wrap_wxImage_GetGreen
, METH_VARARGS
| METH_KEYWORDS
},
3340 { "wxImage_GetRed", (PyCFunction
) _wrap_wxImage_GetRed
, METH_VARARGS
| METH_KEYWORDS
},
3341 { "wxImage_SetRGB", (PyCFunction
) _wrap_wxImage_SetRGB
, METH_VARARGS
| METH_KEYWORDS
},
3342 { "wxImage_Rescale", (PyCFunction
) _wrap_wxImage_Rescale
, METH_VARARGS
| METH_KEYWORDS
},
3343 { "wxImage_Scale", (PyCFunction
) _wrap_wxImage_Scale
, METH_VARARGS
| METH_KEYWORDS
},
3344 { "wxImage_Destroy", (PyCFunction
) _wrap_wxImage_Destroy
, METH_VARARGS
| METH_KEYWORDS
},
3345 { "wxImage_Create", (PyCFunction
) _wrap_wxImage_Create
, METH_VARARGS
| METH_KEYWORDS
},
3346 { "wxImage_ConvertToMonoBitmap", (PyCFunction
) _wrap_wxImage_ConvertToMonoBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3347 { "wxImage_ConvertToBitmap", (PyCFunction
) _wrap_wxImage_ConvertToBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3348 { "delete_wxImage", (PyCFunction
) _wrap_delete_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3349 { "new_wxImage", (PyCFunction
) _wrap_new_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3350 { "new_wxTIFFHandler", (PyCFunction
) _wrap_new_wxTIFFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3351 { "new_wxPCXHandler", (PyCFunction
) _wrap_new_wxPCXHandler
, METH_VARARGS
| METH_KEYWORDS
},
3352 { "new_wxPNMHandler", (PyCFunction
) _wrap_new_wxPNMHandler
, METH_VARARGS
| METH_KEYWORDS
},
3353 { "new_wxGIFHandler", (PyCFunction
) _wrap_new_wxGIFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3354 { "new_wxANIHandler", (PyCFunction
) _wrap_new_wxANIHandler
, METH_VARARGS
| METH_KEYWORDS
},
3355 { "new_wxCURHandler", (PyCFunction
) _wrap_new_wxCURHandler
, METH_VARARGS
| METH_KEYWORDS
},
3356 { "new_wxICOHandler", (PyCFunction
) _wrap_new_wxICOHandler
, METH_VARARGS
| METH_KEYWORDS
},
3357 { "new_wxBMPHandler", (PyCFunction
) _wrap_new_wxBMPHandler
, METH_VARARGS
| METH_KEYWORDS
},
3358 { "new_wxJPEGHandler", (PyCFunction
) _wrap_new_wxJPEGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3359 { "new_wxPNGHandler", (PyCFunction
) _wrap_new_wxPNGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3360 { "wxImageHandler_SetMimeType", (PyCFunction
) _wrap_wxImageHandler_SetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3361 { "wxImageHandler_SetType", (PyCFunction
) _wrap_wxImageHandler_SetType
, METH_VARARGS
| METH_KEYWORDS
},
3362 { "wxImageHandler_SetExtension", (PyCFunction
) _wrap_wxImageHandler_SetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3363 { "wxImageHandler_SetName", (PyCFunction
) _wrap_wxImageHandler_SetName
, METH_VARARGS
| METH_KEYWORDS
},
3364 { "wxImageHandler_CanRead", (PyCFunction
) _wrap_wxImageHandler_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3365 { "wxImageHandler_GetMimeType", (PyCFunction
) _wrap_wxImageHandler_GetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3366 { "wxImageHandler_GetType", (PyCFunction
) _wrap_wxImageHandler_GetType
, METH_VARARGS
| METH_KEYWORDS
},
3367 { "wxImageHandler_GetExtension", (PyCFunction
) _wrap_wxImageHandler_GetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3368 { "wxImageHandler_GetName", (PyCFunction
) _wrap_wxImageHandler_GetName
, METH_VARARGS
| METH_KEYWORDS
},
3369 { "wxBitmapFromImage", (PyCFunction
) _wrap_wxBitmapFromImage
, METH_VARARGS
| METH_KEYWORDS
},
3370 { "wxInitAllImageHandlers", (PyCFunction
) _wrap_wxInitAllImageHandlers
, METH_VARARGS
| METH_KEYWORDS
},
3371 { "wxImageFromStreamMime", (PyCFunction
) _wrap_wxImageFromStreamMime
, METH_VARARGS
| METH_KEYWORDS
},
3372 { "wxImageFromStream", (PyCFunction
) _wrap_wxImageFromStream
, METH_VARARGS
| METH_KEYWORDS
},
3373 { "wxImageFromData", (PyCFunction
) _wrap_wxImageFromData
, METH_VARARGS
| METH_KEYWORDS
},
3374 { "wxImageFromBitmap", (PyCFunction
) _wrap_wxImageFromBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3375 { "wxImageFromMime", (PyCFunction
) _wrap_wxImageFromMime
, METH_VARARGS
| METH_KEYWORDS
},
3376 { "wxEmptyImage", (PyCFunction
) _wrap_wxEmptyImage
, METH_VARARGS
| METH_KEYWORDS
},
3383 * This table is used by the pointer type-checker
3385 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
3386 { "_signed_long","_long",0},
3387 { "_wxBMPHandler","_wxANIHandler",SwigwxANIHandlerTowxBMPHandler
},
3388 { "_wxBMPHandler","_wxCURHandler",SwigwxCURHandlerTowxBMPHandler
},
3389 { "_wxBMPHandler","_wxICOHandler",SwigwxICOHandlerTowxBMPHandler
},
3390 { "_wxICOHandler","_wxANIHandler",SwigwxANIHandlerTowxICOHandler
},
3391 { "_wxICOHandler","_wxCURHandler",SwigwxCURHandlerTowxICOHandler
},
3392 { "_wxPrintQuality","_wxCoord",0},
3393 { "_wxPrintQuality","_int",0},
3394 { "_wxPrintQuality","_signed_int",0},
3395 { "_wxPrintQuality","_unsigned_int",0},
3396 { "_wxPrintQuality","_wxWindowID",0},
3397 { "_wxPrintQuality","_uint",0},
3398 { "_wxPrintQuality","_EBool",0},
3399 { "_wxPrintQuality","_size_t",0},
3400 { "_wxPrintQuality","_time_t",0},
3401 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler
},
3402 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler
},
3403 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler
},
3404 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler
},
3405 { "_wxImageHandler","_wxANIHandler",SwigwxANIHandlerTowxImageHandler
},
3406 { "_wxImageHandler","_wxCURHandler",SwigwxCURHandlerTowxImageHandler
},
3407 { "_wxImageHandler","_wxICOHandler",SwigwxICOHandlerTowxImageHandler
},
3408 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler
},
3409 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler
},
3410 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler
},
3411 { "_byte","_unsigned_char",0},
3412 { "_long","_unsigned_long",0},
3413 { "_long","_signed_long",0},
3414 { "_size_t","_wxCoord",0},
3415 { "_size_t","_wxPrintQuality",0},
3416 { "_size_t","_time_t",0},
3417 { "_size_t","_unsigned_int",0},
3418 { "_size_t","_int",0},
3419 { "_size_t","_wxWindowID",0},
3420 { "_size_t","_uint",0},
3421 { "_uint","_wxCoord",0},
3422 { "_uint","_wxPrintQuality",0},
3423 { "_uint","_time_t",0},
3424 { "_uint","_size_t",0},
3425 { "_uint","_unsigned_int",0},
3426 { "_uint","_int",0},
3427 { "_uint","_wxWindowID",0},
3428 { "_wxChar","_char",0},
3429 { "_char","_wxChar",0},
3430 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
3431 { "_EBool","_wxCoord",0},
3432 { "_EBool","_wxPrintQuality",0},
3433 { "_EBool","_signed_int",0},
3434 { "_EBool","_int",0},
3435 { "_EBool","_wxWindowID",0},
3436 { "_unsigned_long","_long",0},
3437 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
3438 { "_signed_int","_wxCoord",0},
3439 { "_signed_int","_wxPrintQuality",0},
3440 { "_signed_int","_EBool",0},
3441 { "_signed_int","_wxWindowID",0},
3442 { "_signed_int","_int",0},
3443 { "_WXTYPE","_short",0},
3444 { "_WXTYPE","_signed_short",0},
3445 { "_WXTYPE","_unsigned_short",0},
3446 { "_unsigned_short","_WXTYPE",0},
3447 { "_unsigned_short","_short",0},
3448 { "_wxObject","_wxImage",SwigwxImageTowxObject
},
3449 { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject
},
3450 { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject
},
3451 { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject
},
3452 { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject
},
3453 { "_wxObject","_wxANIHandler",SwigwxANIHandlerTowxObject
},
3454 { "_wxObject","_wxCURHandler",SwigwxCURHandlerTowxObject
},
3455 { "_wxObject","_wxICOHandler",SwigwxICOHandlerTowxObject
},
3456 { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject
},
3457 { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject
},
3458 { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject
},
3459 { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject
},
3460 { "_signed_short","_WXTYPE",0},
3461 { "_signed_short","_short",0},
3462 { "_wxCURHandler","_wxANIHandler",SwigwxANIHandlerTowxCURHandler
},
3463 { "_unsigned_char","_byte",0},
3464 { "_unsigned_int","_wxCoord",0},
3465 { "_unsigned_int","_wxPrintQuality",0},
3466 { "_unsigned_int","_time_t",0},
3467 { "_unsigned_int","_size_t",0},
3468 { "_unsigned_int","_uint",0},
3469 { "_unsigned_int","_wxWindowID",0},
3470 { "_unsigned_int","_int",0},
3471 { "_short","_WXTYPE",0},
3472 { "_short","_unsigned_short",0},
3473 { "_short","_signed_short",0},
3474 { "_wxWindowID","_wxCoord",0},
3475 { "_wxWindowID","_wxPrintQuality",0},
3476 { "_wxWindowID","_time_t",0},
3477 { "_wxWindowID","_size_t",0},
3478 { "_wxWindowID","_EBool",0},
3479 { "_wxWindowID","_uint",0},
3480 { "_wxWindowID","_int",0},
3481 { "_wxWindowID","_signed_int",0},
3482 { "_wxWindowID","_unsigned_int",0},
3483 { "_int","_wxCoord",0},
3484 { "_int","_wxPrintQuality",0},
3485 { "_int","_time_t",0},
3486 { "_int","_size_t",0},
3487 { "_int","_EBool",0},
3488 { "_int","_uint",0},
3489 { "_int","_wxWindowID",0},
3490 { "_int","_unsigned_int",0},
3491 { "_int","_signed_int",0},
3492 { "_time_t","_wxCoord",0},
3493 { "_time_t","_wxPrintQuality",0},
3494 { "_time_t","_unsigned_int",0},
3495 { "_time_t","_int",0},
3496 { "_time_t","_wxWindowID",0},
3497 { "_time_t","_uint",0},
3498 { "_time_t","_size_t",0},
3499 { "_wxCoord","_int",0},
3500 { "_wxCoord","_signed_int",0},
3501 { "_wxCoord","_unsigned_int",0},
3502 { "_wxCoord","_wxWindowID",0},
3503 { "_wxCoord","_uint",0},
3504 { "_wxCoord","_EBool",0},
3505 { "_wxCoord","_size_t",0},
3506 { "_wxCoord","_time_t",0},
3507 { "_wxCoord","_wxPrintQuality",0},
3510 static PyObject
*SWIG_globals
;
3514 SWIGEXPORT(void) initimagec() {
3516 SWIG_globals
= SWIG_newvarlink();
3517 m
= Py_InitModule("imagec", imagecMethods
);
3518 d
= PyModule_GetDict(m
);
3519 PyDict_SetItemString(d
,"cvar", SWIG_globals
);
3520 SWIG_addvarlink(SWIG_globals
,"wxNullImage",_wrap_wxNullImage_get
, _wrap_wxNullImage_set
);
3523 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
3524 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);