svn update: 58214 (latest:58214)
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 5 Apr 2011 04:32:33 +0000 (13:32 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 5 Apr 2011 04:32:33 +0000 (13:32 +0900)
30 files changed:
ChangeLog
configure.ac
edje.spec.in
src/bin/edje_cc_handlers.c
src/bin/edje_cc_parse.c
src/bin/edje_decc.c
src/bin/edje_inspector.c
src/bin/edje_player.c
src/bin/epp/Makefile.am
src/bin/epp/cppalloc.c
src/bin/epp/cpperror.c
src/bin/epp/cppexp.c
src/bin/epp/cpphash.c
src/bin/epp/cpplib.c
src/bin/epp/cppmain.c
src/lib/Edje.h
src/lib/edje_cache.c
src/lib/edje_calc.c
src/lib/edje_data.c
src/lib/edje_edit.c
src/lib/edje_embryo.c
src/lib/edje_entry.c
src/lib/edje_load.c
src/lib/edje_lua2.c
src/lib/edje_main.c
src/lib/edje_private.h
src/lib/edje_program.c
src/lib/edje_script_only.c
src/lib/edje_smart.c
src/lib/edje_util.c

index 6f6b21e..672af80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        This lets you limit the size of the font that will be used.
        Especially useful when using fit.
 
+2011-03-10  WooHyun Jung
+
+        * Fix: Emit clicked signal on entry if still in - missing.
+
+2011-03-10  Cedric BAIL
+
+       * Correctly propagate recursive event with existing and non existing
+       part.
+
+2011-03-11  Cedric BAIL
+
+       * Add PROXY part.
+
+2011-03-19  Carsten Haitzler (The Rasterman)
+
+       * Change edje_decc to only use edje_cc as the compiler for security
+        and correctness reasons.
+
+2011-03-23  Brett Nash (nash)
+
+       * Move some of edje over to use smart clipper in evas.  This _should_
+       be transparent to users.
+
+2011-03-30  Carsten Haitzler (The Rasterman)
+
+       * text.align (only the vertical part) now works for textblock.
+
index 0f377ed..c8e57c7 100644 (file)
@@ -12,8 +12,8 @@ dnl m4_define([relname], [ver-pre-svn-07])
 dnl m4_define([v_rel], [-release relname])
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
-m4_define([lt_rev], m4_eval(v_maj + v_min))
-m4_define([lt_cur], v_mic)
+m4_define([lt_cur], m4_eval(v_maj + v_min))
+m4_define([lt_rev], v_mic)
 m4_define([lt_age], v_min)
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
@@ -48,7 +48,7 @@ AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
-version_info="lt_rev:lt_cur:lt_age"
+version_info="lt_cur:lt_rev:lt_age"
 release_info="v_rel"
 AC_SUBST(version_info)
 AC_SUBST(release_info)
@@ -264,7 +264,7 @@ PKG_CHECK_MODULES([EDJE],
    [
     eina >= 1.0.0
     eet >= 1.4.0
-    evas >= 1.0.0
+    evas >= 1.0.999
     ecore >= 1.0.0
     ecore-file >= 1.0.0
     embryo >= 1.0.0
@@ -316,7 +316,7 @@ fi
 
 
 ### Checks for header files
-AC_CHECK_HEADERS([locale.h])
+AC_CHECK_HEADERS([locale.h sys/resource.h])
 
 EFL_CHECK_PATH_MAX
 
index 1d6e2a7..b2bf0b0 100644 (file)
@@ -87,6 +87,7 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.a
 %{_libdir}/pkgconfig/*
 %{_includedir}/edje-1/*.h
+%{_libdir}/edje/utils/epp
 
 %files bin
 %defattr(-, root, root)
index 358d58f..242d3b1 100644 (file)
@@ -156,6 +156,7 @@ static void st_collections_group_parts_part_table_items_item_span(void);
 
 static void ob_collections_group_parts_part_description(void);
 static void st_collections_group_parts_part_description_inherit(void);
+static void st_collections_group_parts_part_description_source(void);
 static void st_collections_group_parts_part_description_state(void);
 static void st_collections_group_parts_part_description_visible(void);
 static void st_collections_group_parts_part_description_align(void);
@@ -400,6 +401,7 @@ New_Statement_Handler statement_handlers[] =
      {"collections.group.parts.part.table.items.item.position", st_collections_group_parts_part_table_items_item_position},
      {"collections.group.parts.part.table.items.item.span", st_collections_group_parts_part_table_items_item_span},
      {"collections.group.parts.part.description.inherit", st_collections_group_parts_part_description_inherit},
+     {"collections.group.parts.part.description.source", st_collections_group_parts_part_description_source},
      {"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
      {"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
      {"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align},
@@ -777,6 +779,23 @@ statement_handler_num(void)
    return sizeof(statement_handlers) / sizeof (New_Object_Handler);
 }
 
+static void
+_edje_part_description_fill(Edje_Part_Description_Spec_Fill *fill)
+{
+   fill->smooth = 1;
+   fill->pos_rel_x = FROM_DOUBLE(0.0);
+   fill->pos_abs_x = 0;
+   fill->rel_x = FROM_DOUBLE(1.0);
+   fill->abs_x = 0;
+   fill->pos_rel_y = FROM_DOUBLE(0.0);
+   fill->pos_abs_y = 0;
+   fill->rel_y = FROM_DOUBLE(1.0);
+   fill->abs_y = 0;
+   fill->angle = 0;
+   fill->spread = 0;
+   fill->type = EDJE_FILL_TYPE_SCALE;
+}
+
 static Edje_Part_Description_Common *
 _edje_part_description_alloc(unsigned char type, const char *collection, const char *part)
 {
@@ -815,22 +834,25 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c
           ed = mem_alloc(SZ(Edje_Part_Description_Image));
 
           ed->image.id = -1;
-          ed->image.fill.smooth = 1;
-          ed->image.fill.pos_rel_x = FROM_DOUBLE(0.0);
-          ed->image.fill.pos_abs_x = 0;
-          ed->image.fill.rel_x = FROM_DOUBLE(1.0);
-          ed->image.fill.abs_x = 0;
-          ed->image.fill.pos_rel_y = FROM_DOUBLE(0.0);
-          ed->image.fill.pos_abs_y = 0;
-          ed->image.fill.rel_y = FROM_DOUBLE(1.0);
-          ed->image.fill.abs_y = 0;
-          ed->image.fill.angle = 0;
-          ed->image.fill.spread = 0;
-          ed->image.fill.type = EDJE_FILL_TYPE_SCALE;
+
+           _edje_part_description_fill(&ed->image.fill);
 
           result = &ed->common;
           break;
        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = mem_alloc(SZ(Edje_Part_Description_Proxy));
+
+           ed->proxy.id = -1;
+
+           _edje_part_description_fill(&ed->proxy.fill);
+
+           result = &ed->common;
+           break;
+        }
       case EDJE_PART_TYPE_BOX:
        {
           Edje_Part_Description_Box *ed;
@@ -2214,6 +2236,7 @@ st_collections_group_parts_part_type(void)
                         "BOX", EDJE_PART_TYPE_BOX,
                         "TABLE", EDJE_PART_TYPE_TABLE,
                         "EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
+                         "PROXY", EDJE_PART_TYPE_PROXY,
                         NULL);
 
    if (ep->default_desc || ep->other.desc_count > 0)
@@ -3675,6 +3698,15 @@ st_collections_group_parts_part_description_inherit(void)
 
           break;
        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ped = (Edje_Part_Description_Proxy*) ed;
+           Edje_Part_Description_Proxy *pparent = (Edje_Part_Description_Proxy*) parent;
+
+           ped->proxy.id = pparent->proxy.id;
+
+           break;
+        }
       case EDJE_PART_TYPE_BOX:
        {
           Edje_Part_Description_Box *bed = (Edje_Part_Description_Box *) ed;
@@ -3720,6 +3752,48 @@ st_collections_group_parts_part_description_inherit(void)
 
 /**
     @page edcref
+
+    @property
+        source
+    @parameters
+        [another part's name]
+    @effect
+        Causes the part to use another part content as the content of this part.
+        Only work with PROXY part.
+    @endproperty
+*/
+static void
+st_collections_group_parts_part_description_source(void)
+{
+   Edje_Part_Collection *pc;
+   Edje_Part *ep;
+   Edje_Part_Description_Proxy *ed;
+   char *name;
+
+   check_arg_count(1);
+
+   pc = eina_list_data_get(eina_list_last(edje_collections));
+   ep = pc->parts[pc->parts_count - 1];
+
+   if (ep->type != EDJE_PART_TYPE_PROXY)
+     {
+        ERR("%s: Error. parse error %s:%i. "
+            "source attributes in non-PROXY part.",
+            progname, file_in, line - 1);
+        exit(-1);
+     }
+
+   ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+   if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
+
+   name = parse_str(0);
+
+   data_queue_part_lookup(pc, name, &(ed->proxy.id));
+   free(name);
+}
+
+/**
+    @page edcref
     @property
         state
     @parameters
@@ -4762,25 +4836,45 @@ st_collections_group_parts_part_description_fill_smooth(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(1);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
+               progname, file_in, line - 1, ep->name, ep->type);
+           exit(-1);
+        }
+     }
 
-   ed->image.fill.smooth = parse_bool(0);
+   fill->smooth = parse_bool(0);
 }
 
 /**
@@ -4849,28 +4943,48 @@ st_collections_group_parts_part_description_fill_type(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(1);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY part.",
+               progname, file_in, line - 1);
+           exit(-1);
+        }
+     }
 
-   ed->image.fill.type = parse_enum(0,
-                                   "SCALE", EDJE_FILL_TYPE_SCALE,
-                                   "TILE", EDJE_FILL_TYPE_TILE,
-                                   NULL);
+   fill->type = parse_enum(0,
+                           "SCALE", EDJE_FILL_TYPE_SCALE,
+                           "TILE", EDJE_FILL_TYPE_TILE,
+                           NULL);
 }
 
 /**
@@ -4909,26 +5023,46 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(2);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
 
-   ed->image.fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
-   ed->image.fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY part.",
+               progname, file_in, line - 1);
+           exit(-1);
+        }
+     }
+
+   fill->pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
+   fill->pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
 }
 
 /**
@@ -4946,26 +5080,47 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(2);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY part.",
+               progname, file_in, line - 1);
+           exit(-1);
+        }
+     }
 
-   ed->image.fill.pos_abs_x = parse_int(0);
-   ed->image.fill.pos_abs_y = parse_int(1);
+   fill->pos_abs_x = parse_int(0);
+   fill->pos_abs_y = parse_int(1);
 }
 
 /**
@@ -5006,26 +5161,46 @@ st_collections_group_parts_part_description_fill_size_relative(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(2);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY part.",
+               progname, file_in, line - 1);
+           exit(-1);
+        }
+     }
 
-   ed->image.fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
-   ed->image.fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
+   fill->rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
+   fill->rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
 }
 
 /**
@@ -5043,26 +5218,46 @@ st_collections_group_parts_part_description_fill_size_offset(void)
 {
    Edje_Part_Collection *pc;
    Edje_Part *ep;
-   Edje_Part_Description_Image *ed;
+   Edje_Part_Description_Spec_Fill *fill;
 
    check_arg_count(2);
 
    pc = eina_list_data_get(eina_list_last(edje_collections));
    ep = pc->parts[pc->parts_count - 1];
 
-   if (ep->type != EDJE_PART_TYPE_IMAGE)
+   switch (ep->type)
      {
-       ERR("%s: Error. parse error %s:%i. "
-           "image attributes in non-IMAGE part.",
-           progname, file_in, line - 1);
-       exit(-1);
-     }
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *ed;
 
-   ed = (Edje_Part_Description_Image*) ep->default_desc;
-   if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+           ed = (Edje_Part_Description_Image*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Image*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->image.fill;
+          break;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *ed;
+
+           ed = (Edje_Part_Description_Proxy*) ep->default_desc;
+           if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*)  ep->other.desc[ep->other.desc_count - 1];
+
+           fill = &ed->proxy.fill;
+          break;
+        }
+      default:
+        {
+           ERR("%s: Error. parse error %s:%i. "
+               "image and proxy attributes in non-IMAGE, non-PROXY part.",
+               progname, file_in, line - 1);
+           exit(-1);
+        }
+     }
 
-   ed->image.fill.abs_x = parse_int(0);
-   ed->image.fill.abs_y = parse_int(1);
+   fill->abs_x = parse_int(0);
+   fill->abs_y = parse_int(1);
 }
 
 
index 40a457a..19adf0a 100644 (file)
@@ -30,9 +30,16 @@ void *alloca (size_t);
 #include <math.h>
 
 #include "edje_cc.h"
+#include "edje_prefix.h"
 #include <Ecore.h>
 #include <Ecore_File.h>
 
+#ifdef _WIN32
+# define EPP_EXT ".exe"
+#else
+# define EPP_EXT
+#endif
+
 static void  new_object(void);
 static void  new_statement(void);
 static char *perform_math (char *input);
@@ -638,7 +645,7 @@ get_verbatim_line2(void)
 void
 compile(void)
 {
-   char buf[4096];
+   char buf[4096], buf2[4096];
    char inc[4096];
    static char tmpn[4096];
    int fd;
@@ -693,10 +700,11 @@ compile(void)
         * Run the input through the C pre-processor.
         */
         ret = -1;
-        if (ecore_file_exists(EPP_DIR"/epp"))
+        snprintf(buf2, sizeof(buf2), "%s/edje/utils/epp"EPP_EXT, e_prefix_lib_get());
+        if (ecore_file_exists(buf2))
           {
-             snprintf(buf, sizeof(buf), EPP_DIR"/epp %s -I%s %s -o %s",
-                      file_in, inc, def, tmpn);
+             snprintf(buf, sizeof(buf), "%s %s -I%s %s -o %s",
+                      buf2, file_in, inc, def, tmpn);
              ret = system(buf);
           }
        /*
@@ -747,19 +755,6 @@ compile(void)
        if (ret == EXIT_SUCCESS)
          file_in = tmpn;
        free(def);
-/* OLD CODE
-       snprintf(buf, sizeof(buf), "cat %s | cpp -I%s %s -E -o %s",
-                file_in, inc, def, tmpn);
-       ret = system(buf);
-       if (ret < 0)
-         {
-            snprintf(buf, sizeof(buf), "gcc -I%s %s -E -o %s %s",
-                     inc, def, tmpn, file_in);
-            ret = system(buf);
-         }
-       if (ret >= 0) file_in = tmpn;
-       free(def);
- */
      }
    fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
    if (fd < 0)
index 5735afc..aeab754 100644 (file)
@@ -142,6 +142,8 @@ decomp(void)
        eet_close(ef);
        return 0;
      }
+   /* force compiler to be edje_cc */
+   edje_file->compiler = strdup("edje_cc");
    if (!edje_file->compiler)
      {
        edje_file->compiler = strdup("edje_cc");
index 4dc2ecd..1ab8fd9 100644 (file)
@@ -187,6 +187,8 @@ part_type_name_get(Edje_Part_Type t)
          return "TEXT";
       case EDJE_PART_TYPE_IMAGE:
          return "IMAGE";
+      case EDJE_PART_TYPE_PROXY:
+        return "PROXY";
       case EDJE_PART_TYPE_SWALLOW:
          return "SWALLOW";
       case EDJE_PART_TYPE_TEXTBLOCK:
@@ -510,6 +512,82 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value
         if (machine) puts("IMAGE-END");
         else if (detail > 1) puts(INDENT4 "}");
      }
+   else if (t == EDJE_PART_TYPE_PROXY)
+     { 
+       int x2, y2;
+       double dx2, dy2;
+       Eina_Bool has_orgin, has_size;
+
+       if (machine) puts("PROXY-BEGIN");
+       else puts(INDENT4 "proxy {");
+       // TODO Support source
+       // TODO support proxy.fill.smooth
+
+       dx = edje_edit_state_fill_origin_relative_x_get
+        (ed, part, state, value);
+       dy = edje_edit_state_fill_origin_relative_y_get
+        (ed, part, state, value);
+       x = edje_edit_state_fill_origin_offset_x_get
+        (ed, part, state, value);
+       y = edje_edit_state_fill_origin_offset_y_get
+        (ed, part, state, value);
+
+       dx2 = edje_edit_state_fill_size_relative_x_get
+        (ed, part, state, value);
+       dy2 = edje_edit_state_fill_size_relative_y_get
+        (ed, part, state, value);
+       x2 = edje_edit_state_fill_size_offset_x_get
+        (ed, part, state, value);
+       y2 = edje_edit_state_fill_size_offset_y_get
+        (ed, part, state, value);
+
+       has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y));
+       has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2));
+
+       if ((has_orgin) || (has_size))
+        {
+          if (machine) puts("PROXY-FILL-BEGIN");
+          else puts(INDENT5 "fill {");
+
+          if (has_orgin)
+            {
+              if (machine)
+                printf("ORIGIN-RELATIVE-X: %g\n"
+                       "ORIGIN-RELATIVE-Y: %g\n"
+                       "ORIGIN-OFFSET-X: %d\n"
+                       "ORIGIN-OFFSET-Y: %d\n",
+                       dx, dy, x, y);
+              else
+                printf(INDENT6 "origin {\n"
+                       INDENT7 "relative: %g %g;\n"
+                       INDENT7 "offset: %d %d;\n"
+                       INDENT6 "}\n",
+                       dx, dy, x, y);
+            }
+
+          if (has_size)
+            {
+              if (machine)
+                printf("SIZE-RELATIVE-X: %g\n"
+                       "SIZE-RELATIVE-Y: %g\n"
+                       "SIZE-OFFSET-X: %d\n"
+                       "SIZE-OFFSET-Y: %d\n",
+                       dx2, dy2, x2, y2);
+              else
+                printf(INDENT6 "size {\n"
+                       INDENT7 "relative: %g %g;\n"
+                       INDENT7 "offset: %d %d;\n"
+                       INDENT6 "}\n",
+                       dx2, dy2, x2, y2);
+            }
+
+          if (machine) puts("PROXY-FILL-END");
+          else puts(INDENT5 "}");
+        }
+
+        if (machine) puts("PROXY-END");
+        else puts(INDENT4 "}");       
+     }
    else if ((t == EDJE_PART_TYPE_TEXTBLOCK) || (t == EDJE_PART_TYPE_TEXT))
      {
         if (machine) puts("TEXT-BEGIN");
index 8008122..f436ad8 100644 (file)
@@ -33,6 +33,7 @@ struct opts {
    Eina_Bool alpha;
    Eina_Bool print;
    Eina_Bool slave_mode;
+   double scale;
    char *title;
 };
 
@@ -401,6 +402,25 @@ _reset_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *stack, void *even
    evas_object_size_hint_min_set(stack, minw, minh);
 }
 
