Tizen Native API

The WebView API provides functions to display web pages and control web pages.

Required Header

#include <EWebKit.h>

Overview

The WebView API provides functions to display web pages and control web pages. It is based on WebKit engine which is one of populer layout engine to render web pages.

Functions

Ewk_Back_Forward_List_Itemewk_back_forward_list_current_item_get (const Ewk_Back_Forward_List *list)
 Returns the current item in the list.
Ewk_Back_Forward_List_Itemewk_back_forward_list_previous_item_get (const Ewk_Back_Forward_List *list)
 Returns the item that precedes the current item in the list.
Ewk_Back_Forward_List_Itemewk_back_forward_list_next_item_get (const Ewk_Back_Forward_List *list)
 Returns the item that follows the current item in the list.
Ewk_Back_Forward_List_Itemewk_back_forward_list_item_at_index_get (const Ewk_Back_Forward_List *list, int index)
 Returns the item at a given index relative to the current item.
unsigned ewk_back_forward_list_count (Ewk_Back_Forward_List *list)
 Returns the length of the back-forward list including current item.
Eina_Listewk_back_forward_list_n_back_items_copy (const Ewk_Back_Forward_List *list, int limit)
 Creates the list containing the items preceding the current item limited by limit.
Eina_Listewk_back_forward_list_n_forward_items_copy (const Ewk_Back_Forward_List *list, int limit)
 Creates the list containing the items following the current item limited by limit.
Ewk_Back_Forward_List_Itemewk_back_forward_list_item_ref (Ewk_Back_Forward_List_Item *item)
 Increases the reference count of the given object.
void ewk_back_forward_list_item_unref (Ewk_Back_Forward_List_Item *item)
 Decreases the reference count of the given object, possibly freeing it.
const char * ewk_back_forward_list_item_url_get (const Ewk_Back_Forward_List_Item *item)
 Returns URL of the item.
const char * ewk_back_forward_list_item_title_get (const Ewk_Back_Forward_List_Item *item)
 Returns title of the item.
const char * ewk_back_forward_list_item_original_url_get (const Ewk_Back_Forward_List_Item *item)
 Returns original URL of the item.
Ewk_Cookie_Managerewk_context_cookie_manager_get (const Ewk_Context *context)
 Gets the cookie manager instance for this context.
Eina_Bool ewk_context_cache_model_set (Ewk_Context *context, Ewk_Cache_Model cache_model)
 Set cache_model as the cache model for context.
Ewk_Cache_Model ewk_context_cache_model_get (const Ewk_Context *context)
 Gets the cache model for context.
void ewk_context_resource_cache_clear (Ewk_Context *context)
 Clears HTTP caches in local storage and all resources cached in memory
such as images, CSS, JavaScript, XSL, and fonts for context.
void ewk_cookie_manager_accept_policy_set (Ewk_Cookie_Manager *manager, Ewk_Cookie_Accept_Policy policy)
 Set policy as the cookie acceptance policy for manager.
void ewk_cookie_manager_accept_policy_async_get (const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data)
 Asynchronously get the cookie acceptance policy of manager.
void ewk_cookie_manager_cookies_clear (Ewk_Cookie_Manager *manager)
 Delete all cookies of manager.
int ewk_init (void)
 Initializes WebKit's instance.
int ewk_shutdown (void)
 Decreases a reference count of WebKit's instance, possibly destroying it.
const char * ewk_policy_decision_cookie_get (Ewk_Policy_Decision *policy_decision)
 Returns cookie from Policy Decision object.
const char * ewk_policy_decision_url_get (Ewk_Policy_Decision *policy_decision)
 Returns url from Policy Decision object.
const char * ewk_policy_decision_scheme_get (Ewk_Policy_Decision *policy_decision)
 Returns scheme from Policy Decision object.
const char * ewk_policy_decision_host_get (Ewk_Policy_Decision *policy_decision)
 Returns host from Policy Decision object.
const char * ewk_policy_decision_http_method_get (Ewk_Policy_Decision *policy_decision)
 Returns http method from Policy Decision object.
const char * ewk_policy_decision_response_mime_get (Ewk_Policy_Decision *policy_decision)
 Returns mimetype for response data from Policy Decision object.
const Eina_Hashewk_policy_decision_response_headers_get (Ewk_Policy_Decision *policy_decision)
 Returns http headers for response data from Policy Decision object.
int ewk_policy_decision_response_status_code_get (Ewk_Policy_Decision *policy_decision)
 Returns http status code from Policy Decision object.
Ewk_Policy_Decision_Type ewk_policy_decision_type_get (const Ewk_Policy_Decision *policy_decision)
 Returns policy type from Policy Decision object.
Eina_Bool ewk_policy_decision_use (Ewk_Policy_Decision *policy_decision)
 Accept the action which triggers this decision.
Eina_Bool ewk_policy_decision_ignore (Ewk_Policy_Decision *policy_decision)
 Ignore the action which triggers this decision.
Ewk_Policy_Navigation_Type ewk_policy_decision_navigation_type_get (Ewk_Policy_Decision *policy_decision)
 Returns navigation type from Policy Decision object.
Eina_Bool ewk_settings_javascript_enabled_set (Ewk_Settings *settings, Eina_Bool enable)
 Enables/disables the javascript executing.
Eina_Bool ewk_settings_javascript_enabled_get (const Ewk_Settings *settings)
 Returns the javascript can be executable or not.
Eina_Bool ewk_settings_loads_images_automatically_set (Ewk_Settings *settings, Eina_Bool automatic)
 Enables/disables auto loading of the images.
Eina_Bool ewk_settings_loads_images_automatically_get (const Ewk_Settings *settings)
 Returns the images can be loaded automatically or not.
Eina_Bool ewk_settings_default_text_encoding_name_set (Ewk_Settings *settings, const char *encoding)
 Sets the default text encoding name.
const char * ewk_settings_default_text_encoding_name_get (const Ewk_Settings *settings)
 Gets the default text encoding name.
Eina_Bool ewk_settings_default_font_size_set (Ewk_Settings *settings, int size)
 Sets the default font size.
int ewk_settings_default_font_size_get (const Ewk_Settings *settings)
 Returns the default font size.
Eina_Bool ewk_settings_scripts_can_open_windows_set (Ewk_Settings *settings, Eina_Bool enable)
 Enables/disables if the scripts can open new windows.
Eina_Bool ewk_settings_scripts_can_open_windows_get (const Ewk_Settings *settings)
 Returns whether the scripts can open new windows.
Evas_Objectewk_view_add (Evas *e)
 Creates a new EFL WebKit view object.
Ewk_Context * ewk_view_context_get (const Evas_Object *o)
 Gets the Ewk_Context of this view.
Eina_Bool ewk_view_url_set (Evas_Object *o, const char *url)
 Asks the object to load the given URL.
const char * ewk_view_url_get (const Evas_Object *o)
 Returns the current URL string of view object.
Eina_Bool ewk_view_reload (Evas_Object *o)
 Asks the main frame to reload the current document.
Eina_Bool ewk_view_stop (Evas_Object *o)
 Asks the main frame to stop loading.
Ewk_Settings * ewk_view_settings_get (const Evas_Object *o)
 Gets the Ewk_Settings of this view.
Eina_Bool ewk_view_back (Evas_Object *o)
 Asks the main frame to navigate back in the history.
Eina_Bool ewk_view_forward (Evas_Object *o)
 Asks the main frame to navigate forward in the history.
Eina_Bool ewk_view_back_possible (Evas_Object *o)
 Queries if it is possible to navigate backwards one item in the history.
Eina_Bool ewk_view_forward_possible (Evas_Object *o)
 Queries if it is possible to navigate forwards one item in the history.
Ewk_Back_Forward_Listewk_view_back_forward_list_get (const Evas_Object *o)
 Gets the back-forward list associated with this view.
void ewk_view_back_forward_list_clear (const Evas_Object *o)
 Clear back forward list of a page.
const char * ewk_view_title_get (const Evas_Object *o)
 Gets the current title of the main frame.
double ewk_view_load_progress_get (const Evas_Object *o)
 Gets the current load progress of page.
Eina_Bool ewk_view_user_agent_set (Evas_Object *o, const char *user_agent)
 Request to set the user agent string.
