summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/edje/edc.vim2
-rw-r--r--data/edje/vim/syntax/edc.vim2
-rw-r--r--src/bin/edje/edje_cc_handlers.c51
-rw-r--r--src/bin/edje/edje_convert.c2
-rw-r--r--src/bin/edje/edje_convert.h2
-rw-r--r--src/bin/edje/edje_data_convert.c2
-rw-r--r--src/lib/edje/edje_convert.c2
-rw-r--r--src/lib/edje/edje_convert.h2
-rw-r--r--src/lib/edje/edje_data.c2
-rw-r--r--src/lib/edje/edje_entry.c258
-rw-r--r--src/lib/edje/edje_private.h3
11 files changed, 15 insertions, 313 deletions
diff --git a/data/edje/edc.vim b/data/edje/edc.vim
index e130e10150..f8f31d06f0 100644
--- a/data/edje/edc.vim
+++ b/data/edje/edc.vim
@@ -68,7 +68,7 @@ syn keyword cConstant SCRIPT LUA_SCRIPT
68syn keyword cConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE 68syn keyword cConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
69syn keyword cConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE SPRING 69syn keyword cConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE SPRING
70syn keyword cConstant VERTICAL HORIZONTAL ON_HOLD BOTH EDITABLE 70syn keyword cConstant VERTICAL HORIZONTAL ON_HOLD BOTH EDITABLE
71syn keyword cConstatn DEFAULT EXPLICIT BLOCK_HANDLE 71syn keyword cConstatn DEFAULT EXPLICIT
72syn keyword cConstant CURRENT 72syn keyword cConstant CURRENT
73syn keyword cConstant FOCUS_SET "default" NEITHER 73syn keyword cConstant FOCUS_SET "default" NEITHER
74syn keyword cConstant DYNAMIC STATIC PASSWORD 74syn keyword cConstant DYNAMIC STATIC PASSWORD
diff --git a/data/edje/vim/syntax/edc.vim b/data/edje/vim/syntax/edc.vim
index 27ced4f078..6d87d7097f 100644
--- a/data/edje/vim/syntax/edc.vim
+++ b/data/edje/vim/syntax/edc.vim
@@ -63,7 +63,7 @@ syn keyword edcConstant ACCEL_FAC DECEL_FAC SIN_FAC DIVISOR_INTERP
63syn keyword edcConstant ACCELERATE_FACTOR DECELERATE_FACTOR 63syn keyword edcConstant ACCELERATE_FACTOR DECELERATE_FACTOR
64syn keyword edcConstant VERTICAL HORIZONTAL BOTH BOX TABLE 64syn keyword edcConstant VERTICAL HORIZONTAL BOTH BOX TABLE
65syn keyword edcConstant EDITABLE PASSWORD "default" 65syn keyword edcConstant EDITABLE PASSWORD "default"
66syn keyword edcConstant DEFAULT EXPLICIT BLOCK_HANDLE 66syn keyword edcConstant DEFAULT EXPLICIT
67syn keyword edcConstant SOLID 67syn keyword edcConstant SOLID
68 68
69syn keyword edcTodo contained TODO FIXME XXX 69syn keyword edcTodo contained TODO FIXME XXX
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index a87b8600ab..16622b5054 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -226,8 +226,6 @@ static void st_collections_group_parts_part_source3(void);
226static void st_collections_group_parts_part_source4(void); 226static void st_collections_group_parts_part_source4(void);
227static void st_collections_group_parts_part_source5(void); 227static void st_collections_group_parts_part_source5(void);
228static void st_collections_group_parts_part_source6(void); 228static void st_collections_group_parts_part_source6(void);
229static void st_collections_group_parts_part_source7(void);
230static void st_collections_group_parts_part_source8(void);
231static void st_collections_group_parts_part_entry_mode(void); 229static void st_collections_group_parts_part_entry_mode(void);
232static void st_collections_group_parts_part_select_mode(void); 230static void st_collections_group_parts_part_select_mode(void);
233static void st_collections_group_parts_part_cursor_mode(void); 231static void st_collections_group_parts_part_cursor_mode(void);
@@ -524,8 +522,6 @@ New_Statement_Handler statement_handlers[] =
524 {"collections.group.parts.part.source4", st_collections_group_parts_part_source4}, 522 {"collections.group.parts.part.source4", st_collections_group_parts_part_source4},
525 {"collections.group.parts.part.source5", st_collections_group_parts_part_source5}, 523 {"collections.group.parts.part.source5", st_collections_group_parts_part_source5},
526 {"collections.group.parts.part.source6", st_collections_group_parts_part_source6}, 524 {"collections.group.parts.part.source6", st_collections_group_parts_part_source6},
527 {"collections.group.parts.part.source7", st_collections_group_parts_part_source7},
528 {"collections.group.parts.part.source8", st_collections_group_parts_part_source8},
529 {"collections.group.parts.part.dragable.x", st_collections_group_parts_part_dragable_x}, 525 {"collections.group.parts.part.dragable.x", st_collections_group_parts_part_dragable_x},
530 {"collections.group.parts.part.dragable.y", st_collections_group_parts_part_dragable_y}, 526 {"collections.group.parts.part.dragable.y", st_collections_group_parts_part_dragable_y},
531 {"collections.group.parts.part.dragable.confine", st_collections_group_parts_part_dragable_confine}, 527 {"collections.group.parts.part.dragable.confine", st_collections_group_parts_part_dragable_confine},
@@ -2803,8 +2799,6 @@ st_collections_group_inherit(void)
2803 ep->source4 = STRDUP(ep2->source4); 2799 ep->source4 = STRDUP(ep2->source4);
2804 ep->source5 = STRDUP(ep2->source5); 2800 ep->source5 = STRDUP(ep2->source5);
2805 ep->source6 = STRDUP(ep2->source6); 2801 ep->source6 = STRDUP(ep2->source6);
2806 ep->source7 = STRDUP(ep2->source7);
2807 ep->source8 = STRDUP(ep2->source8);
2808 2802
2809 data_queue_copied_part_lookup(pc, &(ep2->clip_to_id), &(ep->clip_to_id)); 2803 data_queue_copied_part_lookup(pc, &(ep2->clip_to_id), &(ep->clip_to_id));
2810 2804
@@ -4098,48 +4092,6 @@ st_collections_group_parts_part_source6(void)
4098 4092
4099/** 4093/**
4100 @page edcref 4094 @page edcref
4101 @property
4102 source7
4103 @parameters
4104 [another group's name]
4105 @effect
4106 Only available to TEXTBLOCK parts. It is used for the group to be
4107 loaded and used for the start selection handler display.
4108 @endproperty
4109*/
4110static void
4111st_collections_group_parts_part_source7(void)
4112{
4113 check_arg_count(1);
4114
4115 //FIXME: validate this somehow (need to decide on the format also)
4116 current_part->source7 = parse_str(0);
4117 data_queue_group_lookup(current_part->source7, current_part);
4118}
4119
4120/**
4121 @page edcref
4122 @property
4123 source8
4124 @parameters
4125 [another group's name]
4126 @effect
4127 Only available to TEXTBLOCK parts. It is used for the group to be
4128 loaded and used for the end selection handler display.
4129 @endproperty
4130*/
4131static void
4132st_collections_group_parts_part_source8(void)
4133{
4134 check_arg_count(1);
4135
4136 //FIXME: validate this somehow (need to decide on the format also)
4137 current_part->source8 = parse_str(0);
4138 data_queue_group_lookup(current_part->source8, current_part);
4139}
4140
4141/**
4142 @page edcref
4143 4095
4144 @property 4096 @property
4145 effect 4097 effect
@@ -4251,8 +4203,6 @@ st_collections_group_parts_part_entry_mode(void)
4251 @li EXPLICIT mode requires the application 4203 @li EXPLICIT mode requires the application
4252 controlling the edje object has to explicitly begin and end selection 4204 controlling the edje object has to explicitly begin and end selection
4253 modes, and the selection itself is dragable at both ends. 4205 modes, and the selection itself is dragable at both ends.
4254 @li BLOCK_HANDLE is based on EXPLICIT mode and adds selection handlers
4255 on both sides.
4256 @endproperty 4206 @endproperty
4257*/ 4207*/
4258static void 4208static void
@@ -4263,7 +4213,6 @@ st_collections_group_parts_part_select_mode(void)
4263 current_part->select_mode = parse_enum(0, 4213 current_part->select_mode = parse_enum(0,
4264 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT, 4214 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT,
4265 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT, 4215 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT,
4266 "BLOCK_HANDLE", EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE,
4267 NULL); 4216 NULL);
4268} 4217}
4269 4218
diff --git a/src/bin/edje/edje_convert.c b/src/bin/edje/edje_convert.c
index 019bb0bc63..41e319b6b6 100644
--- a/src/bin/edje/edje_convert.c
+++ b/src/bin/edje/edje_convert.c
@@ -336,8 +336,6 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
336 replacement->source4 = part->source4; 336 replacement->source4 = part->source4;
337 replacement->source5 = part->source5; 337 replacement->source5 = part->source5;
338 replacement->source6 = part->source6; 338 replacement->source6 = part->source6;
339 replacement->source7 = part->source7;
340 replacement->source8 = part->source8;
341 replacement->id = part->id; 339 replacement->id = part->id;
342 replacement->clip_to_id = part->clip_to_id; 340 replacement->clip_to_id = part->clip_to_id;
343 replacement->dragable = part->dragable; 341 replacement->dragable = part->dragable;
diff --git a/src/bin/edje/edje_convert.h b/src/bin/edje/edje_convert.h
index cb2e50532d..0bbb38eb42 100644
--- a/src/bin/edje/edje_convert.h
+++ b/src/bin/edje/edje_convert.h
@@ -92,7 +92,7 @@ struct _Old_Edje_Part
92 const char *name; /* the name if any of the part */ 92 const char *name; /* the name if any of the part */
93 Old_Edje_Part_Description *default_desc; /* the part descriptor for default */ 93 Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
94 Eina_List *other_desc; /* other possible descriptors */ 94 Eina_List *other_desc; /* other possible descriptors */
95 const char *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8; 95 const char *source, *source2, *source3, *source4, *source5, *source6;
96 int id; /* its id number */ 96 int id; /* its id number */
97 int clip_to_id; /* the part id to clip this one to */ 97 int clip_to_id; /* the part id to clip this one to */
98 Edje_Part_Dragable dragable; 98 Edje_Part_Dragable dragable;
diff --git a/src/bin/edje/edje_data_convert.c b/src/bin/edje/edje_data_convert.c
index 6ed1b01c81..5fb129e702 100644
--- a/src/bin/edje/edje_data_convert.c
+++ b/src/bin/edje/edje_data_convert.c
@@ -422,8 +422,6 @@ _edje_edd_old_init(void)
422 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source4", source4, EET_T_STRING); 422 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source4", source4, EET_T_STRING);
423 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source5", source5, EET_T_STRING); 423 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source5", source5, EET_T_STRING);
424 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source6", source6, EET_T_STRING); 424 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source6", source6, EET_T_STRING);
425 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source7", source7, EET_T_STRING);
426 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "source8", source8, EET_T_STRING);
427 EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_old_edje_part, Old_Edje_Part, "items", items, _edje_edd_old_edje_pack_element); 425 EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_old_edje_part, Old_Edje_Part, "items", items, _edje_edd_old_edje_pack_element);
428 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.name", api.name, EET_T_STRING); 426 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.name", api.name, EET_T_STRING);
429 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.description", api.description, EET_T_STRING); 427 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "api.description", api.description, EET_T_STRING);
diff --git a/src/lib/edje/edje_convert.c b/src/lib/edje/edje_convert.c
index f5ea27451c..7501fd42d9 100644
--- a/src/lib/edje/edje_convert.c
+++ b/src/lib/edje/edje_convert.c
@@ -377,8 +377,6 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
377 replacement->source4 = part->source4; 377 replacement->source4 = part->source4;
378 replacement->source5 = part->source5; 378 replacement->source5 = part->source5;
379 replacement->source6 = part->source6; 379 replacement->source6 = part->source6;
380 replacement->source7 = part->source7;
381 replacement->source8 = part->source8;
382 replacement->id = part->id; 380 replacement->id = part->id;
383 replacement->clip_to_id = part->clip_to_id; 381 replacement->clip_to_id = part->clip_to_id;
384 replacement->dragable = part->dragable; 382 replacement->dragable = part->dragable;
diff --git a/src/lib/edje/edje_convert.h b/src/lib/edje/edje_convert.h
index 9d8213f6c4..fcc2781f49 100644
--- a/src/lib/edje/edje_convert.h
+++ b/src/lib/edje/edje_convert.h
@@ -89,7 +89,7 @@ struct _Old_Edje_Part
89 const char *name; /* the name if any of the part */ 89 const char *name; /* the name if any of the part */
90 Old_Edje_Part_Description *default_desc; /* the part descriptor for default */ 90 Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
91 Eina_List *other_desc; /* other possible descriptors */ 91 Eina_List *other_desc; /* other possible descriptors */
92 const char *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8; 92 const char *source, *source2, *source3, *source4, *source5, *source6;
93 int id; /* its id number */ 93 int id; /* its id number */
94 int clip_to_id; /* the part id to clip this one to */ 94 int clip_to_id; /* the part id to clip this one to */
95 Edje_Part_Dragable dragable; 95 Edje_Part_Dragable dragable;
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index f9e48eef82..5d73d78d76 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -971,8 +971,6 @@ _edje_edd_init(void)
971 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source4", source4, EET_T_STRING); 971 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source4", source4, EET_T_STRING);
972 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source5", source5, EET_T_STRING); 972 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source5", source5, EET_T_STRING);
973 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source6", source6, EET_T_STRING); 973 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source6", source6, EET_T_STRING);
974 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source7", source7, EET_T_STRING);
975 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source8", source8, EET_T_STRING);
976 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT); 974 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
977 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT); 975 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
978 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR); 976 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 31c6d70ebb..0f83fce548 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -23,7 +23,6 @@ struct _Entry
23 Evas_Coord ox, oy; 23 Evas_Coord ox, oy;
24 Evas_Object *cursor_bg; 24 Evas_Object *cursor_bg;
25 Evas_Object *cursor_fg, *cursor_fg2; 25 Evas_Object *cursor_fg, *cursor_fg2;
26 Evas_Object *sel_handler_start, *sel_handler_end;
27 Evas_Textblock_Cursor *cursor; 26 Evas_Textblock_Cursor *cursor;
28 Evas_Textblock_Cursor *sel_start, *sel_end; 27 Evas_Textblock_Cursor *sel_start, *sel_end;
29 Evas_Textblock_Cursor *cursor_user, *cursor_user_extra; 28 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)
554 _sel_enable(ed, c, o, en); 553 _sel_enable(ed, c, o, en);
555 if (!evas_textblock_cursor_compare(c, en->sel_end)) return; 554 if (!evas_textblock_cursor_compare(c, en->sel_end)) return;
556 555
557 if (en->sel_handler_start && en->sel_handler_end)
558 {
559 /* Do NOT allow sel_handler_end pass sel_handler_start */
560 if (evas_textblock_cursor_compare(c, en->sel_start) <= 0)
561 evas_textblock_cursor_pos_set(c, evas_textblock_cursor_pos_get(en->sel_start) + 1);
562 }
563
564 evas_textblock_cursor_copy(c, en->sel_end); 556 evas_textblock_cursor_copy(c, en->sel_end);
565 557
566 _edje_entry_imf_cursor_info_set(en); 558 _edje_entry_imf_cursor_info_set(en);
@@ -580,13 +572,6 @@ _sel_preextend(Edje *ed, Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
580 _sel_enable(ed, c, o, en); 572 _sel_enable(ed, c, o, en);
581 if (!evas_textblock_cursor_compare(c, en->sel_start)) return; 573 if (!evas_textblock_cursor_compare(c, en->sel_start)) return;
582 574
583 if (en->sel_handler_start && en->sel_handler_end)
584 {
585 /* Do NOT allow sel_handler_start pass sel_handler_end */
586 if (evas_textblock_cursor_compare(c, en->sel_end) >= 0)
587 evas_textblock_cursor_pos_set(c, evas_textblock_cursor_pos_get(en->sel_end) - 1);
588 }
589
590 evas_textblock_cursor_copy(c, en->sel_start); 575 evas_textblock_cursor_copy(c, en->sel_start);
591 576
592 _edje_entry_imf_cursor_info_set(en); 577 _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
630 en->have_selection = EINA_FALSE; 615 en->have_selection = EINA_FALSE;
631 _edje_emit(ed, "selection,cleared", en->rp->part->name); 616 _edje_emit(ed, "selection,cleared", en->rp->part->name);
632 } 617 }
633 if (en->sel_handler_start)
634 edje_object_signal_emit(en->sel_handler_start, "edje,handler,hide", "edje");
635 if (en->sel_handler_end)
636 edje_object_signal_emit(en->sel_handler_end, "edje,handler,hide", "edje");
637} 618}
638 619
639static void 620static void
@@ -694,15 +675,11 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
694 evas_object_geometry_get(o, &x, &y, &w, &h); 675 evas_object_geometry_get(o, &x, &y, &w, &h);
695 if (en->have_selection) 676 if (en->have_selection)
696 { 677 {
697 int lc, li = 0;
698 lc = eina_list_count(en->sel);
699
700 EINA_LIST_FOREACH(en->sel, l, sel) 678 EINA_LIST_FOREACH(en->sel, l, sel)
701 { 679 {
702 Evas_Textblock_Rectangle *r; 680 Evas_Textblock_Rectangle *r;
703 681
704 r = range->data; 682 r = range->data;
705 li++;
706 if (sel->obj_bg) 683 if (sel->obj_bg)
707 { 684 {
708 evas_object_move(sel->obj_bg, x + r->x, y + r->y); 685 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
713 evas_object_move(sel->obj_fg, x + r->x, y + r->y); 690 evas_object_move(sel->obj_fg, x + r->x, y + r->y);
714 evas_object_resize(sel->obj_fg, r->w, r->h); 691 evas_object_resize(sel->obj_fg, r->w, r->h);
715 } 692 }
716 if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
717 {
718 if (li == 1)
719 {
720 evas_object_move(en->sel_handler_start, x + r->x, y + r->y + r->h);
721 edje_object_signal_emit(en->sel_handler_start, "edje,handler,show", "edje");
722 }
723 if (li == lc)
724 {
725 evas_object_move(en->sel_handler_end, x + r->x + r->w, y + r->y + r->h);
726 edje_object_signal_emit(en->sel_handler_end, "edje,handler,show", "edje");
727 }
728 }
729 *(&(sel->rect)) = *r; 693 *(&(sel->rect)) = *r;
730 range = eina_list_remove_list(range, range); 694 range = eina_list_remove_list(range, range);
731 free(r); 695 free(r);
@@ -742,172 +706,6 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
742} 706}
743 707
744static void 708static void
745_edje_start_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
746{
747 Evas_Event_Mouse_Down *ev = event_info;
748 Edje_Real_Part *rp = data;
749 Evas_Coord ex, ey;
750 Evas_Coord cx, cy, cw, ch;
751 Evas_Textblock_Cursor_Type cur_type;
752 Entry *en;
753
754 if (ev->button != 1) return;
755 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
756 (!rp->typedata.text)) return;
757 en = rp->typedata.text->entry_data;
758
759 _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_BEGIN, EDJE_CURSOR_MAIN);
760
761 evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
762 switch (rp->part->cursor_mode)
763 {
764 case EDJE_ENTRY_CURSOR_MODE_BEFORE:
765 cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
766 break;
767 case EDJE_ENTRY_CURSOR_MODE_UNDER:
768 /* no break for a reason */
769 default:
770 cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER;
771 }
772 evas_textblock_cursor_geometry_get(en->sel_start, &cx, &cy, &cw, &ch, NULL, cur_type);
773 en->ox = ev->canvas.x - (ex + cx + cw/2);
774 en->oy = ev->canvas.y - (ey + cy + ch/2);
775
776 en->select_mod_start = EINA_TRUE;
777 en->selecting = EINA_TRUE;
778
779 _edje_emit(en->ed, "handler,move,start", rp->part->name);
780}
781
782static void
783_edje_start_handler_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
784{
785 Edje_Real_Part *rp = data;
786 Entry *en;
787
788 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
789 (!rp->typedata.text)) return;
790 en = rp->typedata.text->entry_data;
791
792 en->selecting = EINA_FALSE;
793 en->select_mod_start = EINA_FALSE;
794
795 _edje_emit(en->ed, "handler,move,end", rp->part->name);
796}
797
798static void
799_edje_start_handler_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
800{
801 Evas_Event_Mouse_Move *ev = event_info;
802 Edje_Real_Part *rp = data;
803 Entry *en;
804 Evas_Coord ex, ey;
805 Evas_Coord cx, cy;
806
807 if (ev->buttons != 1) return;
808 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
809 (!rp->typedata.text)) return;
810 en = rp->typedata.text->entry_data;
811
812 evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
813 cx = ev->cur.canvas.x - en->ox - ex;
814 cy = ev->cur.canvas.y - en->oy - ey;
815 if (cx <= 0) cx = 1;
816 evas_textblock_cursor_char_coord_set(en->cursor, cx, cy);
817
818 if (en->select_allow)
819 {
820 if (en->select_mod_start)
821 _sel_preextend(en->ed, en->cursor, rp->object, en);
822 }
823 _edje_entry_real_part_configure(en->ed, rp);
824 _edje_emit(en->ed, "handler,moving", rp->part->name);
825}
826
827static void
828_edje_end_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
829{
830 Evas_Event_Mouse_Down *ev = event_info;
831 Edje_Real_Part *rp = data;
832 Entry *en;
833 Evas_Coord ex, ey;
834 Evas_Coord cx, cy, cw, ch;
835 Evas_Textblock_Cursor_Type cur_type;
836
837 if (ev->button != 1) return;
838 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
839 (!rp->typedata.text)) return;
840 en = rp->typedata.text->entry_data;
841
842 _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_END, EDJE_CURSOR_MAIN);
843
844 evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
845 switch (rp->part->cursor_mode)
846 {
847 case EDJE_ENTRY_CURSOR_MODE_BEFORE:
848 cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
849 break;
850 case EDJE_ENTRY_CURSOR_MODE_UNDER:
851 /* no break for a reason */
852 default:
853 cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER;
854 }
855 evas_textblock_cursor_geometry_get(en->sel_end, &cx, &cy, &cw, &ch, NULL, cur_type);
856 en->ox = ev->canvas.x - (ex + cx + cw/2);
857 en->oy = ev->canvas.y - (ey + cy + ch/2);
858
859 en->select_mod_end = EINA_TRUE;
860 en->selecting = EINA_TRUE;
861
862 _edje_emit(en->ed, "handler,move,start", rp->part->name);
863}
864
865static void
866_edje_end_handler_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
867{
868 Edje_Real_Part *rp = data;
869 Entry *en;
870
871 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
872 (!rp->typedata.text)) return;
873 en = rp->typedata.text->entry_data;
874
875 en->selecting = EINA_FALSE;
876 en->select_mod_end = EINA_FALSE;
877
878 _edje_emit(en->ed, "handler,move,end", rp->part->name);
879}
880
881static void
882_edje_end_handler_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
883{
884 Evas_Event_Mouse_Move *ev = event_info;
885 Edje_Real_Part *rp = data;
886 Entry *en;
887 Evas_Coord ex, ey;
888 Evas_Coord cx, cy;
889
890 if (ev->buttons != 1) return;
891 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
892 (!rp->typedata.text)) return;
893 en = rp->typedata.text->entry_data;
894
895 evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL);
896 cx = ev->cur.canvas.x - en->ox - ex;
897 cy = ev->cur.canvas.y - en->oy - ey;
898 if (cx <= 0) cx = 1;
899 evas_textblock_cursor_char_coord_set(en->cursor, cx, cy);
900
901 if (en->select_allow)
902 {
903 if (en->select_mod_end)
904 _sel_extend(en->ed, en->cursor, rp->object, en);
905 }
906 _edje_entry_real_part_configure(en->ed, rp);
907 _edje_emit(en->ed, "handler,moving", rp->part->name);
908}
909
910static void
911_edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 709_edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
912{ 710{
913 Anchor *an = data; 711 Anchor *an = data;
@@ -2229,8 +2027,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
2229 if (dosel) 2027 if (dosel)
2230 { 2028 {
2231 if ((en->have_selection) && 2029 if ((en->have_selection) &&
2232 ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) || 2030 (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
2233 (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)))
2234 { 2031 {
2235 if (shift) 2032 if (shift)
2236 _sel_extend(en->ed, en->cursor, rp->object, en); 2033 _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
2386 } 2183 }
2387 } 2184 }
2388 } 2185 }
2389 if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) || 2186 if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
2390 (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
2391 { 2187 {
2392 if (en->select_allow) 2188 if (en->select_allow)
2393 { 2189 {
@@ -2486,8 +2282,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
2486 _curs_lin_end(en->cursor, rp->object, en); 2282 _curs_lin_end(en->cursor, rp->object, en);
2487 } 2283 }
2488 } 2284 }
2489 if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) || 2285 if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
2490 (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
2491 { 2286 {
2492 if (en->select_allow) 2287 if (en->select_allow)
2493 { 2288 {
@@ -2640,36 +2435,6 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
2640 evas_object_pass_events_set(en->cursor_fg, EINA_TRUE); 2435 evas_object_pass_events_set(en->cursor_fg, EINA_TRUE);
2641 _edje_subobj_register(ed, en->cursor_fg); 2436 _edje_subobj_register(ed, en->cursor_fg);
2642 2437
2643 if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
2644 {
2645 if (rp->part->source7)
2646 {
2647 en->sel_handler_start = edje_object_add(ed->base->evas);
2648 edje_object_file_set(en->sel_handler_start, ed->path, rp->part->source7);
2649 evas_object_show(en->sel_handler_start);
2650 _edje_subobj_register(ed, en->sel_handler_start);
2651 evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_DOWN,
2652 _edje_start_handler_mouse_down_cb, rp);
2653 evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_UP,
2654 _edje_start_handler_mouse_up_cb, rp);
2655 evas_object_event_callback_add(en->sel_handler_start, EVAS_CALLBACK_MOUSE_MOVE,
2656 _edje_start_handler_mouse_move_cb, rp);
2657 }
2658 if (rp->part->source8)
2659 {
2660 en->sel_handler_end = edje_object_add(ed->base->evas);
2661 edje_object_file_set(en->sel_handler_end, ed->path, rp->part->source8);
2662 evas_object_show(en->sel_handler_end);
2663 _edje_subobj_register(ed, en->sel_handler_end);
2664 evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_DOWN,
2665 _edje_end_handler_mouse_down_cb, rp);
2666 evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_UP,
2667 _edje_end_handler_mouse_up_cb, rp);
2668 evas_object_event_callback_add(en->sel_handler_end, EVAS_CALLBACK_MOUSE_MOVE,
2669 _edje_end_handler_mouse_move_cb, rp);
2670 }
2671 }
2672
2673 /* A proxy to the main cursor. */ 2438 /* A proxy to the main cursor. */
2674 if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE) 2439 if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
2675 { 2440 {
@@ -2766,16 +2531,6 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp)
2766 evas_object_del(en->cursor_bg); 2531 evas_object_del(en->cursor_bg);
2767 evas_object_del(en->cursor_fg); 2532 evas_object_del(en->cursor_fg);
2768 evas_object_del(en->cursor_fg2); 2533 evas_object_del(en->cursor_fg2);
2769 if (en->sel_handler_start)
2770 {
2771 evas_object_del(en->sel_handler_start);
2772 en->sel_handler_start = NULL;
2773 }
2774 if (en->sel_handler_end)
2775 {
2776 evas_object_del(en->sel_handler_end);
2777 en->sel_handler_end = NULL;
2778 }
2779 2534
2780 if (en->pw_timer) 2535 if (en->pw_timer)
2781 { 2536 {
@@ -3838,6 +3593,13 @@ _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur,
3838{ 3593{
3839 Evas_Textblock_Cursor *c = _cursor_get(rp, cur); 3594 Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
3840 if (!c) return EINA_FALSE; 3595 if (!c) return EINA_FALSE;
3596 Entry *en = rp->typedata.text->entry_data;
3597 if ((cur == EDJE_CURSOR_SELECTION_BEGIN) ||
3598 (cur == EDJE_CURSOR_SELECTION_END))
3599 {
3600 if (en->have_selection)
3601 _edje_emit(en->ed, "selection,changed", rp->part->name);
3602 }
3841 return evas_textblock_cursor_char_coord_set(c, x, y); 3603 return evas_textblock_cursor_char_coord_set(c, x, y);
3842} 3604}
3843 3605
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 42422d95bc..524335ed1d 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -433,7 +433,6 @@ typedef struct _Edje_Signal_Callback_Custom Edje_Signal_Callback_Custom;
433 433
434#define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0 434#define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
435#define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1 435#define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
436#define EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE 2
437 436
438#define EDJE_ENTRY_CURSOR_MODE_UNDER 0 437#define EDJE_ENTRY_CURSOR_MODE_UNDER 0
439#define EDJE_ENTRY_CURSOR_MODE_BEFORE 1 438#define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
@@ -989,7 +988,7 @@ struct _Edje_Part
989 988
990 Edje_Part_Description_List other; /* other possible descriptors */ 989 Edje_Part_Description_List other; /* other possible descriptors */
991 990
992 const char *source, *source2, *source3, *source4, *source5, *source6, *source7, *source8; 991 const char *source, *source2, *source3, *source4, *source5, *source6;
993 int id; /* its id number */ 992 int id; /* its id number */
994 int clip_to_id; /* the part id to clip this one to */ 993 int clip_to_id; /* the part id to clip this one to */
995 Edje_Part_Dragable dragable; 994 Edje_Part_Dragable dragable;