conr2d pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=56b8d1f9087c3e831c69a0ffa33321c44a2eb9e7

commit 56b8d1f9087c3e831c69a0ffa33321c44a2eb9e7
Author: Jeeyong Um <con...@gmail.com>
Date:   Tue Apr 25 18:29:26 2017 +0900

    edje_cc: Allow to set float position for anchors
---
 src/bin/edje/edje_cc.h          | 1 +
 src/bin/edje/edje_cc_handlers.c | 7 +++++++
 src/bin/edje/edje_cc_parse.c    | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h
index 704a7fb..e887bf4 100644
--- a/src/bin/edje/edje_cc.h
+++ b/src/bin/edje/edje_cc.h
@@ -166,6 +166,7 @@ struct _Edje_Part_Collection_Parser
 
 typedef enum
 {
+   EDJE_PART_ANCHOR_LINE_RELATIVE = -1,
    EDJE_PART_ANCHOR_LINE_NONE,
    EDJE_PART_ANCHOR_LINE_TOP,
    EDJE_PART_ANCHOR_LINE_BOTTOM,
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index d6399fc..49150fd 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -9568,6 +9568,7 @@ parse_anchor_line(Edje_Part_Anchor *anchor, 
Edje_Part_Anchor_Line undefined)
                                     "RIGHT", EDJE_PART_ANCHOR_LINE_RIGHT,
                                     "VERTICAL_CENTER", 
EDJE_PART_ANCHOR_LINE_VERTICAL_CENTER,
                                     "HORIZONTAL_CENTER", 
EDJE_PART_ANCHOR_LINE_HORIZONTAL_CENTER,
+                                    "*", EDJE_PART_ANCHOR_LINE_RELATIVE,
                                     NULL);
    else if (strcmp(name, "GROUP") || param_had_quote(0))
      anchor->base.line = undefined;
@@ -9667,6 +9668,12 @@ anchor_adjust_relative(const Edje_Part_Anchor_Line 
*lines, FLOAT_T *rel, FLOAT_T
         if (!counterpart_is_set)
           *relc = FROM_DOUBLE(0.5);
      }
+   else if (line == EDJE_PART_ANCHOR_LINE_RELATIVE)
+     {
+        *rel = FROM_DOUBLE(parse_float(1));
+        if (!counterpart_is_set)
+          *relc = FROM_DOUBLE(parse_float(1));
+     }
    else
      {
         ERR("parse error %s:%i. Edje part is anchored to wrong position.",
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index 61fd6eb..eb3d02c 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -1263,7 +1263,7 @@ _parse_enum(char *str, va_list va)
           }
 
         v = va_arg(va, int);
-        if (!strcmp(s, str))
+        if (!strcmp(s, str) || !strcmp(s, "*"))
           {
              va_end(va2);
              va_end(va);

-- 


Reply via email to