X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b8f917c3007b1776f55cba6b71843b83d412bf3..4ac48ae21050f6540abd57c26ff1aa254f9e0354:/src/html/htmlctrl/webkit/webkit.mm diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm index 55266b8ac6..1b6155d173 100755 --- a/src/html/htmlctrl/webkit/webkit.mm +++ b/src/html/htmlctrl/webkit/webkit.mm @@ -13,8 +13,6 @@ #pragma implementation "webkit.h" #endif -#if wxUSE_WEBKIT - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -22,6 +20,8 @@ #include "wx/wx.h" #endif +#if wxUSE_WEBKIT + #ifdef __WXCOCOA__ #include "wx/cocoa/autorelease.h" #else @@ -145,13 +145,14 @@ bool wxWebKitCtrl::Create(wxWindow *parent, SetInitialFrameRect(pos,sizeInstance); #else m_macIsUserPane = false; + m_peer = new wxMacControl(); wxControl::Create(parent, m_windowID, pos, size, style , validator , name); WebInitForCarbon(); - HIWebViewCreate( (HIViewRef*) &m_macControl ); + HIWebViewCreate( m_peer->GetControlRefAddr() ); - m_webView = (WebView*) HIWebViewGetWebView( (HIViewRef) m_macControl ); + m_webView = (WebView*) HIWebViewGetWebView( m_peer->GetControlRef() ); MacPostControlCreate(pos, size); - HIViewSetVisible( (HIViewRef) m_macControl, true ); + HIViewSetVisible( m_peer->GetControlRef(), true ); [m_webView setHidden:false]; #endif @@ -293,7 +294,7 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){ } void wxWebKitCtrl::MacVisibilityChanged(){ - bool isHidden = !IsControlVisible( (HIViewRef)m_macControl); + bool isHidden = !IsControlVisible( m_peer->GetControlRef()); [m_webView setHidden:isHidden]; } @@ -373,4 +374,4 @@ void wxWebKitCtrl::MacVisibilityChanged(){ } @end -#endif //wxUSE_WEBKIT \ No newline at end of file +#endif //wxUSE_WEBKIT