svn update: 58064 (latest:58064)
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 29 Mar 2011 09:24:19 +0000 (18:24 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Tue, 29 Mar 2011 09:24:19 +0000 (18:24 +0900)
25 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/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_entry.c
src/lib/edje_load.c
src/lib/edje_private.h
src/lib/edje_program.c
src/lib/edje_smart.c
src/lib/edje_util.c

index 6f6b21e..c82c832 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.
index 0f377ed..1ad482f 100644 (file)
@@ -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..35c6ca7 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];
 
-   ed->image.fill.smooth = parse_bool(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 `%s` part (%i).",
+               progname, file_in, line - 1, ep->name, ep->type);
+           exit(-1);
+        }
+     }
+
+   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];
 
-   ed->image.fill.type = parse_enum(0,
-                                   "SCALE", EDJE_FILL_TYPE_SCALE,
-                                   "TILE", EDJE_FILL_TYPE_TILE,
-                                   NULL);
+           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->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];
+
+           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];
 
-   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->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];
 
-   ed->image.fill.pos_abs_x = parse_int(0);
-   ed->image.fill.pos_abs_y = parse_int(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);
+        }
+     }
+
+   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];
 
-   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 = &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->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];
 
-   ed->image.fill.abs_x = parse_int(0);
-   ed->image.fill.abs_y = parse_int(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);
+        }
+     }
+
+   fill->abs_x = parse_int(0);
+   fill->abs_y = parse_int(1);
 }
 
 
@@ -6885,7 +7080,6 @@ st_collections_group_programs_program_action(void)
                           "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT,
                           "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY,
                           "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET,
-                          "HIDE_VISIBLE_PASSWORD", EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD,
                           NULL);
    if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
      {
@@ -6948,7 +7142,6 @@ st_collections_group_programs_program_action(void)
        /* this is implicitly set by script {} so this is here just for
         * completeness */
        break;
-      case EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD:
       case EDJE_ACTION_TYPE_FOCUS_OBJECT:
       case EDJE_ACTION_TYPE_FOCUS_SET:
        check_arg_count(1);
@@ -7035,8 +7228,6 @@ st_collections_group_programs_program_target(void)
          data_queue_part_lookup(pc, name, &(et->id));
        else if (ep->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
          data_queue_part_lookup(pc, name, &(et->id));
-       else if (ep->action == EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD)
-         data_queue_part_lookup(pc, name, &(et->id));
        else
          {
             ERR("%s: Error. parse error %s:%i. "
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 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..0e5b47a 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
               {
@@ -4817,10 +4859,9 @@ cpp_get_token(cpp_reader * pfile)
                    }
                  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..fdcc00c 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:
index 0876977..569265e 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
@@ -148,8 +149,7 @@ typedef enum _Edje_Action_Type
    EDJE_ACTION_TYPE_FOCUS_OBJECT  = 10,
    EDJE_ACTION_TYPE_PARAM_COPY    = 11,
    EDJE_ACTION_TYPE_PARAM_SET     = 12,
-   EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD = 13, 
-   EDJE_ACTION_TYPE_LAST          = 14
+   EDJE_ACTION_TYPE_LAST          = 13
 } Edje_Action_Type;
 
 typedef enum _Edje_Tween_Mode
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..efd1ecf 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);
@@ -381,11 +382,7 @@ _edje_recalc(Edje *ed)
          }
      }
    if (ed->postponed) return;
-   //TODO: need to find out "when", "how" ed->obj can be deleted.
-   //if ed->obj can be deleted then this expception handling is granted.
-   //otherwise, we should fix app-usage and remove this handling.
-   if (ed->obj)
-     evas_object_smart_changed(ed->obj);
+   evas_object_smart_changed(ed->obj);
    ed->postponed = 1;
 }
 
@@ -881,11 +878,11 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
                  evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r, &ins_t, &ins_b);
                  mw = ins_l + tw + ins_r;
                  mh = ins_t + th + ins_b;
-//               if (chosen_desc->text.min_x)
+                 if (chosen_desc->text.min_x)
                    {
                       if (mw > *minw) *minw = mw;
                    }
-//               if (chosen_desc->text.min_y)
+                 if (chosen_desc->text.min_y)
                    {
                       if (mh > *minh) *minh = mh;
                    }
@@ -1320,36 +1317,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 +1485,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 +1566,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 +1657,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 +2099,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 +2164,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 +2205,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..1b3de07 100644 (file)
@@ -2139,7 +2139,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
 
    if (ep->type == EDJE_PART_TYPE_RECTANGLE)
      rp->object = evas_object_rectangle_add(ed->evas);
-   else if (ep->type == EDJE_PART_TYPE_IMAGE)
+   else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY)
      rp->object = evas_object_image_add(ed->evas);
    else if (ep->type == EDJE_PART_TYPE_TEXT)
      {
@@ -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)
      {
index 2fa9349..3e1f827 100644 (file)
@@ -20,6 +20,7 @@ typedef struct _Entry Entry;
 typedef struct _Sel Sel;
 typedef struct _Anchor Anchor;
 
+static Eina_Bool keypad_show = EINA_FALSE;
 static Ecore_Timer *hide_timer = NULL;
 static Entry *focused_entry = NULL;
 
@@ -47,6 +48,7 @@ struct _Entry
    Evas_Textblock_Cursor *sel_start, *sel_end;
    Evas_Textblock_Cursor *cursor_user, *cursor_user_extra;
    Evas_Textblock_Cursor *preedit_start, *preedit_end;
+   Ecore_Timer *pw_timer;
    Eina_List *sel;
    Eina_List *anchors;
    Eina_List *anchorlist;
@@ -63,7 +65,6 @@ struct _Entry
    Eina_Bool autocapital : 1;
    Eina_Bool uppercase : 1;
    Eina_Bool autoperiod : 1;
-   Eina_Bool need_commit : 1;
    int select_dragging_state;
    double space_key_time;
 
@@ -97,6 +98,17 @@ struct _Anchor
    Eina_Bool item : 1;
 };
 
