diff options
Diffstat (limited to 'Source/WebKit/efl/ewk')
-rw-r--r-- | Source/WebKit/efl/ewk/EWebKit.h | 7 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_contextmenu.h | 10 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_eapi.h | 9 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_history.h | 3 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_logging.h | 5 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_main.cpp | 22 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_main.h | 5 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_private.h | 5 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_settings.cpp | 41 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_settings.h | 4 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_util.cpp | 7 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_util.h | 5 | ||||
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_view.cpp | 2 |
13 files changed, 123 insertions, 2 deletions
diff --git a/Source/WebKit/efl/ewk/EWebKit.h b/Source/WebKit/efl/ewk/EWebKit.h index 183e9dc..6d741e9 100644 --- a/Source/WebKit/efl/ewk/EWebKit.h +++ b/Source/WebKit/efl/ewk/EWebKit.h @@ -19,6 +19,13 @@ Boston, MA 02110-1301, USA. */ +/** + * @file EWebKit.h + * @brief Contains the header files that are required by WebKit-EFL. + * + * It includes the all header files that are exported to public API and Evas header. + */ + #ifndef EWebKit_h #define EWebKit_h diff --git a/Source/WebKit/efl/ewk/ewk_contextmenu.h b/Source/WebKit/efl/ewk/ewk_contextmenu.h index 7b60410..d9e3e83 100644 --- a/Source/WebKit/efl/ewk/ewk_contextmenu.h +++ b/Source/WebKit/efl/ewk/ewk_contextmenu.h @@ -98,11 +98,21 @@ enum _Ewk_Context_Menu_Action { EWK_CONTEXT_MENU_ITEM_TAG_RIGHT_TO_LEFT, EWK_CONTEXT_MENU_ITEM_TAG_PDFSINGLE_PAGE_SCROLLING, EWK_CONTEXT_MENU_ITEM_TAG_PDFFACING_PAGES_SCROLLING, + // EWK_CONTEXT_MENU_ITEM_TAG_INSPECT_ELEMENT, /**< This feature is disabled in WebKit-EFL - it is a subject to INSPECTOR build variable */ EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_MENU, /**< text direction sub-menu */ EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_DEFAULT, EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_LEFT_TO_RIGHT, EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_RIGHT_TO_LEFT, + EWK_CONTEXT_MENU_ITEM_OPEN_MEDIA_IN_NEW_WINDOW, + EWK_CONTEXT_MENU_ITEM_TAG_COPY_MEDIA_LINK_TO_CLIPBOARD, + EWK_CONTEXT_MENU_ITEM_TAG_TOGGLE_MEDIA_CONTROLS, + EWK_CONTEXT_MENU_ITEM_TAG_TOGGLE_MEDIA_LOOP, + EWK_CONTEXT_MENU_ITEM_TAG_ENTER_VIDEO_FULLSCREEN, + EWK_CONTEXT_MENU_ITEM_TAG_MEDIA_PLAY_PAUSE, + EWK_CONTEXT_MENU_ITEM_TAG_MEDIA_MUTE, EWK_CONTEXT_MENU_ITEM_BASE_CUSTOM_TAG = 5000, + EWK_CONTEXT_MENU_ITEM_CUSTOM_TAG_NO_ACTION = 5998, + EWK_CONTEXT_MENU_ITEM_LAST_CUSTOM_TAG = 5999, EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG = 10000 }; /** Creates a type name for _Ewk_Context_Menu_Action */ diff --git a/Source/WebKit/efl/ewk/ewk_eapi.h b/Source/WebKit/efl/ewk/ewk_eapi.h index adb8d7b..11f4371 100644 --- a/Source/WebKit/efl/ewk/ewk_eapi.h +++ b/Source/WebKit/efl/ewk/ewk_eapi.h @@ -18,6 +18,15 @@ Boston, MA 02110-1301, USA. */ +/** + * @file ewk_eapi.h + * @brief Defines EAPI macro. + * + * The macro must be used in declaration of public functions. + * Functions without EAPI macro have hidden most of symbols and + * they are not visible for target applications. + */ + #ifndef ewk_eapi_h #define ewk_eapi_h diff --git a/Source/WebKit/efl/ewk/ewk_history.h b/Source/WebKit/efl/ewk/ewk_history.h index 3943d7e..3cae74e 100644 --- a/Source/WebKit/efl/ewk/ewk_history.h +++ b/Source/WebKit/efl/ewk/ewk_history.h @@ -32,7 +32,8 @@ extern "C" { #endif /** - * The history (back-forward list) associated with a given ewk_view. + * @file ewk_history.h + * @brief The history (back-forward list) associated with a given ewk_view. * * Changing the history affects immediately the view, changing the * current uri, for example. diff --git a/Source/WebKit/efl/ewk/ewk_logging.h b/Source/WebKit/efl/ewk/ewk_logging.h index 045bd9c..f8a7f41 100644 --- a/Source/WebKit/efl/ewk/ewk_logging.h +++ b/Source/WebKit/efl/ewk/ewk_logging.h @@ -18,6 +18,11 @@ Boston, MA 02110-1301, USA. */ +/** + * @file ewk_logging.h + * @brief Provides macros for logging. + */ + #ifndef ewk_logging_h #define ewk_logging_h diff --git a/Source/WebKit/efl/ewk/ewk_main.cpp b/Source/WebKit/efl/ewk/ewk_main.cpp index 0c7cc70..9687f10 100644 --- a/Source/WebKit/efl/ewk/ewk_main.cpp +++ b/Source/WebKit/efl/ewk/ewk_main.cpp @@ -56,10 +56,25 @@ #endif static int _ewk_init_count = 0; + +/** + * \var _ewk_log_dom + * @brief the log domain identifier that is used with EINA's macros + */ int _ewk_log_dom = -1; static Eina_Bool _ewk_init_body(void); +/** + * Initializes webkit's instance. + * + * - initializes components needed by Efl, + * - sets web database location, + * - sets page cache capacity, + * - increases a reference count of webkit's instance. + * + * @return a reference count of webkit's instance on success or 0 on failure + */ int ewk_init(void) { if (_ewk_init_count) @@ -113,6 +128,13 @@ error_eina: return 0; } +/** + * Decreases a reference count of webkit's instance, possibly destroying it. + * + * If the reference count reaches 0 webkit's instance is destroyed. + * + * @return a reference count of webkit's instance + */ int ewk_shutdown(void) { _ewk_init_count--; diff --git a/Source/WebKit/efl/ewk/ewk_main.h b/Source/WebKit/efl/ewk/ewk_main.h index 3730e88..257babc 100644 --- a/Source/WebKit/efl/ewk/ewk_main.h +++ b/Source/WebKit/efl/ewk/ewk_main.h @@ -18,6 +18,11 @@ Boston, MA 02110-1301, USA. */ +/** + * @file ewk_main.h + * @brief The main file of WebKit-EFL, not tied to any view object. + */ + #ifndef ewk_main_h #define ewk_main_h diff --git a/Source/WebKit/efl/ewk/ewk_private.h b/Source/WebKit/efl/ewk/ewk_private.h index 114c39e..c3de98a 100644 --- a/Source/WebKit/efl/ewk/ewk_private.h +++ b/Source/WebKit/efl/ewk/ewk_private.h @@ -18,6 +18,11 @@ Boston, MA 02110-1301, USA. */ +/** + * @file ewk_private.h + * @brief Private methods of WebKit-EFL. + */ + #ifndef ewk_private_h #define ewk_private_h diff --git a/Source/WebKit/efl/ewk/ewk_settings.cpp b/Source/WebKit/efl/ewk/ewk_settings.cpp index 3a185d9..16abdc7 100644 --- a/Source/WebKit/efl/ewk/ewk_settings.cpp +++ b/Source/WebKit/efl/ewk/ewk_settings.cpp @@ -29,6 +29,7 @@ #include "Image.h" #include "IntSize.h" #include "KURL.h" +#include "MemoryCache.h" #include "ewk_private.h" #include <Eina.h> @@ -326,6 +327,46 @@ const char* ewk_settings_proxy_uri_get(void) } /** + * Gets status of the memory cache of WebCore. + * + * @return @c EINA_TRUE if the cache is enabled or @c EINA_FALSE if not + */ +Eina_Bool ewk_settings_cache_enable_get(void) +{ + WebCore::MemoryCache* cache = WebCore::memoryCache(); + return !cache->disabled(); +} + +/** + * Enables/disables the memory cache of WebCore, possibly clearing it. + * + * Disabling the cache will remove all resources from the cache. + * They may still live on if they are referenced by some Web page though. + * + * @param set @c EINA_TRUE to enable memory cache, @c EINA_FALSE to disable + */ +void ewk_settings_cache_enable_set(Eina_Bool set) +{ + WebCore::MemoryCache* cache = WebCore::memoryCache(); + set = !set; + if (cache->disabled() != set) + cache->setDisabled(set); +} + +/** + * Sets capacity of memory cache of WebCore. + * + * WebCore sets default value of memory cache on 8192 * 1024 bytes. + * + * @param capacity the maximum number of bytes that the cache should consume overall + */ +void ewk_settings_cache_capacity_set(unsigned capacity) +{ + WebCore::MemoryCache* cache = WebCore::memoryCache(); + cache->setCapacities(0, capacity, capacity); +} + +/** * @internal * * Gets the default user agent string. diff --git a/Source/WebKit/efl/ewk/ewk_settings.h b/Source/WebKit/efl/ewk/ewk_settings.h index 3e5ca47..0bbdb48 100644 --- a/Source/WebKit/efl/ewk/ewk_settings.h +++ b/Source/WebKit/efl/ewk/ewk_settings.h @@ -54,6 +54,10 @@ EAPI const char *ewk_settings_cache_directory_path_get(void); EAPI void ewk_settings_proxy_uri_set(const char* proxy); EAPI const char* ewk_settings_proxy_uri_get(void); +EAPI Eina_Bool ewk_settings_cache_enable_get(void); +EAPI void ewk_settings_cache_enable_set(Eina_Bool set); +EAPI void ewk_settings_cache_capacity_set(unsigned capacity); + #ifdef __cplusplus } #endif diff --git a/Source/WebKit/efl/ewk/ewk_util.cpp b/Source/WebKit/efl/ewk/ewk_util.cpp index 6830f76..b01be72 100644 --- a/Source/WebKit/efl/ewk/ewk_util.cpp +++ b/Source/WebKit/efl/ewk/ewk_util.cpp @@ -24,6 +24,13 @@ #include "ewk_private.h" #include <eina_safety_checks.h> +/** + * Converts an image from cairo_surface to the Evas_Object. + * + * @param canvas display canvas + * @param surface cairo representation of an image + * @return converted cairo_surface object to the Evas_Object + */ Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t* surface) { cairo_status_t status; diff --git a/Source/WebKit/efl/ewk/ewk_util.h b/Source/WebKit/efl/ewk/ewk_util.h index d9c8f9c..2371888 100644 --- a/Source/WebKit/efl/ewk/ewk_util.h +++ b/Source/WebKit/efl/ewk/ewk_util.h @@ -18,6 +18,11 @@ Boston, MA 02110-1301, USA. */ +/** + * @file ewk_util.h + * @brief Helpfull methods for WebKit-EFL. + */ + #ifndef ewk_util_h #define ewk_util_h diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp index 8a3b04d..a6749de 100644 --- a/Source/WebKit/efl/ewk/ewk_view.cpp +++ b/Source/WebKit/efl/ewk/ewk_view.cpp @@ -1010,7 +1010,7 @@ static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(Evas_Ob EWK_VIEW_PRIV_GET(sd, priv); int desktop_width = 980; - int device_dpi = 160; + int device_dpi = ewk_view_dpi_get(); int available_width = (int) priv->page->chrome()->client()->pageRect().width(); int available_height = (int) priv->page->chrome()->client()->pageRect().height(); |