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