+static void
+_input_panel_hide(Ecore_IMF_Context *ctx)
+{
+   Ecore_IMF_Input_Panel_State state;
+
+   state = ecore_imf_context_input_panel_state_get(ctx);
+
+   if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
+      ecore_imf_context_input_panel_hide(ctx);
+}
+
 static Eina_Bool
 _punctuation_check(Entry *en)
 {
@@ -110,7 +122,7 @@ _punctuation_check(Entry *en)
    tc = evas_object_textblock_cursor_new(en->rp->object);
    evas_textblock_cursor_copy(en->cursor, tc);
 
-   if (!evas_textblock_cursor_char_prev(tc))
+   if (!evas_textblock_cursor_char_prev(tc)) 
      {
         ret = EINA_TRUE;
         goto done;
@@ -125,7 +137,7 @@ _punctuation_check(Entry *en)
      }
    else
      {
-        if (evas_textblock_cursor_char_prev(tc))
+        if (evas_textblock_cursor_char_prev(tc)) 
           {
              str = evas_textblock_cursor_range_text_get(tc, en->cursor, EVAS_TEXTBLOCK_TEXT_MARKUP);
              if (!str) goto done;
@@ -177,56 +189,50 @@ _caps_mode_check(Entry *en)
 #endif
 }
 
-#ifdef HAVE_ECORE_IMF
+/*
 static void
-_input_panel_hide(Ecore_IMF_Context *ctx)
+_text_prepend(Entry *en, Evas_Textblock_Cursor *cursor, const char *text)
 {
-   Ecore_IMF_Input_Panel_State state;
+   char *str;
 
-   state = ecore_imf_context_input_panel_state_get(ctx);
+   if (!text) return;
 
-   if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
-      ecore_imf_context_input_panel_hide(ctx);
+   str = strdup(text);
+   if (!str) return;
+
+   if (en->uppercase)
+     {
+        str[0] = toupper(str[0]);
+     }
+
+   evas_textblock_cursor_text_prepend(cursor, str);
+   free(str);
 }
+*/
 
+#ifdef HAVE_ECORE_IMF   
 static Eina_Bool _hide_timer_handler(void *data)
 {
    Entry *en = (Entry *)data;
    if (!en || !en->imf_context) goto done;
 
-   _input_panel_hide(en->imf_context);
+   if (!keypad_show)
+      _input_panel_hide(en->imf_context);
 
 done:
    hide_timer = NULL;
    return ECORE_CALLBACK_CANCEL;
 }
 
-static void
-_input_panel_hide_timer_start(Entry *en)
-{
-   if (!en || !en->input_panel_enable) return;
-
-   if (hide_timer)
-     {
-        ecore_timer_del(hide_timer);
-     }
-   hide_timer = ecore_timer_add(0.2, _hide_timer_handler, en);
-}
-
-static void
-_input_panel_show(Entry *en)
+static void 
+_input_panel_hide_timer_start(void *data)
 {
-   if (!en || !en->input_panel_enable) return;
-
    if (hide_timer)
      {
         ecore_timer_del(hide_timer);
-        hide_timer = NULL;
      }
-
-   if(!en->imf_context) return;
-   ecore_imf_context_input_panel_show(en->imf_context);
-   focused_entry = en;
+   hide_timer = ecore_timer_add(0.2, _hide_timer_handler, data);
+   focused_entry = (Entry *)data;
 }
 
 static void
@@ -272,11 +278,14 @@ _edje_entry_focus_in_cb(void *data, Evas_Object *o __UNUSED__, const char *emiss
 
    if (evas_object_focus_get(rp->edje->obj))
      {
-        printf("[Edje_entry::%s] pid : %d, obj : %p\n", __func__, getpid(), en);
         ecore_imf_context_reset(en->imf_context);
         ecore_imf_context_focus_in(en->imf_context);
 
-        _input_panel_show(en);
+        if (en->input_panel_enable)
+          {
+             keypad_show = EINA_TRUE;
+             ecore_imf_context_input_panel_show(en->imf_context);
+          }
 
         _caps_mode_check(en);
      }
@@ -294,12 +303,15 @@ _edje_entry_focus_out_cb(void *data, Evas_Object *o __UNUSED__, const char *emis
    en = rp->entry_data;
    if (!en || !en->imf_context) return;
 
-   printf("[Edje_entry::%s] pid : %d, obj : %p\n", __func__, getpid(), en);
    ecore_imf_context_reset(en->imf_context);
    ecore_imf_context_cursor_position_set(en->imf_context, evas_textblock_cursor_pos_get(en->cursor));
    ecore_imf_context_focus_out(en->imf_context);
 
-   _input_panel_hide_timer_start(en);
+   if (en->input_panel_enable)
+     {
+        keypad_show = EINA_FALSE;
+        _input_panel_hide_timer_start(en);
+     }
 }
 #endif /* HAVE_ECORE_IMF */
 
@@ -307,7 +319,7 @@ static void
 _edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Edje *ed = data;
-#ifdef HAVE_ECORE_IMF
+#ifdef HAVE_ECORE_IMF   
    Edje_Real_Part *rp;
    Entry *en;
 #endif
@@ -324,12 +336,14 @@ _edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
 
    if (!en->imf_context) return;
 
-   printf("[Edje_entry::%s] pid : %d, obj : %p\n", __func__, getpid(), en);
    ecore_imf_context_reset(en->imf_context);
    ecore_imf_context_focus_in(en->imf_context);
 
-   _input_panel_show(en);
-   _caps_mode_check(en);
+   if (en->input_panel_enable)
+     {
+        keypad_show = EINA_TRUE;
+        ecore_imf_context_input_panel_show(en->imf_context);
+     }
 #endif /* HAVE_ECORE_IMF */
 }
 
@@ -353,12 +367,15 @@ _edje_focus_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
 
    if (!en->imf_context) return;
 
-   printf("[Edje_entry::%s] pid : %d, obj : %p\n", __func__, getpid(), en);
    ecore_imf_context_reset(en->imf_context);
    ecore_imf_context_cursor_position_set(en->imf_context, evas_textblock_cursor_pos_get(en->cursor));
    ecore_imf_context_focus_out(en->imf_context);
 
-   _input_panel_hide_timer_start(en);
+   if (en->input_panel_enable)
+     {
+        keypad_show = EINA_FALSE;
+        _input_panel_hide_timer_start(en);
+     }
 #endif /* HAVE_ECORE_IMF */
 }
 
@@ -548,7 +565,7 @@ static void
 _curs_jump_line_by(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en, int by)
 {
    int ln;
-
+   
    ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL) + by;
    _curs_jump_line(c, o, en, ln);
 }
