summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-11-27 17:00:47 +0200
committerYakov Goldberg <yakov.g@samsung.com>2014-12-23 10:13:29 +0200
commit2c4f24e61cde49f256124ec20560a54121606a60 (patch)
treef29b18391b9be0f423476c1f38014f963c482c5b /src/bin
parenta4b2ab4673650590c419edec0892bdc9fbb42e00 (diff)
Dummy objects implementation.
Dummy objects are essentially visible in edje objects and naviframes. A specific widget id indicates the need to create a dummy Eo object.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/egui_gui/contentview.c2
-rw-r--r--src/bin/egui_gui/editor.c22
-rw-r--r--src/bin/egui_gui/props_helper.c6
3 files changed, 24 insertions, 6 deletions
diff --git a/src/bin/egui_gui/contentview.c b/src/bin/egui_gui/contentview.c
index b815260..25655b9 100644
--- a/src/bin/egui_gui/contentview.c
+++ b/src/bin/egui_gui/contentview.c
@@ -101,7 +101,7 @@ contentview_build(const Gui_Widget *wdg)
101 EINA_LIST_FOREACH(items_lst, l, ci) 101 EINA_LIST_FOREACH(items_lst, l, ci)
102 { 102 {
103 Dep_Id *item_id = obj_container_item_dep_id_get(ci); 103 Dep_Id *item_id = obj_container_item_dep_id_get(ci);
104 if (item_id && !wdg_get(item_id)) continue; 104 if (IS_ID_VALID(item_id) && !wdg_get(item_id)) continue;
105 105
106 Gui_Widget_Property *prop = obj_container_item_prop_get(ci); 106 Gui_Widget_Property *prop = obj_container_item_prop_get(ci);
107 it_data = IT_DATA_BUILD(CONTENT_TYPE, wdg); 107 it_data = IT_DATA_BUILD(CONTENT_TYPE, wdg);
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index 7680956..f347146 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1221,7 +1221,9 @@ _widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_P
1221 Gui_Widget_Property *new_prop = prop_create_for_op(op_desc); 1221 Gui_Widget_Property *new_prop = prop_create_for_op(op_desc);
1222 Gui_Value *val = prop_value_nth_get(new_prop, 0); 1222 Gui_Value *val = prop_value_nth_get(new_prop, 0);
1223 gui_value_string_set(val, strdup(part_name)); 1223 gui_value_string_set(val, strdup(part_name));
1224 Object_Container_Item *ci = obj_container_item_new(new_prop, NULL); 1224 val = prop_value_nth_get(new_prop, 1);
1225 gui_value_name_id_set(val, GUI_TYPE_OBJECT, DUMMY_ID);
1226 Object_Container_Item *ci = obj_container_item_new(new_prop, DUMMY_ID);
1225 wdg_obj_container_item_add((Gui_Widget *) wdg, ci, i); 1227 wdg_obj_container_item_add((Gui_Widget *) wdg, ci, i);
1226 } 1228 }
1227 i++; 1229 i++;
@@ -1236,6 +1238,22 @@ _widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_P
1236 return ret; 1238 return ret;
1237} 1239}
1238 1240
1241static Eo *
1242_dummy_obj_get(Eo *eo_parent)
1243{
1244 Eo *but = eo_add(ELM_BUTTON_CLASS, eo_parent,
1245 elm_obj_widget_part_text_set(NULL, "Dummy"),
1246 evas_obj_visibility_set(EINA_TRUE));
1247 Elm_Transit *trans = elm_transit_add();
1248 elm_transit_object_add(trans, but);
1249 elm_transit_repeat_times_set(trans, -1);
1250 elm_transit_auto_reverse_set(trans, EINA_TRUE);
1251 elm_transit_effect_color_add(trans, 255, 255, 255, 255, 100, 80, 100, 100);
1252 elm_transit_duration_set(trans, 1.5);
1253 elm_transit_go(trans);
1254 return but;
1255}
1256
1239static Eina_Bool 1257static Eina_Bool
1240_widget_item_add(Gui_Session *session, const Gui_Widget *wdg, const Item_Container_Item *wit, void *data) 1258_widget_item_add(Gui_Session *session, const Gui_Widget *wdg, const Item_Container_Item *wit, void *data)
1241{ 1259{
@@ -1257,7 +1275,7 @@ _widget_item_add(Gui_Session *session, const Gui_Widget *wdg, const Item_Contain
1257static Eina_Bool 1275static Eina_Bool
1258_content_set(Gui_Session *session, const Gui_Widget *container, const Gui_Widget_Property *prop, void *data EINA_UNUSED) 1276_content_set(Gui_Session *session, const Gui_Widget *container, const Gui_Widget_Property *prop, void *data EINA_UNUSED)
1259{ 1277{
1260 Eina_Bool ret = _ffi_eo_do_content(session, container, prop, prop_op_desc_get(prop)); 1278 Eina_Bool ret = _ffi_eo_do_content(session, container, prop, prop_op_desc_get(prop), _dummy_obj_get);
1261 return ret; 1279 return ret;
1262} 1280}
1263 1281
diff --git a/src/bin/egui_gui/props_helper.c b/src/bin/egui_gui/props_helper.c
index 369b380..6c9780d 100644
--- a/src/bin/egui_gui/props_helper.c
+++ b/src/bin/egui_gui/props_helper.c
@@ -102,7 +102,7 @@ _prop_field_update(const Gui_Widget_Property *prop, Eo *item_box, It_Data *it_da
102 102
103 Dep_Id *dep_id = DEP_ID_GET(prop_value_nth_get(prop, i)); 103 Dep_Id *dep_id = DEP_ID_GET(prop_value_nth_get(prop, i));
104 const char *default_str = PROP_HOVERSEL_NONE_VALUE; 104 const char *default_str = PROP_HOVERSEL_NONE_VALUE;
105 if (dep_id) 105 if (IS_ID_VALID(dep_id))
106 default_str = dep_name_get(dep_id); 106 default_str = dep_name_get(dep_id);
107 eo_do(o, elm_obj_widget_part_text_set(NULL, default_str)); 107 eo_do(o, elm_obj_widget_part_text_set(NULL, default_str));
108 break; 108 break;
@@ -113,7 +113,7 @@ _prop_field_update(const Gui_Widget_Property *prop, Eo *item_box, It_Data *it_da
113 props_hoversel_objects_add(NULL, o, NULL, NULL, gui_context_wdg_list_get(wdg_context_get(it_data->wdg)), it_data->wdg); 113 props_hoversel_objects_add(NULL, o, NULL, NULL, gui_context_wdg_list_get(wdg_context_get(it_data->wdg)), it_data->wdg);
114 Dep_Id *dep_id = DEP_ID_GET(prop_value_nth_get(prop, i)); 114 Dep_Id *dep_id = DEP_ID_GET(prop_value_nth_get(prop, i));
115 const char *default_str = PROP_HOVERSEL_NONE_VALUE; 115 const char *default_str = PROP_HOVERSEL_NONE_VALUE;
116 if (dep_id) 116 if (IS_ID_VALID(dep_id))
117 default_str = dep_name_get(dep_id); 117 default_str = dep_name_get(dep_id);
118 eo_do(o, elm_obj_widget_part_text_set(NULL, default_str)); 118 eo_do(o, elm_obj_widget_part_text_set(NULL, default_str));
119 break; 119 break;
@@ -456,7 +456,7 @@ props_value_add(Eo *box, const Gui_Widget *wdg, const Gui_Value *value, const Op
456 if (value) 456 if (value)
457 { 457 {
458 Dep_Id *dep_id = DEP_ID_GET(value); 458 Dep_Id *dep_id = DEP_ID_GET(value);
459 if (dep_id) 459 if (IS_ID_VALID(dep_id))
460 default_str = dep_name_get(dep_id); 460 default_str = dep_name_get(dep_id);
461 } 461 }
462 const Gui_Context *ctx = wdg_context_get(wdg); 462 const Gui_Context *ctx = wdg_context_get(wdg);