]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix compilation under dll builds. Wrap source files in wxUSE_WEB checks to allow...
authorSteve Lamerton <steve.lamerton@gmail.com>
Thu, 5 May 2011 20:30:51 +0000 (20:30 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Thu, 5 May 2011 20:30:51 +0000 (20:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dlimpexp.h
include/wx/webview.h
src/common/webview.cpp

index 5d6c9e72a0e2a873b947242888dfb73a3a12906f..325f46765144333845ca421ff6159a953ec2939b 100644 (file)
 
 #ifdef WXMAKINGDLL_WEB
 #    define WXDLLIMPEXP_WEB WXEXPORT
+#    define WXDLLIMPEXP_DATA_WEB(type) WXEXPORT type
 #elif defined(WXUSINGDLL)
 #    define WXDLLIMPEXP_WEB WXIMPORT
+#    define WXDLLIMPEXP_DATA_WEB(type) WXIMPORT type
 #else /* not making nor using DLL */
 #    define WXDLLIMPEXP_WEB
+#    define WXDLLIMPEXP_DATA_WEB(type) type
 #endif
 
 /*
index 5ec90460d851c3f825d64352ce761eed984b7290..769e7c55ce5bf23b789edb2f73faa4f61dc7bad0 100644 (file)
 #ifndef _WX_WEB_VIEW_H_
 #define _WX_WEB_VIEW_H_
 
+#include "wx/defs.h"
+
+#if wxUSE_WEB
+
 #include <wx/control.h>
 #include <wx/event.h>
 #include <wx/sstream.h>
@@ -401,10 +405,10 @@ private:
     wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebNavigationEvent);
 };
 
-wxDECLARE_EVENT( wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wxWebNavigationEvent );
-wxDECLARE_EVENT( wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebNavigationEvent );
-wxDECLARE_EVENT( wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebNavigationEvent );
-wxDECLARE_EVENT( wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebNavigationEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wxWebNavigationEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebNavigationEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebNavigationEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebNavigationEvent );
 
 typedef void (wxEvtHandler::*wxWebNavigationEventFunction)
              (wxWebNavigationEvent&);
@@ -428,4 +432,6 @@ typedef void (wxEvtHandler::*wxWebNavigationEventFunction)
     wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_ERROR, id, \
                      wxHtmlNavigatingEventHandler(fn))
 
-#endif
+#endif // wxUSE_WEB
+
+#endif // _WX_WEB_VIEW_H_
index 492745a6b85fedfce0080cbcba9a2a74c079a180..a5c87b02190c2a8c36e801bb1d4c842297eba8af 100644 (file)
@@ -10,6 +10,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_WEB
+
 #if defined(__BORLANDC__)
     #pragma hdrstop
 #endif
@@ -24,8 +26,8 @@
 #include "wx/app.h"
 WX_CHECK_BUILD_OPTIONS("wxWEB")
 
-extern WXDLLEXPORT_DATA(const char) wxWebViewNameStr[] = "wxWebView";
-extern WXDLLEXPORT_DATA(const char) wxWebViewDefaultURLStr[] = "about:blank";
+extern WXDLLIMPEXP_DATA_WEB(const char) wxWebViewNameStr[] = "wxWebView";
+extern WXDLLIMPEXP_DATA_WEB(const char) wxWebViewDefaultURLStr[] = "about:blank";
 
 IMPLEMENT_DYNAMIC_CLASS(wxWebNavigationEvent, wxCommandEvent)
 
@@ -122,3 +124,5 @@ wxWebView* wxWebView::New(wxWindow* parent,
             return NULL;
     }
 }
+
+#endif // wxUSE_WEB