Remove selection handlers (and move to elm)
authorThiep Ha <thiepha@gmail.com>
Fri, 8 Nov 2013 08:30:44 +0000 (17:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 8 Nov 2013 08:30:45 +0000 (17:30 +0900)
Summary:
Selection handlers are now implemented in elementary. So, we should remove them from edje.
The BLOCK_HANDLE mode should be removed also.

Reviewers: cedric, tasn

CC: cedric, raster
Differential Revision: https://phab.enlightenment.org/D312

data/edje/edc.vim
data/edje/vim/syntax/edc.vim
src/bin/edje/edje_cc_handlers.c
src/bin/edje/edje_convert.c
src/bin/edje/edje_convert.h
src/bin/edje/edje_data_convert.c
src/lib/edje/edje_convert.c
src/lib/edje/edje_convert.h
src/lib/edje/edje_data.c
src/lib/edje/edje_entry.c
src/lib/edje/edje_private.h

index e130e10150cd05b1788e9d9e4894970e47c601ba..f8f31d06f02d04769465e740788352218c5eee60 100644 (file)
@@ -68,7 +68,7 @@ syn keyword   cConstant       SCRIPT LUA_SCRIPT
 syn keyword    cConstant       DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
 syn keyword    cConstant       LINEAR SINUSOIDAL ACCELERATE DECELERATE SPRING
 syn keyword    cConstant       VERTICAL HORIZONTAL ON_HOLD BOTH EDITABLE
-syn keyword    cConstatn       DEFAULT EXPLICIT BLOCK_HANDLE
+syn keyword    cConstatn       DEFAULT EXPLICIT
 syn keyword    cConstant       CURRENT
 syn keyword    cConstant       FOCUS_SET "default" NEITHER
 syn keyword    cConstant       DYNAMIC STATIC PASSWORD
index 27ced4f0783bb5b98bf9ff0850e36e76dd453d22..6d87d7097fccaa296f347658b493aa8cc1a492e4 100644 (file)
@@ -63,7 +63,7 @@ syn keyword   edcConstant     ACCEL_FAC DECEL_FAC SIN_FAC DIVISOR_INTERP
 syn keyword    edcConstant     ACCELERATE_FACTOR DECELERATE_FACTOR
 syn keyword    edcConstant     VERTICAL HORIZONTAL BOTH BOX TABLE
 syn keyword    edcConstant     EDITABLE PASSWORD "default"
-syn keyword edcConstant DEFAULT EXPLICIT BLOCK_HANDLE 
+syn keyword edcConstant DEFAULT EXPLICIT
 syn keyword edcConstant SOLID
 
 syn keyword    edcTodo         contained TODO FIXME XXX
index a87b8600abc7561d5dc8a22fabe2da6b5af9f131..16622b5054a895fde275c36804eb23e444ac3a77 100644 (file)
@@ -226,8 +226,6 @@ static void st_collections_group_parts_part_source3(void);
 static void st_collections_group_parts_part_source4(void);
 static void st_collections_group_parts_part_source5(void);
 static void st_collections_group_parts_part_source6(void);
-static void st_collections_group_parts_part_source7(void);
-static void st_collections_group_parts_part_source8(void);
 static void st_collections_group_parts_part_entry_mode(void);
 static void st_collections_group_parts_part_select_mode(void);
 static void st_collections_group_parts_part_cursor_mode(void);
@@ -524,8 +522,6 @@ New_Statement_Handler statement_handlers[] =
      {"collections.group.parts.part.source4", st_collections_group_parts_part_source4},
      {"collections.group.parts.part.source5", st_collections_group_parts_part_source5},
      {"collections.group.parts.part.source6", st_collections_group_parts_part_source6},
-     {"collections.group.parts.part.source7", st_collections_group_parts_part_source7},
-     {"collections.group.parts.part.source8", st_collections_group_parts_part_source8},
      {"collections.group.parts.part.dragable.x", st_collections_group_parts_part_dragable_x},
      {"collections.group.parts.part.dragable.y", st_collections_group_parts_part_dragable_y},
      {"collections.group.parts.part.dragable.confine", st_collections_group_parts_part_dragable_confine},
@@ -2803,8 +2799,6 @@ st_collections_group_inherit(void)
         ep->source4 = STRDUP(ep2->source4);
         ep->source5 = STRDUP(ep2->source5);
         ep->source6 = STRDUP(ep2->source6);
-        ep->source7 = STRDUP(ep2->source7);
-        ep->source8 = STRDUP(ep2->source8);
 
         data_queue_copied_part_lookup(pc, &(ep2->clip_to_id), &(ep->clip_to_id));
 
@@ -4096,48 +4090,6 @@ st_collections_group_parts_part_source6(void)
    data_queue_group_lookup(current_part->source6, current_part);
 }
 
