• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_view_h
22 #define ewk_view_h
23 
24 #include "ewk_frame.h"
25 #include "ewk_history.h"
26 #include "ewk_window_features.h"
27 
28 #include <Evas.h>
29 #include <cairo.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /**
36  * @brief WebKit main smart object.
37  *
38  * This object is the high level access to WebKit-EFL browser
39  * component. It is responsible for managing the main frame and other
40  * critical resources.
41  *
42  * Every ewk_view has at least one frame, called "main frame" and
43  * retrieved with ewk_view_frame_main_get(). Direct frame access is
44  * often discouraged, it is recommended to use ewk_view functions
45  * instead.
46  *
47  * The following signals (see evas_object_smart_callback_add()) are emitted:
48  *
49  *  - "ready", void: page is fully loaded.
50  *  - "title,changed", const char*: title of the main frame changed.
51  *  - "uri,changed", const char*: uri of the main frame changed.
52  *  - "load,started", void: frame started loading.
53  *  - "load,progress", double*: load progress changed (overall value
54  *    from 0.0 to 1.0, connect to individual frames for fine grained).
55  *  - "load,finished", const Ewk_Frame_Load_Error*: reports load
56  *    finished and as argument @c NULL if successfully or pointer to
57  *    structure defining the error.
58  *  - "load,provisional", void: view started provisional load.
59  *  - "load,error", const Ewk_Frame_Load_Error*: reports load failed
60  *    and as argument a pointer to structure defining the error.
61  *  - "frame,created", Evas_Object*: when frames are created, they are
62  *    emitted in this signal.
63  *  - "zoom,animated,end", void: requested animated zoom is finished.
64  *  - "menubar,visible,set", Eina_Bool: set menubar visibility.
65  *  - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is
66  *    visible; otherwise, @c EINA_FALSE.
67  *  - "menubar,visible,set", Eina_Bool: set menubar visibility.
68  *  - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is
69  *    visible; @c EINA_FALSE, otherwise.
70  *  - "scrollbars,visible,set", Eina_Bool: set scrollbars visibility.
71  *  - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars
72  *    are visible; @c EINA_FALSE, otherwise.
73  *  - "statusbar,visible,set", Eina_Bool: set statusbar visibility.
74  *  - "statusbar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if statusbar is
75  *    visible; @c EINA_FALSE, otherwise.
76  *  - "toolbar,visible,set", Eina_Bool: set toolbar visibility.
77  *  - "toolbar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if toolbar
78  *    is visible; @c EINA_FALSE, otherwise.
79  *  - "link,hover,in", const char *link[2]: reports mouse is over a link and as
80  *    argument gives the url in link[0] and link's title in link[1].
81  *  - "link,hover,out", const char *link[2]: reports mouse moved out from a link
82  *    and as argument gives the url in link[0] and link's title in link[1].
83  *  - "popup,create", Ewk_Menu: reports that a new menu was created.
84  *  - "popup,willdeleted", Ewk_Menu: reports that a previously created menu is
85  *    about to be deleted.
86  *  - "download,request", Ewk_Download: reports a download is being requested
87  *    and as arguments gives its details.
88  *  - "icon,received", void: main frame received an icon.
89  *  - "viewport,changed", void: Report that viewport has changed.
90  *  - "inputmethods,changed" with a boolean indicating whether it's enabled or not.
91  *  - "view,resized", void: view object's size has changed.
92  */
93 
94 typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
95 
96 /**
97  * Ewk view's class, to be overridden by sub-classes.
98  */
99 typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class;
100 struct _Ewk_View_Smart_Class {
101     Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
102     unsigned long version;
103 
104     Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, Eina_Bool javascript, const Ewk_Window_Features *window_features); /**< creates a new window, requested by webkit */
105     void (*window_close)(Ewk_View_Smart_Data *sd); /**< creates a new window, requested by webkit */
106     // hooks to allow different backing stores
107     Evas_Object *(*backing_store_add)(Ewk_View_Smart_Data *sd); /**< must be defined */
108     Eina_Bool (*scrolls_process)(Ewk_View_Smart_Data *sd); /**< must be defined */
109     Eina_Bool (*repaints_process)(Ewk_View_Smart_Data *sd); /**< must be defined */
110     Eina_Bool (*contents_resize)(Ewk_View_Smart_Data *sd, int w, int h);
111     Eina_Bool (*zoom_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy);
112     Eina_Bool (*zoom_weak_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy);
113     void (*zoom_weak_smooth_scale_set)(Ewk_View_Smart_Data *sd, Eina_Bool smooth_scale);
114     void (*bg_color_set)(Ewk_View_Smart_Data *sd, unsigned char r, unsigned char g, unsigned char b, unsigned char a);
115     void (*flush)(Ewk_View_Smart_Data *sd);
116     Eina_Bool (*pre_render_region)(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
117     Eina_Bool (*pre_render_relative_radius)(Ewk_View_Smart_Data *sd, unsigned int n, float zoom);
118     void (*pre_render_cancel)(Ewk_View_Smart_Data *sd);
119     Eina_Bool (*disable_render)(Ewk_View_Smart_Data *sd);
120     Eina_Bool (*enable_render)(Ewk_View_Smart_Data *sd);
121 
122     // event handling:
123     //  - returns true if handled
124     //  - if overridden, have to call parent method if desired
125     Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd);
126     Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd);
127     Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev);
128     Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev);
129     Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev);
130     Eina_Bool (*mouse_move)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Move *ev);
131     Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev);
132     Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev);
133 
134     void (*add_console_message)(Ewk_View_Smart_Data *sd, const char *message, unsigned int lineNumber, const char *sourceID);
135     void (*run_javascript_alert)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message);
136     Eina_Bool (*run_javascript_confirm)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message);
137     Eina_Bool (*run_javascript_prompt)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message, const char *defaultValue, char **value);
138     Eina_Bool (*should_interrupt_javascript)(Ewk_View_Smart_Data *sd);
139     uint64_t (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size);
140 
141     Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames);
142 
143     Eina_Bool (*navigation_policy_decision)(Ewk_View_Smart_Data *sd, Ewk_Frame_Resource_Request *request);
144 };
145 
146 #define EWK_VIEW_SMART_CLASS_VERSION 1UL /** the version you have to put into the version field in the Ewk_View_Smart_Class structure */
147 
148 /**
149  * Initializer for whole Ewk_View_Smart_Class structure.
150  *
151  * @param smart_class_init initializer to use for the "base" field
152  * (Evas_Smart_Class).
153  *
154  * @see EWK_VIEW_SMART_CLASS_INIT_NULL
155  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
156  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
157  */
158 #define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
159 
160 /**
161  * Initializer to zero a whole Ewk_View_Smart_Class structure.
162  *
163  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
164  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
165  * @see EWK_VIEW_SMART_CLASS_INIT
166  */
167 #define EWK_VIEW_SMART_CLASS_INIT_NULL EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL)
168 
169 /**
170  * Initializer to zero a whole Ewk_View_Smart_Class structure and set version.
171  *
172  * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of
173  * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION
174  *
175  * @see EWK_VIEW_SMART_CLASS_INIT_NULL
176  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
177  * @see EWK_VIEW_SMART_CLASS_INIT
178  */
179 #define EWK_VIEW_SMART_CLASS_INIT_VERSION EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_VERSION)
180 
181 /**
182  * Initializer to zero a whole Ewk_View_Smart_Class structure and set
183  * name and version.
184  *
185  * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of
186  * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
187  * to the specific value.
188  *
189  * It will keep a reference to name field as a "const char *", that is,
190  * name must be available while the structure is used (hint: static or global!)
191  * and will not be modified.
192  *
193  * @see EWK_VIEW_SMART_CLASS_INIT_NULL
194  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
195  * @see EWK_VIEW_SMART_CLASS_INIT
196  */
197 #define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
198 
199 enum _Ewk_Imh {
200     EWK_IMH_TELEPHONE = (1 << 0),
201     EWK_IMH_NUMBER = (1 << 1),
202     EWK_IMH_EMAIL = (1 << 2),
203     EWK_IMH_URL = (1 << 3),
204     EWK_IMH_PASSWORD = (1 << 4)
205 };
206 typedef enum _Ewk_Imh Ewk_Imh;
207 
208 /**
209  * @internal
210  *
211  * private data that is used internally by EFL WebKit and should never
212  * be modified from outside.
213  */
214 typedef struct _Ewk_View_Private_Data Ewk_View_Private_Data;
215 
216 enum _Ewk_Menu_Item_Type {
217     EWK_MENU_SEPARATOR,
218     EWK_MENU_GROUP,
219     EWK_MENU_OPTION
220 };
221 typedef enum _Ewk_Menu_Item_Type Ewk_Menu_Item_Type;
222 
223 
224 /**
225  * Structure do contain data of each menu item
226  */
227 typedef struct _Ewk_Menu_Item Ewk_Menu_Item;
228 struct _Ewk_Menu_Item {
229     const char *text; /**< Item's text */
230     Ewk_Menu_Item_Type type; /** Item's type */
231 };
232 
233 /**
234  * Structure to contain Popup menu data.
235  */
236 typedef struct _Ewk_Menu Ewk_Menu;
237 struct _Ewk_Menu {
238         Eina_List* items;
239         int x;
240         int y;
241         int width;
242         int height;
243 };
244 
245 /**
246  * Structure to contain Download data
247  */
248 typedef struct _Ewk_Download Ewk_Download;
249 struct _Ewk_Download {
250     const char* url;
251     /* to be extended */
252 };
253 
254 /**
255  * Scroll request that should be processed by subclass implementations.
256  */
257 typedef struct _Ewk_Scroll_Request Ewk_Scroll_Request;
258 struct _Ewk_Scroll_Request {
259     Evas_Coord dx, dy;
260     Evas_Coord x, y, w, h, x2, y2;
261     Eina_Bool main_scroll;
262 };
263 
264 /**
265  * Structure to contain internal View data, it is to be considered
266  * private by users, but may be extended or changed by sub-classes
267  * (that's why it's in public header file).
268  */
269 struct _Ewk_View_Smart_Data {
270     Evas_Object_Smart_Clipped_Data base;
271     const Ewk_View_Smart_Class *api; /**< reference to casted class instance */
272     Evas_Object *self; /**< reference to owner object */
273     Evas_Object *main_frame; /**< reference to main frame object */
274     Evas_Object *backing_store; /**< reference to backing store */
275     Evas_Object *events_rect; /**< rectangle that should receive mouse events */
276     Ewk_View_Private_Data *_priv; /**< should never be accessed, c++ stuff */
277     struct {
278         Evas_Coord x, y, w, h; /**< last used viewport */
279     } view;
280     struct {
281         struct {
282             float start;
283             float end;
284             float current; /**< if > 0.0, then doing animated zoom. */
285         } zoom;
286     } animated_zoom;
287     struct {
288         unsigned char r, g, b, a;
289     } bg_color;
290     Eina_Bool zoom_weak_smooth_scale:1;
291     struct { /**< what changed since last smart_calculate */
292         Eina_Bool any:1;
293         Eina_Bool size:1;
294         Eina_Bool position:1;
295         Eina_Bool frame_rect:1;
296     } changed;
297 };
298 
299 /**
300  * Cache (pool) that contains unused tiles for ewk_view_tiled.
301  *
302  * This cache will maintain unused tiles and flush them when the total
303  * memory exceeds the set amount when
304  * ewk_tile_unused_cache_auto_flush() or explicitly set value when
305  * ewk_tile_unused_cache_flush() is called.
306  *
307  * The tile may be shared among different ewk_view_tiled instances to
308  * group maximum unused memory resident in the system.
309  */
310 typedef struct _Ewk_Tile_Unused_Cache Ewk_Tile_Unused_Cache;
311 EAPI void   ewk_tile_unused_cache_max_set(Ewk_Tile_Unused_Cache *tuc, size_t max);
312 EAPI size_t ewk_tile_unused_cache_max_get(const Ewk_Tile_Unused_Cache *tuc);
313 EAPI size_t ewk_tile_unused_cache_used_get(const Ewk_Tile_Unused_Cache *tuc);
314 EAPI size_t ewk_tile_unused_cache_flush(Ewk_Tile_Unused_Cache *tuc, size_t bytes);
315 EAPI void   ewk_tile_unused_cache_auto_flush(Ewk_Tile_Unused_Cache *tuc);
316 
317 EAPI Eina_Bool    ewk_view_base_smart_set(Ewk_View_Smart_Class *api);
318 EAPI Eina_Bool    ewk_view_single_smart_set(Ewk_View_Smart_Class *api);
319 EAPI Eina_Bool    ewk_view_tiled_smart_set(Ewk_View_Smart_Class *api);
320 
321 EAPI Evas_Object *ewk_view_single_add(Evas *e);
322 EAPI Evas_Object *ewk_view_tiled_add(Evas *e);
323 
324 EAPI Ewk_Tile_Unused_Cache *ewk_view_tiled_unused_cache_get(const Evas_Object *o);
325 EAPI void                   ewk_view_tiled_unused_cache_set(Evas_Object *o, Ewk_Tile_Unused_Cache *cache);
326 
327 // FIXME: this function should be removed later, when we find the best flag to use.
328 EAPI void                   ewk_view_tiled_process_entire_queue_set(Evas_Object *o, Eina_Bool flag);
329 
330 EAPI void         ewk_view_fixed_layout_size_set(Evas_Object *o, Evas_Coord w, Evas_Coord h);
331 EAPI void         ewk_view_fixed_layout_size_get(Evas_Object *o, Evas_Coord *w, Evas_Coord *h);
332 
333 EAPI void         ewk_view_theme_set(Evas_Object *o, const char *path);
334 EAPI const char  *ewk_view_theme_get(Evas_Object *o);
335 
336 EAPI Evas_Object *ewk_view_frame_main_get(const Evas_Object *o);
337 EAPI Evas_Object *ewk_view_frame_focused_get(const Evas_Object *o);
338 
339 EAPI Eina_Bool    ewk_view_uri_set(Evas_Object *o, const char *uri);
340 EAPI const char  *ewk_view_uri_get(const Evas_Object *o);
341 EAPI const char  *ewk_view_title_get(const Evas_Object *o);
342 
343 EAPI Eina_Bool    ewk_view_editable_get(const Evas_Object *o);
344 EAPI Eina_Bool    ewk_view_editable_set(Evas_Object *o, Eina_Bool editable);
345 
346 EAPI void         ewk_view_bg_color_set(Evas_Object *o, int r, int g, int b, int a);
347 EAPI void         ewk_view_bg_color_get(const Evas_Object *o, int *r, int *g, int *b, int *a);
348 
349 EAPI char        *ewk_view_selection_get(const Evas_Object *o);
350 EAPI Eina_Bool    ewk_view_select_none(Evas_Object *o);
351 EAPI Eina_Bool    ewk_view_select_all(Evas_Object *o);
352 EAPI Eina_Bool    ewk_view_select_paragraph(Evas_Object *o);
353 EAPI Eina_Bool    ewk_view_select_sentence(Evas_Object *o);
354 EAPI Eina_Bool    ewk_view_select_line(Evas_Object *o);
355 EAPI Eina_Bool    ewk_view_select_word(Evas_Object *o);
356 
357 EAPI Eina_Bool    ewk_view_context_menu_forward_event(Evas_Object *o, const Evas_Event_Mouse_Down *ev);
358 
359 EAPI void         ewk_view_popup_selected_set(Evas_Object *o, int index);
360 EAPI Eina_Bool    ewk_view_popup_destroy(Evas_Object *o);
361 
362 EAPI Eina_Bool    ewk_view_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
363 
364 EAPI unsigned int ewk_view_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
365 EAPI Eina_Bool    ewk_view_text_matches_unmark_all(Evas_Object *o);
366 EAPI Eina_Bool    ewk_view_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight);
367 EAPI Eina_Bool    ewk_view_text_matches_highlight_get(const Evas_Object *o);
368 
369 EAPI double       ewk_view_load_progress_get(const Evas_Object *o);
370 
371 EAPI Eina_Bool    ewk_view_stop(Evas_Object *o);
372 EAPI Eina_Bool    ewk_view_reload(Evas_Object *o);
373 EAPI Eina_Bool    ewk_view_reload_full(Evas_Object *o);
374 
375 EAPI Eina_Bool    ewk_view_back(Evas_Object *o);
376 EAPI Eina_Bool    ewk_view_forward(Evas_Object *o);
377 EAPI Eina_Bool    ewk_view_navigate(Evas_Object *o, int steps);
378 
379 EAPI Eina_Bool    ewk_view_back_possible(Evas_Object *o);
380 EAPI Eina_Bool    ewk_view_forward_possible(Evas_Object *o);
381 EAPI Eina_Bool    ewk_view_navigate_possible(Evas_Object *o, int steps);
382 
383 EAPI Eina_Bool    ewk_view_history_enable_get(const Evas_Object *o);
384 EAPI Eina_Bool    ewk_view_history_enable_set(Evas_Object *o, Eina_Bool enable);
385 EAPI Ewk_History *ewk_view_history_get(const Evas_Object *o);
386 
387 EAPI float        ewk_view_zoom_get(const Evas_Object *o);
388 EAPI Eina_Bool    ewk_view_zoom_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);
389 
390 EAPI Eina_Bool    ewk_view_zoom_weak_smooth_scale_get(const Evas_Object *o);
391 EAPI void         ewk_view_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale);
392 
393 EAPI Eina_Bool    ewk_view_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);
394 EAPI Eina_Bool    ewk_view_zoom_animated_mark_start(Evas_Object *o, float zoom);
395 EAPI Eina_Bool    ewk_view_zoom_animated_mark_end(Evas_Object *o, float zoom);
396 EAPI Eina_Bool    ewk_view_zoom_animated_mark_current(Evas_Object *o, float zoom);
397 EAPI Eina_Bool    ewk_view_zoom_animated_mark_stop(Evas_Object *o);
398 
399 EAPI Eina_Bool    ewk_view_zoom_animated_set(Evas_Object *o, float zoom, float duration, Evas_Coord cx, Evas_Coord cy);
400 EAPI Eina_Bool    ewk_view_zoom_text_only_get(const Evas_Object *o);
401 EAPI Eina_Bool    ewk_view_zoom_text_only_set(Evas_Object *o, Eina_Bool setting);
402 
403 EAPI Eina_Bool    ewk_view_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
404 EAPI Eina_Bool    ewk_view_pre_render_relative_radius(Evas_Object *o, unsigned int n);
405 EAPI void         ewk_view_pre_render_cancel(Evas_Object *o);
406 EAPI Eina_Bool    ewk_view_enable_render(const Evas_Object *o);
407 EAPI Eina_Bool    ewk_view_disable_render(const Evas_Object *o);
408 
409 EAPI unsigned int ewk_view_imh_get(Evas_Object *o);
410 
411 /* settings */
412 EAPI const char  *ewk_view_setting_user_agent_get(const Evas_Object *o);
413 EAPI Eina_Bool    ewk_view_setting_user_agent_set(Evas_Object *o, const char *user_agent);
414 
415 EAPI Eina_Bool    ewk_view_setting_auto_load_images_get(const Evas_Object *o);
416 EAPI Eina_Bool    ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Bool automatic);
417 
418 EAPI Eina_Bool    ewk_view_setting_auto_shrink_images_get(const Evas_Object *o);
419 EAPI Eina_Bool    ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic);
420 
421 EAPI Eina_Bool    ewk_view_setting_enable_auto_resize_window_get(const Evas_Object *o);
422 EAPI Eina_Bool    ewk_view_setting_enable_auto_resize_window_set(Evas_Object *o, Eina_Bool resizable);
423 EAPI Eina_Bool    ewk_view_setting_enable_scripts_get(const Evas_Object *o);
424 EAPI Eina_Bool    ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable);
425 
426 EAPI Eina_Bool    ewk_view_setting_enable_plugins_get(const Evas_Object *o);
427 EAPI Eina_Bool    ewk_view_setting_enable_plugins_set(Evas_Object *o, Eina_Bool enable);
428 
429 EAPI Eina_Bool    ewk_view_setting_enable_frame_flattening_get(const Evas_Object* o);
430 EAPI Eina_Bool    ewk_view_setting_enable_frame_flattening_set(Evas_Object* o, Eina_Bool enable);
431 
432 EAPI Eina_Bool    ewk_view_setting_scripts_window_open_get(const Evas_Object *o);
433 EAPI Eina_Bool    ewk_view_setting_scripts_window_open_set(Evas_Object *o, Eina_Bool allow);
434 
435 EAPI Eina_Bool    ewk_view_setting_resizable_textareas_get(const Evas_Object *o);
436 EAPI Eina_Bool    ewk_view_setting_resizable_textareas_set(Evas_Object *o, Eina_Bool enable);
437 
438 EAPI const char  *ewk_view_setting_user_stylesheet_get(const Evas_Object *o);
439 EAPI Eina_Bool    ewk_view_setting_user_stylesheet_set(Evas_Object *o, const char *uri);
440 
441 EAPI Eina_Bool    ewk_view_setting_private_browsing_get(const Evas_Object *o);
442 EAPI Eina_Bool    ewk_view_setting_private_browsing_set(Evas_Object *o, Eina_Bool enable);
443 EAPI Eina_Bool    ewk_view_setting_offline_app_cache_get(const Evas_Object *o);
444 EAPI Eina_Bool    ewk_view_setting_offline_app_cache_set(Evas_Object *o, Eina_Bool enable);
445 
446 EAPI Eina_Bool    ewk_view_setting_caret_browsing_get(const Evas_Object *o);
447 EAPI Eina_Bool    ewk_view_setting_caret_browsing_set(Evas_Object *o, Eina_Bool enable);
448 
449 EAPI const char  *ewk_view_setting_encoding_custom_get(const Evas_Object *o);
450 EAPI Eina_Bool    ewk_view_setting_encoding_custom_set(Evas_Object *o, const char *encoding);
451 EAPI const char  *ewk_view_setting_encoding_default_get(const Evas_Object *o);
452 EAPI Eina_Bool    ewk_view_setting_encoding_default_set(Evas_Object *o, const char *encoding);
453 
454 EAPI int          ewk_view_setting_font_minimum_size_get(const Evas_Object *o);
455 EAPI Eina_Bool    ewk_view_setting_font_minimum_size_set(Evas_Object *o, int size);
456 EAPI int          ewk_view_setting_font_minimum_logical_size_get(const Evas_Object *o);
457 EAPI Eina_Bool    ewk_view_setting_font_minimum_logical_size_set(Evas_Object *o, int size);
458 EAPI int          ewk_view_setting_font_default_size_get(const Evas_Object *o);
459 EAPI Eina_Bool    ewk_view_setting_font_default_size_set(Evas_Object *o, int size);
460 EAPI int          ewk_view_setting_font_monospace_size_get(const Evas_Object *o);
461 EAPI Eina_Bool    ewk_view_setting_font_monospace_size_set(Evas_Object *o, int size);
462 
463 EAPI const char  *ewk_view_setting_font_standard_get(const Evas_Object *o);
464 EAPI Eina_Bool    ewk_view_setting_font_standard_set(Evas_Object *o, const char *family);
465 
466 EAPI const char  *ewk_view_setting_font_cursive_get(const Evas_Object *o);
467 EAPI Eina_Bool    ewk_view_setting_font_cursive_set(Evas_Object *o, const char *family);
468 
469 EAPI const char  *ewk_view_setting_font_monospace_get(const Evas_Object *o);
470 EAPI Eina_Bool    ewk_view_setting_font_monospace_set(Evas_Object *o, const char *family);
471 
472 EAPI const char  *ewk_view_setting_font_fantasy_get(const Evas_Object *o);
473 EAPI Eina_Bool    ewk_view_setting_font_fantasy_set(Evas_Object *o, const char *family);
474 
475 EAPI const char  *ewk_view_setting_font_serif_get(const Evas_Object *o);
476 EAPI Eina_Bool    ewk_view_setting_font_serif_set(Evas_Object *o, const char *family);
477 
478 EAPI const char  *ewk_view_setting_font_sans_serif_get(const Evas_Object *o);
479 EAPI Eina_Bool    ewk_view_setting_font_sans_serif_set(Evas_Object *o, const char *family);
480 
481 EAPI Eina_Bool    ewk_view_setting_spatial_navigation_get(Evas_Object* o);
482 EAPI Eina_Bool    ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enable);
483 
484 EAPI Eina_Bool    ewk_view_setting_local_storage_get(Evas_Object* o);
485 EAPI Eina_Bool    ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable);
486 EAPI const char  *ewk_view_setting_local_storage_database_path_get(const Evas_Object *o);
487 EAPI Eina_Bool    ewk_view_setting_local_storage_database_path_set(Evas_Object *o, const char *path);
488 
489 EAPI Eina_Bool    ewk_view_setting_page_cache_get(Evas_Object* o);
490 EAPI Eina_Bool    ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable);
491 
492 EAPI Eina_Bool    ewk_view_setting_encoding_detector_get(Evas_Object* o);
493 EAPI Eina_Bool    ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable);
494 
495 /* to be used by subclass implementations */
496 EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
497 
498 EAPI const Eina_Rectangle *ewk_view_repaints_get(const Ewk_View_Private_Data *priv, size_t *count);
499 EAPI const Ewk_Scroll_Request *ewk_view_scroll_requests_get(const Ewk_View_Private_Data *priv, size_t *count);
500 
501 EAPI void ewk_view_repaint_add(Ewk_View_Private_Data *priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
502 
503 EAPI void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data *priv);
504 
505 EAPI void ewk_view_scrolls_process(Ewk_View_Smart_Data *sd);
506 
507 /**
508  * Structure that keeps paint context.
509  *
510  * @note this is not for general use but just for subclasses that want
511  *       to define their own backing store.
512  */
513 typedef struct _Ewk_View_Paint_Context Ewk_View_Paint_Context;
514 
515 EAPI Ewk_View_Paint_Context *ewk_view_paint_context_new(Ewk_View_Private_Data *priv, cairo_t *cr);
516 EAPI void ewk_view_paint_context_free(Ewk_View_Paint_Context *ctxt);
517 
518 EAPI void ewk_view_paint_context_save(Ewk_View_Paint_Context *ctxt);
519 EAPI void ewk_view_paint_context_restore(Ewk_View_Paint_Context *ctxt);
520 EAPI void ewk_view_paint_context_clip(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area);
521 EAPI void ewk_view_paint_context_paint(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area);
522 EAPI void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area);
523 EAPI void ewk_view_paint_context_scale(Ewk_View_Paint_Context *ctxt, float scale_x, float scale_y);
524 EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x, float y);
525 
526 EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
527 EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
528 
529 EAPI void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio , Eina_Bool* user_scalable);
530 EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale);
531 EAPI float ewk_view_zoom_range_min_get(Evas_Object* o);
532 EAPI float ewk_view_zoom_range_max_get(Evas_Object* o);
533 EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable);
534 EAPI Eina_Bool ewk_view_user_scalable_get(Evas_Object* o);
535 EAPI float ewk_view_device_pixel_ratio_get(Evas_Object* o);
536 
537 #ifdef __cplusplus
538 }
539 #endif
540 #endif // ewk_view_h
541