const char * ewk_view_user_agent_get (const Evas_Object *o)
 Returns user agent string.
Eina_Bool ewk_view_contents_size_get (const Evas_Object *o, Evas_Coord *width, Evas_Coord *height)
 Gets last known contents size.
Eina_Bool ewk_view_script_execute (Evas_Object *o, const char *script, Ewk_View_Script_Execute_Cb callback, void *user_data)
 Requests execution of the given script.
Eina_Bool ewk_view_scale_set (Evas_Object *o, double scale_factor, int cx, int cy)
 Scales the current page, centered at the given point.
double ewk_view_scale_get (const Evas_Object *o)
 Queries the current scale factor of the page.
Eina_Bool ewk_view_fullscreen_exit (Evas_Object *o)
 Exit fullscreen when the back key is pressed.
void ewk_view_suspend (Evas_Object *o)
 Suspend operation associated with view object.
void ewk_view_resume (Evas_Object *o)
 Resume operation associated with view object after calling ewk_view_suspend().
Eina_Bool ewk_view_url_request_set (Evas_Object *o, const char *url, Ewk_Http_Method method, Eina_Hash *headers, const char *body)
 Requests loading of the given request data.
void ewk_view_scroll_by (Evas_Object *o, int dx, int dy)
 Scrolls webpage of view by dx and dy.
Eina_Bool ewk_view_scroll_pos_get (Evas_Object *o, int *x, int *y)
 Gets the current scroll position of given view.
Eina_Bool ewk_view_scroll_set (Evas_Object *o, int x, int y)
 Sets an absolute scroll of the given view.
Eina_Bool ewk_view_text_find (Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count)
 Searches and hightlights the given string in the document.
Eina_Bool ewk_view_html_string_load (Evas_Object *o, const char *html, const char *base_url, const char *unreachable_url)
 Loads the specified html string as the content of the view.

Typedefs

typedef struct
Ewk_Back_Forward_List 
Ewk_Back_Forward_List
 Creates a type name for Ewk_Back_Forward_List.
typedef struct EwkObject Ewk_Back_Forward_List_Item
 Declare Ewk_Back_Forward_List_Item as Ewk_Object.
typedef enum Ewk_Cache_Model Ewk_Cache_Model
 Creates a type name for the Ewk_Cache_Model.
typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager
 Creates a type name for Ewk_Cookie_Manager.
typedef enum
Ewk_Cookie_Accept_Policy 
Ewk_Cookie_Accept_Policy
 Creates a type name for the Ewk_Cookie_Accept_Policy.
typedef void(* Ewk_Cookie_Manager_Policy_Async_Get_Cb )(Ewk_Cookie_Accept_Policy policy, void *event_info)
 Callback type for use with ewk_cookie_manager_accept_policy_async_get.
typedef enum
_Ewk_Policy_Decision_Type 
Ewk_Policy_Decision_Type
 Creates a type name for the Ewk_Policy_Decision_Type.
typedef enum
_Ewk_Policy_Navigation_Type 
Ewk_Policy_Navigation_Type
 Creates a type name for the Ewk_Policy_Navigation_Type.
typedef void(* Ewk_View_Script_Execute_Cb )(Evas_Object *o, const char *result_value, void *user_data)
 Callback for ewk_view_script_execute.
typedef enum Ewk_Http_Method Ewk_Http_Method
 Creates a type name for the Ewk_Http_Method.

Typedef Documentation

Creates a type name for Ewk_Back_Forward_List.

Since :
2.3.1
typedef struct EwkObject Ewk_Back_Forward_List_Item

Declare Ewk_Back_Forward_List_Item as Ewk_Object.

Since :
2.3.1
See also:
Ewk_Object

Creates a type name for the Ewk_Cache_Model.

Since :
2.3.1

Creates a type name for the Ewk_Cookie_Accept_Policy.

Since :
2.3.1

Creates a type name for Ewk_Cookie_Manager.

Since :
2.3.1

Callback type for use with ewk_cookie_manager_accept_policy_async_get.

Since :
2.3.1
Parameters:
[in]policya Ewk_Cookie_Accept_Policy
[in]event_infouser data

Creates a type name for the Ewk_Policy_Decision_Type.

Since :
2.3.1

