X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bc036010973de6b66905a58bfa79b21f3b98cfa2..eba99da4c0563e6508761272a1e1f1b791d0af6b:/include/wx/mediactrl.h diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index 44eaa37c1c..3791a7e26b 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -26,9 +26,12 @@ #pragma interface "mediactrl.h" #endif +#include "wx/defs.h" + // ---------------------------------------------------------------------------- // Compilation guard // ---------------------------------------------------------------------------- + #if wxUSE_MEDIACTRL // ---------------------------------------------------------------------------- @@ -179,10 +182,10 @@ public: wxFileOffset Length(); //FIXME: This should be const // - // Unofficial parts of API + // Unofficial parts of API // //DirectShow/GStreamer only. Quicktime too, but somewhat buggy... - bool Load(const wxURI& location); + bool Load(const wxURI& location); double GetPlaybackRate(); //All but MCI & GStreamer bool SetPlaybackRate(double dRate); //All but MCI & GStreamer @@ -257,7 +260,7 @@ public: int WXUNUSED(w), int WXUNUSED(h)) { } virtual wxSize GetVideoSize() const - { return wxSize(); } + { return wxSize(0,0); } virtual double GetPlaybackRate() { return 0.0; } @@ -281,9 +284,12 @@ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STOP, wxMEDIA_STO //Function type(s) our events need typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&); +#define wxMediaEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMediaEventFunction, &func) + //Macro for usage with message maps -#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ), -#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ), +#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), +#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), // ---------------------------------------------------------------------------- // End compilation gaurd