-/**
-    @page edcref
-    @property
-        source7
-    @parameters
-        [another group's name]
-    @effect
-        Only available to TEXTBLOCK parts. It is used for the group to be
-        loaded and used for the start selection handler display.
-    @endproperty
-*/
-static void
-st_collections_group_parts_part_source7(void)
-{
-   check_arg_count(1);
-
-   //FIXME: validate this somehow (need to decide on the format also)
-   current_part->source7 = parse_str(0);
-   data_queue_group_lookup(current_part->source7, current_part);
-}
-
-/**
-    @page edcref
-    @property
-        source8
-    @parameters
-        [another group's name]
-    @effect
-        Only available to TEXTBLOCK parts. It is used for the group to be
-        loaded and used for the end selection handler display.
-    @endproperty
-*/
-static void
-st_collections_group_parts_part_source8(void)
-{
-   check_arg_count(1);
-
-   //FIXME: validate this somehow (need to decide on the format also)
-   current_part->source8 = parse_str(0);
-   data_queue_group_lookup(current_part->source8, current_part);
-}
-
 /**
     @page edcref
 
@@ -4251,8 +4203,6 @@ st_collections_group_parts_part_entry_mode(void)
         @li EXPLICIT mode requires the application
         controlling the edje object has to explicitly begin and end selection
         modes, and the selection itself is dragable at both ends.
-        @li BLOCK_HANDLE is based on EXPLICIT mode and adds selection handlers
-        on both sides.
     @endproperty
 */
 static void
@@ -4263,7 +4213,6 @@ st_collections_group_parts_part_select_mode(void)
    current_part->select_mode = parse_enum(0,
                                 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT,
                                 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT,
-                                "BLOCK_HANDLE", EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE,
                                 NULL);
 }
 
index 019bb0bc634fa58688d012b4a22221f258678677..41e319b6b699306d8fb27b1b33fdb80812df9aa3 100644 (file)
@@ -336,8 +336,6 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
        replacement->source4 = part->source4;
        replacement->source5 = part->source5;
        replacement->source6 = part->source6;
-       replacement->source7 = part->source7;
-       replacement->source8 = part->source8;
        replacement->id = part->id;
        replacement->clip_to_id = part->clip_to_id;
        replacement->dragable = part->dragable;
index cb2e50532d8672da673aee97561c7c23756bb09a..0bbb38eb4256283fa6d4094fedf27ebf53ed6a79 100644 (file)
@@ -92,7 +92,7 @@ struct _Old_Edje_Part
    const char            *name; /* the name if any of the part */
    Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
    Eina_List             *other_desc; /* other possible descriptors */
-   const char            *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8;
+   const char            *source, *source2, *source3, *source4, *source5, *source6;
    int                    id; /* its id number */
    int                    clip_to_id; /* the part id to clip this one to */
    Edje_Part_Dragable     dragable;
index 6ed1b01c818247f80648cbf5de04c9b5c301f62d..5fb129e702c125d3f7c658879fd66edef6ac0d9a 100644 (file)
@@ -422,8 +422,6 @@ _edje_edd_old_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source4", source4, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source5", source5, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source6", source6, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source7", source7, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source8", source8, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_old_edje_part, Old_Edje_Part, "items", items, _edje_edd_old_edje_pack_element);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.name", api.name, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.description", api.description, EET_T_STRING);
index f5ea27451c1c53d8fd3205ded7c58a869aa2ba77..7501fd42d9324849a170496575c71baf40de118d 100644 (file)
@@ -377,8 +377,6 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
        replacement->source4 = part->source4;
        replacement->source5 = part->source5;
        replacement->source6 = part->source6;
-       replacement->source7 = part->source7;
-       replacement->source8 = part->source8;
        replacement->id = part->id;
        replacement->clip_to_id = part->clip_to_id;
        replacement->dragable = part->dragable;
