]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/media.py
1 # This file was created automatically by SWIG 1.3.27.
2 # Don't modify this file, modify the SWIG interface instead.
5 Classes for a media player control
10 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
12 if isinstance(value
, class_type
):
13 self
.__dict
__[name
] = value
.this
14 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
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
22 raise AttributeError("You cannot add attributes to %s" % self
)
24 def _swig_setattr(self
,class_type
,name
,value
):
25 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
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
34 _object
= types
.ObjectType
36 except AttributeError:
42 def _swig_setattr_nondynamic_method(set):
43 def set_attr(self
,name
,value
):
44 if hasattr(self
,name
) or (name
in ("this", "thisown")):
47 raise AttributeError("You cannot add attributes to %s" % self
)
53 __docfilter__
= wx
.__DocFilter
(globals())
54 MEDIASTATE_STOPPED
= _media
.MEDIASTATE_STOPPED
55 MEDIASTATE_PAUSED
= _media
.MEDIASTATE_PAUSED
56 MEDIASTATE_PLAYING
= _media
.MEDIASTATE_PLAYING
57 class MediaEvent(_core
.NotifyEvent
):
58 """Proxy of C++ MediaEvent class"""
60 return "<%s.%s; proxy of C++ wxMediaEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
61 def __init__(self
, *args
, **kwargs
):
62 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> MediaEvent"""
63 newobj
= _media
.new_MediaEvent(*args
, **kwargs
)
64 self
.this
= newobj
.this
68 class MediaEventPtr(MediaEvent
):
69 def __init__(self
, this
):
71 if not hasattr(self
,"thisown"): self
.thisown
= 0
72 self
.__class
__ = MediaEvent
73 _media
.MediaEvent_swigregister(MediaEventPtr
)
75 class MediaCtrl(_core
.Control
):
76 """Proxy of C++ MediaCtrl class"""
78 return "<%s.%s; proxy of C++ wxMediaCtrl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
79 def __init__(self
, *args
, **kwargs
):
81 __init__(self, Window parent, int id=-1, String fileName=EmptyString,
82 Point pos=DefaultPosition, Size size=DefaultSize,
83 long style=0, String szBackend=EmptyString,
84 Validator validator=DefaultValidator,
85 String name=MediaCtrlNameStr) -> MediaCtrl
87 newobj
= _media
.new_MediaCtrl(*args
, **kwargs
)
88 self
.this
= newobj
.this
91 self
._setOORInfo
(self
)
93 def Create(*args
, **kwargs
):
95 Create(self, Window parent, int id=-1, String fileName=EmptyString,
96 Point pos=DefaultPosition, Size size=DefaultSize,
97 long style=0, String szBackend=EmptyString,
98 Validator validator=DefaultValidator,
99 String name=MediaCtrlNameStr) -> bool
101 return _media
.MediaCtrl_Create(*args
, **kwargs
)
103 def Play(*args
, **kwargs
):
104 """Play(self) -> bool"""
105 return _media
.MediaCtrl_Play(*args
, **kwargs
)
107 def Pause(*args
, **kwargs
):
108 """Pause(self) -> bool"""
109 return _media
.MediaCtrl_Pause(*args
, **kwargs
)
111 def Stop(*args
, **kwargs
):
112 """Stop(self) -> bool"""
113 return _media
.MediaCtrl_Stop(*args
, **kwargs
)
115 def GetState(*args
, **kwargs
):
116 """GetState(self) -> int"""
117 return _media
.MediaCtrl_GetState(*args
, **kwargs
)
119 def GetPlaybackRate(*args
, **kwargs
):
120 """GetPlaybackRate(self) -> double"""
121 return _media
.MediaCtrl_GetPlaybackRate(*args
, **kwargs
)
123 def SetPlaybackRate(*args
, **kwargs
):
124 """SetPlaybackRate(self, double dRate) -> bool"""
125 return _media
.MediaCtrl_SetPlaybackRate(*args
, **kwargs
)
127 def Seek(*args
, **kwargs
):
128 """Seek(self, wxFileOffset where, int mode=FromStart) -> wxFileOffset"""
129 return _media
.MediaCtrl_Seek(*args
, **kwargs
)
131 def Tell(*args
, **kwargs
):
132 """Tell(self) -> wxFileOffset"""
133 return _media
.MediaCtrl_Tell(*args
, **kwargs
)
135 def Length(*args
, **kwargs
):
136 """Length(self) -> wxFileOffset"""
137 return _media
.MediaCtrl_Length(*args
, **kwargs
)
139 def GetVolume(*args
, **kwargs
):
140 """GetVolume(self) -> double"""
141 return _media
.MediaCtrl_GetVolume(*args
, **kwargs
)
143 def SetVolume(*args
, **kwargs
):
144 """SetVolume(self, double dVolume) -> bool"""
145 return _media
.MediaCtrl_SetVolume(*args
, **kwargs
)
147 def ShowPlayerControls(*args
, **kwargs
):
148 """ShowPlayerControls(self, wxMediaCtrlPlayerControls flags=wxMEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool"""
149 return _media
.MediaCtrl_ShowPlayerControls(*args
, **kwargs
)
151 def Load(*args
, **kwargs
):
152 """Load(self, String fileName) -> bool"""
153 return _media
.MediaCtrl_Load(*args
, **kwargs
)
155 def LoadURI(*args
, **kwargs
):
156 """LoadURI(self, String fileName) -> bool"""
157 return _media
.MediaCtrl_LoadURI(*args
, **kwargs
)
159 def LoadURIWithProxy(*args
, **kwargs
):
160 """LoadURIWithProxy(self, String fileName, String proxy) -> bool"""
161 return _media
.MediaCtrl_LoadURIWithProxy(*args
, **kwargs
)
163 LoadFromURI
= LoadURI
165 class MediaCtrlPtr(MediaCtrl
):
166 def __init__(self
, this
):
168 if not hasattr(self
,"thisown"): self
.thisown
= 0
169 self
.__class
__ = MediaCtrl
170 _media
.MediaCtrl_swigregister(MediaCtrlPtr
)
172 MediaCtrlNameStr
= cvar
.MediaCtrlNameStr
174 def PreMediaCtrl(*args
, **kwargs
):
175 """PreMediaCtrl() -> MediaCtrl"""
176 val
= _media
.new_PreMediaCtrl(*args
, **kwargs
)
180 wxEVT_MEDIA_FINISHED
= _media
.wxEVT_MEDIA_FINISHED
181 wxEVT_MEDIA_STOP
= _media
.wxEVT_MEDIA_STOP
182 wxEVT_MEDIA_LOADED
= _media
.wxEVT_MEDIA_LOADED
183 EVT_MEDIA_FINISHED
= wx
.PyEventBinder( wxEVT_MEDIA_FINISHED
, 1)
184 EVT_MEDIA_STOP
= wx
.PyEventBinder( wxEVT_MEDIA_STOP
, 1)
185 EVT_MEDIA_LOADED
= wx
.PyEventBinder( wxEVT_MEDIA_LOADED
, 1)