]>
Commit | Line | Data |
---|---|---|
7449af73 | 1 | # This file was created automatically by SWIG 1.3.27. |
8ac8dba0 RD |
2 | # Don't modify this file, modify the SWIG interface instead. |
3 | ||
4 | """ | |
093d3ff1 | 5 | Classes for a media player control |
8ac8dba0 RD |
6 | """ |
7 | ||
8 | import _media | |
9 | ||
093d3ff1 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 | ||
8ac8dba0 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 | |
8ac8dba0 | 61 | class MediaEvent(_core.NotifyEvent): |
093d3ff1 | 62 | """Proxy of C++ MediaEvent class""" |
8ac8dba0 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 | |
8ac8dba0 RD |
83 | |
84 | class MediaCtrl(_core.Control): | |
093d3ff1 | 85 | """Proxy of C++ MediaCtrl class""" |
8ac8dba0 RD |
86 | def __repr__(self): |
87 | return "<%s.%s; proxy of C++ wxMediaCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
88 | def __init__(self, *args, **kwargs): | |
89 | """ | |
90 | __init__(self, Window parent, int id=-1, String fileName=EmptyString, | |
91 | Point pos=DefaultPosition, Size size=DefaultSize, | |
92 | long style=0, String szBackend=EmptyString, | |
93 | Validator validator=DefaultValidator, | |
94 | String name=MediaCtrlNameStr) -> MediaCtrl | |
95 | """ | |
96 | newobj = _media.new_MediaCtrl(*args, **kwargs) | |
97 | self.this = newobj.this | |
98 | self.thisown = 1 | |
99 | del newobj.thisown | |
100 | self._setOORInfo(self) | |
101 | ||
8ac8dba0 RD |
102 | def Create(*args, **kwargs): |
103 | """ | |
104 | Create(self, Window parent, int id=-1, String fileName=EmptyString, | |
105 | Point pos=DefaultPosition, Size size=DefaultSize, | |
106 | long style=0, String szBackend=EmptyString, | |
107 | Validator validator=DefaultValidator, | |
108 | String name=MediaCtrlNameStr) -> bool | |
109 | """ | |
110 | return _media.MediaCtrl_Create(*args, **kwargs) | |
111 | ||
112 | def Play(*args, **kwargs): | |
113 | """Play(self) -> bool""" | |
114 | return _media.MediaCtrl_Play(*args, **kwargs) | |
115 | ||
116 | def Pause(*args, **kwargs): | |
117 | """Pause(self) -> bool""" | |
118 | return _media.MediaCtrl_Pause(*args, **kwargs) | |
119 | ||
120 | def Stop(*args, **kwargs): | |
121 | """Stop(self) -> bool""" | |
122 | return _media.MediaCtrl_Stop(*args, **kwargs) | |
123 | ||
8ac8dba0 RD |
124 | def GetState(*args, **kwargs): |
125 | """GetState(self) -> int""" | |
126 | return _media.MediaCtrl_GetState(*args, **kwargs) | |
127 | ||
128 | def GetPlaybackRate(*args, **kwargs): | |
129 | """GetPlaybackRate(self) -> double""" | |
130 | return _media.MediaCtrl_GetPlaybackRate(*args, **kwargs) | |
131 | ||
132 | def SetPlaybackRate(*args, **kwargs): | |
133 | """SetPlaybackRate(self, double dRate) -> bool""" | |
134 | return _media.MediaCtrl_SetPlaybackRate(*args, **kwargs) | |
135 | ||
093d3ff1 RD |
136 | def Seek(*args, **kwargs): |
137 | """Seek(self, wxFileOffset where, int mode=FromStart) -> wxFileOffset""" | |
138 | return _media.MediaCtrl_Seek(*args, **kwargs) | |
8ac8dba0 | 139 | |
093d3ff1 RD |
140 | def Tell(*args, **kwargs): |
141 | """Tell(self) -> wxFileOffset""" | |
142 | return _media.MediaCtrl_Tell(*args, **kwargs) | |
8ac8dba0 | 143 | |
093d3ff1 RD |
144 | def Length(*args, **kwargs): |
145 | """Length(self) -> wxFileOffset""" | |
146 | return _media.MediaCtrl_Length(*args, **kwargs) | |
8ac8dba0 | 147 | |
9d7dfdff RD |
148 | def GetVolume(*args, **kwargs): |
149 | """GetVolume(self) -> double""" | |
150 | return _media.MediaCtrl_GetVolume(*args, **kwargs) | |
151 | ||
152 | def SetVolume(*args, **kwargs): | |
153 | """SetVolume(self, double dVolume) -> bool""" | |
154 | return _media.MediaCtrl_SetVolume(*args, **kwargs) | |
155 | ||
156 | def ShowPlayerControls(*args, **kwargs): | |
b1fcee84 | 157 | """ShowPlayerControls(self, int flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" |
9d7dfdff RD |
158 | return _media.MediaCtrl_ShowPlayerControls(*args, **kwargs) |
159 | ||
160 | def Load(*args, **kwargs): | |
161 | """Load(self, String fileName) -> bool""" | |
162 | return _media.MediaCtrl_Load(*args, **kwargs) | |
163 | ||
164 | def LoadURI(*args, **kwargs): | |
165 | """LoadURI(self, String fileName) -> bool""" | |
166 | return _media.MediaCtrl_LoadURI(*args, **kwargs) | |
167 | ||
168 | def LoadURIWithProxy(*args, **kwargs): | |
169 | """LoadURIWithProxy(self, String fileName, String proxy) -> bool""" | |
170 | return _media.MediaCtrl_LoadURIWithProxy(*args, **kwargs) | |
171 | ||
172 | LoadFromURI = LoadURI | |
8ac8dba0 RD |
173 | |
174 | class MediaCtrlPtr(MediaCtrl): | |
175 | def __init__(self, this): | |
176 | self.this = this | |
177 | if not hasattr(self,"thisown"): self.thisown = 0 | |
178 | self.__class__ = MediaCtrl | |
179 | _media.MediaCtrl_swigregister(MediaCtrlPtr) | |
180 | MediaCtrlNameStr = cvar.MediaCtrlNameStr | |
181 | ||
182 | def PreMediaCtrl(*args, **kwargs): | |
183 | """PreMediaCtrl() -> MediaCtrl""" | |
184 | val = _media.new_PreMediaCtrl(*args, **kwargs) | |
185 | val.thisown = 1 | |
186 | return val | |
187 | ||
8ac8dba0 RD |
188 | wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED |
189 | wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP | |
7449af73 | 190 | wxEVT_MEDIA_LOADED = _media.wxEVT_MEDIA_LOADED |
8ac8dba0 RD |
191 | EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) |
192 | EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) | |
7449af73 RD |
193 | EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) |
194 | ||
8ac8dba0 RD |
195 | |
196 |