]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/webkit.i
document that not skipping left click event results in focus not being given to the...
[wxWidgets.git] / wxPython / src / webkit.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: webkit.i
3 // Purpose: Embedding Apple's WebKit in wxWidgets
4 //
5 // Author: Robin Dunn / Kevin Ollivier
6 //
7 // Created: 28-Feb-2003
8 // RCS-ID: $Id$
9 // Copyright: (c) 2001 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 %module webkit
14
15 %{
16
17 #include "wx/wxPython/wxPython.h"
18 #include "wx/wxPython/pyclasses.h"
19 #include "wx/wxPython/pyistream.h"
20
21 #ifdef __WXMAC__ // avoid a bug in Carbon headers
22 #define scalb scalbn
23 #endif
24
25 #include "wx/html/webkit.h"
26 %}
27
28 //---------------------------------------------------------------------------
29
30 %include typemaps.i
31 %include my_typemaps.i
32
33 %import core.i
34 %import windows.i
35 %import misc.i
36
37 %include _webkit_rename.i
38
39 %pragma(python) code = "import wx"
40
41 //---------------------------------------------------------------------------
42
43 %{
44 // Put some wx default wxChar* values into wxStrings.
45 DECLARE_DEF_STRING(PanelNameStr);
46 %}
47
48 %{
49 #if !wxUSE_WEBKIT
50 class wxWebKitCtrl : public wxControl
51 {
52 public:
53 wxWebKitCtrl(wxWindow *parent,
54 wxWindowID winID,
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,
61 wxWindowID winID,
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;}
67
68 void LoadURL(const wxString &url) {}
69
70 bool CanGoBack() {return false;}
71 bool CanGoForward() {return false;}
72 bool GoBack() {return false;}
73 bool GoForward() {return false;}
74 void Reload() {}
75 void Stop(){}
76 bool CanGetPageSource(){return false;}
77 wxString GetPageSource(){return wxEmptyString;}
78 void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString){}
79 };
80 #endif
81 %}
82
83 class wxWebKitCtrl : public wxControl
84 {
85 public:
86 wxWebKitCtrl(wxWindow *parent,
87 wxWindowID winID,
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,
94 wxWindowID winID,
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"));
100
101 void LoadURL(const wxString &url);
102
103 bool CanGoBack();
104 bool CanGoForward();
105 bool GoBack();
106 bool GoForward();
107 void Reload();
108 void Stop();
109 bool CanGetPageSource();
110 wxString GetPageSource();
111 void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);
112 };
113
114 %init %{
115
116 %}