X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fba4c7c91b0d764e9cc92f6095b19b95cce92773..465de0be705e52c7f97e9bb6169af9d20a7f72a8:/include/wx/gtk/webview_webkit.h diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h index 3bd95f94ed..d130b827e3 100644 --- a/include/wx/gtk/webview_webkit.h +++ b/include/wx/gtk/webview_webkit.h @@ -12,17 +12,18 @@ #include "wx/setup.h" -#if wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) -#include "webkit/webkit.h" #include "wx/sharedptr.h" #include "wx/webview.h" +typedef struct _WebKitWebView WebKitWebView; + //----------------------------------------------------------------------------- // wxWebViewWebKit //----------------------------------------------------------------------------- -class WXDLLIMPEXP_WEB wxWebViewWebKit : public wxWebView +class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView { public: wxWebViewWebKit() { Init(); } @@ -46,6 +47,8 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr); + virtual ~wxWebViewWebKit(); + virtual bool Enable( bool enable = true ); // implementation @@ -54,14 +57,8 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - // helper to allow access to protected member from GTK callback - void MoveWindow(int x, int y, int width, int height) - { - DoMoveWindow(x, y, width, height); - } - virtual void Stop(); - virtual void LoadUrl(const wxString& url); + virtual void LoadURL(const wxString& url); virtual void GoBack(); virtual void GoForward(); virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); @@ -76,9 +73,6 @@ public: virtual wxString GetCurrentTitle() const; virtual wxString GetPageSource() const; virtual wxString GetPageText() const; - //We do not want to hide the other overloads - using wxWebView::SetPage; - virtual void SetPage(const wxString& html, const wxString& baseUrl); virtual void Print(); virtual bool IsBusy() const; @@ -115,14 +109,12 @@ public: virtual void ClearSelection(); virtual void RunScript(const wxString& javascript); - + //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); virtual wxVector > GetHandlers() { return m_handlerList; } - /** FIXME: hack to work around signals being received too early */ - bool m_ready; - + virtual void* GetNativeBackend() const { return m_web_view; } /** TODO: check if this can be made private * The native control has a getter to check for busy state, but except in @@ -139,6 +131,7 @@ public: bool m_guard; protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; @@ -152,14 +145,14 @@ private: // focus event handler: calls GTKUpdateBitmap() void GTKOnFocus(wxFocusEvent& event); - GtkWidget *web_view; - gint m_historyLimit; + WebKitWebView *m_web_view; + int m_historyLimit; wxVector > m_handlerList; wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); }; -#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) #endif