raster pushed a commit to branch master.
commit c6467760401f5079be718b1f2937394c7cd5635f
Author: Thiep Ha <[email protected]>
Date: Sat Jun 22 12:36:27 2013 +0900
[Elm_Entry] Show magnifier when selection handlers are pressed or moved.
Show magnifier when selection handlers are pressed or moved.
This patch is depended on D171 patch.
Conflicts:
ChangeLog
NEWS
---
ChangeLog | 3 ++-
NEWS | 1 +
src/lib/elm_entry.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e2ae0f6..0a52043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1399,6 +1399,7 @@
* Add magnifier to entry.
+<<<<<<< HEAD
2013-06-10 ChunEon Park (Hermet)
* Remove the keyboard area in the conformant if the keyboard state is
off.
@@ -1441,4 +1442,4 @@
2013-06-22 Thiep Ha
* Move cursor when mouse moves with longpress.
-
+ * Show magnifier when selection handlers are pressed or moved.
diff --git a/NEWS b/NEWS
index d8e48f1..5403dd1 100644
--- a/NEWS
+++ b/NEWS
@@ -115,6 +115,7 @@ Improvements:
* Don't try to pop the naviframe item multiple times.
* Support language change for widget items (Ctxpopup, Hoversel, Naviframe,
Diskselector, List, Menu, Segment_Control, Toolbar, Popup, MultibuttonEntry)
* Move cursor when mouse moves with longpress.
+ * Show magnifier when selection handlers are pressed or moved.
Fixes:
* Now elm_datetime_field_limit_set() can set year limits wihtout problems.
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 9991a6d..fdd76d2 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1465,6 +1465,56 @@ _long_press_cb(void *data)
}
static void
+_entry_handler_move_start_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ ELM_ENTRY_DATA_GET(data, sd);
+ Evas_Coord x, y, cx, cy, ch;
+
+ evas_object_geometry_get(sd->entry_edje, &x, &y, NULL, NULL);
+ edje_object_part_text_cursor_geometry_get(sd->entry_edje,
+ "elm.text",
+ &cx, &cy, NULL, &ch);
+ if (_elm_config->magnifier_enable)
+ {
+ _magnifier_create(data);
+ _magnifier_show(data);
+ _magnifier_move(data, x + cx, y + cy + ch/2);
+ }
+}
+
+static void
+_entry_handler_move_end_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ if (_elm_config->magnifier_enable)
+ _magnifier_hide(data);
+ if (!_elm_config->desktop_entry)
+ _menu_call(data);
+}
+
+static void
+_entry_handler_moving_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ ELM_ENTRY_DATA_GET(data, sd);
+ Evas_Coord x, y, cx, cy, ch;
+
+ evas_object_geometry_get(sd->entry_edje, &x, &y, NULL, NULL);
+ edje_object_part_text_cursor_geometry_get(sd->entry_edje,
+ "elm.text",
+ &cx, &cy, NULL, &ch);
+ if (_elm_config->magnifier_enable)
+ _magnifier_move(data, x + cx, y + cy + ch/2);
+}
+
+static void
_key_down_cb(void *data,
Evas *evas __UNUSED__,
Evas_Object *obj __UNUSED__,
@@ -3030,6 +3080,15 @@ _elm_entry_smart_add(Eo *obj, void *_pd, va_list *list
EINA_UNUSED)
edje_object_signal_callback_add
(priv->entry_edje, "entry,redo,request", "elm.text",
_entry_redo_request_signal_cb, obj);
+ edje_object_signal_callback_add
+ (priv->entry_edje, "handler,move,start", "elm.text",
+ _entry_handler_move_start_cb, obj);
+ edje_object_signal_callback_add
+ (priv->entry_edje, "handler,move,end", "elm.text",
+ _entry_handler_move_end_cb, obj);
+ edje_object_signal_callback_add
+ (priv->entry_edje, "handler,moving", "elm.text",
+ _entry_handler_moving_cb, obj);
elm_layout_text_set(obj, "elm.text", "");
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev