Fix compilation for OSX backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
|
|
||||||
#if wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX_MAC__)
|
#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|
||||||
|
|| defined(__WXOSX_CARBON__))
|
||||||
|
|
||||||
class WXDLLIMPEXP_WEB wxWebHistoryItem
|
class WXDLLIMPEXP_WEB wxWebHistoryItem
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,8 @@
|
|||||||
|
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
|
|
||||||
#if wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX_MAC__)
|
#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|
||||||
|
|| defined(__WXOSX_CARBON__))
|
||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
#include "wx/webview.h"
|
#include "wx/webview.h"
|
||||||
|
@@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#include "wx/osx/webview_webkit.h"
|
#include "wx/osx/webview_webkit.h"
|
||||||
|
|
||||||
|
#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|
||||||
|
|| defined(__WXOSX_CARBON__))
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
@@ -21,8 +24,6 @@
|
|||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#if wxHAVE_WEB_BACKEND_OSX_WEBKIT
|
|
||||||
|
|
||||||
#ifdef __WXCOCOA__
|
#ifdef __WXCOCOA__
|
||||||
#include "wx/cocoa/autorelease.h"
|
#include "wx/cocoa/autorelease.h"
|
||||||
#else
|
#else
|
||||||
@@ -45,7 +46,7 @@ std::map<WebView*, wxWebViewWebKit*> wx_webviewctrls;
|
|||||||
// macros
|
// macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxControl)
|
wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
|
BEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
|
||||||
#if defined(__WXMAC__) && wxOSX_USE_CARBON
|
#if defined(__WXMAC__) && wxOSX_USE_CARBON
|
||||||
@@ -1194,10 +1195,9 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
|
|||||||
|
|
||||||
wxASSERT(wx_webviewctrls.find(sender) != wx_webviewctrls.end());
|
wxASSERT(wx_webviewctrls.find(sender) != wx_webviewctrls.end());
|
||||||
NSString *url = [[request URL] absoluteString];
|
NSString *url = [[request URL] absoluteString];
|
||||||
wxString target = wxStringWithNSString([frame name]);
|
|
||||||
wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
|
wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
|
||||||
wx_webviewctrls[sender]->GetId(),
|
wx_webviewctrls[sender]->GetId(),
|
||||||
wxStringWithNSString( url ), target, true);
|
wxStringWithNSString( url ), "", true);
|
||||||
|
|
||||||
if (webKitWindow && webKitWindow->GetEventHandler())
|
if (webKitWindow && webKitWindow->GetEventHandler())
|
||||||
webKitWindow->GetEventHandler()->ProcessEvent(thisEvent);
|
webKitWindow->GetEventHandler()->ProcessEvent(thisEvent);
|
||||||
@@ -1206,4 +1206,4 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
|
|||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
//#endif //wxHAVE_WEB_BACKEND_OSX_WEBKIT
|
#endif //wxUSE_WEBVIEW_WEBKIT
|
||||||
|
Reference in New Issue
Block a user