ewk_init = (int (*)())dlsym(ewk_handle, "ewk_init");
ewk_init();
- if (ewk_dnet_open)
+ if (!ewk_dnet_open)
ewk_dnet_open = (void (*)())dlsym(ewk_handle, "ewk_dnet_open");
ewk_dnet_open();
ewk_view_tiled_smart_set(&_parent_sc);
} else {
- if (ewk_view_single_smart_set)
+ if (!ewk_view_single_smart_set)
ewk_view_single_smart_set = (Eina_Bool (*)(Ewk_View_Smart_Class *))dlsym(ewk_handle, "ewk_view_single_smart_set");
ewk_view_single_smart_set(&_api);
if (EINA_UNLIKELY(!_parent_sc.sc.add))
Smart_Data* sd = (Smart_Data *)data;
if (!sd) return;
- if (sd->ewk_frame_view_get)
+ if (!(sd->ewk_frame_view_get))
sd->ewk_frame_view_get = (Evas_Object * (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_frame_view_get");
Evas_Object* webview = sd->ewk_frame_view_get(frame);
if (sd->zoom.min_zoom_rate < MIN_ZOOM_RATIO)
sd->zoom.min_zoom_rate = MIN_ZOOM_RATIO;
- if (sd->ewk_view_zoom_range_set)
+ if (!sd->ewk_view_zoom_range_set)
sd->ewk_view_zoom_range_set = (void (*)(Evas_Object *, float, float))dlsym(ewk_handle, "ewk_view_zoom_range_set");
sd->ewk_view_zoom_range_set(webview, sd->zoom.min_zoom_rate, sd->zoom.max_zoom_rate);
}
evas_object_smart_callback_add(obj, "webview,created", _smart_cb_view_created, sd); // I need to consider more
- if (sd->ewk_view_frame_main_get)
+ if (!(sd->ewk_view_frame_main_get))
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
evas_object_smart_callback_add(sd->ewk_view_frame_main_get(obj), "contents,size,changed",
_smart_contents_size_changed, sd);
if (sd->text_selection_on == EINA_TRUE) return;
evas_object_focus_set(webview, EINA_TRUE);
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_feed_focus_in)
+ if (!sd->ewk_frame_feed_focus_in)
sd->ewk_frame_feed_focus_in = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_frame_feed_focus_in");
sd->ewk_frame_feed_focus_in(sd->ewk_view_frame_main_get(webview));
_parent_sc.mouse_down((Ewk_View_Smart_Data*)sd, &sd->mouse_down_copy);
Eina_Bool have_link = EINA_FALSE;
Eina_Bool have_image = EINA_FALSE;
char *link_url = NULL, *link_text = NULL, *image_url = NULL;
- if (sd->ewk_page_check_point)
+ if (!sd->ewk_page_check_point)
sd->ewk_page_check_point = (Eina_Bool (*)(Evas_Object *, int, int, Evas_Event_Mouse_Down *, Eina_Bool *, Eina_Bool *, char **, char **, char **))dlsym(ewk_handle, "ewk_page_check_point");
sd->ewk_page_check_point(webview, ewk_x, ewk_y, &sd->mouse_down_copy,
&have_link, &have_image, &link_url, &link_text, &image_url);
_unzoom_position(webview, point->x, point->y, &x, &y);
// check for input field
- if (sd->ewk_page_check_point_for_keyboard)
+ if (!sd->ewk_page_check_point_for_keyboard)
sd->ewk_page_check_point_for_keyboard = (char * (*)(Evas_Object *, int, int, Eina_Bool *))dlsym(ewk_handle, "ewk_page_check_point_for_keyboard");
- if (sd->ewk_page_dropdown_get_options)
+ if (!sd->ewk_page_dropdown_get_options)
sd->ewk_page_dropdown_get_options = (char ** (*)(Evas_Object *, int, int, int *, int *))dlsym(ewk_handle, "ewk_page_dropdown_get_options");
Eina_Bool have_input_field;
}
}
printf("<< selected [%d | %s] >>\n", selected_index, selected_label);
- if (sd->ewk_page_dropdown_set_current_index)
+ if (!sd->ewk_page_dropdown_set_current_index)
sd->ewk_page_dropdown_set_current_index = (Eina_Bool (*)(Evas_Object *, int, int, int))dlsym(ewk_handle, "ewk_page_dropdown_set_current_index");
sd->ewk_page_dropdown_set_current_index(webview, x, y, selected_index);
//evas_object_del(obj);
if (sd->tiled)
{
- if (sd->ewk_view_pre_render_cancel)
+ if (!sd->ewk_view_pre_render_cancel)
sd->ewk_view_pre_render_cancel = (void (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_pre_render_cancel");
sd->ewk_view_pre_render_cancel(webview);
}
- if (sd->ewk_view_suspend_request)
+ if (!sd->ewk_view_suspend_request)
sd->ewk_view_suspend_request = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_suspend_request");
sd->ewk_view_suspend_request(webview); // suspend network loading
return;
}
- if (sd->ewk_frame_scroll_pos_get)
+ if (!sd->ewk_frame_scroll_pos_get)
sd->ewk_frame_scroll_pos_get = (Eina_Bool (*)(const Evas_Object *, int *, int *))dlsym(ewk_handle, "ewk_frame_scroll_pos_get");
int dx = sd->pan_s.x - point->x;
int dy = sd->pan_s.y - point->y;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
int old_x, old_y;
sd->ewk_frame_scroll_pos_get(sd->ewk_view_frame_main_get(webview), &old_x, &old_y);
- if (sd->ewk_frame_contents_size_get)
+ if (!sd->ewk_frame_contents_size_get)
sd->ewk_frame_contents_size_get = (Eina_Bool (*)(const Evas_Object *, Evas_Coord *, Evas_Coord *))dlsym(ewk_handle, "ewk_frame_contents_size_get");
int content_w, content_h;
sd->ewk_frame_contents_size_get(sd->ewk_view_frame_main_get(webview), &content_w, &content_h);
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
float zoom = sd->ewk_view_zoom_get(webview);
content_w *= zoom;
if (locked) return;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_scroll_add)
+ if (!sd->ewk_frame_scroll_add)
sd->ewk_frame_scroll_add = (Eina_Bool (*)(Evas_Object *, int, int))dlsym(ewk_handle, "ewk_frame_scroll_add");
sd->ewk_frame_scroll_add(sd->ewk_view_frame_main_get(webview), dx, dy);
if (sd->tiled)
{
- if (sd->ewk_view_tiled_unused_cache_get)
+ if (!sd->ewk_view_tiled_unused_cache_get)
sd->ewk_view_tiled_unused_cache_get = (Ewk_Tile_Unused_Cache *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_tiled_unused_cache_get");
- if (sd->ewk_tile_unused_cache_used_get)
+ if (!sd->ewk_tile_unused_cache_used_get)
sd->ewk_tile_unused_cache_used_get = (size_t (*)(const Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_used_get");
- if (sd->ewk_tile_unused_cache_max_get)
+ if (!sd->ewk_tile_unused_cache_max_get)
sd->ewk_tile_unused_cache_max_get = (size_t (*)(const Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_max_get");
Ewk_Tile_Unused_Cache *tuc = sd->ewk_view_tiled_unused_cache_get(webview);
size_t used = sd->ewk_tile_unused_cache_used_get(tuc);
DBG("[%s] max = %d used = %d \n", __func__, max, used);
if (used > max)
{
- if (sd->ewk_tile_unused_cache_auto_flush)
+ if (!sd->ewk_tile_unused_cache_auto_flush)
sd->ewk_tile_unused_cache_auto_flush = (void (*)(Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_auto_flush");
sd->ewk_tile_unused_cache_auto_flush(tuc);
}
(sd->mouse_down_copy.canvas.x - point->x), (sd->mouse_down_copy.canvas.y - point->y));
}
- if (sd->ewk_view_resume_request)
+ if (!sd->ewk_view_resume_request)
sd->ewk_view_resume_request = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_resume_request");
sd->ewk_view_resume_request(webview); // resume network loading
int x, y;
_coords_evas_to_ewk(webview, point->x, point->y, &x, &y);
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_select_closest_word)
+ if (!sd->ewk_frame_select_closest_word)
sd->ewk_frame_select_closest_word = (Eina_Bool (*)(Evas_Object *, int, int, int *, int *, int *, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_select_closest_word");
int tx, ty, th, bx, by, bh;
Eina_Bool ret = sd->ewk_frame_select_closest_word(sd->ewk_view_frame_main_get(webview), x, y,
if (sd->text_selection_on == EINA_TRUE)
{
_text_selection_hide(sd);
- if (sd->ewk_view_select_none)
+ if (!sd->ewk_view_select_none)
sd->ewk_view_select_none = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_select_none");
sd->ewk_view_select_none(webview);
sd->text_selection_on = EINA_FALSE;
{
Evas_Object *webview = sd->base.self;
- if (sd->ewk_view_disable_render)
+ if (!sd->ewk_view_disable_render)
sd->ewk_view_disable_render = (Eina_Bool (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_disable_render");
sd->ewk_view_disable_render(webview);
- if (sd->ewk_view_setting_enable_plugins_get)
+ if (!sd->ewk_view_setting_enable_plugins_get)
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)
+ 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, EINA_TRUE);
}
if (sd->tiled)
{
- if (sd->ewk_view_pre_render_cancel)
+ if (!sd->ewk_view_pre_render_cancel)
sd->ewk_view_pre_render_cancel = (void (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_pre_render_cancel");
sd->ewk_view_pre_render_cancel(webview);
}
- if (sd->ewk_view_suspend_request)
+ if (!sd->ewk_view_suspend_request)
sd->ewk_view_suspend_request = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_suspend_request");
sd->ewk_view_suspend_request(webview); // suspend network loading
if (sd->tiled)
{
- if (sd->ewk_view_enable_render)
+ if (!sd->ewk_view_enable_render)
sd->ewk_view_enable_render = (Eina_Bool (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_enable_render");
sd->ewk_view_enable_render(webview);
}
- if (sd->ewk_view_pause_and_or_hide_plugins)
+ 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, EINA_TRUE);
- if (sd->ewk_view_resume_request)
+ if (!sd->ewk_view_resume_request)
sd->ewk_view_resume_request = (Eina_Bool (*)(Evas_Object *))dlsym(ewk_handle, "ewk_view_resume_request");
sd->ewk_view_resume_request(webview);
}
sd->zoom.finger_distance = distance;
sd->zoom.zooming_level = 0;
sd->on_zooming = EINA_TRUE;
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
sd->zoom.zoom_rate_at_start = sd->ewk_view_zoom_get(sd->base.self);
sd->zoom.zooming_rate = zoom_ratio;
//printf("new zoom : %f, (%d, %d)\n", zoom_ratio, centerX, centerY);
- if (sd->ewk_view_zoom_weak_set)
+ if (!sd->ewk_view_zoom_weak_set)
sd->ewk_view_zoom_weak_set = (Eina_Bool (*)(Evas_Object *, float, Evas_Coord, Evas_Coord))dlsym(ewk_handle, "ewk_view_zoom_weak_set");
sd->ewk_view_zoom_weak_set(sd->base.self, zoom_ratio, sd->zoom.basis.x, sd->zoom.basis.y);
}
DBG("%s ( %d )\n", __func__, sd->zoom.zooming_level);
if (sd->zoom.zooming_level == 0) return;
- if (sd->ewk_view_zoom_set)
+ if (!sd->ewk_view_zoom_set)
sd->ewk_view_zoom_set = (Eina_Bool (*)(Evas_Object *, float, Evas_Coord, Evas_Coord))dlsym(ewk_handle, "ewk_view_zoom_set");
sd->ewk_view_zoom_set(sd->base.self, sd->zoom.zooming_rate, sd->zoom.basis.x, sd->zoom.basis.y);
if (sd->tiled)
{
- if (sd->ewk_view_tiled_unused_cache_get)
+ if (!sd->ewk_view_tiled_unused_cache_get)
sd->ewk_view_tiled_unused_cache_get = (Ewk_Tile_Unused_Cache *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_tiled_unused_cache_get");
Ewk_Tile_Unused_Cache* ewk_tile_cache = sd->ewk_view_tiled_unused_cache_get(sd->base.self);
- if (sd->ewk_tile_unused_cache_auto_flush)
+ if (!sd->ewk_tile_unused_cache_auto_flush)
sd->ewk_tile_unused_cache_auto_flush = (void (*)(Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_auto_flush");
sd->ewk_tile_unused_cache_auto_flush(ewk_tile_cache);
_directional_pre_render(sd->base.self, 0, 0);
if (sd->text_selection_on == EINA_TRUE)
{
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_selection_handlers_get)
+ if (!sd->ewk_frame_selection_handlers_get)
sd->ewk_frame_selection_handlers_get = (Eina_Bool (*)(Evas_Object *, int *, int *, int *, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_selection_handlers_get");
int tx, ty, th, bx, by, bh;
sd->ewk_frame_selection_handlers_get(sd->ewk_view_frame_main_get(sd->base.self), &tx, &ty, &th, &bx, &by, &bh);
evas_object_geometry_get(obj, &view_x, &view_y, &view_w, &view_h);
// get contentsSize
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_contents_size_get)
+ if (!sd->ewk_frame_contents_size_get)
sd->ewk_frame_contents_size_get = (Eina_Bool (*)(const Evas_Object *, Evas_Coord *, Evas_Coord *))dlsym(ewk_handle, "ewk_frame_contents_size_get");
int contents_w, contents_h;
sd->ewk_frame_contents_size_get(sd->ewk_view_frame_main_get(obj), &contents_w, &contents_h);
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
float current_zoom_rate = sd->ewk_view_zoom_get(obj);
- if (sd->ewk_view_zoom_cairo_scaling_get)
+ if (!sd->ewk_view_zoom_cairo_scaling_get)
sd->ewk_view_zoom_cairo_scaling_get = (Eina_Bool (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_cairo_scaling_get");
if (sd->ewk_view_zoom_cairo_scaling_get(obj))
{
{
Smart_Data* sd = (Smart_Data*)data;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
// stop
if (smart_zoom_index < 0)
{
- if (sd->ewk_view_zoom_set)
+ if (!sd->ewk_view_zoom_set)
sd->ewk_view_zoom_set = (Eina_Bool (*)(Evas_Object *, float, Evas_Coord, Evas_Coord))dlsym(ewk_handle, "ewk_view_zoom_set");
sd->ewk_view_zoom_set(sd->base.self, sd->zoom.zoom_rate_to_set,
sd->zoom.basis.x, sd->zoom.basis.y);
if (sd->text_selection_on == EINA_TRUE)
{
- if (sd->ewk_frame_selection_handlers_get)
+ if (!sd->ewk_frame_selection_handlers_get)
sd->ewk_frame_selection_handlers_get = (Eina_Bool (*)(Evas_Object *, int *, int *, int *, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_selection_handlers_get");
int tx, ty, th, bx, by, bh;
sd->ewk_frame_selection_handlers_get(sd->ewk_view_frame_main_get(sd->base.self),
// weak zoom
float zoom_rate = sd->zoom.zoom_rate_at_start
+ ((sd->zoom.zoom_rate_to_set - sd->zoom.zoom_rate_at_start) * cosine[smart_zoom_index]);
- if (sd->ewk_view_zoom_weak_set)
+ if (!sd->ewk_view_zoom_weak_set)
sd->ewk_view_zoom_weak_set = (Eina_Bool (*)(Evas_Object *, float, Evas_Coord, Evas_Coord))dlsym(ewk_handle, "ewk_view_zoom_weak_set");
sd->ewk_view_zoom_weak_set(sd->base.self, zoom_rate, sd->zoom.basis.x, sd->zoom.basis.y);
} else {
- if (sd->ewk_frame_scroll_pos_get)
+ if (!sd->ewk_frame_scroll_pos_get)
sd->ewk_frame_scroll_pos_get = (Eina_Bool (*)(const Evas_Object *, int *, int *))dlsym(ewk_handle, "ewk_frame_scroll_pos_get");
// save old scroll positions
int current_scroll_x, current_scroll_y;
int to_set_y = sd->zoom.scroll_at_start.y
+ (sd->zoom.scroll_to_set.y - sd->zoom.scroll_at_start.y) * cosine[smart_zoom_index];
- if (sd->ewk_frame_scroll_add)
+ if (!sd->ewk_frame_scroll_add)
sd->ewk_frame_scroll_add = (Eina_Bool (*)(Evas_Object *, int, int))dlsym(ewk_handle, "ewk_frame_scroll_add");
// scroll
sd->ewk_frame_scroll_add(sd->ewk_view_frame_main_get(sd->base.self),
if (sd->tiled)
{
- if (sd->ewk_view_tiled_unused_cache_get)
+ if (!sd->ewk_view_tiled_unused_cache_get)
sd->ewk_view_tiled_unused_cache_get = (Ewk_Tile_Unused_Cache *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_tiled_unused_cache_get");
Ewk_Tile_Unused_Cache *tuc = sd->ewk_view_tiled_unused_cache_get(webview);
- if (sd->ewk_tile_unused_cache_used_get)
+ if (!sd->ewk_tile_unused_cache_used_get)
sd->ewk_tile_unused_cache_used_get = (size_t (*)(const Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_used_get");
size_t used = sd->ewk_tile_unused_cache_used_get(tuc);
- if (sd->ewk_tile_unused_cache_max_get)
+ if (!sd->ewk_tile_unused_cache_max_get)
sd->ewk_tile_unused_cache_max_get = (size_t (*)(const Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_max_get");
size_t max = sd->ewk_tile_unused_cache_max_get(tuc);
DBG("[%s] max = %d used = %d \n", __func__, max, used);
if (used > max)
{
- if (sd->ewk_tile_unused_cache_auto_flush)
+ if (!sd->ewk_tile_unused_cache_auto_flush)
sd->ewk_tile_unused_cache_auto_flush = (void (*)(Ewk_Tile_Unused_Cache *))dlsym(ewk_handle, "ewk_tile_unused_cache_auto_flush");
sd->ewk_tile_unused_cache_auto_flush(tuc);
}
if (!sd) return;
Evas_Point* point = (Evas_Point*)event_info;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
// feed double tap
{
Evas_Event_Mouse_Down mouse_double_down = sd->mouse_down_copy;
mouse_double_down.flags |= EVAS_BUTTON_DOUBLE_CLICK;
- if (sd->ewk_frame_feed_mouse_down)
+ if (!sd->ewk_frame_feed_mouse_down)
sd->ewk_frame_feed_mouse_down = (Eina_Bool (*)(Evas_Object *, const Evas_Event_Mouse_Down *))dlsym(ewk_handle, "ewk_frame_feed_mouse_down");
- if (sd->ewk_frame_feed_mouse_up)
+ if (!sd->ewk_frame_feed_mouse_up)
sd->ewk_frame_feed_mouse_up = (Eina_Bool (*)(Evas_Object *, const Evas_Event_Mouse_Up *))dlsym(ewk_handle, "ewk_frame_feed_mouse_up");
sd->ewk_frame_feed_mouse_down(sd->ewk_view_frame_main_get(sd->base.self), &mouse_double_down);
sd->ewk_frame_feed_mouse_up(sd->ewk_view_frame_main_get(sd->base.self), &sd->mouse_up_copy);
int ewk_x = 0, ewk_y = 0;
Eina_Rectangle rect;
_coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
- if (sd->ewk_view_get_smart_zoom_rect)
+ if (!sd->ewk_view_get_smart_zoom_rect)
sd->ewk_view_get_smart_zoom_rect = (Eina_Bool (*)(Evas_Object *, int, int, const Evas_Event_Mouse_Up *, Eina_Rectangle *))dlsym(ewk_handle, "ewk_view_get_smart_zoom_rect");
sd->ewk_view_get_smart_zoom_rect(webview, ewk_x, ewk_y, &sd->mouse_up_copy, &rect);
// calculate zoom_rate and center of rect
int view_x, view_y, view_w, view_h;
evas_object_geometry_get(webview, &view_x, &view_y, &view_w, &view_h);
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
float current_zoom_rate = sd->ewk_view_zoom_get(webview);
float zoom_rate;
DBG("%s\n", __func__);
Evas_Object *webview = sd->base.self;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
// performing a hit test
_coords_evas_to_ewk(webview, x, y, &x, &y);
- if (sd->ewk_frame_hit_test_new)
+ if (!sd->ewk_frame_hit_test_new)
sd->ewk_frame_hit_test_new = (Ewk_Hit_Test * (*)(const Evas_Object *, int, int))dlsym(ewk_handle, "ewk_frame_hit_test_new");
Ewk_Hit_Test *hit_test = sd->ewk_frame_hit_test_new(sd->ewk_view_frame_main_get(webview), x, y);
{
// set zooming data
float zoom_rate = INPUT_ZOOM_RATIO;
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
float current_zoom_rate = sd->ewk_view_zoom_get(webview);
float zoom_step = zoom_rate / current_zoom_rate;
sd->zoom.basis.y = (to_y - zoom_step * from_y) / (1 - zoom_step) - view_y;
sd->zoom.zoom_rate_at_start = current_zoom_rate;
sd->zoom.zoom_rate_to_set = zoom_rate;
- if (sd->ewk_frame_scroll_pos_get)
+ if (!sd->ewk_frame_scroll_pos_get)
sd->ewk_frame_scroll_pos_get = (Eina_Bool (*)(const Evas_Object *, int *, int *))dlsym(ewk_handle, "ewk_frame_scroll_pos_get");
sd->ewk_frame_scroll_pos_get(sd->ewk_view_frame_main_get(webview),
&sd->zoom.scroll_at_start.x, &sd->zoom.scroll_at_start.y);
sd->smart_zoom_animator = ecore_animator_add(_smart_zoom_animator, sd);
}
- if (sd->ewk_frame_hit_test_free)
+ if (!sd->ewk_frame_hit_test_free)
sd->ewk_frame_hit_test_free = (void (*)(Ewk_Hit_Test *))dlsym(ewk_handle, "ewk_frame_hit_test_free");
sd->ewk_frame_hit_test_free(hit_test);
}
Evas_Coord_Rectangle* front = &(sd->text_selection.front);
Evas_Coord_Rectangle* back = &(sd->text_selection.back);
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
// set selected region with front handle
if (y > back->y)
y = back->y - back->h / 2;
- if (sd->ewk_frame_selection_left_set)
+ if (!sd->ewk_frame_selection_left_set)
sd->ewk_frame_selection_left_set = (Eina_Bool (*)(Evas_Object *, int, int, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_selection_left_set");
int ewkX, ewkY;
_coords_evas_to_ewk(webview, x, y, &ewkX, &ewkY);
if (y < front->y)
y = front->y + front->h / 2;
- if (sd->ewk_frame_selection_right_set)
+ if (!sd->ewk_frame_selection_right_set)
sd->ewk_frame_selection_right_set = (Eina_Bool (*)(Evas_Object *, int, int, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_selection_right_set");
int ewkX, ewkY;
_coords_evas_to_ewk(webview, x, y, &ewkX, &ewkY);
cairo_surface_t* dest;
cairo_status_t status;
- if (sd->cairo_surface_status)
+ if (!sd->cairo_surface_status)
sd->cairo_surface_status = (cairo_status_t (*)(cairo_surface_t *))dlsym(cairo_handle, "cairo_surface_status");
- if (sd->cairo_image_surface_create_for_data)
+ if (!sd->cairo_image_surface_create_for_data)
sd->cairo_image_surface_create_for_data = (cairo_surface_t * (*)(unsigned char *, cairo_format_t, int, int, int))dlsym(cairo_handle, "cairo_image_surface_create_for_data");
//TODO: check which one is faster
goto error_cairo_surface;
}
- if (sd->cairo_create)
+ if (!sd->cairo_create)
sd->cairo_create = (cairo_t * (*)(cairo_surface_t *))dlsym(cairo_handle, "cairo_create");
cr = sd->cairo_create(dest);
status = sd->cairo_surface_status(dest);
goto error_cairo;
}
- if (sd->cairo_set_source_surface)
+ if (!sd->cairo_set_source_surface)
sd->cairo_set_source_surface = (void (*)(cairo_t *, cairo_surface_t *, double, double))dlsym(cairo_handle, "cairo_set_source_surface");
- if (sd->cairo_paint)
+ if (!sd->cairo_paint)
sd->cairo_paint = (void (*)(cairo_t *))dlsym(cairo_handle, "cairo_paint");
- if (sd->cairo_set_source_rgb)
+ if (!sd->cairo_set_source_rgb)
sd->cairo_set_source_rgb = (void (*)(cairo_t *, double, double, double))dlsym(cairo_handle, "cairo_set_source_rgb");
- if (sd->cairo_rectangle)
+ if (!sd->cairo_rectangle)
sd->cairo_rectangle = (void (*)(cairo_t *, double, double, double, double))dlsym(cairo_handle, "cairo_rectangle");
- if (sd->cairo_set_line_width)
+ if (!sd->cairo_set_line_width)
sd->cairo_set_line_width = (void (*)(cairo_t *, double))dlsym(cairo_handle, "cairo_set_line_width");
- if (sd->cairo_stroke)
+ if (!sd->cairo_stroke)
sd->cairo_stroke = (void (*)(cairo_t *cr))dlsym(cairo_handle, "cairo_stroke");
- if (sd->cairo_set_antialias)
+ if (!sd->cairo_set_antialias)
sd->cairo_set_antialias = (void (*)(cairo_t *, cairo_antialias_t))dlsym(cairo_handle, "cairo_set_antialias");
sd->cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
visibleRect->x, visibleRect->y, visibleRect->w, visibleRect->h);
sd->cairo_stroke(cr);
- if (sd->cairo_destroy)
+ if (!sd->cairo_destroy)
sd->cairo_destroy = (void (*)(cairo_t *))dlsym(cairo_handle, "cairo_destroy");
sd->cairo_destroy(cr);
error_cairo:
- if (sd->cairo_surface_destroy)
+ if (!sd->cairo_surface_destroy)
sd->cairo_surface_destroy = (void (*)(cairo_surface_t *))dlsym(cairo_handle, "cairo_surface_destroy");
sd->cairo_surface_destroy(dest);
error_cairo_surface:
if (minimap == NULL || src == NULL) return;
Evas_Object *webview = sd->base.self;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_contents_size_get)
+ if (!sd->ewk_frame_contents_size_get)
sd->ewk_frame_contents_size_get = (Eina_Bool (*)(const Evas_Object *, Evas_Coord *, Evas_Coord *))dlsym(ewk_handle, "ewk_frame_contents_size_get");
int cw, ch;
sd->ewk_frame_contents_size_get(sd->ewk_view_frame_main_get(webview), &cw, &ch);
if (cw == 0 || ch == 0) return;
- if (sd->ewk_frame_visible_content_geometry_get)
+ if (!sd->ewk_frame_visible_content_geometry_get)
sd->ewk_frame_visible_content_geometry_get = (Eina_Bool (*)(const Evas_Object *, Eina_Bool, int *, int *, int *, int *))dlsym(ewk_handle, "ewk_frame_visible_content_geometry_get");
int x, y, w, h;
sd->ewk_frame_visible_content_geometry_get(
Evas_Object *webview = sd->base.self;
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, NULL);
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_contents_size_get)
+ if (!sd->ewk_frame_contents_size_get)
sd->ewk_frame_contents_size_get = (Eina_Bool (*)(const Evas_Object *, Evas_Coord *, Evas_Coord *))dlsym(ewk_handle, "ewk_frame_contents_size_get");
int w, h;
sd->ewk_frame_contents_size_get(sd->ewk_view_frame_main_get(webview), &w, &h);
}
printf(" minimap w,h : (%d, %d)\n", *minimap_w, *minimap_h);
- if (sd->ewk_view_paint_contents)
+ if (!sd->ewk_view_paint_contents)
sd->ewk_view_paint_contents = (Eina_Bool (*)(Ewk_View_Private_Data *, cairo_t *, const Eina_Rectangle *))dlsym(ewk_handle, "ewk_view_paint_contents");
- if (sd->cairo_image_surface_create)
+ if (!sd->cairo_image_surface_create)
sd->cairo_image_surface_create = (cairo_surface_t * (*)(cairo_format_t, int, int))dlsym(cairo_handle, "cairo_image_surface_create");
- if (sd->cairo_create)
+ if (!sd->cairo_create)
sd->cairo_create = (cairo_t * (*)(cairo_surface_t *))dlsym(cairo_handle, "cairo_create");
- if (sd->cairo_destroy)
+ if (!sd->cairo_destroy)
sd->cairo_destroy = (void (*)(cairo_t *))dlsym(cairo_handle, "cairo_destroy");
- if (sd->cairo_scale)
+ if (!sd->cairo_scale)
sd->cairo_scale = (void (*)(cairo_t *, double, double))dlsym(cairo_handle, "cairo_scale");
- if (sd->cairo_surface_write_to_png)
+ if (!sd->cairo_surface_write_to_png)
sd->cairo_surface_write_to_png = (cairo_status_t (*)(cairo_surface_t *, const char *))dlsym(cairo_handle, "cairo_surface_write_to_png");
- if (sd->cairo_set_antialias)
+ if (!sd->cairo_set_antialias)
sd->cairo_set_antialias = (void (*)(cairo_t *, cairo_antialias_t))dlsym(cairo_handle, "cairo_set_antialias");
cairo_surface_t* ret = sd->cairo_image_surface_create(CAIRO_FORMAT_RGB24, *minimap_w, *minimap_h);
int viewY;
evas_object_geometry_get(obj, NULL, &viewY, NULL, NULL);
- if (sd->ewk_view_zoom_get)
+ if (!sd->ewk_view_zoom_get)
sd->ewk_view_zoom_get = (float (*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_zoom_get");
float zoomRatio = sd->ewk_view_zoom_get(obj);
if (zoomRatio)
{
INTERNAL_ENTRY;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_scroll_pos_get)
+ if (!sd->ewk_frame_scroll_pos_get)
sd->ewk_frame_scroll_pos_get = (Eina_Bool (*)(const Evas_Object *, int *, int *))dlsym(ewk_handle, "ewk_frame_scroll_pos_get");
int scrollX, scrollY, viewY;
{
INTERNAL_ENTRY;
- if (sd->ewk_view_frame_main_get)
+ if (!sd->ewk_view_frame_main_get)
sd->ewk_view_frame_main_get = (Evas_Object *(*)(const Evas_Object *))dlsym(ewk_handle, "ewk_view_frame_main_get");
- if (sd->ewk_frame_scroll_pos_get)
+ if (!sd->ewk_frame_scroll_pos_get)
sd->ewk_frame_scroll_pos_get = (Eina_Bool (*)(const Evas_Object *, int *, int *))dlsym(ewk_handle, "ewk_frame_scroll_pos_get");
int scrollX, scrollY, viewY;