[M67 Dev][EWK] Classify EWK APIs by public, internal, or product
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_view_product.h
1 /*
2    Copyright (C) 2016 Samsung Electronics. All rights reserved.
3
4     This library is free software; you can redistribute it and/or
5     modify it under the terms of the GNU Library General Public
6     License as published by the Free Software Foundation; either
7     version 2 of the License, or (at your option) any later version.
8
9     This library is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12     Library General Public License for more details.
13
14     You should have received a copy of the GNU Library General Public License
15     along with this library; see the file COPYING.LIB.  If not, write to
16     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17     Boston, MA 02110-1301, USA.
18 */
19
20 /**
21  * @file    ewk_view_product.h
22  * @brief   Chromium main smart object.
23  *
24  * This object provides view related APIs of Chromium to EFL object.
25  */
26
27 #ifndef ewk_view_product_h
28 #define ewk_view_product_h
29
30 #include "ewk_context_product.h"
31 #include "ewk_view_internal.h"
32
33 #if defined(TIZEN_PEPPER_EXTENSIONS)
34 #include "ewk_value_product.h"
35 #endif
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42  * A callback to check whether allowed to run mixed content or not
43  *
44  * @param ewkView view object
45  * @param user_data user_data will be passed when callback is called
46  * @return true: allow to run mixed content. false: not allow to run mixed content
47  */
48 typedef Eina_Bool (*Ewk_View_Run_Mixed_Content_Confirm_Callback)(Evas_Object* ewkView, void* user_data);
49
50 /**
51  * @brief Creates a new EFL Chromium view object.
52  *
53  * @since_tizen 2.3
54  *
55  * @param[in] e canvas object where to create the view object
56  * @param[in] data a pointer to data to restore session data
57  * @param[in] length length of session data to restore session data
58  *
59  * @return view object on success or @c NULL on failure
60  */
61 EXPORT_API Evas_Object* ewk_view_add_with_session_data(Evas* e, const char* data, unsigned length);
62
63 /**
64  * @brief Gets the reference object for frame that represents the main frame.
65  *
66  * @since_tizen 2.3
67  *
68  * @param[in] o view object to get main frame
69  *
70  * @return frame reference of frame object on success, or NULL on failure
71  */
72 EXPORT_API Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o);
73
74 /**
75  * @brief Reply of javascript alert popup
76  *
77  * @since_tizen 2.3
78  *
79  * @param[in] o view object
80  */
81 EXPORT_API void ewk_view_javascript_alert_reply(Evas_Object* o);
82
83 /**
84  * @brief Reply of javascript confirm popup
85  *
86  * @since_tizen 2.3
87  *
88  * @param[in] o view object
89  * @param[in] result result of javascript confirm popup
90  */
91 EXPORT_API void ewk_view_javascript_confirm_reply(Evas_Object* o, Eina_Bool result);
92
93 /**
94  * @brief Reply of javascript prompt popup
95  *
96  * @since_tizen 2.3
97  *
98  * @param[in] o view object
99  * @param[in] result entered characters of javascript prompt popup
100  */
101 EXPORT_API void ewk_view_javascript_prompt_reply(Evas_Object* o, const char* result);
102
103 /**
104  * @brief Sets callback of before unload popup
105  *
106  * @since_tizen 2.3
107  *
108  * @param[in] o view object to set the callback
109  * @param[in] callback callback function for before unload popoup
110  * @param[in] user_data user data
111  */
112 EXPORT_API void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* o, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* user_data);
113
114 /**
115  * @brief Reply of before unload popup
116  *
117  * @since_tizen 2.3
118  *
119  * @param[in] o view object
120  * @param[in] result result of before unload popup
121  */
122 EXPORT_API void ewk_view_before_unload_confirm_panel_reply(Evas_Object* o, Eina_Bool result);
123
124 /**
125  * @brief Sets callback of getting application cache permission.
126  *
127  * @since_tizen 2.3
128  *
129  * @param[in] o view object to set the callback of application cache permission
130  * @param[in] callback function to be called when application cache need to
131  *            get permission
132  * @param[in] user_data user data
133  */
134 EXPORT_API void ewk_view_application_cache_permission_callback_set(Evas_Object* o, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* user_data);
135
136 /**
137  * @brief Application cache permission confirm popup reply
138  *
139  * @since_tizen 2.3
140  *
141  * @param[in] o view object to reply permission confirm popup
142  * @param[in] allow of response
143  */
144 EXPORT_API void ewk_view_application_cache_permission_reply(Evas_Object* o, Eina_Bool allow);
145
146 /**
147  * @brief Set to callback to controll unfocus operation from the arrow of
148  *        h/w keyboard.
149  *
150  * @since_tizen 2.3
151  *
152  * @param[in] o view object
153  * @param[in] callback callback to controll unfocus operation from the arrow of
154  *            h/w keyboard
155  * @param[in] user_data user data
156  */
157 EXPORT_API void ewk_view_unfocus_allow_callback_set(Evas_Object* o, Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
158
159 /**
160  * @brief Requests loading the given contents.
161  *
162  * @since_tizen 2.3
163  *
164  * @param[in] o view object to load document
165  * @param[in] html what to load
166  * @param[in] base_uri base uri to use for relative resources, may be @c 0,\n
167  *        if provided @b must be an absolute uri
168  *
169  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
170  */
171 EXPORT_API Eina_Bool ewk_view_html_contents_set(Evas_Object* o, const char* html, const char* base_uri);
172
173 /**
174  * @brief Returns the evas image object for the cache image specified in url.
175  *
176  * @details The returned evas image object @b should be freed after use.
177  *
178  * @since_tizen 2.3
179  *
180  * @param[in] o view object to get specified rectangle of cairo surface
181  * @param[in] image_url url of the image in the cache
182  * @param[in] canvas canvas for creating evas image
183  *
184  * @return newly allocated evas image object on sucess or @c 0 on failure
185  */
186 EXPORT_API Evas_Object* ewk_view_cache_image_get(const Evas_Object* o, const char* image_url, Evas* canvas);
187
188 /**
189  * @brief Requests for getting web application capable.
190  *
191  * @since_tizen 2.3
192  *
193  * @param[in] o view object
194  * @param[in] callback result callback to get web database quota
195  * @param[in] user_data user_data will be passed when result_callback is
196  *            called\n -I.e., user data will be kept until callback is called
197  *
198  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
199  */
200 EXPORT_API Eina_Bool ewk_view_web_application_capable_get(Evas_Object* o, Ewk_Web_App_Capable_Get_Callback callback, void* user_data);
201
202 /**
203  * @brief Requests for getting web application icon string.
204  *
205  * @since_tizen 2.3
206  *
207  * @param[in] o view object
208  * @param[in] callback result callback to get web database quota
209  * @param[in] user_data user_data will be passed when result_callback is
210  *            called\n -I.e., user data will be kept until callback is called
211  *
212  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
213  */
214 EXPORT_API Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* o, Ewk_Web_App_Icon_URL_Get_Callback callback, void* user_data);
215
216 /**
217  * @brief Requests for getting web application icon list of
218  *        Ewk_Web_App_Icon_Data.
219  *
220  * @since_tizen 2.3
221  *
222  * @param[in] o view object
223  * @param[in] callback result callback to get web application icon urls
224  * @param[in] user_data user_data will be passed when result_callback is
225  *            called\n -I.e., user data will be kept until callback is called
226  *
227  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
228  */
229 EXPORT_API Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* o, Ewk_Web_App_Icon_URLs_Get_Callback callback, void* user_data);
230
231 /**
232  * @brief Get the whole history(whole back & forward list) associated with this
233  *        view.
234  *
235  * @since_tizen 2.3
236  *
237  * @param[in] o view object to get the history(whole back & forward list)
238  *
239  * @return a newly allocated history of @b newly allocated item\n
240  *         instance. This memory of each item must be released with\n
241  *         ewk_history_free() after use
242  *
243  * @see ewk_history_free()
244  */
245 EXPORT_API Ewk_History* ewk_view_history_get(Evas_Object* o);
246
247 /**
248  * @brief Gets the selection ranges
249  *
250  * @since_tizen 2.3
251  *
252  * @param[in] o view object to get theselection ranges
253  * @param[out] left_rect the start lect(left rect) of the selection ranges
254  * @param[out] right_rect the end lect(right rect) of the selection ranges
255  *
256  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
257  */
258 EXPORT_API Eina_Bool ewk_view_text_selection_range_get(Evas_Object* o, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
259
260 /**
261  * @brief Sets the focused input element value
262  *
263  * @since_tizen 2.3
264  *
265  * @param[in] o view object to send the value
266  * @param[in] value the string value to be set
267  */
268 EXPORT_API void ewk_view_focused_input_element_value_set(Evas_Object* o, const char* value);
269
270 /**
271  * @brief Gets the focused input element's value
272  *
273  * @since_tizen 2.3
274  *
275  * @param[in] o view object to get the value
276  *
277  * @return focused input element's value on success or NULL on failure
278  */
279 EXPORT_API const char* ewk_view_focused_input_element_value_get(Evas_Object* o);
280
281 /**
282  * @brief Selects index of current popup menu.
283  *
284  * @since_tizen 2.3
285  *
286  * @param[in] o view object contains popup menu
287  * @param[in] index index of item to select
288  *
289  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably\n
290  *         popup menu is not selected or index is out of range)
291  */
292 EXPORT_API Eina_Bool ewk_view_popup_menu_select(Evas_Object* o, unsigned int index);
293
294 /**
295  * @brief Selects Multiple indexes  of current popup menu.
296  *
297  * @since_tizen 2.3
298  *
299  * @param[in] o view object contains popup menu.
300  * @param[in] changed_list  list of item selected and deselected
301  *
302  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably\n
303  *         popup menu is not selected or index is out of range)
304  */
305 EXPORT_API Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object* o, Eina_Inarray* changed_list);
306
307 /*
308  * @brief Sets the user chosen color. To be used when implementing a color
309  *        picker.
310  *
311  * @details The function should only be called when a color has been requested
312  *          by the document.\n If called when this is not the case or when the
313  *          input picker has been dismissed, this\n function will fail and
314  *          return EINA_FALSE.
315  *
316  * @since_tizen 2.3
317  *
318  * @param[in] o view object contains color picker
319  * @param[in] r red channel value to be set
320  * @param[in] g green channel value to be set
321  * @param[in] b blue channel value to be set
322  * @param[in] a alpha channel value to be set
323  *
324  * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
325  */
326 EXPORT_API Eina_Bool ewk_view_color_picker_color_set(Evas_Object* o, int r, int g, int b, int a);
327
328 /**
329  * @brief Feeds the touch event to the view.
330  *
331  * @since_tizen 2.3
332  *
333  * @param[in] o view object to feed touch event
334  * @param[in] type the type of touch event
335  * @param[in] points a list of points (Ewk_Touch_Point) to process
336  * @param[in] modifiers an Evas_Modifier handle to the list of modifier keys\n
337  *        registered in the Evas. Users can get the Evas_Modifier from the
338  *        Evas\n using evas_key_modifier_get() and can set each modifier key
339  *        using\n evas_key_modifier_on() and evas_key_modifier_off()
340  *
341  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
342  */
343 EXPORT_API Eina_Bool ewk_view_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers);
344
345 /**
346  * Creates a type name for the callback function used to get the background color.
347  *
348  * @param o view object
349  * @param r red color component
350  * @param g green color component
351  * @param b blue color component
352  * @param a transparency
353  * @param user_data user data will be passed when ewk_view_bg_color_get is called
354  */
355 typedef void (*Ewk_View_Background_Color_Get_Callback)(Evas_Object *o, int r, int g, int b, int a, void* user_data);
356
357 /**
358  * Gets the background color and transparency of the view.
359  *
360  * @param o view object to get the background color from
361  * @param callback callback function
362  * @param user_data user data will be passed when the callback is called
363  *
364  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
365  *
366  *  On success the background color of the view object o is retrieved
367  *  in the callback function
368  */
369 EXPORT_API Eina_Bool ewk_view_bg_color_get(Evas_Object *o, Ewk_View_Background_Color_Get_Callback callback, void *user_data);
370
371 /**
372  * @brief Sets the visibility of main frame scrollbar.
373  *
374  * @since_tizen 2.3
375  *
376  * @param[in] o view object
377  * @param[in] visible visibility of main frame scrollbar
378  *
379  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
380  */
381 EXPORT_API Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object* o, Eina_Bool visible);
382
383 /**
384  * Callback for ewk_view_main_frame_scrollbar_visible_get
385  *
386  * @param o view object
387  * @param visibility visibility of main frame scrollbar
388  * @param user_data user data passed to ewk_view_main_frame_scrollbar_visible_get
389  */
390 typedef void (*Ewk_View_Main_Frame_Scrollbar_Visible_Get_Callback)(Evas_Object* o, Eina_Bool visible, void* user_data);
391
392 /**
393  * @brief Gets the visibility of main frame scrollbar.
394  *
395  * @since_tizen 3.0
396  *
397  * @param[in] o view object
398  * @param callback callback function
399  * @param user_data user data will be passed when the callback is caller
400  *
401  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
402  *
403  *  On success the visibility of the scrollbar of the view object o is retrieved
404  *  in the callback function
405  */
406 EXPORT_API Eina_Bool ewk_view_main_frame_scrollbar_visible_get(Evas_Object* view, Ewk_View_Main_Frame_Scrollbar_Visible_Get_Callback callback, void* user_data);
407
408 /**
409  * @brief Gets the session data to be saved in a persistent store on
410  *        browser exit
411  *
412  * @since_tizen 2.3
413  *
414  * @param[in] o view object whose session needs to be stored.
415  * @param[in] data out parameter session data
416  * @param[in] length out parameter length of session data
417  */
418 EXPORT_API void ewk_view_session_data_get(Evas_Object* o, const char** data, unsigned* length);
419
420 /**
421  * @brief Reloads the current page's document without cache.
422  *
423  * @since_tizen 2.3
424  *
425  * @param[in] o view object to reload current document
426  *
427  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
428  */
429 EXPORT_API Eina_Bool ewk_view_reload_bypass_cache(Evas_Object* o);
430
431 /**
432  * @brief Creates a new hit test for the given veiw object and point.
433  *
434  * @since_tizen 2.3
435  *
436  * @remarks The returned object should be freed by ewk_hit_test_free().
437  *
438  * @param[in] o view object to do hit test on
439  * @param[in] x the horizontal position to query
440  * @param[in] y the vertical position to query
441  * @param[in] hit_test_mode the #Ewk_Hit_Test_Mode enum value to query
442  *
443  * @return a newly allocated hit test on success, @c 0 otherwise
444  */
445 EXPORT_API Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* o, int x, int y, int hit_test_mode);
446
447 /**
448  * Create PDF file of page contents
449  *
450  * @param o view object to get page contents.
451  * @param width the suface width of PDF file.
452  * @param height the suface height of PDF file.
453  * @param fileName the file name for creating PDF file.
454  *
455  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
456  */
457 /* This return value is status of the request not the status of actual operation.
458  * There should be some callback to get the actual status or reason of failure.
459  */
460 EXPORT_API Eina_Bool ewk_view_contents_pdf_get(Evas_Object* o, int width, int height, const char* fileName);
461
462 /**
463  * Requests for setting callback function
464  *
465  * @param ewkView view object
466  * @param user_data user_data will be passed when callback is called
467  * @param callback callback function
468  */
469 EXPORT_API void ewk_view_run_mixed_content_confirm_callback_set(Evas_Object* ewkView, Ewk_View_Run_Mixed_Content_Confirm_Callback callback, void* user_data);
470
471 /**
472  * Returns the current favicon of view object.
473  *
474  * @param item view object to get current icon URL
475  *
476  * @return current favicon on success or @c NULL if unavailable or on failure.
477  * The returned Evas_Object needs to be freed after use.
478  */
479 EXPORT_API Evas_Object *ewk_view_favicon_get(const Evas_Object *item);
480
481 /**
482  * To resume new url network loading
483  *
484  * @param item view object to resume new url loading
485  *
486  */
487 EXPORT_API void ewk_view_resume_network_loading(Evas_Object* item);
488
489 EXPORT_API void ewk_view_poweroff_suspend(Evas_Object *item);
490
491 /**
492  * To suspend all url loading
493  *
494  * @param item view object to suspend url loading
495  *
496  */
497 EXPORT_API void ewk_view_suspend_network_loading(Evas_Object* item);
498
499 /**
500  * This function should be use for browser edge scroll.
501  * It can also be used when the mouse pointer is out of webview.
502  * Scrolls webpage of view by dx and dy.
503  *
504  * @param item view object to scroll
505  * @param dx horizontal offset to scroll
506  * @param dy vertical offset to scroll
507  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
508  */
509 EXPORT_API Eina_Bool ewk_view_edge_scroll_by(Evas_Object *item, int dx, int dy);
510
511 /**
512  * Allow a browser to set its own cursor by setting a flag
513  * which prevents setting a default web page cursor.
514  *
515  * @param ewkView view object
516  * @param enable EINA_TRUE - prevent update of cursor by engine
517  *               EINA_FALSE - allow for update of cursor by engine
518  */
519 EXPORT_API void ewk_view_set_cursor_by_client(Evas_Object* ewkView, Eina_Bool enable);
520
521 /**
522  * Reply of running mixed content or not
523  *
524  * @param ewkView view object
525  * @param result reply
526  */
527 EXPORT_API void ewk_view_run_mixed_content_confirm_reply(Evas_Object* ewkView, Eina_Bool result);
528
529 /**
530  * Sets the cover-area (soon rect)  multiplier.
531  *
532  * @param ewkView view object
533  * @param coverAreaMultiplier the multiplier of cover-area.
534  */
535 EXPORT_API void ewk_view_tile_cover_area_multiplier_set(
536     Evas_Object* ewkView,
537     float cover_area_multiplier);
538
539 /**
540  * Set to enabled/disabled clear tiles on hide.
541  *
542  * @param ewkView view object
543  * @param enabled/disabled a state to set
544  *
545  */
546 EXPORT_API void ewk_view_clear_tiles_on_hide_enabled_set(Evas_Object* ewkView,
547                                                          Eina_Bool enable);
548
549 /**
550  * @brief Callback for ewk_view_is_video_playing
551  *
552  * @param[in] o the view object
553  * @param[in] is_playing video is playing or not
554  * @param[in] user_data user_data will be passsed when ewk_view_is_video_playing is
555  *                      called
556  */
557 typedef void (*Ewk_Is_Video_Playing_Callback)(Evas_Object* o, Eina_Bool is_playing, void* user_data);
558
559 /**
560  * @brief Asynchronous request for check if there is a video playing in the given view
561  *
562  * @param[in] o The view object
563  * @param[in] callback result callback to get web application capable
564  * @param[in] user_data user_data will be passed when result_callback is called
565  *
566  * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
567  */
568 EXPORT_API Eina_Bool ewk_view_is_video_playing(Evas_Object* o, Ewk_Is_Video_Playing_Callback callback, void* user_data);
569
570 /**
571  * Callback for ewk_view_stop_video
572  *
573  * @param o view object
574  * @param is_stopped video is stopped or not
575  * @param user_data user_data will be passsed when ewk_view_stop_video is called
576  */
577 typedef void (*Ewk_Stop_Video_Callback)(Evas_Object* o, Eina_Bool is_stopped, void* user_data);
578
579 /**
580  * Asynchronous request for stopping any playing video in the given view
581  *
582  * @param[in] o The view object
583  * @param[in] callback result callback to get web application capable
584  * @param[in] user_data user_data will be passed when result_callback is called
585  *
586  * @return @c EINA_TRUE if any video was stopped or @c EINA_FALSE is there was no active video
587  */
588 EXPORT_API Eina_Bool ewk_view_stop_video(Evas_Object* o, Ewk_Stop_Video_Callback callback, void* user_data);
589
590 /**
591  * @brief Sets the support of video hole and video window, Use H/W overlay for performance of video output
592  *
593  * @since_tizen 3.0
594  *
595  * @param[in] o the view object
596  * @param[in] o the top-level window object
597  * @param[in] enable EINA_TRUE to set on support the video hole,
598  *            EINA_FALSE otherwise
599  * @param[in] enable EINA_TRUE to set on the video window of video hole,
600  *            EINA_FALSE to set on the video windowless of video hole
601  *
602  * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure
603  */
604 EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow);
605
606 #if defined(TIZEN_PEPPER_EXTENSIONS)
607
608 /**
609  * Callback for the generic sync call.
610  * It requests for performing operation/call giving its name. Arguments
611  * and return value is operation/call specific.
612  *
613  * @param[in] name requested call name
614  * @param[in] arguments call argumets, format is defined by opertion itself
615  * @param[in] user_data user_data will be passed when result_callback is called
616  *
617  * @return return value from the call, format is defind by operation itself
618  */
619 typedef Ewk_Value (*Generic_Sync_Call_Callback)(const char* name, Ewk_Value arguments, void* user_data);
620
621 /**
622  * Sets the function pointer for the generic sync call
623  *
624  * @param ewk_view view object to set the function pointer in
625  * @param cb pointer to the function
626  * @param user_data pointer to user data to be passed to the function when
627  *        it's being called
628  */
629 EXPORT_API void ewk_view_widget_pepper_extension_callback_set(Evas_Object* ewk_view, Generic_Sync_Call_Callback cb, void* user_data);
630
631 /**
632 * Sets the pepper widget extension info
633 *
634 * @param ewk_view view object to set the info in
635 * @param widget_pepper_ext_info the Ewk_Value containing the information
636 */
637 EXPORT_API void ewk_view_widget_pepper_extension_info_set(Evas_Object* ewk_view, Ewk_Value widget_pepper_ext_info);
638
639 #endif  // defined(TIZEN_PEPPER_EXTENSIONS)
640
641 /**
642  * @brief Sends key event.
643  *
644  * @since_tizen 2.4
645  *
646  * @param[in] o The view object
647  * @param[in] key_event Evas_Event_Key_Down struct or Evas_Event_Key_Up struct
648  * @param[in] isPress EINA_TRUE: keydown, EINA_FALSE: keyup
649  * @return @c EINA_TRUE on success,\n
650  *         otherwise @c EINA_FALSE
651  */
652 EXPORT_API Eina_Bool ewk_view_send_key_event(Evas_Object* o, void* key_event, Eina_Bool is_press);
653
654 /**
655  * @brief Sets whether the ewk_view supports the key events or not.
656  *
657  * @since_tizen 2.4
658  *
659  * @note Should be used after ewk_view_url_set().
660  *
661  * @remarks The ewk_view will support the key events if EINA_TRUE or not support the
662  *          key events otherwise. The default value is EINA_TRUE.
663  *
664  * @param[in] o The view object
665  * @param[in] enabled a state to set
666  *
667  * @return @c EINA_TRUE on success,\n
668  *         otherwise @c EINA_FALSE
669  */
670 EXPORT_API Eina_Bool ewk_view_key_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
671
672 /**
673  * @brief Adds an item to back forward list
674  *
675  * @since_tizen 2.4
676  *
677  * @param[in] o The view object
678  * @param[in] item The back-forward list item instance
679  * @return @c EINA_TRUE on success,\n
680  *         otherwise @c EINA_FALSE
681  */
682 EXPORT_API Eina_Bool
683 ewk_view_add_item_to_back_forward_list(Evas_Object* o,
684                                        const Ewk_Back_Forward_List_Item* item);
685
686 /**
687  * @brief To give a chance to intercept request data before sending it.
688  *
689  * @since_tizen 2.3
690  *
691  * @param[in] o view object to intercept request
692  * @param[in] intercept_request Defined structure to notify requesting infomation
693  * @param[in] user_data user data
694  *
695  * @see ewk_view_intercept_request_callback_set()
696  */
697 typedef void (*Ewk_View_Intercept_Request_Callback)(Evas_Object* o, Ewk_Intercept_Request* intercept_request, void* user_data);
698
699 /**
700  * @brief  To set Ewk_View_Intercept_Request_Callback to give a chance to intercept request data before sending it.
701  *
702  * @since_tizen 2.3
703  *
704  * @param[in] o view object to intercept request
705  * @param[in] callback Defined callback
706  * @param[in] user_data user data
707  *
708  * @see Ewk_View_Intercept_Request_Callback
709  */
710 EXPORT_API void ewk_view_intercept_request_callback_set (Evas_Object* o, Ewk_View_Intercept_Request_Callback callback, void* user_data);
711
712 /**
713 * @}
714 */
715
716 #ifdef __cplusplus
717 }
718 #endif
719 #endif // ewk_view_product_h