]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/image.py
Calling a virtual function from a destructor is not good:
[wxWidgets.git] / wxPython / src / gtk / image.py
CommitLineData
cf694132
RD
1# This file was created automatically by SWIG.
2import imagec
3
4from misc import *
5
6from gdi import *
94082a71 7
a323d3bd
RD
8from fonts import *
9
94082a71 10from streams import *
9df61a29 11class wxImageHandlerPtr(wxObjectPtr):
cf694132
RD
12 def __init__(self,this):
13 self.this = this
14 self.thisown = 0
1d99702e
RD
15 def GetName(self, *_args, **_kwargs):
16 val = apply(imagec.wxImageHandler_GetName,(self,) + _args, _kwargs)
cf694132 17 return val
1d99702e
RD
18 def GetExtension(self, *_args, **_kwargs):
19 val = apply(imagec.wxImageHandler_GetExtension,(self,) + _args, _kwargs)
cf694132 20 return val
1d99702e
RD
21 def GetType(self, *_args, **_kwargs):
22 val = apply(imagec.wxImageHandler_GetType,(self,) + _args, _kwargs)
cf694132 23 return val
1d99702e
RD
24 def GetMimeType(self, *_args, **_kwargs):
25 val = apply(imagec.wxImageHandler_GetMimeType,(self,) + _args, _kwargs)
cf694132 26 return val
1893b029
RD
27 def CanRead(self, *_args, **_kwargs):
28 val = apply(imagec.wxImageHandler_CanRead,(self,) + _args, _kwargs)
29 return val
1d99702e
RD
30 def SetName(self, *_args, **_kwargs):
31 val = apply(imagec.wxImageHandler_SetName,(self,) + _args, _kwargs)
cf694132 32 return val
1d99702e
RD
33 def SetExtension(self, *_args, **_kwargs):
34 val = apply(imagec.wxImageHandler_SetExtension,(self,) + _args, _kwargs)
cf694132 35 return val
1d99702e
RD
36 def SetType(self, *_args, **_kwargs):
37 val = apply(imagec.wxImageHandler_SetType,(self,) + _args, _kwargs)
cf694132 38 return val
1d99702e
RD
39 def SetMimeType(self, *_args, **_kwargs):
40 val = apply(imagec.wxImageHandler_SetMimeType,(self,) + _args, _kwargs)
cf694132
RD
41 return val
42 def __repr__(self):
1d99702e 43 return "<C wxImageHandler instance at %s>" % (self.this,)
cf694132 44class wxImageHandler(wxImageHandlerPtr):
9d8bd15f
RD
45 def __init__(self,this):
46 self.this = this
cf694132
RD
47
48
49
50
51class wxPNGHandlerPtr(wxImageHandlerPtr):
52 def __init__(self,this):
53 self.this = this
54 self.thisown = 0
55 def __repr__(self):
1d99702e 56 return "<C wxPNGHandler instance at %s>" % (self.this,)
cf694132 57class wxPNGHandler(wxPNGHandlerPtr):
1d99702e
RD
58 def __init__(self,*_args,**_kwargs):
59 self.this = apply(imagec.new_wxPNGHandler,_args,_kwargs)
cf694132
RD
60 self.thisown = 1
61
62
63
64
65class wxJPEGHandlerPtr(wxImageHandlerPtr):
66 def __init__(self,this):
67 self.this = this
68 self.thisown = 0
69 def __repr__(self):
1d99702e 70 return "<C wxJPEGHandler instance at %s>" % (self.this,)
cf694132 71class wxJPEGHandler(wxJPEGHandlerPtr):
1d99702e
RD
72 def __init__(self,*_args,**_kwargs):
73 self.this = apply(imagec.new_wxJPEGHandler,_args,_kwargs)
cf694132
RD
74 self.thisown = 1
75
76
77
78
79class wxBMPHandlerPtr(wxImageHandlerPtr):
80 def __init__(self,this):
81 self.this = this
82 self.thisown = 0
83 def __repr__(self):
1d99702e 84 return "<C wxBMPHandler instance at %s>" % (self.this,)
cf694132 85class wxBMPHandler(wxBMPHandlerPtr):
1d99702e
RD
86 def __init__(self,*_args,**_kwargs):
87 self.this = apply(imagec.new_wxBMPHandler,_args,_kwargs)
cf694132
RD
88 self.thisown = 1
89
90
91
92
1893b029
RD
93class wxICOHandlerPtr(wxBMPHandlerPtr):
94 def __init__(self,this):
95 self.this = this
96 self.thisown = 0
97 def __repr__(self):
98 return "<C wxICOHandler instance at %s>" % (self.this,)
99class wxICOHandler(wxICOHandlerPtr):
100 def __init__(self,*_args,**_kwargs):
101 self.this = apply(imagec.new_wxICOHandler,_args,_kwargs)
102 self.thisown = 1
103
104
105
106
db34b2d4
RD
107class wxCURHandlerPtr(wxICOHandlerPtr):
108 def __init__(self,this):
109 self.this = this
110 self.thisown = 0
111 def __repr__(self):
112 return "<C wxCURHandler instance at %s>" % (self.this,)
113class wxCURHandler(wxCURHandlerPtr):
114 def __init__(self,*_args,**_kwargs):
115 self.this = apply(imagec.new_wxCURHandler,_args,_kwargs)
116 self.thisown = 1
117
118
119
120
121class wxANIHandlerPtr(wxCURHandlerPtr):
122 def __init__(self,this):
123 self.this = this
124 self.thisown = 0
125 def __repr__(self):
126 return "<C wxANIHandler instance at %s>" % (self.this,)
127class wxANIHandler(wxANIHandlerPtr):
128 def __init__(self,*_args,**_kwargs):
129 self.this = apply(imagec.new_wxANIHandler,_args,_kwargs)
130 self.thisown = 1
131
132
133
134
cf694132
RD
135class wxGIFHandlerPtr(wxImageHandlerPtr):
136 def __init__(self,this):
137 self.this = this
138 self.thisown = 0
139 def __repr__(self):
1d99702e 140 return "<C wxGIFHandler instance at %s>" % (self.this,)
cf694132 141class wxGIFHandler(wxGIFHandlerPtr):
1d99702e
RD
142 def __init__(self,*_args,**_kwargs):
143 self.this = apply(imagec.new_wxGIFHandler,_args,_kwargs)
cf694132
RD
144 self.thisown = 1
145
146
147
148
06c0fba4
RD
149class wxPNMHandlerPtr(wxImageHandlerPtr):
150 def __init__(self,this):
151 self.this = this
152 self.thisown = 0
153 def __repr__(self):
154 return "<C wxPNMHandler instance at %s>" % (self.this,)
155class wxPNMHandler(wxPNMHandlerPtr):
156 def __init__(self,*_args,**_kwargs):
157 self.this = apply(imagec.new_wxPNMHandler,_args,_kwargs)
158 self.thisown = 1
159
160
161
162
163class wxPCXHandlerPtr(wxImageHandlerPtr):
164 def __init__(self,this):
165 self.this = this
166 self.thisown = 0
167 def __repr__(self):
168 return "<C wxPCXHandler instance at %s>" % (self.this,)
169class wxPCXHandler(wxPCXHandlerPtr):
170 def __init__(self,*_args,**_kwargs):
171 self.this = apply(imagec.new_wxPCXHandler,_args,_kwargs)
172 self.thisown = 1
173
174
175
176
9b3d3bc4
RD
177class wxTIFFHandlerPtr(wxImageHandlerPtr):
178 def __init__(self,this):
179 self.this = this
180 self.thisown = 0
181 def __repr__(self):
182 return "<C wxTIFFHandler instance at %s>" % (self.this,)
183class wxTIFFHandler(wxTIFFHandlerPtr):
184 def __init__(self,*_args,**_kwargs):
185 self.this = apply(imagec.new_wxTIFFHandler,_args,_kwargs)
186 self.thisown = 1
187
188
189
190
9df61a29 191class wxImagePtr(wxObjectPtr):
cf694132
RD
192 def __init__(self,this):
193 self.this = this
194 self.thisown = 0
b67a9327
RD
195 def __del__(self, delfunc=imagec.delete_wxImage):
196 if self.thisown == 1:
197 try:
198 delfunc(self)
199 except:
200 pass
1d99702e
RD
201 def Create(self, *_args, **_kwargs):
202 val = apply(imagec.wxImage_Create,(self,) + _args, _kwargs)
cf694132 203 return val
1d99702e
RD
204 def Destroy(self, *_args, **_kwargs):
205 val = apply(imagec.wxImage_Destroy,(self,) + _args, _kwargs)
cf694132 206 return val
1d99702e
RD
207 def Scale(self, *_args, **_kwargs):
208 val = apply(imagec.wxImage_Scale,(self,) + _args, _kwargs)
209 if val: val = wxImagePtr(val) ; val.thisown = 1
cf694132 210 return val
1d99702e
RD
211 def Rescale(self, *_args, **_kwargs):
212 val = apply(imagec.wxImage_Rescale,(self,) + _args, _kwargs)
f6bcfd97 213 if val: val = wxImagePtr(val)
8bf5d46e 214 return val
1d99702e
RD
215 def SetRGB(self, *_args, **_kwargs):
216 val = apply(imagec.wxImage_SetRGB,(self,) + _args, _kwargs)
cf694132 217 return val
1d99702e
RD
218 def GetRed(self, *_args, **_kwargs):
219 val = apply(imagec.wxImage_GetRed,(self,) + _args, _kwargs)
cf694132 220 return val
1d99702e
RD
221 def GetGreen(self, *_args, **_kwargs):
222 val = apply(imagec.wxImage_GetGreen,(self,) + _args, _kwargs)
cf694132 223 return val
1d99702e
RD
224 def GetBlue(self, *_args, **_kwargs):
225 val = apply(imagec.wxImage_GetBlue,(self,) + _args, _kwargs)
cf694132 226 return val
a323d3bd
RD
227 def FindFirstUnusedColour(self, *_args, **_kwargs):
228 val = apply(imagec.wxImage_FindFirstUnusedColour,(self,) + _args, _kwargs)
229 return val
230 def SetMaskFromImage(self, *_args, **_kwargs):
231 val = apply(imagec.wxImage_SetMaskFromImage,(self,) + _args, _kwargs)
232 return val
1d99702e
RD
233 def LoadFile(self, *_args, **_kwargs):
234 val = apply(imagec.wxImage_LoadFile,(self,) + _args, _kwargs)
cf694132 235 return val
1d99702e
RD
236 def LoadMimeFile(self, *_args, **_kwargs):
237 val = apply(imagec.wxImage_LoadMimeFile,(self,) + _args, _kwargs)
cf694132 238 return val
1d99702e
RD
239 def SaveFile(self, *_args, **_kwargs):
240 val = apply(imagec.wxImage_SaveFile,(self,) + _args, _kwargs)
cf694132 241 return val
1d99702e
RD
242 def SaveMimeFile(self, *_args, **_kwargs):
243 val = apply(imagec.wxImage_SaveMimeFile,(self,) + _args, _kwargs)
cf694132 244 return val
94082a71
RD
245 def LoadStream(self, *_args, **_kwargs):
246 val = apply(imagec.wxImage_LoadStream,(self,) + _args, _kwargs)
247 return val
248 def LoadMimeStream(self, *_args, **_kwargs):
249 val = apply(imagec.wxImage_LoadMimeStream,(self,) + _args, _kwargs)
250 return val
1d99702e
RD
251 def Ok(self, *_args, **_kwargs):
252 val = apply(imagec.wxImage_Ok,(self,) + _args, _kwargs)
cf694132 253 return val
1d99702e
RD
254 def GetWidth(self, *_args, **_kwargs):
255 val = apply(imagec.wxImage_GetWidth,(self,) + _args, _kwargs)
cf694132 256 return val
1d99702e
RD
257 def GetHeight(self, *_args, **_kwargs):
258 val = apply(imagec.wxImage_GetHeight,(self,) + _args, _kwargs)
cf694132 259 return val
9d8bd15f
RD
260 def GetSubImage(self, *_args, **_kwargs):
261 val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs)
262 if val: val = wxImagePtr(val) ; val.thisown = 1
263 return val
f6bcfd97
BP
264 def Copy(self, *_args, **_kwargs):
265 val = apply(imagec.wxImage_Copy,(self,) + _args, _kwargs)
266 if val: val = wxImagePtr(val) ; val.thisown = 1
267 return val
268 def Paste(self, *_args, **_kwargs):
269 val = apply(imagec.wxImage_Paste,(self,) + _args, _kwargs)
270 return val
8381e4cd
RD
271 def GetDataBuffer(self, *_args, **_kwargs):
272 val = apply(imagec.wxImage_GetDataBuffer,(self,) + _args, _kwargs)
273 return val
1d99702e
RD
274 def GetData(self, *_args, **_kwargs):
275 val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs)
cf694132 276 return val
b67a9327
RD
277 def SetDataBuffer(self, *_args, **_kwargs):
278 val = apply(imagec.wxImage_SetDataBuffer,(self,) + _args, _kwargs)
279 return val
1d99702e
RD
280 def SetData(self, *_args, **_kwargs):
281 val = apply(imagec.wxImage_SetData,(self,) + _args, _kwargs)
cf694132 282 return val
1d99702e
RD
283 def SetMaskColour(self, *_args, **_kwargs):
284 val = apply(imagec.wxImage_SetMaskColour,(self,) + _args, _kwargs)
cf694132 285 return val
1d99702e
RD
286 def GetMaskRed(self, *_args, **_kwargs):
287 val = apply(imagec.wxImage_GetMaskRed,(self,) + _args, _kwargs)
cf694132 288 return val
1d99702e
RD
289 def GetMaskGreen(self, *_args, **_kwargs):
290 val = apply(imagec.wxImage_GetMaskGreen,(self,) + _args, _kwargs)
cf694132 291 return val
1d99702e
RD
292 def GetMaskBlue(self, *_args, **_kwargs):
293 val = apply(imagec.wxImage_GetMaskBlue,(self,) + _args, _kwargs)
cf694132 294 return val
1d99702e
RD
295 def SetMask(self, *_args, **_kwargs):
296 val = apply(imagec.wxImage_SetMask,(self,) + _args, _kwargs)
cf694132 297 return val
1d99702e
RD
298 def HasMask(self, *_args, **_kwargs):
299 val = apply(imagec.wxImage_HasMask,(self,) + _args, _kwargs)
cf694132 300 return val
f6bcfd97
BP
301 def Rotate(self, *_args, **_kwargs):
302 val = apply(imagec.wxImage_Rotate,(self,) + _args, _kwargs)
303 if val: val = wxImagePtr(val) ; val.thisown = 1
304 return val
305 def Rotate90(self, *_args, **_kwargs):
306 val = apply(imagec.wxImage_Rotate90,(self,) + _args, _kwargs)
307 if val: val = wxImagePtr(val) ; val.thisown = 1
308 return val
309 def Mirror(self, *_args, **_kwargs):
310 val = apply(imagec.wxImage_Mirror,(self,) + _args, _kwargs)
311 if val: val = wxImagePtr(val) ; val.thisown = 1
312 return val
313 def Replace(self, *_args, **_kwargs):
314 val = apply(imagec.wxImage_Replace,(self,) + _args, _kwargs)
315 return val
93283355
RD
316 def ConvertToMono(self, *_args, **_kwargs):
317 val = apply(imagec.wxImage_ConvertToMono,(self,) + _args, _kwargs)
318 if val: val = wxImagePtr(val) ; val.thisown = 1
319 return val
320 def SetOption(self, *_args, **_kwargs):
321 val = apply(imagec.wxImage_SetOption,(self,) + _args, _kwargs)
322 return val
323 def SetOptionInt(self, *_args, **_kwargs):
324 val = apply(imagec.wxImage_SetOptionInt,(self,) + _args, _kwargs)
325 return val
326 def GetOption(self, *_args, **_kwargs):
327 val = apply(imagec.wxImage_GetOption,(self,) + _args, _kwargs)
328 return val
329 def GetOptionInt(self, *_args, **_kwargs):
330 val = apply(imagec.wxImage_GetOptionInt,(self,) + _args, _kwargs)
331 return val
332 def HasOption(self, *_args, **_kwargs):
333 val = apply(imagec.wxImage_HasOption,(self,) + _args, _kwargs)
334 return val
f6bcfd97
BP
335 def CountColours(self, *_args, **_kwargs):
336 val = apply(imagec.wxImage_CountColours,(self,) + _args, _kwargs)
337 return val
be86ffe3
RD
338 def ConvertToBitmap(self, *_args, **_kwargs):
339 val = apply(imagec.wxImage_ConvertToBitmap,(self,) + _args, _kwargs)
340 if val: val = wxBitmapPtr(val) ; val.thisown = 1
341 return val
342 def ConvertToMonoBitmap(self, *_args, **_kwargs):
343 val = apply(imagec.wxImage_ConvertToMonoBitmap,(self,) + _args, _kwargs)
344 if val: val = wxBitmapPtr(val) ; val.thisown = 1
345 return val
cf694132 346 def __repr__(self):
1d99702e 347 return "<C wxImage instance at %s>" % (self.this,)
cf694132 348class wxImage(wxImagePtr):
1d99702e
RD
349 def __init__(self,*_args,**_kwargs):
350 self.this = apply(imagec.new_wxImage,_args,_kwargs)
cf694132
RD
351 self.thisown = 1
352
353
354
355
356
357
358#-------------- FUNCTION WRAPPERS ------------------
359
1d99702e
RD
360def wxEmptyImage(*_args, **_kwargs):
361 val = apply(imagec.wxEmptyImage,_args,_kwargs)
362 if val: val = wxImagePtr(val); val.thisown = 1
cf694132
RD
363 return val
364
1d99702e
RD
365def wxImageFromMime(*_args, **_kwargs):
366 val = apply(imagec.wxImageFromMime,_args,_kwargs)
367 if val: val = wxImagePtr(val); val.thisown = 1
cf694132
RD
368 return val
369
1d99702e
RD
370def wxImageFromBitmap(*_args, **_kwargs):
371 val = apply(imagec.wxImageFromBitmap,_args,_kwargs)
372 if val: val = wxImagePtr(val); val.thisown = 1
cf694132
RD
373 return val
374
1893b029
RD
375def wxImageFromData(*_args, **_kwargs):
376 val = apply(imagec.wxImageFromData,_args,_kwargs)
377 if val: val = wxImagePtr(val); val.thisown = 1
378 return val
379
94082a71
RD
380def wxImageFromStream(*_args, **_kwargs):
381 val = apply(imagec.wxImageFromStream,_args,_kwargs)
382 if val: val = wxImagePtr(val); val.thisown = 1
383 return val
384
385def wxImageFromStreamMime(*_args, **_kwargs):
386 val = apply(imagec.wxImageFromStreamMime,_args,_kwargs)
387 if val: val = wxImagePtr(val); val.thisown = 1
388 return val
389
fbcadfca
RD
390wxInitAllImageHandlers = imagec.wxInitAllImageHandlers
391
9e689c06
RD
392def wxBitmapFromImage(*_args, **_kwargs):
393 val = apply(imagec.wxBitmapFromImage,_args,_kwargs)
394 if val: val = wxBitmapPtr(val); val.thisown = 1
395 return val
396
fbcadfca
RD
397wxImage_CanRead = imagec.wxImage_CanRead
398
1893b029
RD
399wxImage_GetImageCount = imagec.wxImage_GetImageCount
400
94082a71
RD
401wxImage_CanReadStream = imagec.wxImage_CanReadStream
402
1d99702e 403wxImage_AddHandler = imagec.wxImage_AddHandler
cf694132 404
fbcadfca
RD
405wxImage_InsertHandler = imagec.wxImage_InsertHandler
406
407wxImage_RemoveHandler = imagec.wxImage_RemoveHandler
06c0fba4 408
cf694132
RD
409
410
411#-------------- VARIABLE WRAPPERS ------------------
412
df05452e
RD
413cvar = imagec.cvar
414wxNullImage = wxImagePtr(imagec.cvar.wxNullImage)