}
/////////////////////////////////////
+#ifdef REMOVE_EDJE_OBJ
+static void
+_e_comp_object_update(E_Comp_Object *cw)
+{
+ evas_object_smart_member_add(cw->obj, cw->smart_obj);
+ evas_object_clip_set(cw->obj, cw->clip);
+}
+#else
/* function for setting up a client's compositor frame theme (cw->shobj) */
static Eina_Bool
_e_comp_object_shadow_setup(E_Comp_Object *cw)
return EINA_TRUE;
}
+#endif
/////////////////////////////////////////////
+#ifdef REMOVE_EDJE_OBJ
+static Eina_Bool _e_comp_object_animating_end(E_Comp_Object *cw);
+
+static void
+_e_comp_object_animating_end_job(void *data)
+{
+ E_Comp_Object *cw = data;
+ _e_comp_object_animating_end(cw);
+}
+#endif
static void
_e_comp_object_animating_begin(E_Comp_Object *cw)
REFD(cw->ec, 2);
e_object_ref(E_OBJECT(cw->ec));
}
+
+#ifdef REMOVE_EDJE_OBJ
+ // TODO: This should be changed after applying new effect feature
+ ecore_job_add(_e_comp_object_animating_end_job, cw);
+#endif
}
static Eina_Bool
e_comp_object_signal_emit(cw->ec->frame, "e,action,launch,done", "e");
}
}
+#ifdef REMOVE_EDJE_OBJ
+ else if (cw->defer_hide)
+ {
+ // This is the code that replaces the _e_comp_object_done_defer function.
+ ELOGF("COMP", "defer hide after finishing animation", cw->ec);
+ evas_object_hide(cw->smart_obj);
+ }
+#endif
}
comp->animating--;
cw->showing = cw->hiding = 0;
return EINA_TRUE;
}
+#ifdef REMOVE_EDJE_OBJ
+#else
/* handle the end of a compositor animation */
static void
_e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *emission, const char *source EINA_UNUSED)
/* visible clients which have never been sized are a bug */
if ((!cw->ec->new_client) && (!cw->ec->changes.size) && ((cw->w < 0) || (cw->h < 0)) && (!strcmp(emission, "e,action,show,done")))
CRI("ACK! ec:%p", cw->ec);
+
if (!_e_comp_object_animating_end(cw)) return;
if (cw->animating) return;
/* hide only after animation finishes to guarantee a full run of the animation */
evas_object_hide(cw->smart_obj);
}
}
+#endif
/////////////////////////////////////////////
return;
}
+#ifdef REMOVE_EDJE_OBJ
+#else
if (cw->effect_obj)
{
evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
}
}
-
if (cw->shobj)
{
evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
return;
}
}
+#endif
if (cw->obj)
{
_e_comp_object_color_visible_set(cw, EINA_TRUE);
}
+#ifdef REMOVE_EDJE_OBJ
+#else
static void
_e_comp_intercept_effect_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
{
_e_comp_object_color_visible_update(cw);
}
+#endif
static void
_e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
static void
_e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
{
+#ifdef REMOVE_EDJE_OBJ
+ if (cw->setup) return;
+
+ cw->clip = evas_object_rectangle_add(comp->evas);
+ evas_object_move(cw->clip, -9999, -9999);
+ evas_object_resize(cw->clip, 999999, 999999);
+ evas_object_smart_member_add(cw->clip, cw->smart_obj);
+
+ /* name objects appropriately for nicer printing */
+ if (cw->ec->override)
+ {
+ evas_object_name_set(cw->clip, "cw->clip::WINDOW");
+ }
+ else if (!cw->ec->input_only)
+ {
+ evas_object_name_set(cw->clip, "cw->clip::CLIENT");
+ }
+#else
cw->clip = evas_object_rectangle_add(comp->evas);
evas_object_move(cw->clip, -9999, -9999);
evas_object_resize(cw->clip, 999999, 999999);
evas_object_name_set(cw->effect_obj, "cw->effect_obj::CLIENT");
evas_object_name_set(cw->clip, "cw->clip::CLIENT");
}
+#endif
+
cw->real_hid = !cw->ec->input_only;
if (!cw->ec->input_only)
{
evas_object_smart_member_add(cw->default_input_obj, cw->smart_obj);
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_OBJECT_SETUP, cw->ec);
+
+ cw->setup = EINA_TRUE;
}
/////////////////////////////////////////////
bx = by = bxx = byy = 0;
evas_object_image_border_set(cw->obj, bx, bxx, by, byy);
}
+#ifdef REMOVE_EDJE_OBJ
+#else
{
Edje_Message_Int_Set *msg;
Edje_Message_Int msg2;
msg2.val = id;
edje_object_message_send(cw->shobj, EDJE_MESSAGE_INT, 0, &msg2);
}
+#endif
if (cw->native)
{
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
return;
}
}
+#ifdef REMOVE_EDJE_OBJ
+ if (cw->ec->new_client || (!cw->ec->visible) || (!cw->setup))
+#else
if (cw->ec->new_client || (!cw->ec->visible) || (!cw->effect_obj))
+#endif
{
/* do nothing until client idler loops */
if ((cw->ec->w != w) || (cw->ec->h != h))
if (ec->ignored) return;
comp = e_comp_get();
+#ifdef REMOVE_EDJE_OBJ
+ if (cw->setup)
+#else
if (cw->effect_obj)
+#endif
{
//INF("SHOW2 %p", ec);
_e_comp_intercept_show_helper(cw, comp);
//INF("SHOW %p", ec);
if (ec->input_only)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
cw->effect_obj = evas_object_rectangle_add(comp->evas);
evas_object_color_set(cw->effect_obj, 0, 0, 0, 0);
evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
evas_object_name_set(cw->effect_obj, "cw->effect_obj::input_only");
+#endif
+ cw->setup = EINA_TRUE;
}
else
{
}
_e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
+#ifdef REMOVE_EDJE_OBJ
+#else
evas_object_geometry_set(cw->effect_obj, cw->x, cw->y, tw, th);
+#endif
if (cw->input_obj)
{
input_rect_sd = evas_object_smart_data_get(cw->input_obj);
cw->hiding = 0;
evas_object_hide(cw->clip);
if (cw->input_obj) evas_object_hide(cw->input_obj);
+#ifdef REMOVE_EDJE_OBJ
+ if (cw->obj) evas_object_hide(cw->obj);
+#else
evas_object_hide(cw->effect_obj);
+#endif
+
if (cw->default_input_obj) evas_object_hide(cw->default_input_obj);
if (cw->transform_bg_obj) evas_object_hide(cw->transform_bg_obj);
if (cw->transform_tranp_obj) evas_object_hide(cw->transform_tranp_obj);
_e_comp_object_native_surface_set(cw, NULL, EINA_TRUE);
}
+#ifdef REMOVE_EDJE_OBJ
+#else
if (!cw->ec->input_only)
{
edje_object_freeze(cw->effect_obj);
edje_object_freeze(cw->shobj);
edje_object_play_set(cw->shobj, 0);
}
+#endif
e_comp_render_queue(); //force nocomp recheck
evas_object_show(cw->clip);
if (cw->input_obj) evas_object_show(cw->input_obj);
+#ifdef REMOVE_EDJE_OBJ
+ if (cw->obj) evas_object_show(cw->obj);
+#else
if (!cw->ec->input_only)
{
edje_object_thaw(cw->effect_obj);
edje_object_play_set(cw->shobj, 1);
}
evas_object_show(cw->effect_obj);
+#endif
if (cw->mask.obj) evas_object_show(cw->mask.obj);
if (cw->transform_bg_obj) evas_object_show(cw->transform_bg_obj);
if (cw->transform_tranp_obj) evas_object_show(cw->transform_tranp_obj);
_e_comp_object_mouse_event_callback_unset(cw);
evas_object_del(cw->clip);
evas_object_del(cw->obj);
+#ifdef REMOVE_EDJE_OBJ
+#else
evas_object_del(cw->shobj);
evas_object_del(cw->effect_obj);
+#endif
evas_object_del(cw->input_obj);
evas_object_del(cw->mask.obj);
if (cw->dim.mask_obj) evas_object_del(cw->dim.mask_obj);
INTERNAL_ENTRY;
cw->x = x, cw->y = y;
+#ifdef REMOVE_EDJE_OBJ
+ evas_object_move(cw->obj, x, y);
+#else
evas_object_move(cw->effect_obj, x, y);
+#endif
evas_object_move(cw->default_input_obj, x, y);
if (cw->input_obj) evas_object_move(cw->input_obj, x, y);
INTERNAL_ENTRY;
+#ifdef REMOVE_EDJE_OBJ
+#else
if (!cw->effect_obj) CRI("ACK! ec:%p", cw->ec);
+#endif
TRACE_DS_BEGIN(COMP:SMART RESIZE);
if ((ww != pw) || (hh != ph))
ELOGF("COMP", "CW RSZ: %dx%d || PX: %dx%d.", cw->ec, ww, hh, pw, ph);
}
+#ifdef REMOVE_EDJE_OBJ
+ evas_object_resize(cw->obj, tw, th);
+#else
evas_object_resize(cw->effect_obj, tw, th);
+#endif
evas_object_resize(cw->default_input_obj, w, h);
if (cw->input_obj)
evas_object_resize(cw->input_obj, w, h);
API_ENTRY EINA_FALSE;
if (!e_util_strcmp(name, "COMP_RESHADOW"))
+#ifdef REMOVE_EDJE_OBJ
+ {
+ _e_comp_object_update(cw);
+ }
+#else
return _e_comp_object_shadow_setup(cw);
+#endif
return EINA_FALSE;
}
E_API void
e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
E_Comp_Object_Mover *prov;
API_ENTRY;
if (!e_util_glob_match(sig, prov->sig)) continue;
if (prov->func(prov->data, obj, sig)) break;
}
+#endif
}
E_API void
e_comp_object_signal_callback_add(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb, const void *data)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
/* FIXME: at some point I guess this should use eo to inherit
* -EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_ADD
* -EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_DEL
*/
API_ENTRY;
edje_object_signal_callback_add(cw->shobj, sig, src, cb, (void*)data);
+#endif
}
E_API void
e_comp_object_signal_callback_del(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
API_ENTRY;
edje_object_signal_callback_del(cw->shobj, sig, src, cb);
+#endif
}
E_API void
e_comp_object_signal_callback_del_full(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb, const void *data)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
API_ENTRY;
edje_object_signal_callback_del_full(cw->shobj, sig, src, cb, (void*)data);
+#endif
}
E_API void
E_API Eina_Bool
e_comp_object_effect_set(Evas_Object *obj, const char *effect)
{
+#ifdef REMOVE_EDJE_OBJ
+ return EINA_FALSE;
+#else
char buf[4096];
Eina_Stringshare *grp;
E_Comp_Config *config;
_e_comp_object_dim_update(cw);
return cw->effect_set;
+#endif
}
/* set params for embryo scripts in effect */
E_API void
e_comp_object_effect_params_set(Evas_Object *obj, int id, int *params, unsigned int count)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
Edje_Message_Int_Set *msg;
unsigned int x;
msg->val[x] = params[x];
edje_object_message_send(cw->effect_obj, EDJE_MESSAGE_INT_SET, id, msg);
edje_object_message_signal_process(cw->effect_obj);
+#endif
}
+#ifdef REMOVE_EDJE_OBJ
+#else
static void
_e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_EFFECT_END, cw->ec);
end_cb(end_data, cw->smart_obj, emission, source);
}
+#endif
/* clip effect to client's zone */
EINTERN void
EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE); //NYI
if (!cw->effect_set) return EINA_FALSE;
+#ifdef REMOVE_EDJE_OBJ
+ e_comp_object_effect_clip(obj);
+ evas_object_data_set(cw->smart_obj, "effect_running", (void*)1);
+
+ _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_EFFECT_START, cw->ec);
+ _e_comp_object_event_simple(obj, E_EVENT_COMP_OBJECT_EFFECT_START);
+#else
if (cw->effect_running)
{
e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb"));
_e_comp_object_event_simple(obj, E_EVENT_COMP_OBJECT_EFFECT_START);
edje_object_signal_emit(cw->effect_obj, "e,action,go", "e");
+#endif
+
_e_comp_object_animating_begin(cw);
cw->effect_running = 1;
return EINA_TRUE;
void *end_data_before = NULL;
API_ENTRY EINA_FALSE;
+#ifdef REMOVE_EDJE_OBJ
+ if (end_cb_before != end_cb) return EINA_TRUE;
+ e_comp_object_effect_unclip(obj);
+ if (cw->effect_clip)
+ {
+ cw->effect_clip = 0;
+ }
+#else
end_cb_before = evas_object_data_get(cw->effect_obj, "_e_comp.end_cb");
end_data_before = evas_object_data_get(cw->effect_obj, "_e_comp.end_data");
}
edje_object_signal_emit(cw->effect_obj, "e,action,stop", "e");
edje_object_signal_callback_del_full(cw->effect_obj, "e,action,done", "e", _e_comp_object_effect_end_cb, cw);
+#endif
if (evas_object_data_get(cw->smart_obj, "effect_running"))
{
{
API_ENTRY NULL;
+#ifdef REMOVE_EDJE_OBJ
+ return NULL;
+#else
return cw->effect_obj;
+#endif
}
E_API Eina_Bool
evas_object_pass_events_set(cw->obj, EINA_TRUE);
_e_comp_object_alpha_set(cw);
+#ifdef REMOVE_EDJE_OBJ
+ _e_comp_object_update(cw);
+#else
if (cw->shobj)
_e_comp_object_shadow_setup(cw);
+#endif
wl_signal_emit(&cw->events.content_type_set, NULL);
if (cw->obj)
{
+#ifdef REMOVE_EDJE_OBJ
+#else
if (cw->shobj)
edje_object_part_unswallow(cw->shobj, cw->obj);
+#endif
- evas_object_del(cw->obj);
evas_object_hide(cw->obj);
+ evas_object_del(cw->obj);
cw->obj = NULL;
}
evas_object_pass_events_set(cw->obj, EINA_TRUE);
_e_comp_object_alpha_set(cw);
+#ifdef REMOVE_EDJE_OBJ
+ _e_comp_object_update(cw);
+#else
if (cw->shobj)
_e_comp_object_shadow_setup(cw);
+#endif
if (cw->visible)
{
if (!ec) return;
if (!conf->dim_rect_enable) return;
+#ifdef REMOVE_EDJE_OBJ
+#else
if (!cw->effect_obj) return;
+#endif
if (enable == cw->dim.enable) return;
ELOGF("COMP", "DIM |set on Client [%d]", ec, enable);
if (!cw) return;
if (!conf->dim_rect_enable) return;
+#ifdef REMOVE_EDJE_OBJ
+#else
if (!cw->effect_obj) return;
+#endif
if (cw->dim.enable)
{
ELOGF("COMP", "DIM |Applied on Client dim.enable[%d]", cw->ec, cw->dim.enable);
e_comp_object_effect_object_part_swallow(Evas_Object *obj, const char *part_name, Evas_Object *swallow_obj)
{
API_ENTRY EINA_FALSE;
+#ifdef REMOVE_EDJE_OBJ
+ return EINA_FALSE;
+#else
return edje_object_part_swallow(cw->effect_obj, part_name, swallow_obj);
+#endif
}
/* buffer transform and scale are applied to e_comp_object and e_pixmap internaly */
(!e_surface_buffer_transform_get(surface) &&
e_surface_buffer_scale_get(surface) == 1))
{
+#ifdef REMOVE_EDJE_OBJ
+ if (evas_object_map_enable_get(cw->obj))
+ {
+ ELOGF("TRANSFORM", "map: disable", cw->ec);
+ evas_object_map_enable_set(cw->obj, EINA_FALSE);
+ _e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
+ evas_object_resize(cw->obj, tw, th);
+ }
+
+#else
if (evas_object_map_enable_get(cw->effect_obj))
{
ELOGF("TRANSFORM", "map: disable", cw->ec);
_e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
evas_object_resize(cw->effect_obj, tw, th);
}
+#endif
return;
}
cw->ec,
ec->x, ec->y, bw, bh, x1, y1, x2, y1, x2, y2, x1, y2, buffer);
+#ifdef REMOVE_EDJE_OBJ
+ e_comp_object_map_set(cw->obj, map);
+ e_comp_object_map_enable_set(cw->obj, EINA_TRUE);
+#else
e_comp_object_map_set(cw->effect_obj, map);
e_comp_object_map_enable_set(cw->effect_obj, EINA_TRUE);
+#endif
e_map_free(map);
* ec->obj should rotate. if not, in evas_map, update region is clipped.
*/
_e_comp_object_map_transform_rect(cw->ec, 0, 0, bw, bh, NULL, NULL, &tw, &th);
+#ifdef REMOVE_EDJE_OBJ
+ evas_object_resize(cw->obj, tw, th);
+#else
evas_object_resize(cw->effect_obj, tw, th);
+#endif
}
EINTERN Eina_Bool