Creates a type name for the Ewk_Policy_Navigation_Type.

Since :
2.3.1
typedef void(* Ewk_View_Script_Execute_Cb)(Evas_Object *o, const char *result_value, void *user_data)

Callback for ewk_view_script_execute.

Since :
2.3.1
Parameters:
[in]othe view object
[in]result_valuevalue returned by script
[in]user_datauser data

Enumeration Type Documentation

Provides option to policy decision type.

Since :
2.3.1

Provides option to policy navigation type.

Since :
2.3.1

Contains option for cache model.

Since :
2.3.1
Enumerator:
EWK_CACHE_MODEL_DOCUMENT_VIEWER 

Use the smallest cache capacity.

EWK_CACHE_MODEL_DOCUMENT_BROWSER 

Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER.

EWK_CACHE_MODEL_PRIMARY_WEBBROWSER 

Use the biggest cache capacity.

Contains accept policies for the cookies.

Since :
2.3.1
Enumerator:
EWK_COOKIE_ACCEPT_POLICY_ALWAYS 

Accepts every cookie sent from any page.

EWK_COOKIE_ACCEPT_POLICY_NEVER 

Rejects all cookies.

EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY 

Accepts only cookies set by the main document loaded.


Function Documentation

Returns the length of the back-forward list including current item.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
Returns:
the length of the back-forward list including current item or 0 in case of error

Returns the current item in the list.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
Returns:
the current item in the list or NULL in case of error

Returns the item at a given index relative to the current item.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
[in]indexthe index of the item
Returns:
the item at a given index relative to the current item or NULL in case of error

Returns original URL of the item.

Since :
2.3.1
Parameters:
[in]itemthe back-forward list item instance
Returns:
the original URL of the item or NULL in case of error. This pointer is
guaranteed to be eina_stringshare, so whenever possible
save yourself some cpu cycles and use
eina_stringshare_ref() instead of eina_stringshare_add() or
strdup()
See also:
ewk_back_forward_list_item_url_get()

Increases the reference count of the given object.

Since :
2.3.1
Parameters:
[in]itemthe back-forward list item instance to increase the reference count
Returns:
a pointer to the object on success, NULL otherwise.

Returns title of the item.

Since :
2.3.1
Parameters:
[in]itemthe back-forward list item instance
Returns:
the title of the item or NULL in case of error. This pointer is
guaranteed to be eina_stringshare, so whenever possible
save yourself some cpu cycles and use
eina_stringshare_ref() instead of eina_stringshare_add() or
strdup()

Decreases the reference count of the given object, possibly freeing it.

Since :
2.3.1

When the reference count reaches 0, the item is freed.

Parameters:
[in]itemthe back-forward list item instance to decrease the reference count

Returns URL of the item.

Since :
2.3.1

The returned URL may differ from the original URL (For example if the page was redirected).

Parameters:
[in]itemthe back-forward list item instance
Returns:
the URL of the item or NULL in case of error. This pointer is
guaranteed to be eina_stringshare, so whenever possible
save yourself some cpu cycles and use
eina_stringshare_ref() instead of eina_stringshare_add() or
strdup()
See also:
ewk_back_forward_list_item_original_url_get()

Creates the list containing the items preceding the current item limited by limit.

The Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
if limit is equal to -1 all the items preceding the current item are returned.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
[in]limitthe number of items to retrieve
Returns:
Eina_List containing Ewk_Back_Forward_List_Item elements or NULL in case of error,
the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
to free the items

Creates the list containing the items following the current item limited by limit.

The Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
if limit is equal to -1 all the items preceding the current item are returned.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
[in]limitthe number of items to retrieve
Returns:
Eina_List containing Ewk_Back_Forward_List_Item elements or NULL in case of error,
the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
to free the items

Returns the item that follows the current item in the list.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
Returns:
the item that follows the current item in the list or NULL in case of error

Returns the item that precedes the current item in the list.

Since :
2.3.1
Parameters:
[in]listthe back-forward list instance
Returns:
the item that precedes the current item the list or NULL in case of error
Ewk_Cache_Model ewk_context_cache_model_get ( const Ewk_Context *  context)

Gets the cache model for context.

