2 * FILE : src/gtk/image.cpp
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
8 * Portions Copyright (c) 1995-1998
9 * The University of Utah and The Regents of the University of California.
10 * Permission is granted to distribute this file in any manner provided
11 * this notice remains intact.
13 * Do not make changes to this file--changes will be lost!
19 /* Implementation : PYTHON */
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
32 # define SWIGEXPORT(a) a
36 # define SWIGEXPORT(a) a
45 extern void SWIG_MakePtr(char *, void *, char *);
46 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47 extern char *SWIG_GetPtr(char *, void **, char *);
48 extern char *SWIG_GetPtrObj(PyObject
*, void **, char *);
49 extern void SWIG_addvarlink(PyObject
*, char *, PyObject
*(*)(void), int (*)(PyObject
*));
50 extern PyObject
*SWIG_newvarlink(void);
54 #define SWIG_init initimagec
56 #define SWIG_name "imagec"
62 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
68 } else if (target
== Py_None
) {
72 if (!PyTuple_Check(target
)) {
74 target
= PyTuple_New(1);
75 PyTuple_SetItem(target
, 0, o2
);
78 PyTuple_SetItem(o3
, 0, o
);
81 target
= PySequence_Concat(o2
, o3
);
88 #if PYTHON_API_VERSION >= 1009
89 static char* wxStringErrorMsg
= "String or Unicode type required";
91 static char* wxStringErrorMsg
= "String type required";
94 wxImage
* wxEmptyImage(int width
=0, int height
=0) {
95 if (width
== 0 && height
== 0)
98 return new wxImage(width
, height
);
102 wxImage
* wxImageFromMime(const wxString
& name
, const wxString
& mimetype
, int index
) {
103 return new wxImage(name
, mimetype
, index
);
107 wxImage
* wxImageFromBitmap(const wxBitmap
&bitmap
) {
108 return new wxImage(bitmap
);
112 wxImage
* wxImageFromData(int width
, int height
, unsigned char* data
) {
113 // Copy the source data so the wxImage can clean it up later
114 unsigned char* copy
= (unsigned char*)malloc(width
*height
*3);
119 memcpy(copy
, data
, width
*height
*3);
120 return new wxImage(width
, height
, copy
, FALSE
);
124 wxImage
* wxImageFromStream(wxInputStream
& stream
,
125 long type
= wxBITMAP_TYPE_ANY
, int index
= -1) {
126 return new wxImage(stream
, type
, index
);
130 wxImage
* wxImageFromStreamMime(wxInputStream
& stream
,
131 const wxString
& mimetype
, int index
= -1 ) {
132 return new wxImage(stream
, mimetype
, index
);
136 extern wxImage wxNullImage
;
140 wxBitmap
* wxBitmapFromImage(const wxImage
& img
, int depth
=-1) {
141 return new wxBitmap(img
, depth
);
147 static PyObject
*_wrap_wxEmptyImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
148 PyObject
* _resultobj
;
150 int _arg0
= (int ) 0;
151 int _arg1
= (int ) 0;
152 char *_kwnames
[] = { "width","height", NULL
};
156 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"|ii:wxEmptyImage",_kwnames
,&_arg0
,&_arg1
))
159 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
160 _result
= (wxImage
*)wxEmptyImage(_arg0
,_arg1
);
162 wxPyEndAllowThreads(__tstate
);
163 if (PyErr_Occurred()) return NULL
;
165 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
166 _resultobj
= Py_BuildValue("s",_ptemp
);
169 _resultobj
= Py_None
;
174 static PyObject
*_wrap_wxImageFromMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
175 PyObject
* _resultobj
;
179 int _arg2
= (int ) -1;
180 PyObject
* _obj0
= 0;
181 PyObject
* _obj1
= 0;
182 char *_kwnames
[] = { "name","mimetype","index", NULL
};
186 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
189 #if PYTHON_API_VERSION >= 1009
190 char* tmpPtr
; int tmpSize
;
191 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
192 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
195 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
197 _arg0
= new wxString(tmpPtr
, tmpSize
);
199 if (!PyString_Check(_obj0
)) {
200 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
203 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
207 #if PYTHON_API_VERSION >= 1009
208 char* tmpPtr
; int tmpSize
;
209 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
210 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
213 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
215 _arg1
= new wxString(tmpPtr
, tmpSize
);
217 if (!PyString_Check(_obj1
)) {
218 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
221 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
225 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
226 _result
= (wxImage
*)wxImageFromMime(*_arg0
,*_arg1
,_arg2
);
228 wxPyEndAllowThreads(__tstate
);
229 if (PyErr_Occurred()) return NULL
;
231 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
232 _resultobj
= Py_BuildValue("s",_ptemp
);
235 _resultobj
= Py_None
;
248 static PyObject
*_wrap_wxImageFromBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
249 PyObject
* _resultobj
;
252 PyObject
* _argo0
= 0;
253 char *_kwnames
[] = { "bitmap", NULL
};
257 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageFromBitmap",_kwnames
,&_argo0
))
260 if (_argo0
== Py_None
) { _arg0
= NULL
; }
261 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxBitmap_p")) {
262 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
267 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
268 _result
= (wxImage
*)wxImageFromBitmap(*_arg0
);
270 wxPyEndAllowThreads(__tstate
);
271 if (PyErr_Occurred()) return NULL
;
273 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
274 _resultobj
= Py_BuildValue("s",_ptemp
);
277 _resultobj
= Py_None
;
282 static PyObject
*_wrap_wxImageFromData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
283 PyObject
* _resultobj
;
287 unsigned char * _arg2
;
288 PyObject
* _argo2
= 0;
289 char *_kwnames
[] = { "width","height","data", NULL
};
293 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iiO:wxImageFromData",_kwnames
,&_arg0
,&_arg1
,&_argo2
))
296 if (_argo2
== Py_None
) { _arg2
= NULL
; }
297 else if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_unsigned_char_p")) {
298 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of wxImageFromData. Expected _unsigned_char_p.");
303 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
304 _result
= (wxImage
*)wxImageFromData(_arg0
,_arg1
,_arg2
);
306 wxPyEndAllowThreads(__tstate
);
307 if (PyErr_Occurred()) return NULL
;
309 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
310 _resultobj
= Py_BuildValue("s",_ptemp
);
313 _resultobj
= Py_None
;
318 static PyObject
*_wrap_wxImageFromStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
319 PyObject
* _resultobj
;
321 wxInputStream
* _arg0
;
322 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
323 int _arg2
= (int ) -1;
324 wxPyInputStream
* temp
;
326 PyObject
* _obj0
= 0;
327 char *_kwnames
[] = { "stream","type","index", NULL
};
331 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:wxImageFromStream",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
334 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
335 _arg0
= temp
->m_wxis
;
338 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
340 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
347 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
348 _result
= (wxImage
*)wxImageFromStream(*_arg0
,_arg1
,_arg2
);
350 wxPyEndAllowThreads(__tstate
);
351 if (PyErr_Occurred()) return NULL
;
353 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
354 _resultobj
= Py_BuildValue("s",_ptemp
);
357 _resultobj
= Py_None
;
366 static PyObject
*_wrap_wxImageFromStreamMime(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
367 PyObject
* _resultobj
;
369 wxInputStream
* _arg0
;
371 int _arg2
= (int ) -1;
372 wxPyInputStream
* temp
;
374 PyObject
* _obj0
= 0;
375 PyObject
* _obj1
= 0;
376 char *_kwnames
[] = { "stream","mimetype","index", NULL
};
380 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|i:wxImageFromStreamMime",_kwnames
,&_obj0
,&_obj1
,&_arg2
))
383 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
384 _arg0
= temp
->m_wxis
;
387 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
389 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
396 #if PYTHON_API_VERSION >= 1009
397 char* tmpPtr
; int tmpSize
;
398 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
399 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
402 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
404 _arg1
= new wxString(tmpPtr
, tmpSize
);
406 if (!PyString_Check(_obj1
)) {
407 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
410 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
414 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
415 _result
= (wxImage
*)wxImageFromStreamMime(*_arg0
,*_arg1
,_arg2
);
417 wxPyEndAllowThreads(__tstate
);
418 if (PyErr_Occurred()) return NULL
;
420 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
421 _resultobj
= Py_BuildValue("s",_ptemp
);
424 _resultobj
= Py_None
;
437 static PyObject
*_wrap_wxInitAllImageHandlers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
438 PyObject
* _resultobj
;
439 char *_kwnames
[] = { NULL
};
442 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":wxInitAllImageHandlers",_kwnames
))
445 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
446 wxInitAllImageHandlers();
448 wxPyEndAllowThreads(__tstate
);
449 if (PyErr_Occurred()) return NULL
;
450 } Py_INCREF(Py_None
);
451 _resultobj
= Py_None
;
455 static int _wrap_wxNullImage_set(PyObject
*val
) {
457 PyErr_SetString(PyExc_TypeError
,"Variable wxNullImage is read-only.");
461 static PyObject
*_wrap_wxNullImage_get() {
465 SWIG_MakePtr(ptemp
,(char *) &wxNullImage
,"_wxImage_p");
466 pyobj
= PyString_FromString(ptemp
);
470 static PyObject
*_wrap_wxBitmapFromImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
471 PyObject
* _resultobj
;
474 int _arg1
= (int ) -1;
475 PyObject
* _argo0
= 0;
476 char *_kwnames
[] = { "img","depth", NULL
};
480 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxBitmapFromImage",_kwnames
,&_argo0
,&_arg1
))
483 if (_argo0
== Py_None
) { _arg0
= NULL
; }
484 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
485 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
490 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
491 _result
= (wxBitmap
*)wxBitmapFromImage(*_arg0
,_arg1
);
493 wxPyEndAllowThreads(__tstate
);
494 if (PyErr_Occurred()) return NULL
;
496 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBitmap_p");
497 _resultobj
= Py_BuildValue("s",_ptemp
);
500 _resultobj
= Py_None
;
505 static void *SwigwxImageHandlerTowxObject(void *ptr
) {
508 src
= (wxImageHandler
*) ptr
;
509 dest
= (wxObject
*) src
;
510 return (void *) dest
;
513 #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
514 static PyObject
*_wrap_wxImageHandler_GetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
515 PyObject
* _resultobj
;
517 wxImageHandler
* _arg0
;
518 PyObject
* _argo0
= 0;
519 char *_kwnames
[] = { "self", NULL
};
522 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetName",_kwnames
,&_argo0
))
525 if (_argo0
== Py_None
) { _arg0
= NULL
; }
526 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
527 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetName. Expected _wxImageHandler_p.");
532 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
533 _result
= new wxString (wxImageHandler_GetName(_arg0
));
535 wxPyEndAllowThreads(__tstate
);
536 if (PyErr_Occurred()) return NULL
;
538 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
546 #define wxImageHandler_GetExtension(_swigobj) (_swigobj->GetExtension())
547 static PyObject
*_wrap_wxImageHandler_GetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
548 PyObject
* _resultobj
;
550 wxImageHandler
* _arg0
;
551 PyObject
* _argo0
= 0;
552 char *_kwnames
[] = { "self", NULL
};
555 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetExtension",_kwnames
,&_argo0
))
558 if (_argo0
== Py_None
) { _arg0
= NULL
; }
559 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
560 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetExtension. Expected _wxImageHandler_p.");
565 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
566 _result
= new wxString (wxImageHandler_GetExtension(_arg0
));
568 wxPyEndAllowThreads(__tstate
);
569 if (PyErr_Occurred()) return NULL
;
571 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
579 #define wxImageHandler_GetType(_swigobj) (_swigobj->GetType())
580 static PyObject
*_wrap_wxImageHandler_GetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
581 PyObject
* _resultobj
;
583 wxImageHandler
* _arg0
;
584 PyObject
* _argo0
= 0;
585 char *_kwnames
[] = { "self", NULL
};
588 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetType",_kwnames
,&_argo0
))
591 if (_argo0
== Py_None
) { _arg0
= NULL
; }
592 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
593 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetType. Expected _wxImageHandler_p.");
598 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
599 _result
= (long )wxImageHandler_GetType(_arg0
);
601 wxPyEndAllowThreads(__tstate
);
602 if (PyErr_Occurred()) return NULL
;
603 } _resultobj
= Py_BuildValue("l",_result
);
607 #define wxImageHandler_GetMimeType(_swigobj) (_swigobj->GetMimeType())
608 static PyObject
*_wrap_wxImageHandler_GetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
609 PyObject
* _resultobj
;
611 wxImageHandler
* _arg0
;
612 PyObject
* _argo0
= 0;
613 char *_kwnames
[] = { "self", NULL
};
616 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImageHandler_GetMimeType",_kwnames
,&_argo0
))
619 if (_argo0
== Py_None
) { _arg0
= NULL
; }
620 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
621 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_GetMimeType. Expected _wxImageHandler_p.");
626 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
627 _result
= new wxString (wxImageHandler_GetMimeType(_arg0
));
629 wxPyEndAllowThreads(__tstate
);
630 if (PyErr_Occurred()) return NULL
;
632 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
640 #define wxImageHandler_CanRead(_swigobj,_swigarg0) (_swigobj->CanRead(_swigarg0))
641 static PyObject
*_wrap_wxImageHandler_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
642 PyObject
* _resultobj
;
644 wxImageHandler
* _arg0
;
646 PyObject
* _argo0
= 0;
647 PyObject
* _obj1
= 0;
648 char *_kwnames
[] = { "self","name", NULL
};
651 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_CanRead",_kwnames
,&_argo0
,&_obj1
))
654 if (_argo0
== Py_None
) { _arg0
= NULL
; }
655 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
656 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_CanRead. Expected _wxImageHandler_p.");
661 #if PYTHON_API_VERSION >= 1009
662 char* tmpPtr
; int tmpSize
;
663 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
664 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
667 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
669 _arg1
= new wxString(tmpPtr
, tmpSize
);
671 if (!PyString_Check(_obj1
)) {
672 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
675 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
679 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
680 _result
= (bool )wxImageHandler_CanRead(_arg0
,*_arg1
);
682 wxPyEndAllowThreads(__tstate
);
683 if (PyErr_Occurred()) return NULL
;
684 } _resultobj
= Py_BuildValue("i",_result
);
692 #define wxImageHandler_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
693 static PyObject
*_wrap_wxImageHandler_SetName(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
694 PyObject
* _resultobj
;
695 wxImageHandler
* _arg0
;
697 PyObject
* _argo0
= 0;
698 PyObject
* _obj1
= 0;
699 char *_kwnames
[] = { "self","name", NULL
};
702 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetName",_kwnames
,&_argo0
,&_obj1
))
705 if (_argo0
== Py_None
) { _arg0
= NULL
; }
706 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
707 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetName. Expected _wxImageHandler_p.");
712 #if PYTHON_API_VERSION >= 1009
713 char* tmpPtr
; int tmpSize
;
714 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
715 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
718 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
720 _arg1
= new wxString(tmpPtr
, tmpSize
);
722 if (!PyString_Check(_obj1
)) {
723 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
726 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
730 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
731 wxImageHandler_SetName(_arg0
,*_arg1
);
733 wxPyEndAllowThreads(__tstate
);
734 if (PyErr_Occurred()) return NULL
;
735 } Py_INCREF(Py_None
);
736 _resultobj
= Py_None
;
744 #define wxImageHandler_SetExtension(_swigobj,_swigarg0) (_swigobj->SetExtension(_swigarg0))
745 static PyObject
*_wrap_wxImageHandler_SetExtension(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
746 PyObject
* _resultobj
;
747 wxImageHandler
* _arg0
;
749 PyObject
* _argo0
= 0;
750 PyObject
* _obj1
= 0;
751 char *_kwnames
[] = { "self","extension", NULL
};
754 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetExtension",_kwnames
,&_argo0
,&_obj1
))
757 if (_argo0
== Py_None
) { _arg0
= NULL
; }
758 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
759 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetExtension. Expected _wxImageHandler_p.");
764 #if PYTHON_API_VERSION >= 1009
765 char* tmpPtr
; int tmpSize
;
766 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
767 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
770 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
772 _arg1
= new wxString(tmpPtr
, tmpSize
);
774 if (!PyString_Check(_obj1
)) {
775 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
778 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
782 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
783 wxImageHandler_SetExtension(_arg0
,*_arg1
);
785 wxPyEndAllowThreads(__tstate
);
786 if (PyErr_Occurred()) return NULL
;
787 } Py_INCREF(Py_None
);
788 _resultobj
= Py_None
;
796 #define wxImageHandler_SetType(_swigobj,_swigarg0) (_swigobj->SetType(_swigarg0))
797 static PyObject
*_wrap_wxImageHandler_SetType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
798 PyObject
* _resultobj
;
799 wxImageHandler
* _arg0
;
801 PyObject
* _argo0
= 0;
802 char *_kwnames
[] = { "self","type", NULL
};
805 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Ol:wxImageHandler_SetType",_kwnames
,&_argo0
,&_arg1
))
808 if (_argo0
== Py_None
) { _arg0
= NULL
; }
809 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
810 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetType. Expected _wxImageHandler_p.");
815 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
816 wxImageHandler_SetType(_arg0
,_arg1
);
818 wxPyEndAllowThreads(__tstate
);
819 if (PyErr_Occurred()) return NULL
;
820 } Py_INCREF(Py_None
);
821 _resultobj
= Py_None
;
825 #define wxImageHandler_SetMimeType(_swigobj,_swigarg0) (_swigobj->SetMimeType(_swigarg0))
826 static PyObject
*_wrap_wxImageHandler_SetMimeType(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
827 PyObject
* _resultobj
;
828 wxImageHandler
* _arg0
;
830 PyObject
* _argo0
= 0;
831 PyObject
* _obj1
= 0;
832 char *_kwnames
[] = { "self","mimetype", NULL
};
835 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImageHandler_SetMimeType",_kwnames
,&_argo0
,&_obj1
))
838 if (_argo0
== Py_None
) { _arg0
= NULL
; }
839 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
840 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImageHandler_SetMimeType. Expected _wxImageHandler_p.");
845 #if PYTHON_API_VERSION >= 1009
846 char* tmpPtr
; int tmpSize
;
847 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
848 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
851 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
853 _arg1
= new wxString(tmpPtr
, tmpSize
);
855 if (!PyString_Check(_obj1
)) {
856 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
859 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
863 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
864 wxImageHandler_SetMimeType(_arg0
,*_arg1
);
866 wxPyEndAllowThreads(__tstate
);
867 if (PyErr_Occurred()) return NULL
;
868 } Py_INCREF(Py_None
);
869 _resultobj
= Py_None
;
877 static void *SwigwxPNGHandlerTowxImageHandler(void *ptr
) {
879 wxImageHandler
*dest
;
880 src
= (wxPNGHandler
*) ptr
;
881 dest
= (wxImageHandler
*) src
;
882 return (void *) dest
;
885 static void *SwigwxPNGHandlerTowxObject(void *ptr
) {
888 src
= (wxPNGHandler
*) ptr
;
889 dest
= (wxObject
*) src
;
890 return (void *) dest
;
893 #define new_wxPNGHandler() (new wxPNGHandler())
894 static PyObject
*_wrap_new_wxPNGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
895 PyObject
* _resultobj
;
896 wxPNGHandler
* _result
;
897 char *_kwnames
[] = { NULL
};
901 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNGHandler",_kwnames
))
904 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
905 _result
= (wxPNGHandler
*)new_wxPNGHandler();
907 wxPyEndAllowThreads(__tstate
);
908 if (PyErr_Occurred()) return NULL
;
910 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNGHandler_p");
911 _resultobj
= Py_BuildValue("s",_ptemp
);
914 _resultobj
= Py_None
;
919 static void *SwigwxJPEGHandlerTowxImageHandler(void *ptr
) {
921 wxImageHandler
*dest
;
922 src
= (wxJPEGHandler
*) ptr
;
923 dest
= (wxImageHandler
*) src
;
924 return (void *) dest
;
927 static void *SwigwxJPEGHandlerTowxObject(void *ptr
) {
930 src
= (wxJPEGHandler
*) ptr
;
931 dest
= (wxObject
*) src
;
932 return (void *) dest
;
935 #define new_wxJPEGHandler() (new wxJPEGHandler())
936 static PyObject
*_wrap_new_wxJPEGHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
937 PyObject
* _resultobj
;
938 wxJPEGHandler
* _result
;
939 char *_kwnames
[] = { NULL
};
943 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxJPEGHandler",_kwnames
))
946 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
947 _result
= (wxJPEGHandler
*)new_wxJPEGHandler();
949 wxPyEndAllowThreads(__tstate
);
950 if (PyErr_Occurred()) return NULL
;
952 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxJPEGHandler_p");
953 _resultobj
= Py_BuildValue("s",_ptemp
);
956 _resultobj
= Py_None
;
961 static void *SwigwxBMPHandlerTowxImageHandler(void *ptr
) {
963 wxImageHandler
*dest
;
964 src
= (wxBMPHandler
*) ptr
;
965 dest
= (wxImageHandler
*) src
;
966 return (void *) dest
;
969 static void *SwigwxBMPHandlerTowxObject(void *ptr
) {
972 src
= (wxBMPHandler
*) ptr
;
973 dest
= (wxObject
*) src
;
974 return (void *) dest
;
977 #define new_wxBMPHandler() (new wxBMPHandler())
978 static PyObject
*_wrap_new_wxBMPHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
979 PyObject
* _resultobj
;
980 wxBMPHandler
* _result
;
981 char *_kwnames
[] = { NULL
};
985 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxBMPHandler",_kwnames
))
988 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
989 _result
= (wxBMPHandler
*)new_wxBMPHandler();
991 wxPyEndAllowThreads(__tstate
);
992 if (PyErr_Occurred()) return NULL
;
994 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxBMPHandler_p");
995 _resultobj
= Py_BuildValue("s",_ptemp
);
998 _resultobj
= Py_None
;
1003 static void *SwigwxICOHandlerTowxBMPHandler(void *ptr
) {
1006 src
= (wxICOHandler
*) ptr
;
1007 dest
= (wxBMPHandler
*) src
;
1008 return (void *) dest
;
1011 static void *SwigwxICOHandlerTowxImageHandler(void *ptr
) {
1013 wxImageHandler
*dest
;
1014 src
= (wxICOHandler
*) ptr
;
1015 dest
= (wxImageHandler
*) src
;
1016 return (void *) dest
;
1019 static void *SwigwxICOHandlerTowxObject(void *ptr
) {
1022 src
= (wxICOHandler
*) ptr
;
1023 dest
= (wxObject
*) src
;
1024 return (void *) dest
;
1027 #define new_wxICOHandler() (new wxICOHandler())
1028 static PyObject
*_wrap_new_wxICOHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1029 PyObject
* _resultobj
;
1030 wxICOHandler
* _result
;
1031 char *_kwnames
[] = { NULL
};
1035 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxICOHandler",_kwnames
))
1038 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1039 _result
= (wxICOHandler
*)new_wxICOHandler();
1041 wxPyEndAllowThreads(__tstate
);
1042 if (PyErr_Occurred()) return NULL
;
1044 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxICOHandler_p");
1045 _resultobj
= Py_BuildValue("s",_ptemp
);
1048 _resultobj
= Py_None
;
1053 static void *SwigwxCURHandlerTowxICOHandler(void *ptr
) {
1056 src
= (wxCURHandler
*) ptr
;
1057 dest
= (wxICOHandler
*) src
;
1058 return (void *) dest
;
1061 static void *SwigwxCURHandlerTowxBMPHandler(void *ptr
) {
1064 src
= (wxCURHandler
*) ptr
;
1065 dest
= (wxBMPHandler
*) src
;
1066 return (void *) dest
;
1069 static void *SwigwxCURHandlerTowxImageHandler(void *ptr
) {
1071 wxImageHandler
*dest
;
1072 src
= (wxCURHandler
*) ptr
;
1073 dest
= (wxImageHandler
*) src
;
1074 return (void *) dest
;
1077 static void *SwigwxCURHandlerTowxObject(void *ptr
) {
1080 src
= (wxCURHandler
*) ptr
;
1081 dest
= (wxObject
*) src
;
1082 return (void *) dest
;
1085 #define new_wxCURHandler() (new wxCURHandler())
1086 static PyObject
*_wrap_new_wxCURHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1087 PyObject
* _resultobj
;
1088 wxCURHandler
* _result
;
1089 char *_kwnames
[] = { NULL
};
1093 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxCURHandler",_kwnames
))
1096 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1097 _result
= (wxCURHandler
*)new_wxCURHandler();
1099 wxPyEndAllowThreads(__tstate
);
1100 if (PyErr_Occurred()) return NULL
;
1102 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxCURHandler_p");
1103 _resultobj
= Py_BuildValue("s",_ptemp
);
1106 _resultobj
= Py_None
;
1111 static void *SwigwxANIHandlerTowxCURHandler(void *ptr
) {
1114 src
= (wxANIHandler
*) ptr
;
1115 dest
= (wxCURHandler
*) src
;
1116 return (void *) dest
;
1119 static void *SwigwxANIHandlerTowxICOHandler(void *ptr
) {
1122 src
= (wxANIHandler
*) ptr
;
1123 dest
= (wxICOHandler
*) src
;
1124 return (void *) dest
;
1127 static void *SwigwxANIHandlerTowxBMPHandler(void *ptr
) {
1130 src
= (wxANIHandler
*) ptr
;
1131 dest
= (wxBMPHandler
*) src
;
1132 return (void *) dest
;
1135 static void *SwigwxANIHandlerTowxImageHandler(void *ptr
) {
1137 wxImageHandler
*dest
;
1138 src
= (wxANIHandler
*) ptr
;
1139 dest
= (wxImageHandler
*) src
;
1140 return (void *) dest
;
1143 static void *SwigwxANIHandlerTowxObject(void *ptr
) {
1146 src
= (wxANIHandler
*) ptr
;
1147 dest
= (wxObject
*) src
;
1148 return (void *) dest
;
1151 #define new_wxANIHandler() (new wxANIHandler())
1152 static PyObject
*_wrap_new_wxANIHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1153 PyObject
* _resultobj
;
1154 wxANIHandler
* _result
;
1155 char *_kwnames
[] = { NULL
};
1159 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxANIHandler",_kwnames
))
1162 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1163 _result
= (wxANIHandler
*)new_wxANIHandler();
1165 wxPyEndAllowThreads(__tstate
);
1166 if (PyErr_Occurred()) return NULL
;
1168 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxANIHandler_p");
1169 _resultobj
= Py_BuildValue("s",_ptemp
);
1172 _resultobj
= Py_None
;
1177 static void *SwigwxGIFHandlerTowxImageHandler(void *ptr
) {
1179 wxImageHandler
*dest
;
1180 src
= (wxGIFHandler
*) ptr
;
1181 dest
= (wxImageHandler
*) src
;
1182 return (void *) dest
;
1185 static void *SwigwxGIFHandlerTowxObject(void *ptr
) {
1188 src
= (wxGIFHandler
*) ptr
;
1189 dest
= (wxObject
*) src
;
1190 return (void *) dest
;
1193 #define new_wxGIFHandler() (new wxGIFHandler())
1194 static PyObject
*_wrap_new_wxGIFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1195 PyObject
* _resultobj
;
1196 wxGIFHandler
* _result
;
1197 char *_kwnames
[] = { NULL
};
1201 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxGIFHandler",_kwnames
))
1204 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1205 _result
= (wxGIFHandler
*)new_wxGIFHandler();
1207 wxPyEndAllowThreads(__tstate
);
1208 if (PyErr_Occurred()) return NULL
;
1210 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGIFHandler_p");
1211 _resultobj
= Py_BuildValue("s",_ptemp
);
1214 _resultobj
= Py_None
;
1219 static void *SwigwxPNMHandlerTowxImageHandler(void *ptr
) {
1221 wxImageHandler
*dest
;
1222 src
= (wxPNMHandler
*) ptr
;
1223 dest
= (wxImageHandler
*) src
;
1224 return (void *) dest
;
1227 static void *SwigwxPNMHandlerTowxObject(void *ptr
) {
1230 src
= (wxPNMHandler
*) ptr
;
1231 dest
= (wxObject
*) src
;
1232 return (void *) dest
;
1235 #define new_wxPNMHandler() (new wxPNMHandler())
1236 static PyObject
*_wrap_new_wxPNMHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1237 PyObject
* _resultobj
;
1238 wxPNMHandler
* _result
;
1239 char *_kwnames
[] = { NULL
};
1243 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPNMHandler",_kwnames
))
1246 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1247 _result
= (wxPNMHandler
*)new_wxPNMHandler();
1249 wxPyEndAllowThreads(__tstate
);
1250 if (PyErr_Occurred()) return NULL
;
1252 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPNMHandler_p");
1253 _resultobj
= Py_BuildValue("s",_ptemp
);
1256 _resultobj
= Py_None
;
1261 static void *SwigwxPCXHandlerTowxImageHandler(void *ptr
) {
1263 wxImageHandler
*dest
;
1264 src
= (wxPCXHandler
*) ptr
;
1265 dest
= (wxImageHandler
*) src
;
1266 return (void *) dest
;
1269 static void *SwigwxPCXHandlerTowxObject(void *ptr
) {
1272 src
= (wxPCXHandler
*) ptr
;
1273 dest
= (wxObject
*) src
;
1274 return (void *) dest
;
1277 #define new_wxPCXHandler() (new wxPCXHandler())
1278 static PyObject
*_wrap_new_wxPCXHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1279 PyObject
* _resultobj
;
1280 wxPCXHandler
* _result
;
1281 char *_kwnames
[] = { NULL
};
1285 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxPCXHandler",_kwnames
))
1288 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1289 _result
= (wxPCXHandler
*)new_wxPCXHandler();
1291 wxPyEndAllowThreads(__tstate
);
1292 if (PyErr_Occurred()) return NULL
;
1294 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPCXHandler_p");
1295 _resultobj
= Py_BuildValue("s",_ptemp
);
1298 _resultobj
= Py_None
;
1303 static void *SwigwxTIFFHandlerTowxImageHandler(void *ptr
) {
1305 wxImageHandler
*dest
;
1306 src
= (wxTIFFHandler
*) ptr
;
1307 dest
= (wxImageHandler
*) src
;
1308 return (void *) dest
;
1311 static void *SwigwxTIFFHandlerTowxObject(void *ptr
) {
1314 src
= (wxTIFFHandler
*) ptr
;
1315 dest
= (wxObject
*) src
;
1316 return (void *) dest
;
1319 #define new_wxTIFFHandler() (new wxTIFFHandler())
1320 static PyObject
*_wrap_new_wxTIFFHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1321 PyObject
* _resultobj
;
1322 wxTIFFHandler
* _result
;
1323 char *_kwnames
[] = { NULL
};
1327 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,":new_wxTIFFHandler",_kwnames
))
1330 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1331 _result
= (wxTIFFHandler
*)new_wxTIFFHandler();
1333 wxPyEndAllowThreads(__tstate
);
1334 if (PyErr_Occurred()) return NULL
;
1336 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxTIFFHandler_p");
1337 _resultobj
= Py_BuildValue("s",_ptemp
);
1340 _resultobj
= Py_None
;
1345 static void *SwigwxImageTowxObject(void *ptr
) {
1348 src
= (wxImage
*) ptr
;
1349 dest
= (wxObject
*) src
;
1350 return (void *) dest
;
1353 #define new_wxImage(_swigarg0,_swigarg1,_swigarg2) (new wxImage(_swigarg0,_swigarg1,_swigarg2))
1354 static PyObject
*_wrap_new_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1355 PyObject
* _resultobj
;
1358 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1359 int _arg2
= (int ) -1;
1360 PyObject
* _obj0
= 0;
1361 char *_kwnames
[] = { "name","type","index", NULL
};
1365 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|li:new_wxImage",_kwnames
,&_obj0
,&_arg1
,&_arg2
))
1368 #if PYTHON_API_VERSION >= 1009
1369 char* tmpPtr
; int tmpSize
;
1370 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1371 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1374 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1376 _arg0
= new wxString(tmpPtr
, tmpSize
);
1378 if (!PyString_Check(_obj0
)) {
1379 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1382 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1386 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1387 _result
= (wxImage
*)new_wxImage(*_arg0
,_arg1
,_arg2
);
1389 wxPyEndAllowThreads(__tstate
);
1390 if (PyErr_Occurred()) return NULL
;
1392 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1393 _resultobj
= Py_BuildValue("s",_ptemp
);
1396 _resultobj
= Py_None
;
1405 #define delete_wxImage(_swigobj) (delete _swigobj)
1406 static PyObject
*_wrap_delete_wxImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1407 PyObject
* _resultobj
;
1409 PyObject
* _argo0
= 0;
1410 char *_kwnames
[] = { "self", NULL
};
1413 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxImage",_kwnames
,&_argo0
))
1416 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1417 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1418 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxImage. Expected _wxImage_p.");
1423 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1424 delete_wxImage(_arg0
);
1426 wxPyEndAllowThreads(__tstate
);
1427 if (PyErr_Occurred()) return NULL
;
1428 } Py_INCREF(Py_None
);
1429 _resultobj
= Py_None
;
1433 #define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
1434 static PyObject
*_wrap_wxImage_ConvertToBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1435 PyObject
* _resultobj
;
1438 PyObject
* _argo0
= 0;
1439 char *_kwnames
[] = { "self", NULL
};
1443 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_ConvertToBitmap",_kwnames
,&_argo0
))
1446 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1447 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1448 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
1453 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1454 _result
= new wxBitmap (wxImage_ConvertToBitmap(_arg0
));
1456 wxPyEndAllowThreads(__tstate
);
1457 if (PyErr_Occurred()) return NULL
;
1458 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1459 _resultobj
= Py_BuildValue("s",_ptemp
);
1463 #define wxImage_ConvertToMonoBitmap(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMonoBitmap(_swigarg0,_swigarg1,_swigarg2))
1464 static PyObject
*_wrap_wxImage_ConvertToMonoBitmap(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1465 PyObject
* _resultobj
;
1468 unsigned char _arg1
;
1469 unsigned char _arg2
;
1470 unsigned char _arg3
;
1471 PyObject
* _argo0
= 0;
1472 char *_kwnames
[] = { "self","red","green","blue", NULL
};
1476 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMonoBitmap",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
1479 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1480 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1481 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMonoBitmap. Expected _wxImage_p.");
1486 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1487 _result
= new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0
,_arg1
,_arg2
,_arg3
));
1489 wxPyEndAllowThreads(__tstate
);
1490 if (PyErr_Occurred()) return NULL
;
1491 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxBitmap_p");
1492 _resultobj
= Py_BuildValue("s",_ptemp
);
1496 #define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
1497 static PyObject
*_wrap_wxImage_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1498 PyObject
* _resultobj
;
1502 PyObject
* _argo0
= 0;
1503 char *_kwnames
[] = { "self","width","height", NULL
};
1506 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Create",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1509 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1510 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1511 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Create. Expected _wxImage_p.");
1516 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1517 wxImage_Create(_arg0
,_arg1
,_arg2
);
1519 wxPyEndAllowThreads(__tstate
);
1520 if (PyErr_Occurred()) return NULL
;
1521 } Py_INCREF(Py_None
);
1522 _resultobj
= Py_None
;
1526 #define wxImage_Destroy(_swigobj) (_swigobj->Destroy())
1527 static PyObject
*_wrap_wxImage_Destroy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1528 PyObject
* _resultobj
;
1530 PyObject
* _argo0
= 0;
1531 char *_kwnames
[] = { "self", NULL
};
1534 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Destroy",_kwnames
,&_argo0
))
1537 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1538 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1539 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Destroy. Expected _wxImage_p.");
1544 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1545 wxImage_Destroy(_arg0
);
1547 wxPyEndAllowThreads(__tstate
);
1548 if (PyErr_Occurred()) return NULL
;
1549 } Py_INCREF(Py_None
);
1550 _resultobj
= Py_None
;
1554 #define wxImage_Scale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scale(_swigarg0,_swigarg1))
1555 static PyObject
*_wrap_wxImage_Scale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1556 PyObject
* _resultobj
;
1561 PyObject
* _argo0
= 0;
1562 char *_kwnames
[] = { "self","width","height", NULL
};
1566 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Scale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1569 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1570 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1571 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Scale. Expected _wxImage_p.");
1576 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1577 _result
= new wxImage (wxImage_Scale(_arg0
,_arg1
,_arg2
));
1579 wxPyEndAllowThreads(__tstate
);
1580 if (PyErr_Occurred()) return NULL
;
1581 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
1582 _resultobj
= Py_BuildValue("s",_ptemp
);
1586 #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
1587 static PyObject
*_wrap_wxImage_Rescale(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1588 PyObject
* _resultobj
;
1593 PyObject
* _argo0
= 0;
1594 char *_kwnames
[] = { "self","width","height", NULL
};
1598 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_Rescale",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1601 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1602 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1603 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
1608 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1609 wxImage
& _result_ref
= wxImage_Rescale(_arg0
,_arg1
,_arg2
);
1610 _result
= (wxImage
*) &_result_ref
;
1612 wxPyEndAllowThreads(__tstate
);
1613 if (PyErr_Occurred()) return NULL
;
1615 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxImage_p");
1616 _resultobj
= Py_BuildValue("s",_ptemp
);
1619 _resultobj
= Py_None
;
1624 #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
1625 static PyObject
*_wrap_wxImage_SetRGB(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1626 PyObject
* _resultobj
;
1630 unsigned char _arg3
;
1631 unsigned char _arg4
;
1632 unsigned char _arg5
;
1633 PyObject
* _argo0
= 0;
1634 char *_kwnames
[] = { "self","x","y","r","g","b", NULL
};
1637 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oiibbb:wxImage_SetRGB",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
))
1640 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1641 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1642 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetRGB. Expected _wxImage_p.");
1647 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1648 wxImage_SetRGB(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
);
1650 wxPyEndAllowThreads(__tstate
);
1651 if (PyErr_Occurred()) return NULL
;
1652 } Py_INCREF(Py_None
);
1653 _resultobj
= Py_None
;
1657 #define wxImage_GetRed(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRed(_swigarg0,_swigarg1))
1658 static PyObject
*_wrap_wxImage_GetRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1659 PyObject
* _resultobj
;
1660 unsigned char _result
;
1664 PyObject
* _argo0
= 0;
1665 char *_kwnames
[] = { "self","x","y", NULL
};
1668 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetRed",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1671 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1672 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1673 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetRed. Expected _wxImage_p.");
1678 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1679 _result
= (unsigned char )wxImage_GetRed(_arg0
,_arg1
,_arg2
);
1681 wxPyEndAllowThreads(__tstate
);
1682 if (PyErr_Occurred()) return NULL
;
1683 } _resultobj
= Py_BuildValue("b",_result
);
1687 #define wxImage_GetGreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetGreen(_swigarg0,_swigarg1))
1688 static PyObject
*_wrap_wxImage_GetGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1689 PyObject
* _resultobj
;
1690 unsigned char _result
;
1694 PyObject
* _argo0
= 0;
1695 char *_kwnames
[] = { "self","x","y", NULL
};
1698 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetGreen",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1701 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1702 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1703 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetGreen. Expected _wxImage_p.");
1708 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1709 _result
= (unsigned char )wxImage_GetGreen(_arg0
,_arg1
,_arg2
);
1711 wxPyEndAllowThreads(__tstate
);
1712 if (PyErr_Occurred()) return NULL
;
1713 } _resultobj
= Py_BuildValue("b",_result
);
1717 #define wxImage_GetBlue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBlue(_swigarg0,_swigarg1))
1718 static PyObject
*_wrap_wxImage_GetBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1719 PyObject
* _resultobj
;
1720 unsigned char _result
;
1724 PyObject
* _argo0
= 0;
1725 char *_kwnames
[] = { "self","x","y", NULL
};
1728 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Oii:wxImage_GetBlue",_kwnames
,&_argo0
,&_arg1
,&_arg2
))
1731 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1732 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1733 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetBlue. Expected _wxImage_p.");
1738 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1739 _result
= (unsigned char )wxImage_GetBlue(_arg0
,_arg1
,_arg2
);
1741 wxPyEndAllowThreads(__tstate
);
1742 if (PyErr_Occurred()) return NULL
;
1743 } _resultobj
= Py_BuildValue("b",_result
);
1747 static PyObject
*_wrap_wxImage_CanRead(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1748 PyObject
* _resultobj
;
1751 PyObject
* _obj0
= 0;
1752 char *_kwnames
[] = { "name", NULL
};
1755 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanRead",_kwnames
,&_obj0
))
1758 #if PYTHON_API_VERSION >= 1009
1759 char* tmpPtr
; int tmpSize
;
1760 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1761 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1764 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1766 _arg0
= new wxString(tmpPtr
, tmpSize
);
1768 if (!PyString_Check(_obj0
)) {
1769 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1772 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1776 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1777 _result
= (bool )wxImage::CanRead(*_arg0
);
1779 wxPyEndAllowThreads(__tstate
);
1780 if (PyErr_Occurred()) return NULL
;
1781 } _resultobj
= Py_BuildValue("i",_result
);
1789 static PyObject
*_wrap_wxImage_GetImageCount(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1790 PyObject
* _resultobj
;
1793 long _arg1
= (long ) wxBITMAP_TYPE_ANY
;
1794 PyObject
* _obj0
= 0;
1795 char *_kwnames
[] = { "name","type", NULL
};
1798 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_GetImageCount",_kwnames
,&_obj0
,&_arg1
))
1801 #if PYTHON_API_VERSION >= 1009
1802 char* tmpPtr
; int tmpSize
;
1803 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
1804 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1807 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
1809 _arg0
= new wxString(tmpPtr
, tmpSize
);
1811 if (!PyString_Check(_obj0
)) {
1812 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1815 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
1819 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1820 _result
= (int )wxImage::GetImageCount(*_arg0
,_arg1
);
1822 wxPyEndAllowThreads(__tstate
);
1823 if (PyErr_Occurred()) return NULL
;
1824 } _resultobj
= Py_BuildValue("i",_result
);
1832 #define wxImage_LoadFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1833 static PyObject
*_wrap_wxImage_LoadFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1834 PyObject
* _resultobj
;
1838 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
1839 int _arg3
= (int ) -1;
1840 PyObject
* _argo0
= 0;
1841 PyObject
* _obj1
= 0;
1842 char *_kwnames
[] = { "self","name","type","index", NULL
};
1845 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
1848 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1849 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1850 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadFile. Expected _wxImage_p.");
1855 #if PYTHON_API_VERSION >= 1009
1856 char* tmpPtr
; int tmpSize
;
1857 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1858 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1861 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1863 _arg1
= new wxString(tmpPtr
, tmpSize
);
1865 if (!PyString_Check(_obj1
)) {
1866 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1869 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1873 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1874 _result
= (bool )wxImage_LoadFile(_arg0
,*_arg1
,_arg2
,_arg3
);
1876 wxPyEndAllowThreads(__tstate
);
1877 if (PyErr_Occurred()) return NULL
;
1878 } _resultobj
= Py_BuildValue("i",_result
);
1886 #define wxImage_LoadMimeFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
1887 static PyObject
*_wrap_wxImage_LoadMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1888 PyObject
* _resultobj
;
1893 int _arg3
= (int ) -1;
1894 PyObject
* _argo0
= 0;
1895 PyObject
* _obj1
= 0;
1896 PyObject
* _obj2
= 0;
1897 char *_kwnames
[] = { "self","name","mimetype","index", NULL
};
1900 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
1903 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1904 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1905 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeFile. Expected _wxImage_p.");
1910 #if PYTHON_API_VERSION >= 1009
1911 char* tmpPtr
; int tmpSize
;
1912 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1913 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1916 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1918 _arg1
= new wxString(tmpPtr
, tmpSize
);
1920 if (!PyString_Check(_obj1
)) {
1921 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1924 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
1928 #if PYTHON_API_VERSION >= 1009
1929 char* tmpPtr
; int tmpSize
;
1930 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
1931 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1934 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
1936 _arg2
= new wxString(tmpPtr
, tmpSize
);
1938 if (!PyString_Check(_obj2
)) {
1939 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1942 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
1946 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
1947 _result
= (bool )wxImage_LoadMimeFile(_arg0
,*_arg1
,*_arg2
,_arg3
);
1949 wxPyEndAllowThreads(__tstate
);
1950 if (PyErr_Occurred()) return NULL
;
1951 } _resultobj
= Py_BuildValue("i",_result
);
1963 #define wxImage_SaveFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
1964 static PyObject
*_wrap_wxImage_SaveFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
1965 PyObject
* _resultobj
;
1970 PyObject
* _argo0
= 0;
1971 PyObject
* _obj1
= 0;
1972 char *_kwnames
[] = { "self","name","type", NULL
};
1975 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SaveFile",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
1978 if (_argo0
== Py_None
) { _arg0
= NULL
; }
1979 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
1980 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveFile. Expected _wxImage_p.");
1985 #if PYTHON_API_VERSION >= 1009
1986 char* tmpPtr
; int tmpSize
;
1987 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
1988 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1991 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
1993 _arg1
= new wxString(tmpPtr
, tmpSize
);
1995 if (!PyString_Check(_obj1
)) {
1996 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
1999 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2003 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2004 _result
= (bool )wxImage_SaveFile(_arg0
,*_arg1
,_arg2
);
2006 wxPyEndAllowThreads(__tstate
);
2007 if (PyErr_Occurred()) return NULL
;
2008 } _resultobj
= Py_BuildValue("i",_result
);
2016 #define wxImage_SaveMimeFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->SaveFile(_swigarg0,_swigarg1))
2017 static PyObject
*_wrap_wxImage_SaveMimeFile(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2018 PyObject
* _resultobj
;
2023 PyObject
* _argo0
= 0;
2024 PyObject
* _obj1
= 0;
2025 PyObject
* _obj2
= 0;
2026 char *_kwnames
[] = { "self","name","mimetype", NULL
};
2029 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SaveMimeFile",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2032 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2033 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2034 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SaveMimeFile. Expected _wxImage_p.");
2039 #if PYTHON_API_VERSION >= 1009
2040 char* tmpPtr
; int tmpSize
;
2041 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2042 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2045 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2047 _arg1
= new wxString(tmpPtr
, tmpSize
);
2049 if (!PyString_Check(_obj1
)) {
2050 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2053 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2057 #if PYTHON_API_VERSION >= 1009
2058 char* tmpPtr
; int tmpSize
;
2059 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2060 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2063 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2065 _arg2
= new wxString(tmpPtr
, tmpSize
);
2067 if (!PyString_Check(_obj2
)) {
2068 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2071 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2075 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2076 _result
= (bool )wxImage_SaveMimeFile(_arg0
,*_arg1
,*_arg2
);
2078 wxPyEndAllowThreads(__tstate
);
2079 if (PyErr_Occurred()) return NULL
;
2080 } _resultobj
= Py_BuildValue("i",_result
);
2092 static PyObject
*_wrap_wxImage_CanReadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2093 PyObject
* _resultobj
;
2095 wxInputStream
* _arg0
;
2096 wxPyInputStream
* temp
;
2098 PyObject
* _obj0
= 0;
2099 char *_kwnames
[] = { "stream", NULL
};
2102 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_CanReadStream",_kwnames
,&_obj0
))
2105 if (SWIG_GetPtrObj(_obj0
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2106 _arg0
= temp
->m_wxis
;
2109 _arg0
= wxPyCBInputStream::create(_obj0
, FALSE
);
2110 if (_arg0
== NULL
) {
2111 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2118 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2119 _result
= (bool )wxImage::CanRead(*_arg0
);
2121 wxPyEndAllowThreads(__tstate
);
2122 if (PyErr_Occurred()) return NULL
;
2123 } _resultobj
= Py_BuildValue("i",_result
);
2131 #define wxImage_LoadStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2132 static PyObject
*_wrap_wxImage_LoadStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2133 PyObject
* _resultobj
;
2136 wxInputStream
* _arg1
;
2137 long _arg2
= (long ) wxBITMAP_TYPE_ANY
;
2138 int _arg3
= (int ) -1;
2139 PyObject
* _argo0
= 0;
2140 wxPyInputStream
* temp
;
2142 PyObject
* _obj1
= 0;
2143 char *_kwnames
[] = { "self","stream","type","index", NULL
};
2146 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO|li:wxImage_LoadStream",_kwnames
,&_argo0
,&_obj1
,&_arg2
,&_arg3
))
2149 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2150 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2151 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadStream. Expected _wxImage_p.");
2156 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2157 _arg1
= temp
->m_wxis
;
2160 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2161 if (_arg1
== NULL
) {
2162 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2169 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2170 _result
= (bool )wxImage_LoadStream(_arg0
,*_arg1
,_arg2
,_arg3
);
2172 wxPyEndAllowThreads(__tstate
);
2173 if (PyErr_Occurred()) return NULL
;
2174 } _resultobj
= Py_BuildValue("i",_result
);
2182 #define wxImage_LoadMimeStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
2183 static PyObject
*_wrap_wxImage_LoadMimeStream(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2184 PyObject
* _resultobj
;
2187 wxInputStream
* _arg1
;
2189 int _arg3
= (int ) -1;
2190 PyObject
* _argo0
= 0;
2191 wxPyInputStream
* temp
;
2193 PyObject
* _obj1
= 0;
2194 PyObject
* _obj2
= 0;
2195 char *_kwnames
[] = { "self","stream","mimetype","index", NULL
};
2198 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO|i:wxImage_LoadMimeStream",_kwnames
,&_argo0
,&_obj1
,&_obj2
,&_arg3
))
2201 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2202 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2203 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_LoadMimeStream. Expected _wxImage_p.");
2208 if (SWIG_GetPtrObj(_obj1
, (void **) &temp
, "_wxPyInputStream_p") == 0) {
2209 _arg1
= temp
->m_wxis
;
2212 _arg1
= wxPyCBInputStream::create(_obj1
, FALSE
);
2213 if (_arg1
== NULL
) {
2214 PyErr_SetString(PyExc_TypeError
,"Expected _wxInputStream_p or Python file-like object.");
2221 #if PYTHON_API_VERSION >= 1009
2222 char* tmpPtr
; int tmpSize
;
2223 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2224 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2227 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2229 _arg2
= new wxString(tmpPtr
, tmpSize
);
2231 if (!PyString_Check(_obj2
)) {
2232 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2235 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2239 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2240 _result
= (bool )wxImage_LoadMimeStream(_arg0
,*_arg1
,*_arg2
,_arg3
);
2242 wxPyEndAllowThreads(__tstate
);
2243 if (PyErr_Occurred()) return NULL
;
2244 } _resultobj
= Py_BuildValue("i",_result
);
2256 #define wxImage_Ok(_swigobj) (_swigobj->Ok())
2257 static PyObject
*_wrap_wxImage_Ok(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2258 PyObject
* _resultobj
;
2261 PyObject
* _argo0
= 0;
2262 char *_kwnames
[] = { "self", NULL
};
2265 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Ok",_kwnames
,&_argo0
))
2268 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2269 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2270 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Ok. Expected _wxImage_p.");
2275 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2276 _result
= (bool )wxImage_Ok(_arg0
);
2278 wxPyEndAllowThreads(__tstate
);
2279 if (PyErr_Occurred()) return NULL
;
2280 } _resultobj
= Py_BuildValue("i",_result
);
2284 #define wxImage_GetWidth(_swigobj) (_swigobj->GetWidth())
2285 static PyObject
*_wrap_wxImage_GetWidth(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2286 PyObject
* _resultobj
;
2289 PyObject
* _argo0
= 0;
2290 char *_kwnames
[] = { "self", NULL
};
2293 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetWidth",_kwnames
,&_argo0
))
2296 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2297 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2298 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetWidth. Expected _wxImage_p.");
2303 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2304 _result
= (int )wxImage_GetWidth(_arg0
);
2306 wxPyEndAllowThreads(__tstate
);
2307 if (PyErr_Occurred()) return NULL
;
2308 } _resultobj
= Py_BuildValue("i",_result
);
2312 #define wxImage_GetHeight(_swigobj) (_swigobj->GetHeight())
2313 static PyObject
*_wrap_wxImage_GetHeight(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2314 PyObject
* _resultobj
;
2317 PyObject
* _argo0
= 0;
2318 char *_kwnames
[] = { "self", NULL
};
2321 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetHeight",_kwnames
,&_argo0
))
2324 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2325 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2326 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetHeight. Expected _wxImage_p.");
2331 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2332 _result
= (int )wxImage_GetHeight(_arg0
);
2334 wxPyEndAllowThreads(__tstate
);
2335 if (PyErr_Occurred()) return NULL
;
2336 } _resultobj
= Py_BuildValue("i",_result
);
2340 #define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
2341 static PyObject
*_wrap_wxImage_GetSubImage(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2342 PyObject
* _resultobj
;
2346 PyObject
* _argo0
= 0;
2348 PyObject
* _obj1
= 0;
2349 char *_kwnames
[] = { "self","rect", NULL
};
2353 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetSubImage",_kwnames
,&_argo0
,&_obj1
))
2356 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2357 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2358 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
2364 if (! wxRect_helper(_obj1
, &_arg1
))
2368 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2369 _result
= new wxImage (wxImage_GetSubImage(_arg0
,*_arg1
));
2371 wxPyEndAllowThreads(__tstate
);
2372 if (PyErr_Occurred()) return NULL
;
2373 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2374 _resultobj
= Py_BuildValue("s",_ptemp
);
2378 #define wxImage_Copy(_swigobj) (_swigobj->Copy())
2379 static PyObject
*_wrap_wxImage_Copy(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2380 PyObject
* _resultobj
;
2383 PyObject
* _argo0
= 0;
2384 char *_kwnames
[] = { "self", NULL
};
2388 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_Copy",_kwnames
,&_argo0
))
2391 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2392 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2393 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p.");
2398 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2399 _result
= new wxImage (wxImage_Copy(_arg0
));
2401 wxPyEndAllowThreads(__tstate
);
2402 if (PyErr_Occurred()) return NULL
;
2403 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2404 _resultobj
= Py_BuildValue("s",_ptemp
);
2408 #define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2))
2409 static PyObject
*_wrap_wxImage_Paste(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2410 PyObject
* _resultobj
;
2415 PyObject
* _argo0
= 0;
2416 PyObject
* _argo1
= 0;
2417 char *_kwnames
[] = { "self","image","x","y", NULL
};
2420 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOii:wxImage_Paste",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_arg3
))
2423 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2424 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2425 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p.");
2430 if (_argo1
== Py_None
) { _arg1
= NULL
; }
2431 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxImage_p")) {
2432 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
2437 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2438 wxImage_Paste(_arg0
,*_arg1
,_arg2
,_arg3
);
2440 wxPyEndAllowThreads(__tstate
);
2441 if (PyErr_Occurred()) return NULL
;
2442 } Py_INCREF(Py_None
);
2443 _resultobj
= Py_None
;
2447 static PyObject
* wxImage_GetData(wxImage
*self
) {
2448 unsigned char* data
= self
->GetData();
2449 int len
= self
->GetWidth() * self
->GetHeight() * 3;
2450 return PyString_FromStringAndSize((char*)data
, len
);
2452 static PyObject
*_wrap_wxImage_GetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2453 PyObject
* _resultobj
;
2456 PyObject
* _argo0
= 0;
2457 char *_kwnames
[] = { "self", NULL
};
2460 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetData",_kwnames
,&_argo0
))
2463 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2464 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2465 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetData. Expected _wxImage_p.");
2470 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2471 _result
= (PyObject
*)wxImage_GetData(_arg0
);
2473 wxPyEndAllowThreads(__tstate
);
2474 if (PyErr_Occurred()) return NULL
;
2476 _resultobj
= _result
;
2481 static void wxImage_SetData(wxImage
*self
,PyObject
* data
) {
2482 unsigned char* dataPtr
;
2484 if (! PyString_Check(data
)) {
2485 PyErr_SetString(PyExc_TypeError
, "Expected string object");
2489 size_t len
= self
->GetWidth() * self
->GetHeight() * 3;
2490 dataPtr
= (unsigned char*) malloc(len
);
2491 memcpy(dataPtr
, PyString_AsString(data
), len
);
2492 self
->SetData(dataPtr
);
2494 static PyObject
*_wrap_wxImage_SetData(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2495 PyObject
* _resultobj
;
2498 PyObject
* _argo0
= 0;
2499 PyObject
* _obj1
= 0;
2500 char *_kwnames
[] = { "self","data", NULL
};
2503 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_SetData",_kwnames
,&_argo0
,&_obj1
))
2506 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2507 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2508 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetData. Expected _wxImage_p.");
2516 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2517 wxImage_SetData(_arg0
,_arg1
);
2519 wxPyEndAllowThreads(__tstate
);
2520 if (PyErr_Occurred()) return NULL
;
2521 } Py_INCREF(Py_None
);
2522 _resultobj
= Py_None
;
2526 #define wxImage_SetMaskColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetMaskColour(_swigarg0,_swigarg1,_swigarg2))
2527 static PyObject
*_wrap_wxImage_SetMaskColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2528 PyObject
* _resultobj
;
2530 unsigned char _arg1
;
2531 unsigned char _arg2
;
2532 unsigned char _arg3
;
2533 PyObject
* _argo0
= 0;
2534 char *_kwnames
[] = { "self","r","g","b", NULL
};
2537 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_SetMaskColour",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2540 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2541 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2542 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMaskColour. Expected _wxImage_p.");
2547 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2548 wxImage_SetMaskColour(_arg0
,_arg1
,_arg2
,_arg3
);
2550 wxPyEndAllowThreads(__tstate
);
2551 if (PyErr_Occurred()) return NULL
;
2552 } Py_INCREF(Py_None
);
2553 _resultobj
= Py_None
;
2557 #define wxImage_GetMaskRed(_swigobj) (_swigobj->GetMaskRed())
2558 static PyObject
*_wrap_wxImage_GetMaskRed(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2559 PyObject
* _resultobj
;
2560 unsigned char _result
;
2562 PyObject
* _argo0
= 0;
2563 char *_kwnames
[] = { "self", NULL
};
2566 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskRed",_kwnames
,&_argo0
))
2569 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2570 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2571 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskRed. Expected _wxImage_p.");
2576 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2577 _result
= (unsigned char )wxImage_GetMaskRed(_arg0
);
2579 wxPyEndAllowThreads(__tstate
);
2580 if (PyErr_Occurred()) return NULL
;
2581 } _resultobj
= Py_BuildValue("b",_result
);
2585 #define wxImage_GetMaskGreen(_swigobj) (_swigobj->GetMaskGreen())
2586 static PyObject
*_wrap_wxImage_GetMaskGreen(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2587 PyObject
* _resultobj
;
2588 unsigned char _result
;
2590 PyObject
* _argo0
= 0;
2591 char *_kwnames
[] = { "self", NULL
};
2594 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskGreen",_kwnames
,&_argo0
))
2597 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2598 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2599 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskGreen. Expected _wxImage_p.");
2604 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2605 _result
= (unsigned char )wxImage_GetMaskGreen(_arg0
);
2607 wxPyEndAllowThreads(__tstate
);
2608 if (PyErr_Occurred()) return NULL
;
2609 } _resultobj
= Py_BuildValue("b",_result
);
2613 #define wxImage_GetMaskBlue(_swigobj) (_swigobj->GetMaskBlue())
2614 static PyObject
*_wrap_wxImage_GetMaskBlue(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2615 PyObject
* _resultobj
;
2616 unsigned char _result
;
2618 PyObject
* _argo0
= 0;
2619 char *_kwnames
[] = { "self", NULL
};
2622 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_GetMaskBlue",_kwnames
,&_argo0
))
2625 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2626 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2627 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetMaskBlue. Expected _wxImage_p.");
2632 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2633 _result
= (unsigned char )wxImage_GetMaskBlue(_arg0
);
2635 wxPyEndAllowThreads(__tstate
);
2636 if (PyErr_Occurred()) return NULL
;
2637 } _resultobj
= Py_BuildValue("b",_result
);
2641 #define wxImage_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0))
2642 static PyObject
*_wrap_wxImage_SetMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2643 PyObject
* _resultobj
;
2645 bool _arg1
= (bool ) TRUE
;
2646 PyObject
* _argo0
= 0;
2647 int tempbool1
= (int) TRUE
;
2648 char *_kwnames
[] = { "self","mask", NULL
};
2651 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_SetMask",_kwnames
,&_argo0
,&tempbool1
))
2654 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2655 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2656 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetMask. Expected _wxImage_p.");
2660 _arg1
= (bool ) tempbool1
;
2662 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2663 wxImage_SetMask(_arg0
,_arg1
);
2665 wxPyEndAllowThreads(__tstate
);
2666 if (PyErr_Occurred()) return NULL
;
2667 } Py_INCREF(Py_None
);
2668 _resultobj
= Py_None
;
2672 #define wxImage_HasMask(_swigobj) (_swigobj->HasMask())
2673 static PyObject
*_wrap_wxImage_HasMask(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2674 PyObject
* _resultobj
;
2677 PyObject
* _argo0
= 0;
2678 char *_kwnames
[] = { "self", NULL
};
2681 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_HasMask",_kwnames
,&_argo0
))
2684 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2685 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2686 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasMask. Expected _wxImage_p.");
2691 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2692 _result
= (bool )wxImage_HasMask(_arg0
);
2694 wxPyEndAllowThreads(__tstate
);
2695 if (PyErr_Occurred()) return NULL
;
2696 } _resultobj
= Py_BuildValue("i",_result
);
2700 #define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
2701 static PyObject
*_wrap_wxImage_Rotate(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2702 PyObject
* _resultobj
;
2707 bool _arg3
= (bool ) TRUE
;
2708 wxPoint
* _arg4
= (wxPoint
*) NULL
;
2709 PyObject
* _argo0
= 0;
2711 PyObject
* _obj2
= 0;
2712 int tempbool3
= (int) TRUE
;
2714 PyObject
* _obj4
= 0;
2715 char *_kwnames
[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL
};
2719 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OdO|iO:wxImage_Rotate",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&tempbool3
,&_obj4
))
2722 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2723 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2724 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p.");
2730 if (! wxPoint_helper(_obj2
, &_arg2
))
2733 _arg3
= (bool ) tempbool3
;
2737 if (! wxPoint_helper(_obj4
, &_arg4
))
2741 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2742 _result
= new wxImage (wxImage_Rotate(_arg0
,_arg1
,*_arg2
,_arg3
,_arg4
));
2744 wxPyEndAllowThreads(__tstate
);
2745 if (PyErr_Occurred()) return NULL
;
2746 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2747 _resultobj
= Py_BuildValue("s",_ptemp
);
2751 #define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0))
2752 static PyObject
*_wrap_wxImage_Rotate90(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2753 PyObject
* _resultobj
;
2756 bool _arg1
= (bool ) TRUE
;
2757 PyObject
* _argo0
= 0;
2758 int tempbool1
= (int) TRUE
;
2759 char *_kwnames
[] = { "self","clockwise", NULL
};
2763 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Rotate90",_kwnames
,&_argo0
,&tempbool1
))
2766 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2767 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2768 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p.");
2772 _arg1
= (bool ) tempbool1
;
2774 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2775 _result
= new wxImage (wxImage_Rotate90(_arg0
,_arg1
));
2777 wxPyEndAllowThreads(__tstate
);
2778 if (PyErr_Occurred()) return NULL
;
2779 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2780 _resultobj
= Py_BuildValue("s",_ptemp
);
2784 #define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0))
2785 static PyObject
*_wrap_wxImage_Mirror(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2786 PyObject
* _resultobj
;
2789 bool _arg1
= (bool ) TRUE
;
2790 PyObject
* _argo0
= 0;
2791 int tempbool1
= (int) TRUE
;
2792 char *_kwnames
[] = { "self","horizontally", NULL
};
2796 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|i:wxImage_Mirror",_kwnames
,&_argo0
,&tempbool1
))
2799 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2800 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2801 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p.");
2805 _arg1
= (bool ) tempbool1
;
2807 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2808 _result
= new wxImage (wxImage_Mirror(_arg0
,_arg1
));
2810 wxPyEndAllowThreads(__tstate
);
2811 if (PyErr_Occurred()) return NULL
;
2812 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2813 _resultobj
= Py_BuildValue("s",_ptemp
);
2817 #define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
2818 static PyObject
*_wrap_wxImage_Replace(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2819 PyObject
* _resultobj
;
2821 unsigned char _arg1
;
2822 unsigned char _arg2
;
2823 unsigned char _arg3
;
2824 unsigned char _arg4
;
2825 unsigned char _arg5
;
2826 unsigned char _arg6
;
2827 PyObject
* _argo0
= 0;
2828 char *_kwnames
[] = { "self","r1","g1","b1","r2","g2","b2", NULL
};
2831 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbbbbb:wxImage_Replace",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
,&_arg4
,&_arg5
,&_arg6
))
2834 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2835 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2836 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p.");
2841 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2842 wxImage_Replace(_arg0
,_arg1
,_arg2
,_arg3
,_arg4
,_arg5
,_arg6
);
2844 wxPyEndAllowThreads(__tstate
);
2845 if (PyErr_Occurred()) return NULL
;
2846 } Py_INCREF(Py_None
);
2847 _resultobj
= Py_None
;
2851 #define wxImage_ConvertToMono(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ConvertToMono(_swigarg0,_swigarg1,_swigarg2))
2852 static PyObject
*_wrap_wxImage_ConvertToMono(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2853 PyObject
* _resultobj
;
2856 unsigned char _arg1
;
2857 unsigned char _arg2
;
2858 unsigned char _arg3
;
2859 PyObject
* _argo0
= 0;
2860 char *_kwnames
[] = { "self","r","g","b", NULL
};
2864 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Obbb:wxImage_ConvertToMono",_kwnames
,&_argo0
,&_arg1
,&_arg2
,&_arg3
))
2867 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2868 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2869 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_ConvertToMono. Expected _wxImage_p.");
2874 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2875 _result
= new wxImage (wxImage_ConvertToMono(_arg0
,_arg1
,_arg2
,_arg3
));
2877 wxPyEndAllowThreads(__tstate
);
2878 if (PyErr_Occurred()) return NULL
;
2879 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxImage_p");
2880 _resultobj
= Py_BuildValue("s",_ptemp
);
2884 #define wxImage_SetOption(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2885 static PyObject
*_wrap_wxImage_SetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2886 PyObject
* _resultobj
;
2890 PyObject
* _argo0
= 0;
2891 PyObject
* _obj1
= 0;
2892 PyObject
* _obj2
= 0;
2893 char *_kwnames
[] = { "self","name","value", NULL
};
2896 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOO:wxImage_SetOption",_kwnames
,&_argo0
,&_obj1
,&_obj2
))
2899 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2900 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2901 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOption. Expected _wxImage_p.");
2906 #if PYTHON_API_VERSION >= 1009
2907 char* tmpPtr
; int tmpSize
;
2908 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2909 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2912 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2914 _arg1
= new wxString(tmpPtr
, tmpSize
);
2916 if (!PyString_Check(_obj1
)) {
2917 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2920 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2924 #if PYTHON_API_VERSION >= 1009
2925 char* tmpPtr
; int tmpSize
;
2926 if (!PyString_Check(_obj2
) && !PyUnicode_Check(_obj2
)) {
2927 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2930 if (PyString_AsStringAndSize(_obj2
, &tmpPtr
, &tmpSize
) == -1)
2932 _arg2
= new wxString(tmpPtr
, tmpSize
);
2934 if (!PyString_Check(_obj2
)) {
2935 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2938 _arg2
= new wxString(PyString_AS_STRING(_obj2
), PyString_GET_SIZE(_obj2
));
2942 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
2943 wxImage_SetOption(_arg0
,*_arg1
,*_arg2
);
2945 wxPyEndAllowThreads(__tstate
);
2946 if (PyErr_Occurred()) return NULL
;
2947 } Py_INCREF(Py_None
);
2948 _resultobj
= Py_None
;
2960 #define wxImage_SetOptionInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOption(_swigarg0,_swigarg1))
2961 static PyObject
*_wrap_wxImage_SetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
2962 PyObject
* _resultobj
;
2966 PyObject
* _argo0
= 0;
2967 PyObject
* _obj1
= 0;
2968 char *_kwnames
[] = { "self","name","value", NULL
};
2971 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOi:wxImage_SetOptionInt",_kwnames
,&_argo0
,&_obj1
,&_arg2
))
2974 if (_argo0
== Py_None
) { _arg0
= NULL
; }
2975 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
2976 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_SetOptionInt. Expected _wxImage_p.");
2981 #if PYTHON_API_VERSION >= 1009
2982 char* tmpPtr
; int tmpSize
;
2983 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
2984 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2987 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
2989 _arg1
= new wxString(tmpPtr
, tmpSize
);
2991 if (!PyString_Check(_obj1
)) {
2992 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
2995 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
2999 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3000 wxImage_SetOptionInt(_arg0
,*_arg1
,_arg2
);
3002 wxPyEndAllowThreads(__tstate
);
3003 if (PyErr_Occurred()) return NULL
;
3004 } Py_INCREF(Py_None
);
3005 _resultobj
= Py_None
;
3013 #define wxImage_GetOption(_swigobj,_swigarg0) (_swigobj->GetOption(_swigarg0))
3014 static PyObject
*_wrap_wxImage_GetOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3015 PyObject
* _resultobj
;
3019 PyObject
* _argo0
= 0;
3020 PyObject
* _obj1
= 0;
3021 char *_kwnames
[] = { "self","name", NULL
};
3024 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOption",_kwnames
,&_argo0
,&_obj1
))
3027 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3028 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3029 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOption. Expected _wxImage_p.");
3034 #if PYTHON_API_VERSION >= 1009
3035 char* tmpPtr
; int tmpSize
;
3036 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3037 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3040 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3042 _arg1
= new wxString(tmpPtr
, tmpSize
);
3044 if (!PyString_Check(_obj1
)) {
3045 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3048 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3052 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3053 _result
= new wxString (wxImage_GetOption(_arg0
,*_arg1
));
3055 wxPyEndAllowThreads(__tstate
);
3056 if (PyErr_Occurred()) return NULL
;
3058 _resultobj
= PyString_FromStringAndSize(_result
->c_str(), _result
->Len());
3070 #define wxImage_GetOptionInt(_swigobj,_swigarg0) (_swigobj->GetOptionInt(_swigarg0))
3071 static PyObject
*_wrap_wxImage_GetOptionInt(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3072 PyObject
* _resultobj
;
3076 PyObject
* _argo0
= 0;
3077 PyObject
* _obj1
= 0;
3078 char *_kwnames
[] = { "self","name", NULL
};
3081 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_GetOptionInt",_kwnames
,&_argo0
,&_obj1
))
3084 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3085 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3086 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_GetOptionInt. Expected _wxImage_p.");
3091 #if PYTHON_API_VERSION >= 1009
3092 char* tmpPtr
; int tmpSize
;
3093 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3094 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3097 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3099 _arg1
= new wxString(tmpPtr
, tmpSize
);
3101 if (!PyString_Check(_obj1
)) {
3102 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3105 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3109 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3110 _result
= (int )wxImage_GetOptionInt(_arg0
,*_arg1
);
3112 wxPyEndAllowThreads(__tstate
);
3113 if (PyErr_Occurred()) return NULL
;
3114 } _resultobj
= Py_BuildValue("i",_result
);
3122 #define wxImage_HasOption(_swigobj,_swigarg0) (_swigobj->HasOption(_swigarg0))
3123 static PyObject
*_wrap_wxImage_HasOption(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3124 PyObject
* _resultobj
;
3128 PyObject
* _argo0
= 0;
3129 PyObject
* _obj1
= 0;
3130 char *_kwnames
[] = { "self","name", NULL
};
3133 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxImage_HasOption",_kwnames
,&_argo0
,&_obj1
))
3136 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3137 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3138 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_HasOption. Expected _wxImage_p.");
3143 #if PYTHON_API_VERSION >= 1009
3144 char* tmpPtr
; int tmpSize
;
3145 if (!PyString_Check(_obj1
) && !PyUnicode_Check(_obj1
)) {
3146 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3149 if (PyString_AsStringAndSize(_obj1
, &tmpPtr
, &tmpSize
) == -1)
3151 _arg1
= new wxString(tmpPtr
, tmpSize
);
3153 if (!PyString_Check(_obj1
)) {
3154 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3157 _arg1
= new wxString(PyString_AS_STRING(_obj1
), PyString_GET_SIZE(_obj1
));
3161 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3162 _result
= (bool )wxImage_HasOption(_arg0
,*_arg1
);
3164 wxPyEndAllowThreads(__tstate
);
3165 if (PyErr_Occurred()) return NULL
;
3166 } _resultobj
= Py_BuildValue("i",_result
);
3174 #define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0))
3175 static PyObject
*_wrap_wxImage_CountColours(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3176 PyObject
* _resultobj
;
3177 unsigned long _result
;
3179 unsigned long _arg1
= (unsigned long ) (unsigned long)-1;
3180 PyObject
* _argo0
= 0;
3181 char *_kwnames
[] = { "self","stopafter", NULL
};
3184 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|l:wxImage_CountColours",_kwnames
,&_argo0
,&_arg1
))
3187 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3188 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImage_p")) {
3189 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p.");
3194 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3195 _result
= (unsigned long )wxImage_CountColours(_arg0
,_arg1
);
3197 wxPyEndAllowThreads(__tstate
);
3198 if (PyErr_Occurred()) return NULL
;
3199 } _resultobj
= Py_BuildValue("l",_result
);
3203 static PyObject
*_wrap_wxImage_AddHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3204 PyObject
* _resultobj
;
3205 wxImageHandler
* _arg0
;
3206 PyObject
* _argo0
= 0;
3207 char *_kwnames
[] = { "handler", NULL
};
3210 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_AddHandler",_kwnames
,&_argo0
))
3213 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3214 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3215 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_AddHandler. Expected _wxImageHandler_p.");
3220 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3221 wxImage::AddHandler(_arg0
);
3223 wxPyEndAllowThreads(__tstate
);
3224 if (PyErr_Occurred()) return NULL
;
3225 } Py_INCREF(Py_None
);
3226 _resultobj
= Py_None
;
3230 static PyObject
*_wrap_wxImage_InsertHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3231 PyObject
* _resultobj
;
3232 wxImageHandler
* _arg0
;
3233 PyObject
* _argo0
= 0;
3234 char *_kwnames
[] = { "handler", NULL
};
3237 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_InsertHandler",_kwnames
,&_argo0
))
3240 if (_argo0
== Py_None
) { _arg0
= NULL
; }
3241 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxImageHandler_p")) {
3242 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxImage_InsertHandler. Expected _wxImageHandler_p.");
3247 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3248 wxImage::InsertHandler(_arg0
);
3250 wxPyEndAllowThreads(__tstate
);
3251 if (PyErr_Occurred()) return NULL
;
3252 } Py_INCREF(Py_None
);
3253 _resultobj
= Py_None
;
3257 static PyObject
*_wrap_wxImage_RemoveHandler(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
3258 PyObject
* _resultobj
;
3261 PyObject
* _obj0
= 0;
3262 char *_kwnames
[] = { "name", NULL
};
3265 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxImage_RemoveHandler",_kwnames
,&_obj0
))
3268 #if PYTHON_API_VERSION >= 1009
3269 char* tmpPtr
; int tmpSize
;
3270 if (!PyString_Check(_obj0
) && !PyUnicode_Check(_obj0
)) {
3271 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3274 if (PyString_AsStringAndSize(_obj0
, &tmpPtr
, &tmpSize
) == -1)
3276 _arg0
= new wxString(tmpPtr
, tmpSize
);
3278 if (!PyString_Check(_obj0
)) {
3279 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
3282 _arg0
= new wxString(PyString_AS_STRING(_obj0
), PyString_GET_SIZE(_obj0
));
3286 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
3287 _result
= (bool )wxImage::RemoveHandler(*_arg0
);
3289 wxPyEndAllowThreads(__tstate
);
3290 if (PyErr_Occurred()) return NULL
;
3291 } _resultobj
= Py_BuildValue("i",_result
);
3299 static PyMethodDef imagecMethods
[] = {
3300 { "wxImage_RemoveHandler", (PyCFunction
) _wrap_wxImage_RemoveHandler
, METH_VARARGS
| METH_KEYWORDS
},
3301 { "wxImage_InsertHandler", (PyCFunction
) _wrap_wxImage_InsertHandler
, METH_VARARGS
| METH_KEYWORDS
},
3302 { "wxImage_AddHandler", (PyCFunction
) _wrap_wxImage_AddHandler
, METH_VARARGS
| METH_KEYWORDS
},
3303 { "wxImage_CountColours", (PyCFunction
) _wrap_wxImage_CountColours
, METH_VARARGS
| METH_KEYWORDS
},
3304 { "wxImage_HasOption", (PyCFunction
) _wrap_wxImage_HasOption
, METH_VARARGS
| METH_KEYWORDS
},
3305 { "wxImage_GetOptionInt", (PyCFunction
) _wrap_wxImage_GetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3306 { "wxImage_GetOption", (PyCFunction
) _wrap_wxImage_GetOption
, METH_VARARGS
| METH_KEYWORDS
},
3307 { "wxImage_SetOptionInt", (PyCFunction
) _wrap_wxImage_SetOptionInt
, METH_VARARGS
| METH_KEYWORDS
},
3308 { "wxImage_SetOption", (PyCFunction
) _wrap_wxImage_SetOption
, METH_VARARGS
| METH_KEYWORDS
},
3309 { "wxImage_ConvertToMono", (PyCFunction
) _wrap_wxImage_ConvertToMono
, METH_VARARGS
| METH_KEYWORDS
},
3310 { "wxImage_Replace", (PyCFunction
) _wrap_wxImage_Replace
, METH_VARARGS
| METH_KEYWORDS
},
3311 { "wxImage_Mirror", (PyCFunction
) _wrap_wxImage_Mirror
, METH_VARARGS
| METH_KEYWORDS
},
3312 { "wxImage_Rotate90", (PyCFunction
) _wrap_wxImage_Rotate90
, METH_VARARGS
| METH_KEYWORDS
},
3313 { "wxImage_Rotate", (PyCFunction
) _wrap_wxImage_Rotate
, METH_VARARGS
| METH_KEYWORDS
},
3314 { "wxImage_HasMask", (PyCFunction
) _wrap_wxImage_HasMask
, METH_VARARGS
| METH_KEYWORDS
},
3315 { "wxImage_SetMask", (PyCFunction
) _wrap_wxImage_SetMask
, METH_VARARGS
| METH_KEYWORDS
},
3316 { "wxImage_GetMaskBlue", (PyCFunction
) _wrap_wxImage_GetMaskBlue
, METH_VARARGS
| METH_KEYWORDS
},
3317 { "wxImage_GetMaskGreen", (PyCFunction
) _wrap_wxImage_GetMaskGreen
, METH_VARARGS
| METH_KEYWORDS
},
3318 { "wxImage_GetMaskRed", (PyCFunction
) _wrap_wxImage_GetMaskRed
, METH_VARARGS
| METH_KEYWORDS
},
3319 { "wxImage_SetMaskColour", (PyCFunction
) _wrap_wxImage_SetMaskColour
, METH_VARARGS
| METH_KEYWORDS
},
3320 { "wxImage_SetData", (PyCFunction
) _wrap_wxImage_SetData
, METH_VARARGS
| METH_KEYWORDS
},
3321 { "wxImage_GetData", (PyCFunction
) _wrap_wxImage_GetData
, METH_VARARGS
| METH_KEYWORDS
},
3322 { "wxImage_Paste", (PyCFunction
) _wrap_wxImage_Paste
, METH_VARARGS
| METH_KEYWORDS
},
3323 { "wxImage_Copy", (PyCFunction
) _wrap_wxImage_Copy
, METH_VARARGS
| METH_KEYWORDS
},
3324 { "wxImage_GetSubImage", (PyCFunction
) _wrap_wxImage_GetSubImage
, METH_VARARGS
| METH_KEYWORDS
},
3325 { "wxImage_GetHeight", (PyCFunction
) _wrap_wxImage_GetHeight
, METH_VARARGS
| METH_KEYWORDS
},
3326 { "wxImage_GetWidth", (PyCFunction
) _wrap_wxImage_GetWidth
, METH_VARARGS
| METH_KEYWORDS
},
3327 { "wxImage_Ok", (PyCFunction
) _wrap_wxImage_Ok
, METH_VARARGS
| METH_KEYWORDS
},
3328 { "wxImage_LoadMimeStream", (PyCFunction
) _wrap_wxImage_LoadMimeStream
, METH_VARARGS
| METH_KEYWORDS
},
3329 { "wxImage_LoadStream", (PyCFunction
) _wrap_wxImage_LoadStream
, METH_VARARGS
| METH_KEYWORDS
},
3330 { "wxImage_CanReadStream", (PyCFunction
) _wrap_wxImage_CanReadStream
, METH_VARARGS
| METH_KEYWORDS
},
3331 { "wxImage_SaveMimeFile", (PyCFunction
) _wrap_wxImage_SaveMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3332 { "wxImage_SaveFile", (PyCFunction
) _wrap_wxImage_SaveFile
, METH_VARARGS
| METH_KEYWORDS
},
3333 { "wxImage_LoadMimeFile", (PyCFunction
) _wrap_wxImage_LoadMimeFile
, METH_VARARGS
| METH_KEYWORDS
},
3334 { "wxImage_LoadFile", (PyCFunction
) _wrap_wxImage_LoadFile
, METH_VARARGS
| METH_KEYWORDS
},
3335 { "wxImage_GetImageCount", (PyCFunction
) _wrap_wxImage_GetImageCount
, METH_VARARGS
| METH_KEYWORDS
},
3336 { "wxImage_CanRead", (PyCFunction
) _wrap_wxImage_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3337 { "wxImage_GetBlue", (PyCFunction
) _wrap_wxImage_GetBlue
, METH_VARARGS
| METH_KEYWORDS
},
3338 { "wxImage_GetGreen", (PyCFunction
) _wrap_wxImage_GetGreen
, METH_VARARGS
| METH_KEYWORDS
},
3339 { "wxImage_GetRed", (PyCFunction
) _wrap_wxImage_GetRed
, METH_VARARGS
| METH_KEYWORDS
},
3340 { "wxImage_SetRGB", (PyCFunction
) _wrap_wxImage_SetRGB
, METH_VARARGS
| METH_KEYWORDS
},
3341 { "wxImage_Rescale", (PyCFunction
) _wrap_wxImage_Rescale
, METH_VARARGS
| METH_KEYWORDS
},
3342 { "wxImage_Scale", (PyCFunction
) _wrap_wxImage_Scale
, METH_VARARGS
| METH_KEYWORDS
},
3343 { "wxImage_Destroy", (PyCFunction
) _wrap_wxImage_Destroy
, METH_VARARGS
| METH_KEYWORDS
},
3344 { "wxImage_Create", (PyCFunction
) _wrap_wxImage_Create
, METH_VARARGS
| METH_KEYWORDS
},
3345 { "wxImage_ConvertToMonoBitmap", (PyCFunction
) _wrap_wxImage_ConvertToMonoBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3346 { "wxImage_ConvertToBitmap", (PyCFunction
) _wrap_wxImage_ConvertToBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3347 { "delete_wxImage", (PyCFunction
) _wrap_delete_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3348 { "new_wxImage", (PyCFunction
) _wrap_new_wxImage
, METH_VARARGS
| METH_KEYWORDS
},
3349 { "new_wxTIFFHandler", (PyCFunction
) _wrap_new_wxTIFFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3350 { "new_wxPCXHandler", (PyCFunction
) _wrap_new_wxPCXHandler
, METH_VARARGS
| METH_KEYWORDS
},
3351 { "new_wxPNMHandler", (PyCFunction
) _wrap_new_wxPNMHandler
, METH_VARARGS
| METH_KEYWORDS
},
3352 { "new_wxGIFHandler", (PyCFunction
) _wrap_new_wxGIFHandler
, METH_VARARGS
| METH_KEYWORDS
},
3353 { "new_wxANIHandler", (PyCFunction
) _wrap_new_wxANIHandler
, METH_VARARGS
| METH_KEYWORDS
},
3354 { "new_wxCURHandler", (PyCFunction
) _wrap_new_wxCURHandler
, METH_VARARGS
| METH_KEYWORDS
},
3355 { "new_wxICOHandler", (PyCFunction
) _wrap_new_wxICOHandler
, METH_VARARGS
| METH_KEYWORDS
},
3356 { "new_wxBMPHandler", (PyCFunction
) _wrap_new_wxBMPHandler
, METH_VARARGS
| METH_KEYWORDS
},
3357 { "new_wxJPEGHandler", (PyCFunction
) _wrap_new_wxJPEGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3358 { "new_wxPNGHandler", (PyCFunction
) _wrap_new_wxPNGHandler
, METH_VARARGS
| METH_KEYWORDS
},
3359 { "wxImageHandler_SetMimeType", (PyCFunction
) _wrap_wxImageHandler_SetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3360 { "wxImageHandler_SetType", (PyCFunction
) _wrap_wxImageHandler_SetType
, METH_VARARGS
| METH_KEYWORDS
},
3361 { "wxImageHandler_SetExtension", (PyCFunction
) _wrap_wxImageHandler_SetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3362 { "wxImageHandler_SetName", (PyCFunction
) _wrap_wxImageHandler_SetName
, METH_VARARGS
| METH_KEYWORDS
},
3363 { "wxImageHandler_CanRead", (PyCFunction
) _wrap_wxImageHandler_CanRead
, METH_VARARGS
| METH_KEYWORDS
},
3364 { "wxImageHandler_GetMimeType", (PyCFunction
) _wrap_wxImageHandler_GetMimeType
, METH_VARARGS
| METH_KEYWORDS
},
3365 { "wxImageHandler_GetType", (PyCFunction
) _wrap_wxImageHandler_GetType
, METH_VARARGS
| METH_KEYWORDS
},
3366 { "wxImageHandler_GetExtension", (PyCFunction
) _wrap_wxImageHandler_GetExtension
, METH_VARARGS
| METH_KEYWORDS
},
3367 { "wxImageHandler_GetName", (PyCFunction
) _wrap_wxImageHandler_GetName
, METH_VARARGS
| METH_KEYWORDS
},
3368 { "wxBitmapFromImage", (PyCFunction
) _wrap_wxBitmapFromImage
, METH_VARARGS
| METH_KEYWORDS
},
3369 { "wxInitAllImageHandlers", (PyCFunction
) _wrap_wxInitAllImageHandlers
, METH_VARARGS
| METH_KEYWORDS
},
3370 { "wxImageFromStreamMime", (PyCFunction
) _wrap_wxImageFromStreamMime
, METH_VARARGS
| METH_KEYWORDS
},
3371 { "wxImageFromStream", (PyCFunction
) _wrap_wxImageFromStream
, METH_VARARGS
| METH_KEYWORDS
},
3372 { "wxImageFromData", (PyCFunction
) _wrap_wxImageFromData
, METH_VARARGS
| METH_KEYWORDS
},
3373 { "wxImageFromBitmap", (PyCFunction
) _wrap_wxImageFromBitmap
, METH_VARARGS
| METH_KEYWORDS
},
3374 { "wxImageFromMime", (PyCFunction
) _wrap_wxImageFromMime
, METH_VARARGS
| METH_KEYWORDS
},
3375 { "wxEmptyImage", (PyCFunction
) _wrap_wxEmptyImage
, METH_VARARGS
| METH_KEYWORDS
},
3382 * This table is used by the pointer type-checker
3384 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
3385 { "_signed_long","_long",0},
3386 { "_wxBMPHandler","_wxANIHandler",SwigwxANIHandlerTowxBMPHandler
},
3387 { "_wxBMPHandler","_wxCURHandler",SwigwxCURHandlerTowxBMPHandler
},
3388 { "_wxBMPHandler","_wxICOHandler",SwigwxICOHandlerTowxBMPHandler
},
3389 { "_wxICOHandler","_wxANIHandler",SwigwxANIHandlerTowxICOHandler
},
3390 { "_wxICOHandler","_wxCURHandler",SwigwxCURHandlerTowxICOHandler
},
3391 { "_wxPrintQuality","_wxCoord",0},
3392 { "_wxPrintQuality","_int",0},
3393 { "_wxPrintQuality","_signed_int",0},
3394 { "_wxPrintQuality","_unsigned_int",0},
3395 { "_wxPrintQuality","_wxWindowID",0},
3396 { "_wxPrintQuality","_uint",0},
3397 { "_wxPrintQuality","_EBool",0},
3398 { "_wxPrintQuality","_size_t",0},
3399 { "_wxPrintQuality","_time_t",0},
3400 { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler
},
3401 { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler
},
3402 { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler
},
3403 { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler
},
3404 { "_wxImageHandler","_wxANIHandler",SwigwxANIHandlerTowxImageHandler
},
3405 { "_wxImageHandler","_wxCURHandler",SwigwxCURHandlerTowxImageHandler
},
3406 { "_wxImageHandler","_wxICOHandler",SwigwxICOHandlerTowxImageHandler
},
3407 { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler
},
3408 { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler
},
3409 { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler
},
3410 { "_byte","_unsigned_char",0},
3411 { "_long","_unsigned_long",0},
3412 { "_long","_signed_long",0},
3413 { "_size_t","_wxCoord",0},
3414 { "_size_t","_wxPrintQuality",0},
3415 { "_size_t","_time_t",0},
3416 { "_size_t","_unsigned_int",0},
3417 { "_size_t","_int",0},
3418 { "_size_t","_wxWindowID",0},
3419 { "_size_t","_uint",0},
3420 { "_uint","_wxCoord",0},
3421 { "_uint","_wxPrintQuality",0},
3422 { "_uint","_time_t",0},
3423 { "_uint","_size_t",0},
3424 { "_uint","_unsigned_int",0},
3425 { "_uint","_int",0},
3426 { "_uint","_wxWindowID",0},
3427 { "_wxChar","_char",0},
3428 { "_char","_wxChar",0},
3429 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
3430 { "_EBool","_wxCoord",0},
3431 { "_EBool","_wxPrintQuality",0},
3432 { "_EBool","_signed_int",0},
3433 { "_EBool","_int",0},
3434 { "_EBool","_wxWindowID",0},
3435 { "_unsigned_long","_long",0},
3436 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
3437 { "_signed_int","_wxCoord",0},
3438 { "_signed_int","_wxPrintQuality",0},
3439 { "_signed_int","_EBool",0},
3440 { "_signed_int","_wxWindowID",0},
3441 { "_signed_int","_int",0},
3442 { "_WXTYPE","_short",0},
3443 { "_WXTYPE","_signed_short",0},
3444 { "_WXTYPE","_unsigned_short",0},
3445 { "_unsigned_short","_WXTYPE",0},
3446 { "_unsigned_short","_short",0},
3447 { "_wxObject","_wxImage",SwigwxImageTowxObject
},
3448 { "_wxObject","_wxTIFFHandler",SwigwxTIFFHandlerTowxObject
},
3449 { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject
},
3450 { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject
},
3451 { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject
},
3452 { "_wxObject","_wxANIHandler",SwigwxANIHandlerTowxObject
},
3453 { "_wxObject","_wxCURHandler",SwigwxCURHandlerTowxObject
},
3454 { "_wxObject","_wxICOHandler",SwigwxICOHandlerTowxObject
},
3455 { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject
},
3456 { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject
},
3457 { "_wxObject","_wxPNGHandler",SwigwxPNGHandlerTowxObject
},
3458 { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject
},
3459 { "_signed_short","_WXTYPE",0},
3460 { "_signed_short","_short",0},
3461 { "_wxCURHandler","_wxANIHandler",SwigwxANIHandlerTowxCURHandler
},
3462 { "_unsigned_char","_byte",0},
3463 { "_unsigned_int","_wxCoord",0},
3464 { "_unsigned_int","_wxPrintQuality",0},
3465 { "_unsigned_int","_time_t",0},
3466 { "_unsigned_int","_size_t",0},
3467 { "_unsigned_int","_uint",0},
3468 { "_unsigned_int","_wxWindowID",0},
3469 { "_unsigned_int","_int",0},
3470 { "_short","_WXTYPE",0},
3471 { "_short","_unsigned_short",0},
3472 { "_short","_signed_short",0},
3473 { "_wxWindowID","_wxCoord",0},
3474 { "_wxWindowID","_wxPrintQuality",0},
3475 { "_wxWindowID","_time_t",0},
3476 { "_wxWindowID","_size_t",0},
3477 { "_wxWindowID","_EBool",0},
3478 { "_wxWindowID","_uint",0},
3479 { "_wxWindowID","_int",0},
3480 { "_wxWindowID","_signed_int",0},
3481 { "_wxWindowID","_unsigned_int",0},
3482 { "_int","_wxCoord",0},
3483 { "_int","_wxPrintQuality",0},
3484 { "_int","_time_t",0},
3485 { "_int","_size_t",0},
3486 { "_int","_EBool",0},
3487 { "_int","_uint",0},
3488 { "_int","_wxWindowID",0},
3489 { "_int","_unsigned_int",0},
3490 { "_int","_signed_int",0},
3491 { "_time_t","_wxCoord",0},
3492 { "_time_t","_wxPrintQuality",0},
3493 { "_time_t","_unsigned_int",0},
3494 { "_time_t","_int",0},
3495 { "_time_t","_wxWindowID",0},
3496 { "_time_t","_uint",0},
3497 { "_time_t","_size_t",0},
3498 { "_wxCoord","_int",0},
3499 { "_wxCoord","_signed_int",0},
3500 { "_wxCoord","_unsigned_int",0},
3501 { "_wxCoord","_wxWindowID",0},
3502 { "_wxCoord","_uint",0},
3503 { "_wxCoord","_EBool",0},
3504 { "_wxCoord","_size_t",0},
3505 { "_wxCoord","_time_t",0},
3506 { "_wxCoord","_wxPrintQuality",0},
3509 static PyObject
*SWIG_globals
;
3513 SWIGEXPORT(void) initimagec() {
3515 SWIG_globals
= SWIG_newvarlink();
3516 m
= Py_InitModule("imagec", imagecMethods
);
3517 d
= PyModule_GetDict(m
);
3518 PyDict_SetItemString(d
,"cvar", SWIG_globals
);
3519 SWIG_addvarlink(SWIG_globals
,"wxNullImage",_wrap_wxNullImage_get
, _wrap_wxNullImage_set
);
3522 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
3523 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);