@@ -601,7 +618,7 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
    if (!en->sel_end) return;
    _sel_enable(c, o, en);
    if (!evas_textblock_cursor_compare(c, en->sel_end)) return;
-
+   
    if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         if (evas_textblock_cursor_compare(en->sel_start, c) > 0)
@@ -770,7 +787,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
 
         list_cnt = eina_list_count(en->sel);
         list_idx = 0;
-
+               
         evas_object_hide(en->cursor_fg);
         evas_object_hide(en->cursor_bg);
 
@@ -804,7 +821,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                        evas_object_move(en->block_handler_btm, x + r->x + r->w, y + r->y + r->h);
                        evas_object_show(en->block_handler_btm);
                     }
-               }
+               } 
              *(&(sel->rect)) = *r;
              range = eina_list_remove_list(range, range);
              free(r);
@@ -991,10 +1008,10 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                        free(sel);
                        an->sel = eina_list_remove_list(an->sel, an->sel);
                     }
-
+                  
                   sel = calloc(1, sizeof(Sel));
                   an->sel = eina_list_append(an->sel, sel);
-
+                  
                   if (en->rp->edje->item_provider.func)
                     {
                        ob = en->rp->edje->item_provider.func
@@ -1029,7 +1046,7 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                   for (ll = range; ll; ll = eina_list_next(ll))
                     {
                        Evas_Object *ob;
-
+                       
                        sel = calloc(1, sizeof(Sel));
                        an->sel = eina_list_append(an->sel, sel);
                        ob = edje_object_add(en->rp->edje->evas);
@@ -1041,7 +1058,7 @@ _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);
                        edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
                        evas_object_smart_member_add(ob, smart);
@@ -1051,7 +1068,7 @@ _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);
                        evas_object_color_set(ob, 0, 0, 0, 0);
                        evas_object_smart_member_add(ob, smart);
