]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/media.i
Blind fixes for warnings in wxTinderbox.
[wxWidgets.git] / wxPython / src / media.i
index 642663b2ae0bcee12c673be6fad378d847ac8465..d0f300f2763eea2c1118e0b74a191a66ab128a49 100644 (file)
@@ -55,7 +55,15 @@ enum wxMediaState
     wxMEDIASTATE_PLAYING=0
 };
 
+enum wxMediaCtrlPlayerControls
+{
+    wxMEDIACTRLPLAYERCONTROLS_NONE,
+    wxMEDIACTRLPLAYERCONTROLS_STEP,
+    wxMEDIACTRLPLAYERCONTROLS_VOLUME,
+    wxMEDIACTRLPLAYERCONTROLS_DEFAULT
+};
 
+    
 class wxMediaEvent : public wxNotifyEvent
 {
 public:
@@ -65,7 +73,7 @@ public:
 class wxMediaCtrl : public wxControl
 {
 public:
-      wxMediaCtrl()    { wxPyRaiseNotImplemented(); }
+    wxMediaCtrl()    { wxPyRaiseNotImplemented(); }
 
     wxMediaCtrl(wxWindow* , wxWindowID ,
                 const wxString& ,
@@ -76,16 +84,6 @@ public:
                 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& ,
                 const wxPoint& ,
@@ -95,26 +93,10 @@ 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 Play() { return false; }
     bool Pause() { return false; }
     bool Stop() { return false; }
 
-    bool Load(const wxString& fileName) { return false; }
-    bool Load(const wxURI& location) { return false; }
-
-    void Loop(bool bLoop = true) {}
-    bool IsLooped() { return false; }
-
     wxMediaState GetState() { return wxMEDIASTATE_STOPPED; }
 
     double GetPlaybackRate()  { return 0.0; }
@@ -125,10 +107,22 @@ public:
     
     wxFileOffset Tell()    { return 0; }
     wxFileOffset Length()    { return 0; }
+
+    double GetVolume() { return 0.0; }
+    bool   SetVolume(double dVolume) { return false; }
+
+    bool    ShowPlayerControls(
+        wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT)
+        { return false; }
+
+    bool Load(const wxString& fileName) { return false; }
+    bool LoadURI(const wxString& fileName) { return false; }
+    bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) { return false; }
 };
 
 const wxEventType wxEVT_MEDIA_FINISHED = 0;
 const wxEventType wxEVT_MEDIA_STOP = 0;
+const wxEventType wxEVT_MEDIA_LOADED = 0;
 
 #endif
 %}
@@ -183,39 +177,7 @@ 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);
-//         }
-//     }
-
+    %RenameCtor(PreMediaCtrl,  wxMediaCtrl());
 
     bool Create(wxWindow* parent,
                 wxWindowID id=-1,
@@ -232,16 +194,6 @@ public:
     bool Pause();
     bool Stop();
 
-    bool Load(const wxString& fileName);
-    %extend {
-        bool LoadFromURI(const wxString& location) {
-            return self->Load(wxURI(location));
-        }
-    }
-
-    void Loop(bool bLoop = true);
-    bool IsLooped();
-
     wxMediaState GetState();
 
     double GetPlaybackRate();
@@ -250,16 +202,29 @@ public:
     wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart);    
     wxFileOffset Tell();
     wxFileOffset Length();
+
+    double GetVolume();
+    bool   SetVolume(double dVolume);
+
+    bool    ShowPlayerControls(
+        wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT);
+
+    bool Load(const wxString& fileName);
+    bool LoadURI(const wxString& fileName);
+    bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy);
+    %pythoncode { LoadFromURI = LoadURI }
 };
 
 
 
 %constant wxEventType wxEVT_MEDIA_FINISHED;
 %constant wxEventType wxEVT_MEDIA_STOP;
+%constant wxEventType wxEVT_MEDIA_LOADED;
 
 %pythoncode {
 EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1)
 EVT_MEDIA_STOP     = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1)
+EVT_MEDIA_LOADED   = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1)    
 }    
 
 //---------------------------------------------------------------------------