By default, it is EWK_CACHE_MODEL_DOCUMENT_VIEWER.

Since :
2.3.1
Parameters:
[in]contextcontext object to query.
Returns:
the cache model for the context.
Eina_Bool ewk_context_cache_model_set ( Ewk_Context *  context,
Ewk_Cache_Model  cache_model 
)

Set cache_model as the cache model for context.

By default, it is EWK_CACHE_MODEL_DOCUMENT_VIEWER.

Since :
2.3.1
Parameters:
[in]contextcontext object to update.
[in]cache_modela Ewk_Cache_Model.
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Ewk_Cookie_Manager* ewk_context_cookie_manager_get ( const Ewk_Context *  context)

Gets the cookie manager instance for this context.

Since :
2.3.1
Parameters:
[in]contextcontext object to query
Returns:
Ewk_Cookie_Manager object instance or NULL in case of failure
void ewk_context_resource_cache_clear ( Ewk_Context *  context)

Clears HTTP caches in local storage and all resources cached in memory
such as images, CSS, JavaScript, XSL, and fonts for context.

Since :
2.3.1
Parameters:
[in]contextcontext object to clear all resource caches

Asynchronously get the cookie acceptance policy of manager.

By default, only cookies set by the main document loaded are accepted.

Since :
2.3.1
Parameters:
[in]managerThe cookie manager to query
[in]callbackThe function to call when the policy is received
[in]dataUser data (may be NULL)

Set policy as the cookie acceptance policy for manager.

By default, only cookies set by the main document loaded are accepted.

Since :
2.3.1
Parameters:
[in]managerThe cookie manager to update
[in]policya Ewk_Cookie_Accept_Policy

Delete all cookies of manager.

Since :
2.3.1
Parameters:
[in]managerThe cookie manager to update
int ewk_init ( void  )

Initializes WebKit's instance.

initializes components needed by EFL,
increases a reference count of WebKit's instance.

Since :
2.3.1
Returns:
a reference count of WebKit's instance on success or 0 on failure
const char* ewk_policy_decision_cookie_get ( Ewk_Policy_Decision *  policy_decision)

Returns cookie from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
cookie string on success or empty string on failure
const char* ewk_policy_decision_host_get ( Ewk_Policy_Decision *  policy_decision)

Returns host from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
host string on success or empty string on failure
const char* ewk_policy_decision_http_method_get ( Ewk_Policy_Decision *  policy_decision)

Returns http method from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
http method string on success or empty string on failure
Eina_Bool ewk_policy_decision_ignore ( Ewk_Policy_Decision *  policy_decision)

Ignore the action which triggers this decision.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Ewk_Policy_Navigation_Type ewk_policy_decision_navigation_type_get ( Ewk_Policy_Decision *  policy_decision)

Returns navigation type from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
navigation type
const Eina_Hash* ewk_policy_decision_response_headers_get ( Ewk_Policy_Decision *  policy_decision)

Returns http headers for response data from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
http headers on success or NULL on failure
const char* ewk_policy_decision_response_mime_get ( Ewk_Policy_Decision *  policy_decision)

Returns mimetype for response data from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
mimetype string on success or empty string on failure
int ewk_policy_decision_response_status_code_get ( Ewk_Policy_Decision *  policy_decision)

Returns http status code from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
http status code number
const char* ewk_policy_decision_scheme_get ( Ewk_Policy_Decision *  policy_decision)

Returns scheme from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
scheme string on success or empty string on failure
Ewk_Policy_Decision_Type ewk_policy_decision_type_get ( const Ewk_Policy_Decision *  policy_decision)

Returns policy type from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
policy type
const char* ewk_policy_decision_url_get ( Ewk_Policy_Decision *  policy_decision)

Returns url from Policy Decision object.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
url string on success or empty string on failure
Eina_Bool ewk_policy_decision_use ( Ewk_Policy_Decision *  policy_decision)

Accept the action which triggers this decision.

Since :
2.3.1
Parameters:
[in]policy_decisionpolicy decsision object
Returns:
EINA_TRUE on success or EINA_FALSE on failure
int ewk_settings_default_font_size_get ( const Ewk_Settings *  settings)

Returns the default font size.

