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