X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70eca0fa29a1ba70695a42ba103070a69bfe926d..0b83552acf359689c43d641175f7292391f6a9e6:/src/common/mediactrlcmn.cpp?ds=sidebyside diff --git a/src/common/mediactrlcmn.cpp b/src/common/mediactrlcmn.cpp index 8812a48efc..15a67c9067 100644 --- a/src/common/mediactrlcmn.cpp +++ b/src/common/mediactrlcmn.cpp @@ -45,14 +45,14 @@ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IMPLEMENT_CLASS(wxMediaCtrl, wxControl) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_STATECHANGED) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_PLAY) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_PAUSE) +wxDEFINE_EVENT( wxEVT_MEDIA_STATECHANGED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_PLAY, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_PAUSE, wxMediaEvent ); IMPLEMENT_CLASS(wxMediaBackend, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_FINISHED) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_LOADED) -DEFINE_EVENT_TYPE(wxEVT_MEDIA_STOP) +wxDEFINE_EVENT( wxEVT_MEDIA_FINISHED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_LOADED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_STOP, wxMediaEvent ); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // @@ -254,6 +254,7 @@ const wxClassInfo* wxMediaCtrl::NextBackend(wxClassInfo::const_iterator* it) if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) && classInfo != CLASSINFO(wxMediaBackend) ) { + ++(*it); return classInfo; } } @@ -468,7 +469,7 @@ void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h) //--------------------------------------------------------------------------- // wxMediaCtrl::MacVisibilityChanged //--------------------------------------------------------------------------- -#ifdef __WXMAC__ +#ifdef __WXOSX_CARBON__ void wxMediaCtrl::MacVisibilityChanged() { wxControl::MacVisibilityChanged(); @@ -512,13 +513,13 @@ bool wxMediaBackendCommonBase::SendStopEvent() { wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId()); - return !m_ctrl->ProcessEvent(theEvent) || theEvent.IsAllowed(); + return !m_ctrl->GetEventHandler()->ProcessEvent(theEvent) || theEvent.IsAllowed(); } void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType) { wxMediaEvent theEvent(evtType, m_ctrl->GetId()); - m_ctrl->AddPendingEvent(theEvent); + m_ctrl->GetEventHandler()->AddPendingEvent(theEvent); } void wxMediaBackendCommonBase::QueuePlayEvent() @@ -549,7 +550,7 @@ void wxMediaBackendCommonBase::QueueStopEvent() #ifdef __WXMSW__ // MSW has huge backends so we do it seperately FORCE_LINK(wxmediabackend_am) FORCE_LINK(wxmediabackend_wmp10) -#else +#elif !defined(__WXOSX_COCOA__) FORCE_LINK(basewxmediabackends) #endif