Since :
2.3.1
Parameters:
[in]settingssettings object to get the default font size
Returns:
the default font size or 0 on failure
Eina_Bool ewk_settings_default_font_size_set ( Ewk_Settings *  settings,
int  size 
)

Sets the default font size.

Since :
2.3.1

By default, the default font size is 16.

Parameters:
[in]settingssettings object to set the default font size
[in]sizea new default font size to set
Returns:
EINA_TRUE on success or EINA_FALSE on failure
const char* ewk_settings_default_text_encoding_name_get ( const Ewk_Settings *  settings)

Gets the default text encoding name.

Since :
2.3.1

The returned string is guaranteed to be stringshared.

Parameters:
[in]settingssettings object to query default text encoding name
Returns:
default text encoding name
Eina_Bool ewk_settings_default_text_encoding_name_set ( Ewk_Settings *  settings,
const char *  encoding 
)

Sets the default text encoding name.

Since :
2.3.1
Parameters:
[in]settingssettings object to set default text encoding name
[in]encodingdefault text encoding name
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Eina_Bool ewk_settings_javascript_enabled_get ( const Ewk_Settings *  settings)

Returns the javascript can be executable or not.

Since :
2.3.1
Parameters:
[in]settingssettings object to query if the javascript can be executed
Returns:
EINA_TRUE if the javascript can be executed
EINA_FALSE if not or on failure
Eina_Bool ewk_settings_javascript_enabled_set ( Ewk_Settings *  settings,
Eina_Bool  enable 
)

Enables/disables the javascript executing.

Since :
2.3.1
Parameters:
[in]settingssettings object to set javascript executing
[in]enableEINA_TRUE to enable javascript executing
EINA_FALSE to disable
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Eina_Bool ewk_settings_loads_images_automatically_get ( const Ewk_Settings *  settings)

Returns the images can be loaded automatically or not.

Since :
2.3.1
Parameters:
[in]settingssettings object to get auto loading of the images
Returns:
EINA_TRUE if the images are loaded automatically,
EINA_FALSE if not or on failure
Eina_Bool ewk_settings_loads_images_automatically_set ( Ewk_Settings *  settings,
Eina_Bool  automatic 
)

Enables/disables auto loading of the images.

Since :
2.3.1
Parameters:
[in]settingssettings object to set auto loading of the images
[in]automaticEINA_TRUE to enable auto loading of the images,
EINA_FALSE to disable
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Eina_Bool ewk_settings_scripts_can_open_windows_get ( const Ewk_Settings *  settings)

Returns whether the scripts can open new windows.

Since :
2.3.1
Parameters:
settingssettings object to query whether the scripts can open new windows
Returns:
EINA_TRUE if the scripts can open new windows EINA_FALSE if not or on failure (scripts are disabled)
Eina_Bool ewk_settings_scripts_can_open_windows_set ( Ewk_Settings *  settings,
Eina_Bool  enable 
)

Enables/disables if the scripts can open new windows.

By default, the scripts can open new windows.

Since :
2.3.1
Parameters:
settingssettings object to set if the scripts can open new windows
enableEINA_TRUE if the scripts can open new windows EINA_FALSE if not
Returns:
EINA_TRUE on success or EINA_FALSE on failure (scripts are disabled)
int ewk_shutdown ( void  )

Decreases a reference count of WebKit's instance, possibly destroying it.

If the reference count reaches 0 WebKit's instance is destroyed.

Since :
2.3.1
Returns:
a reference count of WebKit's instance

Creates a new EFL WebKit view object.

Since :
2.3.1
Parameters:
[in]ecanvas object where to create the view object
Returns:
view object on success or NULL on failure

Asks the main frame to navigate back in the history.

Since :
2.3.1
Parameters:
[in]oview object to navigate back
Returns:
EINA_TRUE on success or EINA_FALSE otherwise

Clear back forward list of a page.

Since :
2.3.1
Parameters:
[in]oview object to clear back forward list

Gets the back-forward list associated with this view.

Since :
2.3.1

The returned instance is unique for this view and thus multiple calls
to this function with the same view as parameter returns the same
handle. This handle is alive while view is alive, thus one
might want to listen for EVAS_CALLBACK_DEL on given view
(o) to know when to stop using returned handle.

