merge with master
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:19:13 +0000 (01:19 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:19:13 +0000 (01:19 +0900)
16 files changed:
AUTHORS
ChangeLog
NEWS
packaging/edje.spec
src/bin/edje_cc_handlers.c
src/bin/edje_cc_out.c
src/bin/edje_inspector.c
src/lib/Edje.h
src/lib/edje_calc.c
src/lib/edje_embryo.c
src/lib/edje_entry.c
src/lib/edje_multisense.c
src/lib/edje_private.h
src/lib/edje_program.c
src/lib/edje_util.c
src/modules/multisense_factory/multisense_factory.c

diff --git a/AUTHORS b/AUTHORS
index f315127..b94c011 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -30,3 +30,5 @@ Michael Bouchaud (yoz) <michael.bouchaud@gmail.com>
 WooHyun Jung (woohyun) <woohyun0705@gmail.com>
 Guilherme Silveira <xguiga@gmail.com>
 Flavio Ceolin <flavio.ceolin@profusion.mobi>
+Robert David <robert.david.public@gmail.com>
+Bluezery <ohpowel@gmail.com>
index 5872740..faa4948 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * edje_entry: Add more tags(preedit_sub1~4) for a variety of preediting states.
 
+2012-10-20  Cedric Bail
+
+       1.7.1 release
+
+2012-10-26  Michael Bouchaud (yoz)
+
+        * fix edje_object_scale_set with edje containing boxes and/or tables
+
 2012-10-31  ChunEon Park (Hermet)
 
         * Fix to update the text classes when text classes are changed.
 2012-10-31  Carsten Haitzler (The Rasterman)
 
         * Fix edje_cc to use max compression, not default compression for edje_cc.
+
+2012-11-02  ChunEon Park (Hermet)
+
+        * Fix to not update map uv for proxy
+
+2012-11-21  Carsten Haitzler (The Rasterman)
+
+        * Backport fix for null name strcmp with group inheritance
+        from 76449 in trunk.
+
+
+2012-12-05  Robert David
+
+       * Fix Solaris 11 build.
+
+2012-12-07  Luis Felipe Strano Moraes
+
+       * 1.7.3 release
+
+2012-12-05  Tae-Hwan Kim (Bluezery)
+
+        * Fix inheriting gorups with programs that have after programs where
+        after programs are duplicated in the list.
+
+2012-12-13  Doug Newgard
+
+       * Enforce compilation with Lua 5.1 only.
+
+2012-12-17 Vincent Torri
+
+       * Add XML output to doc
+       * Add installation rule for doc
+
+2012-12-18  WooHyun Jung
+
+       * Before cursor is moved by mouse_down, imf_context_reset should be called with current cursor position.
+
+2012-12-20  David Seikel (onefang)
+
+       * Lua: Backport from 76883 in trunk, and revert 80791 - Lua 5.2 support added.
+
+2012-12-20  Tom Hacohen (TAsn)
+
+       * Backport from 78587 in trunk.
+       Edje entry: Fix update of cursor with IMF and user_insert.
+       Was missing, now cursor updates like it should.
+
+2012-12-21  Luis Felipe Strano Moraes
+
+       * 1.7.4 release
+
+2013-01-04  Luis Felipe Strano Moraes
+
+       * 1.7.5 release
+
+2013-01-14  Daniel Willmann
+       * Backport r82767, r82770
+       * edje: Fix off-by-one errors when using alloca in various functions
diff --git a/NEWS b/NEWS
index 55b0311..da87bad 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,45 @@ Fixes:
     * fix scale_set with edje containing groups
     * fix edje_cc to use max, not default compression
 
+Edje 1.7.4
+
+Changes since Edje 1.7.3:
+-------------------------
+
+Fixes:
+    * Enforce compilation with Lua 5.1 only.
+    * Lua 5.2 support added, still works fine with 5.1.
+    * Before cursor is moved by mouse_down, imf_context_reset should be called with current cursor position.
+
+Edje 1.7.3
+
+Changes since Edje 1.7.2:
+-------------------------
+
+    * fix compilation on Solaris 11
+    * fix duplicate after programs in group inheritance.
+
+Changes since Edje 1.7.1:
+-------------------------
+
+Fixes:
+    * fix scale_set with edje containing boxes and/or tables
+    * fix edje_cc to use max, not default compression
+    * fix edje_text_class_set to update the text classes correctly.
+    * fix to not update map uv for proxy
+    * fix to not segv on inheriting group lookups
+    * fix build on Solaris 11
+    
+Edje 1.7.1
+
+Changes since Edje 1.7.0:
+-------------------------
+
+Fixes:
+    * fix scale_set with edje containing boxes and/or tables 
+    * fix scale_set with edje containing groups
+
+
 Edje 1.7.0
 
 Changes since Edje 1.2.0:
index e872b80..c79ccb9 100644 (file)
@@ -1,7 +1,7 @@
 #sbs-git:slp/pkgs/e/edje edje 1.1.0+svn.69011slp2+build03 96cd9783918ce594c786d12a5107be27aec4d34b
 Name:       edje
 Summary:    Complex Graphical Design/Layout Engine
-Version:    1.7.1+svn.77330+build01r03
+Version:    1.7.1+svn.77330+build25r01
 Release:    1
 Group:      System/Libraries
 License:    BSD
index b3d2bcb..a65e923 100644 (file)
@@ -1124,9 +1124,7 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
         pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
         ep->after = eina_list_append(ep->after, pa);
         copy = (char*) (pa + 1);
-
         memcpy(copy, name, strlen(name) + 1);
-
         data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id));
      }
 
@@ -8041,29 +8039,27 @@ st_collections_group_programs_program_after(void)
    ep = current_program;
      {
        Edje_Program_After *pa;
-   Edje_Program_After *pa2;
-   Eina_List *l;
+       Edje_Program_After *pa2;
+       Eina_List *l;
        char *name;
-   char *copy;
+        char *copy;
 
        name = parse_str(0);
 
-   EINA_LIST_FOREACH(ep->after, l, pa2)
-     {
-        if (!strcmp(name, (char*) (pa2 + 1)))
+        EINA_LIST_FOREACH(ep->after, l, pa2)
           {
-             free(name);
-             return;
+             if (!strcmp(name, (char*) (pa2 + 1)))
+               {
+                  free(name);
+                  return;
+               }
           }
-     }
 
-   pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
+       pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
        pa->id = -1;
        ep->after = eina_list_append(ep->after, pa);
-   copy = (char*)(pa + 1);
-
-   memcpy(copy, name, strlen(name) + 1);
-
+        copy = (char*)(pa + 1);
+        memcpy(copy, name, strlen(name) + 1);
        data_queue_program_lookup(pc, name, &(pa->id));
        free(name);
      }