+static void
+_key_down(void *data, Evas *e __UNUSED__, Evas_Object *stack __UNUSED__, void *event_info)
+{
+   Evas_Event_Key_Down *ev = event_info;
+   struct opts *opts = data;
+
+   if ((!strcmp(ev->keyname, "equal")) ||
+       (!strcmp(ev->keyname, "plus")))
+      opts->scale += 0.1;
+   else if ((!strcmp(ev->keyname, "minus")) ||
+            (!strcmp(ev->keyname, "underscore")))
+      opts->scale -= 0.1;
+   else if ((!strcmp(ev->keyname, "0")))
+      opts->scale = 1.0;
+   if (opts->scale < 0.1) opts->scale = 0.1;
+   else if (opts->scale > 10.0) opts->scale = 1.0;
+   edje_scale_set(opts->scale);
+}
+
 static Evas_Object *
 _create_stack(Evas *evas, const struct opts *opts)
 {
@@ -581,6 +601,8 @@ const Ecore_Getopt optdesc = {
     ('p', "print", "Print signals and messages to stdout"),
     ECORE_GETOPT_STORE_TRUE
     ('S', "slave-mode", "Listen for commands on stdin"),
+    ECORE_GETOPT_STORE_DOUBLE
+    ('z', "scale", "Set scale factor"),
     ECORE_GETOPT_LICENSE('L', "license"),
     ECORE_GETOPT_COPYRIGHT('C', "copyright"),
     ECORE_GETOPT_VERSION('V', "version"),
@@ -610,6 +632,7 @@ int main(int argc, char **argv)
      ECORE_GETOPT_VALUE_STR(opts.title),
      ECORE_GETOPT_VALUE_BOOL(opts.print),
      ECORE_GETOPT_VALUE_BOOL(opts.slave_mode),
+     ECORE_GETOPT_VALUE_DOUBLE(opts.scale),
      ECORE_GETOPT_VALUE_BOOL(quit_option),
      ECORE_GETOPT_VALUE_BOOL(quit_option),
      ECORE_GETOPT_VALUE_BOOL(quit_option),
@@ -618,6 +641,7 @@ int main(int argc, char **argv)
    };
 
    memset(&opts, 0, sizeof(opts));
+   opts.scale = 1.0;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -642,6 +666,7 @@ int main(int argc, char **argv)
      }
 
    ecore_app_args_set(argc, (const char **)argv);
+   edje_scale_set(opts.scale);
 
    opts.file = argv[args];
    if (opts.list_groups)
@@ -694,6 +719,9 @@ int main(int argc, char **argv)
        goto free_ecore_evas;
      }
 
+   evas_object_focus_set(stack, EINA_TRUE);
+   evas_object_event_callback_add(stack, EVAS_CALLBACK_KEY_DOWN,
+                                 _key_down, &opts);
    evas_object_event_callback_add(stack, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                  _reset_size_hints, edje);
 
index 2d3f3aa..6db5016 100644 (file)
@@ -38,9 +38,10 @@ epp_CPPFLAGS = \
 $(CWARNFLAGS)
 
 DEFS= \
+-DHAVE_CONFIG_H \
 -DHAVE_STRERROR \
 -DFATAL_EXIT_CODE=1 \
--DSUCCESS_EXIT_CODE=1 \
+-DSUCCESS_EXIT_CODE=0 \
 -DGCC_INCLUDE_DIR=\"/usr/include\" \
 -DGPLUSPLUS_INCLUDE_DIR=\"/usr/include\" \
 -DTOOL_INCLUDE_DIR=\"/usr/bin\" \
index 2106e1c..4ce0dd0 100644 (file)
  * You are forbidden to forbid anyone else to use, share and improve
  * what you give them.   Help stamp out software-hoarding!  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
-#include "config.h"
+
 #include "cpplib.h"
 
 static void
index caaa513..f4cd5eb 100644 (file)
  * You are forbidden to forbid anyone else to use, share and improve
  * what you give them.   Help stamp out software-hoarding!  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
-#include "config.h"
+
 #include "cpplib.h"
 
 /* Print the file names and line numbers of the #include
index 507fec3..5fcb33f 100644 (file)
 
 /* Parse a C expression from text in a string  */
 
-#include "config.h"
-#include "cpplib.h"
-#include "cpphash.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #ifdef __EMX__
-#include <strings.h>
+# include <strings.h>
 #endif
 
 #ifdef MULTIBYTE_CHARS
-#include <locale.h>
+# include <locale.h>
 #endif
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
+#include "cpplib.h"
+#include "cpphash.h"
+
 /* This is used for communicating lists of keywords with cccp.c.  */
 struct arglist {
    struct arglist     *next;
index 8545b9a..e3b68e0 100644 (file)
  * You are forbidden to forbid anyone else to use, share and improve
  * what you give them.   Help stamp out software-hoarding!  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
 #include "cpplib.h"
 #include "cpphash.h"
 
 static HASHNODE    *hashtab[HASHSIZE];
 
-#include <string.h>
-#include <stdlib.h>
-
 #define IS_IDCHAR(ch) is_idchar[(unsigned char)(ch)]
 
 /*
index cb9e094..ae458bc 100644 (file)
  * You are forbidden to forbid anyone else to use, share and improve
  * what you give them.   Help stamp out software-hoarding!  */
 
-const char         *version_string = "0.0.0";
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
-#include "config.h"
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+#else
+# include <stddef.h>
+void *alloca (size_t);
+#endif
 
 #ifdef __EMX__
 #include <strings.h>
@@ -42,6 +56,8 @@ const char         *version_string = "0.0.0";
 #include "cpplib.h"
 #include "cpphash.h"
 
+const char         *version_string = "0.0.0";
+
 #ifndef STDC_VALUE
 #define STDC_VALUE 1
 #endif
@@ -55,12 +71,7 @@ const char         *version_string = "0.0.0";
 #include <stdio.h>
 #include <string.h>
 #include <signal.h>
-#ifdef __STDC__
 #include <stdlib.h>
-#endif
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -71,7 +82,9 @@ const char         *version_string = "0.0.0";
 #ifndef USG
 #include <time.h>
 #include <sys/time.h>          /* for __DATE__ and __TIME__ */
-#include <sys/resource.h>
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
 #else
 #include <sys/param.h>         /* CYGNUS LOCAL: shebs -noquiet */
 #include <sys/times.h>
@@ -970,7 +983,7 @@ cpp_skip_hspace(cpp_reader * pfile)
          }
        else if (c == '@' && CPP_BUFFER(pfile)->has_escapes
                 && is_hor_space[PEEKN(1)])
-          FORWARD(2);
+          FORWARD(1);
        else
           return;
      }
@@ -2743,6 +2756,8 @@ macroexpand(cpp_reader * pfile, HASHNODE * hp)
                continue;
             if (i < nargs || (nargs == 0 && i == 0))
               {
+                  unsigned char *bp;
+                  
                  /* if we are working on last arg which absorbs rest of args... */
                  if (i == nargs - 1 && defn->rest_args)
                     rest_args = 1;
@@ -2750,6 +2765,20 @@ macroexpand(cpp_reader * pfile, HASHNODE * hp)
                  token = macarg(pfile, rest_args);
                  args[i].raw_length = CPP_WRITTEN(pfile) - args[i].raw;
                  args[i].newlines = 0; /* FIXME */
+                  bp = ARG_BASE + args[i].raw;
+                  while (is_space[(unsigned char)(*bp)]) { bp++; }
+                  args[i].raw_length -= bp - (ARG_BASE + args[i].raw);
+                  args[i].raw = bp - ARG_BASE;
+                  if (args[i].raw_length > 0)
+                    {
+                       bp = ARG_BASE + args[i].raw + args[i].raw_length - 1;
+                       while (is_space[(unsigned char)(*bp)])
+                         {
+                            bp--; 
+                            args[i].raw_length--;
+                            if (args[i].raw_length < 1) break;
+                         }
+                    }
               }
             else
                token = macarg(pfile, 0);
@@ -3051,7 +3080,6 @@ macroexpand(cpp_reader * pfile, HASHNODE * hp)
             if (totlen > xbuf_len)
                abort();
          }
-
        /* if there is anything left of the definition
         * after handling the arg list, copy that in too. */
 
@@ -3067,7 +3095,6 @@ macroexpand(cpp_reader * pfile, HASHNODE * hp)
 
        xbuf[totlen] = 0;
        xbuf_len = totlen;
-
      }
 
    pfile->output_escapes--;
@@ -4592,7 +4619,22 @@ cpp_get_token(cpp_reader * pfile)
               }
             else if (CPP_TRADITIONAL(pfile))
               {
-                 return CPP_COMMENT;
+                 if (newlines > 0)
+                    {
+                       output_line_command(pfile, 0, same_file);
+                       return CPP_VSPACE;
+                    }
+                 else
+                   {
+                       return CPP_COMMENT;
+                   }
+              }
+            else if (newlines > 0)
+              {
+                output_line_command(pfile, 0, same_file);
+                CPP_RESERVE(pfile, 1);
+                CPP_PUTC_Q(pfile, ' ');
+                return CPP_VSPACE;
               }
             else
               {
@@ -4810,17 +4852,21 @@ cpp_get_token(cpp_reader * pfile)
                  c = GETC();
                  if (c == '-')
                    {
+#if 1 // fix macro expansions starting with - losing the -
+                       CPP_PUTS(pfile, "-", 1);
+                      return CPP_OTHER;
+#else                       
                       if (pfile->output_escapes)
                          CPP_PUTS(pfile, "@-", 2);
                       parse_name(pfile, GETC());
                       return CPP_NAME;
+#endif                       
                    }
                  else if (is_space[c])
                    {
-                      CPP_RESERVE(pfile, 2);
+                      CPP_RESERVE(pfile, 1);
                       if (pfile->output_escapes)
                          CPP_PUTC_Q(pfile, '@');
-                      CPP_PUTC_Q(pfile, c);
                       return CPP_HSPACE;
                    }
               }
index 0cf2d94..4f695a0 100644 (file)
  * You are forbidden to forbid anyone else to use, share and improve
  * what you give them.   Help stamp out software-hoarding!  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
-#include "config.h"
 #include "cpplib.h"
 
 #define EPP_DEBUG 0
@@ -90,8 +93,6 @@ main(int argc, char **argv)
             continue;
 
          case CPP_VSPACE:
-            if (!got_text)
-               goto next;
             break;
 
          default:
@@ -122,7 +123,7 @@ main(int argc, char **argv)
 #endif
        if (!opts->no_output)
          {
-            size_t              n;
+            size_t n;
 
             n = CPP_WRITTEN(&parse_in);
             if (fwrite(parse_in.token_buffer, 1, n, stdout) != n)
index 0876977..e41dd88 100644 (file)
@@ -114,7 +114,8 @@ typedef enum _Edje_Part_Type
    EDJE_PART_TYPE_BOX       = 8,
    EDJE_PART_TYPE_TABLE     = 9,
    EDJE_PART_TYPE_EXTERNAL  = 10,
-   EDJE_PART_TYPE_LAST      = 11
+   EDJE_PART_TYPE_PROXY     = 11,
+   EDJE_PART_TYPE_LAST      = 12
 } Edje_Part_Type;
 
 typedef enum _Edje_Text_Effect
index 6368ba0..b463a8a 100644 (file)
@@ -60,6 +60,7 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
    INIT_EMP_BOTH(RECTANGLE, Edje_Part_Description_Common, ce);
    INIT_EMP_BOTH(TEXT, Edje_Part_Description_Text, ce);
    INIT_EMP_BOTH(IMAGE, Edje_Part_Description_Image, ce);
+   INIT_EMP_BOTH(PROXY, Edje_Part_Description_Proxy, ce);
    INIT_EMP_BOTH(SWALLOW, Edje_Part_Description_Common, ce);
    INIT_EMP_BOTH(TEXTBLOCK, Edje_Part_Description_Text, ce);
    INIT_EMP_BOTH(GROUP, Edje_Part_Description_Common, ce);
index fc22f47..b9704d0 100644 (file)
@@ -176,6 +176,7 @@ _edje_get_description_by_orientation(Edje *ed, Edje_Part_Description_Common *src
         EDIT_ALLOC_POOL_RTL(TEXT, Text, text);
         EDIT_ALLOC_POOL_RTL(TEXTBLOCK, Text, text);
         EDIT_ALLOC_POOL_RTL(IMAGE, Image, image);
+        EDIT_ALLOC_POOL_RTL(PROXY, Proxy, proxy);
         EDIT_ALLOC_POOL_RTL(BOX, Box, box);
         EDIT_ALLOC_POOL_RTL(TABLE, Table, table);
         EDIT_ALLOC_POOL_RTL(EXTERNAL, External, external_params);
@@ -1320,36 +1321,36 @@ _edje_part_recalc_single_drag(Edje_Real_Part *ep,
 
 static void
 _edje_part_recalc_single_fill(Edje_Real_Part *ep,
-                             Edje_Part_Description_Spec_Image *desc,
+                             Edje_Part_Description_Spec_Fill *fill,
                              Edje_Calc_Params *params)
 {
    int fw;
    int fh;
 
-   params->smooth = desc->fill.smooth;
+   params->smooth = fill->smooth;
 
-   if (desc->fill.type == EDJE_FILL_TYPE_TILE)
+   if (fill->type == EDJE_FILL_TYPE_TILE)
      evas_object_image_size_get(ep->object, &fw, NULL);
    else
      fw = params->w;
 
-   params->type.common.fill.x = desc->fill.pos_abs_x
-     + TO_INT(SCALE(desc->fill.pos_rel_x, fw));
-   params->type.common.fill.w = desc->fill.abs_x
-     + TO_INT(SCALE(desc->fill.rel_x, fw));
+   params->type.common.fill.x = fill->pos_abs_x
+     + TO_INT(SCALE(fill->pos_rel_x, fw));
+   params->type.common.fill.w = fill->abs_x
+     + TO_INT(SCALE(fill->rel_x, fw));
 
-   if (desc->fill.type == EDJE_FILL_TYPE_TILE)
+   if (fill->type == EDJE_FILL_TYPE_TILE)
      evas_object_image_size_get(ep->object, NULL, &fh);
    else
      fh = params->h;
 
-   params->type.common.fill.y = desc->fill.pos_abs_y
-     + TO_INT(SCALE(desc->fill.pos_rel_y, fh));
-   params->type.common.fill.h = desc->fill.abs_y
-     + TO_INT(SCALE(desc->fill.rel_y, fh));
+   params->type.common.fill.y = fill->pos_abs_y
+     + TO_INT(SCALE(fill->pos_rel_y, fh));
+   params->type.common.fill.h = fill->abs_y
+     + TO_INT(SCALE(fill->rel_y, fh));
 
-   params->type.common.fill.angle = desc->fill.angle;
-   params->type.common.fill.spread = desc->fill.spread;
+   params->type.common.fill.angle = fill->angle;
+   params->type.common.fill.spread = fill->spread;
 }
 
 static void
@@ -1488,7 +1489,9 @@ _edje_part_recalc_single(Edje *ed,
 
    /* fill */
    if (ep->part->type == EDJE_PART_TYPE_IMAGE)
-     _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image, params);
+     _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image.fill, params);
+   else if (ep->part->type == EDJE_PART_TYPE_PROXY)
+     _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Proxy *)desc)->proxy.fill, params);
 
    /* colors */
    if ((desc->color_class) && (*desc->color_class))
@@ -1567,6 +1570,7 @@ _edje_part_recalc_single(Edje *ed,
       case EDJE_PART_TYPE_TABLE:
       case EDJE_PART_TYPE_SWALLOW:
       case EDJE_PART_TYPE_GROUP:
+      case EDJE_PART_TYPE_PROXY:
         break;
       case EDJE_PART_TYPE_GRADIENT:
         /* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
@@ -1657,6 +1661,52 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part
 }
 
 static void
+_edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Proxy *chosen_desc, FLOAT_T pos)
+{
+   Edje_Real_Part *pp;
+   int part_id;
+
+   if (p3->type.common.fill.w == 0 || p3->type.common.fill.h == 0)
+     {
+        evas_object_image_source_set(ep->object, NULL);
+        return ;
+     }
+
+   if (pos >= 0.5) {
+      part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
+   } else {
+      part_id = chosen_desc->proxy.id;
+   }
+
+   pp = ed->table_parts[part_id % ed->table_parts_size];
+
+   switch (pp->part->type)
+     {
+      case EDJE_PART_TYPE_IMAGE:
+      case EDJE_PART_TYPE_TEXT:
+      case EDJE_PART_TYPE_TEXTBLOCK:
+      case EDJE_PART_TYPE_RECTANGLE:
+      case EDJE_PART_TYPE_BOX:
+      case EDJE_PART_TYPE_TABLE:
+      case EDJE_PART_TYPE_PROXY:
+         evas_object_image_source_set(ep->object, pp->object);
+         break;
+      case EDJE_PART_TYPE_GRADIENT:
+         /* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
+         break;
+      case EDJE_PART_TYPE_GROUP:
+      case EDJE_PART_TYPE_SWALLOW:
+      case EDJE_PART_TYPE_EXTERNAL:
+         evas_object_image_source_set(ep->object, pp->swallowed_object);
+         break;
+     }
+
+   evas_object_image_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y,
+                             p3->type.common.fill.w, p3->type.common.fill.h);
+   evas_object_image_smooth_scale_set(ep->object, p3->smooth);
+}
+
+static void
 _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos)
 {
    int image_id;
@@ -2053,14 +2103,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
        switch (part_type)
          {
           case EDJE_PART_TYPE_IMAGE:
-             p3->type.common.fill.x = INTP(p1->type.common.fill.x, p2->type.common.fill.x, pos);
-             p3->type.common.fill.y = INTP(p1->type.common.fill.y, p2->type.common.fill.y, pos);
-             p3->type.common.fill.w = INTP(p1->type.common.fill.w, p2->type.common.fill.w, pos);
-             p3->type.common.fill.h = INTP(p1->type.common.fill.h, p2->type.common.fill.h, pos);
              p3->type.common.spec.image.l = INTP(p1->type.common.spec.image.l, p2->type.common.spec.image.l, pos);
              p3->type.common.spec.image.r = INTP(p1->type.common.spec.image.r, p2->type.common.spec.image.r, pos);
              p3->type.common.spec.image.t = INTP(p1->type.common.spec.image.t, p2->type.common.spec.image.t, pos);
              p3->type.common.spec.image.b = INTP(p1->type.common.spec.image.b, p2->type.common.spec.image.b, pos);
+           case EDJE_PART_TYPE_PROXY:
+             p3->type.common.fill.x = INTP(p1->type.common.fill.x, p2->type.common.fill.x, pos);
+             p3->type.common.fill.y = INTP(p1->type.common.fill.y, p2->type.common.fill.y, pos);
+             p3->type.common.fill.w = INTP(p1->type.common.fill.w, p2->type.common.fill.w, pos);
+             p3->type.common.fill.h = INTP(p1->type.common.fill.h, p2->type.common.fill.h, pos);
              break;
           case EDJE_PART_TYPE_TEXT:
              p3->type.text.size = INTP(p1->type.text.size, p2->type.text.size, pos);
@@ -2117,6 +2168,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
                evas_object_image_scale_hint_set(ep->object,
                                                 img_desc->image.scale_hint);
             }
+           case EDJE_PART_TYPE_PROXY:
           case EDJE_PART_TYPE_RECTANGLE:
           case EDJE_PART_TYPE_TEXTBLOCK:
           case EDJE_PART_TYPE_BOX:
@@ -2157,6 +2209,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
           case EDJE_PART_TYPE_TEXT:
              _edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
              break;
+           case EDJE_PART_TYPE_PROXY:
+              _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy*) chosen_desc, pos);
+              break;
           case EDJE_PART_TYPE_IMAGE:
              _edje_image_recalc_apply(ed, ep, pf, (Edje_Part_Description_Image*) chosen_desc, pos);
              break;
index 23881b7..ea4bb24 100644 (file)
@@ -28,6 +28,7 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_rectangle = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_swallow = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_group = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_image = NULL;
+Eet_Data_Descriptor *_edje_edd_edje_part_description_proxy = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_text = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_box = NULL;
@@ -38,6 +39,7 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_rectangle_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_swallow_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_group_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_image_pointer = NULL;
+Eet_Data_Descriptor *_edje_edd_edje_part_description_proxy_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_text_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock_pointer = NULL;
 Eet_Data_Descriptor *_edje_edd_edje_part_description_box_pointer = NULL;
@@ -69,6 +71,7 @@ Eet_Data_Descriptor *_edje_edd_edje_external_param = NULL;
 EMP(RECTANGLE, rectangle);
 EMP(TEXT, text);
 EMP(IMAGE, image);
+EMP(PROXY, proxy);
 EMP(SWALLOW, swallow);
 EMP(TEXTBLOCK, textblock);
 EMP(GROUP, group);
@@ -97,6 +100,7 @@ struct {
   { EDJE_PART_TYPE_BOX,       "box" },
   { EDJE_PART_TYPE_TABLE,     "table" },
   { EDJE_PART_TYPE_EXTERNAL,  "external" },
+  { EDJE_PART_TYPE_PROXY,     "proxy" }
 };
 
 static const char *
@@ -176,6 +180,7 @@ _edje_edd_shutdown(void)
    FREED(_edje_edd_edje_part_description_swallow);
    FREED(_edje_edd_edje_part_description_group);
    FREED(_edje_edd_edje_part_description_image);
+   FREED(_edje_edd_edje_part_description_proxy);
    FREED(_edje_edd_edje_part_description_text);
    FREED(_edje_edd_edje_part_description_textblock);
    FREED(_edje_edd_edje_part_description_box);
@@ -186,6 +191,7 @@ _edje_edd_shutdown(void)
    FREED(_edje_edd_edje_part_description_swallow_pointer);
    FREED(_edje_edd_edje_part_description_group_pointer);
    FREED(_edje_edd_edje_part_description_image_pointer);
+   FREED(_edje_edd_edje_part_description_proxy_pointer);
    FREED(_edje_edd_edje_part_description_text_pointer);
    FREED(_edje_edd_edje_part_description_textblock_pointer);
    FREED(_edje_edd_edje_part_description_box_pointer);
@@ -283,6 +289,7 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.RECTANGLE", count.RECTANGLE, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXT", count.TEXT, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.IMAGE", count.IMAGE, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.PROXY", count.PROXY, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SWALLOW", count.SWALLOW, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXTBLOCK", count.TEXTBLOCK, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.GROUP", count.GROUP, EET_T_INT);
@@ -549,6 +556,27 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.spread", image.fill.spread, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.type", image.fill.type, EET_T_CHAR);
 
+   EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Proxy);
+   eddc.func.mem_free = mem_free_proxy;
+   eddc.func.mem_alloc = mem_alloc_proxy;
+   _edje_edd_edje_part_description_proxy =
+     eet_data_descriptor_file_new(&eddc);
+   EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, common);
+
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.id", proxy.id, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.smooth", proxy.fill.smooth, EET_T_CHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_rel_x", proxy.fill.pos_rel_x, EDJE_T_FLOAT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_abs_x", proxy.fill.pos_abs_x, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.rel_x", proxy.fill.rel_x, EDJE_T_FLOAT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.abs_x", proxy.fill.abs_x, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_rel_y", proxy.fill.pos_rel_y, EDJE_T_FLOAT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_abs_y", proxy.fill.pos_abs_y, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.rel_y", proxy.fill.rel_y, EDJE_T_FLOAT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.abs_y", proxy.fill.abs_y, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.angle", proxy.fill.angle, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.spread", proxy.fill.spread, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.type", proxy.fill.type, EET_T_CHAR);
+
    EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
    eddc.func.mem_free = mem_free_text;
    eddc.func.mem_alloc = mem_alloc_text;
@@ -648,6 +676,7 @@ _edje_edd_init(void)
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_swallow);
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_group);
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Image, part_description_image);
+   EDJE_DEFINE_POINTER_TYPE(Part_Description_Proxy, part_description_proxy);
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Text, part_description_text);
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Text, part_description_textblock);
    EDJE_DEFINE_POINTER_TYPE(Part_Description_Box, part_description_box);
@@ -663,6 +692,7 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "swallow",   _edje_edd_edje_part_description_swallow);
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "group",     _edje_edd_edje_part_description_group);
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "image",     _edje_edd_edje_part_description_image);
+   EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "proxy",     _edje_edd_edje_part_description_proxy);
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "text",      _edje_edd_edje_part_description_text);
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "textblock", _edje_edd_edje_part_description_textblock);
    EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "box",       _edje_edd_edje_part_description_box);
@@ -686,6 +716,7 @@ _edje_edd_init(void)
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "swallow",   swallow);
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "group",     group);
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "image",     image);
+   EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "proxy",     proxy);
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "text",      text);
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "textblock", textblock);
    EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "box",       box);
index 5c08002..a4be7d2 100644 (file)
@@ -469,7 +469,7 @@ _edje_import_image_file(Edje *ed, const char *path, int id)
    int bytes;
 
    /* Try to load the file */
-   im = evas_object_image_add(ed->evas);
+   im = evas_object_image_add(ed->base.evas);
    if (!im) return EINA_FALSE;
 
    evas_object_image_file_set(im, path, NULL);
@@ -877,7 +877,7 @@ _edje_edit_group_references_update(Evas_Object *obj, const char *old_group_name,
 
 //   pc = ed->collection;
 
-   part_obj = edje_edit_object_add(ed->evas);
+   part_obj = edje_edit_object_add(ed->base.evas);
 
    old = eina_stringshare_add(old_group_name);
 
@@ -2138,26 +2138,26 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
    rp->part = ep;
 
    if (ep->type == EDJE_PART_TYPE_RECTANGLE)
-     rp->object = evas_object_rectangle_add(ed->evas);
-   else if (ep->type == EDJE_PART_TYPE_IMAGE)
-     rp->object = evas_object_image_add(ed->evas);
+     rp->object = evas_object_rectangle_add(ed->base.evas);
+   else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY)
+     rp->object = evas_object_image_add(ed->base.evas);
    else if (ep->type == EDJE_PART_TYPE_TEXT)
      {
        _edje_text_part_on_add(ed, rp);
-       rp->object = evas_object_text_add(ed->evas);
+       rp->object = evas_object_text_add(ed->base.evas);
        evas_object_text_font_source_set(rp->object, ed->path);
      }
    else if (ep->type == EDJE_PART_TYPE_SWALLOW ||
            ep->type == EDJE_PART_TYPE_GROUP ||
            ep->type == EDJE_PART_TYPE_EXTERNAL)
      {
-       rp->object = evas_object_rectangle_add(ed->evas);
+       rp->object = evas_object_rectangle_add(ed->base.evas);
        evas_object_color_set(rp->object, 0, 0, 0, 0);
        evas_object_pass_events_set(rp->object, 1);
        evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
      }
    else if (ep->type == EDJE_PART_TYPE_TEXTBLOCK)
-     rp->object = evas_object_textblock_add(ed->evas);
+     rp->object = evas_object_textblock_add(ed->base.evas);
    else
      ERR("wrong part type %i!", ep->type);
    if (rp->object)
@@ -2192,8 +2192,8 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
             if (child)
               _edje_real_part_swallow(rp, child);
          }
-       evas_object_clip_set(rp->object, ed->clipper);
-       evas_object_show(ed->clipper);
+       evas_object_clip_set(rp->object, ed->base.clipper);
+       evas_object_show(ed->base.clipper);
      }
 
    /* Update table_parts */
@@ -2293,7 +2293,7 @@ edje_edit_part_del(Evas_Object *obj, const char* part)
 
        if (real->clip_to == rp)
          {
-            evas_object_clip_set(real->object, ed->clipper);
+            evas_object_clip_set(real->object, ed->base.clipper);
             real->clip_to = NULL;
          }
        if (real->drag && real->drag->confine_to == rp)
@@ -2335,7 +2335,7 @@ edje_edit_part_del(Evas_Object *obj, const char* part)
 
    /* if all parts are gone, hide the clipper */
    if (ed->table_parts_size == 0)
-     evas_object_hide(ed->clipper);
+     evas_object_hide(ed->base.clipper);
 
    edje_object_calc_force(obj);
 
@@ -2544,9 +2544,9 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_
             evas_object_clip_unset(rp->object);
          }
 
-       evas_object_clip_set(rp->object, ed->clipper);
+       evas_object_clip_set(rp->object, ed->base.clipper);
        if (rp->swallowed_object)
-         evas_object_clip_set(rp->swallowed_object, ed->clipper);
+         evas_object_clip_set(rp->swallowed_object, ed->base.clipper);
 
        rp->part->clip_to_id = -1;
        rp->clip_to = NULL;
@@ -2729,7 +2729,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source
    if (source)
      {
        rp->part->source = eina_stringshare_add(source);
-       child_obj = edje_object_add(ed->evas);
+       child_obj = edje_object_add(ed->base.evas);
        edje_object_file_set(child_obj, ed->file->path, source);
        _edje_real_part_swallow(rp, child_obj);
      }
@@ -3163,6 +3163,28 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double
        img->image.fill.spread = 0;
        img->image.fill.type = EDJE_FILL_TYPE_SCALE;
      }
+   else if (rp->part->type == EDJE_PART_TYPE_PROXY)
+     {
+       Edje_Part_Description_Proxy *pro;
+
+       pro = (Edje_Part_Description_Proxy*) pd;
+
+       memset(&pro->proxy, 0, sizeof (pro->proxy));
+
+       pro->proxy.id = -1;
+       pro->proxy.fill.smooth = 1;
+       pro->proxy.fill.pos_rel_x = 0.0;
+       pro->proxy.fill.pos_abs_x = 0;
+       pro->proxy.fill.rel_x = 1.0;
+       pro->proxy.fill.abs_x = 0;
+       pro->proxy.fill.pos_rel_y = 0.0;
+       pro->proxy.fill.pos_abs_y = 0;
+       pro->proxy.fill.rel_y = 1.0;
+       pro->proxy.fill.abs_y = 0;
+       pro->proxy.fill.angle = 0;
+       pro->proxy.fill.spread = 0;
+       pro->proxy.fill.type = EDJE_FILL_TYPE_SCALE;
+     }
    else if (rp->part->type == EDJE_PART_TYPE_EXTERNAL)
      {
        Edje_Part_Description_External *external;
@@ -3286,6 +3308,15 @@ edje_edit_state_copy(Evas_Object *obj, const char *part, const char *from, doubl
 
    switch (rp->part->type)
      {
+      case EDJE_PART_TYPE_PROXY:
+       {
+          Edje_Part_Description_Proxy *pro_to = (Edje_Part_Description_Proxy*) pdto;
+          Edje_Part_Description_Proxy *pro_from = (Edje_Part_Description_Proxy*) pdfrom;
+
+          pro_to->proxy = pro_from->proxy;
+
+          break;
+       }
       case EDJE_PART_TYPE_IMAGE:
        {
           Edje_Part_Description_Image *img_to = (Edje_Part_Description_Image*) pdto;
@@ -3615,34 +3646,65 @@ FUNC_STATE_DOUBLE(aspect, max);
   EAPI double                                                          \
   edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
   {                                                                    \
-     Edje_Part_Description_Image *img;                                 \
-                                                                       \
      eina_error_set(0);                                                        \
                                                                        \
      GET_PD_OR_RETURN(0);                                              \
                                                                         \
-     if (rp->part->type != EDJE_PART_TYPE_IMAGE)                        \
-       return 0;                                                        \
+     switch (rp->part->type)                                           \
+       {                                                               \
+       case EDJE_PART_TYPE_IMAGE:                                      \
+        {                                                              \
+          Edje_Part_Description_Image *img;                            \
+                                                                       \
+          img = (Edje_Part_Description_Image*) pd;                     \
                                                                        \
-     img = (Edje_Part_Description_Image*) pd;                          \
+          return TO_DOUBLE(img->image.fill.Class##rel_##Value);        \
+        }                                                              \
+       case EDJE_PART_TYPE_PROXY:                                      \
+        {                                                              \
+          Edje_Part_Description_Proxy *pro;                            \
                                                                        \
-     return TO_DOUBLE(img->image.fill.Class##rel_##Value);             \
+          pro = (Edje_Part_Description_Proxy*) pd;                     \
+                                                                       \
+          return TO_DOUBLE(pro->proxy.fill.Class##rel_##Value);        \
+        }                                                              \
+       }                                                               \
+                                                                       \
+     return 0;                                                         \
   }                                                                    \
   EAPI void                                                            \
   edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
   {                                                                    \
-     Edje_Part_Description_Image *img;                                 \
-                                                                       \
      eina_error_set(0);                                                        \
                                                                        \
      GET_PD_OR_RETURN();                                               \
                                                                         \
-     if (rp->part->type != EDJE_PART_TYPE_IMAGE)                        \
-       return;                                                          \
+     switch (rp->part->type)                                           \
+       {                                                               \
+       case EDJE_PART_TYPE_IMAGE:                                      \
+        {                                                              \
+          Edje_Part_Description_Image *img;                            \
+                                                                       \
+          img = (Edje_Part_Description_Image*) pd;                     \
+                                                                       \
+          img->image.fill.Class##rel_##Value = FROM_DOUBLE(v);         \
+                                                                       \
+          break;                                                       \
+        }                                                              \
+       case EDJE_PART_TYPE_PROXY:                                      \
+        {                                                              \
+          Edje_Part_Description_Proxy *pro;                            \
+                                                                       \
+          pro = (Edje_Part_Description_Proxy*) pd;                     \
                                                                        \
-     img = (Edje_Part_Description_Image*) pd;                          \
+          pro->proxy.fill.Class##rel_##Value = FROM_DOUBLE(v);         \
+                                                                       \
+          break;                                                       \
+        }                                                              \
+       default:                                                                \
+        return;                                                        \
+       }                                                               \
                                                                        \
-     img->image.fill.Class##rel_##Value = FROM_DOUBLE(v);              \
      edje_object_calc_force(obj);                                      \
   }
 
@@ -3650,34 +3712,62 @@ FUNC_STATE_DOUBLE(aspect, max);
   EAPI int                                                             \
   edje_edit_state_fill_##Type##_offset_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
   {                                                                    \
-     Edje_Part_Description_Image *img;                                 \
-                                                                       \
      eina_error_set(0);                                                        \
                                                                        \
      GET_PD_OR_RETURN(0);                                              \
                                                                         \
-     if (rp->part->type != EDJE_PART_TYPE_IMAGE)                        \
-       return 0;                                                        \
+     switch (rp->part->type)                                           \
+       {                                                               \
+       case EDJE_PART_TYPE_IMAGE:                                      \
+        {                                                              \
+          Edje_Part_Description_Image *img;                            \
+                                                                       \
+          img = (Edje_Part_Description_Image*) pd;                     \
+                                                                       \
+          return img->image.fill.Class##abs_##Value;                   \
+        }                                                              \
+       case EDJE_PART_TYPE_PROXY:                                      \
+        {                                                              \
+          Edje_Part_Description_Proxy *pro;                            \
                                                                        \
-     img = (Edje_Part_Description_Image*) pd;                          \
+          pro = (Edje_Part_Description_Proxy*) pd;                     \
                                                                        \
-     return img->image.fill.Class##abs_##Value;                                \
+          return pro->proxy.fill.Class##abs_##Value;                   \
+        }                                                              \
+       }                                                               \
+     return 0;                                                         \
   }                                                                    \
   EAPI void                                                            \
   edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
   {                                                                    \
-     Edje_Part_Description_Image *img;                                 \
-                                                                       \
      eina_error_set(0);                                                        \
                                                                        \
      GET_PD_OR_RETURN();                                               \
                                                                         \
-     if (rp->part->type != EDJE_PART_TYPE_IMAGE)                        \
-       return;                                                          \
+     switch (rp->part->type)                                           \
+       {                                                               \
+       case EDJE_PART_TYPE_IMAGE:                                      \
+        {                                                              \
+          Edje_Part_Description_Image *img;                            \
                                                                        \
-     img = (Edje_Part_Description_Image*) pd;                          \
+          img = (Edje_Part_Description_Image*) pd;                     \
+                                                                       \
+          img->image.fill.Class##abs_##Value = FROM_DOUBLE(v);         \
+          return;                                                      \
+        }                                                              \
+       case EDJE_PART_TYPE_PROXY:                                      \
+        {                                                              \
+          Edje_Part_Description_Proxy *pro;                            \
+                                                                       \
+          pro = (Edje_Part_Description_Proxy*) pd;                     \
+                                                                       \
+          pro->proxy.fill.Class##abs_##Value = FROM_DOUBLE(v);         \
+          return;                                                      \
+        }                                                              \
+       default:                                                                \
+        return;                                                        \
+       }                                                               \
                                                                        \
-     img->image.fill.Class##abs_##Value = FROM_DOUBLE(v);              \
      edje_object_calc_force(obj);                                      \
   }
 
@@ -6875,7 +6965,7 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
        //Fill
 
        BUF_APPEND(I5"fill {\n");
-       if (rp->part->type == EDJE_PART_TYPE_IMAGE && !img->image.fill.smooth)
+       if (!img->image.fill.smooth)
          BUF_APPEND(I6"smooth: 0;\n");
         //TODO Support spread
 
@@ -6904,6 +6994,45 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
        BUF_APPEND(I5"}\n");
      }
 
+   if (rp->part->type == EDJE_PART_TYPE_PROXY)
+     {
+       Edje_Part_Description_Proxy *pro;
+
+       pro = (Edje_Part_Description_Proxy *) pd;
+
+       //Fill
+
+       BUF_APPEND(I5"fill {\n");
+       if (!pro->proxy.fill.smooth)
+         BUF_APPEND(I6"smooth: 0;\n");
+        //TODO Support spread
+       //TODO Support source
+
+       if (pro->proxy.fill.pos_rel_x || pro->proxy.fill.pos_rel_y ||
+            pro->proxy.fill.pos_abs_x || pro->proxy.fill.pos_abs_y)
+         {
+               BUF_APPEND(I6"origin {\n");
+               if (pro->proxy.fill.pos_rel_x || pro->proxy.fill.pos_rel_y)
+                 BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pro->proxy.fill.pos_rel_x), TO_DOUBLE(pro->proxy.fill.pos_rel_y));
+               if (pro->proxy.fill.pos_abs_x || pro->proxy.fill.pos_abs_y)
+                 BUF_APPENDF(I7"offset: %d %d;\n", pro->proxy.fill.pos_abs_x, pro->proxy.fill.pos_abs_y);
+               BUF_APPEND(I6"}\n");
+          }
+
+       if (TO_DOUBLE(pro->proxy.fill.rel_x) != 1.0 || TO_DOUBLE(pro->proxy.fill.rel_y) != 1.0 ||
+            pro->proxy.fill.abs_x || pro->proxy.fill.abs_y)
+         {
+               BUF_APPEND(I6"size {\n");
+               if (pro->proxy.fill.rel_x != 1.0 || pro->proxy.fill.rel_y != 1.0)
+                 BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pro->proxy.fill.rel_x), TO_DOUBLE(pro->proxy.fill.rel_y));
+               if (pro->proxy.fill.abs_x || pro->proxy.fill.abs_y)
+                 BUF_APPENDF(I7"offset: %d %d;\n", pro->proxy.fill.abs_x, pro->proxy.fill.abs_y);
+               BUF_APPEND(I6"}\n");
+          }
+
+       BUF_APPEND(I5"}\n");
+     }
+
    //Text
    if (rp->part->type == EDJE_PART_TYPE_TEXT)
      {
@@ -7104,7 +7233,7 @@ _edje_generate_source_of_group(Edje *ed, Edje_Part_Collection_Directory_Entry *p
    Edje_Part_Collection *pc;
    Eina_Bool ret = EINA_TRUE;
 
-   obj = edje_edit_object_add(ed->evas);
+   obj = edje_edit_object_add(ed->base.evas);
    if (!edje_object_file_set(obj, ed->file->path, group)) return EINA_FALSE;
 
    ef = eet_open(ed->file->path, EET_FILE_MODE_READ);
index 1bfbbce..c3c49ab 100644 (file)
@@ -764,7 +764,7 @@ _edje_embryo_fn_get_mouse(Embryo_Program *ep, Embryo_Cell *params)
 
    CHKPARAM(2);
    ed = embryo_program_data_get(ep);
-   evas_pointer_canvas_xy_get(ed->evas, &x, &y);
+   evas_pointer_canvas_xy_get(ed->base.evas, &x, &y);
    x -= ed->x;
    y -= ed->y;
    SETINT((int)x, params[1]);
@@ -780,7 +780,7 @@ _edje_embryo_fn_get_mouse_buttons(Embryo_Program *ep, Embryo_Cell *params)
 
    CHKPARAM(0);
    ed = embryo_program_data_get(ep);
-   return evas_pointer_button_down_mask_get(ed->evas);
+   return evas_pointer_button_down_mask_get(ed->base.evas);
 }
 
 /* emit(sig[], src[]) */
@@ -2564,7 +2564,7 @@ _edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
    rp = ed->table_parts[part_id % ed->table_parts_size];
    if (!rp) return 0;
 
-   new_obj =  edje_object_add(ed->evas);
+   new_obj =  edje_object_add(ed->base.evas);
    if (!new_obj) return 0;
 
    if (!edje_object_file_set(new_obj, ed->file->path, group_name)) 
index 2fa9349..2555c9d 100644 (file)
@@ -737,7 +737,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
 
                   sel = calloc(1, sizeof(Sel));
                   en->sel = eina_list_append(en->sel, sel);
-                  ob = edje_object_add(en->rp->edje->evas);
+                  ob = edje_object_add(en->rp->edje->base.evas);
                   edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source);
                   evas_object_smart_member_add(ob, smart);
                   evas_object_stack_below(ob, o);
@@ -747,7 +747,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                   sel->obj_bg = ob;
                   en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_bg);
 
-                  ob = edje_object_add(en->rp->edje->evas);
+                  ob = edje_object_add(en->rp->edje->base.evas);
                   if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
                      edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
                   else
@@ -1032,7 +1032,7 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
 
                        sel = calloc(1, sizeof(Sel));
                        an->sel = eina_list_append(an->sel, sel);
-                       ob = edje_object_add(en->rp->edje->evas);
+                       ob = edje_object_add(en->rp->edje->base.evas);
                        edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source5);
                        evas_object_smart_member_add(ob, smart);
                        evas_object_stack_below(ob, o);
@@ -1041,8 +1041,8 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                        evas_object_show(ob);
                        sel->obj_bg = ob;
                        en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_bg);
-
-                       ob = edje_object_add(en->rp->edje->evas);
+                       
+                       ob = edje_object_add(en->rp->edje->base.evas);
                        edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
                        evas_object_smart_member_add(ob, smart);
                        evas_object_stack_above(ob, o);
@@ -1051,8 +1051,8 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                        evas_object_show(ob);
                        sel->obj_fg = ob;
                        en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_fg);
-
-                       ob = evas_object_rectangle_add(en->rp->edje->evas);
+                       
+                       ob = evas_object_rectangle_add(en->rp->edje->base.evas);
                        evas_object_color_set(ob, 0, 0, 0, 0);
                        evas_object_smart_member_add(ob, smart);
                        evas_object_stack_above(ob, o);
@@ -2515,8 +2515,8 @@ _edje_entry_init(Edje *ed)
    evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_FOCUS_OUT, _edje_focus_out_cb, ed);
    evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_KEY_DOWN, _edje_key_down_cb, ed);
    evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb, ed);
-   evas_event_callback_add(ed->evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, _evas_focus_in_cb, ed);
-   evas_event_callback_add(ed->evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _evas_focus_out_cb, ed);
+   evas_event_callback_add(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, _evas_focus_in_cb, ed);
+   evas_event_callback_add(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _evas_focus_out_cb, ed);
 }
 
 void
@@ -2532,9 +2532,9 @@ _edje_entry_shutdown(Edje *ed)
    evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_FOCUS_OUT, _edje_focus_out_cb);
    evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_DOWN, _edje_key_down_cb);
    evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb);
-   if (evas_event_callback_del_full(ed->evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, _evas_focus_in_cb, ed) != ed)
+   if (evas_event_callback_del_full(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, _evas_focus_in_cb, ed) != ed)
       ERR("could not unregister EVAS_CALLBACK_FOCUS_IN");
-   if (evas_event_callback_del_full(ed->evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _evas_focus_out_cb, ed) != ed)
+   if (evas_event_callback_del_full(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _evas_focus_out_cb, ed) != ed)
       ERR("could not unregister EVAS_CALLBACK_FOCUS_OUT");
 }
 
@@ -2578,7 +2578,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
            evas_object_textblock_replace_char_set(rp->object, "*");
      }
 
-   en->cursor_bg = edje_object_add(rp->edje->evas);
+   en->cursor_bg = edje_object_add(rp->edje->base.evas);
    if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      edje_object_file_set(en->cursor_bg, rp->edje->path, rp->part->source6);
    else
@@ -2589,7 +2589,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
    evas_object_pass_events_set(en->cursor_bg, EINA_TRUE);
    rp->edje->subobjs = eina_list_append(rp->edje->subobjs, en->cursor_bg);
 
-   en->cursor_fg = edje_object_add(rp->edje->evas);
+   en->cursor_fg = edje_object_add(rp->edje->base.evas);
    edje_object_file_set(en->cursor_fg, rp->edje->path, rp->part->source4);
    evas_object_smart_member_add(en->cursor_fg, rp->edje->obj);
    evas_object_stack_above(en->cursor_fg, rp->object);
@@ -2605,7 +2605,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
         smart = evas_object_smart_parent_get(rp->object);
 
         evas_object_hide(en->cursor_fg);
-        ob = edje_object_add(en->rp->edje->evas);
+        ob = edje_object_add(en->rp->edje->base.evas);
         edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source2);
         bh_position = edje_object_data_get(ob, "position");
         if ((!bh_position) || (bh_position[0] == 0)) bh_position = "BOTH";
@@ -2613,7 +2613,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
 
         if ((!strcmp(bh_position, "TOP")) || (!strcmp(bh_position, "BOTH")))
           {
-             ob = edje_object_add(en->rp->edje->evas);
+             ob = edje_object_add(en->rp->edje->base.evas);
              edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source3);
              evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
              en->block_handler_top = ob;
@@ -2625,7 +2625,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
 
         if ((!strcmp(bh_position, "BOTTOM")) || (!strcmp(bh_position, "BOTH")))
           {
-             ob = edje_object_add(en->rp->edje->evas);
+             ob = edje_object_add(en->rp->edje->base.evas);
              edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source2);
              evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
              en->block_handler_btm = ob;
@@ -2670,7 +2670,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
         if (!en->imf_context) goto done;
 
         ecore_imf_context_client_window_set(en->imf_context, rp->object);
-        ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->evas);
+        ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->base.evas);
 
         ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
                                                             _edje_entry_imf_retrieve_surrounding_cb, rp->edje);
index fef632d..e3052df 100644 (file)
@@ -462,34 +462,35 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
                  switch (ep->type)
                    {
                     case EDJE_PART_TYPE_RECTANGLE:
-                       rp->object = evas_object_rectangle_add(ed->evas);
+                       rp->object = evas_object_rectangle_add(ed->base.evas);
                        break;
+                     case EDJE_PART_TYPE_PROXY:
                     case EDJE_PART_TYPE_IMAGE:
-                       rp->object = evas_object_image_add(ed->evas);
+                       rp->object = evas_object_image_add(ed->base.evas);
                        break;
                     case EDJE_PART_TYPE_TEXT:
                        _edje_text_part_on_add(ed, rp);
-                       rp->object = evas_object_text_add(ed->evas);
+                       rp->object = evas_object_text_add(ed->base.evas);
                        evas_object_text_font_source_set(rp->object, ed->path);
                        break;
                     case EDJE_PART_TYPE_SWALLOW:
                     case EDJE_PART_TYPE_GROUP:
                     case EDJE_PART_TYPE_EXTERNAL:
-                       rp->object = evas_object_rectangle_add(ed->evas);
+                       rp->object = evas_object_rectangle_add(ed->base.evas);
                        evas_object_color_set(rp->object, 0, 0, 0, 0);
                        evas_object_pass_events_set(rp->object, 1);
                        evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
                        _edje_callbacks_focus_add(rp->object, ed, rp);
                        break;
                     case EDJE_PART_TYPE_TEXTBLOCK:
-                       rp->object = evas_object_textblock_add(ed->evas);
+                       rp->object = evas_object_textblock_add(ed->base.evas);
                        break;
                     case EDJE_PART_TYPE_BOX:
-                       rp->object = evas_object_box_add(ed->evas);
+                       rp->object = evas_object_box_add(ed->base.evas);
                         rp->anim = _edje_box_layout_anim_new(rp->object);
                        break;
                     case EDJE_PART_TYPE_TABLE:
-                       rp->object = evas_object_table_add(ed->evas);
+                       rp->object = evas_object_table_add(ed->base.evas);
                        break;
                     case EDJE_PART_TYPE_GRADIENT:
                        ERR("SPANK ! SPANK ! SPANK ! YOU ARE USING GRADIENT IN PART %s FROM GROUP %s INSIDE FILE %s !! THEY ARE NOW REMOVED !",
@@ -523,7 +524,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
                              evas_object_precise_is_inside_set(rp->object, 1);
                         }
                       if (rp->part->clip_to_id < 0)
-                        evas_object_clip_set(rp->object, ed->clipper);
+                        evas_object_clip_set(rp->object, ed->base.clipper);
                    }
               }
             if (n > 0)
@@ -669,9 +670,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
 #ifdef EDJE_CALC_CACHE
             ed->all_part_change = 1;
 #endif
-            if ((evas_object_clipees_get(ed->clipper)) &&
+            if ((evas_object_clipees_get(ed->base.clipper)) &&
                 (evas_object_visible_get(obj)))
-              evas_object_show(ed->clipper);
+              evas_object_show(ed->base.clipper);
             
             /* instantiate 'internal swallows' */
             for (i = 0; i < ed->table_parts_size; i++)
@@ -764,7 +765,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
                              }
                         }
                       
