aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_widget_image.c
diff options
context:
space:
mode:
authorcodewarrior <codewarrior>2005-11-22 09:27:25 +0000
committercodewarrior <codewarrior@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-11-22 09:27:25 +0000
commit97cc78cdb0bfb076a54f260bffeb2e5485bdb312 (patch)
treea30c6f9b93fadb60626c0c10fd8a1522e98686f6 /src/bin/e_widget_image.c
parentfix desktop config dialog - prepare for doing a real desktop - preview (blank (diff)
downloadenlightenment-97cc78cdb0bfb076a54f260bffeb2e5485bdb312.tar.gz
- make e_thumb fork internally
- add queue / dequeue calls to e_thumb - change e_icon_layout to e_icon_grid - add e_icon_canvas which will eventually allow for free icon placement and optimized scrolling using a tiles principle - add new calls to e_widget_image - add new bg selector (broken because of a segv on cancel press, needs fixing) NOTES: - bg selector needs fixing. - efm still needs work, will segv if you scroll while files are generated - other efm bugs exist so I would advise that you dont use it atm - if we dont need e_icon_grid (strict grid layout) we should remove it. SVN revision: 18593
Diffstat (limited to 'src/bin/e_widget_image.c')
-rw-r--r--src/bin/e_widget_image.c73
1 files changed, 65 insertions, 8 deletions
diff --git a/src/bin/e_widget_image.c b/src/bin/e_widget_image.c
index cb75a45a2..6cc67b013 100644
--- a/src/bin/e_widget_image.c
+++ b/src/bin/e_widget_image.c
@@ -2,22 +2,34 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
-
+
+typedef struct _E_Widget_Data E_Widget_Data;
+struct _E_Widget_Data
+{
+ Evas_Object *img;
+};
+
/* local subsystem functions */
/* externally accessible functions */
Evas_Object *
e_widget_image_add_from_object(Evas *evas, Evas_Object *object, int minw, int minh)
{
- Evas_Object *obj;
+ Evas_Object *obj, *o;
+ E_Widget_Data *wd;
obj = e_widget_add(evas);
-
+ wd = calloc(1, sizeof(E_Widget_Data));
+
evas_object_show(object);
+ o = e_icon_add(evas);
+ e_icon_object_set(o, object);
+ wd->img = o;
+ e_widget_data_set(obj, wd);
e_widget_can_focus_set(obj, 0);
e_widget_min_size_set(obj, minw, minh);
- e_widget_sub_object_add(obj, object);
- e_widget_resize_object_set(obj, object);
+ e_widget_sub_object_add(obj, o);
+ e_widget_resize_object_set(obj, o);
return obj;
}
@@ -25,13 +37,18 @@ e_widget_image_add_from_object(Evas *evas, Evas_Object *object, int minw, int mi
Evas_Object *
e_widget_image_add_from_file(Evas *evas, char *file, int minw, int minh)
{
- Evas_Object *obj, *o;
+ Evas_Object *obj, *o, *o2;
+ E_Widget_Data *wd;
obj = e_widget_add(evas);
+ wd = calloc(1, sizeof(E_Widget_Data));
- o = evas_object_image_add(evas);
- evas_object_image_file_set(o, file, NULL);
+ o = e_icon_add(evas);
+ o2 = evas_object_image_add(evas);
+ evas_object_image_file_set(o2, file, NULL);
+ e_icon_object_set(o, o2);
+ wd->img = o;
evas_object_show(o);
e_widget_can_focus_set(obj, 0);
e_widget_min_size_set(obj, minw, minh);
@@ -40,3 +57,43 @@ e_widget_image_add_from_file(Evas *evas, char *file, int minw, int minh)
return obj;
}
+
+void
+e_widget_image_edje_set(Evas_Object *obj, char *file, char *part)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ e_icon_file_edje_set(wd->img, file, part);
+ evas_object_show(wd->img);
+}
+
+void
+e_widget_image_file_set(Evas_Object *obj, char *file)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ e_icon_file_set(wd->img, file);
+ evas_object_show(wd->img);
+}
+
+void
+e_widget_image_file_key_set(Evas_Object *obj, char *file, char *key)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ e_icon_file_key_set(wd->img, file, key);
+ evas_object_show(wd->img);
+}
+
+void
+e_widget_image_object_set(Evas_Object *obj, Evas_Object *o)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ e_icon_object_set(wd->img, o);
+ evas_object_show(wd->img);
+}