Parameters:
[in]oview object to get navigation back-forward list
Returns:
the back-forward list instance handle associated with this view

Queries if it is possible to navigate backwards one item in the history.

Since :
2.3.1
Parameters:
[in]oview object to query if backward navigation is possible
Returns:
EINA_TRUE if it is possible to navigate backwards in the history, EINA_FALSE otherwise
Eina_Bool ewk_view_contents_size_get ( const Evas_Object o,
Evas_Coord width,
Evas_Coord height 
)

Gets last known contents size.

Since :
2.3.1
Parameters:
[in]oview object to get contents size
[in]widthpointer to store contents size width, may be 0
[in]heightpointer to store contents size height, may be 0
Returns:
[in] EINA_TRUE on success or EINA_FALSE on failure and
width and height will be zeroed
Ewk_Context* ewk_view_context_get ( const Evas_Object o)

Gets the Ewk_Context of this view.

Since :
2.3.1
Parameters:
[in]othe view object to get the Ewk_Context
Returns:
the Ewk_Context of this view or NULL on failure

Asks the main frame to navigate forward in the history.

Since :
2.3.1
Parameters:
[in]oview object to navigate forward
Returns:
EINA_TRUE on success or EINA_FALSE otherwise

Queries if it is possible to navigate forwards one item in the history.

Since :
2.3.1
Parameters:
[in]oview object to query if forward navigation is possible
Returns:
EINA_TRUE if it is possible to navigate forwards in the history, EINA_FALSE otherwise

Exit fullscreen when the back key is pressed.

Since :
2.3.1
Parameters:
[in]oview object to exit fullscreen mode
Returns:
EINA_TRUE if successful, EINA_FALSE otherwise
Eina_Bool ewk_view_html_string_load ( Evas_Object o,
const char *  html,
const char *  base_url,
const char *  unreachable_url 
)

Loads the specified html string as the content of the view.

External objects such as stylesheets or images referenced in the HTML document are located relative to baseUrl.

If an unreachableUrl is passed it is used as the url for the loaded content. This is typically used to display error pages for a failed load.

Since :
2.3.1
Parameters:
[in]oview object to load the HTML into
[in]htmlHTML data to load
[in]base_urlBase URL used for relative paths to external objects (optional)
[in]unreachable_urlURL that could not be reached (optional)
Returns:
EINA_TRUE if it the HTML was successfully loaded, EINA_FALSE otherwise
double ewk_view_load_progress_get ( const Evas_Object o)

Gets the current load progress of page.

The progress estimation from 0.0 to 1.0.

Since :
2.3.1
Parameters:
[in]oview object to get the current progress
Returns:
the load progress of page, value from 0.0 to 1.0,
or -1.0 on failure

Asks the main frame to reload the current document.

Since :
2.3.1
Parameters:
[in]oview object to reload current document
Returns:
EINA_TRUE on success or EINA_FALSE otherwise

Resume operation associated with view object after calling ewk_view_suspend().

Since :
2.3.1
Parameters:
[in]oview object to resume
double ewk_view_scale_get ( const Evas_Object o)

Queries the current scale factor of the page.

It returns previous scale factor after ewk_view_scale_set is called immediately
until scale factor of page is really changed.

Since :
2.3.1
Parameters:
[in]oview object to get the scale factor
Returns:
current scale factor in use on success or -1.0 on failure
Eina_Bool ewk_view_scale_set ( Evas_Object o,
double  scale_factor,
int  cx,
int  cy 
)

Scales the current page, centered at the given point.

Since :
2.3.1
Parameters:
[in]oview object to set the zoom level
[in]scale_factora new level to set
[in]cxx of center coordinate
[in]cyy of center coordinate
Returns:
EINA_TRUE on success or EINA_FALSE otherwise
Eina_Bool ewk_view_script_execute ( Evas_Object o,
const char *  script,
Ewk_View_Script_Execute_Cb  callback,
void *  user_data 
)

Requests execution of the given script.