index 1b5a137..d255e8b 100644 (file)
@@ -1678,7 +1678,9 @@ reorder_parts(void)
                             if (ep2->reorder.linked_prev)
                               ERR("Unable to insert two or more parts in same part \"%s\".",
                                   pc->parts[j]->name);
-                            k = j - 1;
+                            /* Need it to be able to insert an element before the first */
+                            if (j == 0) k = 0;
+                            else k = j - 1;
                            found = EINA_TRUE;
                             ep2->reorder.linked_prev += ep->reorder.linked_prev + 1;
                             ep->reorder.before = (Edje_Part_Parser *)pc->parts[j];
@@ -1727,10 +1729,10 @@ reorder_parts(void)
                          }
                        if (i > k)
                          {
-                            for (j = i - ep->reorder.linked_prev - 1 ; j >= k ; j--)
+                            for (j = i - ep->reorder.linked_prev ; j > k; j--)
                               {
-                                 pc->parts[j + amount] = pc->parts[j];
-                                 pc->parts[j + amount]->id = j + amount;
+                                 pc->parts[j + amount - 1] = pc->parts[j - 1];
+                                 pc->parts[j + amount - 1]->id = j + amount - 1;
                               }
                             for (j = 0 ; j < amount ; j++)
                               {
@@ -1882,31 +1884,31 @@ data_queue_copied_anonymous_lookup(Edje_Part_Collection *pc, int *src, int *dest
           {
              for (i = 0 ; i < pc->programs.fnmatch_count ; i++)
                {
-                  if (pc->programs.fnmatch[i]->name &&
+                  if (pl->u.ep->name && pc->programs.fnmatch[i]->name &&
                       !strcmp(pl->u.ep->name, pc->programs.fnmatch[i]->name))
                     data_queue_anonymous_lookup(pc, pc->programs.fnmatch[i], dest);
                }
              for (i = 0 ; i < pc->programs.strcmp_count ; i++)
                {
-                  if (pc->programs.strcmp[i]->name &&
+                  if (pl->u.ep->name && pc->programs.strcmp[i]->name &&
                       !strcmp(pl->u.ep->name, pc->programs.strcmp[i]->name))
                     data_queue_anonymous_lookup(pc, pc->programs.strcmp[i], dest);
                }
              for (i = 0 ; i < pc->programs.strncmp_count ; i++)
                {
-                  if (pc->programs.strncmp[i]->name &&
+                  if (pl->u.ep->name && pc->programs.strncmp[i]->name &&
                       !strcmp(pl->u.ep->name, pc->programs.strncmp[i]->name))
                     data_queue_anonymous_lookup(pc, pc->programs.strncmp[i], dest);
                }
              for (i = 0 ; i < pc->programs.strrncmp_count ; i++)
                {
-                  if (pc->programs.strrncmp[i]->name &&
+                  if (pl->u.ep->name && pc->programs.strrncmp[i]->name &&
                       !strcmp(pl->u.ep->name, pc->programs.strrncmp[i]->name))
                     data_queue_anonymous_lookup(pc, pc->programs.strrncmp[i], dest);
                }
              for (i = 0 ; i < pc->programs.nocmp_count ; i++)
                {
-                  if (pc->programs.nocmp[i]->name &&
+                  if (pl->u.ep->name && pc->programs.nocmp[i]->name &&
                       !strcmp(pl->u.ep->name, pc->programs.nocmp[i]->name))
                     data_queue_anonymous_lookup(pc, pc->programs.nocmp[i], dest);
                }
index 9106f95..01cf104 100644 (file)
@@ -2,6 +2,11 @@
 # include "config.h"
 #endif
 
+#include <locale.h>
+#include <fnmatch.h>
+#include <unistd.h>
+#include <errno.h>
+
 #include "Edje.h"
 #define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1
 #include "Edje_Edit.h"
@@ -9,9 +14,6 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Getopt.h>
-#include <locale.h>
-#include <fnmatch.h>
-#include <unistd.h>
 
 static int _log_dom;
 #define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
index 7a19f3c..733e30d 100644 (file)
@@ -3348,6 +3348,7 @@ EAPI void             edje_object_part_text_imf_context_reset           (const E
  */
 EAPI void              *edje_object_part_text_imf_context_get           (const Evas_Object *obj, const char *part);
 
+// TIZEN ONLY - START
 /**
  * @brief Retrieves the current position of the selection
  *
@@ -3362,6 +3363,7 @@ EAPI void              *edje_object_part_text_imf_context_get           (const E
  * @return EINA_TRUE if part has selection or EINA_FALSE otherwise
  */
 EAPI Eina_Bool        edje_object_part_text_selection_geometry_get     (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+// TIZEN ONLY - END
 
 /**
  * @brief Set the layout of the input panel.
@@ -3571,6 +3573,7 @@ EAPI void             edje_object_part_text_input_panel_return_key_disabled_set(
  */
 EAPI Eina_Bool        edje_object_part_text_input_panel_return_key_disabled_get(const Evas_Object *obj, const char *part);
 
+// TIZEN ONLY - START
 /**
  * @brief Set the viewport region of the text.
  *
@@ -3606,6 +3609,7 @@ EAPI void             edje_object_part_text_layout_region_set     (const Evas_Ob
  * @param part The part name
  */
 EAPI void             edje_object_part_text_copy_paste_disabled_set     (const Evas_Object *obj, const char *part, Eina_Bool disabled);
+// TIZEN ONLY - END
 
 /**
  * Add a filter function for newly inserted text.
@@ -4708,9 +4712,15 @@ EAPI void         edje_message_signal_process             (void);
     */
    EAPI const Edje_Perspective *edje_object_perspective_get     (const Evas_Object *obj);
 
-/**
- * @}
- */
+   ///////////////////// TIZEN ONLY(130129) //////////////////////////////////////////////////////////////
+   /* Applications NEVER USE THESE APIs for private purporse.
+      These APIs are for communicating with edje_entry for not moving cursor position meanwhile.  */
+   EAPI void                    edje_object_part_text_freeze    (Evas_Object *obj, const char *part);
+   EAPI void                    edje_object_part_text_thaw      (Evas_Object *obj, const char *part);
+   ///////////////////////////////////////////////////////////////////////////////////////////////////////
+   /**
+    * @}
+    */
 
 #ifdef __cplusplus
 }
index 7045c1e..53acb88 100644 (file)
@@ -1151,6 +1151,26 @@ _edje_part_recalc_single_step(Edje_Part_Description_Common *desc,
      }
 }
 
+static double
+_edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text *chosen_desc, double base_scale, double scale)
+{
+   double size, min, max;
+
+   if (chosen_desc->text.size == 0)
+      return scale;
+
+   min = base_scale * chosen_desc->text.size_range_min;
+   max = chosen_desc->text.size_range_max * base_scale;
+   size = chosen_desc->text.size * scale;
+
+   if ((size > max) && (max > 0))
+      scale = max / (double) chosen_desc->text.size;
+   else if (size < min)
+      scale = min / (double) chosen_desc->text.size;
+
+   return scale;
+}
+
 static void
 _edje_part_recalc_single_textblock(FLOAT_T sc,
                                    Edje *ed,
@@ -1210,6 +1230,79 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
         if (ep->part->scale)
           evas_object_scale_set(ep->object, TO_DOUBLE(sc));
 
+        if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))
+          {
+             double base_s = 1.0;
+             double orig_s;
+             double s = base_s;
+
+             if (ep->part->scale) s = TO_DOUBLE(sc);
+             if (ep->part->scale) base_s = TO_DOUBLE(sc);
+             evas_object_scale_set(ep->object, base_s);
+             evas_object_textblock_size_native_get(ep->object, &tw, &th);
+
+             orig_s = base_s;
+             /* Now make it bigger so calculations will be more accurate
+              * and less influenced by hinting... */
+               {
+                  orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, orig_s * params->w / (double) tw);
+                  evas_object_scale_set(ep->object, orig_s);
+                  evas_object_textblock_size_native_get(ep->object, &tw, &th);
+               }
+             if (chosen_desc->text.fit_x)
+               {
+                  if (tw > 0)
+                    {
+                       s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, orig_s * params->w / tw);
+                       evas_object_scale_set(ep->object, s);
+                       evas_object_textblock_size_native_get(ep->object, NULL, NULL);
+                    }
+               }
+             if (chosen_desc->text.fit_y)
+               {
+                  if (th > 0)
+                    {
+                       double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, orig_s * params->h / (double) th);
+                       /* If we already have X fit, restrict Y to be no bigger
+                        * than what we got with X. */
+                       if (!((chosen_desc->text.fit_x) && (tmp_s > s)))
+                         {
+                            s = tmp_s;
+                         }
+
+                       evas_object_scale_set(ep->object, s);
+                       evas_object_textblock_size_native_get(ep->object, NULL, NULL);
+                    }
+               }
+
+             /* Final tuning, try going down 90% at a time, hoping it'll
+              * actually end up being correct. */
+               {
+                  int i = 5; /* Tries before we give up. */
+                  Evas_Coord fw, fh;
+                  evas_object_textblock_size_native_get(ep->object, &fw, &fh);
+
+                  /* If we are still too big, try reducing the size to
+                   * 95% each try. */
+                  while ((i > 0) &&
+                        ((chosen_desc->text.fit_x && (fw > params->w)) ||
+                         (chosen_desc->text.fit_y && (fh > params->h))))
+                    {
+                       double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, s * 0.95);
+
+                       /* Break if we are not making any progress. */
+                       if (tmp_s == s)
+                          break;
+                       s = tmp_s;
+
+                       evas_object_scale_set(ep->object, s);
+                       evas_object_textblock_size_native_get(ep->object, &fw, &fh);
+                       i--;
+                    }
+               }
+
+          }
+
         if (stl)
           {
              const char *ptxt;
@@ -1246,16 +1339,17 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
                                                          &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 (minw && chosen_desc->text.min_x)
                     {
                        if (mw > *minw) *minw = mw;
                     }
-                  if (chosen_desc->text.min_y)
+                  if (minh && chosen_desc->text.min_y)
                     {
                        if (mh > *minh) *minh = mh;
                     }
                }
           }
+
         if ((chosen_desc->text.max_x) || (chosen_desc->text.max_y))
           {
              int mw = 0, mh = 0;
@@ -1272,45 +1366,18 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
                                                     &ins_t, &ins_b);
              mw = ins_l + tw + ins_r;
              mh = ins_t + th + ins_b;
-             if (chosen_desc->text.max_x)
+             if (maxw && chosen_desc->text.max_x)
                {
                   if (mw > *maxw) *maxw = mw;
-                  if (*maxw < *minw) *maxw = *minw;
+                  if (minw && (*maxw < *minw)) *maxw = *minw;
                }
-             if (chosen_desc->text.max_y)
+             if (maxh && chosen_desc->text.max_y)
                {
-                  if (mh > *maxw) *maxh = mh;
-                  if (*maxh < *minh) *maxh = *minh;
+                  if (mh > *maxh) *maxh = mh;
+                  if (minh && (*maxh < *minh)) *maxh = *minh;
                }
           }
-        if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))
-          {
-             double s = 1.0;
 
-             if (ep->part->scale) s = TO_DOUBLE(sc);
-             evas_object_scale_set(ep->object, s);
-             evas_object_textblock_size_formatted_get(ep->object, &tw, &th);
-             if (chosen_desc->text.fit_x)
-               {
-                  if ((tw > 0) && (tw > params->w))
-                    {
-                       s = (s * params->w) / (double)tw;
-                       evas_object_scale_set(ep->object, s);
-                       evas_object_textblock_size_formatted_get(ep->object,
-                                                                &tw, &th);
-                    }
-               }
-             if (chosen_desc->text.fit_y)
-               {
-                  if ((th > 0) && (th > params->h))
-                    {
-                       s = (s * params->h) / (double)th;
-                       evas_object_scale_set(ep->object, s);
-                       evas_object_textblock_size_formatted_get(ep->object,
-                                                                &tw, &th);
-                    }
-               }
-          }
         evas_object_textblock_valign_set(ep->object, TO_DOUBLE(chosen_desc->text.align.y));
      }
 }
