summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-28 10:25:39 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-28 11:51:15 +0300
commit48f2323f89a4c172d712171c976752a9c0e2d41e (patch)
tree3f311e1547c89624fc9dbfaece0997e7d748e15f
parent8a9a743e50202f230d7a67d4586c0d61bb696e86 (diff)
change event callbacks to Eo-styled
-rw-r--r--src/bin/egui_gui/editor.c12
-rw-r--r--src/bin/egui_gui/propview.c8
-rw-r--r--src/bin/egui_gui/propview.h10
-rw-r--r--src/bin/egui_gui/settings_view.c2
4 files changed, 17 insertions, 15 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index 961decf..053b670 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1285,8 +1285,8 @@ _editor_shutdown()
1285 * If currently there is no such property in the widget, it will be added. 1285 * If currently there is no such property in the widget, it will be added.
1286 * The given object is the one created in the properties view for each parameter. 1286 * The given object is the one created in the properties view for each parameter.
1287 */ 1287 */
1288static void 1288static Eina_Bool
1289_prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info) 1289_prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
1290{ 1290{
1291 Par_Field_Data *pfd = NULL; 1291 Par_Field_Data *pfd = NULL;
1292 const Eo_Class *kl = eo_class_get(obj); 1292 const Eo_Class *kl = eo_class_get(obj);
@@ -1474,15 +1474,16 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1474 if (db_op_desc_flag_get(op) & MULTI_PROPERTY) 1474 if (db_op_desc_flag_get(op) & MULTI_PROPERTY)
1475 propview_build(wdg, _propsview_toolbar_selected_item_type); 1475 propview_build(wdg, _propsview_toolbar_selected_item_type);
1476 } 1476 }
1477 return; 1477 return EO_CALLBACK_CONTINUE;
1478 /* FIXME: add return here? */ 1478 /* FIXME: add return here? */
1479end: 1479end:
1480 /* If property was newly created, delete it. */ 1480 /* If property was newly created, delete it. */
1481 if (prop_add) prop_del(prop); 1481 if (prop_add) prop_del(prop);
1482 return EO_CALLBACK_CONTINUE;
1482} 1483}
1483 1484
1484static void 1485static Eina_Bool
1485_prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, void *ev EINA_UNUSED) 1486_prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *ev EINA_UNUSED)
1486{ 1487{
1487 const Gui_Widget *wdg = _editor_wdg_selected_get(); 1488 const Gui_Widget *wdg = _editor_wdg_selected_get();
1488 Gui_Widget_Property *prop = data; 1489 Gui_Widget_Property *prop = data;
@@ -1520,6 +1521,7 @@ _prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, void *ev EINA_UNUSED)
1520 _editor_wdg_selected_set(wdg); 1521 _editor_wdg_selected_set(wdg);
1521 objtree_item_contracted_set(NULL); 1522 objtree_item_contracted_set(NULL);
1522 objtree_item_selected_set(wdg); 1523 objtree_item_selected_set(wdg);
1524 return EO_CALLBACK_CONTINUE;
1523} 1525}
1524 1526
1525static void 1527static void
diff --git a/src/bin/egui_gui/propview.c b/src/bin/egui_gui/propview.c
index 401c160..d121484 100644
--- a/src/bin/egui_gui/propview.c
+++ b/src/bin/egui_gui/propview.c
@@ -141,17 +141,17 @@ _property_item_content_get(It_Data *it_data, Eo *box)
141 141
142 if (eo_isa(obj, ELM_OBJ_HOVERSEL_CLASS)) 142 if (eo_isa(obj, ELM_OBJ_HOVERSEL_CLASS))
143 { 143 {
144 evas_object_smart_callback_add(obj, "selected", _view_cbs->property_update_cb_func, NULL); 144 eo_do(obj, eo_event_callback_add(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, _view_cbs->property_update_cb_func, NULL));
145 } 145 }
146 else 146 else
147 { 147 {
148 if (db_op_desc_flag_get(op) & CHANGE_ON_ACTIVATE) 148 if (db_op_desc_flag_get(op) & CHANGE_ON_ACTIVATE)
149 { 149 {
150 evas_object_smart_callback_add(obj, "activated", _view_cbs->property_update_cb_func, NULL); 150 eo_do(obj, eo_event_callback_add(ELM_ENTRY_EVENT_ACTIVATED, _view_cbs->property_update_cb_func, NULL));
151 } 151 }
152 else 152 else
153 { 153 {
154 evas_object_smart_callback_add(obj, "changed", _view_cbs->property_update_cb_func, NULL); 154 eo_do(obj, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _view_cbs->property_update_cb_func, NULL));
155 } 155 }
156 } 156 }
157 } 157 }
@@ -168,7 +168,7 @@ _property_item_content_get(It_Data *it_data, Eo *box)
168 if ((flag & MULTI_PROPERTY) && prop) 168 if ((flag & MULTI_PROPERTY) && prop)
169 { 169 {
170 Eo *obj = props_button_add(box, "X"); 170 Eo *obj = props_button_add(box, "X");
171 evas_object_smart_callback_add(obj, "clicked", _view_cbs->property_delete_cb_func, prop); 171 eo_do(obj, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _view_cbs->property_delete_cb_func, prop));
172 } 172 }
173 return EINA_TRUE; 173 return EINA_TRUE;
174} 174}
diff --git a/src/bin/egui_gui/propview.h b/src/bin/egui_gui/propview.h
index 3d81638..9fb26ec 100644
--- a/src/bin/egui_gui/propview.h
+++ b/src/bin/egui_gui/propview.h
@@ -10,11 +10,11 @@
10#define CONTAINER_REORDER_BUTTON_DIR "container_reorder_button_dir" 10#define CONTAINER_REORDER_BUTTON_DIR "container_reorder_button_dir"
11typedef struct 11typedef struct
12{ 12{
13 Evas_Smart_Cb property_update_cb_func; 13 Eina_Bool (*property_update_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
14 Evas_Smart_Cb property_delete_cb_func; 14 Eina_Bool (*property_delete_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
15 Eina_Bool (*content_delete_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED); 15 Eina_Bool (*content_delete_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
16 Eina_Bool (*content_reorder_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED); 16 Eina_Bool (*content_reorder_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
17 Eina_Bool (*content_change_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED); 17 Eina_Bool (*content_change_cb_func)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
18 void (*propview_build_post_cb)(const Gui_Widget *wdg, It_Data_Type type); 18 void (*propview_build_post_cb)(const Gui_Widget *wdg, It_Data_Type type);
19} PropViewCbs; 19} PropViewCbs;
20 20
diff --git a/src/bin/egui_gui/settings_view.c b/src/bin/egui_gui/settings_view.c
index b6c7b50..c7fbdf3 100644
--- a/src/bin/egui_gui/settings_view.c
+++ b/src/bin/egui_gui/settings_view.c
@@ -35,7 +35,7 @@ _settingsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *ev
35 eo_do(g->project_name_entry, elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx))); 35 eo_do(g->project_name_entry, elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx)));
36 eo_do(g->settings_table, elm_obj_table_pack(g->project_name_label, 0, 0, 1, 1)); 36 eo_do(g->settings_table, elm_obj_table_pack(g->project_name_label, 0, 0, 1, 1));
37 eo_do(g->settings_table, elm_obj_table_pack(g->project_name_entry, 1, 0, 1, 1)); 37 eo_do(g->settings_table, elm_obj_table_pack(g->project_name_entry, 1, 0, 1, 1));
38 evas_object_smart_callback_add(g->project_name_entry, "changed,user", _settings_apply_button_enable, NULL); 38 eo_do(g->project_name_entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _settings_apply_button_enable, NULL));
39} 39}
40 40
41/* "Apply" button "clicked" callback." */ 41/* "Apply" button "clicked" callback." */