forked from enlightenment/enlightenment
parent
9ab4315be8
commit
4ddbb50b01
|
@ -65,8 +65,7 @@ e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
/* smart code here */
|
/* smart code here */
|
||||||
if(sd->obj)
|
if (sd->obj) evas_object_del(sd->obj);
|
||||||
evas_object_del(sd->obj);
|
|
||||||
sd->obj = edje_object_add(evas_object_evas_get(obj));
|
sd->obj = edje_object_add(evas_object_evas_get(obj));
|
||||||
edje_object_file_set(sd->obj, file, part);
|
edje_object_file_set(sd->obj, file, part);
|
||||||
_e_icon_smart_reconfigure(sd);
|
_e_icon_smart_reconfigure(sd);
|
||||||
|
@ -79,7 +78,7 @@ e_icon_file_get(Evas_Object *obj)
|
||||||
char *file;
|
char *file;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
{
|
{
|
||||||
edje_object_file_get(sd->obj, &file, NULL);
|
edje_object_file_get(sd->obj, &file, NULL);
|
||||||
return file;
|
return file;
|
||||||
|
@ -94,7 +93,7 @@ e_icon_smooth_scale_set(Evas_Object *obj, int smooth)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return;
|
||||||
evas_object_image_smooth_scale_set(sd->obj, smooth);
|
evas_object_image_smooth_scale_set(sd->obj, smooth);
|
||||||
}
|
}
|
||||||
|
@ -103,10 +102,10 @@ int
|
||||||
e_icon_smooth_scale_get(Evas_Object *obj)
|
e_icon_smooth_scale_get(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return 0;
|
||||||
return evas_object_image_smooth_scale_get(sd->obj);
|
return evas_object_image_smooth_scale_get(sd->obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +115,7 @@ e_icon_alpha_set(Evas_Object *obj, int alpha)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return;
|
||||||
evas_object_image_alpha_set(sd->obj, alpha);
|
evas_object_image_alpha_set(sd->obj, alpha);
|
||||||
}
|
}
|
||||||
|
@ -127,8 +126,8 @@ e_icon_alpha_get(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return 0;
|
||||||
return evas_object_image_alpha_get(sd->obj);
|
return evas_object_image_alpha_get(sd->obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +168,7 @@ e_icon_data_set(Evas_Object *obj, void *data, int w, int h)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return;
|
||||||
evas_object_image_size_set(sd->obj, w, h);
|
evas_object_image_size_set(sd->obj, w, h);
|
||||||
evas_object_image_data_copy_set(sd->obj, data);
|
evas_object_image_data_copy_set(sd->obj, data);
|
||||||
|
@ -181,8 +180,8 @@ e_icon_data_get(Evas_Object *obj, int *w, int *h)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
return;
|
return NULL;
|
||||||
evas_object_image_size_get(sd->obj, w, h);
|
evas_object_image_size_get(sd->obj, w, h);
|
||||||
return evas_object_image_data_get(sd->obj, 0);
|
return evas_object_image_data_get(sd->obj, 0);
|
||||||
}
|
}
|
||||||
|
@ -196,7 +195,7 @@ _e_icon_smart_reconfigure(E_Smart_Data *sd)
|
||||||
|
|
||||||
ih = 0;
|
ih = 0;
|
||||||
ih = 0;
|
ih = 0;
|
||||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||||
edje_object_size_min_calc(sd->obj, &iw, &ih);
|
edje_object_size_min_calc(sd->obj, &iw, &ih);
|
||||||
else
|
else
|
||||||
evas_object_image_size_get(sd->obj, &iw, &ih);
|
evas_object_image_size_get(sd->obj, &iw, &ih);
|
||||||
|
|
Loading…
Reference in New Issue