index 9feb539..e508a02 100644 (file)
@@ -2790,7 +2790,7 @@ _edje_embryo_fn_external_param_get_str(Embryo_Program *ep, Embryo_Cell *params)
      {
        char *tmp = alloca(dst_len);
        memcpy(tmp, eep.s, dst_len - 1);
-       tmp[dst_len] = '\0';
+       tmp[dst_len-1] = '\0';
        SETSTR(tmp, params[3]);
      }
    return 1;
@@ -2891,7 +2891,7 @@ _edje_embryo_fn_external_param_get_choice(Embryo_Program *ep, Embryo_Cell *param
      {
        char *tmp = alloca(dst_len);
        memcpy(tmp, eep.s, dst_len - 1);
-       tmp[dst_len] = '\0';
+       tmp[dst_len-1] = '\0';
        SETSTR(tmp, params[3]);
      }
    return 1;
index d8a3d84..a061143 100644 (file)
@@ -8,6 +8,7 @@ static void      _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_
 static void      _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx, void *event);
 #endif
 
+// TIZEN ONLY - START
 static void _edje_entry_top_handler_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
 static void _edje_entry_top_handler_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
 static void _edje_entry_top_handler_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
@@ -15,33 +16,37 @@ static void _edje_entry_top_handler_mouse_up_cb(void *data, Evas *e __UNUSED__,
 static void _edje_entry_bottom_handler_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
 static void _edje_entry_bottom_handler_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
 static void _edje_entry_bottom_handler_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
+// TIZEN ONLY - END
 
 typedef struct _Entry Entry;
 typedef struct _Sel Sel;
 typedef struct _Anchor Anchor;
 
+// TIZEN ONLY - START
 typedef enum _Entry_Long_Press_State
 {
    _ENTRY_LONG_PRESSING,
    _ENTRY_LONG_PRESSED,
    _ENTRY_LONG_PRESS_RELEASED
 } Entry_Long_Press_State;
+// TIZEN ONLY - END
 
+static void _edje_entry_imf_cursor_location_set(Entry *en);
 static void _edje_entry_imf_cursor_info_set(Entry *en);
 
 struct _Entry
 {
    Edje_Real_Part *rp;
-   Evas_Coord ox, oy;
-   Evas_Coord sx, sy;
-   Evas_Coord rx, ry;
-   Evas_Coord dx, dy;
-   Evas_Coord_Rectangle layout_region;
-   Evas_Coord_Rectangle viewport_region;
+   Evas_Coord ox, oy; // TIZEN ONLY
+   Evas_Coord sx, sy; // TIZEN ONLY
+   Evas_Coord rx, ry; // TIZEN ONLY
+   Evas_Coord dx, dy; // TIZEN ONLY
+   Evas_Coord_Rectangle layout_region; // TIZEN ONLY
+   Evas_Coord_Rectangle viewport_region; // TIZEN ONLY
    Evas_Object *cursor_bg;
    Evas_Object *cursor_fg;
-   Evas_Object *block_handler_top;
-   Evas_Object *block_handler_btm;
+   Evas_Object *block_handler_top; // TIZEN ONLY
+   Evas_Object *block_handler_btm; // TIZEN ONLY
    Evas_Textblock_Cursor *cursor;
    Evas_Textblock_Cursor *sel_start, *sel_end;
    Evas_Textblock_Cursor *cursor_user, *cursor_user_extra;
@@ -60,11 +65,14 @@ struct _Entry
    Eina_Bool select_allow : 1;
    Eina_Bool select_mod_start : 1;
    Eina_Bool select_mod_end : 1;
-   Eina_Bool double_clicked : 1;
+   Eina_Bool double_clicked : 1; // TIZEN ONLY
    Eina_Bool had_sel : 1;
    Eina_Bool input_panel_enable : 1;
    Eina_Bool prediction_allow : 1;
    Eina_Bool copy_paste_disabled : 1;
+   // TIZEN ONLY(130129) : Currently, for freezing cursor movement.
+   Eina_Bool freeze : 1;
+   //
    int select_dragging_state;
 
 #ifdef HAVE_ECORE_IMF
@@ -73,8 +81,8 @@ struct _Entry
    Ecore_IMF_Context *imf_context;
 #endif
 
-   Ecore_Timer *longpress_timer;
-   Entry_Long_Press_State long_press_state;
+   Ecore_Timer *longpress_timer; // TIZEN ONLY
+   Entry_Long_Press_State long_press_state; // TIZEN ONLY
 };
 
 struct _Sel
@@ -138,6 +146,7 @@ _edje_entry_focus_in_cb(void *data, Evas_Object *o __UNUSED__, const char *emiss
 
    if (evas_object_focus_get(rp->edje->obj))
      {
+        // TIZEN ONLY - START
         if ((!en->block_handler_top) && (!en->block_handler_btm) &&
             (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
           {
@@ -177,6 +186,7 @@ _edje_entry_focus_in_cb(void *data, Evas_Object *o __UNUSED__, const char *emiss
           edje_object_signal_emit(en->block_handler_top, "edje,focus,in", "edje");
         if (en->block_handler_btm)
           edje_object_signal_emit(en->block_handler_btm, "edje,focus,in", "edje");
+        // TIZEN ONLY - END
 
         ecore_imf_context_reset(en->imf_context);
         ecore_imf_context_focus_in(en->imf_context);
@@ -198,10 +208,12 @@ _edje_entry_focus_out_cb(void *data, Evas_Object *o __UNUSED__, const char *emis
    en = rp->typedata.text->entry_data;
    if (!en || !en->imf_context) return;
 
+   // TIZEN ONLY - START
    if (en->block_handler_top)
      edje_object_signal_emit(en->block_handler_top, "edje,focus,out", "edje");
    if (en->block_handler_btm)
      edje_object_signal_emit(en->block_handler_btm, "edje,focus,out", "edje");
+   // TIZEN ONLY - END
 
    ecore_imf_context_reset(en->imf_context);
    ecore_imf_context_focus_out(en->imf_context);
@@ -229,6 +241,7 @@ _edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
        (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))   //  TIZEN ONLY
      return;
 
+   // TIZEN ONLY - START
    if ((!en->block_handler_top) && (!en->block_handler_btm) &&
       (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
      {
@@ -269,7 +282,8 @@ _edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
    if (en->block_handler_btm)
      edje_object_signal_emit(en->block_handler_btm, "edje,focus,in", "edje");
 
-   if (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE) return; // TIZEN ONLY
+   if (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE) return;
+   // TIZEN ONLY - END
 
 #ifdef HAVE_ECORE_IMF
    if (!en->imf_context) return;
@@ -300,12 +314,15 @@ _edje_focus_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
        (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))  // TIZEN ONLY
      return;
 
+   // TIZEN ONLY - START
    if (en->block_handler_top)
      edje_object_signal_emit(en->block_handler_top, "edje,focus,out", "edje");
    if (en->block_handler_btm)
      edje_object_signal_emit(en->block_handler_btm, "edje,focus,out", "edje");
 
-   if (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE) return; //TIZEN ONLY
+   if (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE) return;
+   // TIZEN ONLY - END
+
    if (!en->imf_context) return;
 
    ecore_imf_context_reset(en->imf_context);
@@ -482,20 +499,6 @@ _curs_update_from_curs(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entr
    *cy += (ch / 2);
 }
 
-static Eina_Bool
-_curs_back(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__,
-           Entry *en __UNUSED__)
-{
-   return evas_textblock_cursor_char_prev(c);
-}
-
-static Eina_Bool
-_curs_next(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__,
-           Entry *en __UNUSED__)
-{
-   return evas_textblock_cursor_char_next(c);
-}
-
 static int
 _curs_line_last_get(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en __UNUSED__)
 {
@@ -629,14 +632,19 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
    _sel_enable(c, o, en);
    if (!evas_textblock_cursor_compare(c, en->sel_end)) return;
 
+   // TIZEN ONLY - START
    if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         /* Do NOT allow sel_end to pass sel_start while extending */
         if (evas_textblock_cursor_compare(c, en->sel_start) <= 0)
           evas_textblock_cursor_pos_set(c, evas_textblock_cursor_pos_get(en->sel_start) + 1);
      }
+   // TIZEN ONLY - END
 
    evas_textblock_cursor_copy(c, en->sel_end);
+
+   _edje_entry_imf_cursor_info_set(en);
+
    if (en->selection)
      {
         free(en->selection);
@@ -653,14 +661,19 @@ _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
    _sel_enable(c, o, en);
    if (!evas_textblock_cursor_compare(c, en->sel_start)) return;
 
+   // TIZEN ONLY - START
    if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         /* Do NOT allow sel_start to pass sel_end while pre-extending */
         if (evas_textblock_cursor_compare(c, en->sel_end) >= 0)
           evas_textblock_cursor_pos_set(c, evas_textblock_cursor_pos_get(en->sel_end) - 1);
      }
+   // TIZEN ONLY - END
 
    evas_textblock_cursor_copy(c, en->sel_start);
+
+   _edje_entry_imf_cursor_info_set(en);
+
    if (en->selection)
      {
         free(en->selection);
@@ -693,11 +706,13 @@ _sel_clear(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o __UNUSED__, Entry
         if (sel->obj_bg) evas_object_del(sel->obj_bg);
         if (sel->obj_fg) evas_object_del(sel->obj_fg);
 
+        // TIZEN ONLY - START
         if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
           {
              evas_object_hide(en->block_handler_top);
              evas_object_hide(en->block_handler_btm);
           }
+        // TIZEN ONLY - END
         free(sel);
         en->sel = eina_list_remove_list(en->sel, en->sel);
      }
@@ -773,17 +788,19 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
    evas_object_geometry_get(o, &x, &y, &w, &h);
    if (en->have_selection)
      {
+        // TIZEN ONLY - START
         int list_cnt, list_idx;
 
         list_cnt = eina_list_count(en->sel);
         list_idx = 0;
         evas_object_hide(en->cursor_fg);
         evas_object_hide(en->cursor_bg);
+        // TIZEN ONLY - END
 
         EINA_LIST_FOREACH(en->sel, l, sel)
           {
              Evas_Textblock_Rectangle *r;
-             list_idx++;
+             list_idx++; // TIZEN ONLY
 
              r = range->data;
              if (sel->obj_bg)
@@ -796,6 +813,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                   evas_object_move(sel->obj_fg, x + r->x, y + r->y);
                   evas_object_resize(sel->obj_fg, r->w, r->h);
                }
+             // TIZEN ONLY - START
              if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
                {
                   if (list_idx == 1)
@@ -877,6 +895,7 @@ _sel_update(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en)
                          }
                     }
                }
+             // TIZEN ONLY - END
              *(&(sel->rect)) = *r;
              range = eina_list_remove_list(range, range);
              free(r);
@@ -1471,12 +1490,32 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
    if (en->imf_context)
      {
         Ecore_IMF_Event_Key_Down ecore_ev;
+        Eina_Bool filter_ret;
         ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
         if (!en->composing)
           {
-             if (ecore_imf_context_filter_event(en->imf_context,
-                                                ECORE_IMF_EVENT_KEY_DOWN,
-                                                (Ecore_IMF_Event *)&ecore_ev))
+             filter_ret = ecore_imf_context_filter_event(en->imf_context,
+                                                         ECORE_IMF_EVENT_KEY_DOWN,
+                                                         (Ecore_IMF_Event *)&ecore_ev);
+
+             if (en->have_preedit)
+               {
+                  if (!strcmp(ev->keyname, "Down") ||
+                      (!strcmp(ev->keyname, "KP_Down") && !ev->string) ||
+                      !strcmp(ev->keyname, "Up") ||
+                      (!strcmp(ev->keyname, "KP_Up") && !ev->string) ||
+                      !strcmp(ev->keyname, "Next") ||
+                      (!strcmp(ev->keyname, "KP_Next") && !ev->string) ||
+                      !strcmp(ev->keyname, "Prior") ||
+                      (!strcmp(ev->keyname, "KP_Prior") && !ev->string) ||
+                      !strcmp(ev->keyname, "Home") ||
+                      (!strcmp(ev->keyname, "KP_Home") && !ev->string) ||
+                      !strcmp(ev->keyname, "End") ||
+                      (!strcmp(ev->keyname, "KP_End") && !ev->string))
+                    ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+               }
+
+             if (filter_ret)
                return;
           }
      }
@@ -1996,6 +2035,7 @@ _edje_key_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, voi
 #endif
 }
 
+// TIZEN ONLY - START
 static Eina_Bool
 _edje_entry_select_word(Edje_Real_Part *rp)
 {
@@ -2079,6 +2119,7 @@ _long_press(void *data)
    _edje_emit(en->rp->edje, "long,pressed", en->rp->part->name);
    return ECORE_CALLBACK_CANCEL;
 }
+// TIZEN ONLY - END
 
 static void
 _edje_part_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
@@ -2090,7 +2131,7 @@ _edje_part_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
        (!rp->typedata.text)) return;
    en = rp->typedata.text->entry_data;
    if (!en) return;
-   _edje_entry_imf_cursor_info_set(en);
+   _edje_entry_imf_cursor_location_set(en);
 }
 
 static void
@@ -2117,8 +2158,10 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
      return;
    if ((ev->button != 1) && (ev->button != 2)) return;
 
+   // TIZEN ONLY - START
    en->dx = ev->canvas.x;
    en->dy = ev->canvas.y;
+   // TIZEN ONLY - END
 
 #ifdef HAVE_ECORE_IMF
    if (en->imf_context)
@@ -2328,16 +2371,15 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
      {
         _edje_emit(rp->edje, "cursor,changed", rp->part->name);
         _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
-
-        _edje_entry_imf_cursor_info_set(en);
      }
    evas_textblock_cursor_free(tc);
 
+   // TIZEN ONLY - START
    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);
-     }
+     } // TIZEN ONLY - END
    else
       _edje_entry_real_part_configure(rp);
    if (ev->button == 2)
@@ -2368,6 +2410,7 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
        (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
      return;
 
+   // TIZEN ONLY - START
    if (en->longpress_timer)
      {
         ecore_timer_del(en->longpress_timer);
@@ -2375,16 +2418,23 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
      }
 
    if (en->double_clicked) return;
-   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
+     {
+        _edje_entry_imf_cursor_info_set(en);
+        return;
+     }
+
    if (ev->flags & EVAS_BUTTON_TRIPLE_CLICK) return;
    if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) return;
 
    if (en->long_press_state == _ENTRY_LONG_PRESSED)
      {
         en->long_press_state = _ENTRY_LONG_PRESS_RELEASED;
+        _edje_entry_imf_cursor_info_set(en);
         return;
      }
    en->long_press_state = _ENTRY_LONG_PRESS_RELEASED;
+   // TIZEN ONLY - END
 
 #ifdef HAVE_ECORE_IMF
    if (en->imf_context)
@@ -2472,9 +2522,10 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
      {
         _edje_emit(rp->edje, "cursor,changed", rp->part->name);
         _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
-
-        _edje_entry_imf_cursor_info_set(en);
      }
+
+   _edje_entry_imf_cursor_info_set(en);
+
    evas_textblock_cursor_free(tc);
 
    _edje_entry_real_part_configure(rp);
@@ -2509,6 +2560,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
      }
 #endif
 
+   // TIZEN ONLY - START
    if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
      {
         _edje_entry_real_part_configure(rp);
@@ -2573,15 +2625,12 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
              if (evas_textblock_cursor_compare(tc, en->cursor))
                {
                   _edje_emit(rp->edje, "cursor,changed", rp->part->name);
-
-                  _edje_entry_imf_context_reset(rp);
-                  _edje_entry_imf_cursor_info_set(en);
                }
              evas_textblock_cursor_free(tc);
 
              _edje_emit(en->rp->edje, "magnifier,changed", en->rp->part->name);
           }
-     }
+     } // TIZEN ONLY - END
    else
      {
         if (en->selecting)
@@ -2648,9 +2697,6 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
                {
                   _edje_emit(rp->edje, "cursor,changed", rp->part->name);
                   _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
-
-                  _edje_entry_imf_context_reset(rp);
-                  _edje_entry_imf_cursor_info_set(en);
                }
              evas_textblock_cursor_free(tc);
 
@@ -2659,6 +2705,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
      }
 }
 
+// TIZEN ONLY - START
 static void
 _edje_entry_top_handler_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
 {
@@ -2880,6 +2927,7 @@ _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);
 }
+// TIZEN ONLY - END
 
 static void
 _evas_focus_in_cb(void *data, Evas *e, __UNUSED__ void *event_info)
@@ -3060,7 +3108,9 @@ done:
 #endif
    en->cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(rp->object);
 
+   // TIZEN ONLY - START
    edje_object_signal_callback_add(rp->edje->obj, "mouse,down,1,double", rp->part->name, _edje_entry_mouse_double_clicked, rp);
+   // TIZEN ONLY - END
 }
 
 void
@@ -3078,13 +3128,16 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
 #ifdef HAVE_ECORE_IMF
    _preedit_clear(en);
 #endif
+   // TIZEN ONLY - START
    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);
+   // TIZEN ONLY - END
    evas_object_del(en->cursor_bg);
    evas_object_del(en->cursor_fg);
 
+   // TIZEN ONLY - START
    if (en->block_handler_top)
      {
         evas_object_del(en->block_handler_top);
@@ -3101,6 +3154,7 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
         ecore_timer_del(en->longpress_timer);
         en->longpress_timer = NULL;
      }
+   // TIZEN ONLY - END
 
    if (en->pw_timer)
      {
@@ -3219,9 +3273,15 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text)
 
    _anchors_get(en->cursor, rp->object, en);
    _edje_emit(rp->edje, "entry,changed", rp->part->name);
-   _edje_entry_imf_cursor_info_set(en);
 
-   _edje_entry_real_part_configure(rp);
+   // TIZEN ONLY(130129) : Currently, for freezing cursor movement.
+   if (!en->freeze)
+     {
+        _edje_entry_imf_cursor_info_set(en);
+        _edje_entry_real_part_configure(rp);
+     }
+   //
+
 #if 0
    /* Don't emit cursor changed cause it didn't. It's just init to 0. */
    _edje_emit(rp->edje, "cursor,changed", rp->part->name);
@@ -3287,7 +3347,9 @@ _edje_entry_set_cursor_start(Edje_Real_Part *rp)
    if (!en) return;
    _curs_start(en->cursor, rp->object, en);
 
-   _edje_entry_imf_cursor_info_set(en);
+   // TIZEN ONLY(130129) : Currently, for freezing cursor movement.
+   if (!en->freeze)
+      _edje_entry_imf_cursor_info_set(en);
 }
 
 void
@@ -3335,13 +3397,14 @@ _edje_entry_select_all(Edje_Real_Part *rp)
    _curs_end(en->cursor, rp->object, en);
    _sel_extend(en->cursor, rp->object, en);
 
-   _edje_entry_imf_cursor_info_set(en);
    _edje_entry_real_part_configure(rp);
 
