more ilist widget work... but more fix up livethumb to be cleaner


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 17 years ago
parent 43e88e956e
commit f503db40a0
  1. 21
      src/bin/e_livethumb.c
  2. 2
      src/bin/e_livethumb.h
  3. 2
      src/bin/e_test.c
  4. 4
      src/bin/e_widget_ilist.c

@ -38,21 +38,10 @@ static Evas_Smart *_e_smart = NULL;
/* externally accessible functions */
Evas_Object *
e_livethumb_add(Ecore_Evas *ee)
e_livethumb_add(Evas *e)
{
Evas_Object *obj;
E_Smart_Data *sd;
_e_smart_init();
obj = evas_object_smart_add(ecore_evas_get(ee), _e_smart);
sd = evas_object_smart_data_get(obj);
sd->evas_obj = ecore_evas_object_image_new(ee);
evas_object_smart_member_add(sd->evas_obj, obj);
evas_object_image_size_set(sd->evas_obj, sd->vw, sd->vh);
sd->evas = ecore_evas_get(evas_object_data_get(sd->evas_obj, "Ecore_Evas"));
e_canvas_add(evas_object_data_get(sd->evas_obj, "Ecore_Evas"));
return obj;
return evas_object_smart_add(e, _e_smart);
}
Evas *
@ -130,6 +119,12 @@ _e_smart_add(Evas_Object *obj)
sd->h = 0;
sd->vw = 1;
sd->vh = 1;
sd->evas_obj = ecore_evas_object_image_new(ecore_evas_ecore_evas_get(evas_object_evas_get(obj)));
evas_object_smart_member_add(sd->evas_obj, obj);
evas_object_image_size_set(sd->evas_obj, sd->vw, sd->vh);
sd->evas = ecore_evas_get(evas_object_data_get(sd->evas_obj, "Ecore_Evas"));
e_canvas_add(evas_object_data_get(sd->evas_obj, "Ecore_Evas"));
}
static void

@ -6,7 +6,7 @@
#ifndef E_LIVETHUMB_H
#define E_LIVETHUMB_H
EAPI Evas_Object *e_livethumb_add (Ecore_Evas *ee);
EAPI Evas_Object *e_livethumb_add (Evas *e);
EAPI Evas *e_livethumb_evas_get (Evas_Object *obj);
EAPI void e_livethumb_vsize_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
EAPI void e_livethumb_vsize_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);

@ -437,7 +437,7 @@ _e_test_internal(E_Container *con)
o = e_ilist_add(dia->win->evas);
e_ilist_icon_size_set(o, 80, 48);
o3 = e_livethumb_add(dia->win->ecore_evas);
o3 = e_livethumb_add(dia->win->evas);
e_livethumb_vsize_set(o3, 160, 96);
o4 = edje_object_add(e_livethumb_evas_get(o3));
e_theme_edje_object_set(o4, "base/theme/borders",

@ -47,9 +47,6 @@ e_widget_ilist_add(Evas *evas, int icon_w, int icon_h)
evas_object_resize(obj, 32, 32);
e_widget_min_size_set(obj, 32, 32);
// edje_object_size_min_calc(wd->o_frame, &mw, &mh);
// e_widget_min_size_set(obj, mw, mh);
return obj;
}
@ -60,6 +57,7 @@ e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, char *label, void (*f
Evas_Coord mw, mh, vw, vh, w, h;
wd = e_widget_data_get(obj);
/* FIXME: need to actually store the callback and call it */
e_ilist_append(wd->o_ilist, icon, label, _e_wid_cb_item_sel, wd, data);
if (icon) evas_object_show(icon);
e_ilist_min_size_get(wd->o_ilist, &mw, &mh);

Loading…
Cancel
Save