seoz pushed a commit to branch master.
commit 2b25732ad24a68a309f60d702087bab673e3576c
Author: Daniel Juyung Seo <[email protected]>
Date: Fri May 24 00:58:38 2013 +0900
elm: more ELM_FREE_FUNC cleanups.
---
src/lib/elm_box.c | 12 +--
src/lib/elm_cnp.c | 7 +-
src/lib/elm_flip.c | 6 +-
src/lib/elm_gengrid.c | 5 +-
src/lib/elm_genlist.c | 29 ++------
src/lib/elm_interface_scrollable.c | 146 ++++++++++---------------------------
src/lib/elm_transit.c | 6 +-
src/lib/elm_web.c | 15 +---
src/lib/elu_ews_wm.c | 30 ++------
9 files changed, 63 insertions(+), 193 deletions(-)
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index 165a62d..aaa689a 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -360,11 +360,7 @@ _transition_layout_animation_stop(Elm_Box_Transition
*layout_data)
{
layout_data->animation_ended = EINA_TRUE;
- if (layout_data->animator)
- {
- ecore_animator_del(layout_data->animator);
- layout_data->animator = NULL;
- }
+ ELM_FREE_FUNC(layout_data->animator, ecore_animator_del);
if (layout_data->transition_end_cb)
layout_data->transition_end_cb(layout_data->transition_end_data);
@@ -791,11 +787,7 @@ elm_box_transition_free(void *data)
(box_data->box, SIG_CHILD_ADDED, _transition_layout_child_added);
evas_object_smart_callback_del
(box_data->box, SIG_CHILD_REMOVED, _transition_layout_child_removed);
- if (box_data->animator)
- {
- ecore_animator_del(box_data->animator);
- box_data->animator = NULL;
- }
+ ELM_FREE_FUNC(box_data->animator, ecore_animator_del);
free(data);
}
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 2373681..5ebed74 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2879,12 +2879,7 @@ _anim_st_free(Item_Container_Drag_Info *st)
{ /* Stops and free mem of ongoing animation */
if (st)
{
- if (st->ea)
- {
- ecore_animator_del(st->ea);
- st->ea = NULL;
- }
-
+ ELM_FREE_FUNC(st->ea, ecore_animator_del);
Anim_Icon *sti;
EINA_LIST_FREE(st->icons, sti)
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index e137770..676e9f6 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -1552,11 +1552,7 @@ _down_cb(void *data,
if (ev->button != 1) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (sd->animator)
- {
- ecore_animator_del(sd->animator);
- sd->animator = NULL;
- }
+ ELM_FREE_FUNC(sd->animator, ecore_animator_del);
sd->down = EINA_TRUE;
sd->started = EINA_FALSE;
evas_object_geometry_get(data, &x, &y, &w, &h);
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 8eb4994..d1ef078 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -1240,9 +1240,8 @@ _item_place(Elm_Gen_Item *it,
}
else if (item->item_reorder_move_animator)
{
- ecore_animator_del
- (item->item_reorder_move_animator);
- item->item_reorder_move_animator = NULL;
+ ELM_FREE_FUNC(item->item_reorder_move_animator,
+ ecore_animator_del);
item->moving = EINA_FALSE;
}
}
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 8b7e4e9..420347c 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3066,8 +3066,7 @@ _item_del(Elm_Gen_Item *it)
if (sd->tree_effect_animator)
{
_item_tree_effect_finish(sd);
- ecore_animator_del(sd->tree_effect_animator);
- sd->tree_effect_animator = NULL;
+ ELM_FREE_FUNC(sd->tree_effect_animator, ecore_animator_del);
}
sd->expanded_item = NULL;
sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_NONE;
@@ -4966,22 +4965,10 @@ static void
_clear(Elm_Genlist_Smart_Data *sd)
{
sd->anchor_item = NULL;
- if (sd->queue_idle_enterer)
- {
- ecore_idle_enterer_del(sd->queue_idle_enterer);
- sd->queue_idle_enterer = NULL;
- }
- if (sd->must_recalc_idler)
- {
- ecore_idler_del(sd->must_recalc_idler);
- sd->must_recalc_idler = NULL;
- }
- if (sd->queue) sd->queue = eina_list_free(sd->queue);
- if (sd->reorder_move_animator)
- {
- ecore_animator_del(sd->reorder_move_animator);
- sd->reorder_move_animator = NULL;
- }
+ ELM_FREE_FUNC(sd->queue_idle_enterer, ecore_idle_enterer_del);
+ ELM_FREE_FUNC(sd->must_recalc_idler, ecore_idler_del);
+ ELM_FREE_FUNC(sd->queue, eina_list_free);
+ ELM_FREE_FUNC(sd->reorder_move_animator, ecore_animator_del);
sd->show_item = NULL;
sd->reorder_old_pan_y = 0;
}
@@ -7004,11 +6991,7 @@ _decorate_mode_set(Eo *obj, void *_pd, va_list *valist)
if (sd->decorate_all_mode == decorated) return;
sd->decorate_all_mode = decorated;
- if (sd->tree_effect_animator)
- {
- ecore_animator_del(sd->tree_effect_animator);
- sd->tree_effect_animator = NULL;
- }
+ ELM_FREE_FUNC(sd->tree_effect_animator, ecore_animator_del);
sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_NONE;
list = elm_genlist_realized_items_get(obj);
diff --git a/src/lib/elm_interface_scrollable.c
b/src/lib/elm_interface_scrollable.c
index 021bc9a..0c0b871 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -1298,8 +1298,7 @@
_elm_scroll_momentum_end(Elm_Scrollable_Smart_Interface_Data *sid)
eo_do(sid->obj, elm_scrollable_interface_content_pos_get(&px, &py));
_elm_scroll_wanted_coordinates_update(sid, px, py);
- ecore_animator_del(sid->down.momentum_animator);
- sid->down.momentum_animator = NULL;
+ ELM_FREE_FUNC(sid->down.momentum_animator, ecore_animator_del);
sid->down.bounce_x_hold = EINA_FALSE;
sid->down.bounce_y_hold = EINA_FALSE;
sid->down.ax = 0;
@@ -1438,15 +1437,13 @@
_elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid)
if (sid->down.now) return; // down bounce while still held down
if (sid->down.onhold_animator)
{
- ecore_animator_del(sid->down.onhold_animator);
- sid->down.onhold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.hold_animator)
{
- ecore_animator_del(sid->down.hold_animator);
- sid->down.hold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -1468,11 +1465,7 @@
_elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid)
{
if (sid->bouncemex)
{
- if (sid->scrollto.x.animator)
- {
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
sid->down.bounce_x_animator =
ecore_animator_add(_elm_scroll_bounce_x_animator,
sid->obj);
sid->down.anim_start2 = ecore_loop_time_get();
@@ -1492,11 +1485,7 @@
_elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid)
{
if (sid->bouncemey)
{
- if (sid->scrollto.y.animator)
- {
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
sid->down.bounce_y_animator =
ecore_animator_add(_elm_scroll_bounce_y_animator,
sid->obj);
sid->down.anim_start3 = ecore_loop_time_get();
@@ -1755,44 +1744,32 @@ _elm_scroll_content_region_show_internal(Evas_Object
*obj,
{
_elm_scroll_anim_stop(sid);
}
- if (sid->scrollto.x.animator)
- {
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
- }
- if (sid->scrollto.y.animator)
- {
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
if (sid->down.bounce_x_animator)
{
- ecore_animator_del(sid->down.bounce_x_animator);
- sid->down.bounce_x_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_x_animator, ecore_animator_del);
sid->bouncemex = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.bounce_y_animator)
{
- ecore_animator_del(sid->down.bounce_y_animator);
- sid->down.bounce_y_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_y_animator, ecore_animator_del);
sid->bouncemey = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.hold_animator)
{
- ecore_animator_del(sid->down.hold_animator);
- sid->down.hold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.hold_animator, ecore_animator_del);
_elm_scroll_drag_stop(sid);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.momentum_animator)
{
- ecore_animator_del(sid->down.momentum_animator);
- sid->down.momentum_animator = NULL;
+ ELM_FREE_FUNC(sid->down.momentum_animator, ecore_animator_del);
sid->down.bounce_x_hold = EINA_FALSE;
sid->down.bounce_y_hold = EINA_FALSE;
sid->down.ax = 0;
@@ -1939,28 +1916,18 @@ _elm_scroll_wheel_event_cb(void *data,
{
_elm_scroll_anim_stop(sid);
}
- if (sid->scrollto.x.animator)
- {
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
- }
- if (sid->scrollto.y.animator)
- {
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
if (sid->down.bounce_x_animator)
{
- ecore_animator_del(sid->down.bounce_x_animator);
- sid->down.bounce_x_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_x_animator, ecore_animator_del);
sid->bouncemex = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.bounce_y_animator)
{
- ecore_animator_del(sid->down.bounce_y_animator);
- sid->down.bounce_y_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_y_animator, ecore_animator_del);
sid->bouncemey = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
@@ -2285,8 +2252,7 @@
_elm_scroll_scroll_to_y(Elm_Scrollable_Smart_Interface_Data *sid,
}
if (sid->down.bounce_y_animator)
{
- ecore_animator_del(sid->down.bounce_y_animator);
- sid->down.bounce_y_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_y_animator, ecore_animator_del);
_elm_scroll_momentum_end(sid);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
@@ -2330,8 +2296,7 @@
_elm_scroll_scroll_to_x(Elm_Scrollable_Smart_Interface_Data *sid,
}
if (sid->down.bounce_x_animator)
{
- ecore_animator_del(sid->down.bounce_x_animator);
- sid->down.bounce_x_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_x_animator, ecore_animator_del);
_elm_scroll_momentum_end(sid);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
@@ -2372,8 +2337,7 @@ _elm_scroll_mouse_up_event_cb(void *data,
{
if (sid->down.onhold_animator)
{
- ecore_animator_del(sid->down.onhold_animator);
- sid->down.onhold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -2572,8 +2536,7 @@ _elm_scroll_mouse_up_event_cb(void *data,
}
if (sid->down.hold_animator)
{
- ecore_animator_del(sid->down.hold_animator);
- sid->down.hold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -2640,44 +2603,32 @@ _elm_scroll_mouse_down_event_cb(void *data,
sid->down.hold = EINA_TRUE;
_elm_scroll_anim_stop(sid);
}
- if (sid->scrollto.x.animator)
- {
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
- }
- if (sid->scrollto.y.animator)
- {
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
if (sid->down.bounce_x_animator)
{
- ecore_animator_del(sid->down.bounce_x_animator);
- sid->down.bounce_x_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_x_animator, ecore_animator_del);
sid->bouncemex = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.bounce_y_animator)
{
- ecore_animator_del(sid->down.bounce_y_animator);
- sid->down.bounce_y_animator = NULL;
+ ELM_FREE_FUNC(sid->down.bounce_y_animator, ecore_animator_del);
sid->bouncemey = EINA_FALSE;
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.hold_animator)
{
- ecore_animator_del(sid->down.hold_animator);
- sid->down.hold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.hold_animator, ecore_animator_del);
_elm_scroll_drag_stop(sid);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
if (sid->down.momentum_animator)
{
- ecore_animator_del(sid->down.momentum_animator);
- sid->down.momentum_animator = NULL;
+ ELM_FREE_FUNC(sid->down.momentum_animator, ecore_animator_del);
sid->down.bounce_x_hold = EINA_FALSE;
sid->down.bounce_y_hold = EINA_FALSE;
sid->down.ax = 0;
@@ -3058,8 +3009,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
!(sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL))
{
Evas_Coord px;
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
eo_do(sid->pan_obj, elm_obj_pan_pos_get(&px, NULL));
sid->down.sx = px;
sid->down.x = sid->down.history[0].x;
@@ -3069,8 +3019,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
!(sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL))
{
Evas_Coord py;
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
eo_do(sid->pan_obj, elm_obj_pan_pos_get(NULL, &py));
sid->down.sy = py;
sid->down.y = sid->down.history[0].y;
@@ -3349,8 +3298,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
{
if (sid->down.onhold_animator)
{
- ecore_animator_del(sid->down.onhold_animator);
- sid->down.onhold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -3976,8 +3924,7 @@ _elm_scroll_momentum_animator_disabled_set(Eo *obj
EINA_UNUSED, void *_pd EINA_U
{
if (sid->down.momentum_animator)
{
- ecore_animator_del(sid->down.momentum_animator);
- sid->down.momentum_animator = NULL;
+ ELM_FREE_FUNC(sid->down.momentum_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -4001,17 +3948,8 @@ _elm_scroll_bounce_animator_disabled_set(Eo *obj
EINA_UNUSED, void *_pd, va_list
sid->bounce_animator_disabled = disabled;
if (sid->bounce_animator_disabled)
{
- if (sid->scrollto.x.animator)
- {
- ecore_animator_del(sid->scrollto.x.animator);
- sid->scrollto.x.animator = NULL;
- }
-
- if (sid->scrollto.y.animator)
- {
- ecore_animator_del(sid->scrollto.y.animator);
- sid->scrollto.y.animator = NULL;
- }
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
}
}
@@ -4185,8 +4123,7 @@ _elm_scroll_freeze_set(Eo *obj EINA_UNUSED, void *_pd,
va_list *list)
{
if (sid->down.onhold_animator)
{
- ecore_animator_del(sid->down.onhold_animator);
- sid->down.onhold_animator = NULL;
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
if (sid->content_info.resized)
_elm_scroll_wanted_region_set(sid->obj);
}
@@ -4519,18 +4456,13 @@ _elm_scroll_interface_del(Eo *obj, void *_pd, va_list
*list EINA_UNUSED)
eo_do(obj, elm_scrollable_interface_content_set(NULL));
if (!sid->extern_pan) evas_object_del(sid->pan_obj);
- if (sid->down.hold_animator)
- ecore_animator_del(sid->down.hold_animator);
- if (sid->down.onhold_animator)
- ecore_animator_del(sid->down.onhold_animator);
- if (sid->down.momentum_animator)
- ecore_animator_del(sid->down.momentum_animator);
- if (sid->down.bounce_x_animator)
- ecore_animator_del(sid->down.bounce_x_animator);
- if (sid->down.bounce_y_animator)
- ecore_animator_del(sid->down.bounce_y_animator);
- if (sid->scrollto.x.animator) ecore_animator_del(sid->scrollto.x.animator);
- if (sid->scrollto.y.animator) ecore_animator_del(sid->scrollto.y.animator);
+ ELM_FREE_FUNC(sid->down.hold_animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->down.onhold_animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->down.momentum_animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->down.bounce_x_animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->down.bounce_y_animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.x.animator, ecore_animator_del);
+ ELM_FREE_FUNC(sid->scrollto.y.animator, ecore_animator_del);
}
static void
diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c
index ba0900b..0df7897 100644
--- a/src/lib/elm_transit.c
+++ b/src/lib/elm_transit.c
@@ -258,8 +258,7 @@ _transit_del(Elm_Transit *transit)
transit->deleted = EINA_TRUE;
- if (transit->animator)
- ecore_animator_del(transit->animator);
+ ELM_FREE_FUNC(transit->animator, ecore_animator_del);
//remove effects
while (transit->effect_list)
@@ -717,8 +716,7 @@ elm_transit_go(Elm_Transit *transit)
Eina_List *elist;
Evas_Object *obj;
- if (transit->animator)
- ecore_animator_del(transit->animator);
+ ELM_FREE_FUNC(transit->animator, ecore_animator_del);
EINA_LIST_FOREACH(transit->objs, elist, obj)
_transit_obj_data_update(transit, obj);
diff --git a/src/lib/elm_web.c b/src/lib/elm_web.c
index 31b15c3..b6b8162 100644
--- a/src/lib/elm_web.c
+++ b/src/lib/elm_web.c
@@ -254,8 +254,7 @@ _view_smart_del(Evas_Object *obj)
sd = evas_object_smart_data_get(obj);
- if (sd->mouse.pan_anim)
- ecore_animator_del(sd->mouse.pan_anim);
+ ELM_FREE_FUNC(sd->mouse.pan_anim, ecore_animator_del);
_ewk_view_parent_sc.sc.del(obj);
}
@@ -303,8 +302,7 @@ _view_smart_mouse_up(Ewk_View_Smart_Data *esd,
if (sd->mouse.pan_anim)
{
- ecore_animator_del(sd->mouse.pan_anim);
- sd->mouse.pan_anim = NULL;
+ ELM_FREE_FUNC(sd->mouse.pan_anim, ecore_animator_del);
if (sd->mouse.longpress_timer)
_ewk_view_parent_sc.mouse_down(esd, &sd->mouse.event);
@@ -2379,11 +2377,7 @@ _region_show(Eo *obj, void *_pd, va_list *list)
zh = fh / zoom;
rx = (x * fw) / zw;
ry = (y * fh) / zh;
- if (sd->bring_in.animator)
- {
- ecore_animator_del(sd->bring_in.animator);
- sd->bring_in.animator = NULL;
- }
+ ELM_FREE_FUNC(sd->bring_in.animator, ecore_animator_del);
ewk_frame_scroll_set(frame, rx, ry);
#else
(void)obj;
@@ -2436,8 +2430,7 @@ _region_bring_in(Eo *obj, void *_pd, va_list *list)
sd->bring_in.start.y = sy;
sd->bring_in.end.x = rx;
sd->bring_in.end.y = ry;
- if (sd->bring_in.animator)
- ecore_animator_del(sd->bring_in.animator);
+ ELM_FREE_FUNC(sd->bring_in.animator, ecore_animator_del);
sd->bring_in.animator = ecore_animator_timeline_add(
_elm_config->bring_in_scroll_friction, _bring_in_anim_cb, obj);
#else
diff --git a/src/lib/elu_ews_wm.c b/src/lib/elu_ews_wm.c
index 4d57ba9..4447dcd 100644
--- a/src/lib/elu_ews_wm.c
+++ b/src/lib/elu_ews_wm.c
@@ -33,11 +33,7 @@ _elm_ews_wm_border_del(void *data)
if (_ews_border_mover_obj == deco)
{
- if (_ews_border_mover)
- {
- ecore_animator_del(_ews_border_mover);
- _ews_border_mover = NULL;
- }
+ ELM_FREE_FUNC(_ews_border_mover, ecore_animator_del);
_ews_border_mover_obj = NULL;
}
}
@@ -280,14 +276,13 @@ _elm_ews_border_sig_move_start(void *data, Evas_Object *o
__UNUSED__, const char
Evas_Object *bs_o = ecore_evas_ews_backing_store_get(ee);
int x, y, ox, oy;
- if (_ews_border_mover) ecore_animator_del(_ews_border_mover);
+ ELM_FREE_FUNC(_ews_border_mover, ecore_animator_del);
evas_pointer_output_xy_get(evas_object_evas_get(bs_o), &x, &y);
evas_object_geometry_get(bs_o, &ox, &oy, NULL, NULL);
_ews_border_mover_off.x = x - ox;
_ews_border_mover_off.y = y - oy;
_ews_border_mover_obj = bs_o;
- if (_ews_border_mover) ecore_animator_del(_ews_border_mover);
_ews_border_mover = ecore_animator_add(_elm_ews_border_mover, ee);
}
@@ -295,8 +290,7 @@ static void
_elm_ews_border_sig_move_stop(void *data __UNUSED__, Evas_Object *o
__UNUSED__, const char *sig __UNUSED__, const char *source __UNUSED__)
{
if (!_ews_border_mover) return;
- ecore_animator_del(_ews_border_mover);
- _ews_border_mover = NULL;
+ ELM_FREE_FUNC(_ews_border_mover, ecore_animator_del);
_ews_border_mover_obj = NULL;
}
@@ -529,23 +523,11 @@ _elm_ews_wm_shutdown(void)
{
Ecore_Event_Handler *eh;
- if (_ews_border_mover)
- {
- ecore_animator_del(_ews_border_mover);
- _ews_border_mover = NULL;
- }
+ ELM_FREE_FUNC(_ews_border_mover, ecore_animator_del);
_ews_border_mover_obj = NULL;
EINA_LIST_FREE(_ews_ev_handlers, eh) ecore_event_handler_del(eh);
- if (_ews_borders)
- {
- eina_hash_free(_ews_borders);
- _ews_borders = NULL;
- }
- if (_ews_borders_geo)
- {
- eina_hash_free(_ews_borders_geo);
- _ews_borders_geo = NULL;
- }
+ ELM_FREE_FUNC(_ews_borders, eina_hash_free);
+ ELM_FREE_FUNC(_ews_borders_geo, ecore_animator_del);
_ews_bg = NULL;
}
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may