+   // TIZEN ONLY - START
    en->select_allow = EINA_TRUE;
    en->had_sel = EINA_TRUE;
 
    _edje_emit(en->rp->edje, "selection,end", en->rp->part->name);
+   // TIZEN ONLY - END
 }
 
 void
@@ -3361,8 +3424,6 @@ _edje_entry_select_begin(Edje_Real_Part *rp)
    _sel_start(en->cursor, rp->object, en);
    _sel_extend(en->cursor, rp->object, en);
 
-   _edje_entry_imf_cursor_info_set(en);
-
    _edje_entry_real_part_configure(rp);
 }
 
@@ -3378,8 +3439,6 @@ _edje_entry_select_extend(Edje_Real_Part *rp)
    _edje_entry_imf_context_reset(rp);
    _sel_extend(en->cursor, rp->object, en);
 
-   _edje_entry_imf_cursor_info_set(en);
-
    _edje_entry_real_part_configure(rp);
 }
 
@@ -3476,6 +3535,7 @@ _edje_entry_items_list(Edje_Real_Part *rp)
    return en->itemlist;
 }
 
+// TIZEN ONLY - START
 void
 _edje_entry_copy_paste_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled)
 {
@@ -3510,6 +3570,7 @@ _edje_entry_viewport_region_set(Edje_Real_Part *rp, Evas_Coord x, Evas_Coord y,
    en->viewport_region.h = h;
    _sel_update(en->cursor, rp->object, en);
 }
+// TIZEN ONLY - END
 
 void
 _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
@@ -3600,11 +3661,13 @@ _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow)
      return;
    en->select_allow = allow;
 
+   // TIZEN ONLY - START
    if ((allow) && (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
      {
         if (!_edje_entry_select_word(rp)) return;
         _edje_emit(en->rp->edje, "selection,end", en->rp->part->name);
      }
+   // TIZEN ONLY - END
 }
 
 Eina_Bool
@@ -4262,9 +4325,14 @@ _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos)
    evas_textblock_cursor_pos_set(c, pos);
    _sel_update(c, rp->object, rp->typedata.text->entry_data);
 
-   _edje_entry_imf_cursor_info_set(en);
    _edje_emit(rp->edje, "cursor,changed", rp->part->name);
-   _edje_entry_real_part_configure(rp);
+   // TIZEN ONLY(130129) : Currently, for freezing cursor movement.
+   if (!en->freeze)
+     {
+        _edje_entry_imf_cursor_info_set(en);
+        _edje_entry_real_part_configure(rp);
+     }
+   //
 }
 
 int
@@ -4275,6 +4343,7 @@ _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur)
    return evas_textblock_cursor_pos_get(c);
 }
 
+// TIZEN ONLY - START
 Eina_Bool
 _edje_entry_selection_geometry_get(Edje_Real_Part *rp, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
@@ -4325,6 +4394,7 @@ _edje_entry_selection_geometry_get(Edje_Real_Part *rp, Evas_Coord *x, Evas_Coord
 
    return EINA_TRUE;
 }
+// TIZEN ONLY - END
 
 void
 _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout)
@@ -4378,22 +4448,45 @@ _edje_entry_imf_context_reset(Edje_Real_Part *rp)
 }
 
 static void
-_edje_entry_imf_cursor_info_set(Entry *en)
+_edje_entry_imf_cursor_location_set(Entry *en)
 {
 #ifdef HAVE_ECORE_IMF
    Evas_Coord cx, cy, cw, ch;
    if (!en || !en->rp || !en->imf_context) return;
 
    _edje_entry_cursor_geometry_get(en->rp, &cx, &cy, &cw, &ch);
-
-   ecore_imf_context_cursor_position_set(en->imf_context,
-                                         evas_textblock_cursor_pos_get(en->cursor));
    ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw, ch);
 #else
    (void) en;
 #endif
 }
 
+static void
+_edje_entry_imf_cursor_info_set(Entry *en)
+{
+   int cursor_pos;
+
+#ifdef HAVE_ECORE_IMF
+   if (!en || !en->rp || !en->imf_context) return;
+
+   if (en->have_selection)
+     {
+        if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) < 0)
+          cursor_pos = evas_textblock_cursor_pos_get(en->sel_start);
+        else
+          cursor_pos = evas_textblock_cursor_pos_get(en->sel_end);
+     }
+   else
+     cursor_pos = evas_textblock_cursor_pos_get(en->cursor);
+
+   ecore_imf_context_cursor_position_set(en->imf_context, cursor_pos);
+
+   _edje_entry_imf_cursor_location_set(en);
+#else
+   (void) en;
+#endif
+}
+
 #ifdef HAVE_ECORE_IMF
 static Eina_Bool
 _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, char **text, int *cursor_pos)
@@ -4521,13 +4614,18 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx __UN
    int cursor_pos;
    int preedit_start_pos, preedit_end_pos;
    char *preedit_string;
+   char *preedit_tag_index;
+   char *pretag = NULL;
+   char *markup_txt = NULL;
+   char *tagname[] = {NULL, "preedit", "preedit_sel", "preedit_sel",
+                      "preedit_sub1", "preedit_sub2", "preedit_sub3", "preedit_sub4"};
    int i;
+   size_t preedit_type_size = sizeof(tagname) / sizeof(tagname[0]);
    Eina_Bool preedit_end_state = EINA_FALSE;
    Eina_List *attrs = NULL, *l = NULL;
    Ecore_IMF_Preedit_Attr *attr;
    Eina_Strbuf *buf;
-   char *preedit_tag_index;
-   char *pretag = NULL;
+   Eina_Strbuf *preedit_attr_str;
 
    if ((!rp)) return;
 
@@ -4596,50 +4694,25 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx __UN
           {
              EINA_LIST_FOREACH(attrs, l, attr)
                {
-                  if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1)
+                  if (attr->preedit_type <= preedit_type_size &&
+                      tagname[attr->preedit_type])
                     {
-                       eina_strbuf_append(buf, "<preedit>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit>");
-                    }
+                       preedit_attr_str = eina_strbuf_new();
+                       if (preedit_attr_str)
+                         {
+                            eina_strbuf_append_n(preedit_attr_str, preedit_string + attr->start_index, attr->end_index - attr->start_index);
+                            markup_txt = evas_textblock_text_utf8_to_markup(NULL, eina_strbuf_string_get(preedit_attr_str));
 
-                  else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB2 ||
-                           attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3)
-                    {
-                       eina_strbuf_append(buf, "<preedit_sel>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit_sel>");
-                    }
-                  else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB4)
-                    {
-                       eina_strbuf_append(buf, "<preedit_sub1>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit_sub1>");
-                    }
-                  else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB5)
-                    {
-                       eina_strbuf_append(buf, "<preedit_sub2>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit_sub2>");
-                    }
-                  else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB6)
-                    {
-                       eina_strbuf_append(buf, "<preedit_sub3>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit_sub3>");
-                    }
-                  else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB7)
-                    {
-                       eina_strbuf_append(buf, "<preedit_sub4>");
-                       eina_strbuf_append_n(buf, preedit_string + attr->start_index,
-                                            attr->end_index - attr->start_index);
-                       eina_strbuf_append(buf, "</preedit_sub4>");
+                            if (markup_txt)
+                              {
+                                 eina_strbuf_append_printf(buf, "<%s>%s</%s>", tagname[attr->preedit_type], markup_txt, tagname[attr->preedit_type]);
+                                 free(markup_txt);
+                              }
+                            eina_strbuf_free(preedit_attr_str);
+                         }
                     }
+                  else
+                    eina_strbuf_append(buf, preedit_string);
                }
           }
         else
@@ -4746,4 +4819,36 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx _
 }
 #endif
 