@@ -1073,7 +1090,7 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
              if (an->item)
                {
                   Evas_Coord cx, cy, cw, ch;
-
+                  
                   if (!evas_textblock_cursor_format_item_geometry_get
                       (an->start, &cx, &cy, &cw, &ch))
                      continue;
@@ -1083,7 +1100,7 @@ _anchors_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
              else
                {
                   Evas_Textblock_Rectangle *r;
-
+                  
                   r = range->data;
                   *(&(sel->rect)) = *r;
                   if (sel->obj_bg)
@@ -1224,7 +1241,7 @@ _anchors_get(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
                {
                   if (an)
                     {
-                       /*
+                       /* 
                           if (!firsttext)
                           {
                           if (an->name) free(an->name);
@@ -1257,45 +1274,55 @@ _backspace(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en __UNUS
 }
 
 static void
-_autoperiod_insert(Entry *en, Evas_Textblock_Cursor *cursor)
+_autoperiod_insert(Edje_Real_Part *rp)
 {
-   Evas_Textblock_Cursor *tc = NULL;
+   Entry *en;
+   Evas_Textblock_Cursor *tc;
    char *str;
    unsigned int len = 0;
 
-   if (!en || !en->autoperiod) return;
+   if (!rp || !rp->entry_data || !rp->object) return;
+
    if (!edje_autoperiod_allow_get()) return;
 
-   if ((ecore_time_get() - en->space_key_time) > EDJE_ENTRY_DOUBLE_SPACE_TIME)
-      goto done;
+   en = rp->entry_data;
+   if (!en->autoperiod) return;
 
-   tc = evas_object_textblock_cursor_new(en->rp->object);
-   evas_textblock_cursor_copy(cursor, tc);
+   if ((ecore_time_get() - en->space_key_time) > EDJE_ENTRY_DOUBLE_SPACE_TIME)
+     {
+        goto done;
+     }
 
-   if (!evas_textblock_cursor_char_prev(tc)) goto done;
-   if (!evas_textblock_cursor_char_prev(tc)) goto done;
+   tc = evas_object_textblock_cursor_new(rp->object);
+   evas_textblock_cursor_copy(en->cursor, tc);
 
-   str = evas_textblock_cursor_range_text_get(tc, cursor,
-                                              EVAS_TEXTBLOCK_TEXT_MARKUP);
+   if (evas_textblock_cursor_char_prev(tc))
+     {
+        if (evas_textblock_cursor_char_prev(tc))
+          {
+             str = evas_textblock_cursor_range_text_get(tc, en->cursor, EVAS_TEXTBLOCK_TEXT_MARKUP);
 
-   if (!str) goto done;
+             if (str)
+               {
+                  len = strlen(str);
 
-   len = strlen(str);
+                  if ((len >= 2) && 
+                      ((str[len-2] != ':') && (str[len-2] != ';') && 
+                       (str[len-2] != '.') && (str[len-2] != ',') && 
+                       (str[0] != '?') && (str[len-2] != '!') && 
+                       (str[len-2] != ' ')) && (str[len-1] == ' '))
+                    {
+                       _backspace(en->cursor, rp->object, en);
+                       evas_textblock_cursor_text_prepend(en->cursor, ".");
+                    }
 
-   if ((len >= 2) &&
-       ((str[len-2] != ':') && (str[len-2] != ';') &&
-        (str[len-2] != '.') && (str[len-2] != ',') &&
-        (str[0] != '?') && (str[len-2] != '!') &&
-        (str[len-2] != ' ')) && (str[len-1] == ' '))
-     {
-        _backspace(cursor, en->rp->object, en);
-        evas_textblock_cursor_text_prepend(cursor, ".");
+                  free(str);
+               }
+          }
      }
-
-   free(str);
+   evas_textblock_cursor_free(tc);
 
 done:
-   if (tc) evas_textblock_cursor_free(tc);
    en->space_key_time = ecore_time_get();
 }
 
@@ -1308,7 +1335,6 @@ _delete(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en __UNUSED_
 void
 _edje_entry_hide_visible_password(Edje_Real_Part *rp)
 {
-   Entry *en = rp->entry_data;/*remove this line*/
    const Evas_Object_Textblock_Node_Format *node;
    node = evas_textblock_node_format_first_get(rp->object);
    for (; node ; node = evas_textblock_node_format_next_get(node))
@@ -1323,11 +1349,20 @@ _edje_entry_hide_visible_password(Edje_Real_Part *rp)
                }
           }
      }
-   _edje_entry_real_part_configure(rp);
+   _edje_entry_real_part_configure(rp);  
    _edje_emit(rp->edje, "entry,changed", rp->part->name);
-   /*remove the below 2 lines*/
+}
+
+static Eina_Bool 
+_password_timer_cb(void *data)
+{
+   Entry *en = (Entry *)data;
+   _edje_entry_hide_visible_password(en->rp);
+      /*count characters*/
    if (en->func)
       en->func(en->data, NULL);
+   en->pw_timer = NULL;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -1369,6 +1404,9 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
    cursor_changed = EINA_FALSE;
    if (!strcmp(ev->key, "Escape"))
      {
+#ifdef HAVE_ECORE_IMF
+        if (en->imf_context) ecore_imf_context_reset(en->imf_context);
+#endif
         // dead keys here. Escape for now (should emit these)
         _edje_emit(ed, "entry,key,escape", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1490,7 +1528,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
              else
                {
                 _delete(en->cursor, rp->object, en);
-                 /*count characters*/
+                 /*count characters*/                  
                 if (en->func)
                    en->func(en->data, NULL);
                }
@@ -1646,7 +1684,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
         /* if inputting text is not allowed, dont allow text input */
         if (en->func)
           {
-             if (en->func(en->data, "<br>")) return;
+            if (en->func(en->data, "<br>")) return;
           }
 
         if (multiline)
@@ -1675,10 +1713,14 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
              _caps_mode_check(en);
           }
         _edje_emit(ed, "entry,key,enter", rp->part->name);
-        /*count characters*/
+        /*count characters*/                   
         if (en->func)
            en->func(en->data, NULL);
      }
+   else if ((!strcmp(ev->key, "space")) && edje_autoperiod_allow_get() && en->autoperiod)
+     {
+        _autoperiod_insert(rp);
+     }
    else
      {
         if (ev->string)
@@ -1686,33 +1728,36 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
              if (en->have_selection)
                 _range_del(en->cursor, rp->object, en);
              _sel_clear(en->cursor, rp->object, en);
-
-             if (!strcmp(ev->key, "space")) _autoperiod_insert(en, en->cursor);
-
-             //   if PASSWORD_SHOW_LAST_CHARACTER mode, appending it with password tag
              if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
-               {
-                   _edje_entry_hide_visible_password(en->rp);
-                   /*remove the below 3 lines*/
-                   if (en->func)
-                      if (en->func(en->data, (void *)ev->string))
-                         return;
-                   _text_filter_format_prepend(en, en->cursor, "+ password=off");
-                   _text_filter_markup_prepend(en, en->cursor, ev->string);
-                   _text_filter_format_prepend(en, en->cursor, "- password");
+               {                                               
+                  _edje_entry_hide_visible_password(en->rp);           
+                  /*if inputtin text is not allowed, dont allow text input*/
+                  if (en->func)
+                     if (en->func(en->data, (void *)ev->string))
+                        return;
+                  evas_object_textblock_text_markup_prepend(en->cursor, "<password=off>");
+                  evas_object_textblock_text_markup_prepend(en->cursor, ev->string);
+                  evas_object_textblock_text_markup_prepend(en->cursor, "</password>");
+                  if (en->pw_timer)
+                    {
+                       ecore_timer_del(en->pw_timer);
+                       en->pw_timer = NULL;
+                    }
+                  en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en); 
                }
              else
                {
-                  /*remove the below 3 lines*/
+                  /*if inputtin text is not allowed, dont allow text input*/
                   if (en->func)
                      if (en->func(en->data, (void *)ev->string))
                         return;
 
                   //evas_textblock_cursor_text_prepend(en->cursor, ev->string);
+                  //_text_prepend(en, en->cursor, ev->string);
                   _text_filter_text_prepend(en, en->cursor, ev->string);
 
                   /*count characters*/
-                  if (en->func) en->func(en->data, NULL);
+                  if (en->func) en->func(en->data, NULL);                                      
 #if 0
 //             evas_textblock_cursor_text_prepend(en->cursor, ev->string);
              _text_filter_text_prepend(en, en->cursor, ev->string);
@@ -1797,16 +1842,7 @@ _edje_entry_select_word(Edje_Real_Part *rp)
    str = eina_strbuf_new();
 
    ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
-   if (!ct || strlen(ct) == 0)
-   {
-      if (_edje_entry_cursor_prev(rp, EDJE_CURSOR_MAIN))
-        {
-           ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
-           if (!ct || strlen(ct) == 0) return;
-        }
-      else
-        return;
-   }
+   if (!ct || strlen(ct) == 0) return;
 
    block_type = _get_char_type(ct);
 
@@ -1828,7 +1864,7 @@ _edje_entry_select_word(Edje_Real_Part *rp)
    do  /* move cursor to the end point of the words */
    {
       ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
-      if (block_type != _get_char_type(ct))
+      if (block_type != _get_char_type(ct)) 
         {
            //_edje_entry_cursor_prev(rp, EDJE_CURSOR_MAIN);
            break;
@@ -1844,7 +1880,7 @@ _edje_entry_select_word(Edje_Real_Part *rp)
    en->select_allow = EINA_TRUE;
    en->had_sel = EINA_TRUE;
    en->selecting = EINA_FALSE;
-
    //printf("string : %s \n", eina_strbuf_string_get(str));
    eina_strbuf_free(str);
 }
@@ -1852,7 +1888,8 @@ _edje_entry_select_word(Edje_Real_Part *rp)
 static void
 _edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
 {
-   Edje_Real_Part *rp = data;
+   Edje* ed = data;
+   Edje_Real_Part *rp = ed->focused_part;
    Entry *en;
    if (!rp) return;
    en = rp->entry_data;
@@ -1869,18 +1906,17 @@ _long_press(void *data)
 {
    Edje_Real_Part *rp = data;
    Entry *en;
-   if (!rp) return ECORE_CALLBACK_CANCEL;
+   if (!rp) return;
    en = rp->entry_data;
 
    if (en->longpress_timer)
      {
        ecore_timer_del(en->longpress_timer);
        en->longpress_timer = NULL;
-     }
-
+     } 
+   
    en->long_pressed = EINA_TRUE;
    en->longpress_timer = NULL;
-   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -1898,7 +1934,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
    en = rp->entry_data;
    en->double_clicked = EINA_FALSE;
    en->long_pressed = EINA_FALSE;
-
+   
    if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
        (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
       return;
@@ -1920,7 +1956,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
            return;
      }
 #endif
-
+   
    en->select_mod_start = EINA_FALSE;
    en->select_mod_end = EINA_FALSE;
    if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
@@ -1941,7 +1977,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
    evas_object_geometry_get(rp->object, &x, &y, &w, &h);
    en->cx = ev->canvas.x - x;
    en->cy = ev->canvas.y - y;
-
+   
    if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         evas_textblock_cursor_char_coord_set(en->cursor, en->cx, en->cy);
@@ -1952,14 +1988,14 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
          {
            Evas_Coord lx, ly, lw, lh;
            int line;
-
+           
            line = evas_textblock_cursor_line_coord_set(en->cursor, en->cy);
            if (line == -1)
              _curs_end(en->cursor, rp->object, en);
            else
              {
                int lnum;
-
+               
                lnum = evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
                if (lnum < 0)
                  {
@@ -1977,19 +2013,19 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
          }
        if (dosel)
          {
-           if ((en->have_selection) &&
+           if ((en->have_selection) && 
                ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)))
              {
                Eina_List *first, *last;
                FLOAT_T sc;
-
+               
                first = en->sel;
                last = eina_list_last(en->sel);
                if (first && last)
                  {
                    Evas_Textblock_Rectangle *r1, *r2;
                    Evas_Coord d, d1, d2;
-
+                   
                    r1 = first->data;
                    r2 = last->data;
                    d = r1->x - en->cx;
@@ -2004,7 +2040,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
                    if (sc == ZERO) sc = _edje_scale;
                    d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing number!
                    d = d * d;
-
+                   
                    if (d1 < d2)
                      {
                        if (d1 <= d)
@@ -2049,11 +2085,11 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
 
    if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
-        if (en->longpress_timer) ecore_timer_del(en->longpress_timer);
-        en->longpress_timer = ecore_timer_add(1.0, _long_press, data);
+          if (en->longpress_timer) ecore_timer_del(en->longpress_timer);
+          en->longpress_timer = ecore_timer_add(1.0, _long_press, data);
      }
    else
-      _edje_entry_real_part_configure(rp);
+       _edje_entry_real_part_configure(rp);
 }
 
 static void
@@ -2079,11 +2115,7 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
      }
 
    if (en->double_clicked) return;
-   if (en->long_pressed)
-     {
-        en->long_pressed = EINA_FALSE;
-        return;
-     }
+   if (en->long_pressed) return;
 
 #ifdef HAVE_ECORE_IMF
    if (en->imf_context)
@@ -2131,7 +2163,7 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
    if (rp->part->select_mode != EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
        if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
-         {
+         {  
            if (en->select_allow)
              {
                if (en->had_sel)
@@ -2148,7 +2180,7 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
          }
        else
          evas_textblock_cursor_copy(en->cursor, en->sel_end);
-
+       
        if (en->selecting)
          {
            if (en->have_selection)
@@ -2168,12 +2200,16 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
         ecore_imf_context_cursor_position_set(en->imf_context,
                                               evas_textblock_cursor_pos_get(en->cursor));
 
-        _input_panel_show(en);
+        if (en->input_panel_enable)
+          {
+             keypad_show = EINA_TRUE;
+             ecore_imf_context_input_panel_show(en->imf_context);
+          }
      }
 #endif
 
    _caps_mode_check(en);
-
+   
    _edje_entry_real_part_configure(rp);
 }
 
@@ -2202,26 +2238,10 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
            return;
      }
 #endif
-
+   
    if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         _edje_entry_real_part_configure(rp);
-               if (en->long_pressed)
-               {
-                       tc = evas_object_textblock_cursor_new(rp->object);
-                       evas_textblock_cursor_copy(en->cursor, tc);
-                       evas_object_geometry_get(rp->object, &x, &y, &w, &h);
-
-                       en->cx = ev->cur.canvas.x - x;
-                       en->cy = ev->cur.canvas.y - y;
-                       evas_textblock_cursor_char_coord_set(en->cursor, en->cx, en->cy);
-
-                       if (evas_textblock_cursor_compare(tc, en->cursor))
-                               _edje_emit(rp->edje, "cursor,changed", rp->part->name);
-                       evas_textblock_cursor_free(tc);
-
-                       _edje_emit(en->rp->edje, "magnifier,changed", en->rp->part->name);
-               }
      }
    else
      {
@@ -2244,7 +2264,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
              else
                 _curs_lin_end(en->cursor, rp->object, en);
           }
-
+             
         if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) ||
             (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
           {
@@ -2381,7 +2401,7 @@ _edje_entry_top_handler_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Objec
      }
 
    _edje_entry_real_part_configure(rp);
-
+   
    _edje_emit(en->rp->edje, "handler,moving", en->rp->part->name);
 }
 
@@ -2475,8 +2495,6 @@ _edje_entry_bottom_handler_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Ob
      }
 
    _edje_entry_real_part_configure(rp);
-
-   _edje_emit(en->rp->edje, "handler,moving", en->rp->part->name);
 }
 
 static void
@@ -2552,7 +2570,6 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
    rp->entry_data = en;
    en->rp = rp;
    en->autoperiod = EINA_TRUE;
-   en->need_commit = EINA_TRUE;
 
 #ifdef HAVE_ECORE_IMF
    en->input_panel_enable = _edje_input_panel_enable;
@@ -2615,7 +2632,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
           {
              ob = edje_object_add(en->rp->edje->evas);
              edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source3);
-             evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
+             evas_object_smart_member_add(ob, smart);
+             evas_object_stack_above(ob, rp->object);
              en->block_handler_top = ob;
              en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, en->block_handler_top);
              evas_object_event_callback_add(ob, EVAS_CALLBACK_MOUSE_DOWN, _edje_entry_top_handler_mouse_down_cb, en->rp);
@@ -2627,7 +2645,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
           {
              ob = edje_object_add(en->rp->edje->evas);
              edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source2);
-             evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
+             evas_object_smart_member_add(ob, smart);
+             evas_object_stack_above(ob, rp->object);
              en->block_handler_btm = ob;
              en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, en->block_handler_btm);
              evas_object_event_callback_add(ob, EVAS_CALLBACK_MOUSE_DOWN, _edje_entry_bottom_handler_mouse_down_cb, en->rp);
@@ -2672,7 +2691,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
         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_retrieve_surrounding_callback_set(en->imf_context,
+        ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context, 
                                                             _edje_entry_imf_retrieve_surrounding_cb, rp->edje);
         en->imf_ee_handler_commit = ecore_event_handler_add(ECORE_IMF_EVENT_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje);
         en->imf_ee_handler_delete = ecore_event_handler_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje);
@@ -2692,7 +2711,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
      }
    done:
    en->cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(rp->object);
-
+   
    edje_object_signal_callback_add(rp->edje->obj, "mouse,down,1,double", rp->part->name, _edje_entry_mouse_double_clicked, rp);
 }
 
