elementary: fix some doxygen warnings
[framework/uifw/elementary.git] / src / lib / elm_web.h
1 /**
2  * @defgroup Web Web
3  *
4  * @image html img/widget/web/preview-00.png
5  * @image latex img/widget/web/preview-00.eps
6  *
7  * A web object is used for displaying web pages (HTML/CSS/JS)
8  * using WebKit-EFL. You must have compiled Elementary with
9  * ewebkit support.
10  *
11  * Signals that you can add callbacks for are:
12  * @li "download,request": A file download has been requested. Event info is
13  * a pointer to a Elm_Web_Download
14  * @li "editorclient,contents,changed": Editor client's contents changed
15  * @li "editorclient,selection,changed": Editor client's selection changed
16  * @li "frame,created": A new frame was created. Event info is an
17  * Evas_Object which can be handled with WebKit's ewk_frame API
18  * @li "icon,received": An icon was received by the main frame
19  * @li "inputmethod,changed": Input method changed. Event info is an
20  * Eina_Bool indicating whether it's enabled or not
21  * @li "js,windowobject,clear": JS window object has been cleared
22  * @li "link,hover,in": Mouse cursor is hovering over a link. Event info
23  * is a char *link[2], where the first string contains the URL the link
24  * points to, and the second one the title of the link
25  * @li "link,hover,out": Mouse cursor left the link
26  * @li "load,document,finished": Loading of a document finished. Event info
27  * is the frame that finished loading
28  * @li "load,error": Load failed. Event info is a pointer to
29  * Elm_Web_Frame_Load_Error
30  * @li "load,finished": Load finished. Event info is NULL on success, on
31  * error it's a pointer to Elm_Web_Frame_Load_Error
32  * @li "load,newwindow,show": A new window was created and is ready to be
33  * shown
34  * @li "load,progress": Overall load progress. Event info is a pointer to
35  * a double containing a value between 0.0 and 1.0
36  * @li "load,provisional": Started provisional load
37  * @li "load,started": Loading of a document started
38  * @li "menubar,visible,get": Queries if the menubar is visible. Event info
39  * is a pointer to Eina_Bool where the callback should set EINA_TRUE if
40  * the menubar is visible, or EINA_FALSE in case it's not
41  * @li "menubar,visible,set": Informs menubar visibility. Event info is
42  * an Eina_Bool indicating the visibility
43  * @li "popup,created": A dropdown widget was activated, requesting its
44  * popup menu to be created. Event info is a pointer to Elm_Web_Menu
45  * @li "popup,willdelete": The web object is ready to destroy the popup
46  * object created. Event info is a pointer to Elm_Web_Menu
47  * @li "ready": Page is fully loaded
48  * @li "scrollbars,visible,get": Queries visibility of scrollbars. Event
49  * info is a pointer to Eina_Bool where the visibility state should be set
50  * @li "scrollbars,visible,set": Informs scrollbars visibility. Event info
51  * is an Eina_Bool with the visibility state set
52  * @li "statusbar,text,set": Text of the statusbar changed. Even info is
53  * a string with the new text
54  * @li "statusbar,visible,get": Queries visibility of the status bar.
55  * Event info is a pointer to Eina_Bool where the visibility state should be
56  * set.
57  * @li "statusbar,visible,set": Informs statusbar visibility. Event info is
58  * an Eina_Bool with the visibility value
59  * @li "title,changed": Title of the main frame changed. Event info is a
60  * string with the new title
61  * @li "toolbars,visible,get": Queries visibility of toolbars. Event info
62  * is a pointer to Eina_Bool where the visibility state should be set
63  * @li "toolbars,visible,set": Informs the visibility of toolbars. Event
64  * info is an Eina_Bool with the visibility state
65  * @li "tooltip,text,set": Show and set text of a tooltip. Event info is
66  * a string with the text to show
67  * @li "uri,changed": URI of the main frame changed. Event info is a string
68  * with the new URI
69  * @li "view,resized": The web object internal's view changed sized
70  * @li "windows,close,request": A JavaScript request to close the current
71  * window was requested
72  * @li "zoom,animated,end": Animated zoom finished
73  *
74  * available styles:
75  * - default
76  *
77  * An example of use of web:
78  *
79  * - @ref web_example_01 TBD
80  */
81
82 /**
83  * @addtogroup Web
84  * @{
85  */
86
87 /**
88  * Structure used to report load errors.
89  *
90  * Load errors are reported as signal by elm_web. All the strings are
91  * temporary references and should @b not be used after the signal
92  * callback returns. If it's required, make copies with strdup() or
93  * eina_stringshare_add() (they are not even guaranteed to be
94  * stringshared, so must use eina_stringshare_add() and not
95  * eina_stringshare_ref()).
96  */
97 typedef struct _Elm_Web_Frame_Load_Error Elm_Web_Frame_Load_Error;
98
99 /**
100  * Structure used to report load errors.
101  *
102  * Load errors are reported as signal by elm_web. All the strings are
103  * temporary references and should @b not be used after the signal
104  * callback returns. If it's required, make copies with strdup() or
105  * eina_stringshare_add() (they are not even guaranteed to be
106  * stringshared, so must use eina_stringshare_add() and not
107  * eina_stringshare_ref()).
108  */
109 struct _Elm_Web_Frame_Load_Error
110 {
111    int          code; /**< Numeric error code */
112    Eina_Bool    is_cancellation; /**< Error produced by canceling a request */
113    const char  *domain; /**< Error domain name */
114    const char  *description; /**< Error description (already localized) */
115    const char  *failing_url; /**< The URL that failed to load */
116    Evas_Object *frame; /**< Frame object that produced the error */
117 };
118
119 /**
120  * The possibles types that the items in a menu can be
121  */
122 typedef enum
123 {
124    ELM_WEB_MENU_SEPARATOR,
125    ELM_WEB_MENU_GROUP,
126    ELM_WEB_MENU_OPTION
127 } Elm_Web_Menu_Item_Type;
128
129 /**
130  * Structure describing the items in a menu
131  */
132 typedef struct _Elm_Web_Menu_Item Elm_Web_Menu_Item;
133
134 /**
135  * Structure describing the items in a menu
136  */
137 struct _Elm_Web_Menu_Item
138 {
139    const char            *text; /**< The text for the item */
140    Elm_Web_Menu_Item_Type type; /**< The type of the item */
141 };
142
143 /**
144  * Structure describing the menu of a popup
145  *
146  * This structure will be passed as the @c event_info for the "popup,create"
147  * signal, which is emitted when a dropdown menu is opened. Users wanting
148  * to handle these popups by themselves should listen to this signal and
149  * set the @c handled property of the struct to @c EINA_TRUE. Leaving this
150  * property as @c EINA_FALSE means that the user will not handle the popup
151  * and the default implementation will be used.
152  *
153  * When the popup is ready to be dismissed, a "popup,willdelete" signal
154  * will be emitted to notify the user that it can destroy any objects and
155  * free all data related to it.
156  *
157  * @see elm_web_popup_selected_set()
158  * @see elm_web_popup_destroy()
159  */
160 typedef struct _Elm_Web_Menu Elm_Web_Menu;
161
162 /**
163  * Structure describing the menu of a popup
164  *
165  * This structure will be passed as the @c event_info for the "popup,create"
166  * signal, which is emitted when a dropdown menu is opened. Users wanting
167  * to handle these popups by themselves should listen to this signal and
168  * set the @c handled property of the struct to @c EINA_TRUE. Leaving this
169  * property as @c EINA_FALSE means that the user will not handle the popup
170  * and the default implementation will be used.
171  *
172  * When the popup is ready to be dismissed, a "popup,willdelete" signal
173  * will be emitted to notify the user that it can destroy any objects and
174  * free all data related to it.
175  *
176  * @see elm_web_popup_selected_set()
177  * @see elm_web_popup_destroy()
178  */
179 struct _Elm_Web_Menu
180 {
181    Eina_List *items; /**< List of #Elm_Web_Menu_Item */
182    int        x; /**< The X position of the popup, relative to the elm_web object */
183    int        y; /**< The Y position of the popup, relative to the elm_web object */
184    int        width; /**< Width of the popup menu */
185    int        height; /**< Height of the popup menu */
186
187    Eina_Bool  handled : 1; /**< Set to @c EINA_TRUE by the user to indicate that the popup has been handled and the default implementation should be ignored. Leave as @c EINA_FALSE otherwise. */
188 };
189
190 typedef struct _Elm_Web_Download Elm_Web_Download;
191 struct _Elm_Web_Download
192 {
193    const char *url;
194 };
195
196 /**
197  * Types of zoom available.
198  */
199 typedef enum
200 {
201    ELM_WEB_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_web_zoom_set */
202    ELM_WEB_ZOOM_MODE_AUTO_FIT, /**< Zoom until content fits in web object */
203    ELM_WEB_ZOOM_MODE_AUTO_FILL, /**< Zoom until content fills web object */
204    ELM_WEB_ZOOM_MODE_LAST
205 } Elm_Web_Zoom_Mode;
206
207 /**
208  * Opaque handler containing the features (such as statusbar, menubar, etc)
209  * that are to be set on a newly requested window.
210  */
211 typedef struct _Elm_Web_Window_Features Elm_Web_Window_Features;
212
213 /**
214  * Callback type for the create_window hook.
215  *
216  * The function parameters are:
217  * @li @p data User data pointer set when setting the hook function
218  * @li @p obj The elm_web object requesting the new window
219  * @li @p js Set to @c EINA_TRUE if the request was originated from
220  * JavaScript. @c EINA_FALSE otherwise.
221  * @li @p window_features A pointer of #Elm_Web_Window_Features indicating
222  * the features requested for the new window.
223  *
224  * The returned value of the function should be the @c elm_web widget where
225  * the request will be loaded. That is, if a new window or tab is created,
226  * the elm_web widget in it should be returned, and @b NOT the window
227  * object.
228  * Returning @c NULL should cancel the request.
229  *
230  * @see elm_web_window_create_hook_set()
231  */
232 typedef Evas_Object *(*Elm_Web_Window_Open)(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *window_features);
233
234 /**
235  * Callback type for the JS alert hook.
236  *
237  * The function parameters are:
238  * @li @p data User data pointer set when setting the hook function
239  * @li @p obj The elm_web object requesting the new window
240  * @li @p message The message to show in the alert dialog
241  *
242  * The function should return the object representing the alert dialog.
243  * Elm_Web will run a second main loop to handle the dialog and normal
244  * flow of the application will be restored when the object is deleted, so
245  * the user should handle the popup properly in order to delete the object
246  * when the action is finished.
247  * If the function returns @c NULL the popup will be ignored.
248  *
249  * @see elm_web_dialog_alert_hook_set()
250  */
251 typedef Evas_Object *(*Elm_Web_Dialog_Alert)(void *data, Evas_Object *obj, const char *message);
252
253 /**
254  * Callback type for the JS confirm hook.
255  *
256  * The function parameters are:
257  * @li @p data User data pointer set when setting the hook function
258  * @li @p obj The elm_web object requesting the new window
259  * @li @p message The message to show in the confirm dialog
260  * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
261  * the user selected @c Ok, @c EINA_FALSE otherwise.
262  *
263  * The function should return the object representing the confirm dialog.
264  * Elm_Web will run a second main loop to handle the dialog and normal
265  * flow of the application will be restored when the object is deleted, so
266  * the user should handle the popup properly in order to delete the object
267  * when the action is finished.
268  * If the function returns @c NULL the popup will be ignored.
269  *
270  * @see elm_web_dialog_confirm_hook_set()
271  */
272 typedef Evas_Object *(*Elm_Web_Dialog_Confirm)(void *data, Evas_Object *obj, const char *message, Eina_Bool *ret);
273
274 /**
275  * Callback type for the JS prompt hook.
276  *
277  * The function parameters are:
278  * @li @p data User data pointer set when setting the hook function
279  * @li @p obj The elm_web object requesting the new window
280  * @li @p message The message to show in the prompt dialog
281  * @li @p def_value The default value to present the user in the entry
282  * @li @p value Pointer where to store the value given by the user. Must
283  * be a malloc'ed string or @c NULL if the user canceled the popup.
284  * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
285  * the user selected @c Ok, @c EINA_FALSE otherwise.
286  *
287  * The function should return the object representing the prompt dialog.
288  * Elm_Web will run a second main loop to handle the dialog and normal
289  * flow of the application will be restored when the object is deleted, so
290  * the user should handle the popup properly in order to delete the object
291  * when the action is finished.
292  * If the function returns @c NULL the popup will be ignored.
293  *
294  * @see elm_web_dialog_prompt_hook_set()
295  */
296 typedef Evas_Object *(*Elm_Web_Dialog_Prompt)(void *data, Evas_Object *obj, const char *message, const char *def_value, char **value, Eina_Bool *ret);
297
298 /**
299  * Callback type for the JS file selector hook.
300  *
301  * The function parameters are:
302  * @li @p data User data pointer set when setting the hook function
303  * @li @p obj The elm_web object requesting the new window
304  * @li @p allows_multiple @c EINA_TRUE if multiple files can be selected.
305  * @li @p accept_types Mime types accepted
306  * @li @p selected Pointer where to store the list of malloc'ed strings
307  * containing the path to each file selected. Must be @c NULL if the file
308  * dialog is canceled
309  * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
310  * the user selected @c Ok, @c EINA_FALSE otherwise.
311  *
312  * The function should return the object representing the file selector
313  * dialog.
314  * Elm_Web will run a second main loop to handle the dialog and normal
315  * flow of the application will be restored when the object is deleted, so
316  * the user should handle the popup properly in order to delete the object
317  * when the action is finished.
318  * If the function returns @c NULL the popup will be ignored.
319  *
320  * @see elm_web_dialog_file selector_hook_set()
321  */
322 typedef Evas_Object *(*Elm_Web_Dialog_File_Selector)(void *data, Evas_Object *obj, Eina_Bool allows_multiple, Eina_List *accept_types, Eina_List **selected, Eina_Bool *ret);
323
324 /**
325  * Callback type for the JS console message hook.
326  *
327  * When a console message is added from JavaScript, any set function to the
328  * console message hook will be called for the user to handle. There is no
329  * default implementation of this hook.
330  *
331  * The function parameters are:
332  * @li @p data User data pointer set when setting the hook function
333  * @li @p obj The elm_web object that originated the message
334  * @li @p message The message sent
335  * @li @p line_number The line number
336  * @li @p source_id Source id
337  *
338  * @see elm_web_console_message_hook_set()
339  */
340 typedef void (*Elm_Web_Console_Message)(void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id);
341
342 /**
343  * Add a new web object to the parent.
344  *
345  * @param parent The parent object.
346  * @return The new object or NULL if it cannot be created.
347  *
348  * @see elm_web_uri_set()
349  * @see elm_web_webkit_view_get()
350  */
351 EAPI Evas_Object      *elm_web_add(Evas_Object *parent);
352
353 /**
354  * Change useragent of a elm_web object
355  * 
356  * @param obj The object
357  * @param user_agent String for useragent
358  *
359  */
360 EAPI void elm_web_useragent_set(Evas_Object *obj, const char *user_agent);
361
362 /**
363  * Return current useragent of elm_web object
364  *
365  * @param obj The object
366  * @return Useragent string
367  *
368  */
369 EAPI const char* elm_web_useragent_get(const Evas_Object *obj);
370
371 /**
372  * Get internal ewk_view object from web object.
373  *
374  * Elementary may not provide some low level features of EWebKit,
375  * instead of cluttering the API with proxy methods we opted to
376  * return the internal reference. Be careful using it as it may
377  * interfere with elm_web behavior.
378  *
379  * @param obj The web object.
380  * @return The internal ewk_view object or NULL if it does not
381  *         exist. (Failure to create or Elementary compiled without
382  *         ewebkit)
383  *
384  * @see elm_web_add()
385  */
386 EAPI Evas_Object      *elm_web_webkit_view_get(const Evas_Object *obj);
387
388 /**
389  * Sets the function to call when a new window is requested
390  *
391  * This hook will be called when a request to create a new window is
392  * issued from the web page loaded.
393  * There is no default implementation for this feature, so leaving this
394  * unset or passing @c NULL in @p func will prevent new windows from
395  * opening.
396  *
397  * @param obj The web object where to set the hook function
398  * @param func The hook function to be called when a window is requested
399  * @param data User data
400  */
401 EAPI void              elm_web_window_create_hook_set(Evas_Object *obj, Elm_Web_Window_Open func, void *data);
402
403 /**
404  * Sets the function to call when an alert dialog
405  *
406  * This hook will be called when a JavaScript alert dialog is requested.
407  * If no function is set or @c NULL is passed in @p func, the default
408  * implementation will take place.
409  *
410  * @param obj The web object where to set the hook function
411  * @param func The callback function to be used
412  * @param data User data
413  *
414  * @see elm_web_inwin_mode_set()
415  */
416 EAPI void              elm_web_dialog_alert_hook_set(Evas_Object *obj, Elm_Web_Dialog_Alert func, void *data);
417
418 /**
419  * Sets the function to call when an confirm dialog
420  *
421  * This hook will be called when a JavaScript confirm dialog is requested.
422  * If no function is set or @c NULL is passed in @p func, the default
423  * implementation will take place.
424  *
425  * @param obj The web object where to set the hook function
426  * @param func The callback function to be used
427  * @param data User data
428  *
429  * @see elm_web_inwin_mode_set()
430  */
431 EAPI void              elm_web_dialog_confirm_hook_set(Evas_Object *obj, Elm_Web_Dialog_Confirm func, void *data);
432
433 /**
434  * Sets the function to call when an prompt dialog
435  *
436  * This hook will be called when a JavaScript prompt dialog is requested.
437  * If no function is set or @c NULL is passed in @p func, the default
438  * implementation will take place.
439  *
440  * @param obj The web object where to set the hook function
441  * @param func The callback function to be used
442  * @param data User data
443  *
444  * @see elm_web_inwin_mode_set()
445  */
446 EAPI void              elm_web_dialog_prompt_hook_set(Evas_Object *obj, Elm_Web_Dialog_Prompt func, void *data);
447
448 /**
449  * Sets the function to call when an file selector dialog
450  *
451  * This hook will be called when a JavaScript file selector dialog is
452  * requested.
453  * If no function is set or @c NULL is passed in @p func, the default
454  * implementation will take place.
455  *
456  * @param obj The web object where to set the hook function
457  * @param func The callback function to be used
458  * @param data User data
459  *
460  * @see elm_web_inwin_mode_set()
461  */
462 EAPI void              elm_web_dialog_file_selector_hook_set(Evas_Object *obj, Elm_Web_Dialog_File_Selector func, void *data);
463
464 /**
465  * Sets the function to call when a console message is emitted from JS
466  *
467  * This hook will be called when a console message is emitted from
468  * JavaScript. There is no default implementation for this feature.
469  *
470  * @param obj The web object where to set the hook function
471  * @param func The callback function to be used
472  * @param data User data
473  */
474 EAPI void              elm_web_console_message_hook_set(Evas_Object *obj, Elm_Web_Console_Message func, void *data);
475
476 /**
477  * Gets the status of the tab propagation
478  *
479  * @param obj The web object to query
480  * @return EINA_TRUE if tab propagation is enabled, EINA_FALSE otherwise
481  *
482  * @see elm_web_tab_propagate_set()
483  */
484 EAPI Eina_Bool         elm_web_tab_propagate_get(const Evas_Object *obj);
485
486 /**
487  * Sets whether to use tab propagation
488  *
489  * If tab propagation is enabled, whenever the user presses the Tab key,
490  * Elementary will handle it and switch focus to the next widget.
491  * The default value is disabled, where WebKit will handle the Tab key to
492  * cycle focus though its internal objects, jumping to the next widget
493  * only when that cycle ends.
494  *
495  * @param obj The web object
496  * @param propagate Whether to propagate Tab keys to Elementary or not
497  */
498 EAPI void              elm_web_tab_propagate_set(Evas_Object *obj, Eina_Bool propagate);
499
500 /**
501  * Sets the URI for the web object
502  *
503  * It must be a full URI, with resource included, in the form
504  * http://www.enlightenment.org or file:///tmp/something.html
505  *
506  * @param obj The web object
507  * @param uri The URI to set
508  * @return EINA_TRUE if the URI could be, EINA_FALSE if an error occurred
509  */
510 EAPI Eina_Bool         elm_web_uri_set(Evas_Object *obj, const char *uri);
511
512 /**
513  * Gets the current URI for the object
514  *
515  * The returned string must not be freed and is guaranteed to be
516  * stringshared.
517  *
518  * @param obj The web object
519  * @return A stringshared internal string with the current URI, or NULL on
520  * failure
521  */
522 EAPI const char       *elm_web_uri_get(const Evas_Object *obj);
523
524 /**
525  * Gets the current title
526  *
527  * The returned string must not be freed and is guaranteed to be
528  * stringshared.
529  *
530  * @param obj The web object
531  * @return A stringshared internal string with the current title, or NULL on
532  * failure
533  */
534 EAPI const char       *elm_web_title_get(const Evas_Object *obj);
535
536 /**
537  * Sets the background color to be used by the web object
538  *
539  * This is the color that will be used by default when the loaded page
540  * does not set it's own. Color values are pre-multiplied.
541  *
542  * @param obj The web object
543  * @param r Red component
544  * @param g Green component
545  * @param b Blue component
546  * @param a Alpha component
547  */
548 EAPI void              elm_web_bg_color_set(Evas_Object *obj, int r, int g, int b, int a);
549
550 /**
551  * Gets the background color to be used by the web object
552  *
553  * This is the color that will be used by default when the loaded page
554  * does not set it's own. Color values are pre-multiplied.
555  *
556  * @param obj The web object
557  * @param r Red component
558  * @param g Green component
559  * @param b Blue component
560  * @param a Alpha component
561  */
562 EAPI void              elm_web_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
563
564 /**
565  * Gets a copy of the currently selected text
566  *
567  * The string returned must be freed by the user when it's done with it.
568  *
569  * @param obj The web object
570  * @return A newly allocated string, or NULL if nothing is selected or an
571  * error occurred
572  */
573 EAPI char             *elm_web_selection_get(const Evas_Object *obj);
574
575 /**
576  * Tells the web object which index in the currently open popup was selected
577  *
578  * When the user handles the popup creation from the "popup,created" signal,
579  * it needs to tell the web object which item was selected by calling this
580  * function with the index corresponding to the item.
581  *
582  * @param obj The web object
583  * @param index The index selected
584  *
585  * @see elm_web_popup_destroy()
586  */
587 EAPI void              elm_web_popup_selected_set(Evas_Object *obj, int index);
588
589 /**
590  * Dismisses an open dropdown popup
591  *
592  * When the popup from a dropdown widget is to be dismissed, either after
593  * selecting an option or to cancel it, this function must be called, which
594  * will later emit an "popup,willdelete" signal to notify the user that
595  * any memory and objects related to this popup can be freed.
596  *
597  * @param obj The web object
598  * @return EINA_TRUE if the menu was successfully destroyed, or EINA_FALSE
599  * if there was no menu to destroy
600  */
601 EAPI Eina_Bool         elm_web_popup_destroy(Evas_Object *obj);
602
603 /**
604  * Searches the given string in a document.
605  *
606  * @param obj The web object where to search the text
607  * @param string String to search
608  * @param case_sensitive If search should be case sensitive or not
609  * @param forward If search is from cursor and on or backwards
610  * @param wrap If search should wrap at the end
611  *
612  * @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not
613  * or failure
614  */
615 EAPI Eina_Bool         elm_web_text_search(const Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
616
617 /**
618  * Marks matches of the given string in a document.
619  *
620  * @param obj The web object where to search text
621  * @param string String to match
622  * @param case_sensitive If match should be case sensitive or not
623  * @param highlight If matches should be highlighted
624  * @param limit Maximum amount of matches, or zero to unlimited
625  *
626  * @return number of matched @a string
627  */
628 EAPI unsigned int      elm_web_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
629
630 /**
631  * Clears all marked matches in the document
632  *
633  * @param obj The web object
634  *
635  * @return EINA_TRUE on success, EINA_FALSE otherwise
636  */
637 EAPI Eina_Bool         elm_web_text_matches_unmark_all(Evas_Object *obj);
638
639 /**
640  * Sets whether to highlight the matched marks
641  *
642  * If enabled, marks set with elm_web_text_matches_mark() will be
643  * highlighted.
644  *
645  * @param obj The web object
646  * @param highlight Whether to highlight the marks or not
647  *
648  * @return EINA_TRUE on success, EINA_FALSE otherwise
649  */
650 EAPI Eina_Bool         elm_web_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight);
651
652 /**
653  * Gets whether highlighting marks is enabled
654  *
655  * @param The web object
656  *
657  * @return EINA_TRUE is marks are set to be highlighted, EINA_FALSE
658  * otherwise
659  */
660 EAPI Eina_Bool         elm_web_text_matches_highlight_get(const Evas_Object *obj);
661
662 /**
663  * Gets the overall loading progress of the page
664  *
665  * Returns the estimated loading progress of the page, with a value between
666  * 0.0 and 1.0. This is an estimated progress accounting for all the frames
667  * included in the page.
668  *
669  * @param obj The web object
670  *
671  * @return A value between 0.0 and 1.0 indicating the progress, or -1.0 on
672  * failure
673  */
674 EAPI double            elm_web_load_progress_get(const Evas_Object *obj);
675
676 /**
677  * Stops loading the current page
678  *
679  * Cancels the loading of the current page in the web object. This will
680  * cause a "load,error" signal to be emitted, with the is_cancellation
681  * flag set to EINA_TRUE.
682  *
683  * @param obj The web object
684  *
685  * @return EINA_TRUE if the cancel was successful, EINA_FALSE otherwise
686  */
687 EAPI Eina_Bool         elm_web_stop(Evas_Object *obj);
688
689 /**
690  * Requests a reload of the current document in the object
691  *
692  * @param obj The web object
693  *
694  * @return EINA_TRUE on success, EINA_FALSE otherwise
695  */
696 EAPI Eina_Bool         elm_web_reload(Evas_Object *obj);
697
698 /**
699  * Requests a reload of the current document, avoiding any existing caches
700  *
701  * @param obj The web object
702  *
703  * @return EINA_TRUE on success, EINA_FALSE otherwise
704  */
705 EAPI Eina_Bool         elm_web_reload_full(Evas_Object *obj);
706
707 /**
708  * Goes back one step in the browsing history
709  *
710  * This is equivalent to calling elm_web_object_navigate(obj, -1);
711  *
712  * @param obj The web object
713  *
714  * @return EINA_TRUE on success, EINA_FALSE otherwise
715  *
716  * @see elm_web_history_enable_set()
717  * @see elm_web_back_possible()
718  * @see elm_web_forward()
719  * @see elm_web_navigate()
720  */
721 EAPI Eina_Bool         elm_web_back(Evas_Object *obj);
722
723 /**
724  * Goes forward one step in the browsing history
725  *
726  * This is equivalent to calling elm_web_object_navigate(obj, 1);
727  *
728  * @param obj The web object
729  *
730  * @return EINA_TRUE on success, EINA_FALSE otherwise
731  *
732  * @see elm_web_history_enable_set()
733  * @see elm_web_forward_possible()
734  * @see elm_web_back()
735  * @see elm_web_navigate()
736  */
737 EAPI Eina_Bool         elm_web_forward(Evas_Object *obj);
738
739 /**
740  * Jumps the given number of steps in the browsing history
741  *
742  * The @p steps value can be a negative integer to back in history, or a
743  * positive to move forward.
744  *
745  * @param obj The web object
746  * @param steps The number of steps to jump
747  *
748  * @return EINA_TRUE on success, EINA_FALSE on error or if not enough
749  * history exists to jump the given number of steps
750  *
751  * @see elm_web_history_enable_set()
752  * @see elm_web_navigate_possible()
753  * @see elm_web_back()
754  * @see elm_web_forward()
755  */
756 EAPI Eina_Bool         elm_web_navigate(Evas_Object *obj, int steps);
757
758 /**
759  * Queries whether it's possible to go back in history
760  *
761  * @param obj The web object
762  *
763  * @return EINA_TRUE if it's possible to back in history, EINA_FALSE
764  * otherwise
765  */
766 EAPI Eina_Bool         elm_web_back_possible(Evas_Object *obj);
767
768 /**
769  * Queries whether it's possible to go forward in history
770  *
771  * @param obj The web object
772  *
773  * @return EINA_TRUE if it's possible to forward in history, EINA_FALSE
774  * otherwise
775  */
776 EAPI Eina_Bool         elm_web_forward_possible(Evas_Object *obj);
777
778 /**
779  * Queries whether it's possible to jump the given number of steps
780  *
781  * The @p steps value can be a negative integer to back in history, or a
782  * positive to move forward.
783  *
784  * @param obj The web object
785  * @param steps The number of steps to check for
786  *
787  * @return EINA_TRUE if enough history exists to perform the given jump,
788  * EINA_FALSE otherwise
789  */
790 EAPI Eina_Bool         elm_web_navigate_possible(Evas_Object *obj, int steps);
791
792 /**
793  * Gets whether browsing history is enabled for the given object
794  *
795  * @param obj The web object
796  *
797  * @return EINA_TRUE if history is enabled, EINA_FALSE otherwise
798  */
799 EAPI Eina_Bool         elm_web_history_enable_get(const Evas_Object *obj);
800
801 /**
802  * Enables or disables the browsing history
803  *
804  * @param obj The web object
805  * @param enable Whether to enable or disable the browsing history
806  */
807 EAPI void              elm_web_history_enable_set(Evas_Object *obj, Eina_Bool enable);
808
809 /**
810  * Sets the zoom level of the web object
811  *
812  * Zoom level matches the Webkit API, so 1.0 means normal zoom, with higher
813  * values meaning zoom in and lower meaning zoom out. This function will
814  * only affect the zoom level if the mode set with elm_web_zoom_mode_set()
815  * is ::ELM_WEB_ZOOM_MODE_MANUAL.
816  *
817  * @param obj The web object
818  * @param zoom The zoom level to set
819  */
820 EAPI void              elm_web_zoom_set(Evas_Object *obj, double zoom);
821
822 /**
823  * Gets the current zoom level set on the web object
824  *
825  * Note that this is the zoom level set on the web object and not that
826  * of the underlying Webkit one. In the ::ELM_WEB_ZOOM_MODE_MANUAL mode,
827  * the two zoom levels should match, but for the other two modes the
828  * Webkit zoom is calculated internally to match the chosen mode without
829  * changing the zoom level set for the web object.
830  *
831  * @param obj The web object
832  *
833  * @return The zoom level set on the object
834  */
835 EAPI double            elm_web_zoom_get(const Evas_Object *obj);
836
837 /**
838  * Sets the zoom mode to use
839  *
840  * The modes can be any of those defined in ::Elm_Web_Zoom_Mode, except
841  * ::ELM_WEB_ZOOM_MODE_LAST. The default is ::ELM_WEB_ZOOM_MODE_MANUAL.
842  *
843  * ::ELM_WEB_ZOOM_MODE_MANUAL means the zoom level will be controlled
844  * with the elm_web_zoom_set() function.
845  * ::ELM_WEB_ZOOM_MODE_AUTO_FIT will calculate the needed zoom level to
846  * make sure the entirety of the web object's contents are shown.
847  * ::ELM_WEB_ZOOM_MODE_AUTO_FILL will calculate the needed zoom level to
848  * fit the contents in the web object's size, without leaving any space
849  * unused.
850  *
851  * @param obj The web object
852  * @param mode The mode to set
853  */
854 EAPI void              elm_web_zoom_mode_set(Evas_Object *obj, Elm_Web_Zoom_Mode mode);
855
856 /**
857  * Gets the currently set zoom mode
858  *
859  * @param obj The web object
860  *
861  * @return The current zoom mode set for the object, or
862  * ::ELM_WEB_ZOOM_MODE_LAST on error
863  */
864 EAPI Elm_Web_Zoom_Mode elm_web_zoom_mode_get(const Evas_Object *obj);
865
866 /**
867  * Shows the given region in the web object
868  *
869  * @param obj The web object
870  * @param x The x coordinate of the region to show
871  * @param y The y coordinate of the region to show
872  * @param w The width of the region to show
873  * @param h The height of the region to show
874  */
875 EAPI void              elm_web_region_show(Evas_Object *obj, int x, int y, int w, int h);
876
877 /**
878  * Brings in the region to the visible area
879  *
880  * Like elm_web_region_show(), but it animates the scrolling of the object
881  * to show the area
882  *
883  * @param obj The web object
884  * @param x The x coordinate of the region to show
885  * @param y The y coordinate of the region to show
886  * @param w The width of the region to show
887  * @param h The height of the region to show
888  */
889 EAPI void              elm_web_region_bring_in(Evas_Object *obj, int x, int y, int w, int h);
890
891 /**
892  * Sets the default dialogs to use an Inwin instead of a normal window
893  *
894  * If set, then the default implementation for the JavaScript dialogs and
895  * file selector will be opened in an Inwin. Otherwise they will use a
896  * normal separated window.
897  *
898  * @param obj The web object
899  * @param value EINA_TRUE to use Inwin, EINA_FALSE to use a normal window
900  */
901 EAPI void              elm_web_inwin_mode_set(Evas_Object *obj, Eina_Bool value);
902
903 /**
904  * Gets whether Inwin mode is set for the current object
905  *
906  * @param obj The web object
907  *
908  * @return EINA_TRUE if Inwin mode is set, EINA_FALSE otherwise
909  */
910 EAPI Eina_Bool         elm_web_inwin_mode_get(const Evas_Object *obj);
911
912 EAPI void              elm_web_window_features_ref(Elm_Web_Window_Features *wf);
913 EAPI void              elm_web_window_features_unref(Elm_Web_Window_Features *wf);
914 EAPI void              elm_web_window_features_bool_property_get(const Elm_Web_Window_Features *wf, Eina_Bool *toolbar_visible, Eina_Bool *statusbar_visible, Eina_Bool *scrollbars_visible, Eina_Bool *menubar_visible, Eina_Bool *locationbar_visble, Eina_Bool *fullscreen);
915 EAPI void              elm_web_window_features_int_property_get(const Elm_Web_Window_Features *wf, int *x, int *y, int *w, int *h);
916
917 /**
918  * @}
919  */