From 97ad1425fe7da4bc129e73e48e268ebdc878d621 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Fri, 6 May 2011 15:28:19 +0000 Subject: [PATCH] Enable IE backend in msw builds unconditionally until the backend flags work properly. Conditionally define INET constants only under mingw as it does not apparently provide them. Fix some typos. The sample now compiles under msw. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/webviewie.h | 4 ++++ include/wx/webview.h | 10 +--------- src/common/webview.cpp | 8 ++++---- src/msw/webviewie.cpp | 6 ++++-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/include/wx/msw/webviewie.h b/include/wx/msw/webviewie.h index aa2ab97d56..c0f7a427d1 100644 --- a/include/wx/msw/webviewie.h +++ b/include/wx/msw/webviewie.h @@ -12,6 +12,10 @@ #include "wx/setup.h" +#ifdef __WXMSW__ + #define wxHAVE_WEB_BACKEND_IE 1 +#endif + #if wxHAVE_WEB_BACKEND_IE #include "wx/control.h" diff --git a/include/wx/webview.h b/include/wx/webview.h index 2031531e41..4cd6c89b2e 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -345,15 +345,7 @@ public: virtual bool IsBusy() = 0; }; -//class WXDLLIMPEXP_FWD_HTML wxWebNavigationEvent; - -// FIXME: get those WXDLLIMPEXP_HTML & DECLARE_DYNAMIC_CLASS right... -//wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_HTML, wxEVT_COMMAND_WEB_VIEW_NAVIGATE, -// wxWebNavigationEvent ); - - -// FIXME: get those WXDLLIMPEXP_HTML & DECLARE_DYNAMIC_CLASS right... -class wxWebNavigationEvent : public wxCommandEvent +class WXDLLIMPEXP_WEB wxWebNavigationEvent : public wxCommandEvent { public: wxWebNavigationEvent() {} diff --git a/src/common/webview.cpp b/src/common/webview.cpp index a5c87b0219..9d710449fe 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -53,7 +53,7 @@ wxWebView* wxWebView::New(wxWebViewBackend backend) #if wxHAVE_WEB_BACKEND_IE case wxWEB_VIEW_BACKEND_IE: - return new wxIEPanel(); + return new wxWebViewIE(); #endif case wxWEB_VIEW_BACKEND_DEFAULT: @@ -67,7 +67,7 @@ wxWebView* wxWebView::New(wxWebViewBackend backend) #endif #if wxHAVE_WEB_BACKEND_IE - return new wxIEPanel(); + return new wxWebViewIE(); #endif // fall-through intended @@ -102,7 +102,7 @@ wxWebView* wxWebView::New(wxWindow* parent, #if wxHAVE_WEB_BACKEND_IE case wxWEB_VIEW_BACKEND_IE: - return new wxIEPanel(parent, id, url, pos, size, style, name); + return new wxWebViewIE(parent, id, url, pos, size, style, name); #endif case wxWEB_VIEW_BACKEND_DEFAULT: @@ -116,7 +116,7 @@ wxWebView* wxWebView::New(wxWindow* parent, #endif #if wxHAVE_WEB_BACKEND_IE - return new wxIEPanel(parent, id, url, pos, size, style, name); + return new wxWebViewIE(parent, id, url, pos, size, style, name); #endif // fall-through intended diff --git a/src/msw/webviewie.cpp b/src/msw/webviewie.cpp index 3c810407f5..4b7dabe02b 100644 --- a/src/msw/webviewie.cpp +++ b/src/msw/webviewie.cpp @@ -24,6 +24,7 @@ #include #include +#ifdef __MINGW32__ // FIXME: Seems like MINGW does not have these, how to handle cleanly? #define DISPID_COMMANDSTATECHANGE 105 typedef enum CommandStateChangeConstants { @@ -67,10 +68,11 @@ typedef enum CommandStateChangeConstants { #define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L #define REFRESH_COMPLETELY 3 +#endif BEGIN_EVENT_TABLE(wxWebViewIE, wxControl) -EVT_ACTIVEX(wxID_ANY, wxWebViewIE::onActiveXEvent) -EVT_ERASE_BACKGROUND(wxWebViewIE::onEraseBg) + EVT_ACTIVEX(wxID_ANY, wxWebViewIE::onActiveXEvent) + EVT_ERASE_BACKGROUND(wxWebViewIE::onEraseBg) END_EVENT_TABLE() bool wxWebViewIE::Create(wxWindow* parent, -- 2.45.2