]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/animate/gtk/animate.py
Oops
[wxWidgets.git] / wxPython / contrib / animate / gtk / animate.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 """
5 Simple animation player classes, including `wxGIFAnimationCtrl` for displaying
6 animated GIF files
7
8 """
9
10 import _animate
11
12 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
13 if (name == "this"):
14 if isinstance(value, class_type):
15 self.__dict__[name] = value.this
16 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
17 del value.thisown
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name) or (name == "thisown"):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
25
26 def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29 def _swig_getattr(self,class_type,name):
30 method = class_type.__swig_getmethods__.get(name,None)
31 if method: return method(self)
32 raise AttributeError,name
33
34 import types
35 try:
36 _object = types.ObjectType
37 _newclass = 1
38 except AttributeError:
39 class _object : pass
40 _newclass = 0
41 del types
42
43
44 def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
46 if hasattr(self,name) or (name in ("this", "thisown")):
47 set(self,name,value)
48 else:
49 raise AttributeError("You cannot add attributes to %s" % self)
50 return set_attr
51
52
53 import _core
54 import wx
55 __docfilter__ = wx._core.__DocFilter(globals())
56 ANIM_UNSPECIFIED = _animate.ANIM_UNSPECIFIED
57 ANIM_DONOTREMOVE = _animate.ANIM_DONOTREMOVE
58 ANIM_TOBACKGROUND = _animate.ANIM_TOBACKGROUND
59 ANIM_TOPREVIOUS = _animate.ANIM_TOPREVIOUS
60 class AnimationPlayer(_core.Object):
61 """Proxy of C++ AnimationPlayer class"""
62 def __repr__(self):
63 return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
64 def __init__(self, *args, **kwargs):
65 """__init__(self, AnimationBase animation=None, bool destroyAnimation=False) -> AnimationPlayer"""
66 newobj = _animate.new_AnimationPlayer(*args, **kwargs)
67 self.this = newobj.this
68 self.thisown = 1
69 del newobj.thisown
70 def __del__(self, destroy=_animate.delete_AnimationPlayer):
71 """__del__(self)"""
72 try:
73 if self.thisown: destroy(self)
74 except: pass
75
76 def SetAnimation(*args, **kwargs):
77 """SetAnimation(self, AnimationBase animation, bool destroyAnimation=False)"""
78 return _animate.AnimationPlayer_SetAnimation(*args, **kwargs)
79
80 def GetAnimation(*args, **kwargs):
81 """GetAnimation(self) -> AnimationBase"""
82 return _animate.AnimationPlayer_GetAnimation(*args, **kwargs)
83
84 def SetDestroyAnimation(*args, **kwargs):
85 """SetDestroyAnimation(self, bool destroyAnimation)"""
86 return _animate.AnimationPlayer_SetDestroyAnimation(*args, **kwargs)
87
88 def GetDestroyAnimation(*args, **kwargs):
89 """GetDestroyAnimation(self) -> bool"""
90 return _animate.AnimationPlayer_GetDestroyAnimation(*args, **kwargs)
91
92 def SetCurrentFrame(*args, **kwargs):
93 """SetCurrentFrame(self, int currentFrame)"""
94 return _animate.AnimationPlayer_SetCurrentFrame(*args, **kwargs)
95
96 def GetCurrentFrame(*args, **kwargs):
97 """GetCurrentFrame(self) -> int"""
98 return _animate.AnimationPlayer_GetCurrentFrame(*args, **kwargs)
99
100 def SetWindow(*args, **kwargs):
101 """SetWindow(self, Window window)"""
102 return _animate.AnimationPlayer_SetWindow(*args, **kwargs)
103
104 def GetWindow(*args, **kwargs):
105 """GetWindow(self) -> Window"""
106 return _animate.AnimationPlayer_GetWindow(*args, **kwargs)
107
108 def SetPosition(*args, **kwargs):
109 """SetPosition(self, Point pos)"""
110 return _animate.AnimationPlayer_SetPosition(*args, **kwargs)
111
112 def GetPosition(*args, **kwargs):
113 """GetPosition(self) -> Point"""
114 return _animate.AnimationPlayer_GetPosition(*args, **kwargs)
115
116 def SetLooped(*args, **kwargs):
117 """SetLooped(self, bool looped)"""
118 return _animate.AnimationPlayer_SetLooped(*args, **kwargs)
119
120 def GetLooped(*args, **kwargs):
121 """GetLooped(self) -> bool"""
122 return _animate.AnimationPlayer_GetLooped(*args, **kwargs)
123
124 def HasAnimation(*args, **kwargs):
125 """HasAnimation(self) -> bool"""
126 return _animate.AnimationPlayer_HasAnimation(*args, **kwargs)
127
128 def IsPlaying(*args, **kwargs):
129 """IsPlaying(self) -> bool"""
130 return _animate.AnimationPlayer_IsPlaying(*args, **kwargs)
131
132 def UseBackgroundColour(*args, **kwargs):
133 """UseBackgroundColour(self, bool useBackground)"""
134 return _animate.AnimationPlayer_UseBackgroundColour(*args, **kwargs)
135
136 def UsingBackgroundColour(*args, **kwargs):
137 """UsingBackgroundColour(self) -> bool"""
138 return _animate.AnimationPlayer_UsingBackgroundColour(*args, **kwargs)
139
140 def SetCustomBackgroundColour(*args, **kwargs):
141 """SetCustomBackgroundColour(self, Colour col, bool useCustomBackgroundColour=True)"""
142 return _animate.AnimationPlayer_SetCustomBackgroundColour(*args, **kwargs)
143
144 def UsingCustomBackgroundColour(*args, **kwargs):
145 """UsingCustomBackgroundColour(self) -> bool"""
146 return _animate.AnimationPlayer_UsingCustomBackgroundColour(*args, **kwargs)
147
148 def GetCustomBackgroundColour(*args, **kwargs):
149 """GetCustomBackgroundColour(self) -> Colour"""
150 return _animate.AnimationPlayer_GetCustomBackgroundColour(*args, **kwargs)
151
152 def UseParentBackground(*args, **kwargs):
153 """UseParentBackground(self, bool useParent)"""
154 return _animate.AnimationPlayer_UseParentBackground(*args, **kwargs)
155
156 def UsingParentBackground(*args, **kwargs):
157 """UsingParentBackground(self) -> bool"""
158 return _animate.AnimationPlayer_UsingParentBackground(*args, **kwargs)
159
160 def Play(*args, **kwargs):
161 """Play(self, Window window, Point pos=wxPoint(0, 0), bool looped=True) -> bool"""
162 return _animate.AnimationPlayer_Play(*args, **kwargs)
163
164 def Build(*args, **kwargs):
165 """Build(self) -> bool"""
166 return _animate.AnimationPlayer_Build(*args, **kwargs)
167
168 def Stop(*args, **kwargs):
169 """Stop(self)"""
170 return _animate.AnimationPlayer_Stop(*args, **kwargs)
171
172 def Draw(*args, **kwargs):
173 """Draw(self, DC dc)"""
174 return _animate.AnimationPlayer_Draw(*args, **kwargs)
175
176 def GetFrameCount(*args, **kwargs):
177 """GetFrameCount(self) -> int"""
178 return _animate.AnimationPlayer_GetFrameCount(*args, **kwargs)
179
180 def GetFrame(*args, **kwargs):
181 """GetFrame(self, int i) -> Image"""
182 return _animate.AnimationPlayer_GetFrame(*args, **kwargs)
183
184 def GetDisposalMethod(*args, **kwargs):
185 """GetDisposalMethod(self, int i) -> int"""
186 return _animate.AnimationPlayer_GetDisposalMethod(*args, **kwargs)
187
188 def GetFrameRect(*args, **kwargs):
189 """GetFrameRect(self, int i) -> Rect"""
190 return _animate.AnimationPlayer_GetFrameRect(*args, **kwargs)
191
192 def GetDelay(*args, **kwargs):
193 """GetDelay(self, int i) -> int"""
194 return _animate.AnimationPlayer_GetDelay(*args, **kwargs)
195
196 def GetLogicalScreenSize(*args, **kwargs):
197 """GetLogicalScreenSize(self) -> Size"""
198 return _animate.AnimationPlayer_GetLogicalScreenSize(*args, **kwargs)
199
200 def GetBackgroundColour(*args, **kwargs):
201 """GetBackgroundColour(self, Colour col) -> bool"""
202 return _animate.AnimationPlayer_GetBackgroundColour(*args, **kwargs)
203
204 def GetTransparentColour(*args, **kwargs):
205 """GetTransparentColour(self, Colour col) -> bool"""
206 return _animate.AnimationPlayer_GetTransparentColour(*args, **kwargs)
207
208 def PlayFrame(*args, **kwargs):
209 """PlayFrame(self, int frame, Window window, Point pos) -> bool"""
210 return _animate.AnimationPlayer_PlayFrame(*args, **kwargs)
211
212 def PlayNextFrame(*args, **kwargs):
213 """PlayNextFrame(self) -> bool"""
214 return _animate.AnimationPlayer_PlayNextFrame(*args, **kwargs)
215
216 def DrawFrame(*args, **kwargs):
217 """DrawFrame(self, int frame, DC dc, Point pos)"""
218 return _animate.AnimationPlayer_DrawFrame(*args, **kwargs)
219
220 def DrawBackground(*args, **kwargs):
221 """DrawBackground(self, DC dc, Point pos, Colour colour)"""
222 return _animate.AnimationPlayer_DrawBackground(*args, **kwargs)
223
224 def ClearCache(*args, **kwargs):
225 """ClearCache(self)"""
226 return _animate.AnimationPlayer_ClearCache(*args, **kwargs)
227
228 def SaveBackground(*args, **kwargs):
229 """SaveBackground(self, Rect rect)"""
230 return _animate.AnimationPlayer_SaveBackground(*args, **kwargs)
231
232 def GetBackingStore(*args, **kwargs):
233 """GetBackingStore(self) -> Bitmap"""
234 return _animate.AnimationPlayer_GetBackingStore(*args, **kwargs)
235
236
237 class AnimationPlayerPtr(AnimationPlayer):
238 def __init__(self, this):
239 self.this = this
240 if not hasattr(self,"thisown"): self.thisown = 0
241 self.__class__ = AnimationPlayer
242 _animate.AnimationPlayer_swigregister(AnimationPlayerPtr)
243 cvar = _animate.cvar
244 AnimationControlNameStr = cvar.AnimationControlNameStr
245
246 class AnimationBase(_core.Object):
247 """Proxy of C++ AnimationBase class"""
248 def __init__(self): raise RuntimeError, "No constructor defined"
249 def __repr__(self):
250 return "<%s.%s; proxy of C++ wxAnimationBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
251 def __del__(self, destroy=_animate.delete_AnimationBase):
252 """__del__(self)"""
253 try:
254 if self.thisown: destroy(self)
255 except: pass
256
257 def GetFrameCount(*args, **kwargs):
258 """GetFrameCount(self) -> int"""
259 return _animate.AnimationBase_GetFrameCount(*args, **kwargs)
260
261 def GetFrame(*args, **kwargs):
262 """GetFrame(self, int i) -> Image"""
263 return _animate.AnimationBase_GetFrame(*args, **kwargs)
264
265 def GetDisposalMethod(*args, **kwargs):
266 """GetDisposalMethod(self, int i) -> int"""
267 return _animate.AnimationBase_GetDisposalMethod(*args, **kwargs)
268
269 def GetFrameRect(*args, **kwargs):
270 """GetFrameRect(self, int i) -> Rect"""
271 return _animate.AnimationBase_GetFrameRect(*args, **kwargs)
272
273 def GetDelay(*args, **kwargs):
274 """GetDelay(self, int i) -> int"""
275 return _animate.AnimationBase_GetDelay(*args, **kwargs)
276
277 def GetLogicalScreenSize(*args, **kwargs):
278 """GetLogicalScreenSize(self) -> Size"""
279 return _animate.AnimationBase_GetLogicalScreenSize(*args, **kwargs)
280
281 def GetBackgroundColour(*args, **kwargs):
282 """GetBackgroundColour(self, Colour col) -> bool"""
283 return _animate.AnimationBase_GetBackgroundColour(*args, **kwargs)
284
285 def GetTransparentColour(*args, **kwargs):
286 """GetTransparentColour(self, Colour col) -> bool"""
287 return _animate.AnimationBase_GetTransparentColour(*args, **kwargs)
288
289 def IsValid(*args, **kwargs):
290 """IsValid(self) -> bool"""
291 return _animate.AnimationBase_IsValid(*args, **kwargs)
292
293 def LoadFile(*args, **kwargs):
294 """LoadFile(self, String filename) -> bool"""
295 return _animate.AnimationBase_LoadFile(*args, **kwargs)
296
297
298 class AnimationBasePtr(AnimationBase):
299 def __init__(self, this):
300 self.this = this
301 if not hasattr(self,"thisown"): self.thisown = 0
302 self.__class__ = AnimationBase
303 _animate.AnimationBase_swigregister(AnimationBasePtr)
304
305 class GIFAnimation(AnimationBase):
306 """Proxy of C++ GIFAnimation class"""
307 def __repr__(self):
308 return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
309 def __init__(self, *args, **kwargs):
310 """__init__(self) -> GIFAnimation"""
311 newobj = _animate.new_GIFAnimation(*args, **kwargs)
312 self.this = newobj.this
313 self.thisown = 1
314 del newobj.thisown
315 def __del__(self, destroy=_animate.delete_GIFAnimation):
316 """__del__(self)"""
317 try:
318 if self.thisown: destroy(self)
319 except: pass
320
321 def GetFrameCount(*args, **kwargs):
322 """GetFrameCount(self) -> int"""
323 return _animate.GIFAnimation_GetFrameCount(*args, **kwargs)
324
325 def GetFrame(*args, **kwargs):
326 """GetFrame(self, int i) -> Image"""
327 return _animate.GIFAnimation_GetFrame(*args, **kwargs)
328
329 def GetDisposalMethod(*args, **kwargs):
330 """GetDisposalMethod(self, int i) -> int"""
331 return _animate.GIFAnimation_GetDisposalMethod(*args, **kwargs)
332
333 def GetFrameRect(*args, **kwargs):
334 """GetFrameRect(self, int i) -> Rect"""
335 return _animate.GIFAnimation_GetFrameRect(*args, **kwargs)
336
337 def GetDelay(*args, **kwargs):
338 """GetDelay(self, int i) -> int"""
339 return _animate.GIFAnimation_GetDelay(*args, **kwargs)
340
341 def GetLogicalScreenSize(*args, **kwargs):
342 """GetLogicalScreenSize(self) -> Size"""
343 return _animate.GIFAnimation_GetLogicalScreenSize(*args, **kwargs)
344
345 def GetBackgroundColour(*args, **kwargs):
346 """GetBackgroundColour(self, Colour col) -> bool"""
347 return _animate.GIFAnimation_GetBackgroundColour(*args, **kwargs)
348
349 def GetTransparentColour(*args, **kwargs):
350 """GetTransparentColour(self, Colour col) -> bool"""
351 return _animate.GIFAnimation_GetTransparentColour(*args, **kwargs)
352
353 def IsValid(*args, **kwargs):
354 """IsValid(self) -> bool"""
355 return _animate.GIFAnimation_IsValid(*args, **kwargs)
356
357 def LoadFile(*args, **kwargs):
358 """LoadFile(self, String filename) -> bool"""
359 return _animate.GIFAnimation_LoadFile(*args, **kwargs)
360
361
362 class GIFAnimationPtr(GIFAnimation):
363 def __init__(self, this):
364 self.this = this
365 if not hasattr(self,"thisown"): self.thisown = 0
366 self.__class__ = GIFAnimation
367 _animate.GIFAnimation_swigregister(GIFAnimationPtr)
368
369 AN_FIT_ANIMATION = _animate.AN_FIT_ANIMATION
370 class GIFAnimationCtrl(_core.Control):
371 """Proxy of C++ GIFAnimationCtrl class"""
372 def __repr__(self):
373 return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
374 def __init__(self, *args, **kwargs):
375 """
376 __init__(self, Window parent, int id=-1, String filename=EmptyString,
377 Point pos=DefaultPosition, Size size=DefaultSize,
378 long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
379 String name=AnimationControlNameStr) -> GIFAnimationCtrl
380 """
381 newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs)
382 self.this = newobj.this
383 self.thisown = 1
384 del newobj.thisown
385 self._setOORInfo(self)
386
387 def Create(*args, **kwargs):
388 """
389 Create(self, Window parent, int id=-1, String filename=EmptyString,
390 Point pos=DefaultPosition, Size size=DefaultSize,
391 long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
392 String name=AnimationControlNameStr) -> bool
393 """
394 return _animate.GIFAnimationCtrl_Create(*args, **kwargs)
395
396 def LoadFile(*args, **kwargs):
397 """LoadFile(self, String filename=EmptyString) -> bool"""
398 return _animate.GIFAnimationCtrl_LoadFile(*args, **kwargs)
399
400 def Play(*args, **kwargs):
401 """Play(self, bool looped=True) -> bool"""
402 return _animate.GIFAnimationCtrl_Play(*args, **kwargs)
403
404 def Stop(*args, **kwargs):
405 """Stop(self)"""
406 return _animate.GIFAnimationCtrl_Stop(*args, **kwargs)
407
408 def FitToAnimation(*args, **kwargs):
409 """FitToAnimation(self)"""
410 return _animate.GIFAnimationCtrl_FitToAnimation(*args, **kwargs)
411
412 def IsPlaying(*args, **kwargs):
413 """IsPlaying(self) -> bool"""
414 return _animate.GIFAnimationCtrl_IsPlaying(*args, **kwargs)
415
416 def GetPlayer(*args, **kwargs):
417 """GetPlayer(self) -> AnimationPlayer"""
418 return _animate.GIFAnimationCtrl_GetPlayer(*args, **kwargs)
419
420 def GetAnimation(*args, **kwargs):
421 """GetAnimation(self) -> AnimationBase"""
422 return _animate.GIFAnimationCtrl_GetAnimation(*args, **kwargs)
423
424 def GetFilename(*args, **kwargs):
425 """GetFilename(self) -> String"""
426 return _animate.GIFAnimationCtrl_GetFilename(*args, **kwargs)
427
428 def SetFilename(*args, **kwargs):
429 """SetFilename(self, String filename)"""
430 return _animate.GIFAnimationCtrl_SetFilename(*args, **kwargs)
431
432
433 class GIFAnimationCtrlPtr(GIFAnimationCtrl):
434 def __init__(self, this):
435 self.this = this
436 if not hasattr(self,"thisown"): self.thisown = 0
437 self.__class__ = GIFAnimationCtrl
438 _animate.GIFAnimationCtrl_swigregister(GIFAnimationCtrlPtr)
439
440 def PreGIFAnimationCtrl(*args, **kwargs):
441 """PreGIFAnimationCtrl() -> GIFAnimationCtrl"""
442 val = _animate.new_PreGIFAnimationCtrl(*args, **kwargs)
443 val.thisown = 1
444 return val
445
446