hermet pushed a commit to branch master.

commit 80e13538076f5e72ce96ac6f59e6b872441a18b5
Author: ChunEon Park <[email protected]>
Date:   Fri May 31 17:35:30 2013 +0900

    edje - support edc source_visible
---
 ChangeLog                       |  3 +++
 NEWS                            |  1 +
 data/edje/vim/syntax/edc.vim    |  3 ++-
 src/bin/edje/edje_cc_handlers.c | 24 +++++++++++++++++++++++-
 src/lib/edje/edje_calc.c        | 10 +++++++---
 src/lib/edje/edje_data.c        |  1 +
 src/lib/edje/edje_edit.c        |  1 +
 src/lib/edje/edje_private.h     |  1 +
 8 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 608a156..d08de9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2013-05-31  ChunEon Park (Hermet)
+        * Edje: support edc proxy.source_visible
+
 2013-05-31  Jérémy Zurcher
         * Added --enable-image-loader-xyz=yes|static|auto|no for all loaders
         * compilation fail if not found and option set to yes or static
diff --git a/NEWS b/NEWS
index 3fcda0b..bae0c24 100644
--- a/NEWS
+++ b/NEWS
@@ -103,6 +103,7 @@ Additions:
     * Edje:
      - Add edje_object_part_text_input_panel_layout_variation_set/get API
      - Add EDJE_INPUT_PANEL_LAYOUT_DATETIME layout
+     - support edc proxy.source_visible
     * Evil:
      - Add mkdtemp.
     * ecore_x:
diff --git a/data/edje/vim/syntax/edc.vim b/data/edje/vim/syntax/edc.vim
index c47d701..08c6bec 100644
--- a/data/edje/vim/syntax/edc.vim
+++ b/data/edje/vim/syntax/edc.vim
@@ -14,7 +14,7 @@ endif
 " A bunch of useful keywords
 syn keyword    edcBlock        images data fonts collections group contained
 syn keyword    edcBlock        part parts dragable description contained
-syn keyword    edcBlock        text font fill origin size image contained
+syn keyword    edcBlock        text font fill origin size image proxy contained
 syn keyword    edcBlock        programs program styles style contained
 syn keyword    edcBlock        gradient spectra spectrum contained
 syn keyword    edcBlock        color_classes color_class rel1 rel2 contained
@@ -31,6 +31,7 @@ syn keyword   edcLabel        source5 source6 multiline 
pointer_mode contained
 syn keyword    edcLabel        state visible step aspect fixed middle contained
 syn keyword    edcLabel        aspect_preference ellipsis elipsis image 
contained
 syn keyword    edcLabel        relative offset to to_x to_y contained
+syn keyword edcLabel source_visible contained
 syn keyword    edcLabel        border border_scale scale_hint color color2 
color3 font size contained
 syn keyword    edcLabel        signal action transition in filter contained
 syn keyword    edcLabel        target after fit align contained
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index ef3ad6b..dd9840c 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -321,6 +321,8 @@ static void 
st_collections_group_parts_part_description_table_homogeneous(void);
 static void st_collections_group_parts_part_description_table_align(void);
 static void st_collections_group_parts_part_description_table_padding(void);
 static void st_collections_group_parts_part_description_table_min(void);
+static void 
st_collections_group_parts_part_description_proxy_source_visible(void);
+
 #ifdef HAVE_EPHYSICS
 static void st_collections_group_parts_part_description_physics_mass(void);
 static void 
st_collections_group_parts_part_description_physics_restitution(void);
@@ -633,6 +635,8 @@ New_Statement_Handler statement_handlers[] =
      {"collections.group.parts.part.description.table.align", 
st_collections_group_parts_part_description_table_align},
      {"collections.group.parts.part.description.table.padding", 
st_collections_group_parts_part_description_table_padding},
      {"collections.group.parts.part.description.table.min", 
st_collections_group_parts_part_description_table_min},
+     {"collections.group.parts.part.description.proxy.source_visible", 
st_collections_group_parts_part_description_proxy_source_visible},
+
 #ifdef HAVE_EPHYSICS
      {"collections.group.parts.part.description.physics.mass", 
st_collections_group_parts_part_description_physics_mass},
      {"collections.group.parts.part.description.physics.restitution", 
st_collections_group_parts_part_description_physics_restitution},
@@ -1095,7 +1099,7 @@ _edje_part_description_alloc(unsigned char type, const 
char *collection, const c
            ed = mem_alloc(SZ(Edje_Part_Description_Proxy));
 
            ed->proxy.id = -1;
-
+           ed->proxy.source_visible = EINA_TRUE;
            _edje_part_description_fill(&ed->proxy.fill);
 
            result = &ed->common;
@@ -7392,6 +7396,24 @@ static void 
st_collections_group_parts_part_description_table_padding(void)
 }
 
 static void
+st_collections_group_parts_part_description_proxy_source_visible(void)
+{
+   Edje_Part_Description_Proxy *ed;
+
+   check_arg_count(1);
+
+   if (current_part->type != EDJE_PART_TYPE_PROXY)
+     {
+        ERR("parse error %s:%i. proxy attributes in non-PROXY part.",
+            file_in, line - 1);
+        exit(-1);
+     }
+
+   ed = (Edje_Part_Description_Proxy*) current_desc;
+   ed->proxy.source_visible = parse_bool(0);
+}
+
+static void
 st_collections_group_parts_part_description_table_min(void)
 {
    Edje_Part_Description_Table *ed;
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 26614e2..ce1796a 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2486,9 +2486,13 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, 
Edje_Calc_Params *p3, Edj
      }
 
    eo_do(ep->object,
-        evas_obj_image_fill_set(p3->type.common.fill.x, p3->type.common.fill.y,
-                                p3->type.common.fill.w, 
p3->type.common.fill.h),
-        evas_obj_image_smooth_scale_set(p3->smooth));
+         evas_obj_image_fill_set(p3->type.common.fill.x,
+                                 p3->type.common.fill.y,
+                                 p3->type.common.fill.w,
+                                 p3->type.common.fill.h),
+         evas_obj_image_smooth_scale_set(p3->smooth),
+         evas_obj_image_source_visible_set(chosen_desc->proxy.source_visible)
+         );
 }
 
 static void
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index f531af4..7a9a31d 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -723,6 +723,7 @@ _edje_edd_init(void)
    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_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, 
Edje_Part_Description_Proxy, "proxy.source_visible", proxy.source_visible, 
EET_T_CHAR);
 
    EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
    eddc.func.mem_free = mem_free_text;
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 9584295..c9b9f84 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3095,6 +3095,7 @@ edje_edit_state_add(Evas_Object *obj, const char *part, 
const char *name, double
        memset(&pro->proxy, 0, sizeof (pro->proxy));
 
        pro->proxy.id = -1;
+       pro->proxy.source_visible = EINA_TRUE;
        pro->proxy.fill.smooth = 1;
        pro->proxy.fill.pos_rel_x = 0.0;
        pro->proxy.fill.pos_abs_x = 0;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 5cc0075..968bc49 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1130,6 +1130,7 @@ 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 */
+   Eina_Bool source_visible;  /* source object visibility */
 };
 
 struct _Edje_Part_Description_Spec_Text

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2

Reply via email to