@@ -2709,23 +2728,15 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
 #endif
    rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->cursor_bg);
    rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->cursor_fg);
-   rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->block_handler_top);
-   rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->block_handler_btm);
    evas_object_del(en->cursor_bg);
    evas_object_del(en->cursor_fg);
 
-   if (en->block_handler_top)
-          evas_object_del(en->block_handler_top);
-   if (en->block_handler_btm)
-          evas_object_del(en->block_handler_btm);
-
-   if (en->longpress_timer)
+   if (en->pw_timer)
      {
-        ecore_timer_del(en->longpress_timer);
-        en->longpress_timer = NULL;
+        ecore_timer_del(en->pw_timer);
+        en->pw_timer = NULL;
      }
 
-
 #ifdef HAVE_ECORE_IMF
    if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)
      {
@@ -2749,12 +2760,17 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
                   en->imf_ee_handler_changed = NULL;
                }
 
-             if (focused_entry == en)
+             if (en->input_panel_enable)
                {
-                  if (hide_timer)
+                  if (focused_entry == en)
                     {
-                       ecore_timer_del(hide_timer);
-                       hide_timer = NULL;
+                       if (hide_timer)
+                         {
+                            ecore_timer_del(hide_timer);
+                            hide_timer = NULL;
+
+                            _input_panel_hide(en->imf_context);
+                         }
                     }
                }
 
@@ -2837,23 +2853,11 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text)
    if (!en) return;
    // set text as markup
    _sel_clear(en->cursor, rp->object, en);
-#ifdef HAVE_ECORE_IMF
-   if ((en->have_preedit) && (en->imf_context))
-     {
-        en->need_commit = EINA_FALSE;
-        ecore_imf_context_reset(en->imf_context);
-     }
-#endif
    evas_object_textblock_text_markup_set(rp->object, text);
 
    _anchors_get(en->cursor, rp->object, en);
    _edje_emit(rp->edje, "entry,changed", rp->part->name);
    _edje_entry_set_cursor_start(rp);
-#ifdef HAVE_ECORE_IMF
-   if (en->imf_context)
-      ecore_imf_context_cursor_position_set(en->imf_context,
-                                            evas_textblock_cursor_pos_get(en->cursor));
-#endif
 }
 
 void
@@ -2940,11 +2944,9 @@ _edje_entry_select_all(Edje_Real_Part *rp)
 #endif
 
    _edje_entry_real_part_configure(rp);
-
+   
    en->select_allow = EINA_TRUE;
    en->had_sel = EINA_TRUE;
-
-   _edje_emit(en->rp->edje, "selection,end", en->rp->part->name);
 }
 
 void
@@ -3107,7 +3109,7 @@ _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow)
       return;
 
    en->select_allow = allow;
