]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/lib/flashwin.py
1 #----------------------------------------------------------------------
2 # Name: wx.lib.flashwin
3 # Purpose: A class that allows the use of the Shockwave Flash
8 # Created: 22-March-2004
10 # Copyright: (c) 2004 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------
13 # This module was generated by the wx.activex.GernerateAXModule class
14 # (See also the genaxmodule script.)
19 clsID
= '{D27CDB6E-AE6D-11CF-96B8-444553540000}'
20 progID
= 'ShockwaveFlash.ShockwaveFlash.1'
24 # Create eventTypes and event binders
25 wxEVT_ReadyStateChange
= wx
.activex
.RegisterActiveXEvent('OnReadyStateChange')
26 wxEVT_Progress
= wx
.activex
.RegisterActiveXEvent('OnProgress')
27 wxEVT_FSCommand
= wx
.activex
.RegisterActiveXEvent('FSCommand')
29 EVT_ReadyStateChange
= wx
.PyEventBinder(wxEVT_ReadyStateChange
, 1)
30 EVT_Progress
= wx
.PyEventBinder(wxEVT_Progress
, 1)
31 EVT_FSCommand
= wx
.PyEventBinder(wxEVT_FSCommand
, 1)
34 # Derive a new class from ActiveXWindow
35 class FlashWindow(wx
.activex
.ActiveXWindow
):
36 def __init__(self
, parent
, ID
=-1, pos
=wx
.DefaultPosition
,
37 size
=wx
.DefaultSize
, style
=0, name
='FlashWindow'):
38 wx
.activex
.ActiveXWindow
.__init
__(self
, parent
,
39 wx
.activex
.CLSID('{D27CDB6E-AE6D-11CF-96B8-444553540000}'),
40 ID
, pos
, size
, style
, name
)
42 # Methods exported by the ActiveX object
43 def QueryInterface(self
, riid
):
44 return self
.CallAXMethod('QueryInterface', riid
)
47 return self
.CallAXMethod('AddRef')
50 return self
.CallAXMethod('Release')
52 def GetTypeInfoCount(self
):
53 return self
.CallAXMethod('GetTypeInfoCount')
55 def GetTypeInfo(self
, itinfo
, lcid
):
56 return self
.CallAXMethod('GetTypeInfo', itinfo
, lcid
)
58 def GetIDsOfNames(self
, riid
, rgszNames
, cNames
, lcid
):
59 return self
.CallAXMethod('GetIDsOfNames', riid
, rgszNames
, cNames
, lcid
)
61 def Invoke(self
, dispidMember
, riid
, lcid
, wFlags
, pdispparams
):
62 return self
.CallAXMethod('Invoke', dispidMember
, riid
, lcid
, wFlags
, pdispparams
)
64 def SetZoomRect(self
, left
, top
, right
, bottom
):
65 return self
.CallAXMethod('SetZoomRect', left
, top
, right
, bottom
)
67 def Zoom(self
, factor
):
68 return self
.CallAXMethod('Zoom', factor
)
70 def Pan(self
, x
, y
, mode
):
71 return self
.CallAXMethod('Pan', x
, y
, mode
)
74 return self
.CallAXMethod('Play')
77 return self
.CallAXMethod('Stop')
80 return self
.CallAXMethod('Back')
83 return self
.CallAXMethod('Forward')
86 return self
.CallAXMethod('Rewind')
89 return self
.CallAXMethod('StopPlay')
91 def GotoFrame(self
, FrameNum
):
92 return self
.CallAXMethod('GotoFrame', FrameNum
)
94 def CurrentFrame(self
):
95 return self
.CallAXMethod('CurrentFrame')
98 return self
.CallAXMethod('IsPlaying')
100 def PercentLoaded(self
):
101 return self
.CallAXMethod('PercentLoaded')
103 def FrameLoaded(self
, FrameNum
):
104 return self
.CallAXMethod('FrameLoaded', FrameNum
)
106 def FlashVersion(self
):
107 return self
.CallAXMethod('FlashVersion')
109 def LoadMovie(self
, layer
, url
):
110 return self
.CallAXMethod('LoadMovie', layer
, url
)
112 def TGotoFrame(self
, target
, FrameNum
):
113 return self
.CallAXMethod('TGotoFrame', target
, FrameNum
)
115 def TGotoLabel(self
, target
, label
):
116 return self
.CallAXMethod('TGotoLabel', target
, label
)
118 def TCurrentFrame(self
, target
):
119 return self
.CallAXMethod('TCurrentFrame', target
)
121 def TCurrentLabel(self
, target
):
122 return self
.CallAXMethod('TCurrentLabel', target
)
124 def TPlay(self
, target
):
125 return self
.CallAXMethod('TPlay', target
)
127 def TStopPlay(self
, target
):
128 return self
.CallAXMethod('TStopPlay', target
)
130 def SetVariable(self
, name
, value
):
131 return self
.CallAXMethod('SetVariable', name
, value
)
133 def GetVariable(self
, name
):
134 return self
.CallAXMethod('GetVariable', name
)
136 def TSetProperty(self
, target
, property, value
):
137 return self
.CallAXMethod('TSetProperty', target
, property, value
)
139 def TGetProperty(self
, target
, property):
140 return self
.CallAXMethod('TGetProperty', target
, property)
142 def TCallFrame(self
, target
, FrameNum
):
143 return self
.CallAXMethod('TCallFrame', target
, FrameNum
)
145 def TCallLabel(self
, target
, label
):
146 return self
.CallAXMethod('TCallLabel', target
, label
)
148 def TSetPropertyNum(self
, target
, property, value
):
149 return self
.CallAXMethod('TSetPropertyNum', target
, property, value
)
151 def TGetPropertyNum(self
, target
, property):
152 return self
.CallAXMethod('TGetPropertyNum', target
, property)
154 def TGetPropertyAsNumber(self
, target
, property):
155 return self
.CallAXMethod('TGetPropertyAsNumber', target
, property)
157 # Getters, Setters and properties
158 def _get_ReadyState(self
):
159 return self
.GetAXProp('ReadyState')
160 readystate
= property(_get_ReadyState
, None)
162 def _get_TotalFrames(self
):
163 return self
.GetAXProp('TotalFrames')
164 totalframes
= property(_get_TotalFrames
, None)
166 def _get_Playing(self
):
167 return self
.GetAXProp('Playing')
168 def _set_Playing(self
, Playing
):
169 self
.SetAXProp('Playing', Playing
)
170 playing
= property(_get_Playing
, _set_Playing
)
172 def _get_Quality(self
):
173 return self
.GetAXProp('Quality')
174 def _set_Quality(self
, Quality
):
175 self
.SetAXProp('Quality', Quality
)
176 quality
= property(_get_Quality
, _set_Quality
)
178 def _get_ScaleMode(self
):
179 return self
.GetAXProp('ScaleMode')
180 def _set_ScaleMode(self
, ScaleMode
):
181 self
.SetAXProp('ScaleMode', ScaleMode
)
182 scalemode
= property(_get_ScaleMode
, _set_ScaleMode
)
184 def _get_AlignMode(self
):
185 return self
.GetAXProp('AlignMode')
186 def _set_AlignMode(self
, AlignMode
):
187 self
.SetAXProp('AlignMode', AlignMode
)
188 alignmode
= property(_get_AlignMode
, _set_AlignMode
)
190 def _get_BackgroundColor(self
):
191 return self
.GetAXProp('BackgroundColor')
192 def _set_BackgroundColor(self
, BackgroundColor
):
193 self
.SetAXProp('BackgroundColor', BackgroundColor
)
194 backgroundcolor
= property(_get_BackgroundColor
, _set_BackgroundColor
)
197 return self
.GetAXProp('Loop')
198 def _set_Loop(self
, Loop
):
199 self
.SetAXProp('Loop', Loop
)
200 loop
= property(_get_Loop
, _set_Loop
)
202 def _get_Movie(self
):
203 return self
.GetAXProp('Movie')
204 def _set_Movie(self
, Movie
):
205 self
.SetAXProp('Movie', Movie
)
206 movie
= property(_get_Movie
, _set_Movie
)
208 def _get_FrameNum(self
):
209 return self
.GetAXProp('FrameNum')
210 def _set_FrameNum(self
, FrameNum
):
211 self
.SetAXProp('FrameNum', FrameNum
)
212 framenum
= property(_get_FrameNum
, _set_FrameNum
)
214 def _get_WMode(self
):
215 return self
.GetAXProp('WMode')
216 def _set_WMode(self
, WMode
):
217 self
.SetAXProp('WMode', WMode
)
218 wmode
= property(_get_WMode
, _set_WMode
)
220 def _get_SAlign(self
):
221 return self
.GetAXProp('SAlign')
222 def _set_SAlign(self
, SAlign
):
223 self
.SetAXProp('SAlign', SAlign
)
224 salign
= property(_get_SAlign
, _set_SAlign
)
227 return self
.GetAXProp('Menu')
228 def _set_Menu(self
, Menu
):
229 self
.SetAXProp('Menu', Menu
)
230 menu
= property(_get_Menu
, _set_Menu
)
233 return self
.GetAXProp('Base')
234 def _set_Base(self
, Base
):
235 self
.SetAXProp('Base', Base
)
236 base
= property(_get_Base
, _set_Base
)
238 def _get_Scale(self
):
239 return self
.GetAXProp('Scale')
240 def _set_Scale(self
, Scale
):
241 self
.SetAXProp('Scale', Scale
)
242 scale
= property(_get_Scale
, _set_Scale
)
244 def _get_DeviceFont(self
):
245 return self
.GetAXProp('DeviceFont')
246 def _set_DeviceFont(self
, DeviceFont
):
247 self
.SetAXProp('DeviceFont', DeviceFont
)
248 devicefont
= property(_get_DeviceFont
, _set_DeviceFont
)
250 def _get_EmbedMovie(self
):
251 return self
.GetAXProp('EmbedMovie')
252 def _set_EmbedMovie(self
, EmbedMovie
):
253 self
.SetAXProp('EmbedMovie', EmbedMovie
)
254 embedmovie
= property(_get_EmbedMovie
, _set_EmbedMovie
)
256 def _get_BGColor(self
):
257 return self
.GetAXProp('BGColor')
258 def _set_BGColor(self
, BGColor
):
259 self
.SetAXProp('BGColor', BGColor
)
260 bgcolor
= property(_get_BGColor
, _set_BGColor
)
262 def _get_Quality2(self
):
263 return self
.GetAXProp('Quality2')
264 def _set_Quality2(self
, Quality2
):
265 self
.SetAXProp('Quality2', Quality2
)
266 quality2
= property(_get_Quality2
, _set_Quality2
)
268 def _get_SWRemote(self
):
269 return self
.GetAXProp('SWRemote')
270 def _set_SWRemote(self
, SWRemote
):
271 self
.SetAXProp('SWRemote', SWRemote
)
272 swremote
= property(_get_SWRemote
, _set_SWRemote
)
274 def _get_FlashVars(self
):
275 return self
.GetAXProp('FlashVars')
276 def _set_FlashVars(self
, FlashVars
):
277 self
.SetAXProp('FlashVars', FlashVars
)
278 flashvars
= property(_get_FlashVars
, _set_FlashVars
)
280 def _get_AllowScriptAccess(self
):
281 return self
.GetAXProp('AllowScriptAccess')
282 def _set_AllowScriptAccess(self
, AllowScriptAccess
):
283 self
.SetAXProp('AllowScriptAccess', AllowScriptAccess
)
284 allowscriptaccess
= property(_get_AllowScriptAccess
, _set_AllowScriptAccess
)
286 def _get_MovieData(self
):
287 return self
.GetAXProp('MovieData')
288 def _set_MovieData(self
, MovieData
):
289 self
.SetAXProp('MovieData', MovieData
)
290 moviedata
= property(_get_MovieData
, _set_MovieData
)
294 # --------------------
296 # type:int arg:VT_EMPTY canGet:True canSet:False
299 # type:int arg:VT_EMPTY canGet:True canSet:False
302 # type:bool arg:bool canGet:True canSet:True
305 # type:int arg:int canGet:True canSet:True
308 # type:int arg:int canGet:True canSet:True
311 # type:int arg:int canGet:True canSet:True
314 # type:int arg:int canGet:True canSet:True
317 # type:bool arg:bool canGet:True canSet:True
320 # type:string arg:string canGet:True canSet:True
323 # type:int arg:int canGet:True canSet:True
326 # type:string arg:string canGet:True canSet:True
329 # type:string arg:string canGet:True canSet:True
332 # type:bool arg:bool canGet:True canSet:True
335 # type:string arg:string canGet:True canSet:True
338 # type:string arg:string canGet:True canSet:True
341 # type:bool arg:bool canGet:True canSet:True
344 # type:bool arg:bool canGet:True canSet:True
347 # type:string arg:string canGet:True canSet:True
350 # type:string arg:string canGet:True canSet:True
353 # type:string arg:string canGet:True canSet:True
356 # type:string arg:string canGet:True canSet:True
359 # type:string arg:string canGet:True canSet:True
362 # type:string arg:string canGet:True canSet:True
368 # --------------------
373 # in:True out:False optional:False type:unsupported type 29
375 # in:False out:True optional:False type:unsupported type 26
387 # in:False out:True optional:False type:int
393 # in:True out:False optional:False type:int
395 # in:True out:False optional:False type:int
397 # in:False out:True optional:False type:unsupported type 26
403 # in:True out:False optional:False type:unsupported type 29
405 # in:True out:False optional:False type:unsupported type 26
407 # in:True out:False optional:False type:int
409 # in:True out:False optional:False type:int
411 # in:False out:True optional:False type:int
417 # in:True out:False optional:False type:int
419 # in:True out:False optional:False type:unsupported type 29
421 # in:True out:False optional:False type:int
423 # in:True out:False optional:False type:int
425 # in:True out:False optional:False type:unsupported type 29
427 # in:False out:True optional:False type:VT_VARIANT
429 # in:False out:True optional:False type:unsupported type 29
431 # in:False out:True optional:False type:int
437 # in:True out:False optional:False type:int
439 # in:True out:False optional:False type:int
441 # in:True out:False optional:False type:int
443 # in:True out:False optional:False type:int
449 # in:True out:False optional:False type:int
455 # in:True out:False optional:False type:int
457 # in:True out:False optional:False type:int
459 # in:True out:False optional:False type:int
483 # in:True out:False optional:False type:int
498 # in:True out:False optional:False type:int
507 # in:True out:False optional:False type:int
509 # in:True out:False optional:False type:string
515 # in:True out:False optional:False type:string
517 # in:True out:False optional:False type:int
523 # in:True out:False optional:False type:string
525 # in:True out:False optional:False type:string
531 # in:True out:False optional:False type:string
537 # in:True out:False optional:False type:string
543 # in:True out:False optional:False type:string
549 # in:True out:False optional:False type:string
555 # in:True out:False optional:False type:string
557 # in:True out:False optional:False type:string
563 # in:True out:False optional:False type:string
569 # in:True out:False optional:False type:string
571 # in:True out:False optional:False type:int
573 # in:True out:False optional:False type:string
579 # in:True out:False optional:False type:string
581 # in:True out:False optional:False type:int
587 # in:True out:False optional:False type:string
589 # in:True out:False optional:False type:int
595 # in:True out:False optional:False type:string
597 # in:True out:False optional:False type:string
603 # in:True out:False optional:False type:string
605 # in:True out:False optional:False type:int
607 # in:True out:False optional:False type:double
613 # in:True out:False optional:False type:string
615 # in:True out:False optional:False type:int
617 # TGetPropertyAsNumber
621 # in:True out:False optional:False type:string
623 # in:True out:False optional:False type:int
629 # --------------------
634 # in:False out:False optional:False type:int
640 # in:False out:False optional:False type:int
646 # in:True out:False optional:False type:string
648 # in:True out:False optional:False type:string