#include "wx/setup.h"
-#if wxUSE_WEBVIEW_WEBKIT
+#if wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
#include "webkit/webkit.h"
#include "wx/sharedptr.h"
#include "wx/webview.h"
-//A set of hash function so we can map wxWebHistoryItems to WebKitWebHistoryItems
-class SharedPtrHash
-{
-public:
- SharedPtrHash() { }
-
- unsigned long operator()( const wxSharedPtr<wxWebHistoryItem> & item ) const
- {
-
- return wxPointerHash()(item.get());
- }
- SharedPtrHash& operator=(const SharedPtrHash&) { return *this; }
-};
-
-class SharedPtrEqual
-{
-public:
- SharedPtrEqual() { }
- bool operator()( const wxSharedPtr<wxWebHistoryItem> & a,
- const wxSharedPtr<wxWebHistoryItem> & b ) const
- {
- return wxPointerEqual()(a.get(), b.get());
- }
-
- SharedPtrEqual& operator=(const SharedPtrEqual&) { return *this; }
-};
-
-WX_DECLARE_HASH_MAP(wxSharedPtr<wxWebHistoryItem>, WebKitWebHistoryItem*,
- SharedPtrHash, SharedPtrEqual, HistoryItemHash);
-
//-----------------------------------------------------------------------------
// wxWebViewWebKit
//-----------------------------------------------------------------------------
virtual wxString GetSelectedSource();
virtual void ClearSelection();
+ virtual void RunScript(const wxString& javascript);
+
+ //Virtual Filesystem Support
+ virtual void RegisterHandler(wxWebHandler* handler);
+ virtual wxVector<wxWebHandler*> GetHandlers() { return m_handlerList; }
+
/** FIXME: hack to work around signals being received too early */
bool m_ready;
* user)
*/
bool m_busy;
+
+ bool m_guard;
+ wxString m_vfsurl;
+
+ //We use this flag to stop recursion when we load a page from the navigation
+ //callback, mainly when loading a VFS page
+ bool m_guard;
protected:
GtkWidget *web_view;
gint m_historyLimit;
- HistoryItemHash m_historyMap;
- // FIXME: try to get DECLARE_DYNAMIC_CLASS macros & stuff right
- //DECLARE_DYNAMIC_CLASS(wxWebViewWebKit)
+ wxVector<wxWebHandler*> m_handlerList;
+
+ wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
};
-#endif // if wxHAVE_WEB_BACKEND_GTK_WEBKIT
+#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
#endif