-                      child_obj = edje_object_add(ed->evas);
+                      child_obj = edje_object_add(ed->base.evas);
                       group_path = eina_list_append(group_path, group_path_entry);
                       if (!_edje_object_file_set_internal(child_obj, file, source, group_path))
                         {
@@ -1257,6 +1258,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec, Edje_Part_Collec
    eina_mempool_del(ce->mp.RECTANGLE);
    eina_mempool_del(ce->mp.TEXT);
    eina_mempool_del(ce->mp.IMAGE);
+   eina_mempool_del(ce->mp.PROXY);
    eina_mempool_del(ce->mp.SWALLOW);
    eina_mempool_del(ce->mp.TEXTBLOCK);
    eina_mempool_del(ce->mp.GROUP);
@@ -1269,6 +1271,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec, Edje_Part_Collec
    eina_mempool_del(ce->mp_rtl.RECTANGLE);
    eina_mempool_del(ce->mp_rtl.TEXT);
    eina_mempool_del(ce->mp_rtl.IMAGE);
+   eina_mempool_del(ce->mp_rtl.PROXY);
    eina_mempool_del(ce->mp_rtl.SWALLOW);
    eina_mempool_del(ce->mp_rtl.TEXTBLOCK);
    eina_mempool_del(ce->mp_rtl.GROUP);
@@ -1344,6 +1347,7 @@ _edje_collection_free_part_description_free(int type,
        FREE_POOL(RECTANGLE, ce, desc);
        FREE_POOL(TEXT, ce, desc);
        FREE_POOL(IMAGE, ce, desc);
+       FREE_POOL(PROXY, ce, desc);
        FREE_POOL(SWALLOW, ce, desc);
        FREE_POOL(TEXTBLOCK, ce, desc);
        FREE_POOL(GROUP, ce, desc);
index 2429231..e8ca549 100644 (file)
@@ -1757,7 +1757,7 @@ _elua_rect(lua_State *L)
    elo->obj.is_evas_obj = 1;
    elo->evas_obj = evas_object_rectangle_add(evas_object_evas_get(ed->obj));
    evas_object_smart_member_add(elo->evas_obj, ed->obj);
-   evas_object_clip_set(elo->evas_obj, ed->clipper);
+   evas_object_clip_set(elo->evas_obj, ed->base.clipper);
    evas_object_move(elo->evas_obj, ed->x, ed->y);
    evas_object_resize(elo->evas_obj, 0, 0);
    evas_object_data_set(elo->evas_obj, ELO, elo);
index 9c63b0a..f8413dc 100644 (file)
@@ -273,10 +273,10 @@ _edje_del(Edje *ed)
 void
 _edje_clean_objects(Edje *ed)
 {
-   evas_object_del(ed->clipper);
-   ed->evas = NULL;
+   evas_object_del(ed->base.clipper);
+   ed->base.evas = NULL;
    ed->obj = NULL;
-   ed->clipper = NULL;
+   ed->base.clipper = NULL;
 }
 
 void
index dc96619..0e7c26b 100644 (file)
@@ -277,6 +277,7 @@ typedef struct _Edje_Part_Api                        Edje_Part_Api;
 typedef struct _Edje_Part_Dragable                  Edje_Part_Dragable;
 typedef struct _Edje_Part_Image_Id                   Edje_Part_Image_Id;
 typedef struct _Edje_Part_Description_Image          Edje_Part_Description_Image;
+typedef struct _Edje_Part_Description_Proxy          Edje_Part_Description_Proxy;
 typedef struct _Edje_Part_Description_Text           Edje_Part_Description_Text;
 typedef struct _Edje_Part_Description_Box            Edje_Part_Description_Box;
 typedef struct _Edje_Part_Description_Table          Edje_Part_Description_Table;
@@ -285,6 +286,7 @@ typedef struct _Edje_Part_Description_Common         Edje_Part_Description_Commo
 typedef struct _Edje_Part_Description_Spec_Fill      Edje_Part_Description_Spec_Fill;
 typedef struct _Edje_Part_Description_Spec_Border    Edje_Part_Description_Spec_Border;
 typedef struct _Edje_Part_Description_Spec_Image     Edje_Part_Description_Spec_Image;
+typedef struct _Edje_Part_Description_Spec_Proxy     Edje_Part_Description_Spec_Proxy;
 typedef struct _Edje_Part_Description_Spec_Text      Edje_Part_Description_Spec_Text;
 typedef struct _Edje_Part_Description_Spec_Box       Edje_Part_Description_Spec_Box;
 typedef struct _Edje_Part_Description_Spec_Table     Edje_Part_Description_Spec_Table;
@@ -579,6 +581,7 @@ struct _Edje_Program_After /* the action to run after another action */
       TYPE      RECTANGLE;        \
       TYPE      TEXT;             \
       TYPE      IMAGE;            \
+      TYPE      PROXY;            \
       TYPE      SWALLOW;          \
       TYPE      TEXTBLOCK;        \
       TYPE      GROUP;            \
@@ -833,6 +836,8 @@ struct _Edje_Part_Description_Spec_Border
 
 struct _Edje_Part_Description_Spec_Image
 {
+   Edje_Part_Description_Spec_Fill   fill;
+
    Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
    unsigned int         tweens_count; /* number of tweens */
 
@@ -841,7 +846,13 @@ struct _Edje_Part_Description_Spec_Image
    Eina_Bool      set; /* if image condition it's content */
 
    Edje_Part_Description_Spec_Border border;
+};
+
+struct _Edje_Part_Description_Spec_Proxy
+{
    Edje_Part_Description_Spec_Fill   fill;
+
+   int id; /* the part id to use as a source for this state */
 };
 
 struct _Edje_Part_Description_Spec_Text
@@ -897,6 +908,12 @@ struct _Edje_Part_Description_Image
    Edje_Part_Description_Spec_Image image;
 };
 
+struct _Edje_Part_Description_Proxy
+{
+   Edje_Part_Description_Common common;
+   Edje_Part_Description_Spec_Proxy proxy;
+};
+
 struct _Edje_Part_Description_Text
 {
    Edje_Part_Description_Common common;
@@ -956,6 +973,11 @@ typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
 typedef Eina_Bool(*Edje_elm_function) (void *data, void *input_data);
 struct _Edje
 {
+   Evas_Object_Smart_Clipped_Data base;
+   /* This contains (or should):
+       Evas_Object          *clipper; // a big rect to clip this Edje to
+       Evas                 *evas; // the Evas this Edje belongs to
+   */
    const Edje_Smart_Api *api;
    const char           *path;
    const char           *group;
@@ -964,9 +986,7 @@ struct _Edje
    Evas_Coord            x, y, w, h;
    Edje_Size             min;
    double                paused_at;
-   Evas                 *evas; /* the Evas this Edje belongs to */
    Evas_Object          *obj; /* the smart object */
-   Evas_Object          *clipper; /* a big rect to clip this Edje to */
    Edje_File            *file; /* the file the data comes form */
    Edje_Part_Collection *collection; /* the description being used */
    Eina_List            *actions; /* currently running actions */
@@ -1431,6 +1451,7 @@ extern Eina_Mempool *_edje_real_part_state_mp;
 extern Eina_Mempool *_emp_RECTANGLE;
 extern Eina_Mempool *_emp_TEXT;
 extern Eina_Mempool *_emp_IMAGE;
+extern Eina_Mempool *_emp_PROXY;
 extern Eina_Mempool *_emp_SWALLOW;
 extern Eina_Mempool *_emp_TEXTBLOCK;
 extern Eina_Mempool *_emp_GROUP;
@@ -1512,7 +1533,6 @@ const char *   _edje_text_class_font_get(Edje *ed,
 
 Edje_Real_Part   *_edje_real_part_get(const Edje *ed, const char *part);
 Edje_Real_Part   *_edje_real_part_recursive_get(const Edje *ed, const char *part);
-Edje             *_edje_recursive_get(Edje *ed, const char *part, Edje_Real_Part **orp);
 Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
 void              _edje_color_class_member_add(Edje *ed, const char *color_class);
 void              _edje_color_class_member_del(Edje *ed, const char *color_class);
@@ -1526,7 +1546,7 @@ void              _edje_text_class_member_del(Edje *ed, const char *text_class);
 void              _edje_text_class_members_free(void);
 void              _edje_text_class_hash_free(void);
 
-Edje             *_edje_fetch(const Evas_Object *obj);
+Edje             *_edje_fetch(const Evas_Object *obj) EINA_PURE;
 int               _edje_freeze(Edje *ed);
 int               _edje_thaw(Edje *ed);
 int               _edje_block(Edje *ed);
index cab227b..ec87a43 100644 (file)
@@ -1008,7 +1008,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
 
    if (ed->delete_me) return;
 
-   sep = strrchr(sig, EDJE_PART_PATH_SEPARATOR);
+   sep = strchr(sig, EDJE_PART_PATH_SEPARATOR);
 
    /* If we are not sending the signal to a part of the child, the
     * signal if for ourself
@@ -1016,56 +1016,120 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
    if (sep)
      {
         Edje_Real_Part *rp = NULL;
+        const char *newsig;
         Edje *ed2;
-        char *newsig;
-        size_t length;
         char *part;
+        char *idx;
+        size_t length;
 
-        /* the signal contains a colon, split the signal into "parts:signal",
-         * use _edje_real_part_recursive_get_helper to find the real part.
-         */
-        length = strlen(sig) + 1;
+        /* the signal contains a colon, split the signal into "parts:signal" */
+        length = sep - sig + 1;
         part = alloca(length);
-        memcpy(part, sig, length);
-
-        newsig = part + (sep - sig);
+        memcpy(part, sig, length - 1);
+        part[length - 1] = '\0';
 
-        *newsig = '\0';
-        newsig++;
+        newsig = sep + 1;
 
-        ed2 = _edje_recursive_get(ed, part, &rp);
-        if (ed2 && ed2 != ed)
+        /* lookup for alias */
+        if (ed->collection && ed->collection->alias)
           {
-             _edje_emit(ed2, newsig, src);
+             char *alias;
+
+             alias = eina_hash_find(ed->collection->alias, part);
+             if (alias) {
+                char *aliased;
+                int alien;
+                int nslen;
+
+                alien = strlen(alias);
+                nslen = strlen(newsig);
+                length = alien + nslen + 2;
+
+                aliased = alloca(length);
+                memcpy(aliased, alias, alien);
+                aliased[alien] = EDJE_PART_PATH_SEPARATOR;
+                memcpy(aliased + alien + 1, newsig, nslen + 1);
+
+                _edje_emit(ed, aliased, src);
+                return;
+             }
           }
-        else if (rp)
+
+        /* search for the index if present and remove it from the part */
+        idx = strchr(part, EDJE_PART_PATH_SEPARATOR_INDEXL);
+        if (idx)
           {
-             switch (rp->part->type)
+             char *end;
+
+             end = strchr(idx + 1, EDJE_PART_PATH_SEPARATOR_INDEXR);
+             if (end && end != idx + 1)
                {
-                case EDJE_PART_TYPE_EXTERNAL:
-                   if (!rp->swallowed_object) break ;
+                  char *tmp;
 
-                   _edje_external_signal_emit(rp->swallowed_object, newsig, src);
-                   break ;
-                case EDJE_PART_TYPE_BOX:
-                case EDJE_PART_TYPE_TABLE:
-                   _edje_emit(rp->edje, newsig, src);
-                   break ;
-                case EDJE_PART_TYPE_GROUP:
-                   if (!rp->swallowed_object) break;
+                  tmp = alloca(end - idx - 1);
+                  memcpy(tmp, idx + 1, end - idx - 1);
+                  tmp[end - idx - 1] = '\0';
+                  *idx = '\0';
+                  idx = tmp;
+               }
+             else
+               {
+                  idx = NULL;
+               }
+          }
 
-                   ed2 = _edje_fetch(rp->swallowed_object);
-                   if (!ed2) break;
+        /* search for the right part now */
+        rp = _edje_real_part_get(ed, part);
+        if (!rp) goto end;
 
+        switch (rp->part->type)
+          {
+           case EDJE_PART_TYPE_GROUP:
+              if (!rp->swallowed_object) goto end;
+              ed2 = _edje_fetch(rp->swallowed_object);
+              if (!ed2) goto end;
+
+              _edje_emit(ed2, newsig, src);
+              break;
+
+           case EDJE_PART_TYPE_EXTERNAL:
+              if (!rp->swallowed_object) break ;
+
+              if (!idx)
+                {
+                   _edje_external_signal_emit(rp->swallowed_object, newsig, src);
+                }
+              else
+                {
+                   Evas_Object *child;
+
+                   child = _edje_children_get(rp, idx);
+                   ed2 = _edje_fetch(child);
+                   if (!ed2) goto end;
                    _edje_emit(ed2, newsig, src);
-                   break ;
-                default:
-                   fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n");
-                   break;
-               }
+                }
+              break ;
+
+           case EDJE_PART_TYPE_BOX:
+           case EDJE_PART_TYPE_TABLE:
+              if (idx)
+                {
+                   Evas_Object *child;
+
+                   child = _edje_children_get(rp, idx);
+                   ed2 = _edje_fetch(child);
+                   if (!ed2) goto end;
+                   _edje_emit(ed2, newsig, src);
+                }
+              break ;
+
+           default:
+              fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n");
+              break;
           }
      }
 
+ end:
    emsg.sig = sig;
    emsg.src = src;
    _edje_message_send(ed, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg);
index 3963926..e7a7347 100644 (file)
@@ -128,7 +128,7 @@ _oid_track(Edje * ed, Evas_Object * o)
    oi->ed = ed;
    oi->obj = o;
    evas_object_smart_member_add(oi->obj, oi->ed->obj);
-   evas_object_clip_set(oi->obj, oi->ed->clipper);
+   evas_object_clip_set(oi->obj, oi->ed->base.clipper);
    evas_object_geometry_get(oi->obj, &(oi->x), &(oi->y), &(oi->w), &(oi->h));
    snprintf(buf, sizeof(buf), "%i", oi->oid);
    if (!si->oid.hash)
index 358e6b6..e253aab 100644 (file)
@@ -6,14 +6,12 @@ static void _edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
 static void _edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
 static void _edje_smart_show(Evas_Object * obj);
 static void _edje_smart_hide(Evas_Object * obj);
-static void _edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
-static void _edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip);
-static void _edje_smart_clip_unset(Evas_Object * obj);
 static void _edje_smart_calculate(Evas_Object * obj);
 
 static Eina_Bool _edje_smart_file_set(Evas_Object *obj, const char *file, const char *group);
 
 static Edje_Smart_Api _edje_smart_class = EDJE_SMART_API_INIT_NAME_VERSION("edje");
+static Evas_Smart_Class _edje_smart_parent;
 static Evas_Smart *_edje_smart = NULL;
 
 Eina_List *_edje_edjes = NULL;
@@ -30,16 +28,17 @@ Eina_List *_edje_edjes = NULL;
 EAPI Evas_Object *
 edje_object_add(Evas *evas)
 {
-   Edje *ed;
    Evas_Object *e;
+
    if (!_edje_smart)
      {
+       memset(&_edje_smart_parent, 0, sizeof(_edje_smart_parent));
        _edje_object_smart_set(&_edje_smart_class);
-       _edje_smart = evas_smart_class_new((Evas_Smart_Class *)&_edje_smart_class);
+       _edje_smart = 
+          evas_smart_class_new((Evas_Smart_Class *)&_edje_smart_class);
      }
 
    e = evas_object_smart_add(evas, _edje_smart);
-   ed = _edje_fetch(e);
 
    return e;
 }
@@ -50,18 +49,22 @@ _edje_object_smart_set(Edje_Smart_Api *sc)
    if (!sc)
      return;
 
+   evas_object_smart_clipped_smart_set(&sc->base);
+
+   _edje_smart_parent.add = sc->base.add; /* Save parent class */
    sc->base.add = _edje_smart_add;
+   _edje_smart_parent.del = sc->base.del; /* Save parent class */
    sc->base.del = _edje_smart_del;
+   /* we'll handle move thank you */
    sc->base.move = _edje_smart_move;
    sc->base.resize = _edje_smart_resize;
+   _edje_smart_parent.show = sc->base.show; /* Save parent class */
    sc->base.show = _edje_smart_show;
+   _edje_smart_parent.hide = sc->base.hide; /* Save parent class */
    sc->base.hide = _edje_smart_hide;
-   sc->base.color_set = _edje_smart_color_set;
-   sc->base.clip_set = _edje_smart_clip_set;
-   sc->base.clip_unset = _edje_smart_clip_unset;
    sc->base.calculate = _edje_smart_calculate;
-   sc->base.member_add = NULL;
-   sc->base.member_del = NULL;
+   //sc->base.member_add = NULL;
+   //sc->base.member_del = NULL;
    sc->file_set = _edje_smart_file_set;
 }
 
