From ff2b312fc82a30843500494235f93272d8846dc5 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Tue, 23 Nov 2004 12:46:51 +0000 Subject: [PATCH] dll fixes for media lib git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dlimpexp.h | 8 ++++++++ include/wx/mediactrl.h | 10 +++++----- src/common/mediactrlcmn.cpp | 4 ++-- src/mac/carbon/mediactrl.cpp | 2 +- src/msw/mediactrl.cpp | 6 +++--- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index fd823a5144..b2f24e348a 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -186,6 +186,14 @@ # define WXDLLIMPEXP_XRC #endif +#ifdef WXMAKINGDLL_MEDIA +# define WXDLLIMPEXP_MEDIA WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_MEDIA WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_MEDIA +#endif + /* for backwards compatibility, define suffix-less versions too */ #define WXDLLEXPORT WXDLLIMPEXP_CORE #define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index 54b0573eac..0001daa6a7 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -70,7 +70,7 @@ enum wxMediaTimeFormat // // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMediaEvent : public wxNotifyEvent +class WXDLLIMPEXP_MEDIA wxMediaEvent : public wxNotifyEvent { public: // ------------------------------------------------------------------------ @@ -111,7 +111,7 @@ public: // // ---------------------------------------------------------------------------- -class wxMediaCtrl : public wxControl +class WXDLLIMPEXP_MEDIA wxMediaCtrl : public wxControl { public: wxMediaCtrl() : m_imp(NULL), m_bLoaded(false), m_bLoop(false) @@ -211,7 +211,7 @@ protected: // // ---------------------------------------------------------------------------- -class wxMediaBackend : public wxObject +class WXDLLIMPEXP_MEDIA wxMediaBackend : public wxObject { public: wxMediaBackend() @@ -270,8 +270,8 @@ public: #define wxMEDIA_STOP_ID 13001 //Define our event types - we need to call DEFINE_EVENT_TYPE(EVT) later -DECLARE_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID) -DECLARE_EVENT_TYPE(wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID) +DECLARE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID) +DECLARE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID) //Function type(s) our events need typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&); diff --git a/src/common/mediactrlcmn.cpp b/src/common/mediactrlcmn.cpp index 3d91560123..6cc8e5865e 100644 --- a/src/common/mediactrlcmn.cpp +++ b/src/common/mediactrlcmn.cpp @@ -51,8 +51,8 @@ IMPLEMENT_CLASS(wxMediaCtrl, wxControl); IMPLEMENT_CLASS(wxMediaBackend, wxObject); IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent); -DEFINE_EVENT_TYPE(wxEVT_MEDIA_FINISHED); -DEFINE_EVENT_TYPE(wxEVT_MEDIA_STOP); +DEFINE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_FINISHED); +DEFINE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_STOP); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // diff --git a/src/mac/carbon/mediactrl.cpp b/src/mac/carbon/mediactrl.cpp index b5d21a3b83..561bc3efb8 100644 --- a/src/mac/carbon/mediactrl.cpp +++ b/src/mac/carbon/mediactrl.cpp @@ -68,7 +68,7 @@ Boolean _wxIsQuickTime4Installed (void) return (error == noErr) && (((result >> 16) & 0xffff) >= 0x0400); } -class wxQTMediaBackend : public wxMediaBackend +class WXDLLIMPEXP_MEDIA wxQTMediaBackend : public wxMediaBackend { public: diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index 80521b517b..3de8356a08 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -68,7 +68,7 @@ extern const wxChar *wxCanvasClassName; //--------------------------------------------------------------------------- #include -class wxAMMediaBackend : public wxMediaBackend +class WXDLLIMPEXP_MEDIA wxAMMediaBackend : public wxMediaBackend { public: wxAMMediaBackend(); @@ -141,7 +141,7 @@ public: //--------------------------------------------------------------------------- #include -class wxMCIMediaBackend : public wxMediaBackend +class WXDLLIMPEXP_MEDIA wxMCIMediaBackend : public wxMediaBackend { public: @@ -206,7 +206,7 @@ public: #include //Windoze QT include #include //Standard QT stuff -class wxQTMediaBackend : public wxMediaBackend +class WXDLLIMPEXP_MEDIA wxQTMediaBackend : public wxMediaBackend { public: