cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5cbceec23f5e4c8205e602f1041110846782b6b4

commit 5cbceec23f5e4c8205e602f1041110846782b6b4
Author: Maksym Volodin <[email protected]>
Date:   Thu Jun 5 19:38:20 2014 +0200

    edje: Edje_Edit - add edje_edit_group_orientation_set/_get.
    
    Summary:
    Set or get orientation for group:
    0 for EDJE_ORIENTATION_AUTO, 1 for EDJE_ORIENTATION_LTR, 2 for 
EDJE_ORIENTATION_RTL.
    _get return 0 (AUTO), 1 (LTR), 2(RTL) orientation was setted for the group. 
-1 if an error occurred.
    _set return EINA_TRUE if successful, EINA_FALSE otherwise.
    
    @feature
    
    Reviewers: cedric, raster, seoz, Hermet
    
    CC: reutskiy.v.v, cedric
    
    Differential Revision: https://phab.enlightenment.org/D938
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/edje/edje_edit.c | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index ccf3af6..d6af3bd 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -1295,6 +1295,23 @@ FUNC_GROUP_ACCESSOR(min, h);
 FUNC_GROUP_ACCESSOR(max, w);
 FUNC_GROUP_ACCESSOR(max, h);
 
+EAPI unsigned char
+edje_edit_group_orientation_get(Evas_Object *obj)
+{
+   GET_ED_OR_RETURN(-1);
+   if (!ed->collection) return -1;
+   return ed->collection->prop.orientation;
+}
+EAPI Eina_Bool
+edje_edit_group_orientation_set(Evas_Object *obj, unsigned char orient)
+{
+   GET_ED_OR_RETURN(EINA_FALSE);
+   if (!ed->collection) return EINA_FALSE;
+   if (orient > 2) return EINA_FALSE;
+   ed->collection->prop.orientation = orient;
+   return EINA_TRUE;
+}
+
 /****************/
 /*  ALIAS  API  */
 /****************/
@@ -8239,7 +8256,7 @@ _edje_generate_source_of_group(Edje *ed, 
Edje_Part_Collection_Directory_Entry *p
    Evas_Object *obj;
    Eina_List *l, *ll;
    unsigned int i;
-   int w, h;
+   int w, h, orient;
    char *data;
    const char *group = pce->entry;
    Edje_Part_Collection *pc;
@@ -8274,6 +8291,20 @@ _edje_generate_source_of_group(Edje *ed, 
Edje_Part_Collection_Directory_Entry *p
    if ((w > 0) || (h > 0))
       BUF_APPENDF(I2"max: %d %d;\n", w, h);
 
+   orient = edje_edit_group_orientation_get(obj);
+   switch(orient)
+     {
+      case(EDJE_ORIENTATION_LTR):
+         BUF_APPENDF(I2"orientation: LTR;\n");
+         break;
+      case(EDJE_ORIENTATION_RTL):
+         BUF_APPENDF(I2"orientation: RTL;\n");
+         break;
+      case(EDJE_ORIENTATION_AUTO):
+      default:
+         break;
+     }
+
    /* Data */
    if (pc->data)
      {

-- 


Reply via email to