Merge "[UT] ewk_view_text_find, ewk_view_text_find_highlight" into tizen_2.1
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_view.h
1 /*
2    Copyright (C) 2011 Samsung Electronics
3    Copyright (C) 2012 Intel Corporation. All rights reserved.
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 /**
22  * @file    ewk_view.h
23  * @brief   WebKit main smart object.
24  *
25  * This object provides view related APIs of WebKit2 to EFL object.
26  *
27  * The following signals (see evas_object_smart_callback_add()) are emitted:
28  *
29  * - "back,forward,list,changed", void: reports that the view's back / forward list had changed.
30  * - "close,window", void: window is closed.
31  * - "create,window", Evas_Object**: a new window is created.
32  * - "download,cancelled", Ewk_Download_Job*: reports that a download was effectively cancelled.
33  * - "download,failed", Ewk_Download_Job_Error*: reports that a download failed with the given error.
34  * - "download,finished", Ewk_Download_Job*: reports that a download completed successfully.
35  * - "download,request", Ewk_Download_Job*: reports that a new download has been requested. The client should set the
36  *   destination path by calling ewk_download_job_destination_set() or the download will fail.
37  * - "form,submission,request", Ewk_Form_Submission_Request*: Reports that a form request is about to be submitted.
38  *   The Ewk_Form_Submission_Request passed contains information about the text fields of the form. This
39  *   is typically used to store login information that can be used later to pre-fill the form.
40  *   The form will not be submitted until ewk_form_submission_request_submit() is called.
41  *   It is possible to handle the form submission request asynchronously, by simply calling
42  *   ewk_form_submission_request_ref() on the request and calling ewk_form_submission_request_submit()
43  *   when done to continue with the form submission. If the last reference is removed on a
44  *   #Ewk_Form_Submission_Request and the form has not been submitted yet,
45  *   ewk_form_submission_request_submit() will be called automatically.
46  * - "icon,changed", void: reports that the view's favicon has changed.
47  * - "intent,request,new", Ewk_Intent*: reports new Web intent request.
48  * - "intent,service,register", Ewk_Intent_Service*: reports new Web intent service registration.
49  * - "load,error", const Ewk_Error*: reports main frame load failed.
50  * - "load,finished", void: reports load finished.
51  * - "load,progress", double*: load progress has changed (value from 0.0 to 1.0).
52  * - "load,provisional,failed", const Ewk_Error*: view provisional load failed.
53  * - "load,provisional,redirect", void: view received redirect for provisional load.
54  * - "load,provisional,started", void: view started provisional load.
55  * - "pageSave,success", void: page save operation was success.
56  * - "pageSave,error", void: page save operation has failed.
57  * - "policy,decision,navigation", Ewk_Navigation_Policy_Decision*: a navigation policy decision should be taken.
58  *   To make a policy decision asynchronously, simply increment the reference count of the
59  *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
60  * - "policy,decision,new,window", Ewk_Navigation_Policy_Decision*: a new window policy decision should be taken.
61  *   To make a policy decision asynchronously, simply increment the reference count of the
62  *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
63  * - "resource,request,failed", const Ewk_Resource_Load_Error*: a resource failed loading.
64  * - "resource,request,finished", const Ewk_Resource*: a resource finished loading.
65  * - "resource,request,new", const Ewk_Resource_Request*: a resource request was initiated.
66  * - "resource,request,response", Ewk_Resource_Load_Response*: a response to a resource request was received.
67  * - "resource,request,sent", const Ewk_Resource_Request*: a resource request was sent.
68  * - "text,found", unsigned int*: the requested text was found and it gives the number of matches.
69  * - "title,changed", const char*: title of the main frame was changed.
70  * - "tooltip,text,set", const char*: tooltip was set.
71  * - "tooltip,text,unset", void: tooltip was unset.
72  * - "url,changed", const char*: url of the main frame was changed.
73  * - "webprocess,crashed", Eina_Bool*: expects a @c EINA_TRUE if web process crash is handled; @c EINA_FALSE, otherwise.
74  *
75  *
76  * Tizen specific signals
77  * - "magnifier,show", void: magifier of text selection was showed.
78  * - "magnifier,hide", void: magifier of text selection was hidden.
79  */
80
81 #ifndef ewk_view_h
82 #define ewk_view_h
83
84 #include "ewk_back_forward_list.h"
85 #include "ewk_context.h"
86 #include "ewk_download_job.h"
87 #include "ewk_error.h"
88 #include "ewk_intent.h"
89 #include "ewk_resource.h"
90 #include "ewk_settings.h"
91 #include "ewk_touch.h"
92 #include "ewk_url_request.h"
93 #include "ewk_url_response.h"
94 #include <Evas.h>
95
96 // #if OS(TIZEN)
97 #include "ewk_frame.h"
98 // #endif
99
100 #include "ewk_history.h"
101
102 //#if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
103 #include "ewk_hit_test.h"
104 //#endif
105
106 //#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
107 #include "ewk_enums.h"
108 //#endif
109
110 // #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
111 #include "ewk_web_application_icon_data.h"
112 // #endif
113
114 #ifdef __cplusplus
115 extern "C" {
116 #endif
117
118 /// Enum values containing text directionality values.
119 typedef enum {
120     EWK_TEXT_DIRECTION_RIGHT_TO_LEFT,
121     EWK_TEXT_DIRECTION_LEFT_TO_RIGHT
122 } Ewk_Text_Direction;
123
124 typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
125 typedef struct Ewk_View_Smart_Class Ewk_View_Smart_Class;
126
127 // #if OS(TIZEN)
128 /// Creates a type name for _Ewk_Event_Gesture.
129 typedef struct Ewk_Event_Gesture Ewk_Event_Gesture;
130
131 /// Represents a gesture event.
132 struct Ewk_Event_Gesture {
133     Ewk_Gesture_Type type; /**< type of the gesture event */
134     Evas_Coord_Point position; /**< position of the gesture event */
135     Evas_Point velocity; /**< velocity of the gesture event. The unit is pixel per second. */
136     double scale; /**< scale of the gesture event */
137     int count; /**< count of the gesture */
138     unsigned int timestamp; /**< timestamp of the gesture */
139 };
140
141 // #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
142 /**
143  * \enum    Ewk_Input_Type
144  * @brief   Provides type of focused input element
145  */
146 enum Ewk_Input_Type {
147     EWK_INPUT_TYPE_TEXT,
148     EWK_INPUT_TYPE_TELEPHONE,
149     EWK_INPUT_TYPE_NUMBER,
150     EWK_INPUT_TYPE_EMAIL,
151     EWK_INPUT_TYPE_URL,
152     EWK_INPUT_TYPE_PASSWORD,
153     EWK_INPUT_TYPE_COLOR,
154     EWK_INPUT_TYPE_DATE,
155     EWK_INPUT_TYPE_DATETIME,
156     EWK_INPUT_TYPE_DATETIMELOCAL,
157     EWK_INPUT_TYPE_MONTH,
158     EWK_INPUT_TYPE_TIME,
159     EWK_INPUT_TYPE_WEEK
160 };
161 typedef enum Ewk_Input_Type Ewk_Input_Type;
162 // #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
163 // #endif // #if OS(TIZEN)
164
165 /// Ewk view's class, to be overridden by sub-classes.
166 struct Ewk_View_Smart_Class {
167     Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
168     unsigned long version;
169
170     Eina_Bool (*popup_menu_show)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Eina_List* items, int selected_index);
171 //#if ENABLE(TIZEN_MULTIPLE_SELECT)
172     Eina_Bool (*multiple_popup_menu_show)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect,Ewk_Text_Direction text_direction, double page_scale_factor, Eina_List* items);
173 //#endif
174     Eina_Bool (*popup_menu_hide)(Ewk_View_Smart_Data *sd);
175     Eina_Bool (*popup_menu_update)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect, Ewk_Text_Direction text_direction, Eina_List* items, int selected_index);
176
177 // #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
178     Eina_Bool (*text_selection_down)(Ewk_View_Smart_Data *sd, int x, int y);
179     Eina_Bool (*text_selection_move)(Ewk_View_Smart_Data *sd, int x, int y);
180     Eina_Bool (*text_selection_up)(Ewk_View_Smart_Data *sd, int x, int y);
181 // #endif
182
183 //#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
184     Eina_Bool (*input_picker_show)(Ewk_View_Smart_Data *sd, Ewk_Input_Type inputType, const char* inputValue);
185 //#endif
186
187 //#if ENABLE(TIZEN_DATALIST_ELEMENT)
188     Eina_Bool (*data_list_show)(Ewk_View_Smart_Data *sd, Ewk_Input_Type inputType, Eina_List *optionList);
189     Eina_Bool (*data_list_hide)(Ewk_View_Smart_Data *sd, Ewk_Input_Type inputType);
190 // #endif
191
192 // #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
193     Eina_Bool (*orientation_lock)(Ewk_View_Smart_Data *sd, int orientations);
194     void (*orientation_unlock)(Ewk_View_Smart_Data *sd);
195 // #endif
196
197     // event handling:
198     //  - returns true if handled
199     //  - if overridden, have to call parent method if desired
200     Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd);
201     Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd);
202     Eina_Bool (*fullscreen_enter)(Ewk_View_Smart_Data *sd);
203     Eina_Bool (*fullscreen_exit)(Ewk_View_Smart_Data *sd);
204     Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev);
205     Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev);
206     Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev);
207     Eina_Bool (*mouse_move)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Move *ev);
208     Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev);
209     Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev);
210
211     // javascript popup:
212     //   - All strings should be guaranteed to be stringshared.
213     void (*run_javascript_alert)(Ewk_View_Smart_Data *sd, const char *message);
214     Eina_Bool (*run_javascript_confirm)(Ewk_View_Smart_Data *sd, const char *message);
215     const char *(*run_javascript_prompt)(Ewk_View_Smart_Data *sd, const char *message, const char *default_value); /**< return string should be stringshared. */
216
217     // color picker:
218     //   - Shows and hides color picker.
219     Eina_Bool (*input_picker_color_request)(Ewk_View_Smart_Data *sd, int r, int g, int b, int a);
220     Eina_Bool (*input_picker_color_dismiss)(Ewk_View_Smart_Data *sd);
221
222     // storage:
223     //   - Web database.
224     unsigned long long (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, const char *databaseName, const char *displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
225
226 // #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
227     Eina_Bool (*formdata_candidate_show)(Ewk_View_Smart_Data *sd, int x, int y, int w, int h);
228     Eina_Bool (*formdata_candidate_hide)(Ewk_View_Smart_Data *sd);
229     Eina_Bool (*formdata_candidate_update_data)(Ewk_View_Smart_Data *sd, Eina_List *dataList);
230     Eina_Bool (*formdata_candidate_is_showing)(Ewk_View_Smart_Data *sd);
231 // #endif
232
233 //#if OS(TIZEN)
234     Eina_Bool (*gesture_start)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
235     Eina_Bool (*gesture_end)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
236     Eina_Bool (*gesture_move)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
237 //#endif
238
239 //#if ENABLE(TIZEN_SCREEN_READER)
240     Eina_Bool (*screen_reader_command_execute)(Ewk_View_Smart_Data *sd, unsigned int command, int data1, int data2);
241 //#endif
242 };
243
244 // #if OS(TIZEN)
245 /**
246  * Callback for ewk_view_web_app_capable_get
247  *
248  * @param capable web application capable
249  * @param user_data user_data will be passsed when ewk_view_web_app_capable_get is called
250  */
251 typedef void (*Ewk_Web_App_Capable_Get_Callback)(Eina_Bool capable, void* user_data);
252
253 /**
254  * Callback for ewk_view_web_app_icon_get
255  *
256  * @param icon_url web application icon
257  * @param user_data user_data will be passsed when ewk_view_web_app_icon_get is called
258  */
259 typedef void (*Ewk_Web_App_Icon_URL_Get_Callback)(const char* icon_url, void* user_data);
260
261 /**
262  * Callback for ewk_view_web_app_icon_urls_get.
263  *
264  * @param icon_urls list of Ewk_Web_App_Icon_Data for web app
265  * @param user_data user_data will be passsed when ewk_view_web_app_icon_urls_get is called
266  */
267 typedef void (*Ewk_Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *user_data);
268 // #endif
269
270 /**
271  * The version you have to put into the version field
272  * in the @a Ewk_View_Smart_Class structure.
273  */
274 #define EWK_VIEW_SMART_CLASS_VERSION 6UL
275
276 /**
277  * Initializer for whole Ewk_View_Smart_Class structure.
278  *
279  * @param smart_class_init initializer to use for the "base" field
280  * (Evas_Smart_Class).
281  *
282  * @see EWK_VIEW_SMART_CLASS_INIT_NULL
283  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
284  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
285  */
286 #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, 0, 0, 0, 0}
287
288 /**
289  * Initializer to zero a whole Ewk_View_Smart_Class structure.
290  *
291  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
292  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
293  * @see EWK_VIEW_SMART_CLASS_INIT
294  */
295 #define EWK_VIEW_SMART_CLASS_INIT_NULL EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL)
296
297 /**
298  * Initializer to zero a whole Ewk_View_Smart_Class structure and set
299  * name and version.
300  *
301  * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of
302  * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
303  * to the specific value.
304  *
305  * It will keep a reference to name field as a "const char *", that is,
306  * name must be available while the structure is used (hint: static or global!)
307  * and will not be modified.
308  *
309  * @see EWK_VIEW_SMART_CLASS_INIT_NULL
310  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
311  * @see EWK_VIEW_SMART_CLASS_INIT
312  */
313 #define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
314
315 typedef struct EwkViewImpl EwkViewImpl;
316 /**
317  * @brief Contains an internal View data.
318  *
319  * It is to be considered private by users, but may be extended or
320  * changed by sub-classes (that's why it's in public header file).
321  */
322 struct Ewk_View_Smart_Data {
323     Evas_Object_Smart_Clipped_Data base;
324     const Ewk_View_Smart_Class* api; /**< reference to casted class instance */
325     Evas_Object* self; /**< reference to owner object */
326     Evas_Object* image; /**< reference to evas_object_image for drawing web contents */
327     EwkViewImpl* priv; /**< should never be accessed, c++ stuff */
328     struct {
329         Evas_Coord x, y, w, h; /**< last used viewport */
330     } view;
331     struct { /**< what changed since last smart_calculate */
332         Eina_Bool any:1;
333         Eina_Bool size:1;
334         Eina_Bool position:1;
335     } changed;
336 };
337
338 /// Creates a type name for Ewk_Resource_Request.
339 typedef struct Ewk_Resource_Request Ewk_Resource_Request;
340
341 /**
342  * @brief Structure containing details about a resource request.
343  */
344 struct Ewk_Resource_Request {
345     Ewk_Resource *resource; /**< resource being requested */
346     Ewk_Url_Request *request; /**< URL request for the resource */
347     Ewk_Url_Response *redirect_response; /**< Possible redirect response for the resource or @c NULL */
348 };
349
350 /// Creates a type name for Ewk_Resource_Load_Response.
351 typedef struct Ewk_Resource_Load_Response Ewk_Resource_Load_Response;
352
353 /**
354  * @brief Structure containing details about a response to a resource request.
355  */
356 struct Ewk_Resource_Load_Response {
357     Ewk_Resource *resource; /**< resource requested */
358     Ewk_Url_Response *response; /**< resource load response */
359 };
360
361 /// Creates a type name for Ewk_Resource_Load_Error.
362 typedef struct Ewk_Resource_Load_Error Ewk_Resource_Load_Error;
363
364 /**
365  * @brief Structure containing details about a resource load error.
366  *
367  * Details given about a resource load failure.
368  */
369 struct Ewk_Resource_Load_Error {
370     Ewk_Resource *resource; /**< resource that failed loading */
371     Ewk_Error *error; /**< load error */
372 };
373
374 /// Creates a type name for Ewk_Download_Job_Error.
375 typedef struct Ewk_Download_Job_Error Ewk_Download_Job_Error;
376
377 /**
378  * @brief Structure containing details about a download failure.
379  */
380 struct Ewk_Download_Job_Error {
381     Ewk_Download_Job *download_job; /**< download that failed */
382     Ewk_Error *error; /**< download error */
383 };
384
385 /// Enum values containing page contents type values.
386 typedef enum {
387     EWK_PAGE_CONTENTS_TYPE_MHTML,
388     EWK_PAGE_CONTENTS_TYPE_STRING
389 } Ewk_Page_Contents_Type;
390
391 /**
392  * Creates a type name for the callback function used to get the page contents.
393  *
394  * @param type type of the contents
395  * @param data string buffer of the contents
396  */
397 typedef void (*Ewk_Page_Contents_Cb)(Ewk_Page_Contents_Type type, const char *data);
398
399 /// Creates a type name for Ewk_Page_Contents_Context.
400 typedef struct Ewk_Page_Contents_Context Ewk_Page_Contents_Context;
401
402 /*
403  * @brief Structure containing page contents context used for ewk_view_page_contents_get() API.
404  */
405 struct Ewk_Page_Contents_Context {
406     Ewk_Page_Contents_Type type;
407     Ewk_Page_Contents_Cb callback;
408 };
409
410 /**
411  * Sets the smart class APIs, enabling view to be inherited.
412  *
413  * @param api class definition to set, all members with the
414  *        exception of @a Evas_Smart_Class->data may be overridden, must
415  *        @b not be @c NULL
416  *
417  * @note @a Evas_Smart_Class->data is used to implement type checking and
418  *       is not supposed to be changed/overridden. If you need extra
419  *       data for your smart class to work, just extend
420  *       Ewk_View_Smart_Class instead.
421  *       The Evas_Object which inherits the ewk_view should use
422  *       ewk_view_smart_add() to create Evas_Object instead of
423  *       evas_object_smart_add() because it performs additional initialization
424  *       for the ewk_view.
425  *
426  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (probably
427  *         version mismatch)
428  *
429  * @see ewk_view_smart_add()
430  */
431 EAPI Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class *api);
432
433 /**
434  * Creates a new EFL WebKit view object with Evas_Smart and Ewk_Context.
435  *
436  * @note The Evas_Object which inherits the ewk_view should create its
437  *       Evas_Object using this API instead of evas_object_smart_add()
438  *       because the default initialization for ewk_view is done in this API.
439  *
440  * @param e canvas object where to create the view object
441  * @param smart Evas_Smart object. Its type should be EWK_VIEW_TYPE_STR
442  * @param context Ewk_Context object which is used for initializing
443  *
444  * @return view object on success or @c NULL on failure
445  */
446 EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context);
447
448 /**
449  * Enum values used to specify search options.
450  * @brief   Provides option to find text
451  * @info    Keep this in sync with WKFindOptions.h
452  */
453 enum Ewk_Find_Options {
454     EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
455     EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
456     EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
457     EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */
458     EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */
459     EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */
460     EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */
461     EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
462     EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
463 };
464 typedef enum Ewk_Find_Options Ewk_Find_Options;
465
466 /**
467  * Creates a new EFL WebKit view object.
468  *
469  * @param e canvas object where to create the view object
470  *
471  * @return view object on success or @c NULL on failure
472  */
473 EAPI Evas_Object *ewk_view_add(Evas *e);
474
475 /**
476  * Creates a new EFL WebKit view object based on specific Ewk_Context.
477  *
478  * @param e canvas object where to create the view object
479  * @param context Ewk_Context object to declare process model
480  *
481  * @return view object on success or @c NULL on failure
482  */
483 EAPI Evas_Object *ewk_view_add_with_context(Evas *e, Ewk_Context *context);
484
485 /**
486  * Gets the Ewk_Context of this view.
487  *
488  * @param o the view object to get the Ewk_Context
489  *
490  * @return the Ewk_Context of this view or @c NULL on failure
491  */
492 EAPI Ewk_Context *ewk_view_context_get(const Evas_Object *o);
493
494 /**
495  * Asks the object to load the given URL.
496  *
497  * @param o view object to load @a URL
498  * @param url uniform resource identifier to load
499  *
500  * @return @c EINA_TRUE is returned if @a o is valid, irrespective of load,
501  *         or @c EINA_FALSE on failure
502  */
503 EAPI Eina_Bool ewk_view_url_set(Evas_Object *o, const char *url);
504
505 /**
506  * Returns the current URL string of view object.
507  *
508  * It returns an internal string and should not
509  * be modified. The string is guaranteed to be stringshared.
510  *
511  * @param o view object to get current URL
512  *
513  * @return current URL on success or @c NULL on failure
514  */
515 EAPI const char *ewk_view_url_get(const Evas_Object *o);
516
517 /**
518  * Returns the current icon URL of view object.
519  *
520  * It returns an internal string and should not
521  * be modified. The string is guaranteed to be stringshared.
522  *
523  * @param o view object to get current icon URL
524  *
525  * @return current icon URL on success or @c NULL if unavailable or on failure
526  */
527 EAPI const char *ewk_view_icon_url_get(const Evas_Object *o);
528
529 /**
530  * Asks the main frame to reload the current document.
531  *
532  * @param o view object to reload current document
533  *
534  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
535  *
536  * @see ewk_view_reload_bypass_cache()
537  */
538 EAPI Eina_Bool    ewk_view_reload(Evas_Object *o);
539
540 /**
541  * Reloads the current page's document without cache.
542  *
543  * @param o view object to reload current document
544  *
545  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
546  */
547 EAPI Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *o);
548
549 /**
550  * Asks the main frame to stop loading.
551  *
552  * @param o view object to stop loading
553  *
554  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise.
555  */
556 EAPI Eina_Bool ewk_view_stop(Evas_Object* o);
557
558 /**
559  * Gets the Ewk_Settings of this view.
560  *
561  * @param o view object to get Ewk_Settings
562  *
563  * @return the Ewk_Settings of this view or @c NULL on failure
564  */
565 EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
566
567 // #if OS(TIZEN)
568
569 enum Ewk_Page_Visibility_State {
570     EWK_PAGE_VISIBILITY_STATE_VISIBLE,
571     EWK_PAGE_VISIBILITY_STATE_HIDDEN,
572     EWK_PAGE_VISIBILITY_STATE_PRERENDER
573 };
574 typedef enum Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
575
576 enum Ewk_Http_Method {
577     EWK_HTTP_METHOD_GET,
578     EWK_HTTP_METHOD_HEAD,
579     EWK_HTTP_METHOD_POST,
580     EWK_HTTP_METHOD_PUT,
581     EWK_HTTP_METHOD_DELETE,
582 };
583 typedef enum Ewk_Http_Method Ewk_Http_Method;
584
585 /**
586  * Callback for ewk_view_script_execute
587  *
588  * @param o the view object
589  * @param result_value value returned by script
590  * @param user_data user data
591  */
592 typedef void (*Ewk_View_Script_Execute_Callback)(Evas_Object* o, const char* result_value, void* user_data);
593
594 /**
595  * Callback for ewk_view_plain_text_get
596  *
597  * @param o the view object
598  * @param plain_text the contents of the given frame converted to plain text
599  * @param user_data user data
600  */
601 typedef void (*Ewk_View_Plain_Text_Get_Callback)(Evas_Object* o, const char* plain_text, void* user_data);
602
603 // #if ENABLE(TIZEN_SUPPORT_MHTML)
604 /**
605  * Creates a type name for the callback function used to get the page contents.
606  *
607  * @param o view object
608  * @param data mhtml data of the page contents
609  * @param user_data user data will be passed when ewk_view_mhtml_data_get is called
610  */
611 typedef void (*Ewk_View_MHTML_Data_Get_Callback)(Evas_Object *o, const char *data, void *user_data);
612 // #endif // ENABLE(TIZEN_SUPPORT_MHTML)
613
614 /**
615  * Gets the Ewk_Context of this view.
616  *
617  * @param o the view object to get the WKPageRef
618  *
619  * @return the Ewk_Context of this view
620  */
621 EAPI Ewk_Context* ewk_view_context_get(const Evas_Object* o);
622
623 /**
624  * Gets the reference object for frame that represents the main frame.
625  *
626  * @param o view object to get main frame
627  *
628  * @return frame reference of frame object on success, or NULL on failure
629  */
630 EAPI Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o);
631
632 /**
633  * Gets the reference obect for the currently focused frame.
634  *
635  * @param o view object to get main frame
636  *
637  * @return frame reference of frame object on success, or NULL on failure
638  */
639 EAPI Ewk_Frame_Ref ewk_view_focused_frame_get(Evas_Object* o);
640
641 EAPI Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* o);
642 EAPI void ewk_view_horizontal_panning_hold_set(Evas_Object* o, Eina_Bool hold);
643 EAPI Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* o);
644 EAPI void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hold);
645
646 /**
647  * Gets the minimum and maximum value of the scale range or -1 on failure
648  *
649  * @param o view object to get the minimum and maximum value of the scale range
650  * @param min_scale Pointer to an double in which to store the minimum scale factor of the object.
651  * @param max_scale Pointer to an double in which to store the maximum scale factor of the object.
652  *
653  * @note Use @c NULL pointers on the scale components you're not
654  * interested in: they'll be ignored by the function.
655  */
656 EAPI void ewk_view_scale_range_get(Evas_Object* o, double* min_scale, double* max_scale);
657
658 /**
659  * Gets the current text zoom level.
660  *
661  * @param o view object to get the zoom level
662  *
663  * @return current zoom level in use on success or @c -1.0 on failure
664  */
665 EAPI double ewk_view_text_zoom_get(const Evas_Object* o);
666
667 /**
668  * Sets the current text zoom level.
669  *
670  * @param o view object to set the zoom level
671  * @param textZoomFactor a new level to set
672  *
673  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
674  */
675 EAPI Eina_Bool ewk_view_text_zoom_set(Evas_Object* o, double text_zoom_factor);
676
677 EAPI void ewk_view_suspend(Evas_Object* o);
678 EAPI void ewk_view_resume(Evas_Object* o);
679
680 typedef Eina_Bool (*Ewk_View_JavaScript_Alert_Callback)(Evas_Object* o, const char* alert_text, void* user_data);
681 EAPI void ewk_view_javascript_alert_callback_set(Evas_Object* o, Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
682 EAPI void ewk_view_javascript_alert_reply(Evas_Object* o);
683
684 typedef Eina_Bool (*Ewk_View_JavaScript_Confirm_Callback)(Evas_Object* o, const char* message, void* user_data);
685 EAPI void ewk_view_javascript_confirm_callback_set(Evas_Object* o, Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
686 EAPI void ewk_view_javascript_confirm_reply(Evas_Object* o, Eina_Bool result);
687
688 typedef Eina_Bool (*Ewk_View_JavaScript_Prompt_Callback)(Evas_Object* o, const char* message, const char* default_value, void* user_data);
689 EAPI void ewk_view_javascript_prompt_callback_set(Evas_Object* o, Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
690 EAPI void ewk_view_javascript_prompt_reply(Evas_Object* o, const char* result);
691
692 //#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
693 typedef Eina_Bool (*Ewk_View_Before_Unload_Confirm_Panel_Callback)(Evas_Object* o, const char* message, void* user_data);
694 EAPI void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* o, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* user_data);
695 EAPI void ewk_view_before_unload_confirm_panel_reply(Evas_Object* o, Eina_Bool result);
696 //#endif
697
698 typedef Eina_Bool (*Ewk_View_Open_Panel_Callback)(Evas_Object* o, Eina_Bool allow_multiple_files, Eina_List* accepted_mime_types, const char* capture, void* user_data);
699 EAPI void ewk_view_open_panel_callback_set(Evas_Object* o, Ewk_View_Open_Panel_Callback callback, void* user_data);
700 EAPI void ewk_view_open_panel_reply(Evas_Object* o, Eina_List* file_url, Eina_Bool result);
701
702 //#if ENABLE(TIZEN_APPLICATION_CACHE)
703 typedef Eina_Bool (*Ewk_View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Ewk_Security_Origin* origin,  void* user_data);
704 EAPI void ewk_view_application_cache_permission_callback_set(Evas_Object* o, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* user_data);
705 EAPI void ewk_view_application_cache_permission_reply(Evas_Object* o, Eina_Bool allow);
706 //#endif
707
708 //#if ENABLE(TIZEN_INDEXED_DATABASE)
709 typedef Eina_Bool (*Ewk_View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin,  long long currentQuota, void* user_data);
710 EAPI void ewk_view_exceeded_indexed_database_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* user_data);
711 EAPI void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* o, Eina_Bool allow);
712 //#endif
713
714 /**
715  * Gets the Ewk_Settings of this view.
716  *
717  * @param o view object to get Ewk_Settings
718  *
719  * @return the Ewk_Settings of this view or @c NULL on failure
720  */
721 EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
722
723 /**
724  * Delivers a Web intent to the view's main frame.
725  *
726  * @param o view object to deliver the intent to
727  *
728  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise.
729  */
730 EAPI Eina_Bool    ewk_view_intent_deliver(Evas_Object *o, Ewk_Intent *intent);
731
732 /**
733  * Asks the main frame to navigate back in the history.
734  *
735  * @param o view object to navigate back
736  *
737  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
738  *
739  * @see ewk_frame_back()
740  */
741 EAPI Eina_Bool    ewk_view_back(Evas_Object *o);
742
743 /**
744  * Asks the main frame to navigate forward in the history.
745  *
746  * @param o view object to navigate forward
747  *
748  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
749  *
750  * @see ewk_frame_forward()
751  */
752 EAPI Eina_Bool    ewk_view_forward(Evas_Object *o);
753
754 /**
755  * Queries if it is possible to navigate backwards one item in the history.
756  *
757  * @param o view object to query if backward navigation is possible
758  *
759  * @return @c EINA_TRUE if it is possible to navigate backwards in the history, @c EINA_FALSE otherwise
760  */
761 EAPI Eina_Bool    ewk_view_back_possible(Evas_Object *o);
762
763 /**
764  * Queries if it is possible to navigate forwards one item in the history.
765  *
766  * @param o view object to query if forward navigation is possible
767  *
768  * @return @c EINA_TRUE if it is possible to navigate forwards in the history, @c EINA_FALSE otherwise
769  */
770 EAPI Eina_Bool    ewk_view_forward_possible(Evas_Object *o);
771
772 /**
773  * Gets the back-forward list associated with this view.
774  *
775  * The returned instance is unique for this view and thus multiple calls
776  * to this function with the same view as parameter returns the same
777  * handle. This handle is alive while view is alive, thus one
778  * might want to listen for EVAS_CALLBACK_DEL on given view
779  * (@a o) to know when to stop using returned handle.
780  *
781  * @param o view object to get navigation back-forward list
782  *
783  * @return the back-forward list instance handle associated with this view
784  */
785 EAPI Ewk_Back_Forward_List *ewk_view_back_forward_list_get(const Evas_Object *o);
786
787 /**
788  * Gets the current title of the main frame.
789  *
790  * It returns an internal string and should not
791  * be modified. The string is guaranteed to be stringshared.
792  *
793  * @param o view object to get current title
794  *
795  * @return current title on success or @c NULL on failure
796  */
797 EAPI const char *ewk_view_title_get(const Evas_Object *o);
798
799 /**
800  * Gets the current load progress of page.
801  *
802  * The progress estimation from 0.0 to 1.0.
803  *
804  * @param o view object to get the current progress
805  *
806  * @return the load progress of page, value from 0.0 to 1.0,
807  *         or @c -1.0 on failure
808  */
809 EAPI double ewk_view_load_progress_get(const Evas_Object *o);
810
811 /*
812  * Requests loading of the given request data.
813  *
814  * @param o view object to load
815  * @param url uniform resource identifier to load
816  * @param method http method
817  * @param headers http headers
818  * @param body http body data
819  *
820  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
821  */
822 EAPI Eina_Bool ewk_view_url_request_set(Evas_Object* o, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body);
823
824 /**
825  * Requests the specified plain text string into the view object
826  *
827  * @note The mime type of document will be "text/plain".
828  *
829  * @return the load progress of page, value from 0.0 to 1.0,
830  *         or @c -1.0 on failure
831  */
832 EAPI Eina_Bool ewk_view_plain_text_set(Evas_Object* o, const char* plain_text);
833
834 /**
835  * Requests loading the given contents by mime type into the view object.
836  *
837  * @param o view object to load
838  * @param contents what to load
839  * @param contents_size size of @a contents (in bytes),
840  * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
841  * @param encoding encoding for @a contents data, if @c 0 is given "UTF-8" is assumed
842  * @param base_uri base uri to use for relative resources, may be @c 0,
843  *        if provided @b must be an absolute uri
844  *
845  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
846  */
847 EAPI Eina_Bool ewk_view_contents_set(Evas_Object* o, const char* contents, size_t contents_size, char* mime_type, char* encoding, char* base_uri);
848
849 /**
850  * Requests loading the given contents.
851  *
852  * @param o view object to load document
853  * @param html what to load
854  * @param base_uri base uri to use for relative resources, may be @c 0,
855  *        if provided @b must be an absolute uri
856  *
857  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
858  */
859 EAPI Eina_Bool ewk_view_html_contents_set(Evas_Object* o, const char* html, const char* base_uri);
860
861 /**
862  * Requests for setting page visibility state.
863  *
864  * @param o view object to set the page visibility
865  * @param page_visibility_state visible state of the page to set
866  * @param initial_state @c EINA_TRUE if this function is called at page initialization time,
867  *                     @c EINA_FALSE otherwise
868  *
869  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
870  */
871 EAPI Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* o, Ewk_Page_Visibility_State page_visibility_state, Eina_Bool initial_state);
872
873 /**
874 * Request to set the user agent string.
875 *
876 * @param o view object to set the user agent string
877 *
878 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
879 */
880 EAPI Eina_Bool ewk_view_user_agent_set(Evas_Object* o, const char* user_agent);
881
882 /**
883 * Returns user agent string.
884 *
885 * @param o view object to get the user agent string
886 *
887 * @return @c user agent string
888 */
889 EAPI const char* ewk_view_user_agent_get(const Evas_Object* o);
890 //#if ENABLE(TIZEN_CUSTOM_HEADERS)
891 /**
892 * add custom header
893 *
894 * @param o view object to add custom header
895 *
896 * @param name custom header name to add the custom header
897 *
898 * @param value custom header value to add the custom header
899 *
900 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
901 */
902 EAPI Eina_Bool ewk_view_custom_header_add(const Evas_Object* o, const char* name, const char* value);
903 /**
904 * remove custom header
905 *
906 * @param o view object to remove custom header
907 *
908 * @param name custom header name to remove the custom header
909 *
910 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
911 */
912 EAPI Eina_Bool ewk_view_custom_header_remove(const Evas_Object* o, const char* name);
913 /**
914 * clears all custom headers
915 *
916 * @param o view object to clear custom headers
917 *
918 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
919 */
920 EAPI Eina_Bool ewk_view_custom_header_clear(const Evas_Object* o);
921 //#endif
922
923 //#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
924 /**
925  * Request to set the current page's visibility.
926  *
927  * @param o view object to set the visibility.
928  * @param enable EINA_TRUE to set on the visibility of the page, EINA_FALSE otherwise.
929  *
930  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
931  */
932 EAPI Eina_Bool ewk_view_visibility_set(Evas_Object* o, Eina_Bool enable);
933 //#endif
934
935 /**
936  * Returns the evas image object of the specified viewArea of page
937  *
938  * The returned evas image object @b should be freed after use.
939  *
940  * @param o view object to get specified rectangle of cairo surface.
941  * @param viewArea rectangle of cairo surface.
942  * @param scaleFactor scale factor of cairo surface.
943  * @param canvas canvas for creating evas image.
944  *
945  * @return newly allocated evas image object on sucess or @c 0 on failure.
946  */
947 EAPI Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* o, Eina_Rectangle viewArea, float scaleFactor, Evas* canvas);
948
949 // #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
950 /**
951  * Start a server for inspecting web pages
952  * This server will be used by Remote Web Browser to transfer messages over network
953  *
954  * @param [o] view object to debug
955  * @param [in] port It is a port number for the server. A free port on system will be allocated if port is 0
956  *
957  * @return @c assigned port number on success or @c 0 on failure
958  */
959 EAPI unsigned int ewk_view_inspector_server_start(Evas_Object* o, unsigned int port);
960
961 /**
962  * Stop a server for inspecting web pages
963  *
964  * @param [o] view object to debug
965  *
966  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
967  */
968 EAPI Eina_Bool ewk_view_inspector_server_stop(Evas_Object* o);
969 // #endif
970 //
971 /**
972  * Scrolls webpage of view by dx and dy.
973  *
974  * @param o view object to scroll
975  * @param dx horizontal offset to scroll
976  * @param dy vertical offset to scroll
977  */
978 EAPI void ewk_view_scroll_by(Evas_Object* o, int dx, int dy);
979
980 /**
981  * Gets the current scroll position of given view.
982  *
983  * @param o view object to get the current scroll position
984  * @param x the pointer to store the horizontal position, may be @c 0
985  * @param y the pointer to store the vertical position, may be @c 0
986  *
987  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
988  *         values are zeroed.
989  */
990 EAPI Eina_Bool ewk_view_scroll_pos_get(Evas_Object* o, int* x, int* y);
991
992 /**
993  * Sets an absolute scroll of the given view.
994  *
995  * Both values are from zero to the contents size minus the viewport
996  * size.
997  *
998  * @param o view object to scroll
999  * @param x horizontal position to scroll
1000  * @param y vertical position to scroll
1001  *
1002  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
1003  */
1004 EAPI Eina_Bool ewk_view_scroll_set(Evas_Object* o, int x, int y);
1005
1006 /**
1007  * Gets the possible scroll size of the given view.
1008  *
1009  * Possible scroll size is contents size minus the viewport size.
1010  *
1011  * @param o view object to get scroll size
1012  * @param w the pointer to store the horizontal size that is possible to scroll,
1013  *        may be @c 0
1014  * @param h the pointer to store the vertical size that is possible to scroll,
1015  *        may be @c 0
1016  *
1017  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
1018  *         values are zeroed
1019  */
1020 EAPI Eina_Bool ewk_view_scroll_size_get(const Evas_Object* o, int* w, int* h);
1021
1022 /**
1023  * Requests for getting web application capable.
1024  *
1025  * @param callback result callback to get web database quota
1026  * @param user_data user_data will be passed when result_callback is called
1027  *    -I.e., user data will be kept until callback is called
1028  *
1029  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1030  */
1031 EAPI Eina_Bool ewk_view_web_application_capable_get(Evas_Object* o, Ewk_Web_App_Capable_Get_Callback callback, void* user_data);
1032
1033 /**
1034  * Requests for getting web application icon string.
1035  *
1036  * @param callback result callback to get web database quota
1037  * @param user_data user_data will be passed when result_callback is called
1038  *    -I.e., user data will be kept until callback is called
1039  *
1040  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1041  */
1042 EAPI Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* o, Ewk_Web_App_Icon_URL_Get_Callback callback, void* user_data);
1043
1044 /**
1045  * Requests for getting web application icon list of Ewk_Web_App_Icon_Data.
1046  *
1047  * @param callback result callback to get web application icon urls
1048  * @param user_data user_data will be passed when result_callback is called
1049  *    -I.e., user data will be kept until callback is called
1050  *
1051  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1052  */
1053 EAPI Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object *o, Ewk_Web_App_Icon_URLs_Get_Callback callback, void *user_data);
1054
1055 /**
1056  * Executes editor command.
1057  *
1058  * @param o view object to execute command
1059  * @param command editor command to execute
1060  * @param value the value to be passed into command
1061  *
1062  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1063  */
1064 EAPI Eina_Bool ewk_view_command_execute(Evas_Object* o, const char* command, const char* value);
1065
1066 /**
1067  * Gets last known contents size.
1068  *
1069  * @param o view object to get contents size
1070  * @param width pointer to store contents size width, may be @c 0
1071  * @param height pointer to store contents size height, may be @c 0
1072  *
1073  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure and
1074  *         @a width and @a height will be zeroed
1075  */
1076 EAPI Eina_Bool ewk_view_contents_size_get(Evas_Object* o, Evas_Coord* width, Evas_Coord* height);
1077
1078 /**
1079  * Create PDF file of page contents
1080  *
1081  * @param o view object to get page contents.
1082  * @param width the suface width of PDF file.
1083  * @param height the suface height of PDF file.
1084  * @param fileName the file name for creating PDF file.
1085  *
1086  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1087  */
1088 EAPI Eina_Bool ewk_view_contents_pdf_get_temp(Evas_Object* o, int width, int height, const char* fileName);
1089 EAPI Eina_Bool ewk_view_contents_pdf_get(Evas_Object* o, int width, int height, const char* fileName);
1090
1091 // #if ENABLE(TIZEN_WEB_STORAGE)
1092 /**
1093  * Callback for ewk_view_web_storage_quota_get
1094  *
1095  * @param quota web storage quota
1096  * @param user_data user_data will be passed when ewk_view_web_storage_quota_get is called
1097  */
1098 typedef void (*Ewk_Web_Storage_Quota_Get_Callback)(uint32_t quota, void* user_data);
1099
1100 /**
1101  * Requests for getting web storage quota.
1102  *
1103  * @param o view object to get web storage quota
1104  * @param result_cb callback to get web database origins
1105  * @param user_data user_data will be passed when result_cb is called
1106  *    -I.e., user data will be kept until callback is called
1107  *
1108  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1109  */
1110 EAPI Eina_Bool ewk_view_web_storage_quota_get(const Evas_Object* o, Ewk_Web_Storage_Quota_Get_Callback result_callback, void* user_data);
1111
1112 /**
1113  * Requests for setting web storage quota.
1114  *
1115  * @param o view object to set web storage quota
1116  * @param quota quota to store web storage db.
1117  *
1118  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1119  */
1120 EAPI Eina_Bool ewk_view_web_storage_quota_set(Evas_Object* o, uint32_t quota);
1121 // #endif // #if ENABLE(TIZEN_WEB_STORAGE)
1122
1123 /**
1124  * Requests execution of the given script.
1125  *
1126  * @note This allows to use NULL for the callback parameter.
1127  *       So, if the result data from the script is not required, NULL might be used for the callback parameter.
1128  *
1129  * @param o view object to execute script
1130  * @param script Java Script to execute
1131  * @param callback result callback
1132  * @param user_data user data
1133  *
1134  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1135  */
1136 EAPI Eina_Bool ewk_view_script_execute(Evas_Object* o, const char* script, Ewk_View_Script_Execute_Callback callback, void* user_data);
1137
1138 /**
1139  * Retrieve the contents in plain text.
1140  *
1141  * @param o view object whose contents to retrieve.
1142  * @param callback result callback
1143  * @param user_data user data
1144  *
1145  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1146  */
1147 EAPI Eina_Bool ewk_view_plain_text_get(Evas_Object* o, Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
1148
1149 // #if ENABLE(TIZEN_SUPPORT_MHTML)
1150 /**
1151  * Get page contents as MHTML data
1152  *
1153  * @param o view object to get the page contents
1154  * @param callback callback function to be called when the operation is finished
1155  * @param user_data user data to be passed to the callback function
1156  *
1157  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1158  */
1159 EAPI Eina_Bool ewk_view_mhtml_data_get(Evas_Object *o, Ewk_View_MHTML_Data_Get_Callback callback, void *user_data);
1160 // #endif // ENABLE(TIZEN_SUPPORT_MHTML)
1161
1162 // #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
1163 /**
1164  * Creates a new hit test for the given veiw object and point.
1165  *
1166  * The returned object should be freed by ewk_hit_test_free().
1167  *
1168  * @param o view object to do hit test on
1169  * @param x the horizontal position to query
1170  * @param y the vertical position to query
1171  * @param hit_test_mode the Ewk_Hit_Test_Mode enum value to query
1172  *
1173  * @return a newly allocated hit test on success, @c 0 otherwise
1174  */
1175 EAPI Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* o, int x, int y, int hit_test_mode);
1176 // #endif // #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
1177
1178 /**
1179  * Get the whole history(whole back & forward list) associated with this view.
1180  *
1181  * @param o view object to get the history(whole back & forward list)
1182  *
1183  * @return a newly allocated history of @b newly allocated item
1184  *         instance. This memory of each item must be released with
1185  *         ewk_history_free() after use.
1186  *
1187  * @see ewk_history_free()
1188  */
1189 EAPI Ewk_History* ewk_view_history_get(Evas_Object* o);
1190
1191 /**
1192  * Requests to set recording surface.
1193  *
1194  * @param o view object to set recording surface
1195  * @param enable @c EINA_TRUE to enable recording surface
1196  *        @c EINA_FALSE to disable
1197  *
1198  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1199  */
1200 EINA_DEPRECATED EAPI Eina_Bool ewk_view_recording_surface_enable_set(Evas_Object* o, Eina_Bool enable);
1201
1202 /*
1203  * Notify that notification is closed.
1204  *
1205  * @param notification_list list of Ewk_Notification pointer
1206  *        notification_list is freed in this function.
1207  *
1208  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
1209  */
1210 EAPI Eina_Bool ewk_view_notification_closed(Evas_Object* o, Eina_List* notification_list);
1211
1212 /*
1213  * Sends the orientation of the device.
1214  *
1215  * If orientation value is changed, orientationchanged event will occur.
1216  *
1217  * @param o view object to receive orientation event.
1218  * @param orientation the new orientation of the device. (degree)
1219  *
1220  * orientation will be 0 degrees when the device is oriented to natural position,
1221  *                     90 degrees when it's left side is at the top,
1222  *                    -90 degrees when it's right side is at the top,
1223  *                     180 degrees when it is upside down.
1224  */
1225 EAPI void ewk_view_orientation_send(Evas_Object *o, int orientation);
1226
1227 /**
1228  * Gets the current encoding.
1229  *
1230  * @param o view object to get the current encoding
1231  *
1232  * @return @c current encoding, or @c 0 if it's not setted
1233  */
1234 EAPI const char* ewk_view_encoding_custom_get(const Evas_Object* o);
1235
1236 /**
1237  * Sets the encoding and reloads the page.
1238  *
1239  * @param o view to set the encoding
1240  * @param encoding the new encoding to set or @c 0 to restore the default one
1241  */
1242 EAPI void ewk_view_encoding_custom_set(Evas_Object* o, const char* encoding);
1243
1244 // #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
1245 EINA_DEPRECATED EAPI Eina_Bool ewk_view_text_selection_enable_set(Evas_Object* o, Eina_Bool enable);
1246 EAPI Eina_Bool ewk_view_text_selection_range_get(Evas_Object* o, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
1247 EAPI const char* ewk_view_text_selection_text_get(Evas_Object* o);
1248 EINA_DEPRECATED EAPI Eina_Bool ewk_view_auto_clear_text_selection_mode_set(Evas_Object* o, Eina_Bool enable);
1249 EINA_DEPRECATED EAPI Eina_Bool ewk_view_auto_clear_text_selection_mode_get(Evas_Object* o);
1250 // #endif // #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
1251
1252 // #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
1253 /**
1254  * Sets the focused input element value
1255  *
1256  * @param o view object to send the value
1257  * @param value the string value to be set
1258  */
1259 EAPI void ewk_view_focused_input_element_value_set(Evas_Object* o, const char* value);
1260 // #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
1261
1262 // #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
1263 /**
1264  * Gets the focused input element's value
1265  *
1266  * @param o view object to get the value
1267  *
1268  * @return focused input element's value on success or NULL on failure.
1269  */
1270 EAPI const char* ewk_view_focused_input_element_value_get(Evas_Object* o);
1271 // #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
1272
1273 // #if ENABLE(TIZEN_DATALIST_ELEMENT)
1274 /**
1275  * Closes data list picker
1276  *
1277  * @param o view object contains data list element
1278  * @param value value to be set to the input element
1279  */
1280 EAPI void ewk_view_data_list_close(Evas_Object *o, const char *value);
1281 //#endif // ENABLE(TIZEN_DATALIST_ELEMENT)
1282
1283 /**
1284  * Selects index of current popup menu.
1285  *
1286  * @param o view object contains popup menu.
1287  * @param index index of item to select
1288  *
1289  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably
1290  *         popup menu is not selected or index is out of range)
1291  */
1292 EAPI Eina_Bool ewk_view_popup_menu_select(Evas_Object *o, unsigned int index);
1293
1294 //#if ENABLE(TIZEN_MULTIPLE_SELECT)
1295 /**
1296  * Selects Multiple indexes  of current popup menu.
1297  *
1298  * @param o view object contains popup menu.
1299  * @param changedlist  list of item selected and deselected
1300  *
1301  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably
1302  *         popup menu is not selected or index is out of range)
1303  */
1304 EAPI Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object *o, Eina_Inarray* changedlist);
1305 //l#endif
1306
1307 /**
1308  * Closes current popup menu.
1309  *
1310  * @param o view object contains popup menu.
1311  *
1312  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably
1313  *         popup menu is not selected)
1314  */
1315 EAPI Eina_Bool ewk_view_popup_menu_close(Evas_Object *o);
1316
1317 /**
1318  * Sets whether the ewk_view supports the mouse events or not.
1319  *
1320  * The ewk_view will support the mouse events if EINA_TRUE or not support the
1321  * mouse events otherwise. The default value is EINA_TRUE.
1322  *
1323  * @param o view object to enable/disable the mouse events
1324  * @param enabled a state to set
1325  *
1326  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1327  */
1328 EAPI Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
1329
1330 /**
1331  * Queries if the ewk_view supports the mouse events.
1332  *
1333  * @param o view object to query if the mouse events are enabled
1334  *
1335  * @return @c EINA_TRUE if the mouse events are enabled or @c EINA_FALSE otherwise
1336  */
1337 EAPI Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *o);
1338
1339 typedef Eina_Bool (*Ewk_Orientation_Lock_Cb)(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data);
1340  /**
1341  * Deprecated
1342  * Sets callback of orientation lock function
1343  *
1344  * func will be called when screen lock is called or unlock is called.
1345  * When screen.lockOrientation is called, need_lock will be true and orientation
1346  * will be the flags which should be locked.
1347  * For example, when contents called 'screen.lockOrientation("portrait"), orientation
1348  * will be EWK_SCREEN_ORIENTATION_PORTRAIT_PRIMARY | EWK_SCREEN_ORIENTATION_PORTRAIT_SECONDARY
1349  * When screen.unlockOrientation is called, need_lock will be false.
1350  *
1351  * @param o view object to set the callback of orientation
1352  * @param func callback function to be called when screen orientation is locked or unlocked.
1353  * @param use_data user_data will be passsed when ewk_view_web_app_icon_get is called
1354  *
1355  * @return current URI on success or @c 0 on failure
1356  */
1357 EINA_DEPRECATED EAPI void ewk_view_orientation_lock_callback_set(Evas_Object *o, Ewk_Orientation_Lock_Cb func, void* user_data);
1358
1359  // #endif // #if OS(TIZEN)
1360
1361 /**
1362  * Loads the specified @a html string as the content of the view.
1363  *
1364  * External objects such as stylesheets or images referenced in the HTML
1365  * document are located relative to @a baseUrl.
1366  *
1367  * If an @a unreachableUrl is passed it is used as the url for the loaded
1368  * content. This is typically used to display error pages for a failed
1369  * load.
1370  *
1371  * @param o view object to load the HTML into
1372  * @param html HTML data to load
1373  * @param baseUrl Base URL used for relative paths to external objects (optional)
1374  * @param unreachableUrl URL that could not be reached (optional)
1375  *
1376  * @return @c EINA_TRUE if it the HTML was successfully loaded, @c EINA_FALSE otherwise
1377  */
1378 EAPI Eina_Bool ewk_view_html_string_load(Evas_Object *o, const char *html, const char *baseUrl, const char *unreachableUrl);
1379
1380 /**
1381  * Scales the current page, centered at the given point.
1382  *
1383  * @param o view object to set the zoom level
1384  * @param scale_factor a new level to set
1385  * @param cx x of center coordinate
1386  * @param cy y of center coordinate
1387  *
1388  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1389  */
1390 EAPI Eina_Bool ewk_view_scale_set(Evas_Object *o, double scaleFactor, int x, int y);
1391
1392 /**
1393  * Queries the current scale factor of the page.
1394  *
1395  * It returns previous scale factor after ewk_view_scale_set is called immediately
1396  * until scale factor of page is really changed.
1397  *
1398  * @param o view object to get the scale factor
1399  *
1400  * @return current scale factor in use on success or @c -1.0 on failure
1401  */
1402 EAPI double ewk_view_scale_get(const Evas_Object *o);
1403
1404 /**
1405  * Queries the ratio between the CSS units and device pixels when the content is unscaled.
1406  *
1407  * When designing touch-friendly contents, knowing the approximated target size on a device
1408  * is important for contents providers in order to get the intented layout and element
1409  * sizes.
1410  *
1411  * As most first generation touch devices had a PPI of approximately 160, this became a
1412  * de-facto value, when used in conjunction with the viewport meta tag.
1413  *
1414  * Devices with a higher PPI learning towards 240 or 320, applies a pre-scaling on all
1415  * content, of either 1.5 or 2.0, not affecting the CSS scale or pinch zooming.
1416  *
1417  * This value can be set using this property and it is exposed to CSS media queries using
1418  * the -webkit-device-pixel-ratio query.
1419  *
1420  * For instance, if you want to load an image without having it upscaled on a web view
1421  * using a device pixel ratio of 2.0 it can be done by loading an image of say 100x100
1422  * pixels but showing it at half the size.
1423  *
1424  * @media (-webkit-min-device-pixel-ratio: 1.5) {
1425  *     .icon {
1426  *         width: 50px;
1427  *         height: 50px;
1428  *         url: "/images/icon@2x.png"; // This is actually a 100x100 image
1429  *     }
1430  * }
1431  *
1432  * If the above is used on a device with device pixel ratio of 1.5, it will be scaled
1433  * down but still provide a better looking image.
1434  *
1435  * @param o view object to get device pixel ratio
1436  *
1437  * @return the ratio between the CSS units and device pixels,
1438  *         or @c -1.0 on failure
1439  */
1440 EAPI float ewk_view_device_pixel_ratio_get(const Evas_Object *o);
1441
1442 /**
1443  * Sets the ratio between the CSS units and device pixels when the content is unscaled.
1444  *
1445  * @param o view object to set device pixel ratio
1446  *
1447  * @return @c EINA_TRUE if the device pixel ratio was set, @c EINA_FALSE otherwise
1448  *
1449  * @see ewk_view_device_pixel_ratio_get()
1450  */
1451 EAPI Eina_Bool ewk_view_device_pixel_ratio_set(Evas_Object *o, float ratio);
1452
1453 /**
1454  * Sets the theme path that will be used by this view.
1455  *
1456  * This also sets the theme on the main frame. As frames inherit theme
1457  * from their parent, this will have all frames with unset theme to
1458  * use this one.
1459  *
1460  * @param o view object to change theme
1461  * @param path theme path
1462  */
1463 EAPI void ewk_view_theme_set(Evas_Object *o, const char *path);
1464
1465 /**
1466  * Gets the theme set on this view.
1467  *
1468  * This returns the value set by ewk_view_theme_set().
1469  *
1470  * @param o view object to get theme path
1471  *
1472  * @return the theme path, may be @c NULL if not set
1473  */
1474 EAPI const char *ewk_view_theme_get(const Evas_Object *o);
1475
1476 /**
1477  * Gets the current custom character encoding name.
1478  *
1479  * @param o view object to get the current encoding
1480  *
1481  * @return @c eina_strinshare containing the current encoding, or
1482  *         @c NULL if it's not set
1483  */
1484 EAPI const char  *ewk_view_custom_encoding_get(const Evas_Object *o);
1485
1486 /**
1487  * Sets the custom character encoding and reloads the page.
1488  *
1489  * @param o view to set the encoding
1490  * @param encoding the new encoding to set or @c NULL to restore the default one
1491  *
1492  * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1493  */
1494 EAPI Eina_Bool    ewk_view_custom_encoding_set(Evas_Object *o, const char *encoding);
1495
1496 /**
1497  * Searches and hightlights the given string in the document.
1498  *
1499  * @param o view object to find text
1500  * @param text text to find, must @b not be @c NULL
1501  * @param options options to find
1502  * @param max_match_count maximum match count to find, unlimited if 0
1503  *
1504  * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
1505  */
1506 EAPI Eina_Bool ewk_view_text_find(Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count);
1507
1508 /**
1509  * Clears the highlight of searched text.
1510  *
1511  * @param o view object to find text
1512  *
1513  * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
1514  */
1515 EAPI Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *o);
1516
1517 /**
1518  * Counts the given string in the document.
1519  *
1520  * This does not highlight the matched string and just count the matched string.
1521  *
1522  * As the search is carried out through the whole document,
1523  * only the following EWK_FIND_OPTIONS are valid.
1524  *  - EWK_FIND_OPTIONS_NONE
1525  *  - EWK_FIND_OPTIONS_CASE_INSENSITIVE
1526  *  - EWK_FIND_OPTIONS_AT_WORD_START
1527  *  - EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START
1528  *
1529  * The "text,found" callback will be called with the number of matched string.
1530  *
1531  * @param o view object to find text
1532  * @param text text to find
1533  * @param options options to find
1534  * @param max_match_count maximum match count to find, unlimited if 0
1535  *
1536  * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
1537  */
1538 EAPI Eina_Bool ewk_view_text_matches_count(Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count);
1539
1540 /*
1541  * Sets the user chosen color. To be used when implementing a color picker.
1542  *
1543  * The function should only be called when a color has been requested by the document.
1544  * If called when this is not the case or when the input picker has been dismissed, this
1545  * function will fail and return EINA_FALSE.
1546  *
1547  * @param o view object contains color picker
1548  * @param r red channel value to be set
1549  * @param g green channel value to be set
1550  * @param b blue channel value to be set
1551  * @param a alpha channel value to be set
1552  *
1553  * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1554  */
1555 EAPI Eina_Bool ewk_view_color_picker_color_set(Evas_Object *o, int r, int g, int b, int a);
1556
1557 /**
1558  * Feeds the touch event to the view.
1559  *
1560  * @param o view object to feed touch event
1561  * @param type the type of touch event
1562  * @param points a list of points (Ewk_Touch_Point) to process
1563  * @param modifiers an Evas_Modifier handle to the list of modifier keys
1564  *        registered in the Evas. Users can get the Evas_Modifier from the Evas
1565  *        using evas_key_modifier_get() and can set each modifier key using
1566  *        evas_key_modifier_on() and evas_key_modifier_off()
1567  *
1568  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1569  */
1570 EAPI Eina_Bool ewk_view_feed_touch_event(Evas_Object *o, Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
1571
1572 /**
1573  * Sets whether the ewk_view supports the touch events or not.
1574  *
1575  * The ewk_view will support the touch events if @c EINA_TRUE or not support the
1576  * touch events otherwise. The default value is @c EINA_FALSE.
1577  *
1578  * @param o view object to enable/disable the touch events
1579  * @param enabled a state to set
1580  *
1581  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1582  */
1583 EAPI Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
1584
1585 /**
1586  * Queries if the ewk_view supports the touch events.
1587  *
1588  * @param o view object to query if the touch events are enabled
1589  *
1590  * @return @c EINA_TRUE if the touch events are enabled or @c EINA_FALSE otherwise
1591  */
1592 EAPI Eina_Bool ewk_view_touch_events_enabled_get(const Evas_Object *o);
1593
1594 /**
1595  * Sets the visibility of main frame scrollbar.
1596  *
1597  * @param o view object
1598  * @param visible visibility of main frame scrollbar
1599  *
1600  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1601  */
1602 Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object *o, Eina_Bool visible);
1603
1604 /**
1605  * Gets the visibility of main frame scrollbar.
1606  *
1607  * @param o view object
1608  *
1609  * @return @c EINA_TRUE if scrollbar is visible or @c EINA_FALSE on failure
1610  */
1611 Eina_Bool ewk_view_main_frame_scrollbar_visible_get(const Evas_Object *o);
1612
1613 /**
1614  * Get contents of the current web page.
1615  *
1616  * @param o view object to get the page contents
1617  * @param context context of the page contents which has contents type and callback function
1618  *
1619  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1620  */
1621 EAPI Eina_Bool ewk_view_page_contents_get(const Evas_Object *o, Ewk_Page_Contents_Context *context);
1622
1623 /**
1624  * Scroll to the position of the given view with animation
1625  *
1626  * Both values are from zero to the contents size minus the viewport
1627  * size.
1628  *
1629  * @param o view object to scroll
1630  * @param x horizontal position to scroll
1631  * @param y vertical position to scroll
1632  *
1633  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
1634  */
1635 EAPI Eina_Bool ewk_view_animated_scroll_set(Evas_Object *o, int x, int y);
1636
1637 /**
1638  * Clear back forward list of a page.
1639  *
1640  * @param o view object to clear back forward list
1641  */
1642 EAPI void ewk_view_back_forward_list_clear(const Evas_Object *o);
1643
1644 /// Enum values containing Content Security Policy header types.
1645 enum _Ewk_CSP_Header_Type {
1646     EWK_REPORT_ONLY,
1647     EWK_ENFORCE_POLICY
1648 };
1649 typedef enum _Ewk_CSP_Header_Type Ewk_CSP_Header_Type;
1650
1651 /*
1652  * Set received Content Security Policy data from web app
1653  *
1654  * @param o view object
1655  * @param policy Content Security Policy data
1656  * @param type Content Security Policy header type
1657  *
1658  */
1659 EAPI void ewk_view_content_security_policy_set(Evas_Object* o, const char* policy, Ewk_CSP_Header_Type type);
1660
1661 /*
1662  * Starts offline page save.
1663  *
1664  * @param o view object to start offline page save
1665  * @param path directory path to save offline page
1666  *
1667  * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
1668  */
1669 EAPI Eina_Bool ewk_view_page_save(Evas_Object* o, const char* path);
1670
1671 #ifdef __cplusplus
1672 }
1673 #endif
1674 #endif // ewk_view_h