]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/media.py
Version
[wxWidgets.git] / wxPython / src / gtk / media.py
CommitLineData
8ac8dba0
RD
1# This file was created automatically by SWIG.
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
8ac8dba0 57class MediaEvent(_core.NotifyEvent):
093d3ff1 58 """Proxy of C++ MediaEvent class"""
8ac8dba0
RD
59 def __repr__(self):
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
65 self.thisown = 1
66 del newobj.thisown
67
68class MediaEventPtr(MediaEvent):
69 def __init__(self, this):
70 self.this = this
71 if not hasattr(self,"thisown"): self.thisown = 0
72 self.__class__ = MediaEvent
73_media.MediaEvent_swigregister(MediaEventPtr)
74
75class MediaCtrl(_core.Control):
093d3ff1 76 """Proxy of C++ MediaCtrl class"""
8ac8dba0
RD
77 def __repr__(self):
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):
80 """
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
86 """
87 newobj = _media.new_MediaCtrl(*args, **kwargs)
88 self.this = newobj.this
89 self.thisown = 1
90 del newobj.thisown
91 self._setOORInfo(self)
92
8ac8dba0
RD
93 def Create(*args, **kwargs):
94 """
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
100 """
101 return _media.MediaCtrl_Create(*args, **kwargs)
102
103 def Play(*args, **kwargs):
104 """Play(self) -> bool"""
105 return _media.MediaCtrl_Play(*args, **kwargs)
106
107 def Pause(*args, **kwargs):
108 """Pause(self) -> bool"""
109 return _media.MediaCtrl_Pause(*args, **kwargs)
110
111 def Stop(*args, **kwargs):
112 """Stop(self) -> bool"""
113 return _media.MediaCtrl_Stop(*args, **kwargs)
114
115 def Load(*args, **kwargs):
116 """Load(self, String fileName) -> bool"""
117 return _media.MediaCtrl_Load(*args, **kwargs)
118
119 def LoadFromURI(*args, **kwargs):
120 """LoadFromURI(self, String location) -> bool"""
121 return _media.MediaCtrl_LoadFromURI(*args, **kwargs)
122
123 def Loop(*args, **kwargs):
124 """Loop(self, bool bLoop=True)"""
125 return _media.MediaCtrl_Loop(*args, **kwargs)
126
127 def IsLooped(*args, **kwargs):
128 """IsLooped(self) -> bool"""
129 return _media.MediaCtrl_IsLooped(*args, **kwargs)
130
131 def GetState(*args, **kwargs):
132 """GetState(self) -> int"""
133 return _media.MediaCtrl_GetState(*args, **kwargs)
134
135 def GetPlaybackRate(*args, **kwargs):
136 """GetPlaybackRate(self) -> double"""
137 return _media.MediaCtrl_GetPlaybackRate(*args, **kwargs)
138
139 def SetPlaybackRate(*args, **kwargs):
140 """SetPlaybackRate(self, double dRate) -> bool"""
141 return _media.MediaCtrl_SetPlaybackRate(*args, **kwargs)
142
689b42ee
RD
143 def Seek(*args, **kwargs):
144 """Seek(self, wxFileOffset where, int mode=FromStart) -> wxFileOffset"""
145 return _media.MediaCtrl_Seek(*args, **kwargs)
8ac8dba0 146
689b42ee
RD
147 def Tell(*args, **kwargs):
148 """Tell(self) -> wxFileOffset"""
149 return _media.MediaCtrl_Tell(*args, **kwargs)
8ac8dba0 150
689b42ee
RD
151 def Length(*args, **kwargs):
152 """Length(self) -> wxFileOffset"""
153 return _media.MediaCtrl_Length(*args, **kwargs)
8ac8dba0
RD
154
155
156class MediaCtrlPtr(MediaCtrl):
157 def __init__(self, this):
158 self.this = this
159 if not hasattr(self,"thisown"): self.thisown = 0
160 self.__class__ = MediaCtrl
161_media.MediaCtrl_swigregister(MediaCtrlPtr)
162cvar = _media.cvar
163MediaCtrlNameStr = cvar.MediaCtrlNameStr
164
165def PreMediaCtrl(*args, **kwargs):
166 """PreMediaCtrl() -> MediaCtrl"""
167 val = _media.new_PreMediaCtrl(*args, **kwargs)
168 val.thisown = 1
169 return val
170
8ac8dba0
RD
171wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED
172wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP
173EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1)
174EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1)
175
176