1 #include "e_mod_effect.h"
4 static E_Effect *_eff = NULL;
6 typedef struct _E_Effect_Client
9 unsigned int animating;
10 unsigned int delay_del_ref;
11 E_Comp_Wl_Buffer_Ref buffer_ref;
16 unsigned int under_ref;
18 unsigned int bg_animating;
28 _eff_object_underlayer_sort(const void *data1, const void *data2)
30 const Under_Layer *layer1, *layer2;
35 if (layer1->zpos < layer2->zpos)
37 else if (layer1->zpos > layer2->zpos)
44 _eff_object_underlayer_get(E_Client *ec)
46 Evas_Object *underlay = NULL;
47 E_Comp_Screen *e_comp_screen;
51 e_comp_screen = e_comp->e_comp_screen;
55 if (e_client_video_client_has(ec))
57 if ((!_eff->under_layers) && (!_eff->under_checked))
59 tdm_layer_capability capabilities;
62 const Eina_List *planes, *l;
64 if (!ec->zone) return NULL;
66 eoutput = e_output_find(ec->zone->output_id);
67 if (eoutput) return NULL;
69 planes = e_output_planes_get(eoutput);
70 if (!planes) return NULL;
72 /* Find a plane which is placed under primary and used for video.
73 * planes is supposed to be sorted by zpos (lower -> higher) */
74 EINA_LIST_FOREACH(planes, l, plane)
76 if (e_plane_is_primary(plane))
82 tdm_layer_get_capabilities(plane->tlayer, &capabilities);
83 if (!(capabilities & TDM_LAYER_CAPABILITY_GRAPHIC)) continue;
85 ulayer = E_NEW(Under_Layer, 1);
86 if (!ulayer) continue;
87 ulayer->zpos = plane->zpos;
88 ulayer->tlayer = plane->tlayer;
90 _eff->under_layers = eina_list_append(_eff->under_layers,
94 _eff->under_checked = EINA_TRUE;
96 if (!_eff->under_layers)
99 _eff->under_layers = eina_list_sort(_eff->under_layers,
100 eina_list_count(_eff->under_layers),
101 _eff_object_underlayer_sort);
104 if (!_eff->under_layers) return NULL;
106 EINA_LIST_FOREACH(_eff->under_layers, l, ulayer)
110 tbm_surface_h buffer;
111 Evas_Native_Surface ns;
113 tdm_error err = TDM_ERROR_NONE;
115 layer = ulayer->tlayer;
117 buffer = tdm_layer_get_displaying_buffer(layer, NULL);
118 if (!buffer) continue;
120 err = tdm_layer_get_info(layer, &info);
121 if (err != TDM_ERROR_NONE) continue;
123 if (info.dst_pos.w <= 0 || info.dst_pos.h <= 0)
126 img = evas_object_image_filled_add(e_comp->evas);
129 memset(&ns, 0, sizeof(Evas_Native_Surface));
130 ns.version = EVAS_NATIVE_SURFACE_VERSION;
131 ns.type = EVAS_NATIVE_SURFACE_TBM;
132 ns.data.tbm.buffer = buffer;
134 evas_object_image_size_set(img, info.dst_pos.w, info.dst_pos.h);
135 evas_object_image_native_surface_set(img, &ns);
136 evas_object_image_pixels_dirty_set(img, EINA_TRUE);
142 underlay = e_layout_add(e_comp->evas);
145 evas_object_del(img);
149 evas_object_name_set(underlay, "effect-under-layout");
150 e_layout_virtual_size_set(underlay, ec->zone->w, ec->zone->h);
151 evas_object_move(underlay, ec->zone->x, ec->zone->y);
153 bg = evas_object_rectangle_add(e_comp->evas);
154 evas_object_color_set(bg, 0, 0, 0, 255);
155 e_layout_pack(underlay, bg);
156 e_layout_child_move(bg, 0, 0);
157 e_layout_child_resize(bg, ec->zone->w, ec->zone->h);
158 evas_object_show(bg);
161 e_layout_pack(underlay, img);
162 e_layout_child_move(img, info.dst_pos.x, info.dst_pos.y);
163 e_layout_child_resize(img, info.dst_pos.w, info.dst_pos.h);
164 e_layout_child_raise(img);
165 evas_object_show(img);
167 EFFDBG("Video Object Created img(%p) %d,%d %dx%d underlay(%p)",
169 img, info.dst_pos.x, info.dst_pos.y, info.dst_pos.w, info.dst_pos.h,
178 _eff_event_send(E_Client *ec, Eina_Bool start, E_Effect_Type type)
180 struct wl_resource *res_surf;
181 struct wl_resource *res_eff;
182 struct wl_client *wc;
183 unsigned int tizen_effect_type = TIZEN_EFFECT_TYPE_NONE;
186 if ((!ec) || (!ec->comp_data)) return;
187 if (e_object_is_del(E_OBJECT(ec))) return;
189 res_surf = ec->comp_data->surface;
190 if (!res_surf) return;
192 wc = wl_resource_get_client(res_surf);
195 res_eff = eina_hash_find(_eff->resources, &wc);
196 if (!res_eff) return;
200 case E_EFFECT_TYPE_SHOW:
201 tizen_effect_type = TIZEN_EFFECT_TYPE_SHOW;
203 case E_EFFECT_TYPE_HIDE:
204 tizen_effect_type = TIZEN_EFFECT_TYPE_HIDE;
206 case E_EFFECT_TYPE_RESTACK_SHOW:
207 case E_EFFECT_TYPE_RESTACK_HIDE:
208 tizen_effect_type = TIZEN_EFFECT_TYPE_RESTACK;
211 ERR("Unsupported effect type: %d for %p", type, ec);
215 EFFINF("SEND %.5s|type:%d|win:0x%08x|tz_effect:0x%08x",
217 start ? "START" : "END", type,
218 (unsigned int)e_client_util_win_get(ec),
219 (unsigned int)res_eff);
222 tizen_effect_send_start(res_eff, res_surf, tizen_effect_type);
225 tizen_effect_send_end(res_eff, res_surf, tizen_effect_type);
227 EFFINF("Un-SET EXTRA_ANIMATING...", ec);
228 ec->extra_animating = EINA_FALSE;
229 if (ec->launching == EINA_TRUE)
231 ELOGF("COMP", "Un-Set launching flag..", ec);
232 ec->launching = EINA_FALSE;
233 if (ec->first_mapped)
235 ELOGF("LAUNCH", "SHOW real win", ec);
236 e_comp_object_signal_emit(ec->frame, "e,action,launch_real,done", "e");
238 e_comp_object_signal_emit(ec->frame, "e,action,launch,done", "e");
243 static E_Effect_Client*
244 _eff_client_new(E_Client *ec)
246 E_Effect_Client *efc;
248 efc = E_NEW(E_Effect_Client, 1);
249 if (!efc) return NULL;
252 efc->delay_del_ref = 0;
260 static E_Effect_Client *
261 _eff_client_get(E_Client *ec)
263 if (!_eff) return NULL;
264 return eina_hash_find(_eff->clients, &ec);
267 static E_Effect_Group
268 _eff_group_get(E_Client *ec)
270 E_Effect_Group group = E_EFFECT_GROUP_NORMAL;
272 /* animatable setting by aux_hint */
273 if (!ec->animatable) return E_EFFECT_GROUP_NONE;
276 switch (ec->client_type)
279 group = E_EFFECT_GROUP_HOME;
282 group = E_EFFECT_GROUP_LOCKSCREEN;
289 if ((ec->comp_data) && (ec->comp_data->sub.data))
290 group = E_EFFECT_GROUP_NONE;
293 if (group == E_EFFECT_GROUP_NORMAL)
295 if (ec->layer > E_LAYER_CLIENT_NORMAL)
296 group = E_EFFECT_GROUP_NONE;
303 group = E_EFFECT_GROUP_KEYBOARD;
309 _eff_group_angle_get(E_Client *ec, E_Effect_Group group)
311 if (group == E_EFFECT_GROUP_KEYBOARD)
315 int buffer_transform = e_comp_wl_output_buffer_transform_get(ec);
316 int rot = ec->parent->e.state.rot.ang.curr;
318 rot = (rot + (buffer_transform * 90)) % 360;
324 return ec->e.state.rot.ang.curr;
328 _eff_object_setup(E_Client *ec, E_Effect_Group group)
331 cfg = e_comp_config_get();
335 if (group == E_EFFECT_GROUP_KEYBOARD)
336 e_comp_object_effect_set(ec->frame, cfg->kbd_effect_style);
337 else if (group == E_EFFECT_GROUP_BACKGROUND)
338 e_comp_object_effect_set(ec->frame, cfg->bg_effect_style);
341 E_Effect_Client *efc = NULL;
342 E_Client *parent_ec = ec;
344 efc = _eff_client_get(ec);
346 while (parent_ec->parent)
347 parent_ec = parent_ec->parent;
349 if ((parent_ec != ec) && (parent_ec->launching)) // Launchig case with parent at same time
350 e_comp_object_effect_set(ec->frame, cfg->effect_style);
351 else if ((efc) && (e_policy_client_is_home_screen(efc->reverse_ec))) // Home key effect senario
352 e_comp_object_effect_set(ec->frame, cfg->effect_style);
353 else if ((cfg) && (cfg->depth_in_style) && (ec->effect_type)) //depth-in senario
354 e_comp_object_effect_set(ec->frame, cfg->depth_in_style);
355 else if ((cfg) && (cfg->effect_style)) // normal launching case
356 e_comp_object_effect_set(ec->frame, cfg->effect_style);
358 e_comp_object_effect_set(ec->frame, "no-effect");
360 EFFINF("eff Setup efc(%p) home(%d) type(%d) parent(%d)",
362 efc? e_policy_client_is_home_screen(efc->reverse_ec) : 0,
364 parent_ec == ec ? -1 : parent_ec->launching);
369 _eff_object_under_cb_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
371 E_Effect_Client *efc = (E_Effect_Client *)data;
375 if (efc->under != obj) return;
377 children = e_layout_children_get(obj);
378 EINA_LIST_FREE(children, child)
380 e_layout_unpack(child);
381 evas_object_del(child);
389 _eff_object_under_setup(E_Client *ec)
391 E_Effect_Client *efc = NULL;
392 Evas_Object *underlay = NULL;
394 efc = _eff_client_get(ec);
401 else if ((underlay = _eff_object_underlayer_get(ec)))
406 if (e_comp_object_effect_object_part_swallow(ec->frame, "under", underlay))
408 evas_object_event_callback_add(underlay,
410 _eff_object_under_cb_del,
412 evas_object_show(underlay);
413 efc->under = underlay;
418 children = e_layout_children_get(underlay);
419 EINA_LIST_FREE(children, child)
421 e_layout_unpack(child);
422 evas_object_del(child);
425 evas_object_del(underlay);
431 _eff_object_under_del(E_Client *ec)
433 E_Effect_Client *efc = NULL;
437 efc = _eff_client_get(ec);
439 if (!efc->under) return;
440 if (efc->under_ref <= 0)
447 if (efc->under_ref > 0) return;
449 evas_object_event_callback_del_full(efc->under,
451 _eff_object_under_cb_del,
454 children = e_layout_children_get(efc->under);
455 EINA_LIST_FREE(children, child)
457 e_layout_unpack(child);
458 evas_object_del(child);
461 evas_object_del(efc->under);
466 _eff_object_background_below_clients_get(E_Client *ec, E_Effect_Type type, Eina_List **below_list)
468 Eina_List *stack = NULL, *list, *next;
469 E_Client *below = NULL;
473 if (type == E_EFFECT_TYPE_RESTACK_HIDE)
474 stack = _eff->stack.old;
476 stack = _eff->stack.cur;
480 list = eina_list_data_find_list(stack, ec);
484 while ((next = eina_list_next(next)))
486 below = eina_list_data_get(next);
489 eina_list_free(*below_list);
494 if (e_object_is_del(E_OBJECT(below))) continue;
495 if (ec->zone != below->zone) continue;
496 if (e_client_util_ignored_get(below) ||
497 (!evas_object_visible_get(below->frame))) continue;
499 if (below->vkbd.vkbd)
502 *below_list = eina_list_prepend(*below_list, below);
508 if (below->visibility.opaque > 0)
515 _eff_object_background_cb_zoom_in_done(void *data, Evas_Object *obj, const char *sig, const char *src)
518 E_Effect_Client *bg_efc;
520 bg_ec = (E_Client *)data;
523 bg_efc = _eff_client_get(bg_ec);
525 bg_efc->bg_animating = 0;
527 e_object_unref(E_OBJECT(bg_ec));
531 _eff_object_background_cb_zoom_out_done(void *data, Evas_Object *obj, const char *sig, const char *src)
534 E_Effect_Client *bg_efc;
536 bg_ec = (E_Client *)data;
539 bg_efc = _eff_client_get(bg_ec);
541 bg_efc->bg_animating = 0;
543 e_object_unref(E_OBJECT(bg_ec));
547 _eff_object_background_start(E_Client *bg_ec, E_Effect_Type type, int bg_opaque)
549 E_Effect_Client *bg_efc = NULL;
553 if (e_object_is_del(E_OBJECT(bg_ec))) return;
554 if (!bg_ec->animatable) return;
556 bg_efc = _eff_client_get(bg_ec);
558 if ((bg_efc->bg_animating) ||
559 ((bg_efc->animating) && !((bg_ec->launching) && (bg_efc->animating == 1))))
562 // 1st param : zoom-in(0) zoom-out(1)
563 // 2nd param : rotation angle
564 // 3rd param : background rect transparency(0) opaque(1)
567 case E_EFFECT_TYPE_SHOW:
568 case E_EFFECT_TYPE_RESTACK_SHOW:
569 if (bg_ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
571 e_object_ref(E_OBJECT(bg_ec));
572 _eff_object_setup(bg_ec, E_EFFECT_GROUP_BACKGROUND);
573 ang = _eff_group_angle_get(bg_ec, E_EFFECT_GROUP_BACKGROUND);
574 e_comp_object_effect_params_set(bg_ec->frame, 0, (int[]){0, ang, bg_opaque}, 3);
575 e_comp_object_effect_start(bg_ec->frame, _eff_object_background_cb_zoom_in_done, bg_ec);
576 bg_efc->bg_animating = 1;
580 case E_EFFECT_TYPE_RESTACK_HIDE:
581 e_object_ref(E_OBJECT(bg_ec));
582 _eff_object_setup(bg_ec, E_EFFECT_GROUP_BACKGROUND);
583 ang = _eff_group_angle_get(bg_ec, E_EFFECT_GROUP_BACKGROUND);
584 e_comp_object_effect_params_set(bg_ec->frame, 0, (int[]){1, ang, bg_opaque}, 3);
585 e_comp_object_effect_start(bg_ec->frame, _eff_object_background_cb_zoom_out_done, bg_ec);
586 bg_efc->bg_animating = 1;
589 case E_EFFECT_TYPE_HIDE:
590 if (bg_ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
592 e_object_ref(E_OBJECT(bg_ec));
593 _eff_object_setup(bg_ec, E_EFFECT_GROUP_BACKGROUND);
594 ang = _eff_group_angle_get(bg_ec, E_EFFECT_GROUP_BACKGROUND);
595 e_comp_object_effect_params_set(bg_ec->frame, 0, (int[]){1, ang, bg_opaque}, 3);
596 e_comp_object_effect_start(bg_ec->frame, _eff_object_background_cb_zoom_out_done, bg_ec);
597 bg_efc->bg_animating = 1;
608 _eff_object_background_setup(E_Client *ec, E_Client *home_ec, E_Effect_Group group, E_Effect_Type type)
611 E_Client *bg_ec = NULL;
612 Eina_List *bg_list = NULL;
614 cfg = e_comp_config_get();
616 if (!cfg->bg_effect_style) return;
619 if (group != E_EFFECT_GROUP_NORMAL) return;
620 if ((ec->argb) || (ec->effect_type)) return; //need to check opaque?
623 _eff_object_background_start(home_ec, type, 1);
628 _eff_object_background_below_clients_get(ec, type, &bg_list);
629 if (!bg_list) return;
631 EINA_LIST_FREE(bg_list, bg_ec)
635 EFFDBG("make bottom most background to be opaque", bg_ec);
636 _eff_object_background_start(bg_ec, type, 1);
641 _eff_object_background_start(bg_ec, type, 0);
648 _eff_object_layer_up(E_Client *ec)
652 map_ly = e_comp_canvas_client_layer_map(ec->layer);
653 if (map_ly == 9999) return;
655 if (!_eff->layers[map_ly].obj)
657 _eff->layers[map_ly].obj = evas_object_rectangle_add(e_comp->evas);
658 evas_object_layer_set(_eff->layers[map_ly].obj, ec->layer + 1);
659 evas_object_name_set(_eff->layers[map_ly].obj, "layer_obj(effect)");
662 ec->layer_pending = 1;
663 evas_object_layer_set(ec->frame, ec->layer + 1);
667 _eff_object_layer_down(E_Client *ec)
669 evas_object_layer_set(ec->frame, ec->layer);
670 ec->layer_pending = 0;
674 _eff_pending_effect_start(void)
678 ec = _eff->next_done.ec;
681 EFFINF("Pending eff Start type(%d)",
682 ec, _eff->next_done.type);
684 if (_eff->next_done.cb)
686 _eff_event_send(ec, EINA_TRUE, _eff->next_done.type);
687 e_comp_object_effect_start(ec->frame,
689 _eff->next_done.data);
692 memset(&_eff->next_done, 0, sizeof(_eff->next_done));
696 _eff_pending_effect_set(E_Client *ec, void *data, E_Effect_Type type, Edje_Signal_Cb done_cb)
698 _eff_pending_effect_start();
700 EFFINF("Pending eff Set type(%d)",
703 _eff->next_done.cb = done_cb;
704 _eff->next_done.ec = ec;
705 _eff->next_done.data = data;
706 _eff->next_done.type = type;
710 _eff_stack_update(void)
717 _eff->stack.old = eina_list_free(_eff->stack.old);
718 _eff->stack.old = eina_list_clone(_eff->stack.cur);
720 for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
722 ec = evas_object_data_get(o, "E_Client");
724 if (e_client_util_ignored_get(ec)) continue;
725 if (e_object_is_del(E_OBJECT(ec))) continue;
727 _eff->stack.cur = eina_list_remove(_eff->stack.cur, ec);
728 _eff->stack.cur = eina_list_append(_eff->stack.cur, ec);
733 _eff_visibility_stack_check(E_Client *ec, Eina_List *stack)
739 Eina_Bool vis = EINA_TRUE;
742 if (!stack) return EINA_FALSE;
744 tiler = eina_tiler_new(ec->desk->geom.w, ec->desk->geom.h);
745 eina_tiler_tile_size_set(tiler, 1, 1);
746 EINA_RECTANGLE_SET(&r, ec->desk->geom.x, ec->desk->geom.y, ec->desk->geom.w, ec->desk->geom.h);
747 eina_tiler_rect_add(tiler, &r);
749 EINA_LIST_FOREACH(stack, l, _ec)
751 if (_ec == ec) break;
752 if (!_ec->visible) continue;
753 if (!evas_object_visible_get(_ec->frame))
755 if (!_ec->iconic) continue;
756 if (_ec->iconic && _ec->exp_iconify.by_client) continue;
758 if (!e_pixmap_resource_get(_ec->pixmap)) continue;
759 if ((_ec->argb) && (_ec->visibility.opaque != 1)) continue;
761 e_client_geometry_get(_ec, &x, &y, &w, &h);
763 EINA_RECTANGLE_SET(&r, x, y, w, h);
764 eina_tiler_rect_del(tiler, &r);
766 if (eina_tiler_empty(tiler))
772 eina_tiler_free(tiler);
778 _eff_restack_effect_check(E_Client *ec)
780 const char *emission = NULL;
782 E_Effect_Client *efc;
784 if (!evas_object_visible_get(ec->frame)) return NULL;
785 if (ec->new_client) return NULL;
787 v1 = _eff_visibility_stack_check(ec, _eff->stack.old);
788 v2 = _eff_visibility_stack_check(ec, _eff->stack.cur);
792 if ((v2) && (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED))
793 emission = "e,action,restack,show";
794 else if ((!v2) && (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED))
795 emission = "e,action,restack,hide";
799 efc = _eff_client_get(ec);
801 // TODO : it's for transients windows. wish using other check */
802 if ((efc) && (!efc->animating))
804 if ((v2) && (!ec->iconic) &&
805 (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED))
806 emission = "e,action,restack,show";
807 else if ((!v2) && (ec->iconic) &&
808 (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED))
809 emission = "e,action,restack,hide";
813 EFFINF("Restack eff Check v1(%d) -> v2(%d) iconic:%d "
814 "obscured:%d(%d) emission:%s",
817 ec->visibility.obscured, ec->visibility.changed, emission);
823 _eff_ref(E_Client *ec)
825 E_Effect_Client *efc;
827 if (!_eff) return EINA_FALSE;
829 efc = _eff_client_get(ec);
830 if (!efc) return EINA_FALSE;
832 if (e_object_is_del(E_OBJECT(ec)))
834 if (!e_object_delay_del_ref_get(E_OBJECT(ec)))
836 ERR("Client is deleted already! ec(%p)", ec);
837 eina_hash_del_by_key(_eff->clients, &ec);
842 if (!ec->pixmap) return EINA_FALSE;
843 if ((e_comp_object_content_type_get(ec->frame) == E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE) &&
844 (!e_pixmap_usable_get(ec->pixmap)))
847 if (e_object_is_del(E_OBJECT(ec)))
849 e_object_delay_del_ref(E_OBJECT(ec));
850 efc->delay_del_ref ++;
853 efc->bg_animating = 0;
855 e_object_ref(E_OBJECT(ec));
856 efc->ep = e_pixmap_ref(ec->pixmap);
858 EFFINF("effect ref efc(%p) animating:%d",
859 efc->ec, efc, efc->animating);
865 _eff_unref(E_Client *ec)
867 E_Effect_Client *efc;
870 if (!_eff) return NULL;
871 if (!ec) return NULL;
873 efc = _eff_client_get(ec);
874 if (!efc) return NULL;
876 while (efc->delay_del_ref)
878 e_object_delay_del_unref(E_OBJECT(ec));
879 efc->delay_del_ref--;
882 if (e_object_is_del(E_OBJECT(ec)))
883 do_unref = efc->animating;
885 efc->animating -= do_unref;
888 e_pixmap_free(efc->ep);
890 _eff_object_under_del(ec);
891 if (!e_object_unref(E_OBJECT(ec)))
893 EFFINF("eff unref ec(%p) ep(%p) efc(%p) Client free'd",
894 NULL, ec, efc->ep, efc);
898 eina_hash_del_by_key(_eff->clients, &ec);
904 EFFINF("eff Unref efc(%p) animating:%d",
905 ec, efc, efc->animating);
907 /* The reference count of wl_buffer will get decremented
908 * immediately after window effect.
910 if ((efc) && (efc->buffer_ref.buffer))
911 e_comp_wl_buffer_reference(&efc->buffer_ref, NULL);
917 _eff_cb_visible_done(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
919 E_Client *ec = (E_Client *)data;
923 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_SHOW);
928 e_comp_override_del();
932 _eff_cb_visible(void *data, Evas_Object *obj, const char *signal)
935 E_Effect_Group group;
938 if (!_eff) return EINA_FALSE;
940 ec = e_comp_object_client_get(obj);
941 if (!ec) return EINA_FALSE;
942 if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
944 group = _eff_group_get(ec);
945 if ((group != E_EFFECT_GROUP_NORMAL) &&
946 (group != E_EFFECT_GROUP_KEYBOARD)) return EINA_FALSE;
948 if (evas_object_visible_get(obj)) return EINA_FALSE;
949 if (!_eff_ref(ec)) return EINA_FALSE;
952 e_comp_override_add();
954 EFFINF("SET EXTRA_ANIMATING...", ec);
955 ec->extra_animating = EINA_TRUE;
957 _eff_object_setup(ec, group);
958 _eff_object_under_setup(ec);
960 ang = _eff_group_angle_get(ec, group);
961 e_comp_object_effect_params_set(ec->frame, 0, (int[]){0, ang}, 2);
964 _eff_pending_effect_set(ec,
967 _eff_cb_visible_done);
971 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_SHOW);
973 e_comp_object_effect_start(ec->frame, _eff_cb_visible_done, ec);
975 _eff_object_background_setup(ec, NULL, group, E_EFFECT_TYPE_SHOW);
981 _eff_cb_hidden_done(void *data, Evas_Object *obj, const char *sig, const char *src)
983 E_Client *ec = (E_Client *)data;
987 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_HIDE);
990 if (_eff_client_get(ec))
992 _eff_object_layer_down(ec);
993 evas_object_hide(ec->frame);
998 e_comp_override_del();
1002 _eff_cb_hidden(void *data, Evas_Object *obj, const char *signal)
1005 E_Effect_Group group;
1006 Eina_Bool lowered = 0;
1012 if (!_eff) return EINA_FALSE;
1014 ec = e_comp_object_client_get(obj);
1015 if (!ec) return EINA_FALSE;
1016 if (e_object_is_del(E_OBJECT(ec)))
1018 if (!e_object_delay_del_ref_get(E_OBJECT(ec))) return EINA_FALSE;
1021 /* check for effect group */
1022 group = _eff_group_get(ec);
1023 if ((group != E_EFFECT_GROUP_NORMAL) &&
1024 (group != E_EFFECT_GROUP_KEYBOARD)) return EINA_FALSE;
1026 if (group == E_EFFECT_GROUP_KEYBOARD)
1028 if (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
1032 /* check for object visibility */
1033 if (!evas_object_visible_get(obj)) return EINA_FALSE;
1035 /* check for stack visibility */
1036 v1 = _eff_visibility_stack_check(ec, _eff->stack.old);
1037 v2 = _eff_visibility_stack_check(ec, _eff->stack.cur);
1038 if ((!v1) && (!v2)) return EINA_FALSE;
1040 if (!_eff_ref(ec)) return EINA_FALSE;
1042 e_comp_override_add();
1044 // check if client was lowered
1045 below = evas_object_below_get(obj);
1046 map_ly = e_comp_canvas_layer_map(evas_object_layer_get(obj));
1047 if ((below) && (map_ly != 9999) &&
1048 (evas_object_layer_get(below) != evas_object_layer_get(obj)) &&
1049 (evas_object_above_get(obj) != e_comp->layers[map_ly].obj))
1053 _eff_object_layer_up(ec);
1055 _eff_object_setup(ec, group);
1056 _eff_object_under_setup(ec);
1058 ang = _eff_group_angle_get(ec, group);
1059 e_comp_object_effect_params_set(ec->frame, 0, (int[]){1, ang}, 2);
1063 _eff_pending_effect_set(ec,
1066 _eff_cb_hidden_done);
1070 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_HIDE);
1071 e_comp_object_effect_start(ec->frame, _eff_cb_hidden_done, ec);
1072 _eff_object_background_setup(ec, NULL, group, E_EFFECT_TYPE_HIDE);
1078 _eff_cb_uniconify_done(void *data, Evas_Object *obj, const char *sig, const char *src)
1080 E_Client *ec = (E_Client *)data;
1084 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_SHOW);
1088 e_comp_override_del();
1092 _eff_cb_uniconify(void *data, Evas_Object *obj, const char *signal)
1095 E_Effect_Group group;
1099 if (!_eff) return EINA_FALSE;
1101 ec = e_comp_object_client_get(obj);
1102 if (!ec) return EINA_FALSE;
1103 if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
1105 if (evas_object_visible_get(obj)) return EINA_FALSE;
1107 group = _eff_group_get(ec);
1109 /* for HOME group */
1110 if (group == E_EFFECT_GROUP_HOME)
1114 v1 = _eff_visibility_stack_check(ec, _eff->stack.old);
1115 v2 = _eff_visibility_stack_check(ec, _eff->stack.cur);
1117 EFFINF("Uniconify eff Check v1(%d) -> v2(%d) obscured:%d changed:%d",
1119 v1, v2, ec->visibility.obscured, ec->visibility.changed);
1121 if (v1 == v2) return EINA_FALSE;
1122 if ((v2) && (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1123 if ((!v2) && (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1125 below = e_client_below_get(ec);
1128 if ((evas_object_visible_get(below->frame)) &&
1129 (below->layer == ec->layer) &&
1130 ((below->visibility.obscured == E_VISIBILITY_UNOBSCURED) ||
1131 (below->visibility.changed)))
1134 below = e_client_below_get(below);
1137 if (!below) return EINA_FALSE;
1138 group = _eff_group_get(below);
1139 if (group != E_EFFECT_GROUP_NORMAL) return EINA_FALSE;
1141 EFFINF("Uniconify HOME group do hide eff of %p",
1144 e_comp_object_signal_emit(below->frame, "e,action,restack,hide", "e");
1147 /* for NORMAL and KEYBOARD group */
1148 else if ((group == E_EFFECT_GROUP_NORMAL) ||
1149 (group == E_EFFECT_GROUP_KEYBOARD))
1151 v1 = _eff_visibility_stack_check(ec, _eff->stack.old);
1152 v2 = _eff_visibility_stack_check(ec, _eff->stack.cur);
1154 EFFINF("Uniconify eff Check v1(%d) -> v2(%d) obscured:%d changed:%d",
1156 v1, v2, ec->visibility.obscured, ec->visibility.changed);
1158 if (v1 == v2) return EINA_FALSE;
1159 if ((v2) && (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1160 if ((!v2) && (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1162 if (!_eff_ref(ec)) return EINA_FALSE;
1164 e_comp_override_add();
1166 _eff_object_setup(ec, group);
1167 _eff_object_under_setup(ec);
1169 ang = _eff_group_angle_get(ec, group);
1170 e_comp_object_effect_params_set(ec->frame, 0, (int[]){0, ang}, 2);
1174 _eff_pending_effect_set(ec,
1177 _eff_cb_uniconify_done);
1181 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_SHOW);
1182 e_comp_object_effect_start(ec->frame, _eff_cb_uniconify_done, ec);
1190 _eff_cb_iconify_done(void *data, Evas_Object *obj, const char *sig, const char *src)
1192 E_Client *ec = (E_Client *)data;
1196 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_HIDE);
1199 if (_eff_client_get(ec))
1200 evas_object_hide(ec->frame);
1204 e_comp_override_del();
1208 _eff_cb_iconify(void *data, Evas_Object *obj, const char *signal)
1211 E_Effect_Group group;
1215 if (!_eff) return EINA_FALSE;
1217 ec = e_comp_object_client_get(obj);
1218 if (!ec) return EINA_FALSE;
1219 if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
1221 group = _eff_group_get(ec);
1222 if ((group != E_EFFECT_GROUP_NORMAL) &&
1223 (group != E_EFFECT_GROUP_KEYBOARD)) return EINA_FALSE;
1225 if (!evas_object_visible_get(obj)) return EINA_FALSE;
1227 v1 = _eff_visibility_stack_check(ec, _eff->stack.old);
1228 v2 = _eff_visibility_stack_check(ec, _eff->stack.cur);
1230 EFFINF("Iconify eff Check v1(%d) -> v2(%d) obscured:%d changed:%d",
1232 v1, v2, ec->visibility.obscured, ec->visibility.changed);
1234 if (v1 == v2) return EINA_FALSE;
1235 if ((v2) && (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1236 if ((!v2) && (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)) return EINA_FALSE;
1238 if (!_eff_ref(ec)) return EINA_FALSE;
1240 e_comp_override_add();
1242 _eff_object_setup(ec, group);
1243 _eff_object_under_setup(ec);
1245 ang = _eff_group_angle_get(ec, group);
1246 e_comp_object_effect_params_set(ec->frame, 0, (int[]){1, ang}, 2);
1250 _eff_pending_effect_set(ec,
1253 _eff_cb_iconify_done);
1257 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_HIDE);
1258 e_comp_object_effect_start(ec->frame, _eff_cb_iconify_done, ec);
1264 _eff_cb_restack_show_done(void *data, Evas_Object *obj, const char *sig, const char *src)
1266 E_Client *ec = (E_Client *)data;
1270 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_RESTACK_SHOW);
1274 _eff_stack_update();
1275 e_comp_override_del();
1279 _eff_cb_restack_hide_done(void *data, Evas_Object *obj, const char *sig, const char *src)
1281 E_Client *ec = (E_Client *)data;
1287 if (_eff_client_get(ec))
1289 _eff_object_layer_down(ec);
1290 e_comp_object_signal_emit(ec->frame,
1291 "e,action,restack,finish",
1297 _eff_stack_update();
1298 e_comp_override_del();
1302 _eff_cb_restack_finish_done(void *data, Evas_Object *obj, const char *sig, const char *src)
1304 E_Client *ec = (E_Client *)data;
1305 E_Effect_Client *efc = NULL;
1309 _eff_event_send(ec, EINA_FALSE, E_EFFECT_TYPE_RESTACK_HIDE);
1310 efc = _eff_client_get(ec);
1311 if (efc && efc->reverse_ec)
1313 E_Client *ec_home = efc->reverse_ec;
1314 if (ec_home->extra_animating)
1316 ec_home->extra_animating = EINA_FALSE;
1317 if (ec_home->launching == EINA_TRUE)
1319 ELOGF("COMP", "Un-Set launching flag..", ec_home);
1320 ec_home->launching = EINA_FALSE;
1321 if (ec_home->first_mapped)
1323 ELOGF("LAUNCH", "SHOW real win", ec_home);
1324 e_comp_object_signal_emit(ec_home->frame, "e,action,launch_real,done", "e");
1327 e_comp_object_signal_emit(ec_home->frame, "e,action,launch,done", "e");
1329 _eff_unref(ec_home);
1331 efc->reverse_ec = NULL;
1337 e_comp_override_del();
1341 _eff_cb_restack(void *data, Evas_Object *obj, const char *signal)
1344 E_Effect_Group group;
1345 const char *emission;
1346 E_Client *ec_home = NULL;
1349 if (!_eff) return EINA_FALSE;
1351 ec = e_comp_object_client_get(obj);
1352 if (!ec) return EINA_FALSE;
1353 if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
1355 group = _eff_group_get(ec);
1356 emission = eina_stringshare_add(signal);
1358 /* for HOME group: replace eff target client */
1359 if (group == E_EFFECT_GROUP_HOME)
1363 below = e_client_below_get(ec);
1366 if ((!e_object_is_del(E_OBJECT(below))) &&
1367 (evas_object_visible_get(below->frame)) &&
1368 (below->visibility.obscured == E_VISIBILITY_UNOBSCURED) &&
1369 (below->layer == ec->layer))
1372 below = e_client_below_get(below);
1375 if (!below) return EINA_FALSE;
1376 if (e_util_strcmp(signal, "e,action,restack,show")) return EINA_FALSE;
1380 group = _eff_group_get(ec);
1381 if (group != E_EFFECT_GROUP_NORMAL) return EINA_FALSE;
1383 if (emission) eina_stringshare_del(emission);
1384 emission = eina_stringshare_add("e,action,restack,hide");
1387 if ((group != E_EFFECT_GROUP_NORMAL) &&
1388 (group != E_EFFECT_GROUP_KEYBOARD)) return EINA_FALSE;
1390 if ((!e_util_strcmp(emission, "e,action,restack,show")))
1392 /* if ec wass changed to non-animatable, just up and down layer */
1393 if (!ec->animatable)
1395 _eff_object_layer_up(ec);
1396 _eff_object_layer_down(ec);
1399 if (!_eff_ref(ec)) return EINA_FALSE;
1401 EFFINF("SET EXTRA_ANIMATING...", ec);
1402 ec->extra_animating = EINA_TRUE;
1404 e_comp_override_add();
1406 _eff_object_setup(ec, group);
1407 _eff_object_under_setup(ec);
1409 ang = _eff_group_angle_get(ec, group);
1410 e_comp_object_effect_params_set(ec->frame, 0, (int[]){2, ang}, 2);
1414 _eff_pending_effect_set(ec,
1417 _eff_cb_restack_show_done);
1421 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_RESTACK_SHOW);
1422 e_comp_object_effect_start(ec->frame, _eff_cb_restack_show_done, ec);
1423 _eff_object_background_setup(ec, NULL, group, E_EFFECT_TYPE_RESTACK_SHOW);
1425 else if (!e_util_strcmp(emission, "e,action,restack,hide"))
1427 /* if ec was changed to non-animatable, just up and down layer */
1428 if (!ec->animatable)
1430 _eff_object_layer_up(ec);
1431 _eff_object_layer_down(ec);
1434 if (!_eff_ref(ec)) return EINA_FALSE;
1438 E_Effect_Client *efc = NULL;
1439 efc = _eff_client_get(ec);
1442 if (_eff_ref(ec_home))
1444 EFFINF("SET EXTRA_ANIMATING...", ec_home);
1445 ec_home->extra_animating = EINA_TRUE;
1447 efc->reverse_ec = ec_home;
1449 EFFINF("SET EXTRA_ANIMATING...", ec);
1450 ec->extra_animating = EINA_TRUE;
1455 e_comp_override_add();
1457 _eff_object_layer_up(ec);
1459 _eff_object_setup(ec, group);
1460 _eff_object_under_setup(ec);
1462 ang = _eff_group_angle_get(ec, group);
1463 e_comp_object_effect_params_set(ec->frame, 0, (int[]){3, ang}, 2);
1467 _eff_pending_effect_set(ec,
1470 _eff_cb_restack_hide_done);
1474 _eff_event_send(ec, EINA_TRUE, E_EFFECT_TYPE_RESTACK_HIDE);
1475 e_comp_object_effect_start(ec->frame, _eff_cb_restack_hide_done, ec);
1476 _eff_object_background_setup(ec, ec_home, group, E_EFFECT_TYPE_RESTACK_HIDE);
1478 else if (!e_util_strcmp(emission, "e,action,restack,finish"))
1480 if (!_eff_ref(ec)) return EINA_FALSE;
1482 e_comp_override_add();
1484 _eff_object_setup(ec, group);
1485 _eff_object_under_setup(ec);
1487 ang = _eff_group_angle_get(ec, group);
1488 e_comp_object_effect_params_set(ec->frame, 0, (int[]){4, ang}, 2);
1492 _eff_pending_effect_set(ec,
1495 _eff_cb_restack_finish_done);
1499 e_comp_object_effect_start(ec->frame, _eff_cb_restack_finish_done, ec);
1506 _eff_cb_launch(void *data, Evas_Object *obj, const char *signal)
1509 struct wl_resource *res_surf;
1510 struct wl_resource *res_eff;
1511 struct wl_client *wc;
1512 unsigned int tizen_effect_type = 4;
1514 if (!_eff) return EINA_FALSE;
1516 ec = e_comp_object_client_get(obj);
1517 if ((!ec) || (!ec->comp_data)) return EINA_FALSE;
1518 if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
1520 res_surf = ec->comp_data->surface;
1521 if (!res_surf) return EINA_FALSE;
1523 wc = wl_resource_get_client(res_surf);
1524 if (!wc) return EINA_FALSE;
1526 res_eff = eina_hash_find(_eff->resources, &wc);
1527 if (!res_eff) return EINA_FALSE;
1529 EFFINF("SEND END |type:LAUNCH|win:0x%08x|tz_effect:0x%08x",
1531 (unsigned int)e_client_util_win_get(ec),
1532 (unsigned int)res_eff);
1534 tizen_effect_send_end(res_eff, res_surf, tizen_effect_type);
1540 _eff_cb_hook_client_new(void *d EINA_UNUSED, E_Client *ec)
1542 E_Effect_Client *efc;
1546 efc = _eff_client_get(ec);
1549 efc = _eff_client_new(ec);
1551 eina_hash_add(_eff->clients, &ec, efc);
1555 _eff_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
1557 E_Effect_Client *efc = NULL;
1561 _eff->stack.old = eina_list_remove(_eff->stack.old, ec);
1562 _eff->stack.cur = eina_list_remove(_eff->stack.cur, ec);
1564 if (_eff->next_done.ec == ec)
1565 memset(&_eff->next_done, 0, sizeof(_eff->next_done));
1567 if ((efc = _eff_client_get(ec)))
1569 if (!efc->animating)
1571 _eff_object_under_del(ec);
1572 eina_hash_del_by_key(_eff->clients, &ec);
1578 _eff_cb_client_restack(void *data, int type, void *event)
1581 E_Event_Client *ev = event;
1582 const char *emission = NULL;
1584 if (!_eff) return ECORE_CALLBACK_PASS_ON;
1587 if (!ec) return ECORE_CALLBACK_PASS_ON;
1588 if (e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_PASS_ON;
1590 EFFINF("Client restacked", ec);
1592 _eff_stack_update();
1594 if (!ec->animatable) return ECORE_CALLBACK_PASS_ON;
1595 if (!_eff_client_get(ec)) return ECORE_CALLBACK_PASS_ON;
1597 if ((emission = _eff_restack_effect_check(ec)))
1598 e_comp_object_signal_emit(ec->frame, emission, "e");
1600 return ECORE_CALLBACK_PASS_ON;
1604 _eff_cb_comp_enabled(void *data, int ev_type, void *event)
1606 if (!_eff) return ECORE_CALLBACK_PASS_ON;
1608 _eff_pending_effect_start();
1610 return ECORE_CALLBACK_PASS_ON;
1614 _eff_cb_client_buffer_change(void *data, int ev_type, void *event)
1616 E_Event_Client *ev = event;
1618 E_Effect_Client *efc;
1619 E_Comp_Wl_Buffer *buffer = NULL;
1621 if (!_eff) return ECORE_CALLBACK_PASS_ON;
1624 if (!ec) return ECORE_CALLBACK_PASS_ON;
1626 efc = _eff_client_get(ec);
1627 if (!efc) return ECORE_CALLBACK_PASS_ON;
1628 if (!efc->animating) return ECORE_CALLBACK_PASS_ON;
1632 buffer = e_pixmap_resource_get(ec->pixmap);
1633 if (buffer != efc->buffer_ref.buffer)
1635 e_comp_wl_buffer_reference(&efc->buffer_ref, buffer);
1639 return ECORE_CALLBACK_PASS_ON;
1643 _tz_effect_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *tz_res_eff)
1645 wl_resource_destroy(tz_res_eff);
1648 static const struct tizen_effect_interface _tz_effect_interface =
1650 _tz_effect_cb_destroy,
1654 _tz_effect_cb_effect_destroy(struct wl_resource *tz_res_eff)
1656 if ((!_eff) || (!_eff->resources)) return;
1658 eina_hash_del_by_data(_eff->resources, tz_res_eff);
1662 _eff_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version EINA_UNUSED, uint32_t id)
1664 struct wl_resource *res;
1666 if (!(res = wl_resource_create(client, &tizen_effect_interface, 1, id)))
1668 ERR("Could not create tizen_effect interface");
1669 wl_client_post_no_memory(client);
1673 wl_resource_set_implementation(res,
1674 &_tz_effect_interface,
1676 _tz_effect_cb_effect_destroy);
1678 eina_hash_add(_eff->resources, &client, res);
1682 _eff_cb_client_data_free(void *data)
1684 E_Effect_Client *efc = data;
1688 if (efc->buffer_ref.buffer)
1689 e_comp_wl_buffer_reference(&efc->buffer_ref, NULL);
1694 #undef E_CLIENT_HOOK_APPEND
1695 #define E_CLIENT_HOOK_APPEND(l, t, cb, d) \
1698 E_Client_Hook *_h; \
1699 _h = e_client_hook_add(t, cb, d); \
1701 l = eina_list_append(l, _h); \
1705 #undef E_COMP_OBJ_EFF_MOVER_APPEND
1706 #define E_COMP_OBJ_EFF_MOVER_APPEND(l, i, s, p, d) \
1709 E_Comp_Object_Mover *_m; \
1710 _m = e_comp_object_effect_mover_add(i, s, p, d); \
1712 l = eina_list_append(l, _m); \
1717 e_mod_effect_init(void)
1723 E_Effect_Client *efc;
1725 EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
1726 EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->evas, EINA_FALSE);
1728 eff = E_NEW(E_Effect, 1);
1729 EINA_SAFETY_ON_NULL_RETURN_VAL(eff, EINA_FALSE);
1733 if ((cfg = e_comp_config_get()))
1735 eff->file = eina_stringshare_add(cfg->effect_file);
1736 eff->style = eina_stringshare_add(cfg->effect_style);
1741 eff->style = "no-effect";
1744 eff->clients = eina_hash_pointer_new(_eff_cb_client_data_free);
1745 EINA_SAFETY_ON_NULL_GOTO(eff->clients, err);
1747 EINA_LIST_FOREACH(e_comp->clients, l, ec)
1749 if (ec->ignored) continue;
1751 efc = _eff_client_get(ec);
1753 efc = _eff_client_new(ec);
1755 eina_hash_add(eff->clients, &ec, efc);
1758 eff->resources = eina_hash_pointer_new(NULL);
1759 EINA_SAFETY_ON_NULL_GOTO(eff->resources, err);
1761 eff->global = wl_global_create(e_comp_wl->wl.disp,
1762 &tizen_effect_interface,
1768 ERR("Could not add tizen_efffect wayland globals: %m");
1772 E_LIST_HANDLER_APPEND(eff->event_hdlrs, E_EVENT_COMPOSITOR_ENABLE, _eff_cb_comp_enabled, eff);
1773 E_LIST_HANDLER_APPEND(eff->event_hdlrs, E_EVENT_CLIENT_BUFFER_CHANGE, _eff_cb_client_buffer_change, eff);
1774 E_LIST_HANDLER_APPEND(eff->event_hdlrs, E_EVENT_CLIENT_STACK, _eff_cb_client_restack, eff);
1775 E_CLIENT_HOOK_APPEND(eff->hooks_ec, E_CLIENT_HOOK_NEW_CLIENT, _eff_cb_hook_client_new, eff);
1776 E_CLIENT_HOOK_APPEND(eff->hooks_ec, E_CLIENT_HOOK_DEL, _eff_cb_hook_client_del, eff);
1777 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,state,visible", _eff_cb_visible, eff);
1778 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,state,hidden", _eff_cb_hidden, eff);
1779 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,action,iconify", _eff_cb_iconify, eff);
1780 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,action,uniconify", _eff_cb_uniconify, eff);
1781 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,action,restack*", _eff_cb_restack, eff);
1782 E_COMP_OBJ_EFF_MOVER_APPEND(eff->providers, 100, "e,action,launch,done", _eff_cb_launch, eff);
1787 e_mod_effect_shutdown();
1792 e_mod_effect_shutdown()
1796 E_FREE_FUNC(_eff->stack.old, eina_list_free);
1797 E_FREE_FUNC(_eff->stack.cur, eina_list_free);
1799 E_FREE_LIST(_eff->under_layers, free);
1800 E_FREE_LIST(_eff->providers, e_comp_object_effect_mover_del);
1801 E_FREE_LIST(_eff->event_hdlrs, ecore_event_handler_del);
1802 E_FREE_LIST(_eff->hooks_ec, e_client_hook_del);
1805 wl_global_destroy(_eff->global);
1807 E_FREE_FUNC(_eff->resources, eina_hash_free);
1808 E_FREE_FUNC(_eff->clients, eina_hash_free);
1810 if (e_comp_config_get())
1812 eina_stringshare_del(_eff->file);
1813 eina_stringshare_del(_eff->style);