#endif
EINTERN Evas_Object *
-e_comp_object_util_add(Evas_Object *obj, E_Comp_Object_Type type)
+e_comp_object_util_add(Evas_Object *obj)
{
Evas_Object *o, *z = NULL;
const char *name;
- Eina_List *l, *list = NULL;
E_Comp_Config *conf = e_comp_config_get();
- Eina_Bool skip = EINA_FALSE, fast = EINA_FALSE, shadow = EINA_FALSE;
- E_Comp_Match *m;
+ Eina_Bool skip = EINA_FALSE;
char buf[1024];
int ok = 0;
int x, y, w, h;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
- switch (type)
- {
- default:
- list = conf->match.objects;
- skip = conf->match.disable_objects;
- fast = conf->fast_objects;
- }
name = evas_object_name_get(obj);
vis = evas_object_visible_get(obj);
o = edje_object_add(e_comp->evas);
evas_object_data_set(o, "comp_object", (void*)1);
- if (name && (!skip))
+ if (name)
skip = (!strncmp(name, "noshadow", 8));
if (skip)
evas_object_data_set(o, "comp_object_skip", (void*)1);
- else if (list)
- {
- EINA_LIST_FOREACH(list, l, m)
- {
- if (((m->name) && (!name)) ||
- ((name) && (m->name) && (!e_util_glob_match(name, m->name))))
- continue;
- if (!m->shadow_style) continue;
- if (fast)
- {
- snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", m->shadow_style);
- ok = e_theme_edje_object_set(o, "base/theme/comp", buf);
- }
- if (!ok)
- {
- snprintf(buf, sizeof(buf), "e/comp/frame/%s", m->shadow_style);
- ok = e_theme_edje_object_set(o, "base/theme/comp", buf);
- }
- if (ok)
- {
- shadow = !m->no_shadow;
- break;
- }
- }
- }
- else
- skip = EINA_TRUE;
+
while (!ok)
{
- if (skip)
- ok = e_theme_edje_object_set(o, "base/theme/comp", "e/comp/frame/none");
if (ok) break;
if (conf->shadow_style)
{
- if (fast)
- {
- snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", conf->shadow_style);
- ok = e_theme_edje_object_set(o, "base/theme/comp", buf);
- }
if (!ok)
{
snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
}
if (ok) break;
}
- if (fast)
- ok = e_theme_edje_object_set(o, "base/theme/comp", "e/comp/frame/default/fast");
if (!ok)
ok = e_theme_edje_object_set(o, "base/theme/comp", "e/comp/frame/default");
break;
}
- if (shadow && (e_util_strcmp(evas_object_type_get(obj), "edje") || (!edje_object_data_get(obj, "noshadow"))))
+ if (e_util_strcmp(evas_object_type_get(obj), "edje") || (!edje_object_data_get(obj, "noshadow")))
edje_object_signal_emit(o, "e,state,shadow,on", "e");
else
edje_object_signal_emit(o, "e,state,shadow,off", "e");
typedef enum
{
- E_COMP_OBJECT_TYPE_NONE,
- E_COMP_OBJECT_TYPE_LAST,
-} E_Comp_Object_Type;
-
-typedef enum
-{
E_COMP_OBJECT_CONTENT_TYPE_NONE,
E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE,
E_COMP_OBJECT_CONTENT_TYPE_EXT_IMAGE,
EINTERN Eina_Bool e_comp_object_mirror_visibility_check(Evas_Object *obj);
EINTERN Evas_Object *e_comp_object_client_add(E_Client *ec);
EINTERN Evas_Object *e_comp_object_util_mirror_add(Evas_Object *obj);
-EINTERN Evas_Object *e_comp_object_util_add(Evas_Object *obj, E_Comp_Object_Type type);
+EINTERN Evas_Object *e_comp_object_util_add(Evas_Object *obj);
EINTERN void e_comp_object_frame_xy_adjust(Evas_Object *obj, int x, int y, int *ax, int *ay);
E_API void e_comp_object_frame_xy_unadjust(Evas_Object *obj, int x, int y, int *ax, int *ay);
EINTERN void e_comp_object_frame_wh_adjust(Evas_Object *obj, int w, int h, int *aw, int *ah);