index 9d8213f6c4020955d9f458ea5a2633988df5687c..fcc2781f49a32a48e585f36c6292f0b67943bae3 100644 (file)
@@ -89,7 +89,7 @@ struct _Old_Edje_Part
    const char            *name; /* the name if any of the part */
    Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
    Eina_List             *other_desc; /* other possible descriptors */
-   const char            *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8;
+   const char            *source, *source2, *source3, *source4, *source5, *source6;
    int                    id; /* its id number */
    int                    clip_to_id; /* the part id to clip this one to */
    Edje_Part_Dragable     dragable;
index f9e48eef82ed9733b5e375d342082685c3286866..5d73d78d7673de21d7e4ebec982d5561a0734e52 100644 (file)
@@ -971,8 +971,6 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source4", source4, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source5", source5, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source6", source6, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source7", source7, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source8", source8, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
index 31c6d70ebbd08fddeab55252cd7f402ce4624454..0f83fce54820ef9e769090f409199cfc33053f2d 100644 (file)
@@ -23,7 +23,6 @@ struct _Entry
    Evas_Coord ox, oy;
    Evas_Object *cursor_bg;
    Evas_Object *cursor_fg, *cursor_fg2;
-   Evas_Object *sel_handler_start, *sel_handler_end;
    Evas_Textblock_Cursor *cursor;
    Evas_Textblock_Cursor *sel_start, *sel_end;
    Evas_Textblock_Cursor *cursor_user, *cursor_user_extra;
@@ -554,13 +553,6 @@ _sel_extend(Edje *ed, Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
    _sel_enable(ed, c, o, en);
    if (!evas_textblock_cursor_compare(c, en->sel_end)) return;
 
-   if (en->sel_handler_start && en->sel_handler_end)
-     {
-        /* Do NOT allow sel_handler_end pass sel_handler_start */
-        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);
-     }
-
    evas_textblock_cursor_copy(c, en->sel_end);
 
    _edje_entry_imf_cursor_info_set(en);
@@ -580,13 +572,6 @@ _sel_preextend(Edje *ed, Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
    _sel_enable(ed, c, o, en);
    if (!evas_textblock_cursor_compare(c, en->sel_start)) return;
 
-   if (en->sel_handler_start && en->sel_handler_end)
-     {
-        /* Do NOT allow sel_handler_start pass sel_handler_end */
-        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);
-     }
-
    evas_textblock_cursor_copy(c, en->sel_start);
 
    _edje_entry_imf_cursor_info_set(en);
@@ -630,10 +615,6 @@ _sel_clear(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_U
         en->have_selection = EINA_FALSE;
         _edje_emit(ed, "selection,cleared", en->rp->part->name);
      }
-   if (en->sel_handler_start)
-      edje_object_signal_emit(en->sel_handler_start, "edje,handler,hide", "edje");
-   if (en->sel_handler_end)
-      edje_object_signal_emit(en->sel_handler_end, "edje,handler,hide", "edje");
 }
 
 static void
@@ -694,15 +675,11 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
    evas_object_geometry_get(o, &x, &y, &w, &h);
    if (en->have_selection)
      {
-        int lc, li = 0;
-        lc = eina_list_count(en->sel);
-
         EINA_LIST_FOREACH(en->sel, l, sel)
           {
              Evas_Textblock_Rectangle *r;
 
              r = range->data;
-             li++;
              if (sel->obj_bg)
                {
                   evas_object_move(sel->obj_bg, x + r->x, y + r->y);
@@ -713,19 +690,6 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
                   evas_object_move(sel->obj_fg, x + r->x, y + r->y);
                   evas_object_resize(sel->obj_fg, r->w, r->h);
                }
-             if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
-               {
-                  if (li == 1)
-                    {
-                       evas_object_move(en->sel_handler_start, x + r->x, y + r->y + r->h);
-                       edje_object_signal_emit(en->sel_handler_start, "edje,handler,show", "edje");
-                    }
-                  if (li == lc)
-                    {
-                       evas_object_move(en->sel_handler_end, x + r->x + r->w, y + r->y + r->h);
-                       edje_object_signal_emit(en->sel_handler_end, "edje,handler,show", "edje");
-                    }
-               }
              *(&(sel->rect)) = *r;
              range = eina_list_remove_list(range, range);
              free(r);
@@ -741,172 +705,6 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
      }
 }
 
-static void
-_edje_start_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   Evas_Event_Mouse_Down *ev = event_info;
-   Edje_Real_Part *rp = data;
-   Evas_Coord ex, ey;
-   Evas_Coord cx, cy, cw, ch;
-   Evas_Textblock_Cursor_Type cur_type;
-   Entry *en;
-
-   if (ev->button != 1) return;
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_BEGIN, EDJE_CURSOR_MAIN);
-
-   evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
-   switch (rp->part->cursor_mode)
-     {
-      case EDJE_ENTRY_CURSOR_MODE_BEFORE:
-         cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
-         break;
-      case EDJE_ENTRY_CURSOR_MODE_UNDER:
-         /* no break for a reason */
-      default:
-         cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER;
-     }
-   evas_textblock_cursor_geometry_get(en->sel_start, &cx, &cy, &cw, &ch, NULL, cur_type);
-   en->ox = ev->canvas.x - (ex + cx + cw/2);
-   en->oy = ev->canvas.y - (ey + cy + ch/2);
-
-   en->select_mod_start = EINA_TRUE;
-   en->selecting = EINA_TRUE;
-
-   _edje_emit(en->ed, "handler,move,start", rp->part->name);
-}
-
-static void
-_edje_start_handler_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   Edje_Real_Part *rp = data;
-   Entry *en;
-
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   en->selecting = EINA_FALSE;
-   en->select_mod_start = EINA_FALSE;
-
-   _edje_emit(en->ed, "handler,move,end", rp->part->name);
-}
-
-static void
-_edje_start_handler_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   Evas_Event_Mouse_Move *ev = event_info;
-   Edje_Real_Part *rp = data;
-   Entry *en;
-   Evas_Coord ex, ey;
-   Evas_Coord cx, cy;
-
-   if (ev->buttons != 1) return;
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
-   cx = ev->cur.canvas.x - en->ox - ex;
-   cy = ev->cur.canvas.y - en->oy - ey;
-   if (cx <= 0) cx = 1;
-   evas_textblock_cursor_char_coord_set(en->cursor, cx, cy);
-
-   if (en->select_allow)
-     {
-        if (en->select_mod_start)
-           _sel_preextend(en->ed, en->cursor, rp->object, en);
-     }
-   _edje_entry_real_part_configure(en->ed, rp);
-   _edje_emit(en->ed, "handler,moving", rp->part->name);
-}
-
-static void
-_edje_end_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   Evas_Event_Mouse_Down *ev = event_info;
-   Edje_Real_Part *rp = data;
-   Entry *en;
-   Evas_Coord ex, ey;
-   Evas_Coord cx, cy, cw, ch;
-   Evas_Textblock_Cursor_Type cur_type;
-
-   if (ev->button != 1) return;
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_END, EDJE_CURSOR_MAIN);
-
-   evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
-   switch (rp->part->cursor_mode)
-     {
-      case EDJE_ENTRY_CURSOR_MODE_BEFORE:
-         cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
-         break;
-      case EDJE_ENTRY_CURSOR_MODE_UNDER:
-         /* no break for a reason */
-      default:
-         cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER;
-     }
-   evas_textblock_cursor_geometry_get(en->sel_end, &cx, &cy, &cw, &ch, NULL, cur_type);
-   en->ox = ev->canvas.x - (ex + cx + cw/2);
-   en->oy = ev->canvas.y - (ey + cy + ch/2);
-
-   en->select_mod_end = EINA_TRUE;
-   en->selecting = EINA_TRUE;
-
-   _edje_emit(en->ed, "handler,move,start", rp->part->name);
-}
-
-static void
-_edje_end_handler_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   Edje_Real_Part *rp = data;
-   Entry *en;
-
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   en->selecting = EINA_FALSE;
-   en->select_mod_end = EINA_FALSE;
-
-   _edje_emit(en->ed, "handler,move,end", rp->part->name);
-}
-
-static void
-_edje_end_handler_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   Evas_Event_Mouse_Move *ev = event_info;
-   Edje_Real_Part *rp = data;
-   Entry *en;
-   Evas_Coord ex, ey;
-   Evas_Coord cx, cy;
-
-   if (ev->buttons != 1) return;
-   if ((rp->type != EDJE_RP_TYPE_TEXT) ||
-       (!rp->typedata.text)) return;
-   en = rp->typedata.text->entry_data;
-
-   evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
-   cx = ev->cur.canvas.x - en->ox - ex;
-   cy = ev->cur.canvas.y - en->oy - ey;
-   if (cx <= 0) cx = 1;
-   evas_textblock_cursor_char_coord_set(en->cursor, cx, cy);
-
-   if (en->select_allow)
-     {
-        if (en->select_mod_end)
-           _sel_extend(en->ed, en->cursor, rp->object, en);
-     }
-   _edje_entry_real_part_configure(en->ed, rp);
-   _edje_emit(en->ed, "handler,moving", rp->part->name);
-}
-
 static void
 _edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
@@ -2229,8 +2027,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
    if (dosel)
      {
         if ((en->have_selection) &&
-            ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) ||
-             (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)))
+            (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
           {
              if (shift)
                _sel_extend(en->ed, en->cursor, rp->object, en);
@@ -2386,8 +2183,7 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
                }
           }
      }
-   if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) ||
-       (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
+   if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
      {
         if (en->select_allow)
           {
@@ -2486,8 +2282,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
                     _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))
+        if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
           {
              if (en->select_allow)
                {
@@ -2640,36 +2435,6 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
    evas_object_pass_events_set(en->cursor_fg, EINA_TRUE);
    _edje_subobj_register(ed, en->cursor_fg);
 
-   if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
-     {
-        if (rp->part->source7)
-          {
-             en->sel_handler_start = edje_object_add(ed->base->evas);
-             edje_object_file_set(en->sel_handler_start, ed->path, rp->part->source7);
-             evas_object_show(en->sel_handler_start);
-             _edje_subobj_register(ed, en->sel_handler_start);
-             evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_DOWN,
-                                            _edje_start_handler_mouse_down_cb, rp);
-             evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_UP,
-                                            _edje_start_handler_mouse_up_cb, rp);
-             evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_MOVE,
-                                            _edje_start_handler_mouse_move_cb, rp);
-          }
-        if (rp->part->source8)
-          {
-             en->sel_handler_end = edje_object_add(ed->base->evas);
-             edje_object_file_set(en->sel_handler_end, ed->path, rp->part->source8);
-             evas_object_show(en->sel_handler_end);
-             _edje_subobj_register(ed, en->sel_handler_end);
-             evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_DOWN,
-                                            _edje_end_handler_mouse_down_cb, rp);
-             evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_UP,
-                                            _edje_end_handler_mouse_up_cb, rp);
-             evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_MOVE,
-                                            _edje_end_handler_mouse_move_cb, rp);
-          }
-     }
-
    /* A proxy to the main cursor. */
    if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
      {
@@ -2766,16 +2531,6 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp)
    evas_object_del(en->cursor_bg);
    evas_object_del(en->cursor_fg);
    evas_object_del(en->cursor_fg2);
-   if (en->sel_handler_start)
-     {
-        evas_object_del(en->sel_handler_start);
-        en->sel_handler_start = NULL;
-     }
-   if (en->sel_handler_end)
-     {
-        evas_object_del(en->sel_handler_end);
-        en->sel_handler_end = NULL;
-     }
 
    if (en->pw_timer)
      {
@@ -3838,6 +3593,13 @@ _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur,
 {
    Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
    if (!c) return EINA_FALSE;
+   Entry *en = rp->typedata.text->entry_data;
+   if ((cur == EDJE_CURSOR_SELECTION_BEGIN) ||
+       (cur == EDJE_CURSOR_SELECTION_END))
+     {
+        if (en->have_selection)
+           _edje_emit(en->ed, "selection,changed", rp->part->name);
+     }
    return evas_textblock_cursor_char_coord_set(c, x, y);
 }
 
index 42422d95bcb0ee484727163b62a6d890fca9f02c..524335ed1d9bcb09f8b67ac16e9f7621a883ccfe 100644 (file)
@@ -433,7 +433,6 @@ typedef struct _Edje_Signal_Callback_Custom Edje_Signal_Callback_Custom;
 
 #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_CURSOR_MODE_UNDER 0
 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
@@ -989,7 +988,7 @@ struct _Edje_Part
 
    Edje_Part_Description_List    other; /* other possible descriptors */
 
-   const char           *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8;
+   const char           *source, *source2, *source3, *source4, *source5, *source6;
    int                    id; /* its id number */
    int                    clip_to_id; /* the part id to clip this one to */
    Edje_Part_Dragable     dragable;