+
+//////////////////////////////////////  TIZEN ONLY(130129)  : START //////////////////////////////////
+void _edje_entry_freeze(Edje_Real_Part *rp)
+{
+   Entry *en = NULL;
+
+   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
+       (!rp->typedata.text)) return;
+
+   en = rp->typedata.text->entry_data;
+   if (!en) return;
+
+   en->freeze = EINA_TRUE;
+}
+
+void _edje_entry_thaw(Edje_Real_Part *rp)
+{
+   Entry *en = NULL;
+
+   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
+       (!rp->typedata.text)) return;
+
+   en = rp->typedata.text->entry_data;
+   if (!en) return;
+
+   en->freeze = EINA_FALSE;
+
+   _edje_entry_imf_cursor_info_set(en);
+   _edje_entry_real_part_configure(rp);
+}
+///////////////////////////////////////////  TIZEN ONLY : END   ////////////////////////////////////////
+
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 6fb4cb9..9f98768 100644 (file)
@@ -226,7 +226,7 @@ sound_command_handler(Multisense_Data *msdata)
         base = edje_remix_sample_create(msdata, command.snd_file,
                                         &command.type.sample);
         length = remix_length(msdata->msenv->remixenv, base);
-        remix_flush(msdata->msenv->remixenv, msdata->player);
+        if (remix_flush(msdata->msenv->remixenv, msdata->player) < 0) return;
         break;
       case EDJE_PLAY_TONE:
         base = edje_remix_tone_create(msdata, command.snd_file, &command.type.tone);
index 080488d..5750895 100644 (file)
@@ -428,7 +428,7 @@ typedef struct _Edje_Markup_Filter_Callback Edje_Markup_Filter_Callback;
 
 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
-#define EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE 2
+#define EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE 2 // TIZEN ONLY
 
 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0
 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
@@ -2052,7 +2052,6 @@ void _edje_entry_user_insert(Edje_Real_Part *rp, const char *text);
 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
 void _edje_entry_select_abort(Edje_Real_Part *rp);
-void _edje_entry_viewport_object_set(Edje_Real_Part *rp, Evas_Object *obj);
 void *_edje_entry_imf_context_get(Edje_Real_Part *rp);
 Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
 Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
@@ -2087,7 +2086,15 @@ void _edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_
 Edje_Input_Panel_Return_Key_Type _edje_entry_input_panel_return_key_type_get(Edje_Real_Part *rp);
 void _edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled);
 Eina_Bool _edje_entry_input_panel_return_key_disabled_get(Edje_Real_Part *rp);
+
+///////////////////////////// TIZEN ONLY : START /////////////////////////////////////////////////////////////////////////////
 Eina_Bool _edje_entry_selection_geometry_get(Edje_Real_Part *rp, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+void _edje_entry_viewport_object_set(Edje_Real_Part *rp, Evas_Object *obj);
+
+/* Currently, this is only for freezing and thawing the cursor's movement while style change.(130129) */
+void _edje_entry_freeze(Edje_Real_Part *rp);
+void _edje_entry_thaw(Edje_Real_Part *rp);
+///////////////////////////// TIZEN ONLY : END   /////////////////////////////////////////////////////////////////////////////
 
 void _edje_external_init();
 void _edje_external_shutdown();
index 6128422..3249242 100644 (file)
@@ -948,7 +948,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
                {
                   char *tmp;
 
-                  tmp = alloca(end - idx - 1);
+                  tmp = alloca(end - idx);
                   memcpy(tmp, idx + 1, end - idx - 1);
                   tmp[end - idx - 1] = '\0';
                   *idx = '\0';
index 497438b..ee0c2e6 100644 (file)
@@ -352,6 +352,7 @@ edje_object_scale_set(Evas_Object *obj, double scale)
    Edje *ed, *ged;
    Evas_Object *o;
    Eina_List *l;
+   int i;
 
    ed = _edje_fetch(obj);
    if (!ed) return EINA_FALSE;
@@ -361,6 +362,19 @@ edje_object_scale_set(Evas_Object *obj, double scale)
       ged->scale = ed->scale;
    EINA_LIST_FOREACH(ed->subobjs, l, o)
       edje_object_calc_force(o);
+   for(i = 0; i < ed->table_parts_size; ++i)
+     {
+        Edje_Real_Part *ep;
+        ep = ed->table_parts[i];
+        if ((ep->part->type == EDJE_PART_TYPE_BOX)
+            || (ep->part->type == EDJE_PART_TYPE_TABLE))
+          {
+             Eina_List *l;
+             Evas_Object *o;
+             EINA_LIST_FOREACH(ep->typedata.container->items, l, o)
+                edje_object_scale_set(o, scale);
+          }
+     }
    edje_object_calc_force(obj);
    return EINA_TRUE;
 }
@@ -5190,6 +5204,8 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
                        Evas_Object *obj_swallow,
                        Eina_Bool hints_update)
 {
+   const char *obj_type;
+
    if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
        (!rp->typedata.swallow)) return;
    if (rp->typedata.swallow->swallowed_object)
@@ -5229,7 +5245,8 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
                                  rp);
 
    //If the map is enabled, uv should be updated when image size is changed.
-   if (!strcmp(evas_object_type_get(rp->typedata.swallow->swallowed_object), "image"))
+   obj_type = evas_object_type_get(rp->typedata.swallow->swallowed_object);
+   if (obj_type && !strcmp(obj_type, "image"))
      evas_object_event_callback_add(obj_swallow, EVAS_CALLBACK_IMAGE_RESIZE,
                                     _edje_object_part_swallow_image_resize_cb,
                                     rp);
@@ -5446,4 +5463,36 @@ _edje_subobj_unregister(Edje *ed, Evas_Object *obj)
                                        _cb_subobj_del, ed);
 }
 
+/////////////////////////////////// TIZEN ONLY(130129) ////////////////////////////////////////////////
+EAPI void edje_object_part_text_freeze(Evas_Object *obj, const char *part)
+{
+   Edje *ed;
+   Edje_Real_Part *rp;
+
+   ed = _edje_fetch(obj);
+   if ((!ed) || (!part)) return;
+   rp = _edje_real_part_recursive_get(ed, part);
+   if (!rp) return;
+   if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
+   if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return;
+
+   _edje_entry_freeze(rp);
+}
+
+EAPI void edje_object_part_text_thaw(Evas_Object *obj, const char *part)
+{
+   Edje *ed;
+   Edje_Real_Part *rp;
+
+   ed = _edje_fetch(obj);
+   if ((!ed) || (!part)) return;
+   rp = _edje_real_part_recursive_get(ed, part);
+   if (!rp) return;
+   if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
+   if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return;
+
+   _edje_entry_thaw(rp);
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////
+
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 886ac73..35b9fa4 100644 (file)
@@ -60,7 +60,6 @@ multisense_factory_init(Edje_Multisense_Env *env __UNUSED__)
      }
 #ifdef HAVE_LIBREMIX
    remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE);
-   remix_set_channels(env->remixenv, REMIX_STEREO);
 #endif
    return EINA_TRUE;
 }