projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct the direction passed to wxDataObject in wxGTK clipboard code.
[wxWidgets.git]
/
src
/
common
/
mediactrlcmn.cpp
diff --git
a/src/common/mediactrlcmn.cpp
b/src/common/mediactrlcmn.cpp
index ba9d1c0d9bcacef1be9259a1fb6e3392076c4acc..555c6e71e3a28b01d6a1bbca6c7f04d8f4bcd0f9 100644
(file)
--- a/
src/common/mediactrlcmn.cpp
+++ b/
src/common/mediactrlcmn.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/common/mediactrl.cpp
+// Name: src/common/mediactrl
cmn
.cpp
// Purpose: wxMediaCtrl common code
// Author: Ryan Norton <wxprojects@comcast.net>
// Modified by:
// Purpose: wxMediaCtrl common code
// Author: Ryan Norton <wxprojects@comcast.net>
// Modified by:
@@
-12,11
+12,11
@@
// TODO: Platform specific backend defaults?
//===========================================================================
// TODO: Platform specific backend defaults?
//===========================================================================
-// De
fini
tions
+// De
clara
tions
//===========================================================================
//---------------------------------------------------------------------------
//===========================================================================
//---------------------------------------------------------------------------
-//
Pre-compiled header stuff
+//
Includes
//---------------------------------------------------------------------------
#include "wx/wxprec.h"
//---------------------------------------------------------------------------
#include "wx/wxprec.h"
@@
-29,11
+29,9
@@
#ifndef WX_PRECOMP
#include "wx/hash.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/log.h"
#endif
#endif
-//---------------------------------------------------------------------------
-// Includes
-//---------------------------------------------------------------------------
#include "wx/mediactrl.h"
//===========================================================================
#include "wx/mediactrl.h"
//===========================================================================
@@
-47,14
+45,14
@@
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IMPLEMENT_CLASS(wxMediaCtrl, wxControl)
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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)
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 );
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
@@
-109,8
+107,7
@@
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
{
if (!Load(fileName))
{
{
if (!Load(fileName))
{
- delete m_imp;
- m_imp = NULL;
+ wxDELETE(m_imp);
return false;
}
}
return false;
}
}
@@
-126,7
+123,6
@@
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
while((classInfo = NextBackend(&it)) != NULL)
{
while((classInfo = NextBackend(&it)) != NULL)
{
- wxLogMessage( classInfo->GetClassName() );
if(!DoCreate(classInfo, parent, id,
pos, size, style, validator, name))
continue;
if(!DoCreate(classInfo, parent, id,
pos, size, style, validator, name))
continue;
@@
-174,8
+170,7
@@
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
if (!Load(location))
{
if (!Load(location))
{
- delete m_imp;
- m_imp = NULL;
+ wxDELETE(m_imp);
return false;
}
return false;
}
@@
-256,6
+251,7
@@
const wxClassInfo* wxMediaCtrl::NextBackend(wxClassInfo::const_iterator* it)
if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) &&
classInfo != CLASSINFO(wxMediaBackend) )
{
if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) &&
classInfo != CLASSINFO(wxMediaBackend) )
{
+ ++(*it);
return classInfo;
}
}
return classInfo;
}
}
@@
-470,7
+466,7
@@
void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h)
//---------------------------------------------------------------------------
// wxMediaCtrl::MacVisibilityChanged
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// wxMediaCtrl::MacVisibilityChanged
//---------------------------------------------------------------------------
-#ifdef __WX
MAC
__
+#ifdef __WX
OSX_CARBON
__
void wxMediaCtrl::MacVisibilityChanged()
{
wxControl::MacVisibilityChanged();
void wxMediaCtrl::MacVisibilityChanged()
{
wxControl::MacVisibilityChanged();
@@
-514,13
+510,13
@@
bool wxMediaBackendCommonBase::SendStopEvent()
{
wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId());
{
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());
}
void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType)
{
wxMediaEvent theEvent(evtType, m_ctrl->GetId());
- m_ctrl->AddPendingEvent(theEvent);
+ m_ctrl->
GetEventHandler()->
AddPendingEvent(theEvent);
}
void wxMediaBackendCommonBase::QueuePlayEvent()
}
void wxMediaBackendCommonBase::QueuePlayEvent()
@@
-551,7
+547,7
@@
void wxMediaBackendCommonBase::QueueStopEvent()
#ifdef __WXMSW__ // MSW has huge backends so we do it seperately
FORCE_LINK(wxmediabackend_am)
FORCE_LINK(wxmediabackend_wmp10)
#ifdef __WXMSW__ // MSW has huge backends so we do it seperately
FORCE_LINK(wxmediabackend_am)
FORCE_LINK(wxmediabackend_wmp10)
-#el
se
+#el
if !defined(__WXOSX_COCOA__)
FORCE_LINK(basewxmediabackends)
#endif
FORCE_LINK(basewxmediabackends)
#endif