2 Copyright (C) 2009-2010 ProFUSION embedded systems
3 Copyright (C) 2009-2012 Samsung Electronics
4 Copyright (C) 2012 Intel Corporation
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
24 * @brief WebKit main smart object.
26 * This object allows the high level access to WebKit-EFL component.
27 * It is responsible for managing the main frame and other
30 * Every ewk_view has at least one frame, called "main frame" and
31 * retrieved with ewk_view_frame_main_get(). Direct frame access is
32 * often discouraged, it is recommended to use ewk_view functions
35 * The following signals (see evas_object_smart_callback_add()) are emitted:
37 * - "colorchooser,create", Ewk_Color: a new color chooser should be created.
38 * - "colorchooser,willdelete", void: reports that a previously created color
39 * chooser will be deleted.
40 * - "colorchooser,color,changed", Ewk_Color: the value at the color input widget
41 * corresponding to the color chooser has changed.
42 * - "download,request", Ewk_Download: reports a download is being requested
43 * - "editorclient,contents,changed", void: reports to the view that editor
44 * client's contents were changed
45 * - "frame,created", Evas_Object*: a new frame is created.
46 * - "icon,received", void: main frame received an icon.
47 * - "inputmethod,changed", Eina_Bool: reports that input method was changed and
48 * it gives a boolean value whether it's enabled or not as an argument.
49 * - "inspector,view,close", Evas_Object*: request to close the view for web inspector.
50 * - "inspector,view,create", void: request to create the new view for web inspector.
51 * - "js,windowobject,clear", void: Report that the JS window object has been cleared.
52 * - "link,hover,in", const char *link[2]: reports mouse is over a link.
53 * It gives the url in link[0] and link's title in link[1] as an argument.
54 * - "link,hover,out", void: reports mouse moved out from a link.
55 * - "load,document,finished", Evas_Object*: a DOM document object in a frame has finished loading.
56 * - "load,error", const Ewk_Frame_Load_Error*: reports load failed
57 * - "load,finished", const Ewk_Frame_Load_Error*: reports load
58 * finished and it gives @c NULL on success or pointer to
59 * structure defining the error.
60 * - "load,newwindow,show", void: reports that a new window was created and can be shown.
61 * and it gives a pointer to structure defining the error as an argument.
62 * - "load,progress", double*: load progress is changed (overall value
63 * from 0.0 to 1.0, connect to individual frames for fine grained).
64 * - "load,provisional", void: view started provisional load.
65 * - "load,provisional,failed", Ewk_Frame_Load_Error*: view provisional load failed.
66 * - "load,resource,finished", unsigned long*: reports resource load finished and it gives
67 * a pointer to its identifier.
68 * - "load,resource,failed", Ewk_Frame_Load_Error*: reports resource load failure and it
69 * gives a pointer to structure defining the error as an argument.
70 * - "load,started", Evas_Object*: frame started loading the document.
71 * - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is
72 * visible; @c EINA_FALSE, otherwise.
73 * - "menubar,visible,set", Eina_Bool: sets menubar visibility.
74 * - "mixedcontent,displayed", void: any of the containing frames has loaded and displayed mixed content.
75 * - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content.
76 * - "navigate,with,data", Ewk_View_Navigation_Data*: reports that view did navigation and gives the navigation details.
77 * - "perform,client,redirect", Ewk_View_Redirection_Data*: reports that view performed a client redirect and gives the redirection details.
78 * - "perform,server,redirect", Ewk_View_Redirection_Data*: reports that view performed a server redirect and gives the redirection details.
79 * - "protocolhandler,registration,requested", Ewk_Custom_Handler_Data: add a handler url for the given protocol.
80 * - "protocolhandler,isregistered", Ewk_Custom_Handler_Data: query whether the handler is registered or not.
81 * - "protocolhandler,unregistration,requested", Ewk_Custom_Handler_Data: remove a handler url for the given protocol.
82 * - "onload,event", Evas_Object*: a frame onload event has been received.
83 * - "populate,visited,links": tells the client to fill the visited links set.
84 * - "ready", void: page is fully loaded.
85 * - "resource,request,new", Ewk_Frame_Resource_Request*: reports that
86 * there's a new resource request.
87 * - "resource,request,willsend", Ewk_Frame_Resource_Messages*: a resource will be requested.
88 * and the possible redirect response.
89 * - "resource,response,received", Ewk_Frame_Resource_Response*: the network response for a resource.
90 * - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars
91 * are visible; @c EINA_FALSE, otherwise.
92 * - "scrollbars,visible,set", Eina_Bool: sets scrollbars visibility.
93 * - "statusbar,text,set", const char *: sets statusbar text.
94 * - "statusbar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if statusbar is
95 * visible; @c EINA_FALSE, otherwise.
96 * - "statusbar,visible,set", Eina_Bool: sets statusbar visibility.
97 * - "title,changed", Ewk_Text_With_Direction*: title of the main frame was changed.
98 * - "toolbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if toolbar
99 * is visible; @c EINA_FALSE, otherwise.
100 * - "toolbars,visible,set", Eina_Bool: sets toolbar visibility.
101 * - "popup,create", Ewk_Menu: reports that a new menu was created.
102 * - "popup,willdeleted", Ewk_Menu: reports that a previously created menu
104 * - "restore", Evas_Object *: reports that view should be restored to default conditions
105 * and it gives a frame that originated restore as an argument.
106 * - "tooltip,text,set", const char*: sets tooltip text and displays if it is currently hidden.
107 * - "uri,changed", const char*: uri of the main frame was changed.
108 * - "view,resized", void: view object's size was changed.
109 * - "viewport,changed", void: reports that viewport was changed.
110 * - "zoom,animated,end", void: requested animated zoom is finished.
116 #include "ewk_file_chooser.h"
117 #include "ewk_frame.h"
118 #include "ewk_history.h"
120 #include "ewk_window_features.h"
124 #include <libsoup/soup-session.h>
130 /// Creates a type name for @a _Ewk_View_Smart_Data.
131 typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
133 /// Creates a type name for a Resource Handler Callback
134 typedef void* (*Ewk_View_Resource_Handler_Cb)(const char *, size_t *, char **, void *);
136 /// Creates a type name for @a _Ewk_View_Smart_Class.
137 typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class;
139 // Defines the direction of focus change. Keep in sync with
140 // WebCore::FocusDirection.
141 enum _Ewk_Focus_Direction {
142 EWK_FOCUS_DIRECTION_FORWARD = 1,
143 EWK_FOCUS_DIRECTION_BACKWARD,
145 typedef enum _Ewk_Focus_Direction Ewk_Focus_Direction;
147 /// Ewk view's class, to be overridden by sub-classes.
148 struct _Ewk_View_Smart_Class {
149 Evas_Smart_Class sc; /**< All but 'data' is free to be changed. */
150 unsigned long version;
152 Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, Eina_Bool javascript, const Ewk_Window_Features *window_features); /**< creates a new window, requested by webkit */
153 void (*window_close)(Ewk_View_Smart_Data *sd); /**< closes a window */
154 // hooks to allow different backing stores
155 Evas_Object *(*backing_store_add)(Ewk_View_Smart_Data *sd); /**< must be defined */
156 Eina_Bool (*scrolls_process)(Ewk_View_Smart_Data *sd); /**< must be defined */
157 Eina_Bool (*repaints_process)(Ewk_View_Smart_Data *sd); /**< must be defined */
158 Eina_Bool (*contents_resize)(Ewk_View_Smart_Data *sd, int w, int h);
159 Eina_Bool (*zoom_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy);
160 Eina_Bool (*zoom_weak_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy);
161 void (*zoom_weak_smooth_scale_set)(Ewk_View_Smart_Data *sd, Eina_Bool smooth_scale);
162 void (*bg_color_set)(Ewk_View_Smart_Data *sd, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha);
163 void (*flush)(Ewk_View_Smart_Data *sd);
164 Eina_Bool (*pre_render_region)(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
165 Eina_Bool (*pre_render_relative_radius)(Ewk_View_Smart_Data *sd, unsigned int n, float zoom);
166 Eina_Bool (*pre_render_start)(Ewk_View_Smart_Data *sd);
167 void (*pre_render_cancel)(Ewk_View_Smart_Data *sd);
168 Eina_Bool (*disable_render)(Ewk_View_Smart_Data *sd);
169 Eina_Bool (*enable_render)(Ewk_View_Smart_Data *sd);
172 // - returns true if handled
173 // - if overridden, have to call parent method if desired
174 Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd);
175 Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd);
176 Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev);
177 Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev);
178 Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev);
179 Eina_Bool (*mouse_move)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Move *ev);
180 Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev);
181 Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev);
183 void (*add_console_message)(Ewk_View_Smart_Data *sd, const char *message, unsigned int lineNumber, const char *sourceID);
184 void (*run_javascript_alert)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message);
185 Eina_Bool (*run_javascript_confirm)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message);
186 Eina_Bool (*run_javascript_prompt)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message, const char *defaultValue, const char **value);
187 Eina_Bool (*should_interrupt_javascript)(Ewk_View_Smart_Data *sd);
188 int64_t (*exceeded_application_cache_quota)(Ewk_View_Smart_Data *sd, Ewk_Security_Origin* origin, int64_t defaultOriginQuota, int64_t totalSpaceNeeded);
189 uint64_t (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size);
191 Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Ewk_File_Chooser *file_chooser, Eina_List **selected_filenames);
193 Eina_Bool (*navigation_policy_decision)(Ewk_View_Smart_Data *sd, Ewk_Frame_Resource_Request *request, Ewk_Navigation_Type navigation_type);
194 Eina_Bool (*focus_can_cycle)(Ewk_View_Smart_Data *sd, Ewk_Focus_Direction direction);
198 * The version you have to put into the version field
199 * in the @a Ewk_View_Smart_Class structure.
201 #define EWK_VIEW_SMART_CLASS_VERSION 6UL
204 * Initializes a whole @a Ewk_View_Smart_Class structure.
206 * @param smart_class_init initializer to use for the "base" field
207 * @a Evas_Smart_Class
209 * @see EWK_VIEW_SMART_CLASS_INIT_NULL
210 * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
211 * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
213 #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}
216 * Initializes to zero a whole @a Ewk_View_Smart_Class structure.
218 * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
219 * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
220 * @see EWK_VIEW_SMART_CLASS_INIT
222 #define EWK_VIEW_SMART_CLASS_INIT_NULL EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL)
225 * Initializes to zero a whole @a Ewk_View_Smart_Class structure
226 * and sets the version.
228 * Similar to @a EWK_VIEW_SMART_CLASS_INIT_NULL, but it sets the version field of
229 * @a Evas_Smart_Class (base field) to latest @a EVAS_SMART_CLASS_VERSION.
231 * @see EWK_VIEW_SMART_CLASS_INIT_NULL
232 * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
233 * @see EWK_VIEW_SMART_CLASS_INIT
235 #define EWK_VIEW_SMART_CLASS_INIT_VERSION EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_VERSION)
238 * Initializes to zero a whole @a Ewk_View_Smart_Class structure
239 * and sets the name and version.
241 * Similar to @a EWK_VIEW_SMART_CLASS_INIT_NULL, but it sets the version field of
242 * @a Evas_Smart_Class (base field) to latest @a EVAS_SMART_CLASS_VERSION
243 * and the name to the specific value.
245 * It will keep a reference to the name field as a "const char *", that is,
246 * name must be available while the structure is used (hint: static or global!)
247 * and it will not be modified.
249 * @see EWK_VIEW_SMART_CLASS_INIT_NULL
250 * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
251 * @see EWK_VIEW_SMART_CLASS_INIT
253 #define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
255 /// Defines the input method hints.
257 EWK_IMH_TELEPHONE = (1 << 0),
258 EWK_IMH_NUMBER = (1 << 1),
259 EWK_IMH_EMAIL = (1 << 2),
260 EWK_IMH_URL = (1 << 3),
261 EWK_IMH_PASSWORD = (1 << 4)
263 /// Creates a type name for @a _Ewk_Imh.
264 typedef enum _Ewk_Imh Ewk_Imh;
266 /// Creates a type name for @a _Ewk_View_Private_Data.
267 typedef struct _Ewk_View_Private_Data Ewk_View_Private_Data;
269 /// Defines the types of the items for the context menu.
270 enum _Ewk_Menu_Item_Type {
275 /// Creates a type name for @a _Ewk_Menu_Item_Type.
276 typedef enum _Ewk_Menu_Item_Type Ewk_Menu_Item_Type;
278 /// Creates a type name for @a _Ewk_Menu_Item.
279 typedef struct _Ewk_Menu_Item Ewk_Menu_Item;
280 /// Contains data of each menu item.
281 struct _Ewk_Menu_Item {
282 const char *text; /**< Text of the item. */
283 Ewk_Menu_Item_Type type; /** Type of the item. */
286 /// Creates a type name for @a _Ewk_Menu.
287 typedef struct _Ewk_Menu Ewk_Menu;
288 /// Contains Popup menu data.
290 Eina_List *items; /**< List of items. */
291 int x; /**< The horizontal position of Popup menu. */
292 int y; /**< The vertical position of Popup menu. */
293 int width; /**< Popup menu width. */
294 int height; /**< Popup menu height. */
297 /// Creates a type name for @a _Ewk_Download.
298 typedef struct _Ewk_Download Ewk_Download;
299 /// Contains Download data.
300 struct _Ewk_Download {
301 const char *url; /**< URL of resource. */
305 /// Creates a type name for @a _Ewk_View_Navigation_Data.
306 typedef struct _Ewk_View_Navigation_Data Ewk_View_Navigation_Data;
309 * @brief Structure containing details about a view navigation.
311 * Details of a view navigation. It is used in "navigate,with,data" signal.
313 struct _Ewk_View_Navigation_Data {
314 const char *url; /**< URL for the history. */
315 const char *title; /**< Title of the navigated page. */
316 Ewk_Frame_Resource_Request *request; /**< Navigation request. */
317 Ewk_Frame_Resource_Response *response; /**< Navigation response. */
318 Eina_Bool has_substitute_data; /**< Data substitution flag. */
319 const char *client_redirect_source; /**< Client redirect source URL. */
323 /// Creates a type name for @a _Ewk_View_Redirection_Data.
324 typedef struct _Ewk_View_Redirection_Data Ewk_View_Redirection_Data;
327 * @brief Structure containing details about a view redirection.
329 * Details of a client or server redirection. It is used in "perform,client,redirect" and "perform,server,redirect" signals.
331 struct _Ewk_View_Redirection_Data {
332 const char *source_url; /**< Redirect source URL. */
333 const char *destination_url; /**< Redirect destination URL. */
335 /// Creates a type name for @a _Ewk_Scroll_Request.
336 typedef struct _Ewk_Scroll_Request Ewk_Scroll_Request;
337 /// Contains the scroll request that should be processed by subclass implementations.
338 struct _Ewk_Scroll_Request {
340 Evas_Coord x, y, w, h, x2, y2;
343 /// Creates a type name for @a _Ewk_Color.
344 typedef struct _Ewk_Color Ewk_Color;
345 /// Represents a color using the RGBA format.
347 unsigned char r; /**< Red channel. */
348 unsigned char g; /**< Green channel. */
349 unsigned char b; /**< Blue channel. */
350 unsigned char a; /**< Alpha channel. */
353 /// Defines the handler states.
354 enum _Ewk_Custom_Handlers_State {
355 EWK_CUSTOM_HANDLERS_NEW,
356 EWK_CUSTOM_HANDLERS_REGISTERED,
357 EWK_CUSTOM_HANDLERS_DECLINED
359 /// Creates a type name for @a _Ewk_Custom_Handlers_State.
360 typedef enum _Ewk_Custom_Handlers_State Ewk_Custom_Handlers_State;
362 /// Creates a type name for @a _Ewk_Custom_Handler_Data.
363 typedef struct _Ewk_Custom_Handler_Data Ewk_Custom_Handler_Data;
364 /// Contains the target scheme and the url which take care of the target.
365 struct _Ewk_Custom_Handler_Data {
366 Evas_Object *ewkView; /**< Reference to the view object. */
367 const char *scheme; /**< Reference to the scheme that will be handled. (eg. "application/x-soup") */
368 const char *base_url; /**< Reference to the resolved url if the url is relative url. (eg. "https://www.example.com/") */
369 const char *url; /**< Reference to the url which will handle the given protocol. (eg. "soup?url=%s") */
370 const char *title; /**< Reference to the descriptive title of the handler. (eg. "SoupWeb") */
371 Ewk_Custom_Handlers_State result; /**< Result of the query that the protocol handler is registered or not. */
375 * @brief Contains an internal View data.
377 * It is to be considered private by users, but may be extended or
378 * changed by sub-classes (that's why it's in the public header file).
380 struct _Ewk_View_Smart_Data {
381 Evas_Object_Smart_Clipped_Data base;
382 const Ewk_View_Smart_Class *api; /**< Reference to casted class instance. */
383 Evas_Object *self; /**< Reference to owner object. */
384 Evas_Object *main_frame; /**< Reference to main frame object. */
385 Evas_Object *backing_store; /**< Reference to backing store. */
386 Evas_Object *events_rect; /**< The rectangle that receives mouse events. */
387 Ewk_View_Private_Data *_priv; /**< Should @b never be accessed, c++ stuff. */
389 Evas_Coord x, y, w, h;
390 } view; /**< Contains the position and size of last used viewport. */
395 float current; /**< if > 0.0, then doing animated zoom. */
399 unsigned char r, g, b, a;
400 } bg_color; /**< Keeps the background color. */
401 Eina_Bool zoom_weak_smooth_scale:1;
405 Eina_Bool position:1;
406 Eina_Bool frame_rect:1;
407 } changed; /**< Keeps what changed since last smart_calculate. */
414 /// Defines the modes of view.
415 enum _Ewk_View_Mode {
416 EWK_VIEW_MODE_INVALID,
417 EWK_VIEW_MODE_WINDOWED,
418 EWK_VIEW_MODE_FLOATING,
419 EWK_VIEW_MODE_FULLSCREEN,
420 EWK_VIEW_MODE_MAXIMIZED,
421 EWK_VIEW_MODE_MINIMIZED
423 /// Creates a type name for @a _Ewk_View_Mode.
424 typedef enum _Ewk_View_Mode Ewk_View_Mode;
426 /// Defines the font families.
427 enum _Ewk_Font_Family {
428 EWK_FONT_FAMILY_STANDARD = 0,
429 EWK_FONT_FAMILY_CURSIVE,
430 EWK_FONT_FAMILY_FANTASY,
431 EWK_FONT_FAMILY_MONOSPACE,
432 EWK_FONT_FAMILY_SERIF,
433 EWK_FONT_FAMILY_SANS_SERIF
435 /// Creates a type name for @a _Ewk_Font_Family.
436 typedef enum _Ewk_Font_Family Ewk_Font_Family;
438 /// Contains commands to execute.
439 enum _Ewk_Editor_Command {
440 EWK_EDITOR_COMMAND_NONE = -1,
441 EWK_EDITOR_COMMAND_UNDO = 0,
442 EWK_EDITOR_COMMAND_REDO,
443 EWK_EDITOR_COMMAND_TOGGLE_BOLD,
444 EWK_EDITOR_COMMAND_TOGGLE_ITALIC,
445 EWK_EDITOR_COMMAND_TOGGLE_UNDERLINE,
446 EWK_EDITOR_COMMAND_TOGGLE_STRIKETHROUGH,
447 EWK_EDITOR_COMMAND_TOGGLE_SUBSCRIPT,
448 EWK_EDITOR_COMMAND_TOGGLE_SUPERSCRIPT,
449 EWK_EDITOR_COMMAND_INDENT,
450 EWK_EDITOR_COMMAND_OUTDENT,
451 EWK_EDITOR_COMMAND_INSERT_ORDEREDLIST,
452 EWK_EDITOR_COMMAND_INSERT_UNORDEREDLIST,
453 EWK_EDITOR_COMMAND_INSERT_IMAGE,
454 EWK_EDITOR_COMMAND_INSERT_TEXT,
455 EWK_EDITOR_COMMAND_INSERT_HTML,
456 EWK_EDITOR_COMMAND_INSERT_PARAGRAPH,
457 EWK_EDITOR_COMMAND_INSERT_PARAGRAPH_SEPARATOR,
458 EWK_EDITOR_COMMAND_INSERT_LINE_SEPARATOR,
459 EWK_EDITOR_COMMAND_BACK_COLOR,
460 EWK_EDITOR_COMMAND_FORE_COLOR,
461 EWK_EDITOR_COMMAND_HILITE_COLOR,
462 EWK_EDITOR_COMMAND_FONT_SIZE,
463 EWK_EDITOR_COMMAND_ALIGN_CENTER,
464 EWK_EDITOR_COMMAND_ALIGN_JUSTIFIED,
465 EWK_EDITOR_COMMAND_ALIGN_LEFT,
466 EWK_EDITOR_COMMAND_ALIGN_RIGHT,
467 EWK_EDITOR_COMMAND_MOVE_TO_NEXT_CHAR,
468 EWK_EDITOR_COMMAND_MOVE_TO_PREVIOUS_CHAR,
469 EWK_EDITOR_COMMAND_MOVE_TO_NEXT_WORD,
470 EWK_EDITOR_COMMAND_MOVE_TO_PREVIOUS_WORD,
471 EWK_EDITOR_COMMAND_MOVE_TO_NEXT_LINE,
472 EWK_EDITOR_COMMAND_MOVE_TO_PREVIOUS_LINE,
473 EWK_EDITOR_COMMAND_MOVE_TO_BEGINNING_OF_LINE,
474 EWK_EDITOR_COMMAND_MOVE_TO_END_OF_LINE,
475 EWK_EDITOR_COMMAND_MOVE_TO_BEGINNING_OF_PARAGRAPH,
476 EWK_EDITOR_COMMAND_MOVE_TO_END_OF_PARAGRAPH,
477 EWK_EDITOR_COMMAND_MOVE_TO_BEGINNING_OF_DOCUMENT,
478 EWK_EDITOR_COMMAND_MOVE_TO_END_OF_DOCUMENT,
479 EWK_EDITOR_COMMAND_SELECT_NONE,
480 EWK_EDITOR_COMMAND_SELECT_ALL,
481 EWK_EDITOR_COMMAND_SELECT_PARAGRAPH,
482 EWK_EDITOR_COMMAND_SELECT_SENTENCE,
483 EWK_EDITOR_COMMAND_SELECT_LINE,
484 EWK_EDITOR_COMMAND_SELECT_WORD,
485 EWK_EDITOR_COMMAND_SELECT_NEXT_CHAR,
486 EWK_EDITOR_COMMAND_SELECT_PREVIOUS_CHAR,
487 EWK_EDITOR_COMMAND_SELECT_NEXT_WORD,
488 EWK_EDITOR_COMMAND_SELECT_PREVIOUS_WORD,
489 EWK_EDITOR_COMMAND_SELECT_NEXT_LINE,
490 EWK_EDITOR_COMMAND_SELECT_PREVIOUS_LINE,
491 EWK_EDITOR_COMMAND_SELECT_START_OF_LINE,
492 EWK_EDITOR_COMMAND_SELECT_END_OF_LINE,
493 EWK_EDITOR_COMMAND_SELECT_START_OF_PARAGRAPH,
494 EWK_EDITOR_COMMAND_SELECT_END_OF_PARAGRAPH,
495 EWK_EDITOR_COMMAND_SELECT_START_OF_DOCUMENT,
496 EWK_EDITOR_COMMAND_SELECT_END_OF_DOCUMENT,
497 EWK_EDITOR_COMMAND_DELETE_WORD_BACKWARD,
498 EWK_EDITOR_COMMAND_DELETE_WORD_FORWARD
501 /// Creates a type name for @a _Ewk_Editor_Command.
502 typedef enum _Ewk_Editor_Command Ewk_Editor_Command;
505 * @brief Creates a type name for @a _Ewk_Tile_Unused_Cache.
507 * Cache (pool) that contains unused tiles for ewk_view_tiled.
509 * This cache will maintain unused tiles and flush them when the total
510 * memory exceeds the set amount when
511 * ewk_tile_unused_cache_auto_flush() or explicitly set value when
512 * ewk_tile_unused_cache_flush() is called.
514 * The tile may be shared among different ewk_view_tiled instances to
515 * group maximum unused memory resident in the system.
517 typedef struct _Ewk_Tile_Unused_Cache Ewk_Tile_Unused_Cache;
520 * Changes cache capacity of unused tiles.
522 * @param tuc cache of unused tiles to set a new capacity of unused tiles
524 * @param max a new capacity of cache, in bytes
526 * @note This will not flush cache, use ewk_tile_unused_cache_flush() or
527 * ewk_tile_unused_cache_auto_flush() to do so.
529 EAPI void ewk_tile_unused_cache_max_set(Ewk_Tile_Unused_Cache *tuc, size_t max);
532 * Retrieves maximum cache capacity of unused tiles.
534 * @param tuc cache of unused tiles to get maximum cache capacity of unused tiles
536 * @return maximum cache capacity, in bytes on success or @c 0 on failure
538 EAPI size_t ewk_tile_unused_cache_max_get(const Ewk_Tile_Unused_Cache *tuc);
541 * Retrieves the used cache capacity of unused tiles.
543 * @param tuc cache of unused tiles to get used cache capacity of unused tiles
545 * @return used cache capacity, in bytes on success or @c 0 on failure
547 EAPI size_t ewk_tile_unused_cache_used_get(const Ewk_Tile_Unused_Cache *tuc);
550 * Flushes given amount of bytes from cache of unused tiles.
552 * After calling this function, near @a bytes are freed from cache. It
553 * may be less if cache did not contain that amount of bytes (ie: an
554 * empty cache has nothing to free!) or more if the cache just
555 * contained objects that were larger than the requested amount (this
556 * is usually the case).
558 * @param tuc cache of unused tiles to flush @bytes from cache
559 * @param bytes amount bytes to free
561 * @return amount really freed bytes
563 * @see ewk_tile_unused_cache_used_get()
565 EAPI size_t ewk_tile_unused_cache_flush(Ewk_Tile_Unused_Cache *tuc, size_t bytes);
568 * Flushes enough bytes to make cache of unused tiles usage lower than maximum.
570 * Just like ewk_tile_unused_cache_flush(), but this will make the cache
571 * free enough tiles to respect maximum cache size as defined with
572 * ewk_tile_unused_cache_max_set().
574 * This function is usually called when system becomes idle. This way
575 * we keep memory low but do not impact performance when
576 * creating/deleting tiles.
578 * @param tuc cache of unused tiles to flush cache of unused tiles
580 EAPI void ewk_tile_unused_cache_auto_flush(Ewk_Tile_Unused_Cache *tuc);
583 * Sets the smart class api without any backing store, enabling view
586 * @param api class definition to set, all members with the
587 * exception of @a Evas_Smart_Class->data may be overridden, must
590 * @note @a Evas_Smart_Class->data is used to implement type checking and
591 * is not supposed to be changed/overridden. If you need extra
592 * data for your smart class to work, just extend
593 * Ewk_View_Smart_Class instead.
595 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (probably
598 * @see ewk_view_single_smart_set()
599 * @see ewk_view_tiled_smart_set()
601 EAPI Eina_Bool ewk_view_base_smart_set(Ewk_View_Smart_Class *api);
604 * Sets the smart class api using single backing store, enabling view
607 * @param api class definition to set, all members with the
608 * exception of @a Evas_Smart_Class->data may be overridden, must
611 * @note @a Evas_Smart_Class->data is used to implement type checking and
612 * is not supposed to be changed/overridden. If you need extra
613 * data for your smart class to work, just extend
614 * @a Ewk_View_Smart_Class instead.
616 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (probably
619 * @see ewk_view_base_smart_set()
621 EAPI Eina_Bool ewk_view_single_smart_set(Ewk_View_Smart_Class *api);
624 * Sets the smart class api using tiled backing store, enabling view
627 * @param api class definition to set, all members with the
628 * exception of @a Evas_Smart_Class->data may be overridden, must
631 * @note @a Evas_Smart_Class->data is used to implement type checking and
632 * is not supposed to be changed/overridden. If you need extra
633 * data for your smart class to work, just extend
634 * Ewk_View_Smart_Class instead.
636 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (probably
639 * @see ewk_view_base_smart_set()
641 EAPI Eina_Bool ewk_view_tiled_smart_set(Ewk_View_Smart_Class *api);
644 * Creates a new EFL WebKit View object.
646 * View objects are the recommended way to deal with EFL WebKit as it
647 * abstracts the complex pieces of the process.
649 * Each view is composed by a set of frames. The set has at least one
650 * frame, called 'main_frame'. See ewk_view_frame_main_get() and
651 * ewk_view_frame_focused_get().
653 * @param e canvas object where to create the view object
655 * @return view object on success or @c NULL on failure
657 * @see ewk_view_uri_set()
659 EAPI Evas_Object *ewk_view_single_add(Evas *e);
662 * Creates a new EFL WebKit View object using tiled backing store.
664 * View objects are the recommended way to deal with EFL WebKit as it
665 * abstracts the complex pieces of the process.
667 * This object is almost the same as the one returned by the ewk_view_single_add()
668 * function, but it uses the tiled backing store instead of the default
671 * @param e canvas object where to create the view object
673 * @return the view object on success or @c NULL on failure
675 * @see ewk_view_uri_set()
677 EAPI Evas_Object *ewk_view_tiled_add(Evas *e);
680 * Gets the cache object of unused tiles used by this view.
682 * @param o the view object to get the cache object
684 * @return the cache object of unused tiles or @c NULL on failure
686 EAPI Ewk_Tile_Unused_Cache *ewk_view_tiled_unused_cache_get(const Evas_Object *o);
689 * Sets the cache object of unused tiles used by this view.
691 * It can be used to share a single cache amongst different views.
692 * The tiles from one view will not be used by the other!
693 * This is just to limit the group with amount of unused memory.
695 * @note If @c NULL is provided as a @a cache, then a new one is created.
697 * @param o the view object to set the cache object
698 * @param the cache object of unused tiles
700 EAPI void ewk_view_tiled_unused_cache_set(Evas_Object *o, Ewk_Tile_Unused_Cache *cache);
703 * Sets a fixed layout size to be used, dissociating it from viewport size.
705 * Setting a width different than zero enables fixed layout on that
706 * size. It's automatically scaled based on zoom, but will not change
707 * if viewport changes.
709 * Setting both @a w and @a h to zero will disable fixed layout.
711 * @param o view object to change fixed layout
712 * @param w fixed width to use, this size will be automatically scaled
713 * based on zoom level
714 * @param h fixed height to use, this size will be automatically scaled
715 * based on zoom level
717 EAPI void ewk_view_fixed_layout_size_set(Evas_Object *o, Evas_Coord w, Evas_Coord h);
720 * Gets fixed layout size.
722 * @param o view object to get fixed layout size
723 * @param w the pointer to store fixed width, returns @c NULL on failure or if there is no
724 * fixed layout in use
725 * @param h the pointer to store fixed height, returns @c NULL on failure or if there is no
726 * fixed layout in use
728 EAPI void ewk_view_fixed_layout_size_get(const Evas_Object *o, Evas_Coord *w, Evas_Coord *h);
731 * Sets the theme path that will be used by this view.
733 * This also sets the theme on the main frame. As frames inherit theme
734 * from their parent, this will have all frames with unset theme to
737 * @param o view object to change theme
738 * @param path theme path, may be @c NULL to reset to the default theme
740 EAPI void ewk_view_theme_set(Evas_Object *o, const char *path);
743 * Gets the theme set on this view.
745 * This returns the value set by ewk_view_theme_set().
747 * @param o view object to get theme path
749 * @return the theme path, may be @c NULL if not set
751 EAPI const char *ewk_view_theme_get(const Evas_Object *o);
754 * Gets the object that represents the main frame.
756 * @param o view object to get main frame
758 * @return frame smart object or @c NULL if none yet
760 EAPI Evas_Object *ewk_view_frame_main_get(const Evas_Object *o);
763 * Gets the currently focused frame object.
765 * @param o view object to get focused frame
767 * @return frame smart object or @c NULL if none yet
769 EAPI Evas_Object *ewk_view_frame_focused_get(const Evas_Object *o);
772 * Asks the main frame to load the given URI.
774 * @param o view object to load @a uri
775 * @param uri uniform resource identifier to load
777 * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
779 EAPI Eina_Bool ewk_view_uri_set(Evas_Object *o, const char *uri);
782 * Gets the current uri loaded by main frame.
784 * It returns a internal string and should not
785 * be modified. The string is guaranteed to be stringshared.
787 * @param o view object to get current uri.
789 * @return current uri on success or @c NULL on failure
791 EAPI const char *ewk_view_uri_get(const Evas_Object *o);
794 * Gets the current title of the main frame.
796 * It returns a internal string and should not
797 * be modified. The string is guaranteed to be stringshared.
799 * @param o view object to get current title
801 * @return current title on success or @c NULL on failure
803 EAPI const Ewk_Text_With_Direction *ewk_view_title_get(const Evas_Object *o);
806 * Queries if the main frame is editable.
808 * @param o view object to query editable state
810 * @return @c EINA_TRUE if the main frame is editable, @c EINA_FALSE otherwise
812 EAPI Eina_Bool ewk_view_editable_get(const Evas_Object *o);
815 * Sets if main frame is editable.
817 * @param o view object to set editable state
818 * @param editable a new state to set
820 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
822 EAPI Eina_Bool ewk_view_editable_set(Evas_Object *o, Eina_Bool editable);
825 * Sets the background color and transparency of the view.
827 * Just as in Evas, colors are pre-multiplied, so 50% red is
828 * (128, 0, 0, 128) and not (255, 0, 0, 128)!
830 * @warning Watch out performance issues with transparency! Object
831 * will be handled as transparent image by evas even if the
832 * webpage specifies a background color. That mean you'll pay
833 * a price even if it's not really transparent, thus
834 * scrolling/panning and zooming will be likely slower than
835 * if transparency is off.
837 * @param o view object to change the background color
838 * @param r red color component
839 * @param g green color component
840 * @param b blue color component
841 * @param a transparency
843 EAPI void ewk_view_bg_color_set(Evas_Object *o, int r, int g, int b, int a);
846 * Gets the background color of the view.
848 * Just as in Evas, colors are pre-multiplied, so 50% red is
849 * (128, 0, 0, 128) and not (255, 0, 0, 128)!
851 * @param o view object to get the background color
852 * @param r the pointer to store red color component
853 * @param g the pointer to store green color component
854 * @param b the pointer to store blue color component
855 * @param a the pointer to store alpha value
857 EAPI void ewk_view_bg_color_get(const Evas_Object *o, int *r, int *g, int *b, int *a);
860 * Gets the copy of the selected text.
862 * The returned string @b should be freed by eina_stringshare_del() after use.
864 * @param o view object to get selected text
866 * @return a newly allocated string or @c NULL if nothing is selected or on failure
868 EAPI const char *ewk_view_selection_get(const Evas_Object *o);
871 * Forwards a request of a new Context Menu to WebCore.
873 * @param o view object to forward a request of a new Context Menu
874 * @param ev mouse down event data
876 * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise
878 EAPI Eina_Bool ewk_view_context_menu_forward_event(Evas_Object *o, const Evas_Event_Mouse_Down *ev);
881 * Executes editor command.
883 * @param o view object to execute command
884 * @param command editor command to execute
885 * @param value the value to be passed into command
887 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
889 EAPI Eina_Bool ewk_view_editor_command_execute(const Evas_Object *o, const Ewk_Editor_Command command, const char *value);
892 * Destroys a previously created color chooser.
894 * Before destroying, it informs client that color chooser's data is ready to be
895 * destroyed by sending a "colorchooser,willdelete". Then it removes any reference
896 * to the color chooser inside webkit. It's safe to call this function either from
897 * inside webkit or from browser.
899 * @param o view object
901 * @return @c EINA_TRUE in case color chooser was successfully destroyed or @c EINA_TRUE in
902 * case there wasn't any color chooser to be destroyed
904 EAPI Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* o);
907 * Changes the selected color.
909 * Changes the color selected in the color input widget. The browser should call
910 * this when the user chooses a new color. It's likely that ewk_view_color_chooser_destroy
911 * will be called afterwards.
913 * @param o view object
914 * @param r red color component
915 * @param g green color component
916 * @param b blue color component
918 EAPI void ewk_view_color_chooser_color_set(Evas_Object* o, int r, int g, int b);
921 * Changes currently selected item.
923 * Changes the option selected in select widget. This is called by browser
924 * whenever user has chosen a different item. Most likely after calling this, a
925 * call to ewk_view_popup_destroy might be made in order to close the popup.
927 * @param o view object to change currently selected item
928 * @index index a new index to set
930 EAPI void ewk_view_popup_selected_set(Evas_Object *o, int index);
933 * Destroys a previously created menu.
935 * Before destroying, it informs client that menu's data is ready to be
936 * destroyed by sending a "popup,willdelete" with a list of menu items. Then it
937 * removes any reference to menu inside webkit. It's safe to call this
938 * function either from inside webkit or from browser.
940 * @param o view object
942 * @return @c EINA_TRUE in case menu was successfully destroyed or @c EINA_TRUE in
943 * case there wasn't any menu to be destroyed
945 EAPI Eina_Bool ewk_view_popup_destroy(Evas_Object *o);
948 * Searches the given string in a document.
950 * @param o view object where to search the text
951 * @param string reference string to search
952 * @param case_sensitive if search should be case sensitive or not
953 * @param forward if search is from cursor and on or backwards
954 * @param wrap if search should wrap at the end
956 * @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not or failure
958 EAPI Eina_Bool ewk_view_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
961 * Marks matches the given string in a document.
963 * @param o view object where to search text
964 * @param string reference string to match
965 * @param case_sensitive if match should be case sensitive or not
966 * @param highlight if matches should be highlighted
967 * @param limit maximum amount of matches, or zero to unlimited
969 * @return number of matched @a string
971 EAPI unsigned int ewk_view_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
974 * Unmarks all marked matches in a document.
976 * Reverses the effect of ewk_frame_text_matches_mark().
978 * @param o view object where to unmark matches
980 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
982 EAPI Eina_Bool ewk_view_text_matches_unmark_all(Evas_Object *o);
985 * Sets if should highlight matches marked with ewk_frame_text_matches_mark().
987 * @param o view object where to set if matches are highlighted or not
988 * @param highlight @c EINA_TRUE if matches are highlighted, @c EINA_FALSE if not
990 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
992 EAPI Eina_Bool ewk_view_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight);
995 * Gets if should highlight matches marked with ewk_frame_text_matches_mark().
997 * @param o view object to query if matches are highlighted or not
999 * @return @c EINA_TRUE if matches are highlighted, @c EINA_FALSE otherwise
1001 EAPI Eina_Bool ewk_view_text_matches_highlight_get(const Evas_Object *o);
1004 * Gets the current load progress of page.
1006 * The progress estimates from 0.0 to 1.0.
1008 * @param o view object to get the current progress
1010 * @return the load progres of page, value from 0.0 to 1.0 on success
1011 * or -1.0 on failure
1013 EAPI double ewk_view_load_progress_get(const Evas_Object *o);
1016 * Asks the main frame to stop loading.
1018 * @param o view object to stop loading
1020 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise.
1022 EAPI Eina_Bool ewk_view_stop(Evas_Object *o);
1025 * Asks the main frame to reload the current document.
1027 * @param o view object to reload current document
1029 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1031 * @see ewk_view_reload_full()
1033 EAPI Eina_Bool ewk_view_reload(Evas_Object *o);
1036 * Asks the main frame to fully reload the current document, using no caches.
1038 * @param o view object to reload current document
1040 * @return @c EINA_TRUE on success o r@c EINA_FALSE otherwise
1042 * @see ewk_view_reload()
1044 EAPI Eina_Bool ewk_view_reload_full(Evas_Object *o);
1047 * Asks the frame to navigate back in the history.
1049 * @param o view object to navigate back
1051 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1053 * @see ewk_frame_back()
1055 EAPI Eina_Bool ewk_view_back(Evas_Object *o);
1058 * Asks frame to navigate forward in the history.
1060 * @param o view object to navigate forward
1062 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1064 * @see ewk_frame_forward()
1066 EAPI Eina_Bool ewk_view_forward(Evas_Object *o);
1069 * Navigates back or forward in the history.
1071 * @param o view object to navigate in the history
1072 * @param steps if positive navigates that amount forwards, if negative
1075 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1077 * @see ewk_frame_navigate()
1079 EAPI Eina_Bool ewk_view_navigate(Evas_Object *o, int steps);
1082 * Queries if it's possible to navigate backwards one item in the history.
1084 * @param o view object to query if backward navigation is possible
1086 * @return @c EINA_TRUE if it's possible to navigate backward one item in the history, @c EINA_FALSE otherwise
1087 * @see ewk_view_navigate_possible()
1089 EAPI Eina_Bool ewk_view_back_possible(Evas_Object *o);
1092 * Queries if it's possible to navigate forwards one item in the history.
1094 * @param o view object to query if forward navigation is possible
1096 * @return @c EINA_TRUE if it's possible to navigate forwards in the history, @c EINA_FALSE otherwise
1098 * @see ewk_view_navigate_possible()
1100 EAPI Eina_Bool ewk_view_forward_possible(Evas_Object *o);
1103 * Queries if it's possible to navigate given @a steps in the history.
1105 * @param o view object to query if it's possible to navigate @a steps in the history
1106 * @param steps if positive navigates that amount forwards, if negative
1109 * @return @c EINA_TRUE if it's possible to navigate @a steps in the history, @c EINA_FALSE otherwise
1111 EAPI Eina_Bool ewk_view_navigate_possible(Evas_Object *o, int steps);
1114 * Queries if navigation in the history (back-forward lists) is enabled.
1116 * @param o view object to query if navigation history is enabled
1118 * @return @c EINA_TRUE if view keeps history, @c EINA_FALSE otherwise
1120 EAPI Eina_Bool ewk_view_history_enable_get(const Evas_Object *o);
1123 * Enables/disables navigation in the history (back-forward lists).
1125 * @param o view object to enable/disable navigation in the history
1126 * @param enable @c EINA_TRUE to enable navigation in the history,
1127 * @c EINA_FALSE to disable
1129 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1131 EAPI Eina_Bool ewk_view_history_enable_set(Evas_Object *o, Eina_Bool enable);
1134 * Gets the history (back-forward list) associated with this view.
1136 * The returned instance is unique for this view and thus multiple calls
1137 * to this function with the same view as parameter returns the same
1138 * handle. This handle is alive while view is alive, thus one
1139 * might want to listen for EVAS_CALLBACK_DEL on given view
1140 * (@a o) to know when to stop using returned handle.
1142 * @param o view object to get navigation history
1144 * @return the history instance handle associated with this
1145 * view on succes or @c NULL on failure (including when the history
1146 * navigation is not enabled with ewk_view_history_enable_set())
1148 * @see ewk_view_history_enable_set()
1150 EAPI Ewk_History *ewk_view_history_get(const Evas_Object *o);
1153 * Adds @a visited_url to the view's visited links cache.
1155 * This function is to be invoked by the client managing persistent history storage
1156 * when "populate,visited,links" signal is received.
1158 * @param o view object to add visited links data.
1159 * @param visited_url visited url.
1161 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
1163 EAPI Eina_Bool ewk_view_visited_link_add(Evas_Object *o, const char *visited_url);
1166 * Gets the current page zoom level of the main frame.
1168 * @param o view object to get the zoom level
1170 * @return current zoom level in use on success or @c -1.0 on failure
1172 EAPI float ewk_view_page_zoom_get(const Evas_Object *o);
1175 * Sets the current page zoom level of the main frame.
1177 * @param o view object to set the zoom level
1178 * @param page_zoom_factor a new level to set
1180 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1182 EAPI Eina_Bool ewk_view_page_zoom_set(Evas_Object *o, float page_zoom_factor);
1185 * Gets the current scale factor of the page.
1187 * @param o view object to get the scale factor
1189 * @return current scale factor in use on success or @c -1.0 on failure
1191 EAPI float ewk_view_scale_get(const Evas_Object *o);
1194 * Scales the current page, centered at the given point.
1196 * @param o view object to set the zoom level
1197 * @param scale_factor a new level to set
1198 * @param cx x of center coordinate
1199 * @param cy y of center coordinate
1201 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1203 EAPI Eina_Bool ewk_view_scale_set(Evas_Object *o, float scale_factor, Evas_Coord cx, Evas_Coord cy);
1206 * Gets the current text zoom level of the main frame.
1208 * @param o view object to get the zoom level
1210 * @return current zoom level in use on success or @c -1.0 on failure
1212 EAPI float ewk_view_text_zoom_get(const Evas_Object *o);
1215 * Sets the current text zoom level of the main frame.
1217 * @param o view object to set the zoom level
1218 * @param textZoomFactor a new level to set
1220 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1222 EAPI Eina_Bool ewk_view_text_zoom_set(Evas_Object *o, float text_zoom_factor);
1225 * Gets the current zoom level of the main frame.
1227 * @param o view object to get the zoom level
1229 * @return current zoom level in use on success or @c -1.0 on failure
1231 EAPI float ewk_view_zoom_get(const Evas_Object *o);
1234 * Sets the current zoom level of the main frame, centered at the given point.
1236 * @param o view object to set the zoom level
1237 * @param zoom a new level to set
1238 * @param cx x of center coordinate
1239 * @param cy y of center coordinate
1241 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1243 EAPI Eina_Bool ewk_view_zoom_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);
1246 * Queries if the smooth scale is enabled while the weak zoom.
1248 * @param o view object to query if the smooth scale is enabled while the weak zoom
1250 * @return @c EINA_TRUE if the smooth scale is enabled while the weak zoom, or
1251 * @c EINA_FALSE if not or on failure
1253 EAPI Eina_Bool ewk_view_zoom_weak_smooth_scale_get(const Evas_Object *o);
1256 * Enables/disables the smooth scale while the weak zoom.
1258 * @param o view object to set the smooth scale while the weak zoom
1259 * @param smooth_scale @c EINA_TRUE to enable the smooth scale
1260 * @c EINA_FALSE to disable
1262 EAPI void ewk_view_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale);
1265 * Sets the current zoom level of backing store, centered at given point.
1267 * Unlike ewk_view_zoom_set(), this call do not ask WebKit to render
1268 * at new size, but scale what is already rendered, being much faster
1269 * but worse quality.
1271 * Often one should use ewk_view_zoom_animated_set(), it will call the
1272 * same machinery internally.
1274 * @note this will set variables used by ewk_view_zoom_animated_set()
1275 * so sub-classes will not reset internal state on their
1276 * "calculate" phase. To unset those and enable sub-classes to
1277 * reset their internal state, call
1278 * ewk_view_zoom_animated_mark_stop(). Namely, this call will
1279 * set ewk_view_zoom_animated_mark_start() to actual webkit zoom
1280 * level, ewk_view_zoom_animated_mark_end() and
1281 * ewk_view_zoom_animated_mark_current() to given zoom level.
1283 * @param o view object to set the weak zoom level
1284 * @param zoom a new level to scale backing store
1285 * @param cx horizontal center offset, relative to object (w/2 is middle)
1286 * @param cy vertical center offset, relative to object (h/2 is middle)
1288 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1290 EAPI Eina_Bool ewk_view_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);
1293 * Sets start of an internal zoom animation state to the given zoom.
1295 * This does not modify any actual zoom in WebKit or backing store,
1296 * just set needed flag so sub-classes knows they should not reset
1297 * their an internal state.
1299 * @param o view object to set start of an internal zoom animation
1300 * @param zoom a new start value
1302 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1304 * @see ewk_view_zoom_animated_set()
1305 * @see ewk_view_zoom_weak_set()
1306 * @see ewk_view_zoom_animated_mark_stop()
1307 * @see ewk_view_zoom_animated_mark_end()
1308 * @see ewk_view_zoom_animated_mark_current()
1310 EAPI Eina_Bool ewk_view_zoom_animated_mark_start(Evas_Object *o, float zoom);
1313 * Sets end of an internal zoom animation state to given zoom.
1315 * This does not modify any actual zoom in WebKit or backing store,
1316 * just set needed flag so sub-classes knows they should not reset
1317 * their an internal state.
1319 * @param o view object to set end of an internal zoom animation
1320 * @param zoom a new end value
1322 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1324 * @see ewk_view_zoom_animated_set()
1325 * @see ewk_view_zoom_weak_set()
1326 * @see ewk_view_zoom_animated_mark_stop()
1327 * @see ewk_view_zoom_animated_mark_start()
1328 * @see ewk_view_zoom_animated_mark_current()
1330 EAPI Eina_Bool ewk_view_zoom_animated_mark_end(Evas_Object *o, float zoom);
1333 * Sets an internal current zoom animation state to given zoom.
1335 * This does not modify any actual zoom in WebKit or backing store,
1336 * just set needed flag so sub-classes knows they should not reset
1337 * their an internal state.
1339 * @param o view object to set an internal current zoom animation
1340 * @param zoom a new current value
1342 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
1344 * @see ewk_view_zoom_animated_set()
1345 * @see ewk_view_zoom_weak_set()
1346 * @see ewk_view_zoom_animated_mark_stop()
1347 * @see ewk_view_zoom_animated_mark_start()
1348 * @see ewk_view_zoom_animated_mark_end()
1350 EAPI Eina_Bool ewk_view_zoom_animated_mark_current(Evas_Object *o, float zoom);
1353 * Unmarks an internal zoom animation state.
1355 * The start, end and current values of an internal zoom animation are zeroed.
1357 * @param o view object to unmark an internal zoom animation state
1359 * @see ewk_view_zoom_animated_mark_start()
1360 * @see ewk_view_zoom_animated_mark_end()
1361 * @see ewk_view_zoom_animated_mark_current()
1362 * @see ewk_view_zoom_weak_set()
1364 EAPI Eina_Bool ewk_view_zoom_animated_mark_stop(Evas_Object *o);
1367 * Sets the current zoom level while animating.
1369 * If the view was already animating to another zoom, it will start
1370 * from current point to the next provided zoom (@a zoom parameter)
1371 * and duration (@a duration parameter).
1373 * This is the recommended way to do transitions from one level to
1374 * another. However, one may wish to do those from outside, in that
1375 * case use ewk_view_zoom_weak_set() and later control intermediate
1376 * states with ewk_view_zoom_animated_mark_current(),
1377 * ewk_view_zoom_animated_mark_end() and
1378 * ewk_view_zoom_animated_mark_stop().
1380 * @param o view object to animate
1381 * @param zoom final zoom level to use
1382 * @param duration time in seconds the animation should take.
1383 * @param cx offset inside object that defines zoom center. 0 is left side
1384 * @param cy offset inside object that defines zoom center. 0 is top side
1385 * @return @c EINA_TRUE if animation will be started, @c EINA_FALSE if not
1386 * because zoom is too small/big
1388 EAPI Eina_Bool ewk_view_zoom_animated_set(Evas_Object *o, float zoom, float duration, Evas_Coord cx, Evas_Coord cy);
1391 * Asks engine to pre-render region.
1393 * Engines and backing store might be able to pre-render regions in
1394 * order to speed up zooming or scrolling to that region. Not all
1395 * engines might implement that and they will return @c EINA_FALSE
1398 * The given region is a hint. Engines might do bigger or smaller area
1399 * that covers that region. Pre-render might not be immediate, it may
1400 * be postponed to a thread, operated cooperatively in the main loop
1401 * and may be even ignored or cancelled afterwards.
1403 * Multiple requests might be queued by engines. One can clear/forget
1404 * about them with ewk_view_pre_render_cancel().
1406 * @param o view to ask pre-render of given region
1407 * @param x absolute coordinate (0=left) to pre-render at zoom
1408 * @param y absolute coordinate (0=top) to pre-render at zoom
1409 * @param w width to pre-render starting from @a x at zoom
1410 * @param h height to pre-render starting from @a y at zoom
1411 * @param zoom desired zoom
1413 * @return @c EINA_TRUE if request was accepted, @c EINA_FALSE
1414 * otherwise (errors, pre-render feature not supported, etc)
1416 * @see ewk_view_pre_render_cancel()
1418 EAPI Eina_Bool ewk_view_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
1421 * Asks engine to pre-render region, given @a n extra cols/rows.
1423 * This is an alternative method to ewk_view_pre_render_region(). It does not
1424 * make sense in all engines and therefore it might not be implemented at all.
1426 * It's only useful if engine divide the area being rendered in smaller tiles,
1427 * forming a grid. Then, browser could call this function to pre-render @a n
1428 * rows/cols involving the current viewport.
1430 * @param o view to ask pre-render
1431 * @param n number of cols/rows that must be part of the region pre-rendered
1433 * @return @c EINA_TRUE if request was accepted, @c EINA_FALSE
1434 * otherwise (errors, pre-render feature not supported, etc)
1436 * @see ewk_view_pre_render_region()
1438 EAPI Eina_Bool ewk_view_pre_render_relative_radius(Evas_Object *o, unsigned int n);
1441 * Asks engine to start pre-rendering.
1443 * This is an alternative method to pre-render around the view area.
1444 * The first step is to find the center view area where to start pre-rendering.
1445 * And then from the center of the view area the backing store append the render request
1446 * outward in spiral order. So that the tiles which are close to view area are displayed
1447 * sooner than outside.
1449 * @param o view to ask pre-render
1451 * @return @c EINA_TRUE if request was accepted, @c EINA_FALSE
1452 * otherwise (errors, pre-render feature not supported, etc)
1455 EAPI Eina_Bool ewk_view_pre_render_start(Evas_Object *o);
1458 * Cancels and clears previous the pre-render requests.
1460 * @param o view to clear pre-render requests
1462 EAPI void ewk_view_pre_render_cancel(Evas_Object *o);
1465 * Enables (resumes) rendering.
1467 * @param o view object to enable rendering
1469 * @return @c EINA_TRUE if rendering was enabled, @c EINA_FALSE
1470 * otherwise (errors, rendering suspension feature not supported)
1472 * @see ewk_view_disable_render()
1474 EAPI Eina_Bool ewk_view_enable_render(const Evas_Object *o);
1477 * Disables (suspends) rendering.
1479 * @param o view object to disable rendering
1481 * @return @c EINA_TRUE if rendering was disabled, @c EINA_FALSE
1482 * otherwise (errors, rendering suspension not supported)
1484 EAPI Eina_Bool ewk_view_disable_render(const Evas_Object *o);
1487 * Gets the input method hints.
1489 * @param o view object to get the input method hints
1493 * @return the input method hints as @a Ewk_Imh bits-field
1495 EAPI unsigned int ewk_view_imh_get(const Evas_Object *o);
1498 * Gets the user agent string.
1500 * @param o view object to get the user agent string
1502 * @return the user agent string
1504 EAPI const char *ewk_view_setting_user_agent_get(const Evas_Object *o);
1507 * Sets the user agent string.
1509 * @param o view object to set the user agent string
1511 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1513 EAPI Eina_Bool ewk_view_setting_user_agent_set(Evas_Object *o, const char *user_agent);
1516 * Queries if the images are loaded automatically.
1518 * @param o view object to query if the images are loaded automatically
1520 * @return @c EINA_TRUE if the images are loaded automatically,
1521 * @c EINA_FALSE if not or on failure
1523 EAPI Eina_Bool ewk_view_setting_auto_load_images_get(const Evas_Object *o);
1526 * Enables/disables auto loading of the images.
1528 * @param o view object to set auto loading of the images
1529 * @param automatic @c EINA_TRUE to enable auto loading of the images,
1530 * @c EINA_FALSE to disable
1532 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1534 EAPI Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Bool automatic);
1537 * Queries if the images are shrinked automatically
1539 * @param o view object to query if the images are shrinked automatically
1541 * @return @c EINA_TRUE if the images are shrinked automatically,
1542 * @c EINA_FALSE if not or on failure
1544 EAPI Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object *o);
1547 * Enables/disables auto shrinking of the images.
1549 * @param o view object to set auto shrinking of the images
1550 * @param automatic @c EINA_TRUE to enable auto shrinking of the images,
1551 * @c EINA_FALSE to disable
1553 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1555 EAPI Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic);
1558 * Queries if the view can be resized automatically.
1560 * @param o view object to query if the view can be resized automatically
1562 * @return @c EINA_TRUE if view can be resized automatically,
1563 * @c EINA_FALSE if not or on failure
1565 EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object *o);
1568 * Enables/disables if the view can be resized automatically.
1570 * @param o view object to set if the view can be resized automatically
1571 * @param resizable @c EINA_TRUE if view can be resizable automatically,
1572 * @c EINA_TRUE if not
1574 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1576 EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object *o, Eina_Bool resizable);
1579 * Queries if the scripts can be executed.
1581 * @param o view object to query if the scripts can be executed
1583 * @return @c EINA_TRUE if the scripts can be executed
1584 * @c EINA_FALSE if not or on failure
1586 EAPI Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object *o);
1589 * Enables/disables scripts executing.
1591 * @param o view object to set script executing
1592 * @param enable @c EINA_TRUE to enable scripts executing
1593 * @c EINA_FALSE to disable
1595 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1597 EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable);
1600 * Queries if the plug-ins are enabled.
1602 * @param o view object to query if the plug-ins are enabled
1604 * @return @c EINA_TRUE if the plugins are enabled
1605 * @c EINA_FALSE if not or on failure
1607 EAPI Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object *o);
1610 * Enables/disables the plug-ins.
1612 * @param o view object to set the plug-ins
1613 * @param enable @c EINA_TRUE to enable the plug-ins
1614 * @c EINA_FALSE to disable
1616 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1618 EAPI Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object *o, Eina_Bool enable);
1621 * Queries if the frame flattening feature is enabled.
1623 * @param o view object to query if the frame flattening feature is enabled
1625 * @return @c EINA_TRUE if the frame flattening feature is enabled,
1626 * @c EINA_FALSE if not or on failure
1628 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object *o);
1631 * Enables/disables the frame flattening feature.
1633 * @param o view object to set the frame flattening feature
1634 * @param enable @c EINA_TRUE to enable the frame flattening feature
1635 * @c EINA_FALSE to disable
1637 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1639 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object *o, Eina_Bool enable);
1642 * Queries if the scripts can open the new windows.
1644 * @param o view object to query if the scripts can open the new windows
1646 * @return @c EINA_TRUE if the scripts can open the new windows
1647 * @c EINA_FALSE if not or on failure
1649 EAPI Eina_Bool ewk_view_setting_scripts_can_open_windows_get(const Evas_Object *o);
1652 * Enables/disables if the scripts can open the new windows.
1654 * @param o view object to set if the scripts can open the new windows
1655 * @param allow @c EINA_TRUE if the scripts can open the new windows
1656 * @c EINA_FALSE if not
1658 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (scripts are disabled)
1660 * @see ewk_view_setting_enable_scripts_set
1662 EAPI Eina_Bool ewk_view_setting_scripts_can_open_windows_set(Evas_Object *o, Eina_Bool allow);
1665 * Returns whether scripts can close windows automatically.
1667 * @param o View whose settings to check.
1669 * @return @c EINA_TRUE if scripts can close windows, @c EINA_FALSE otherwise.
1671 EAPI Eina_Bool ewk_view_setting_scripts_can_close_windows_get(const Evas_Object *o);
1674 * Sets whether scripts are allowed to close windows automatically.
1676 * @param o View whose settings to change.
1677 * @param allow @c EINA_TRUE to allow scripts to close windows,
1678 * @c EINA_FALSE otherwise.
1680 * @return @c EINA_TRUE if the setting could be changed successfully,
1681 * @c EINA_FALSE in case an error occurred.
1683 EAPI Eina_Bool ewk_view_setting_scripts_can_close_windows_set(Evas_Object *o, Eina_Bool allow);
1686 * Returns whether scripts can access clipboard.
1688 * @param o View whose settings to check.
1690 * @return @c EINA_TRUE if scripts can access clipboard, @c EINA_FALSE otherwise.
1692 EAPI Eina_Bool ewk_view_setting_scripts_can_access_clipboard_get(const Evas_Object *o);
1695 * Sets whether scripts are allowed to access clipboard.
1697 * The default value is @c EINA_FALSE. If set to @c EINA_TRUE, document.execCommand()
1698 * allows cut, copy and paste commands.
1700 * @param o View whose settings to change.
1701 * @param allow @c EINA_TRUE to allow scripts access clipboard,
1702 * @c EINA_FALSE otherwise.
1704 * @return @c EINA_TRUE if the setting could be changed successfully,
1705 * @c EINA_FALSE in case an error occurred.
1707 EAPI Eina_Bool ewk_view_setting_scripts_can_access_clipboard_set(Evas_Object *o, Eina_Bool allow);
1710 * Queries if HTML elements @c textarea can be resizable.
1712 * @param o view object to query if the textarea elements can be resizable
1714 * @return @c EINA_TRUE if the textarea elements can be resizable
1715 * @c EINA_FALSE if not or on failure
1717 EAPI Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object *o);
1720 * Enables/disables if HTML elements @c textarea can be resizable.
1722 * @param o view object to set if the textarea elements can be resizable
1723 * @param enable @c EINA_TRUE if the textarea elements can be resizable
1724 * @c EINA_FALSE if not
1726 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1728 EAPI Eina_Bool ewk_view_setting_resizable_textareas_set(Evas_Object *o, Eina_Bool enable);
1731 * Gets the user style sheet.
1733 * @param o view object to get the user style sheet
1735 * @return the user style sheet
1737 EAPI const char *ewk_view_setting_user_stylesheet_get(const Evas_Object *o);
1740 * Sets the user style sheet.
1742 * @param o view object to set the user style sheet
1743 * @param uri uniform resource identifier to user style sheet
1745 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1747 EAPI Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object *o, const char *uri);
1750 * Queries if the private browsing feature is enabled.
1752 * @param o view object to query if the private browsing feature is enabled
1754 * @return @c EINA_TRUE if the private browsing feature is enabled, or
1755 * @c EINA_FALSE if not or on failure
1757 * @see ewk_view_setting_private_browsing_set
1759 EAPI Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object *o);
1762 * Enables/disables the private browsing feature.
1764 * When this option is set, WebCore will avoid storing any record of browsing
1765 * activity that may persist on disk or remain displayed when the
1768 * This option does not affect the storage of such information in RAM.
1770 * The following functions respect this setting:
1771 * - HTML5/DOM Storage
1773 * - Console Messages
1775 * - Application Cache
1776 * - Back/Forward Page History
1777 * - Page Search Results
1779 * - Plug-ins (that support NPNVprivateModeBool)
1781 * @param o view object to set the private browsing feature
1782 * @param enable @c EINA_TRUE to enable the private browsing feature
1783 * @c EINA_FALSE to disable
1785 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1787 EAPI Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object *o, Eina_Bool enable);
1790 * Returns whether HTML5 application cache support is enabled for this view.
1792 * The Offline Application Caching APIs are part of HTML5 and allow applications to store data locally that is accessed
1793 * when the network cannot be reached.
1795 * Application cache support is enabled by default.
1797 * @param o view object whose settings to query
1799 * @return @c EINA_TRUE if the application cache is enabled,
1800 * @c EINA_FALSE if not or on failure
1802 * @sa ewk_settings_application_cache_path_set
1804 EAPI Eina_Bool ewk_view_setting_application_cache_get(const Evas_Object *o);
1807 * Enables/disables the HTML5 application cache for this view.
1809 * The Offline Application Caching APIs are part of HTML5 and allow applications to store data locally that is accessed
1810 * when the network cannot be reached.
1812 * Application cache support is enabled by default.
1814 * @param o view object whose settings to change
1815 * @param enable @c EINA_TRUE to enable the application cache,
1816 * @c EINA_FALSE to disable
1818 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1820 * @sa ewk_settings_application_cache_path_set
1822 EAPI Eina_Bool ewk_view_setting_application_cache_set(Evas_Object *o, Eina_Bool enable);
1825 * Queries if the caret browsing feature is enabled.
1827 * @param o view object to query if the caret browsing feature is enabled
1829 * @return @c EINA_TRUE if the caret browsing feature is enabled,
1830 * @c EINA_FALSE if not or on failure
1832 EAPI Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object *o);
1835 * Enables/disables the caret browsing feature.
1837 * @param o view object to set caret browsing feature
1838 * @param enable @c EINA_TRUE to enable the caret browsing feature
1839 * @c EINA_FALSE to disable
1841 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1843 EAPI Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object *o, Eina_Bool enable);
1846 * Gets the current encoding.
1848 * @param o view object to get the current encoding
1850 * @return @c eina_strinshare containing the current encoding, or
1851 * @c NULL if it's not set
1853 EAPI const char *ewk_view_setting_encoding_custom_get(const Evas_Object *o);
1856 * Sets the encoding and reloads the page.
1858 * @param o view to set the encoding
1859 * @param encoding the new encoding to set or @c NULL to restore the default one
1861 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1863 EAPI Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object *o, const char *encoding);
1866 * Gets the default encoding.
1868 * @param o view object to get the default encoding
1870 * @return @c eina_strinshare containing the default encoding, or
1871 * @c NULL if it's not set
1873 EAPI const char *ewk_view_setting_encoding_default_get(const Evas_Object *o);
1876 * Sets the default encoding.
1878 * @param o view to set the default encoding
1879 * @param encoding the new encoding to set
1881 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1883 EAPI Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object *o, const char *encoding);
1886 * Gets the minimum font size.
1888 * @param o view object to get the minimum font size
1890 * @return the minimum font size, or @c 0 on failure
1892 EAPI int ewk_view_setting_font_minimum_size_get(const Evas_Object *o);
1895 * Sets the minimum font size.
1897 * @param o view object to set the minimum font size
1898 * @param size a new minimum font size to set
1900 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1902 EAPI Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object *o, int size);
1905 * Gets the minimum logical font size.
1907 * @param o view object to get the minimum logical font size
1909 * @return the minimum logical font size, or @c 0 on failure
1911 EAPI int ewk_view_setting_font_minimum_logical_size_get(const Evas_Object *o);
1914 * Sets the minimum logical font size.
1916 * @param o view object to set the minimum font size
1917 * @param size a new minimum logical font size to set
1919 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1921 EAPI Eina_Bool ewk_view_setting_font_minimum_logical_size_set(Evas_Object *o, int size);
1924 * Gets the default font size.
1926 * @param o view object to get the default font size
1928 * @return the default font size, or @c 0 on failure
1930 EAPI int ewk_view_setting_font_default_size_get(const Evas_Object *o);
1933 * Sets the default font size.
1935 * @param o view object to set the default font size
1936 * @param size a new default font size to set
1938 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1940 EAPI Eina_Bool ewk_view_setting_font_default_size_set(Evas_Object *o, int size);
1943 * Gets the Monospace font size.
1945 * @param o view object to get the Monospace font size
1947 * @return the Monospace font size, or @c 0 on failure
1949 EAPI int ewk_view_setting_font_monospace_size_get(const Evas_Object *o);
1952 * Sets the Monospace font size.
1954 * @param o view object to set the Monospace font size
1955 * @param size a new Monospace font size to set
1957 * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
1959 EAPI Eina_Bool ewk_view_setting_font_monospace_size_set(Evas_Object *o, int size);
1962 * Gets the name of font for the given font family.
1964 * @param o view object to get name of font the for font family
1965 * @param font_family the font family as @a Ewk_Font_Family enum to get font name
1967 * @return the name of font family
1969 EAPI const char *ewk_view_font_family_name_get(const Evas_Object *o, Ewk_Font_Family font_family);
1972 * Sets the font for the given family.
1974 * @param o view object to set font for the given family
1975 * @param font_family the font family as @a Ewk_Font_Family enum
1976 * @param name the font name to set
1978 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
1980 EAPI Eina_Bool ewk_view_font_family_name_set(Evas_Object *o, Ewk_Font_Family font_family, const char *name);
1983 * Queries if the spatial naviagtion feature is enabled.
1985 * @param o view object to query if spatial navigation feature is enabled
1987 * @return @c EINA_TRUE if spatial navigation is enabled,
1988 * @c EINA_FALSE if not or on failure
1990 EAPI Eina_Bool ewk_view_setting_spatial_navigation_get(const Evas_Object *o);
1993 * Enables/disables the spatial navigation feature.
1995 * @param o view object to set spatial navigation feature
1996 * @param enable @c EINA_TRUE to enable the spatial navigation feature,
1997 * @c EINA_FALSE to disable
1999 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2001 EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object *o, Eina_Bool enable);
2004 * Queries if the local storage feature of HTML5 is enabled.
2006 * @param o view object to query if the local storage feature is enabled
2008 * @return @c EINA_TRUE if local storage is enabled,
2009 * @c EINA_FALSE if not or on failure
2011 EAPI Eina_Bool ewk_view_setting_local_storage_get(const Evas_Object *o);
2014 * Enables/disables the local storage feature of HTML5.
2016 * Please notice that by default there is no storage path specified for the database.
2017 * This means that the contents of @c window.localStorage will not be saved to disk and
2018 * will be lost when the view is removed.
2019 * To set the path where the storage database will be stored, use
2020 * ewk_view_setting_local_storage_database_path_set.
2022 * @param o view object to set if local storage is enabled
2023 * @param enable @c EINA_TRUE to enable the local storage feature,
2024 * @c EINA_FALSE to disable
2026 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2028 * @sa ewk_view_setting_local_storage_database_path_set
2030 EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object *o, Eina_Bool enable);
2033 * Returns the path where the HTML5 local storage database is stored on disk.
2035 * By default, there is no path set, which means changes to @c window.localStorage will not
2036 * be saved to disk whatsoever.
2038 * @param o view object to get the database path to the local storage feature
2040 * @return @c eina_stringshare containing the database path to the local storage feature, or
2041 * @c NULL if it's not set
2043 * @sa ewk_view_setting_local_storage_database_path_set
2045 EAPI const char *ewk_view_setting_local_storage_database_path_get(const Evas_Object *o);
2048 * Sets the path where the HTML5 local storage database is stored on disk.
2050 * By default, there is no path set, which means changes to @c window.localStorage will not
2051 * be saved to disk whatsoever.
2053 * @param o view object to set the database path to the local storage feature
2054 * @param path a new database path to the local storage feature
2056 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2058 * @sa ewk_view_setting_local_storage_set
2060 EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object *o, const char *path);
2063 * Queries if the page cache feature is enabled.
2065 * @param o view object to query if page cache feature is enabled
2067 * @return @c EINA_TRUE if page cache is enabled,
2068 * @c EINA_FALSE if not or on failure
2070 EAPI Eina_Bool ewk_view_setting_page_cache_get(const Evas_Object *o);
2073 * Enables/disables the page cache feature.
2075 * @param o view object to set page cache feature
2076 * @param enable @c EINA_TRUE to enable the page cache feature,
2077 * @c EINA_FALSE to disable
2079 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2081 EAPI Eina_Bool ewk_view_setting_page_cache_set(Evas_Object *o, Eina_Bool enable);
2084 * Queries if the encoding detector is enabled.
2086 * @param o view object to query if the encoding detector is enabled
2088 * @return @c EINA_TRUE if the encoding feature is enabled,
2089 * @c EINA_FALSE if not or on failure
2091 EAPI Eina_Bool ewk_view_setting_encoding_detector_get(const Evas_Object *o);
2094 * Enables/disables the encoding detector.
2096 * @param o view object to set the encoding detector
2097 * @param enable @c EINA_TRUE to enable the encoding detector,
2098 * @c EINA_FALSE to disable
2100 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
2102 EAPI Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object *o, Eina_Bool enable);
2105 * Queries if developer extensions are enabled.
2107 * Currently, this is used to know whether the Web Inspector is enabled for a
2110 * @param o view object to query if developer extensions are enabled
2112 * @return @c EINA_TRUE if developer extensions are enabled, @c EINA_FALSE
2115 EAPI Eina_Bool ewk_view_setting_enable_developer_extras_get(const Evas_Object *o);
2118 * Enables/disables developer extensions.
2120 * This currently controls whether the Web Inspector should be enabled.
2122 * @param o view object to set developer extensions
2123 * @param enable @c EINA_TRUE to enable developer extras, @c EINA_FALSE to
2126 * @return @c EINA_TRUE on success or @EINA_FALSE on failure
2128 EAPI Eina_Bool ewk_view_setting_enable_developer_extras_set(Evas_Object *o, Eina_Bool enable);
2131 * Sets the minimum interval for DOMTimers on current page.
2133 * @param o view object to set the minimum interval
2135 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2137 EAPI Eina_Bool ewk_view_setting_minimum_timer_interval_set(Evas_Object *o, double interval);
2140 * Gets the minimum interval for DOMTimers on current page.
2142 * @param o view object to get the minimum interval
2144 * @return the minimum interval on success or @c -1.0 on failure
2146 EAPI double ewk_view_setting_minimum_timer_interval_get(const Evas_Object *o);
2149 * Queries whether WebGL support is enabled.
2151 * WebGL support is enabled by default.
2153 * @param o view object to query whether WebGL support is enabled
2155 * @return @c EINA_TRUE if WebGL support enabled,
2156 * @c EINA_FALSE if not or on failure
2158 EAPI Eina_Bool ewk_view_setting_enable_webgl_get(const Evas_Object *o);
2161 * Enables/disables WebGL support.
2163 * WebGL support is enabled by default.
2165 * @param o view object to set WebGL
2166 * @param enable @c EINA_TRUE to enable WebGL support,
2167 * @c EINA_FALSE to disable
2169 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2171 EAPI Eina_Bool ewk_view_setting_enable_webgl_set(Evas_Object *o, Eina_Bool enable);
2174 * Queries if tab key focusing of page elements is enabled.
2176 * When this setting is enabled, the elements in the page (links and form controls) will be cycled through by pressing the tab key.
2177 * Tab key focusing of page elements is enabled by default.
2179 * @param o view object to query if tab key focusing of page elements is enabled
2181 * @return @c EINA_TRUE if tab key focusing of page elements is enabled, @c EINA_FALSE
2184 EAPI Eina_Bool ewk_view_setting_include_links_in_focus_chain_get(const Evas_Object *o);
2187 * Enables/disables tab key focusing of page elements.
2189 * When this setting is enabled, the elements in the page (links and form controls) will be cycled through by pressing the tab key.
2190 * Tab key focusing of page elements is enabled by default.
2192 * @param o view object to set tab key focusing of page elements
2193 * @param enable @c EINA_TRUE to enable tab key focusing of page elements, @c EINA_FALSE to
2196 * @return @c EINA_TRUE on success or @EINA_FALSE on failure
2198 EAPI Eina_Bool ewk_view_setting_include_links_in_focus_chain_set(Evas_Object *o, Eina_Bool enable);
2201 * Queries if hyperlink auditing is enabled.
2203 * Hyperlink auditing is used if a hyperlink created by an @c a or @c area element has a @c ping attribute.
2204 * Please refer to the hyperlink auditing specification at http://www.whatwg.org/specs/web-apps/current-work/#hyperlink-auditing.
2205 * Hyperlink auditing is disabled by default.
2207 * @param o view object to query if hyperlink auditing is enabled
2209 * @return @c EINA_TRUE if hyperlink auditing is enabled, @c EINA_FALSE
2212 EAPI Eina_Bool ewk_view_setting_enable_hyperlink_auditing_get(const Evas_Object *o);
2215 * Enables/disables hyperlink auditing.
2217 * Hyperlink auditing is used if a hyperlink created by an @c a or @c area element has a @c ping attribute.
2218 * Please refer to the hyperlink auditing specification at http://www.whatwg.org/specs/web-apps/current-work/#hyperlink-auditing.
2219 * Hyperlink auditing is disabled by default.
2221 * @param o view object to set hyperlink auditing
2222 * @param enable @c EINA_TRUE to enable hyperlink auditing, @c EINA_FALSE to
2225 * @return @c EINA_TRUE on success or @EINA_FALSE on failure
2227 EAPI Eina_Bool ewk_view_setting_enable_hyperlink_auditing_set(Evas_Object *o, Eina_Bool enable);
2230 * Gets the internal data of @a o.
2232 * This is similar to evas_object_smart_data_get(), but additionally does type checking.
2234 * @param o view object to get the internal data
2236 * @return the internal data of @a o, or @c NULL on failure
2238 EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
2243 * @param priv the pointer to the private data of the view to process scrolls
2245 * @note This is not for general use but just for subclasses that want
2246 * to define their own backing store.
2248 EAPI void ewk_view_scrolls_process(Ewk_View_Smart_Data *sd);
2251 * Paints using given graphics context the given area.
2253 * This uses viewport relative area and will also handle scrollbars
2254 * and other extra elements. See ewk_view_paint_contents() for the
2255 * alternative function.
2257 * @param priv the pointer to the private data of the view to use as paint source
2258 * @param cr the cairo context to use as paint destination, its state will
2259 * be saved before operation and restored afterwards
2260 * @param area viewport relative geometry to paint
2262 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2264 * @note This is an easy to use version, but internal structures are
2265 * always created, then graphics context is clipped, then
2266 * painted, restored and destroyed. This might not be optimum,
2267 * so using @a Ewk_View_Paint_Context may be a better solutions
2268 * for large number of operations.
2270 * @see ewk_view_paint_contents()
2271 * @see ewk_view_paint_context_paint()
2273 * @note This is not for general use but just for subclasses that want
2274 * to define their own backing store.
2276 EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
2279 * Paints just contents using given graphics context the given area.
2281 * This uses absolute coordinates for area and will just handle
2282 * contents, no scrollbars or extras. See ewk_view_paint() for the
2283 * alternative solution.
2285 * @param priv the pointer to the private data of the view to use as paint source
2286 * @param cr the cairo context to use as paint destination, its state will
2287 * be saved before operation and restored afterwards
2288 * @param area absolute geometry to paint
2290 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2292 * @note This is an easy to use version, but internal structures are
2293 * always created, then graphics context is clipped, then
2294 * painted, restored and destroyed. This might not be optimum,
2295 * so using @a Ewk_View_Paint_Context may be a better solutions
2296 * for large number of operations.
2298 * @see ewk_view_paint()
2299 * @see ewk_view_paint_context_paint_contents()
2301 * @note This is not for general use but just for subclasses that want
2302 * to define their own backing store.
2304 EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
2307 * Gets the attributes of the viewport meta tag.
2309 * Properties are returned in the respective pointers. Passing @c NULL to any of
2310 * these pointers will make that property to not be returned.
2312 * @param o view object to get the viewport attributes
2313 * @param w the pointer to store the width of the viewport
2314 * @param h the pointer to store the height of the viewport
2315 * @param init_scale the pointer to store the initial scale value
2316 * @param max_scale the pointer to store the maximum scale value
2317 * @param min_scale the pointer to store the minimum scale value
2318 * @param device_pixel_ratio the pointer to store the device pixel ratio value
2319 * @param user_scalable the pointer to store if user can scale viewport
2321 EAPI void ewk_view_viewport_attributes_get(const Evas_Object *o, int *w, int *h, float *init_scale, float *max_scale, float *min_scale, float *device_pixel_ratio , Eina_Bool *user_scalable);
2324 * Sets the zoom range.
2326 * @param o view object to set the zoom range
2327 * @param min_scale the minimum value of the zoom range
2328 * @param max_scale the maximum value of the zoom range
2330 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
2332 EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object *o, float min_scale, float max_scale);
2335 * Gets the minimum value of the zoom range.
2337 * @param o view object to get the minimum value of the zoom range
2339 * @return the minimum value of the zoom range on success, or
2342 EAPI float ewk_view_zoom_range_min_get(const Evas_Object *o);
2345 * Gets the maximum value of the zoom range.
2347 * @param o view object to get the maximum value of the zoom range
2349 * @return the maximum value of the zoom range on success, or
2350 * @c -1.0 on failure
2352 EAPI float ewk_view_zoom_range_max_get(const Evas_Object *o);
2355 * Enables/disables the zoom.
2357 * @param o view to set zoom
2358 * @param user_scalable @c EINA_TRUE to enable zoom, @c EINA_FALSE to disable
2360 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2362 EAPI Eina_Bool ewk_view_user_scalable_set(Evas_Object *o, Eina_Bool user_scalable);
2365 * Queries if the zoom is enabled.
2367 * @param o view to query if zoom is enabled
2369 * @return @c EINA_TRUE if the zoom is enabled, @c EINA_FALSE if not or on failure
2371 EAPI Eina_Bool ewk_view_user_scalable_get(const Evas_Object *o);
2374 * Gets the device pixel ratio value.
2376 * @param o view to get the device pixel ratio value
2378 * @return the device pixel ratio value on success or @c -1.0 on failure
2380 EAPI float ewk_view_device_pixel_ratio_get(const Evas_Object *o);
2383 * Changes the text direction of the selected input node.
2385 * @param o view object to set text direction.
2386 * @param direction text direction.
2388 EAPI void ewk_view_text_direction_set(Evas_Object *o, Ewk_Text_Direction direction);
2391 * Sets the view mode.
2393 * The view-mode media feature describes the mode in which the
2394 * Web application is being shown as a running application.
2396 * @param o view object to change the view mode
2397 * @param view_mode page view mode to set
2399 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
2401 EAPI Eina_Bool ewk_view_mode_set(Evas_Object *o, Ewk_View_Mode view_mode);
2404 * Gets the view mode.
2406 * @param o view object to get the view mode
2408 * @return enum value of @a Ewk_View_Mode that indicates current view mode on success or
2409 * EWK_VIEW_MODE_INVALID otherwise
2411 * @see ewk_view_mode_set()
2413 EAPI Ewk_View_Mode ewk_view_mode_get(const Evas_Object *o);
2416 * Creates a JS object named @a obj_name as property of the window object. This should be called on a callback connectedto the
2417 * js,windowobject,clear signal.
2420 * @param obj object that will be added(see: @a ewk_js_object_new).
2421 * @param obj_name name of the object.
2423 * @return @c EINA_TRUE if object was added, @c EINA_FALSE if not.
2425 EAPI Eina_Bool ewk_view_js_object_add(Evas_Object *o, Ewk_JS_Object *obj, const char *obj_name);
2427 /// Defines the page visibility status.
2428 enum _Ewk_Page_Visibility_State {
2429 EWK_PAGE_VISIBILITY_STATE_VISIBLE,
2430 EWK_PAGE_VISIBILITY_STATE_HIDDEN,
2431 EWK_PAGE_VISIBILITY_STATE_PRERENDER,
2432 EWK_PAGE_VISIBILITY_STATE_PREVIEW
2434 /// Creates a type name for @a _Ewk_Page_Visibility_State.
2435 typedef enum _Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
2438 * Sets the visibility state of the page.
2440 * This function let WebKit knows the visibility status of the page.
2441 * WebKit will save the current status, and fire a "visibilitychange"
2442 * event which web application can listen. Web application could slow
2443 * down or stop itself when it gets a "visibilitychange" event and its
2444 * visibility state is hidden. If its visibility state is visible, then
2445 * the web application could use more resources.
2447 * This feature makes that web application could use the resources efficiently,
2448 * such as power, CPU, and etc.
2450 * If more detailed description is needed, please see the specification.
2451 * (http://www.w3.org/TR/page-visibility)
2453 * @param o view object to set the visibility state.
2454 * @param page_visible_state the visible state of the page to set.
2455 * @param initial_state @c EINA_TRUE if this function is called at page initialization time,
2456 * @c EINA_FALSE otherwise.
2458 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
2460 EAPI Eina_Bool ewk_view_visibility_state_set(Evas_Object *o, Ewk_Page_Visibility_State page_visible_state, Eina_Bool initial_state);
2463 * Gets the visibility state of the page.
2465 * @param o view object
2467 * @return enum value of @a Ewk_Page_Visibility_State that indicates current visibility status of the page.
2469 * @see ewk_view_visibility_state_set()
2471 EAPI Ewk_Page_Visibility_State ewk_view_visibility_state_get(const Evas_Object *o);
2474 * Returns whether the view has displayed mixed content.
2476 * When a view has displayed mixed content, any of its frames has loaded an HTTPS URI
2477 * which has itself loaded and displayed a resource (such as an image) from an insecure,
2478 * that is, non-HTTPS, URI.
2480 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded).
2482 * When one of the containing frames displays mixed content, the view emits the "mixedcontent,displayed" signal.
2484 * @param o The view to query.
2486 * @sa ewk_frame_mixed_content_displayed_get
2488 EAPI Eina_Bool ewk_view_mixed_content_displayed_get(const Evas_Object *o);
2491 * Returns whether the view has run mixed content.
2493 * When a view has run mixed content, any of its frames has loaded an HTTPS URI
2494 * which has itself loaded and run a resource (such as an image) from an insecure,
2495 * that is, non-HTTPS, URI.
2497 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded).
2499 * When one of the containing frames runs mixed content, the view emits the "mixedcontent,run" signal.
2501 * @param o The view to query.
2503 * @sa ewk_frame_mixed_content_run_get
2505 EAPI Eina_Bool ewk_view_mixed_content_run_get(const Evas_Object *o);
2508 * Returns the SoupSession associated with this view.
2510 * By default, all views share the same, default soup session also available
2511 * by calling ewk_network_default_soup_session_get.
2513 * @param o The view to query.
2515 * @sa ewk_view_soup_session_set, ewk_network_default_soup_session_get
2517 EAPI SoupSession* ewk_view_soup_session_get(const Evas_Object *o);
2520 * Associates a new SoupSession with this view.
2522 * Only sessions of type SoupSessionAsync are supported.
2524 * @note Changing the SoupSession should not be needed in most cases. If
2525 * a different SoupSession is used, the cookie management and some
2526 * network functions in ewk will not have any effect on it.
2528 * @param o The view to change.
2529 * @param session The new SoupSession.
2531 * @sa ewk_view_soup_session_get, ewk_network_default_soup_session_get
2533 EAPI void ewk_view_soup_session_set(Evas_Object *o, SoupSession *session);
2536 * Returns whether XSSAuditor feature is enabled.
2538 * @param o view object to query whether XSSAuditor feature is enabled.
2540 * @return @c EINA_TRUE if the XSSAuditor feature is enabled,
2541 * @c EINA_FALSE if not or on failure.
2543 EAPI Eina_Bool ewk_view_setting_enable_xss_auditor_get(const Evas_Object *o);
2546 * Enables/disables the XSSAuditor feature.
2548 * The XSSAuditor (cross-site scripting protection) feature provides protection
2549 * from reflected XSS attacks on vulnerable web sites. When XSS is encountered
2550 * in the page, frame sends a signal "xss,detected" with additional information
2551 * on whether the entire page was blocked or only injected scripts were removed.
2552 * This feature is enabled by default.
2554 * @param o view object to set the XSSAuditor feature.
2555 * @param enable @c EINA_TRUE to enable the XSSAuditor feature,
2556 * @c EINA_FALSE to disable.
2558 EAPI void ewk_view_setting_enable_xss_auditor_set(Evas_Object *o, Eina_Bool enable);
2561 * Returns whether video captions display feature is enabled.
2563 * Video captions display is disabled by default.
2565 * @param o view object to query whether video captions display feature is enabled.
2567 * @return @c EINA_TRUE if the video captions display feature is enabled,
2568 * @c EINA_FALSE if not or on failure.
2570 EAPI Eina_Bool ewk_view_setting_should_display_captions_get(const Evas_Object *o);
2573 * Enables/disables the video captions display feature.
2575 * The video captions display feature is part of track support for HTML5 video.
2577 * @param o view object to set the video captions display feature.
2578 * @param enable @c EINA_TRUE to enable the video captions display feature,
2579 * @c EINA_FALSE to disable.
2581 EAPI void ewk_view_setting_should_display_captions_set(Evas_Object *o, Eina_Bool enable);
2584 * Returns whether video subtitles display feature is enabled.
2586 * Video subtitles display is disabled by default.
2588 * @param o view object to query whether video subtitles display feature is enabled.
2590 * @return @c EINA_TRUE if the video subtitles display feature is enabled,
2591 * @c EINA_FALSE if not or on failure.
2593 EAPI Eina_Bool ewk_view_setting_should_display_subtitles_get(const Evas_Object *o);
2596 * Enables/disables the video subtitles display feature.
2598 * The video subtitles display feature is part of track support for HTML5 video.
2600 * @param o view object to set the video subtitles display feature.
2601 * @param enable @c EINA_TRUE to enable the video subtitles display feature,
2602 * @c EINA_FALSE to disable.
2604 EAPI void ewk_view_setting_should_display_subtitles_set(Evas_Object *o, Eina_Bool enable);
2607 * Returns whether video text descriptions display feature is enabled.
2609 * Video text descriptions display is disabled by default.
2611 * @param o view object to query whether video text descriptions display feature is enabled.
2613 * @return @c EINA_TRUE if the video text descriptions display feature is enabled,
2614 * @c EINA_FALSE if not or on failure.
2616 EAPI Eina_Bool ewk_view_setting_should_display_text_descriptions_get(const Evas_Object *o);
2619 * Enables/disables the video text descriptions display feature.
2621 * The video text descriptions display feature is part of track support for HTML5 video.
2623 * @param o view object to set the video text descriptions display feature.
2624 * @param enable @c EINA_TRUE to enable the video text descriptions display feature,
2625 * @c EINA_FALSE to disable.
2627 EAPI void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *o, Eina_Bool enable);
2630 * Queries if the web audio feature of HTML5 is enabled.
2632 * @param o view object to query if the web audio feature is enabled
2634 * @return @c EINA_TRUE if web audio is enabled,
2635 * @c EINA_FALSE if not or on failure
2637 EAPI Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object *o);
2640 * Enables/disables the web audio feature of HTML5.
2642 * @param o view object to set the web audio
2643 * @param enable @c EINA_TRUE to enable the web audio feature,
2644 * @c EINA_FALSE to disable
2646 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
2648 EAPI Eina_Bool ewk_view_setting_web_audio_set(Evas_Object *o, Eina_Bool enable);
2651 * Show the web inspector to debug a web page.
2653 * The following signals are emiited.
2654 * "inspector,view,create" and "inspector,view,close"
2655 * The first one will be called to request the view for web inspector on view that will be inspected.
2656 * This callback should create the view for web inspector and set the view with ewk_view_web_inspector_view_set().
2657 * The second one will be called to close the view for web inspector on view having the web inspector after disconnecting frontend
2658 * This callback should remove the view for web inspector.
2660 * When the view having the web inspector is removed,
2661 * please emit the "inspector,view,destroy" signal on view for web inspector.
2663 * @param o The view to show the web inspector.
2665 * @see ewk_view_web_inspector_close()
2666 * @see ewk_view_web_inspector_view_set()
2668 EAPI void ewk_view_web_inspector_show(const Evas_Object *o);
2671 * Close the web inspector view
2673 * @param o The view to close the web inspector.
2675 * @see ewk_view_web_inspector_show()
2676 * @see ewk_view_web_inspector_view_get()
2678 EAPI void ewk_view_web_inspector_close(const Evas_Object *o);
2681 * Get the view of web inspector.
2683 * @param o The view that is inspected.
2685 * @return view object on success or @c NULL on failure
2687 EAPI Evas_Object* ewk_view_web_inspector_view_get(const Evas_Object *o);
2690 * Set the view of web inspector.
2692 * @param o The view that is inspected.
2693 * @param inspector_view The view of web inspector.
2695 EAPI void ewk_view_web_inspector_view_set(Evas_Object *o, Evas_Object *inspector_view);
2700 #endif // ewk_view_h