X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/256c055e88a61dac1cffadaeb7b302494e7bfc31..f78e4942ec0f3f6abd2992502e2d6c5c2e8e55f6:/wxPython/src/media.i diff --git a/wxPython/src/media.i b/wxPython/src/media.i index bb5471677f..d5a210f47a 100644 --- a/wxPython/src/media.i +++ b/wxPython/src/media.i @@ -11,7 +11,7 @@ ///////////////////////////////////////////////////////////////////////////// %define DOCSTRING -"Classes for a medai player control" +"Classes for a media player control" %enddef %module(package="wx", docstring=DOCSTRING) media @@ -22,6 +22,7 @@ #include "wx/wxPython/pyclasses.h" #include +#include %} //---------------------------------------------------------------------- @@ -54,15 +55,11 @@ enum wxMediaState wxMEDIASTATE_PLAYING=0 }; -enum wxMediaTimeFormat -{ - wxMEDIATIMEFORMAT_TIME=0 -}; -class WXDLLIMPEXP_MEDIA wxMediaEvent : public wxNotifyEvent +class wxMediaEvent : public wxNotifyEvent { public: - wxMediaEvent(wxEventTypL, int ) { wxPyRaiseNotImplemented(); } + wxMediaEvent(wxEventType, int ) { wxPyRaiseNotImplemented(); } }; class wxMediaCtrl : public wxControl @@ -79,15 +76,15 @@ public: const wxValidator& , const wxString& ) { wxPyRaiseNotImplemented(); } - wxMediaCtrl(wxWindow* , - wxWindowID , - const wxURI& , - const wxPoint&, - const wxSize& . - long style, - const wxString& , - const wxValidator& , - const wxString& ) { wxPyRaiseNotImplemented(); } +// wxMediaCtrl(wxWindow* , +// wxWindowID , +// const wxURI& , +// const wxPoint&, +// const wxSize& , +// long style, +// const wxString& , +// const wxValidator& , +// const wxString& ) { wxPyRaiseNotImplemented(); } bool Create(wxWindow* , wxWindowID , const wxString& , @@ -98,15 +95,15 @@ public: const wxValidator& , const wxString& ) { return false; } - bool Create(wxWindow* , - wxWindowID , - const wxURI& , - const wxPoint&, - const wxSize& . - long style, - const wxString& , - const wxValidator& , - const wxString& ) { return false; } +// bool Create(wxWindow* , +// wxWindowID , +// const wxURI& , +// const wxPoint&, +// const wxSize& , +// long style, +// const wxString& , +// const wxValidator& , +// const wxString& ) { return false; } bool Play() { return false; } bool Pause() { return false; } @@ -120,13 +117,19 @@ public: wxMediaState GetState() { return wxMEDIASTATE_STOPPED; } - double GetPlaybackRate() { return 0.0; }; + double GetPlaybackRate() { return 0.0; } bool SetPlaybackRate(double dRate) { return false; } - bool SetPosition(wxLongLong where) { return false; } - wxLongLong GetPosition() { return 0; } - wxLongLong GetDuration() { return 0; } + wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart) + { return 0; } + + wxFileOffset Tell() { return 0; } + wxFileOffset Length() { return 0; } }; + +const wxEventType wxEVT_MEDIA_FINISHED = 0; +const wxEventType wxEVT_MEDIA_STOP = 0; + #endif %} @@ -141,15 +144,11 @@ enum wxMediaState wxMEDIASTATE_PLAYING }; -enum wxMediaTimeFormat -{ - wxMEDIATIMEFORMAT_TIME -}; -MAKE_CONST_WXSTRING(MEDIABACKEND_DIRECTSHOW); -MAKE_CONST_WXSTRING(MEDIABACKEND_MCI ); -MAKE_CONST_WXSTRING(MEDIABACKEND_QUICKTIME ); +// MAKE_CONST_WXSTRING(MEDIABACKEND_DIRECTSHOW); +// MAKE_CONST_WXSTRING(MEDIABACKEND_MCI ); +// MAKE_CONST_WXSTRING(MEDIABACKEND_QUICKTIME ); //--------------------------------------------------------------------------- @@ -163,7 +162,7 @@ public: //--------------------------------------------------------------------------- MAKE_CONST_WXSTRING_NOSWIG(EmptyString); -MAKE_CONST_WXSTRING2(MediaCtrlNameStr, "mediaCtrl"); +MAKE_CONST_WXSTRING2(MediaCtrlNameStr, wxT("mediaCtrl")); MustHaveApp(wxMediaCtrl); @@ -174,7 +173,8 @@ public: %pythonAppend wxMediaCtrl() "" - wxMediaCtrl(wxWindow* parent, wxWindowID id=-1, + wxMediaCtrl(wxWindow* parent, + wxWindowID id=-1, const wxString& fileName = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -183,39 +183,42 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyMediaCtrlNameStr); - %name(PreMediaCtrl) wxMediaCtrl(); - - %extend { - %name(MediaCtrlFromURI) - wxMediaCtrl(wxWindow* parent, wxWindowID id=-1, - const wxString& location=wxPyEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& szBackend = wxPyEmptyString, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPyMediaCtrlNameStr) - { - return new wxMediaCtrl(parent, id, wxURI(location), - pos, size, style, szBackend, validator, name); - } - - bool CreateFromURI(wxWindow* parent, wxWindowID id=-1, - const wxString& location=wxPyEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& szBackend = wxPyEmptyString, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPyMediaCtrlNameStr) - { - return self->Create(parent, id, wxURI(location), - pos, size, style, szBackend, validator, name); - } - } - - - bool Create(wxWindow* parent, wxWindowID id=-1, + %RenameCtor(PreMediaCtrl, wxMediaCtrl()); + +// %extend { +// %RenameCtor(MediaCtrlFromURI, +// wxMediaCtrl(wxWindow* parent, +// wxWindowID id=-1, +// const wxString& location=wxPyEmptyString, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, +// long style = 0, +// const wxString& szBackend = wxPyEmptyString, +// const wxValidator& validator = wxDefaultValidator, +// const wxString& name = wxPyMediaCtrlNameStr)) +// { +// return new wxMediaCtrl(parent, id, wxURI(location), +// pos, size, style, szBackend, validator, name); +// } + +// bool CreateFromURI(wxWindow* parent, +// wxWindowID id=-1, +// const wxString& location=wxPyEmptyString, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, +// long style = 0, +// const wxString& szBackend = wxPyEmptyString, +// const wxValidator& validator = wxDefaultValidator, +// const wxString& name = wxPyMediaCtrlNameStr) +// { +// return self->Create(parent, id, wxURI(location), +// pos, size, style, szBackend, validator, name); +// } +// } + + + bool Create(wxWindow* parent, + wxWindowID id=-1, const wxString& fileName = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -244,9 +247,9 @@ public: double GetPlaybackRate(); bool SetPlaybackRate(double dRate); - bool SetPosition(wxLongLong where); - wxLongLong GetPosition(); - wxLongLong GetDuration(); + wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart); + wxFileOffset Tell(); + wxFileOffset Length(); };