|
1 /* |
|
2 Copyright (C) 2009-2010 ProFUSION embedded systems |
|
3 Copyright (C) 2009-2010 Samsung Electronics |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #ifndef ewk_private_h |
|
22 #define ewk_private_h |
|
23 |
|
24 #include "BackForwardList.h" |
|
25 #include "EWebKit.h" |
|
26 #include "Frame.h" |
|
27 #include "Page.h" |
|
28 #include "Settings.h" |
|
29 #include "Widget.h" |
|
30 #include "ewk_logging.h" |
|
31 #include "ewk_util.h" |
|
32 |
|
33 #include <cairo.h> |
|
34 #include <wtf/PassRefPtr.h> |
|
35 #include <wtf/Vector.h> |
|
36 |
|
37 #ifdef __cplusplus |
|
38 extern "C" { |
|
39 #endif |
|
40 |
|
41 // If defined, ewk will do type checking to ensure objects are of correct type |
|
42 #define EWK_TYPE_CHECK 1 |
|
43 |
|
44 // forward declarations |
|
45 namespace WebCore { |
|
46 struct PopupMenuClient; |
|
47 struct ContextMenu; |
|
48 struct ContextMenuItem; |
|
49 } |
|
50 |
|
51 void ewk_view_ready(Evas_Object *o); |
|
52 void ewk_view_title_set(Evas_Object *o, const char *title); |
|
53 void ewk_view_uri_changed(Evas_Object *o); |
|
54 void ewk_view_load_started(Evas_Object *o); |
|
55 void ewk_view_load_provisional(Evas_Object *o); |
|
56 void ewk_view_frame_main_load_started(Evas_Object *o); |
|
57 void ewk_view_frame_main_cleared(Evas_Object *o); |
|
58 void ewk_view_frame_main_icon_received(Evas_Object *o); |
|
59 void ewk_view_load_finished(Evas_Object *o, const Ewk_Frame_Load_Error *error); |
|
60 void ewk_view_load_error(Evas_Object *o, const Ewk_Frame_Load_Error *error); |
|
61 void ewk_view_load_progress_changed(Evas_Object *o); |
|
62 void ewk_view_load_show(Evas_Object* o); |
|
63 void ewk_view_restore_state(Evas_Object *o, Evas_Object *frame); |
|
64 Evas_Object *ewk_view_window_create(Evas_Object *o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures); |
|
65 |
|
66 void ewk_view_mouse_link_hover_in(Evas_Object *o, void *data); |
|
67 void ewk_view_mouse_link_hover_out(Evas_Object *o); |
|
68 |
|
69 void ewk_view_toolbars_visible_set(Evas_Object *o, Eina_Bool visible); |
|
70 void ewk_view_toolbars_visible_get(Evas_Object *o, Eina_Bool *visible); |
|
71 |
|
72 void ewk_view_statusbar_visible_set(Evas_Object *o, Eina_Bool visible); |
|
73 void ewk_view_statusbar_visible_get(Evas_Object *o, Eina_Bool *visible); |
|
74 void ewk_view_statusbar_text_set(Evas_Object *o, const char *text); |
|
75 |
|
76 void ewk_view_scrollbars_visible_set(Evas_Object *o, Eina_Bool visible); |
|
77 void ewk_view_scrollbars_visible_get(Evas_Object *o, Eina_Bool *visible); |
|
78 |
|
79 void ewk_view_menubar_visible_set(Evas_Object *o, Eina_Bool visible); |
|
80 void ewk_view_menubar_visible_get(Evas_Object *o, Eina_Bool *visible); |
|
81 |
|
82 void ewk_view_tooltip_text_set(Evas_Object *o, const char *text); |
|
83 |
|
84 void ewk_view_add_console_message(Evas_Object *o, const char *message, unsigned int lineNumber, const char *sourceID); |
|
85 |
|
86 void ewk_view_run_javascript_alert(Evas_Object *o, Evas_Object *frame, const char *message); |
|
87 Eina_Bool ewk_view_run_javascript_confirm(Evas_Object *o, Evas_Object *frame, const char *message); |
|
88 Eina_Bool ewk_view_run_javascript_prompt(Evas_Object *o, Evas_Object *frame, const char *message, const char *defaultValue, char **value); |
|
89 Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object *o); |
|
90 uint64_t ewk_view_exceeded_database_quota(Evas_Object *o, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size); |
|
91 |
|
92 Eina_Bool ewk_view_run_open_panel(Evas_Object *o, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames); |
|
93 |
|
94 void ewk_view_repaint(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); |
|
95 void ewk_view_scroll(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord sx, Evas_Coord sy, Evas_Coord sw, Evas_Coord sh, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch, Eina_Bool main_frame); |
|
96 WebCore::Page *ewk_view_core_page_get(const Evas_Object *o); |
|
97 |
|
98 WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object *o, Evas_Object *frame, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::KURL& url, const WebCore::String& referrer); |
|
99 |
|
100 WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues, const WebCore::String& mimeType, bool loadManually); |
|
101 |
|
102 void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect); |
|
103 void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable); |
|
104 |
|
105 void ewk_view_download_request(Evas_Object *o, Ewk_Download *download); |
|
106 |
|
107 Ewk_History *ewk_history_new(WebCore::BackForwardList *history); |
|
108 void ewk_history_free(Ewk_History *history); |
|
109 |
|
110 Ewk_Context_Menu *ewk_context_menu_new(Evas_Object *view, WebCore::ContextMenuController *controller); |
|
111 Eina_Bool ewk_context_menu_free(Ewk_Context_Menu *o); |
|
112 void ewk_context_menu_item_append(Ewk_Context_Menu *o, WebCore::ContextMenuItem& core); |
|
113 Ewk_Context_Menu *ewk_context_menu_custom_get(Ewk_Context_Menu *o); |
|
114 void ewk_context_menu_show(Ewk_Context_Menu *o); |
|
115 |
|
116 Ewk_Window_Features *ewk_window_features_new_from_core(const WebCore::WindowFeatures* core); |
|
117 |
|
118 Evas_Object *ewk_frame_add(Evas *e); |
|
119 Eina_Bool ewk_frame_init(Evas_Object *o, Evas_Object *view, WebCore::Frame *frame); |
|
120 Evas_Object *ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WebCore::String& name, const WebCore::KURL& url, const WebCore::String& referrer); |
|
121 |
|
122 WebCore::Frame *ewk_frame_core_get(const Evas_Object *o); |
|
123 void ewk_frame_core_gone(Evas_Object *o); |
|
124 |
|
125 void ewk_frame_load_started(Evas_Object *o); |
|
126 void ewk_frame_load_provisional(Evas_Object *o); |
|
127 void ewk_frame_load_firstlayout_finished(Evas_Object *o); |
|
128 void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object *o); |
|
129 void ewk_frame_load_document_finished(Evas_Object *o); |
|
130 void ewk_frame_load_finished(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); |
|
131 void ewk_frame_load_error(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); |
|
132 void ewk_frame_load_progress_changed(Evas_Object *o); |
|
133 |
|
134 void ewk_frame_request_will_send(Evas_Object *o, Ewk_Frame_Resource_Request *request); |
|
135 void ewk_frame_request_assign_identifier(Evas_Object *o, const Ewk_Frame_Resource_Request *request); |
|
136 void ewk_frame_view_state_save(Evas_Object *o, WebCore::HistoryItem* item); |
|
137 |
|
138 void ewk_frame_did_perform_first_navigation(Evas_Object *o); |
|
139 |
|
140 void ewk_frame_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h); |
|
141 void ewk_frame_title_set(Evas_Object *o, const char *title); |
|
142 |
|
143 void ewk_frame_view_create_for_view(Evas_Object *o, Evas_Object *view); |
|
144 Eina_Bool ewk_frame_uri_changed(Evas_Object *o); |
|
145 void ewk_frame_force_layout(Evas_Object *o); |
|
146 |
|
147 WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues, const WebCore::String& mimeType, bool loadManually); |
|
148 |
|
149 #ifdef __cplusplus |
|
150 |
|
151 } |
|
152 #endif |
|
153 #endif // ewk_private_h |