ewebkit2  1.11.0
Web engine based on WebKit2 for EFL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ewk_context.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Samsung Electronics
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
37 #ifndef ewk_context_h
38 #define ewk_context_h
39 
41 #include "ewk_cookie_manager.h"
42 #include "ewk_database_manager.h"
43 #include "ewk_favicon_database.h"
44 #include "ewk_navigation_data.h"
45 #include "ewk_storage_manager.h"
46 #include "ewk_url_scheme_request.h"
47 #include <Evas.h>
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
58 typedef struct EwkObject Ewk_Context;
59 
72 };
73 
76 
83  EWK_PROCESS_MODEL_SHARED_SECONDARY,
84  EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
85 };
86 
89 
96  EWK_TLS_ERROR_POLICY_FAIL, // Fail on TLS errors.
97  EWK_TLS_ERROR_POLICY_IGNORE // Ignore TLS errors.
98 };
99 
100 // Creates a type name for the Ewk_TLS_Error_Policy.
102 
107 typedef void (*Ewk_Url_Scheme_Request_Cb) (Ewk_Url_Scheme_Request *request, void *user_data);
108 
113 typedef void (*Ewk_History_Navigation_Cb)(const Evas_Object *view, Ewk_Navigation_Data *navigation_data, void *user_data);
114 
119 typedef void (*Ewk_History_Client_Redirection_Cb)(const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data);
120 
125 typedef void (*Ewk_History_Server_Redirection_Cb)(const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data);
126 
131 typedef void (*Ewk_History_Title_Update_Cb)(const Evas_Object *view, const char *title, const char *url, void *user_data);
132 
139 typedef void (*Ewk_History_Populate_Visited_Links_Cb)(void *user_data);
140 
152 typedef void (*Ewk_Context_Message_From_Injected_Bundle_Cb)(const char *name, const char *body, char **return_data, void *user_data);
153 
163 
174 EAPI Ewk_Context *ewk_context_new(void);
175 
190 EINA_DEPRECATED EAPI Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path);
191 
200 
209 
218 
236 EAPI Eina_Bool ewk_context_favicon_database_directory_set(Ewk_Context *context, const char *directory_path);
237 
246 
255 
297 EAPI Eina_Bool ewk_context_url_scheme_register(Ewk_Context *context, const char *scheme, Ewk_Url_Scheme_Request_Cb callback, void *user_data);
298 
315  Ewk_History_Navigation_Cb navigate_func,
316  Ewk_History_Client_Redirection_Cb client_redirect_func,
317  Ewk_History_Server_Redirection_Cb server_redirect_func,
318  Ewk_History_Title_Update_Cb title_update_func,
319  Ewk_History_Populate_Visited_Links_Cb populate_visited_links_func,
320  void *data);
321 
332 EAPI void ewk_context_visited_link_add(Ewk_Context *context, const char *visited_url);
333 
344 EAPI Eina_Bool ewk_context_cache_model_set(Ewk_Context *context, Ewk_Cache_Model cache_model);
345 
353 EAPI Ewk_Cache_Model ewk_context_cache_model_get(const Ewk_Context *context);
354 
363 EAPI Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path);
364 
372 
382 EINA_DEPRECATED EAPI void ewk_context_message_post_to_injected_bundle(Ewk_Context *context, const char *name, const char *body);
383 
395 EINA_DEPRECATED EAPI void ewk_context_message_from_injected_bundle_callback_set(Ewk_Context *context, Ewk_Context_Message_From_Injected_Bundle_Cb callback, void *user_data);
396 
410 EAPI Eina_Bool ewk_context_process_model_set(Ewk_Context *context, Ewk_Process_Model process_model);
411 
419 EAPI Ewk_Process_Model ewk_context_process_model_get(const Ewk_Context *context);
420 
428 EAPI Ewk_TLS_Error_Policy ewk_context_tls_error_policy_get(const Ewk_Context *context);
429 
438 EAPI void ewk_context_tls_error_policy_set(Ewk_Context *context, Ewk_TLS_Error_Policy tls_error_policy);
439 
451 EAPI void ewk_context_preferred_languages_set(Eina_List *languages);
452 
453 #ifdef __cplusplus
454 }
455 #endif
456 
457 #endif // ewk_context_h