]>
Commit | Line | Data |
---|---|---|
32fe5131 | 1 | # This file was created automatically by SWIG 1.3.27. |
6e0de3df RD |
2 | # Don't modify this file, modify the SWIG interface instead. |
3 | ||
4 | """ | |
36ed4f51 | 5 | Classes for a media player control |
6e0de3df RD |
6 | """ |
7 | ||
8 | import _media | |
9 | ||
36ed4f51 RD |
10 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
11 | if (name == "this"): | |
12 | if isinstance(value, class_type): | |
13 | self.__dict__[name] = value.this | |
14 | if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown | |
15 | del value.thisown | |
16 | return | |
17 | method = class_type.__swig_setmethods__.get(name,None) | |
18 | if method: return method(self,value) | |
19 | if (not static) or hasattr(self,name) or (name == "thisown"): | |
20 | self.__dict__[name] = value | |
21 | else: | |
22 | raise AttributeError("You cannot add attributes to %s" % self) | |
23 | ||
24 | def _swig_setattr(self,class_type,name,value): | |
25 | return _swig_setattr_nondynamic(self,class_type,name,value,0) | |
26 | ||
27 | def _swig_getattr(self,class_type,name): | |
28 | method = class_type.__swig_getmethods__.get(name,None) | |
29 | if method: return method(self) | |
30 | raise AttributeError,name | |
31 | ||
32 | import types | |
33 | try: | |
34 | _object = types.ObjectType | |
35 | _newclass = 1 | |
36 | except AttributeError: | |
37 | class _object : pass | |
38 | _newclass = 0 | |
39 | del types | |
40 | ||
41 | ||
42 | def _swig_setattr_nondynamic_method(set): | |
43 | def set_attr(self,name,value): | |
44 | if hasattr(self,name) or (name in ("this", "thisown")): | |
45 | set(self,name,value) | |
46 | else: | |
47 | raise AttributeError("You cannot add attributes to %s" % self) | |
48 | return set_attr | |
49 | ||
50 | ||
6e0de3df RD |
51 | import _core |
52 | wx = _core | |
53 | __docfilter__ = wx.__DocFilter(globals()) | |
54 | MEDIASTATE_STOPPED = _media.MEDIASTATE_STOPPED | |
55 | MEDIASTATE_PAUSED = _media.MEDIASTATE_PAUSED | |
56 | MEDIASTATE_PLAYING = _media.MEDIASTATE_PLAYING | |
b1fcee84 RD |
57 | MEDIACTRLPLAYERCONTROLS_NONE = _media.MEDIACTRLPLAYERCONTROLS_NONE |
58 | MEDIACTRLPLAYERCONTROLS_STEP = _media.MEDIACTRLPLAYERCONTROLS_STEP | |
59 | MEDIACTRLPLAYERCONTROLS_VOLUME = _media.MEDIACTRLPLAYERCONTROLS_VOLUME | |
60 | MEDIACTRLPLAYERCONTROLS_DEFAULT = _media.MEDIACTRLPLAYERCONTROLS_DEFAULT | |
6e0de3df | 61 | class MediaEvent(_core.NotifyEvent): |
36ed4f51 | 62 | """Proxy of C++ MediaEvent class""" |
6e0de3df RD |
63 | def __repr__(self): |
64 | return "<%s.%s; proxy of C++ wxMediaEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
65 | def __init__(self, *args, **kwargs): | |
66 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> MediaEvent""" | |
67 | newobj = _media.new_MediaEvent(*args, **kwargs) | |
68 | self.this = newobj.this | |
69 | self.thisown = 1 | |
70 | del newobj.thisown | |
71 | ||
72 | class MediaEventPtr(MediaEvent): | |
73 | def __init__(self, this): | |
74 | self.this = this | |
75 | if not hasattr(self,"thisown"): self.thisown = 0 | |
76 | self.__class__ = MediaEvent | |
77 | _media.MediaEvent_swigregister(MediaEventPtr) | |
b1fcee84 RD |
78 | cvar = _media.cvar |
79 | MEDIABACKEND_DIRECTSHOW = cvar.MEDIABACKEND_DIRECTSHOW | |
80 | MEDIABACKEND_MCI = cvar.MEDIABACKEND_MCI | |
81 | MEDIABACKEND_QUICKTIME = cvar.MEDIABACKEND_QUICKTIME | |
82 | MEDIABACKEND_GSTREAMER = cvar.MEDIABACKEND_GSTREAMER | |
83 | MEDIABACKEND_REALPLAYER = cvar.MEDIABACKEND_REALPLAYER | |
84 | MEDIABACKEND_WMP10 = cvar.MEDIABACKEND_WMP10 | |
6e0de3df RD |
85 | |
86 | class MediaCtrl(_core.Control): | |
36ed4f51 | 87 | """Proxy of C++ MediaCtrl class""" |
6e0de3df RD |
88 | def __repr__(self): |
89 | return "<%s.%s; proxy of C++ wxMediaCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
90 | def __init__(self, *args, **kwargs): | |
91 | """ | |
92 | __init__(self, Window parent, int id=-1, String fileName=EmptyString, | |
93 | Point pos=DefaultPosition, Size size=DefaultSize, | |
94 | long style=0, String szBackend=EmptyString, | |
95 | Validator validator=DefaultValidator, | |
96 | String name=MediaCtrlNameStr) -> MediaCtrl | |
97 | """ | |
98 | newobj = _media.new_MediaCtrl(*args, **kwargs) | |
99 | self.this = newobj.this | |
100 | self.thisown = 1 | |
101 | del newobj.thisown | |
102 | self._setOORInfo(self) | |
103 | ||
6e0de3df RD |
104 | def Create(*args, **kwargs): |
105 | """ | |
106 | Create(self, Window parent, int id=-1, String fileName=EmptyString, | |
107 | Point pos=DefaultPosition, Size size=DefaultSize, | |
108 | long style=0, String szBackend=EmptyString, | |
109 | Validator validator=DefaultValidator, | |
110 | String name=MediaCtrlNameStr) -> bool | |
111 | """ | |
112 | return _media.MediaCtrl_Create(*args, **kwargs) | |
113 | ||
114 | def Play(*args, **kwargs): | |
115 | """Play(self) -> bool""" | |
116 | return _media.MediaCtrl_Play(*args, **kwargs) | |
117 | ||
118 | def Pause(*args, **kwargs): | |
119 | """Pause(self) -> bool""" | |
120 | return _media.MediaCtrl_Pause(*args, **kwargs) | |
121 | ||
122 | def Stop(*args, **kwargs): | |
123 | """Stop(self) -> bool""" | |
124 | return _media.MediaCtrl_Stop(*args, **kwargs) | |
125 | ||
6e0de3df RD |
126 | def GetState(*args, **kwargs): |
127 | """GetState(self) -> int""" | |
128 | return _media.MediaCtrl_GetState(*args, **kwargs) | |
129 | ||
130 | def GetPlaybackRate(*args, **kwargs): | |
131 | """GetPlaybackRate(self) -> double""" | |
132 | return _media.MediaCtrl_GetPlaybackRate(*args, **kwargs) | |
133 | ||
134 | def SetPlaybackRate(*args, **kwargs): | |
135 | """SetPlaybackRate(self, double dRate) -> bool""" | |
136 | return _media.MediaCtrl_SetPlaybackRate(*args, **kwargs) | |
137 | ||
36ed4f51 RD |
138 | def Seek(*args, **kwargs): |
139 | """Seek(self, wxFileOffset where, int mode=FromStart) -> wxFileOffset""" | |
140 | return _media.MediaCtrl_Seek(*args, **kwargs) | |
6e0de3df | 141 | |
36ed4f51 RD |
142 | def Tell(*args, **kwargs): |
143 | """Tell(self) -> wxFileOffset""" | |
144 | return _media.MediaCtrl_Tell(*args, **kwargs) | |
6e0de3df | 145 | |
36ed4f51 RD |
146 | def Length(*args, **kwargs): |
147 | """Length(self) -> wxFileOffset""" | |
148 | return _media.MediaCtrl_Length(*args, **kwargs) | |
6e0de3df | 149 | |
943e8dfd RD |
150 | def GetVolume(*args, **kwargs): |
151 | """GetVolume(self) -> double""" | |
152 | return _media.MediaCtrl_GetVolume(*args, **kwargs) | |
153 | ||
154 | def SetVolume(*args, **kwargs): | |
155 | """SetVolume(self, double dVolume) -> bool""" | |
156 | return _media.MediaCtrl_SetVolume(*args, **kwargs) | |
157 | ||
158 | def ShowPlayerControls(*args, **kwargs): | |
b1fcee84 | 159 | """ShowPlayerControls(self, int flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" |
943e8dfd RD |
160 | return _media.MediaCtrl_ShowPlayerControls(*args, **kwargs) |
161 | ||
162 | def Load(*args, **kwargs): | |
163 | """Load(self, String fileName) -> bool""" | |
164 | return _media.MediaCtrl_Load(*args, **kwargs) | |
165 | ||
166 | def LoadURI(*args, **kwargs): | |
167 | """LoadURI(self, String fileName) -> bool""" | |
168 | return _media.MediaCtrl_LoadURI(*args, **kwargs) | |
169 | ||
170 | def LoadURIWithProxy(*args, **kwargs): | |
171 | """LoadURIWithProxy(self, String fileName, String proxy) -> bool""" | |
172 | return _media.MediaCtrl_LoadURIWithProxy(*args, **kwargs) | |
173 | ||
174 | LoadFromURI = LoadURI | |
b1fcee84 RD |
175 | def GetDownloadProgress(*args, **kwargs): |
176 | """GetDownloadProgress(self) -> wxFileOffset""" | |
177 | return _media.MediaCtrl_GetDownloadProgress(*args, **kwargs) | |
178 | ||
179 | def GetDownloadTotal(*args, **kwargs): | |
180 | """GetDownloadTotal(self) -> wxFileOffset""" | |
181 | return _media.MediaCtrl_GetDownloadTotal(*args, **kwargs) | |
182 | ||
6e0de3df RD |
183 | |
184 | class MediaCtrlPtr(MediaCtrl): | |
185 | def __init__(self, this): | |
186 | self.this = this | |
187 | if not hasattr(self,"thisown"): self.thisown = 0 | |
188 | self.__class__ = MediaCtrl | |
189 | _media.MediaCtrl_swigregister(MediaCtrlPtr) | |
6e0de3df RD |
190 | MediaCtrlNameStr = cvar.MediaCtrlNameStr |
191 | ||
192 | def PreMediaCtrl(*args, **kwargs): | |
193 | """PreMediaCtrl() -> MediaCtrl""" | |
194 | val = _media.new_PreMediaCtrl(*args, **kwargs) | |
195 | val.thisown = 1 | |
196 | return val | |
197 | ||
6e0de3df RD |
198 | wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED |
199 | wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP | |
32fe5131 | 200 | wxEVT_MEDIA_LOADED = _media.wxEVT_MEDIA_LOADED |
b1fcee84 RD |
201 | wxEVT_MEDIA_STATECHANGED = _media.wxEVT_MEDIA_STATECHANGED |
202 | wxEVT_MEDIA_PLAY = _media.wxEVT_MEDIA_PLAY | |
203 | wxEVT_MEDIA_PAUSE = _media.wxEVT_MEDIA_PAUSE | |
204 | EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) | |
205 | EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) | |
206 | EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) | |
207 | EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED, 1) | |
208 | EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY, 1) | |
209 | EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE, 1) | |
32fe5131 | 210 | |
6e0de3df RD |
211 | |
212 |