-
+   
    if ((allow) && (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
      {
         _edje_entry_select_word(rp);
@@ -3128,7 +3130,7 @@ _edje_entry_textinput_callback_set(Edje_Real_Part * rp, Edje_elm_function func,
 {
    Entry *en = rp->entry_data;
    if (!en) return;
-
+   
    en->func = func;
    en->data = data;
 }
@@ -3167,7 +3169,7 @@ void
 _edje_entry_autoperiod_set(Edje_Real_Part *rp, Eina_Bool autoperiod)
 {
    Entry *en = rp->entry_data;
-   if (!en) return;
+   if (!en) return;   
    en->autoperiod = autoperiod;
 }
 
@@ -3632,12 +3634,6 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
           }
      }
 
-   if (!en->need_commit)
-     {
-        en->need_commit = EINA_TRUE;
-        return ECORE_CALLBACK_PASS_ON;
-     }
-
    tc = evas_object_textblock_cursor_new(rp->object);
 
    /* calculate the cursor position to insert commit string */
@@ -3657,28 +3653,36 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
 
    if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
      {
-        _edje_entry_hide_visible_password(en->rp);
+        _edje_entry_hide_visible_password(en->rp);             
         /* if inputtin text is not allowed, dont allow text input */
         if (en->func)
           {
-             if (en->func(en->data, (void *)ev->str)) return ECORE_CALLBACK_PASS_ON;
+            if (en->func(en->data, (void *)ev->str)) return ECORE_CALLBACK_PASS_ON;
           }
 
-        _text_filter_format_prepend(en, tc, "+ password=off");
-        _text_filter_markup_prepend(en, tc, ev->str);
-        _text_filter_format_prepend(en, tc, "- password");
+        evas_object_textblock_text_markup_prepend(en->cursor, "<password=off>");
+        evas_object_textblock_text_markup_prepend(en->cursor, ev->str);
+        evas_object_textblock_text_markup_prepend(en->cursor, "</password>");
+
+        if (en->pw_timer)
+          {
+             ecore_timer_del(en->pw_timer);
+             en->pw_timer = NULL;
+          }
+        en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en);   
      }
    else
      {
-        if (!strcmp(ev->str, " ")) _autoperiod_insert(en, tc);
+       if (!strcmp(ev->str, " ")) _autoperiod_insert(rp);
 
        /* if inputtin text is not allowed, dont allow text input */
         if (en->func)
           {
-             if (en->func(en->data, ev->str)) return ECORE_CALLBACK_PASS_ON;
+            if (en->func(en->data, ev->str)) return ECORE_CALLBACK_PASS_ON;
           }
 
         //evas_textblock_cursor_text_prepend(en->cursor, ev->str);
+        //_text_prepend(en, tc, ev->str);
         _text_filter_text_prepend(en, tc, ev->str);
 
         /*count characters*/
@@ -3723,7 +3727,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
    Eina_List *attrs = NULL;
    Ecore_IMF_Preedit_Attr *attr;
    Eina_List *l;
-   Eina_Strbuf *buf;
+   Eina_Strbuf *buf;   
 
    if (!rp) return ECORE_CALLBACK_PASS_ON;
 
@@ -3734,8 +3738,10 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
 
    if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
 
+   if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
    if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
 
+//   ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos);
    ecore_imf_context_preedit_string_with_attributes_get(en->imf_context, &preedit_string, &attrs, &cursor_pos);
 
    if (!strcmp(preedit_string, ""))
@@ -3765,12 +3771,12 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
 
    /* insert preedit character(s) */
    //xx
-   if (strlen(preedit_string) > 0)
+   if (strlen(preedit_string) > 0) 
      {
         buf = eina_strbuf_new();
         if (attrs)
           {
-             EINA_LIST_FOREACH(attrs, l, attr)
+             EINA_LIST_FOREACH(attrs, l, attr)     
                {
                   if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1)
                     {
@@ -3787,7 +3793,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
                        eina_strbuf_append(buf, "</>");
                     }
                }
-          }
+          }        
 //        evas_object_textblock_text_markup_prepend(en->cursor, eina_strbuf_string_get(buf));
         _text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf));
         eina_strbuf_free(buf);
