1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _media.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/mediactrl.h> 13#include <wx/uri.h> 14#if !wxUSE_MEDIACTRL 15class wxMediaCtrl; 16class wxMediaEvent; 17 18enum wxMediaState { 19 wxMEDIASTATE_STOPPED, 20 wxMEDIASTATE_PAUSED, 21 wxMEDIASTATE_PLAYING, 22}; 23 24enum wxMediaCtrlPlayerControls { 25 wxMEDIACTRLPLAYERCONTROLS_NONE, 26 wxMEDIACTRLPLAYERCONTROLS_STEP, 27 wxMEDIACTRLPLAYERCONTROLS_VOLUME, 28 wxMEDIACTRLPLAYERCONTROLS_DEFAULT, 29}; 30extern wxEventType wxEVT_MEDIA_LOADED; 31extern wxEventType wxEVT_MEDIA_STOP; 32extern wxEventType wxEVT_MEDIA_FINISHED; 33extern wxEventType wxEVT_MEDIA_STATECHANGED; 34extern wxEventType wxEVT_MEDIA_PLAY; 35extern wxEventType wxEVT_MEDIA_PAUSE; 36 37class wxMediaCtrl : public wxControl { 38public: 39 wxMediaCtrl() 40 { wxPyRaiseNotImplemented(); } 41 42 wxMediaCtrl(wxWindow *parent, wxWindowID id, const wxString &fileName=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &szBackend=wxEmptyString, const wxValidator &validator=wxDefaultValidator, const wxString &name="mediaCtrl") 43 { wxPyRaiseNotImplemented(); } 44 45 bool Create(wxWindow *parent, wxWindowID id, const wxString &fileName=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &szBackend=wxEmptyString, const wxValidator &validator=wxDefaultValidator, const wxString &name="mediaCtrl") 46 { return false; } 47 48 wxSize GetBestSize() const 49 { return wxDefaultSize; } 50 51 double GetPlaybackRate() 52 { return 0.0; } 53 54 wxMediaState GetState() 55 { return wxMEDIASTATE_STOPPED; } 56 57 double GetVolume() 58 { return 0.0; } 59 60 wxFileOffset Length() 61 { return 0; } 62 63 bool Load(const wxString &fileName) 64 { return false; } 65 66 bool Load(const wxURI &uri) 67 { return false; } 68 69 bool Load(const wxURI &uri, const wxURI &proxy) 70 { return false; } 71 72 bool LoadURI(const wxString &uri) 73 { return false; } 74 75 bool LoadURIWithProxy(const wxString &uri, const wxString &proxy) 76 { return false; } 77 78 bool Pause() 79 { return false; } 80 81 bool Play() 82 { return false; } 83 84 wxFileOffset Seek(wxFileOffset where, wxSeekMode mode=wxFromStart) 85 { return 0; } 86 87 bool SetPlaybackRate(double dRate) 88 { return false; } 89 90 bool SetVolume(double dVolume) 91 { return false; } 92 93 bool ShowPlayerControls(wxMediaCtrlPlayerControls flags=wxMEDIACTRLPLAYERCONTROLS_DEFAULT) 94 { return false; } 95 96 bool Stop() 97 { return false; } 98 99 wxFileOffset Tell() 100 { return 0; } 101 102}; 103 104class wxMediaEvent : public wxNotifyEvent { 105public: 106 wxMediaEvent(wxEventType commandType=wxEVT_NULL, int winid=0) 107 { wxPyRaiseNotImplemented(); } 108 109}; 110#endif //!wxUSE_MEDIACTRL 111 112%End 113 114%ModuleCode 115#if !wxUSE_MEDIACTRL 116wxEventType wxEVT_MEDIA_LOADED; 117wxEventType wxEVT_MEDIA_STOP; 118wxEventType wxEVT_MEDIA_FINISHED; 119wxEventType wxEVT_MEDIA_STATECHANGED; 120wxEventType wxEVT_MEDIA_PLAY; 121wxEventType wxEVT_MEDIA_PAUSE; 122#endif //!wxUSE_MEDIACTRL 123 124%End 125 126//--------------------------------------------------------------------------- 127 128enum wxMediaState 129{ 130 wxMEDIASTATE_STOPPED, 131 wxMEDIASTATE_PAUSED, 132 wxMEDIASTATE_PLAYING 133}; 134 135enum wxMediaCtrlPlayerControls 136{ 137 wxMEDIACTRLPLAYERCONTROLS_NONE, 138 wxMEDIACTRLPLAYERCONTROLS_STEP, 139 wxMEDIACTRLPLAYERCONTROLS_VOLUME, 140 wxMEDIACTRLPLAYERCONTROLS_DEFAULT 141}; 142 143wxEventType wxEVT_MEDIA_LOADED /PyName=wxEVT_MEDIA_LOADED/; 144 145wxEventType wxEVT_MEDIA_STOP /PyName=wxEVT_MEDIA_STOP/; 146 147wxEventType wxEVT_MEDIA_FINISHED /PyName=wxEVT_MEDIA_FINISHED/; 148 149wxEventType wxEVT_MEDIA_STATECHANGED /PyName=wxEVT_MEDIA_STATECHANGED/; 150 151wxEventType wxEVT_MEDIA_PLAY /PyName=wxEVT_MEDIA_PLAY/; 152 153wxEventType wxEVT_MEDIA_PAUSE /PyName=wxEVT_MEDIA_PAUSE/; 154 155class wxMediaCtrl : wxControl 156{ 157 %Docstring 158 MediaCtrl() 159 MediaCtrl(parent, id=-1, fileName=wx.EmptyString, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, szBackend=wx.EmptyString, validator=wx.DefaultValidator, name="mediaCtrl") 160 161 wxMediaCtrl is a class for displaying types of media, such as videos, 162 audio files, natively through native codecs. 163 %End 164 %TypeHeaderCode 165 #include <wx/mediactrl.h> 166 %End 167 168public: 169 wxMediaCtrl(); 170 171 wxMediaCtrl( 172 wxWindow * parent, 173 wxWindowID id = -1, 174 const wxString & fileName = wxEmptyString, 175 const wxPoint & pos = wxDefaultPosition, 176 const wxSize & size = wxDefaultSize, 177 long style = 0, 178 const wxString & szBackend = wxEmptyString, 179 const wxValidator & validator = wxDefaultValidator, 180 const wxString & name = "mediaCtrl" 181 ); 182 183 bool Create( 184 wxWindow * parent, 185 wxWindowID id = -1, 186 const wxString & fileName = wxEmptyString, 187 const wxPoint & pos = wxDefaultPosition, 188 const wxSize & size = wxDefaultSize, 189 long style = 0, 190 const wxString & szBackend = wxEmptyString, 191 const wxValidator & validator = wxDefaultValidator, 192 const wxString & name = "mediaCtrl" 193 ); 194 %Docstring 195 Create(parent, id=-1, fileName=wx.EmptyString, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, szBackend=wx.EmptyString, validator=wx.DefaultValidator, name="mediaCtrl") -> bool 196 197 Creates this control. 198 %End 199 200 wxSize GetBestSize() const; 201 %Docstring 202 GetBestSize() -> wx.Size 203 204 Obtains the best size relative to the original/natural size of the 205 video, if there is any. 206 %End 207 208 double GetPlaybackRate(); 209 %Docstring 210 GetPlaybackRate() -> double 211 212 Obtains the playback rate, or speed of the media. 213 %End 214 215 wxMediaState GetState(); 216 %Docstring 217 GetState() -> MediaState 218 219 Obtains the state the playback of the media is in. 220 %End 221 222 double GetVolume(); 223 %Docstring 224 GetVolume() -> double 225 226 Gets the volume of the media from a 0.0 to 1.0 range. 227 %End 228 229 wxFileOffset Length(); 230 %Docstring 231 Length() -> FileOffset 232 233 Obtains the length - the total amount of time the movie has in 234 milliseconds. 235 %End 236 237 bool Load( 238 const wxString & fileName 239 ); 240 %Docstring 241 Load(fileName) -> bool 242 243 Loads the file that fileName refers to. 244 %End 245 246 bool LoadURI( 247 const wxString & uri 248 ); 249 %Docstring 250 LoadURI(uri) -> bool 251 252 Loads the location that uri refers to. 253 %End 254 255 bool LoadURIWithProxy( 256 const wxString & uri, 257 const wxString & proxy 258 ); 259 %Docstring 260 LoadURIWithProxy(uri, proxy) -> bool 261 262 Loads the location that uri refers to with the proxy proxy. 263 %End 264 265 bool Pause(); 266 %Docstring 267 Pause() -> bool 268 269 Pauses playback of the movie. 270 %End 271 272 bool Play(); 273 %Docstring 274 Play() -> bool 275 276 Resumes playback of the movie. 277 %End 278 279 wxFileOffset Seek( 280 wxFileOffset where, 281 wxSeekMode mode = wxFromStart 282 ); 283 %Docstring 284 Seek(where, mode=wx.FromStart) -> FileOffset 285 286 Seeks to a position within the movie. 287 %End 288 289 bool SetPlaybackRate( 290 double dRate 291 ); 292 %Docstring 293 SetPlaybackRate(dRate) -> bool 294 295 Sets the playback rate, or speed of the media, to that referred by 296 dRate. 297 %End 298 299 bool SetVolume( 300 double dVolume 301 ); 302 %Docstring 303 SetVolume(dVolume) -> bool 304 305 Sets the volume of the media from a 0.0 to 1.0 range to that referred 306 by dVolume. 307 %End 308 309 bool ShowPlayerControls( 310 wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT 311 ); 312 %Docstring 313 ShowPlayerControls(flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool 314 315 A special feature to wxMediaCtrl. 316 %End 317 318 bool Stop(); 319 %Docstring 320 Stop() -> bool 321 322 Stops the media. 323 %End 324 325 wxFileOffset Tell(); 326 %Docstring 327 Tell() -> FileOffset 328 329 Obtains the current position in time within the movie in milliseconds. 330 %End 331 332 private: 333 wxMediaCtrl(const wxMediaCtrl&); 334 335 336 public: 337 338 339 %Property(name=BestSize, get=GetBestSize) 340 %Property(name=PlaybackRate, get=GetPlaybackRate, set=SetPlaybackRate) 341 %Property(name=State, get=GetState) 342 %Property(name=Volume, get=GetVolume, set=SetVolume) 343}; // end of class wxMediaCtrl 344 345 346class wxMediaEvent : wxNotifyEvent 347{ 348 %Docstring 349 MediaEvent(commandType=wx.wxEVT_NULL, winid=0) 350 351 Event wxMediaCtrl uses. 352 %End 353 %TypeHeaderCode 354 #include <wx/mediactrl.h> 355 %End 356 357public: 358 wxMediaEvent( 359 wxEventType commandType = wxEVT_NULL, 360 int winid = 0 361 ); 362 363 public: 364 virtual wxEvent* Clone() const /Factory/; 365 366 367 private: 368 wxMediaEvent& operator=(const wxMediaEvent&); 369 370 371}; // end of class wxMediaEvent 372 373 374const int wxUSE_MEDIACTRL; 375%Extract(id=pycode_media) 376EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED ) 377EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP ) 378EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED ) 379EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED ) 380EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY ) 381EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE ) 382 383%End 384 385%Extract(id=pycode_media) 386MEDIABACKEND_DIRECTSHOW = "wxAMMediaBackend" 387MEDIABACKEND_MCI = "wxMCIMediaBackend" 388MEDIABACKEND_QUICKTIME = "wxQTMediaBackend" 389MEDIABACKEND_GSTREAMER = "wxGStreamerMediaBackend" 390MEDIABACKEND_REALPLAYER = "wxRealPlayerMediaBackend" 391MEDIABACKEND_WMP10 = "wxWMP10MediaBackend" 392 393%End 394 395 396//--------------------------------------------------------------------------- 397 398