#include "elm_priv.h"
#ifdef ELM_EWEBKIT
+#define SEC_KESSLER
#include <EWebKit.h>
#include <cairo.h>
void (*ewk_view_javascript_resume)(Evas_Object *);
void (*ewk_view_fixed_layout_size_set)(Evas_Object *, Evas_Coord, Evas_Coord);
Eina_Bool (*ewk_view_setting_enable_plugins_get)(const Evas_Object *);
- void (*ewk_view_pause_and_or_hide_plugins)(Evas_Object *, Eina_Bool, Eina_Bool);
+// void (*ewk_view_pause_and_or_hide_plugins)(Evas_Object *, Eina_Bool, Eina_Bool);
+ void (*ewk_view_reduce_plugins_frame_rate)(Evas_Object *, Eina_Bool);
Eina_Bool (*ewk_view_suspend_request)(Evas_Object *);
Eina_Bool (*ewk_view_resume_request)(Evas_Object *);
Eina_Bool (*ewk_view_select_none)(Evas_Object *);
static void _smart_cb_pan_stop(void* data, Evas_Object* webview, void* ev);
static void _smart_cb_select_closest_word(void* data, Evas_Object* webview, void* ev);
static void _smart_cb_unselect_closest_word(void* data, Evas_Object* webview, void* ev);
-static void _suspend_all(Smart_Data *sd, Eina_Bool hidePlugin);
-static void _resume_all(Smart_Data *sd, Eina_Bool hidePlugin);
+static void _suspend_all(Smart_Data *sd, Eina_Bool useReduceRevertPluginsFPS);
+static void _resume_all(Smart_Data *sd, Eina_Bool useReduceRevertPluginsFPS);
static void _zoom_start(Smart_Data* sd, int centerX, int centerY, int distance);
static void _zoom_move(Smart_Data* sd, int centerX, int centerY, int distance);
static void _zoom_stop(Smart_Data* sd);
return EINA_FALSE;
}
else
- return func(esd->self, request->url);
+ return func(esd->self, request->url); //need to check, commented out due to compilation errors
}
#ifdef NEED_TO_REMOVE
#define INPUT_ZOOM_RATIO 2.5
static void
-_suspend_all(Smart_Data *sd, Eina_Bool hidePlugin)
+_suspend_all(Smart_Data *sd, Eina_Bool useReduceRevertPluginsFPS)
{
Evas_Object *webview = sd->base.self;
sd->ewk_view_setting_enable_plugins_get = (Eina_Bool (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_setting_enable_plugins_get");
if (sd->ewk_view_setting_enable_plugins_get(webview))
{
+ /*
if (!sd->ewk_view_pause_and_or_hide_plugins)
sd->ewk_view_pause_and_or_hide_plugins = (void (*)(Evas_Object *, Eina_Bool, Eina_Bool))dlsym(ewk_handle, "ewk_view_pause_and_or_hide_plugins");
sd->ewk_view_pause_and_or_hide_plugins(webview, EINA_FALSE, hidePlugin);
+ */
+ if(useReduceRevertPluginsFPS) {
+ if (!sd->ewk_view_reduce_plugins_frame_rate)
+ sd->ewk_view_reduce_plugins_frame_rate = (void (*)(Evas_Object *, Eina_Bool))dlsym(ewk_handle, "ewk_view_reduce_plugins_frame_rate");
+ sd->ewk_view_reduce_plugins_frame_rate(webview, EINA_TRUE);
+ }
}
// cancel pre-render
}
static void
-_resume_all(Smart_Data *sd, Eina_Bool hidePlugin)
+_resume_all(Smart_Data *sd, Eina_Bool useReduceRevertPluginsFPS)
{
Evas_Object *webview = sd->base.self;
}
// plugin resume
+ /*
if (!sd->ewk_view_pause_and_or_hide_plugins)
sd->ewk_view_pause_and_or_hide_plugins = (void (*)(Evas_Object *, Eina_Bool, Eina_Bool))dlsym(ewk_handle, "ewk_view_pause_and_or_hide_plugins");
sd->ewk_view_pause_and_or_hide_plugins(webview, EINA_FALSE, hidePlugin);
-
+ */
+
+ // plugin reverting fps
+ if(useReduceRevertPluginsFPS) {
+ if (!sd->ewk_view_reduce_plugins_frame_rate)
+ sd->ewk_view_reduce_plugins_frame_rate = (void (*)(Evas_Object *, Eina_Bool))dlsym(ewk_handle, "ewk_view_reduce_plugins_frame_rate");
+ sd->ewk_view_reduce_plugins_frame_rate(webview, EINA_FALSE);
+ }
+
// network resume
if (!sd->ewk_view_resume_request)
sd->ewk_view_resume_request = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_resume_request");
}
DBG("<< zoom set [%f] >>\n", sd->zoom.zooming_rate);
- _resume_all(sd, EINA_FALSE);
+ _resume_all(sd, EINA_TRUE);
if (sd->tiled)
{
_elm_smart_touch_start(sd->touch_obj);
- _resume_all(sd, EINA_FALSE);
+ _resume_all(sd, EINA_TRUE);
if (sd->use_text_selection == EINA_TRUE && sd->text_selection_on == EINA_TRUE)
{