aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-14 19:58:07 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-14 20:43:31 -0500
commite9da6a02fc18cb6edc41633a2dfc688891a51764 (patch)
tree5c803590ba45bb240bc5826da86fff650701ee67 /src/bin
parentmake comp cfd unresizable (diff)
downloadenlightenment-e9da6a02fc18cb6edc41633a2dfc688891a51764.tar.gz
e frame -> elm_frame conversion
wheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee #teamborker
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/e_widget_framelist.c23
-rw-r--r--src/bin/e_widget_frametable.c38
2 files changed, 10 insertions, 51 deletions
diff --git a/src/bin/e_widget_framelist.c b/src/bin/e_widget_framelist.c
index 29fd11c4c..e6e144fe1 100644
--- a/src/bin/e_widget_framelist.c
+++ b/src/bin/e_widget_framelist.c
@@ -15,10 +15,10 @@ static void _e_wid_disable_hook(Evas_Object *obj);
EAPI Evas_Object *
e_widget_framelist_add(Evas *evas, const char *label, int horiz)
{
- Evas_Object *obj, *o;
+ Evas_Object *obj, *o, *win;
E_Widget_Data *wd;
- Evas_Coord mw = 0, mh = 0;
+ win = e_win_evas_win_get(evas);
obj = e_widget_add(evas);
e_widget_del_hook_set(obj, _e_wid_del_hook);
@@ -26,26 +26,21 @@ e_widget_framelist_add(Evas *evas, const char *label, int horiz)
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- o = edje_object_add(evas);
+ o = elm_frame_add(win);
wd->o_frame = o;
- e_theme_edje_object_set(o, "base/theme/widgets",
- "e/widgets/frame");
- edje_object_part_text_set(o, "e.text.label", label);
+ elm_object_text_set(o, label);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- o = elm_box_add(obj);
+ o = elm_box_add(win);
wd->o_box = o;
elm_box_horizontal_set(o, horiz);
elm_box_homogeneous_set(o, 0);
- edje_object_part_swallow(wd->o_frame, "e.swallow.content", o);
+ elm_object_content_set(wd->o_frame, o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
-
return obj;
}
@@ -66,9 +61,6 @@ e_widget_framelist_object_append_full(Evas_Object *obj, Evas_Object *sobj, int f
evas_object_size_hint_min_set(sobj, min_w, min_h);
evas_object_size_hint_max_set(sobj, max_w, max_h);
elm_box_recalculate(wd->o_box);
- edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_box);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
@@ -87,9 +79,6 @@ e_widget_framelist_object_append(Evas_Object *obj, Evas_Object *sobj)
E_FILL(sobj);
evas_object_size_hint_min_set(sobj, mw, mh);
elm_box_recalculate(wd->o_box);
- edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_box);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
diff --git a/src/bin/e_widget_frametable.c b/src/bin/e_widget_frametable.c
index 50b445065..ec12c0b1c 100644
--- a/src/bin/e_widget_frametable.c
+++ b/src/bin/e_widget_frametable.c
@@ -9,15 +9,7 @@ struct _E_Widget_Data
static void _e_wid_del_hook(Evas_Object *obj);
static void _e_wid_disable_hook(Evas_Object *obj);
-static void
-_size_hint(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
- int w, h;
- E_Widget_Data *wd = data;
- edje_object_size_min_calc(wd->o_frame, &w, &h);
- e_widget_size_min_set(wd->obj, w, h);
-}
/* local subsystem functions */
/* externally accessible functions */
@@ -26,7 +18,6 @@ e_widget_frametable_add(Evas *evas, const char *label, int homogenous)
{
Evas_Object *obj, *o;
E_Widget_Data *wd;
- Evas_Coord mw, mh;
obj = e_widget_add(evas);
@@ -36,26 +27,20 @@ e_widget_frametable_add(Evas *evas, const char *label, int homogenous)
e_widget_data_set(obj, wd);
wd->obj = obj;
- o = edje_object_add(e_win_evas_win_get(evas));
+ o = elm_frame_add(e_win_evas_win_get(evas));
wd->o_frame = o;
- e_theme_edje_object_set(o, "base/theme/widgets",
- "e/widgets/frame");
- edje_object_part_text_set(o, "e.text.label", label);
+ elm_object_text_set(o, label);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
o = elm_table_add(e_win_evas_win_get(evas));
- evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hint, wd);
wd->o_table = o;
elm_table_homogeneous_set(o, homogenous);
- edje_object_part_swallow(wd->o_frame, "e.swallow.content", o);
+ elm_object_content_set(wd->o_frame, o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
-
return obj;
}
@@ -69,7 +54,6 @@ EAPI void
e_widget_frametable_object_append_full(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
{
E_Widget_Data *wd = e_widget_data_get(obj);
- Evas_Coord mw = 0, mh = 0;
if ((min_w > 0) || (min_h > 0))
evas_object_size_hint_min_set(sobj, min_w, min_h);
@@ -80,31 +64,17 @@ e_widget_frametable_object_append_full(Evas_Object *obj, Evas_Object *sobj, int
E_ALIGN(sobj, align_x, align_y);
E_WEIGHT(sobj, expand_w, expand_h);
elm_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
- evas_object_smart_need_recalculate_set(wd->o_table, 1);
- evas_object_smart_calculate(wd->o_table);
- edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_table);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
EAPI void
-e_widget_frametable_object_repack(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h)
+e_widget_frametable_object_repack(Evas_Object *obj EINA_UNUSED, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h)
{
- E_Widget_Data *wd;
- Evas_Coord mw = 0, mh = 0;
-
- wd = e_widget_data_get(obj);
-
if (fill_w || fill_h)
E_ALIGN(sobj, fill_w ? -1 : 0.5, fill_h ? -1 : 0.5);
E_WEIGHT(sobj, expand_w, expand_h);
elm_table_pack_set(sobj, col, row, colspan, rowspan);
- evas_object_smart_need_recalculate_set(wd->o_table, 1);
- evas_object_smart_calculate(wd->o_table);
- edje_object_size_min_calc(wd->o_frame, &mw, &mh);
- e_widget_size_min_set(obj, mw, mh);
}
EAPI void