hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=11513e05681e211b52624ca6bf82c082a3647a20

commit 11513e05681e211b52624ca6bf82c082a3647a20
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Tue Jun 30 15:26:07 2015 +0900

    remove unused functions.
---
 data/templates/basic.edc   |  34 +++++-------
 src/lib/edc_parser.c       | 136 ---------------------------------------------
 src/lib/enventor_private.h |   1 -
 3 files changed, 15 insertions(+), 156 deletions(-)

diff --git a/data/templates/basic.edc b/data/templates/basic.edc
index 0967a5b..8bf7138 100644
--- a/data/templates/basic.edc
+++ b/data/templates/basic.edc
@@ -2,11 +2,10 @@ collections {
    images {
       image: "logo.png" COMP;
    }
-   group { name: "main";
+   group { "main";
       parts {
-         part { name: "logo";
-            type: IMAGE;
-            description { state: "default" 0.0;
+         image { "logo";
+            desc { "default";
                rel1.relative: 0.0 0.0;
                rel2.relative: 0.5 0.5;
                image.normal: "logo.png";
@@ -14,24 +13,22 @@ collections {
                aspect_preference: BOTH;
             }
          }
-         part { name: "rect";
-            type: RECT;
-            description { state: "default" 0.0;
+         rect { "rect";
+            desc { "default";
                rel1.relative: 0.5 0.0;
                rel2.relative: 1.0 0.5;
                color: 0 136 170 255;
             }
-            description { state: "clicked" 0.0;
+            desc { "clicked";
                rel1.relative: 0.65 0.15;
                rel2.relative: 0.85 0.35;
                color: 170 136 0 255;
             }
          }
-         part { name: "text";
-            type: TEXT;
+         text { "text";
             scale: 1;
             effect: FAR_SOFT_SHADOW;
-            description { state: "default" 0.0;
+            desc { "default";
                rel1.relative: 0.0 0.5;
                rel2.relative: 0.5 1.0;
                color: 0 136 170 255;
@@ -45,9 +42,8 @@ collections {
                }
             }
          }
-         part { name: "content";
-            type: SWALLOW;
-            description { state: "default" 0.0;
+         swallow { "content";
+            desc { "default";
                rel1.relative: 0.5 0.5;
                rel2.relative: 1.0 1.0;
             }
@@ -55,19 +51,19 @@ collections {
       }
 /*
       programs {
-         program { name: "mouse_down";
+         program { "mouse_down";
             signal: "mouse,down,1";
             source: "rect";
-            action: STATE_SET "clicked" 0.0;
+            action: STATE_SET "clicked";
             target: "rect";
          }
-         program { name: "mouse_up";
+         program { "mouse_up";
             signal: "mouse,up,1";
             source: "rect";
-            action: STATE_SET "default" 0.0;
+            action: STATE_SET "default";
             target: "rect";
          }
       }
 */
    }
-}
\ No newline at end of file
+}
diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index fc9c246..b4d96db 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -123,108 +123,6 @@ end:
 }
 
 static void
-cur_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
-{
-   const char *quot = QUOT_UTF8;
-   const char *part = "part";
-   const char *parts = "parts";
-   const char *group = "group";
-   const int quot_len = QUOT_UTF8_LEN;
-   const int part_len = 4; //strlen("part");
-   const int parts_len = 5; //strlen("parts");
-   const int group_len = 5;  //strlen("group");
-
-   cur_name_td *td = data;
-   char *utf8 = td->utf8;
-   int cur_pos = td->cur_pos;
-   char *p = utf8;
-   char *end = utf8 + cur_pos;
-
-   int bracket = 0;
-   const char *group_name = NULL;
-   const char *part_name = NULL;
-   int group_name_len = 0;
-   int part_name_len = 0;
-
-   while (p <= end)
-     {
-        //Skip "" range
-        if (!strncmp(p, quot, quot_len))
-          {
-             p += quot_len;
-             p = strstr(p, quot);
-             if (!p) goto end;
-             p += quot_len;
-          }
-
-        if (*p == '{')
-          {
-             bracket++;
-             p++;
-             continue;
-          }
-
-        //Check whether outside of part or group
-        if ((*p == '}') && (p < end))
-          {
-             bracket--;
-             p++;
-
-             if (bracket == 1) group_name = NULL;
-             else if (bracket == 3) part_name = NULL;
-
-             continue;
-          }
-        //Check Part in
-        if (strncmp(p, parts, parts_len))
-          {
-             if (!strncmp(p, part, part_len))
-               {
-                  p += part_len;
-                  char *name_begin = strstr(p, quot);
-                  if (!name_begin) goto end;
-                  name_begin += quot_len;
-                  p = name_begin;
-                  char *name_end = strstr(p, quot);
-                  if (!name_end) goto end;
-                  part_name = name_begin;
-                  part_name_len = name_end - name_begin;
-                  p = name_end + quot_len;
-                  bracket++;
-                  continue;
-               }
-          }
-        //Check Group in
-        if (!strncmp(p, group, group_len))
-          {
-             p += group_len;
-             char *name_begin = strstr(p, quot);
-             if (!name_begin) goto end;
-             name_begin += quot_len;
-             p = name_begin;
-             char *name_end = strstr(p, quot);
-             if (!name_end) goto end;
-             group_name = name_begin;
-             group_name_len = name_end - name_begin;
-             p = name_end + quot_len;
-             bracket++;
-             continue;
-          }
-        p++;
-     }
-   if (part_name)
-     part_name = eina_stringshare_add_length(part_name, part_name_len);
-   if (group_name)
-     group_name = eina_stringshare_add_length(group_name, group_name_len);
-
-end:
-   free(utf8);
-   td->utf8 = NULL;
-   td->part_name = part_name;
-   td->group_name = group_name;
-}
-
-static void
 cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
 {
    const char *quot = QUOT_UTF8;
@@ -1375,40 +1273,6 @@ parser_cur_group_name_get(parser_data *pd, Evas_Object 
*entry,
 }
 
 void
-parser_cur_name_get(parser_data *pd, Evas_Object *entry,
-                    void (*cb)(void *data, Eina_Stringshare *state_name, 
double state_value,
-                    Eina_Stringshare *part_name, Eina_Stringshare 
*group_name), void *data)
-{
-   if (pd->cntd) ecore_thread_cancel(pd->cntd->thread);
-
-   const char *text = elm_entry_entry_get(entry);
-   if (!text) return;
-
-   char *utf8 = elm_entry_markup_to_utf8(text);
-   if (!utf8) return;
-
-   cur_name_td *td = calloc(1, sizeof(cur_name_td));
-   if (!td)
-     {
-        free(utf8);
-        EINA_LOG_ERR("Failed to allocate Memory!");
-        return;
-     }
-
-   td->pd = pd;
-   pd->cntd = td;
-   td->utf8 = utf8;
-   td->cur_pos = elm_entry_cursor_pos_get(entry);
-   td->cb = cb;
-   td->cb_data = data;
-
-   td->thread = ecore_thread_run(cur_name_thread_blocking,
-                                 cur_name_thread_end,
-                                 cur_name_thread_cancel,
-                                 td);
-}
-
-void
 parser_cur_state_get(parser_data *pd, Evas_Object *entry,
                      void (*cb)(void *data, Eina_Stringshare *state_name, 
double state_value,
                      Eina_Stringshare *part_name, Eina_Stringshare 
*group_name), void *data)
diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h
index 477a8fd..34fd906 100644
--- a/src/lib/enventor_private.h
+++ b/src/lib/enventor_private.h
@@ -99,7 +99,6 @@ Eina_Bool color_ready(color_data *cd);
 parser_data *parser_init(void);
 void parser_term(parser_data *pd);
 Eina_Stringshare *parser_first_group_name_get(parser_data *pd, Evas_Object 
*entry);
-void parser_cur_name_get(parser_data *pd, Evas_Object *entry, void (*cb)(void 
*data, Eina_Stringshare *state_name, double state_value, Eina_Stringshare 
*part_name, Eina_Stringshare *group_name), void *data);
 void parser_cur_group_name_get(parser_data *pd, Evas_Object *entry, void 
(*cb)(void *data, Eina_Stringshare *state_name, double state_value, 
Eina_Stringshare *part_name, Eina_Stringshare *group_name), void *data);
 void parser_cur_state_get(parser_data *pd, Evas_Object *entry, void (*cb)(void 
*data, Eina_Stringshare *state_name, double state_value, Eina_Stringshare 
*part_name, Eina_Stringshare *group_name), void *data);
 Eina_Stringshare *parser_cur_name_fast_get(Evas_Object *entry, const char 
*scope);

-- 


Reply via email to