@@ -3821,7 +3827,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
         evas_textblock_cursor_pos_set(en->cursor, preedit_start_pos + cursor_pos);
      }
 
-   /* count characters*/
+   /* count characters*/                       
    if (en->func)
       en->func(en->data, NULL);
 
index fef632d..1e828b1 100644 (file)
@@ -464,6 +464,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
                     case EDJE_PART_TYPE_RECTANGLE:
                        rp->object = evas_object_rectangle_add(ed->evas);
                        break;
+                     case EDJE_PART_TYPE_PROXY:
                     case EDJE_PART_TYPE_IMAGE:
                        rp->object = evas_object_image_add(ed->evas);
                        break;
@@ -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 dc96619..b0576a4 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,8 @@ 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          *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 +983,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 +1448,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 +1530,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 +1543,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..c21a248 100644 (file)
@@ -963,13 +963,6 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
              if (_edje_block_break(ed)) goto break_prog;
           }
         break;
-      case EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD:
-          {
-             Edje_Real_Part *part;
-             part = ed->table_parts[pr->param.dst % ed->table_parts_size];
-             _edje_entry_hide_visible_password(part);
-          }
-        break;
      default:
         // _edje_emit(ed, "program,start", pr->name);
         // _edje_emit(ed, "program,stop", pr->name);
@@ -1008,7 +1001,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 +1009,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;
+               }
+          }
+
+        /* 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;
 
-                   ed2 = _edje_fetch(rp->swallowed_object);
-                   if (!ed2) break;
+              _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 358e6b6..884579e 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;
@@ -34,12 +32,12 @@ edje_object_add(Evas *evas)
    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);
      }
 
    e = evas_object_smart_add(evas, _edje_smart);
-   ed = _edje_fetch(e);
 
    return e;
 }
@@ -50,18 +48,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;
 }
 
@@ -237,12 +239,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 +261,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 +279,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..7e5d6ba 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 **************************/
 
@@ -2022,7 +2021,7 @@ edje_object_part_text_autocapitalization_set(const Evas_Object *obj, const char
 {
    Edje *ed;
    Edje_Real_Part *rp;
-
+       
    ed = _edje_fetch(obj);
    if ((!ed) || (!part)) return;
    rp = _edje_real_part_recursive_get(ed, (char *)part);
@@ -2035,11 +2034,10 @@ edje_object_part_text_autocapitalization_set(const Evas_Object *obj, const char
 
 /**
  * @brief Enables autoperiod
- * Autoperiod is the feature that period (.) will be automatically added when space bar is pressed twice in a short time.
  *
  * @param obj A valid Evas_Object handle
  * @param part The part name
- * @param autoperiod EINA_TRUE to enable, EINA_FALSE otherwise
+ * @param autocap EINA_TRUE to enable, EINA_FALSE otherwise
  */
 EAPI void
 edje_object_part_text_autoperiod_set(const Evas_Object *obj, const char *part, Eina_Bool autoperiod)
@@ -2074,7 +2072,7 @@ edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part)
 
    ed = _edje_fetch(obj);
    if ((!ed) || (!part)) return NULL;
-
+   
    rp = _edje_real_part_recursive_get(ed, (char *)part);
    if (!rp) return NULL;
 
@@ -2135,10 +2133,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 +2158,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 +2183,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 +2207,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 +2231,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 +2255,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 +2279,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 +2303,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 +2327,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 +2381,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 +2407,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 +2433,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 +4735,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 +4880,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)
 {
@@ -5283,7 +5210,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
        rp->swallow_params.min.h = h1;
        if (w2 > 0) rp->swallow_params.max.w = w2;
        if (h2 > 0) rp->swallow_params.max.h = h2;
-       switch (am)
+       switch (am)
          {
           case EVAS_ASPECT_CONTROL_NONE:
              rp->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_NONE;