X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5191fbd2b543de54aede153c2c6f8dee29119d1..1d54b9d29706dbb43de5624bdf4a2aaa74b2350b:/include/wx/mediactrl.h diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index fbd3fe2c5c..89ab6d9f15 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -326,6 +326,7 @@ public: DECLARE_DYNAMIC_CLASS(wxMediaBackend) }; + //Event ID to give to our events #define wxMEDIA_FINISHED_ID 13000 #define wxMEDIA_STOP_ID 13001 @@ -350,6 +351,34 @@ typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&); # define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), #endif +// ---------------------------------------------------------------------------- +// common backend base class used by many other backends +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_MEDIA wxMediaBackendCommonBase : public wxMediaBackend +{ +public: + // add a pending wxMediaEvent of the given type + void QueueEvent(wxEventType evtType); + + // notify that the movie playback is finished + void QueueFinishEvent() { QueueEvent(wxEVT_MEDIA_FINISHED); } + + // send the stop event and return true if it hasn't been vetoed + bool SendStopEvent(); + +protected: + // call this when the movie size has changed but not because it has just + // been loaded (in this case, call NotifyMovieLoaded() below) + void NotifyMovieSizeChanged(); + + // call this when the movie is fully loaded + void NotifyMovieLoaded(); + + + wxMediaCtrl *m_ctrl; // parent control +}; + // ---------------------------------------------------------------------------- // End compilation gaurd // ----------------------------------------------------------------------------