Remarks:
This allows to use NULL for the callback parameter.
So, if the result data from the script is not required, NULL might be used for the callback parameter.
Since :
2.3.1
Parameters:
[in]oview object to execute script
[in]scriptJava Script to execute
[in]callbackresult callback
[in]user_datauser data
Returns:
EINA_TRUE on success or EINA_FALSE otherwise
void ewk_view_scroll_by ( Evas_Object o,
int  dx,
int  dy 
)

Scrolls webpage of view by dx and dy.

Since :
2.3.1
Parameters:
[in]oview object to scroll
[in]dxhorizontal offset to scroll
[in]dyvertical offset to scroll
Eina_Bool ewk_view_scroll_pos_get ( Evas_Object o,
int *  x,
int *  y 
)

Gets the current scroll position of given view.

Since :
2.3.1
Parameters:
[in]oview object to get the current scroll position
[in]xthe pointer to store the horizontal position, may be 0
[in]ythe pointer to store the vertical position, may be 0
Returns:
EINA_TRUE on success, EINA_FALSE otherwise and
values are zeroed.
Eina_Bool ewk_view_scroll_set ( Evas_Object o,
int  x,
int  y 
)

Sets an absolute scroll of the given view.

Since :
2.3.1

Both values are from zero to the contents size minus the viewport size.

Parameters:
[in]oview object to scroll
[in]xhorizontal position to scroll
[in]yvertical position to scroll
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Ewk_Settings* ewk_view_settings_get ( const Evas_Object o)

Gets the Ewk_Settings of this view.

Since :
2.3.1
Parameters:
[in]oview object to get Ewk_Settings
Returns:
the Ewk_Settings of this view or NULL on failure

Asks the main frame to stop loading.

Since :
2.3.1
Parameters:
[in]oview object to stop loading
Returns:
EINA_TRUE on success or EINA_FALSE otherwise.

Suspend operation associated with view object.

Since :
2.3.1
Parameters:
[in]oview object to suspend
Eina_Bool ewk_view_text_find ( Evas_Object o,
const char *  text,
Ewk_Find_Options  options,
unsigned  max_match_count 
)

Searches and hightlights the given string in the document.

Since :
2.3.1
Parameters:
[in]oview object to find text
[in]texttext to find
[in]optionsoptions to find
[in]max_match_countmaximum match count to find, unlimited if 0
Returns:
EINA_TRUE on success, EINA_FALSE on errors
const char* ewk_view_title_get ( const Evas_Object o)

Gets the current title of the main frame.

It returns an internal string and should not
be modified. The string is guaranteed to be stringshared.

Since :
2.3.1
Parameters:
[in]oview object to get current title
Returns:
current title on success or NULL on failure
const char* ewk_view_url_get ( const Evas_Object o)

Returns the current URL string of view object.

Since :
2.3.1

It returns an internal string and should not
be modified. The string is guaranteed to be stringshared.

Parameters:
[in]oview object to get current URL
Returns:
current URL on success or NULL on failure
Eina_Bool ewk_view_url_request_set ( Evas_Object o,
const char *  url,
Ewk_Http_Method  method,
Eina_Hash headers,
const char *  body 
)

Requests loading of the given request data.

Since :
2.3.1
Parameters:
[in]oview object to load
[in]urluniform resource identifier to load
[in]methodhttp method
[in]headershttp headers
[in]bodyhttp body data
Returns:
EINA_TRUE on successful request or EINA_FALSE on failure
Eina_Bool ewk_view_url_set ( Evas_Object o,
const char *  url 
)

Asks the object to load the given URL.

Since :
2.3.1
Parameters:
[in]oview object to load URL
[in]urluniform resource identifier to load
Returns:
EINA_TRUE is returned if o is valid, irrespective of load,
or EINA_FALSE on failure
const char* ewk_view_user_agent_get ( const Evas_Object o)

Returns user agent string.

Since :
2.3.1
Parameters:
[in]oview object to get the user agent string
Returns:
user agent string
Eina_Bool ewk_view_user_agent_set ( Evas_Object o,
const char *  user_agent 
)

Request to set the user agent string.

Since :
2.3.1
Parameters:
[in]oview object to set the user agent string
[in]user_agentthe user agent string to set or NULL to restore the default one
Returns:
EINA_TRUE on success or EINA_FALSE on failure
Parameters:
user_agentthe user agent string to set or NULL to restore the default one