|
typedef struct Ewk_Download_Job_Error | Ewk_Download_Job_Error |
| Creates a type name for Ewk_Download_Job_Error.
|
|
typedef struct EwkObject | Ewk_Context |
|
typedef enum Ewk_Cache_Model | Ewk_Cache_Model |
| Creates a type name for the Ewk_Cache_Model.
|
|
typedef enum Ewk_TLS_Error_Policy | Ewk_TLS_Error_Policy |
|
typedef void(* | Ewk_Url_Scheme_Request_Cb) (Ewk_Url_Scheme_Request *request, void *user_data) |
| Callback type for use with ewk_context_url_scheme_register().
|
|
typedef void(* | Ewk_History_Navigation_Cb) (const Evas_Object *view, Ewk_Navigation_Data *navigation_data, void *user_data) |
| Type definition for a function that will be called back when view did navigation (loaded new URL).
|
|
typedef void(* | Ewk_History_Client_Redirection_Cb) (const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data) |
| Type definition for a function that will be called back when view performed a client redirect.
|
|
typedef void(* | Ewk_History_Server_Redirection_Cb) (const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data) |
| Type definition for a function that will be called back when view performed a server redirect.
|
|
typedef void(* | Ewk_History_Title_Update_Cb) (const Evas_Object *view, const char *title, const char *url, void *user_data) |
| Type definition for a function that will be called back when history title is updated.
|
|
typedef void(* | Ewk_Download_Requested_Cb) (Ewk_Download_Job *download, void *user_data) |
| Type definition for a function that will be called back when new download job is requested.
|
|
typedef void(* | Ewk_Download_Failed_Cb) (Ewk_Download_Job_Error *error, void *user_data) |
| Type definition for a function that will be called back when a download job has failed.
|
|
typedef void(* | Ewk_Download_Cancelled_Cb) (Ewk_Download_Job *download, void *user_data) |
| Type definition for a function that will be called back when a download job is cancelled.
|
|
typedef void(* | Ewk_Download_Finished_Cb) (Ewk_Download_Job *download, void *user_data) |
| Type definition for a function that will be called back when a download job is finished.
|
|
typedef void(* | Ewk_History_Populate_Visited_Links_Cb) (void *user_data) |
|
typedef void(* | Ewk_Context_Message_From_Extension_Cb) (const char *name, const Eina_Value *body, void *user_data) |
|
|
EAPI Ewk_Context * | ewk_context_default_get (void) |
|
EAPI Ewk_Context * | ewk_context_new (void) |
|
EAPI Ewk_Context * | ewk_context_new_with_extensions_path (const char *path) |
|
EAPI Ewk_Application_Cache_Manager * | ewk_context_application_cache_manager_get (const Ewk_Context *context) |
|
EAPI Ewk_Cookie_Manager * | ewk_context_cookie_manager_get (const Ewk_Context *context) |
|
EAPI Ewk_Database_Manager * | ewk_context_database_manager_get (const Ewk_Context *context) |
|
EAPI Eina_Bool | ewk_context_favicon_database_directory_set (Ewk_Context *context, const char *directory_path) |
|
EAPI Ewk_Favicon_Database * | ewk_context_favicon_database_get (const Ewk_Context *context) |
|
EAPI Ewk_Storage_Manager * | ewk_context_storage_manager_get (const Ewk_Context *context) |
|
EAPI Eina_Bool | ewk_context_url_scheme_register (Ewk_Context *context, const char *scheme, Ewk_Url_Scheme_Request_Cb callback, void *user_data) |
|
EAPI void | ewk_context_history_callbacks_set (Ewk_Context *context, Ewk_History_Navigation_Cb navigate_func, Ewk_History_Client_Redirection_Cb client_redirect_func, Ewk_History_Server_Redirection_Cb server_redirect_func, Ewk_History_Title_Update_Cb title_update_func, Ewk_History_Populate_Visited_Links_Cb populate_visited_links_func, void *data) |
|
EAPI void | ewk_context_download_callbacks_set (Ewk_Context *context, Ewk_Download_Requested_Cb download_requested_func, Ewk_Download_Failed_Cb download_failed_func, Ewk_Download_Cancelled_Cb download_cancelled_func, Ewk_Download_Finished_Cb download_finished_func, void *data) |
|
EAPI void | ewk_context_visited_link_add (Ewk_Context *context, const char *visited_url) |
|
EAPI Eina_Bool | ewk_context_cache_model_set (Ewk_Context *context, Ewk_Cache_Model cache_model) |
|
EAPI Ewk_Cache_Model | ewk_context_cache_model_get (const Ewk_Context *context) |
|
EAPI Eina_Bool | ewk_context_additional_plugin_path_set (Ewk_Context *context, const char *path) |
|
EAPI void | ewk_context_resource_cache_clear (Ewk_Context *context) |
|
EAPI Eina_Bool | ewk_context_message_post_to_extensions (Ewk_Context *context, const char *name, const Eina_Value *body) |
|
EAPI void | ewk_context_message_from_extensions_callback_set (Ewk_Context *context, Ewk_Context_Message_From_Extension_Cb callback, void *user_data) |
|
EAPI Ewk_TLS_Error_Policy | ewk_context_tls_error_policy_get (const Ewk_Context *context) |
|
EAPI void | ewk_context_tls_error_policy_set (Ewk_Context *context, Ewk_TLS_Error_Policy tls_error_policy) |
|
EAPI void | ewk_context_preferred_languages_set (Eina_List *languages) |
|
EAPI void | ewk_context_tls_certificate_for_host_allow (Ewk_Context *context, const char *pem, const char *host) |
|
EAPI Eina_Bool | ewk_context_web_process_count_limit_set (Ewk_Context *context, unsigned count) |
|
EAPI unsigned | ewk_context_web_process_count_limit_get (const Ewk_Context *context) |
|
Describes the context API.
- Note
- ewk_context encapsulates all pages related to specific use of WebKit.
Applications have the option of creating a context different than the default one and use it for a group of pages. All pages in the same context share the same preferences, visited link set, local storage, etc.
A process model can be specified per context. The default one is the shared model where the web-engine process is shared among the pages in the context. The second model allows each page to use a separate web-engine process. This latter model is currently not supported by WebKit2/EFL.
EAPI Eina_Bool ewk_context_favicon_database_directory_set |
( |
Ewk_Context * |
context, |
|
|
const char * |
directory_path |
|
) |
| |
Sets the favicon database directory for this context.
Sets the directory path to be used to store the favicons database for context on disk. Passing NULL
as directory_path will result in using the default directory for the platform.
Calling this method also means enabling the favicons database for its use from the applications, it is therefore expected to be called only once. Further calls for the same instance of context will not have any effect.
- Parameters
-
context | context object to update |
directory_path | database directory path to set |
- Returns
EINA_TRUE
if successful, EINA_FALSE
otherwise
Register scheme in context.
When an URL request with scheme is made in the Ewk_Context, the callback function provided will be called with a Ewk_Url_Scheme_Request.
It is possible to handle URL scheme requests asynchronously, by calling ewk_object_ref() on the Ewk_Url_Scheme_Request and calling ewk_url_scheme_request_finish() later when the data of the request is available.
To replace registered callback with new callback, calls ewk_context_url_scheme_register() with new callback again.
- Parameters
-
context | a Ewk_Context object. |
scheme | the network scheme to register |
callback | the function to be called when an URL request with scheme is made. |
user_data | data to pass to callback function |
1 static void custom_url_scheme_request_cb(Ewk_Url_Scheme_Request *request, void *user_data)
4 char *contents_data = NULL;
5 unsigned contents_length = 0;
7 scheme = ewk_url_scheme_request_scheme_get(request);
8 if (!strcmp(scheme, "myapp")) {
9 // Initialize contents_data with a welcome page, and set its length to contents_length
11 Eina_Strbuf *buf = eina_strbuf_new();
12 eina_strbuf_append_printf(buf, "<html><body><p>Invalid application: %s</p></body></html>", scheme);
13 contents_data = eina_strbuf_string_steal(buf);
14 contents_length = strlen(contents_data);
15 eina_strbuf_free(buf);
17 ewk_url_scheme_request_finish(request, contents_data, contents_length, "text/html");