rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=a19aa3d0962344b7911fb0df24cfd75be627ec42

commit a19aa3d0962344b7911fb0df24cfd75be627ec42
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Wed Jul 22 15:08:18 2015 +0300

    Live View Property Little Refactor: add API for cases when part changes
    
    Deleting, renaming, adding... all of such actions should be applied onto
    live view property. Sadly, currently it just destroy and recreate
    live view prop with every change, spending so many time on it.
    Why don't we refactor a little bit and add some more flexible logic?
---
 src/bin/ui/live_view/live_view.c      | 31 ++++++++++++++++++++++++++++++
 src/bin/ui/live_view/live_view.h      | 17 +++++++++++++++++
 src/bin/ui/live_view/live_view_prop.c | 36 +++++++++++++++++++++++++++++++++++
 src/bin/ui/live_view/live_view_prop.h | 17 +++++++++++++++++
 4 files changed, 101 insertions(+)

diff --git a/src/bin/ui/live_view/live_view.c b/src/bin/ui/live_view/live_view.c
index 7ec57ea..0ac8900 100644
--- a/src/bin/ui/live_view/live_view.c
+++ b/src/bin/ui/live_view/live_view.c
@@ -260,3 +260,34 @@ live_view_free(Live_View *live)
    live = NULL;
    return true;
 }
+
+TODO("We need implementation here!~~ ")
+Eina_Bool
+live_view_part_add(Evas_Object *parent, Part *part)
+{
+   return live_view_property_part_add(parent, part);
+}
+
+Eina_Bool
+live_view_part_del(Evas_Object *parent, Part *part)
+{
+   return live_view_property_part_del(parent, part);
+}
+
+Eina_Bool
+live_view_part_rename(Evas_Object *parent, Part *part, Eina_Stringshare 
*new_name)
+{
+   return live_view_property_part_rename(parent, part, new_name);
+}
+
+Eina_Bool
+live_view_part_restack_above(Evas_Object *parent, Part *part_move, Part 
*part_above)
+{
+   return live_view_property_part_restack_above(parent, part_move, part_above);
+}
+
+Eina_Bool
+live_view_part_restack_below(Evas_Object *parent, Part *part_move, Part 
*part_below)
+{
+   return live_view_property_part_restack_below(parent, part_move, part_below);
+}
diff --git a/src/bin/ui/live_view/live_view.h b/src/bin/ui/live_view/live_view.h
index bfae9cd..d7c9d9a 100644
--- a/src/bin/ui/live_view/live_view.h
+++ b/src/bin/ui/live_view/live_view.h
@@ -132,4 +132,21 @@ live_view_theme_update(Live_View *live, Project *project);
 Eina_Bool
 live_view_free(Live_View *live);
 
+/****** FUNCTIONS FOR CONNECTOR ***********/
+TODO("We need documentation here! ")
+Eina_Bool
+live_view_part_add(Evas_Object *parent, Part *part);
+
+Eina_Bool
+live_view_part_del(Evas_Object *parent, Part *part);
+
+Eina_Bool
+live_view_part_rename(Evas_Object *parent, Part *part, Eina_Stringshare 
*new_name);
+
+Eina_Bool
+live_view_part_restack_above(Evas_Object *parent, Part *part_move, Part 
*part_above);
+
+Eina_Bool
+live_view_part_restack_below(Evas_Object *parent, Part *part_move, Part 
*part_below);
+
 #endif /* UI_LIVEVIEW_HEADER_H */
diff --git a/src/bin/ui/live_view/live_view_prop.c 
b/src/bin/ui/live_view/live_view_prop.c
index 8c86e37..ad85231 100644
--- a/src/bin/ui/live_view/live_view_prop.c
+++ b/src/bin/ui/live_view/live_view_prop.c
@@ -407,6 +407,42 @@ live_view_property_style_set(Evas_Object *property,
    return true;
 }
 
+TODO("We need implementation here!~~ ")
+Eina_Bool
+live_view_property_part_add(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__)
+{
+   printf("Signal: add part name [%s] \n", part->name);
+   return true;
+}
+
+Eina_Bool
+live_view_property_part_del(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__)
+{
+   printf("Signal: del part name [%s] \n", part->name);
+   return true;
+}
+
+Eina_Bool
+live_view_property_part_rename(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__, Eina_Stringshare *new_name __UNUSED__)
+{
+   printf("Signal: rename part name from [%s] to [%s] \n", part->name, 
new_name);
+   return true;
+}
+
+Eina_Bool
+live_view_property_part_restack_above(Evas_Object *parent __UNUSED__, Part 
*part_move __UNUSED__, Part *part_above __UNUSED__)
+{
+   printf("Signal: moving part [%s] above [%s] \n", part_move->name, 
part_above->name);
+   return true;
+}
+
+Eina_Bool
+live_view_property_part_restack_below(Evas_Object *parent __UNUSED__, Part 
*part_move, Part *part_below __UNUSED__)
+{
+   printf("Signal: moving part [%s] below [%s] \n", part_move->name, 
part_below->name);
+   return true;
+}
+
 Evas_Object *
 live_view_property_add(Evas_Object *parent, Eina_Bool in_prog_edit)
 {
diff --git a/src/bin/ui/live_view/live_view_prop.h 
b/src/bin/ui/live_view/live_view_prop.h
index 24fd551..2f53ce0 100644
--- a/src/bin/ui/live_view/live_view_prop.h
+++ b/src/bin/ui/live_view/live_view_prop.h
@@ -114,4 +114,21 @@ live_view_property_style_set(Evas_Object *property, 
Evas_Object *object, Style *
 Eina_Bool
 live_view_property_style_unset(Evas_Object *property);
 
+/****** FUNCTIONS FOR CONNECTOR ***********/
+TODO("We need documentation here! ")
+Eina_Bool
+live_view_property_part_add(Evas_Object *parent, Part *part);
+
+Eina_Bool
+live_view_property_part_del(Evas_Object *parent, Part *part);
+
+Eina_Bool
+live_view_property_part_rename(Evas_Object *parent, Part *part, 
Eina_Stringshare *new_name);
+
+Eina_Bool
+live_view_property_part_restack_above(Evas_Object *parent, Part *part_move, 
Part *part_above);
+
+Eina_Bool
+live_view_property_part_restack_below(Evas_Object *parent, Part *part_move, 
Part *part_below);
+
 #endif /* UI_LIVEVIEWPROP_HEADER_H */

-- 


Reply via email to