1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Embedding Apple's WebKit in wxWidgets
5 // Author: Robin Dunn / Kevin Ollivier
7 // Created: 28-Feb-2003
9 // Copyright: (c) 2001 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
17 #include "wx/wxPython/wxPython.h"
18 #include "wx/wxPython/pyclasses.h"
19 #include "wx/wxPython/pyistream.h"
21 #ifdef __WXMAC__ // avoid a bug in Carbon headers
25 #include "wx/html/webkit.h"
28 //---------------------------------------------------------------------------
31 %include my_typemaps.i
37 %include _webkit_rename.i
39 %pragma(python) code = "import wx"
41 //---------------------------------------------------------------------------
44 // Put some wx default wxChar* values into wxStrings.
45 DECLARE_DEF_STRING(PanelNameStr);
50 class wxWebKitCtrl : public wxControl
53 wxWebKitCtrl(wxWindow *parent,
55 const wxString& strURL,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize, long style = 0,
58 const wxValidator& validator = wxDefaultValidator,
59 const wxString& name = wxT("webkitctrl")) {}
60 bool Create(wxWindow *parent,
62 const wxString& strURL,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize, long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxT("webkitctrl")) {return false;}
68 void LoadURL(const wxString &url) {}
70 bool CanGoBack() {return false;}
71 bool CanGoForward() {return false;}
72 bool GoBack() {return false;}
73 bool GoForward() {return false;}
76 bool CanGetPageSource(){return false;}
77 wxString GetPageSource(){return wxEmptyString;}
78 void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString){}
83 class wxWebKitCtrl : public wxControl
86 wxWebKitCtrl(wxWindow *parent,
88 const wxString& strURL,
89 const wxPoint& pos = wxDefaultPosition,
90 const wxSize& size = wxDefaultSize, long style = 0,
91 const wxValidator& validator = wxDefaultValidator,
92 const wxString& name = wxT("webkitctrl"));
93 bool Create(wxWindow *parent,
95 const wxString& strURL,
96 const wxPoint& pos = wxDefaultPosition,
97 const wxSize& size = wxDefaultSize, long style = 0,
98 const wxValidator& validator = wxDefaultValidator,
99 const wxString& name = wxT("webkitctrl"));
101 void LoadURL(const wxString &url);
109 bool CanGetPageSource();
110 wxString GetPageSource();
111 void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);