]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/media.py
log wxChoice events in the same format as wxComboBox ones to make it simpler to compa...
[wxWidgets.git] / wxPython / src / gtk / media.py
CommitLineData
32fe5131 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"""
689b42ee 5Classes for a media player control
8ac8dba0
RD
6"""
7
8import _media
9
093d3ff1
RD
10def _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
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):
28 method = class_type.__swig_getmethods__.get(name,None)
29 if method: return method(self)
30 raise AttributeError,name
31
32import types
33try:
34 _object = types.ObjectType
35 _newclass = 1
36except AttributeError:
37 class _object : pass
38 _newclass = 0
39del types
40
41
42def _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
51import _core
52wx = _core
53__docfilter__ = wx.__DocFilter(globals())
54MEDIASTATE_STOPPED = _media.MEDIASTATE_STOPPED
55MEDIASTATE_PAUSED = _media.MEDIASTATE_PAUSED
56MEDIASTATE_PLAYING = _media.MEDIASTATE_PLAYING
b1fcee84
RD
57MEDIACTRLPLAYERCONTROLS_NONE = _media.MEDIACTRLPLAYERCONTROLS_NONE
58MEDIACTRLPLAYERCONTROLS_STEP = _media.MEDIACTRLPLAYERCONTROLS_STEP
59MEDIACTRLPLAYERCONTROLS_VOLUME = _media.MEDIACTRLPLAYERCONTROLS_VOLUME
60MEDIACTRLPLAYERCONTROLS_DEFAULT = _media.MEDIACTRLPLAYERCONTROLS_DEFAULT
8ac8dba0 61class 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
72class 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
78cvar = _media.cvar
79MEDIABACKEND_DIRECTSHOW = cvar.MEDIABACKEND_DIRECTSHOW
80MEDIABACKEND_MCI = cvar.MEDIABACKEND_MCI
81MEDIABACKEND_QUICKTIME = cvar.MEDIABACKEND_QUICKTIME
82MEDIABACKEND_GSTREAMER = cvar.MEDIABACKEND_GSTREAMER
83MEDIABACKEND_REALPLAYER = cvar.MEDIABACKEND_REALPLAYER
84MEDIABACKEND_WMP10 = cvar.MEDIABACKEND_WMP10
8ac8dba0
RD
85
86class MediaCtrl(_core.Control):
093d3ff1 87 """Proxy of C++ MediaCtrl class"""
8ac8dba0
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
8ac8dba0
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
8ac8dba0
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
689b42ee
RD
138 def Seek(*args, **kwargs):
139 """Seek(self, wxFileOffset where, int mode=FromStart) -> wxFileOffset"""
140 return _media.MediaCtrl_Seek(*args, **kwargs)
8ac8dba0 141
689b42ee
RD
142 def Tell(*args, **kwargs):
143 """Tell(self) -> wxFileOffset"""
144 return _media.MediaCtrl_Tell(*args, **kwargs)
8ac8dba0 145
689b42ee
RD
146 def Length(*args, **kwargs):
147 """Length(self) -> wxFileOffset"""
148 return _media.MediaCtrl_Length(*args, **kwargs)
8ac8dba0 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
8ac8dba0
RD
183
184class 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)
8ac8dba0
RD
190MediaCtrlNameStr = cvar.MediaCtrlNameStr
191
192def PreMediaCtrl(*args, **kwargs):
193 """PreMediaCtrl() -> MediaCtrl"""
194 val = _media.new_PreMediaCtrl(*args, **kwargs)
195 val.thisown = 1
196 return val
197
8ac8dba0
RD
198wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED
199wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP
32fe5131 200wxEVT_MEDIA_LOADED = _media.wxEVT_MEDIA_LOADED
b1fcee84
RD
201wxEVT_MEDIA_STATECHANGED = _media.wxEVT_MEDIA_STATECHANGED
202wxEVT_MEDIA_PLAY = _media.wxEVT_MEDIA_PLAY
203wxEVT_MEDIA_PAUSE = _media.wxEVT_MEDIA_PAUSE
204EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1)
205EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1)
206EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1)
207EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED, 1)
208EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY, 1)
209EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE, 1)
32fe5131 210
8ac8dba0
RD
211
212