@@ -101,14 +104,14 @@ _edje_smart_add(Evas_Object *obj)
        evas_object_smart_data_set(obj, ed);
      }
 
-   ed->evas = evas_object_evas_get(obj);
-   ed->clipper = evas_object_rectangle_add(ed->evas);
-   evas_object_static_clip_set(ed->clipper, 1);
-   evas_object_smart_member_add(ed->clipper, obj);
-   evas_object_color_set(ed->clipper, 255, 255, 255, 255);
-   evas_object_move(ed->clipper, -10000, -10000);
-   evas_object_resize(ed->clipper, 20000, 20000);
-   evas_object_pass_events_set(ed->clipper, 1);
+   ed->base.evas = evas_object_evas_get(obj);
+   ed->base.clipper = evas_object_rectangle_add(ed->base.evas);
+   evas_object_static_clip_set(ed->base.clipper, 1);
+   evas_object_smart_member_add(ed->base.clipper, obj);
+   evas_object_color_set(ed->base.clipper, 255, 255, 255, 255);
+   evas_object_move(ed->base.clipper, -10000, -10000);
+   evas_object_resize(ed->base.clipper, 20000, 20000);
+   evas_object_pass_events_set(ed->base.clipper, 1);
    ed->is_rtl = EINA_FALSE;
    ed->have_objects = 1;
    ed->references = 1;
@@ -237,12 +240,10 @@ _edje_smart_show(Evas_Object * obj)
 {
    Edje *ed;
 
+   _edje_smart_parent.show(obj);
    ed = evas_object_smart_data_get(obj);
    if (!ed) return;
    if (evas_object_visible_get(obj)) return;
-   if (evas_object_visible_get(ed->clipper)) return;
-   if ((ed->collection) && (evas_object_clipees_get(ed->clipper)))
-     evas_object_show(ed->clipper);
    if (_edje_script_only(ed))
      {  
        _edje_script_only_show(ed);
@@ -261,12 +262,10 @@ _edje_smart_hide(Evas_Object * obj)
 {
    Edje *ed;
 
+   _edje_smart_parent.hide(obj);
    ed = evas_object_smart_data_get(obj);
    if (!ed) return;
    if (!evas_object_visible_get(obj)) return;
-   if (!evas_object_visible_get(ed->clipper)) return;
-   if ((ed->collection) && (evas_object_clipees_get(ed->clipper)))
-     evas_object_hide(ed->clipper);
    if (_edje_script_only(ed))
      {  
        _edje_script_only_hide(ed);
@@ -281,41 +280,6 @@ _edje_smart_hide(Evas_Object * obj)
 }
 
 static void
-_edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a)
-{
-   Edje *ed;
-
-   ed = evas_object_smart_data_get(obj);
-   if (!ed) return;
-   evas_object_color_set(ed->clipper, r, g, b, a);
-//   _edje_emit(ed, "color_set", NULL);
-}
-
-static void
-_edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip)
-{
-   Edje *ed;
-
-   ed = evas_object_smart_data_get(obj);
-   if (!ed) return;
-   if (evas_object_clip_get(obj) == clip) return;
-   evas_object_clip_set(ed->clipper, clip);
-//   _edje_emit(ed, "clip_set", NULL);
-}
-
-static void
-_edje_smart_clip_unset(Evas_Object * obj)
-{
-   Edje *ed;
-
-   ed = evas_object_smart_data_get(obj);
-   if (!ed) return;
-   if (!evas_object_clip_get(obj)) return;
-   evas_object_clip_unset(ed->clipper);
-//   _edje_emit(ed, "clip_unset", NULL);
-}
-
-static void
 _edje_smart_calculate(Evas_Object *obj)
 {
    Edje *ed;
index 305ffb0..7571868 100644 (file)
@@ -42,7 +42,6 @@ static void _edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj,
 static void _edje_object_signal_preload_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
 
 Edje_Real_Part *_edje_real_part_recursive_get_helper(const Edje *ed, char **path);
-static Edje *_edje_recursive_get_helper(Edje *ed, char **path, Edje_Real_Part **orp);
 
 /************************** API Routines **************************/
 
@@ -2135,10 +2134,12 @@ edje_object_part_text_input_panel_enabled_get(const Evas_Object *obj, const char
 }
 
 /**
- * @brief XX
+ * @brief Advances the cursor to the next cursor position.
+ * @see evas_textblock_cursor_char_next
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur The edje cursor to advance
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2158,10 +2159,12 @@ edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Curso
 }
 
 /**
- * @brief XX
+ * @brief Moves the cursor to the previous char
+ * @see evas_textblock_cursor_char_prev
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_prev(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2181,10 +2184,11 @@ edje_object_part_text_cursor_prev(Evas_Object *obj, const char *part, Edje_Curso
 }
 
 /**
- * @brief XX
+ * @brief Move the cursor to the char above the current cursor position.
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_up(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2204,10 +2208,11 @@ edje_object_part_text_cursor_up(Evas_Object *obj, const char *part, Edje_Cursor
 }
 
 /**
- * @brief XX
+ * @brief Moves the cursor to the char below the current cursor position.
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_down(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2227,10 +2232,12 @@ edje_object_part_text_cursor_down(Evas_Object *obj, const char *part, Edje_Curso
 }
 
 /**
- * @brief XX
+ * @brief Moves the cursor to the beginning of the text part
+ * @see evas_textblock_cursor_paragraph_first
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI void
 edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2249,10 +2256,12 @@ edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_
 }
 
 /**
- * @brief XX
+ * @brief Moves the cursor to the end of the text part.
+ * @see evas_textblock_cursor_paragraph_last
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI void
 edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2271,10 +2280,12 @@ edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cu
 }
 
 /**
- * @brief XX
+ * @brief Copy the cursor to another cursor.
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param sry the cursor to copy from
+ * @param dst the cursor to copy to
  */
 EAPI void
 edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst)
@@ -2293,10 +2304,12 @@ edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Curso
 }
 
 /**
- * @brief XX
+ * @brief Move the cursor to the beginning of the line.
+ * @see evas_textblock_cursor_line_char_first
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI void
 edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2315,10 +2328,12 @@ edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part,
 }
 
 /**
- * @brief XX
+ * @brief Move the cursor to the end of the line.
+ * @see evas_textblock_cursor_line_char_last
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur the edje cursor to work on
  */
 EAPI void
 edje_object_part_text_cursor_line_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2367,10 +2382,13 @@ edje_object_part_text_cursor_coord_set(Evas_Object *obj, const char *part,
 }
 
 /**
- * @brief XX
+ * @brief Returns whether the cursor points to a format.
+ * @see evas_textblock_cursor_is_format
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur The cursor to adjust.
+ * @return EINA_TRUE if it's true, EINA_FALSE otherwise.
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2390,10 +2408,13 @@ edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *p
 }
 
 /**
- * @brief XX
+ * @brief Return true if the cursor points to a visible format
+ * For example \t, \n, item and etc.
+ * @see  evas_textblock_cursor_format_is_visible_get
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur The cursor to adjust.
  */
 EAPI Eina_Bool
 edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -2413,10 +2434,12 @@ edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const
 }
 
 /**
- * @brief XX
+ * @brief Returns the content (char) at the cursor position.
+ * @see evas_textblock_cursor_content_get
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
+ * @param cur The cursor to use
  */
 EAPI const char *
 edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
@@ -4713,22 +4736,6 @@ _edje_real_part_recursive_get(const Edje *ed, const char *part)
    return rp;
 }
 
-Edje *
-_edje_recursive_get(Edje *ed, const char *part, Edje_Real_Part **orp)
-{
-   Edje *oed;
-   char **path;
-
-   path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0);
-   if (!path) return NULL;
-
-   oed = _edje_recursive_get_helper(ed, path, orp);
-
-   free(*path);
-   free(path);
-   return oed;
-}
-
 Evas_Object *
 _edje_children_get(Edje_Real_Part *rp, const char *partid)
 {
@@ -4874,85 +4881,6 @@ _edje_real_part_recursive_get_helper(const Edje *ed, char **path)
 }
 
 /* Private Routines */
-static Edje *
-_edje_recursive_get_helper(Edje *ed, char **path, Edje_Real_Part **orp)
-{
-   Evas_Object *child;
-   Edje_Real_Part *rp;
-   char *idx = NULL;
-
-   if (!path[0])
-     return NULL;
-
-   if (ed->collection && ed->collection->alias)
-     {
-        char *alias;
-
-        alias = _edje_merge_path(eina_hash_find(ed->collection->alias, path[0]), path + 1);
-        if (alias) {
-           Edje *tmp;
-
-           tmp = _edje_recursive_get(ed, alias, orp);
-           free(alias);
-           return tmp;
-        }
-     }
-
-   //printf("  lookup: %s on %s\n", path[0], ed->parent ? ed->parent : "-");
-   idx = strchr(path[0], EDJE_PART_PATH_SEPARATOR_INDEXL);
-   if (idx)
-     {
-       char *end;
-
-       end = strchr(idx + 1, EDJE_PART_PATH_SEPARATOR_INDEXR);
-       if (end)
-         {
-            *end = '\0';
-            *idx = '\0';
-            idx++;
-         }
-     }
-
-   rp = _edje_real_part_get(ed, path[0]);
-   if (!rp) return NULL;
-
-   if (!path[1] && !idx)
-     {
-        *orp = rp;
-        return rp->edje;
-     }
-
-   switch (rp->part->type)
-     {
-      case EDJE_PART_TYPE_GROUP:
-        if (!rp->swallowed_object) return NULL;
-        ed = _edje_fetch(rp->swallowed_object);
-        if (!ed) return NULL;
-        path++;
-
-         if (!path[0]) return ed;
-        return _edje_recursive_get_helper(ed, path, orp);
-      case EDJE_PART_TYPE_BOX:
-      case EDJE_PART_TYPE_TABLE:
-      case EDJE_PART_TYPE_EXTERNAL:
-        if (!idx)
-           {
-              *orp = rp;
-              return NULL;
-           }
-        path++;
-
-        child = _edje_children_get(rp, idx);
-
-        ed = _edje_fetch(child);
-        if (!ed) return NULL;
-         if (!path[0]) return ed;
-        return _edje_recursive_get_helper(ed, path, orp);
-      default:
-        return NULL;
-     }
-}
-
 Edje_Real_Part *
 _edje_real_part_get(const Edje *ed, const char *part)
 {
@@ -5351,7 +5279,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
    evas_object_smart_member_add(rp->swallowed_object, rp->edje->obj);
    if (rp->clip_to)
      evas_object_clip_set(rp->swallowed_object, rp->clip_to->object);
-   else evas_object_clip_set(rp->swallowed_object, rp->edje->clipper);
+   else evas_object_clip_set(rp->swallowed_object, rp->edje->base.clipper);
    evas_object_stack_above(rp->swallowed_object, rp->object);
    evas_object_event_callback_add(rp->swallowed_object,
                                   EVAS_CALLBACK_FREE,