summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_entry.c61
-rw-r--r--src/lib/elm_entry_eo.h30
-rw-r--r--src/lib/elm_entry_legacy.h24
-rw-r--r--src/lib/elm_widget_entry.h1
6 files changed, 120 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b424df7e8..bafc3661f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1558,3 +1558,7 @@
1558 1558
1559 * Mapbuf: Ensure that content size calculation is correctly finished 1559 * Mapbuf: Ensure that content size calculation is correctly finished
1560 because the mapbuf is willing to block the size calculation forcely. 1560 because the mapbuf is willing to block the size calculation forcely.
1561
15622013-08-14 Jihoon Kim (jihoon)
1563
1564 * Entry: Add elm_entry_input_panel_show_on_demand_set/get().
diff --git a/NEWS b/NEWS
index 7a956701c..8eda4a0da 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,7 @@ Additions:
83 * File Selector : Support elm_object_part_text_set() for the ok, cancel part to change the OK, Cancel button label. 83 * File Selector : Support elm_object_part_text_set() for the ok, cancel part to change the OK, Cancel button label.
84 * Add _elm_access_object_get, deprecate _elm_access_info_get 84 * Add _elm_access_object_get, deprecate _elm_access_info_get
85 * Add elm_win_focus_highlight_animate_set/get(). 85 * Add elm_win_focus_highlight_animate_set/get().
86 * Add elm_entry_input_panel_show_on_demand_set/get().
86 87
87Improvements: 88Improvements:
88 89
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 3bad6f797..e6bd510d4 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -519,6 +519,8 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list)
519 (sd->entry_edje, "elm.text", (Edje_Input_Panel_Return_Key_Type)sd->input_panel_return_key_type); 519 (sd->entry_edje, "elm.text", (Edje_Input_Panel_Return_Key_Type)sd->input_panel_return_key_type);
520 edje_object_part_text_input_panel_return_key_disabled_set 520 edje_object_part_text_input_panel_return_key_disabled_set
521 (sd->entry_edje, "elm.text", sd->input_panel_return_key_disabled); 521 (sd->entry_edje, "elm.text", sd->input_panel_return_key_disabled);
522 edje_object_part_text_input_panel_show_on_demand_set
523 (sd->entry_edje, "elm.text", sd->input_panel_show_on_demand);
522 524
523 if (sd->cursor_pos != 0) 525 if (sd->cursor_pos != 0)
524 elm_entry_cursor_pos_set(obj, sd->cursor_pos); 526 elm_entry_cursor_pos_set(obj, sd->cursor_pos);
@@ -831,7 +833,7 @@ _elm_entry_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
831 { 833 {
832 evas_object_focus_set(sd->entry_edje, EINA_TRUE); 834 evas_object_focus_set(sd->entry_edje, EINA_TRUE);
833 edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm"); 835 edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
834 if (top && top_is_win && sd->input_panel_enable && 836 if (top && top_is_win && sd->input_panel_enable && !sd->input_panel_show_on_demand &&
835 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text")) 837 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
836 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON); 838 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
837 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL); 839 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
@@ -1540,6 +1542,8 @@ _mouse_up_cb(void *data,
1540 void *event_info) 1542 void *event_info)
1541{ 1543{
1542 Evas_Event_Mouse_Up *ev = event_info; 1544 Evas_Event_Mouse_Up *ev = event_info;
1545 Eina_Bool top_is_win = EINA_FALSE;
1546 Evas_Object *top;
1543 1547
1544 ELM_ENTRY_DATA_GET(data, sd); 1548 ELM_ENTRY_DATA_GET(data, sd);
1545 1549
@@ -1552,6 +1556,19 @@ _mouse_up_cb(void *data,
1552 _magnifier_hide(data); 1556 _magnifier_hide(data);
1553 _menu_call(data); 1557 _menu_call(data);
1554 } 1558 }
1559 else
1560 {
1561 top = elm_widget_top_get(data);
1562 if (top)
1563 {
1564 if (!strcmp(evas_object_type_get(top), "elm_win"))
1565 top_is_win = EINA_TRUE;
1566
1567 if (top_is_win && sd->input_panel_enable && sd->input_panel_show_on_demand &&
1568 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
1569 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
1570 }
1571 }
1555 } 1572 }
1556 else if ((ev->button == 3) && (!_elm_config->desktop_entry)) 1573 else if ((ev->button == 3) && (!_elm_config->desktop_entry))
1557 { 1574 {
@@ -5337,6 +5354,44 @@ _input_panel_return_key_autoenabled_set(Eo *obj, void *_pd, va_list *list)
5337 _return_key_enabled_check(obj); 5354 _return_key_enabled_check(obj);
5338} 5355}
5339 5356
5357EAPI void
5358elm_entry_input_panel_show_on_demand_set(Evas_Object *obj,
5359 Eina_Bool ondemand)
5360{
5361 ELM_ENTRY_CHECK(obj);
5362 eo_do(obj, elm_obj_entry_input_panel_show_on_demand_set(ondemand));
5363}
5364
5365static void
5366_input_panel_show_on_demand_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5367{
5368 Eina_Bool ondemand = va_arg(*list, int);
5369 Elm_Entry_Smart_Data *sd = _pd;
5370
5371 sd->input_panel_show_on_demand = ondemand;
5372
5373 edje_object_part_text_input_panel_show_on_demand_set
5374 (sd->entry_edje, "elm.text", ondemand);
5375}
5376
5377EAPI Eina_Bool
5378elm_entry_input_panel_show_on_demand_get(const Evas_Object *obj)
5379{
5380 ELM_ENTRY_CHECK(obj) EINA_FALSE;
5381 Eina_Bool ret = EINA_FALSE;
5382 eo_do((Eo *) obj, elm_obj_entry_input_panel_show_on_demand_get(&ret));
5383 return ret;
5384}
5385
5386static void
5387_input_panel_show_on_demand_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5388{
5389 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5390 Elm_Entry_Smart_Data *sd = _pd;
5391
5392 *ret = sd->input_panel_show_on_demand;
5393}
5394
5340EAPI void * 5395EAPI void *
5341elm_entry_imf_context_get(Evas_Object *obj) 5396elm_entry_imf_context_get(Evas_Object *obj)
5342{ 5397{
@@ -5601,6 +5656,8 @@ _class_constructor(Eo_Class *klass)
5601 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END), _anchor_hover_end), 5656 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END), _anchor_hover_end),
5602 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET), _input_panel_layout_variation_set), 5657 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET), _input_panel_layout_variation_set),
5603 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET), _input_panel_layout_variation_get), 5658 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET), _input_panel_layout_variation_get),
5659 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET), _input_panel_show_on_demand_set),
5660 EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_GET), _input_panel_show_on_demand_get),
5604 EO_OP_FUNC_SENTINEL 5661 EO_OP_FUNC_SENTINEL
5605 }; 5662 };
5606 eo_class_funcs_set(klass, func_desc); 5663 eo_class_funcs_set(klass, func_desc);
@@ -5696,6 +5753,8 @@ static const Eo_Op_Description op_desc[] = {
5696 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END, "Ends the hover popup in the entry."), 5753 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END, "Ends the hover popup in the entry."),
5697 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET, "Set the input panel layout variation of the entry."), 5754 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET, "Set the input panel layout variation of the entry."),
5698 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET, "Get the input panel layout variation of the entry."), 5755 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET, "Get the input panel layout variation of the entry."),
5756 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET, "Set the attribute to show the input panel in case of only an user's explicit Mouse Up event."),
5757 EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_GET, "Get the attribute to show the input panel in case of only an user's explicit Mouse Up event."),
5699 EO_OP_DESCRIPTION_SENTINEL 5758 EO_OP_DESCRIPTION_SENTINEL
5700}; 5759};
5701 5760
diff --git a/src/lib/elm_entry_eo.h b/src/lib/elm_entry_eo.h
index 47fdbd62c..216145ed4 100644
--- a/src/lib/elm_entry_eo.h
+++ b/src/lib/elm_entry_eo.h
@@ -93,6 +93,8 @@ enum
93 ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END, 93 ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END,
94 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET, 94 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET,
95 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET, 95 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET,
96 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET,
97 ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_GET,
96 ELM_OBJ_ENTRY_SUB_ID_LAST 98 ELM_OBJ_ENTRY_SUB_ID_LAST
97}; 99};
98 100
@@ -1240,6 +1242,34 @@ enum
1240#define elm_obj_entry_input_panel_return_key_autoenabled_set(enabled) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_RETURN_KEY_AUTOENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled) 1242#define elm_obj_entry_input_panel_return_key_autoenabled_set(enabled) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_RETURN_KEY_AUTOENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)
1241 1243
1242/** 1244/**
1245 * @def elm_obj_entry_input_panel_show_on_demand_set
1246 * @since 1.8
1247 *
1248 * Set the attribute to show the input panel in case of only an user's explicit Mouse Up event.
1249 *
1250 * @param[in] ondemand
1251 *
1252 * @see elm_entry_input_panel_show_on_demand_set
1253 *
1254 * @ingroup Entry
1255 */
1256#define elm_obj_entry_input_panel_show_on_demand_set(ondemand) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET), EO_TYPECHECK(Eina_Bool, ondemand)
1257
1258/**
1259 * @def elm_obj_entry_input_panel_show_on_demand_get
1260 * @since 1.8
1261 *
1262 * Get the attribute to show the input panel in case of only an user's explicit Mouse Up event.
1263 *
1264 * @param[out] ret
1265 *
1266 * @see elm_entry_input_panel_show_on_demand_get
1267 *
1268 * @ingroup Entry
1269 */
1270#define elm_obj_entry_input_panel_show_on_demand_get(ret) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_GET), EO_TYPECHECK(Eina_Bool *, ret)
1271
1272/**
1243 * @def elm_obj_entry_imf_context_get 1273 * @def elm_obj_entry_imf_context_get
1244 * @since 1.8 1274 * @since 1.8
1245 * 1275 *
diff --git a/src/lib/elm_entry_legacy.h b/src/lib/elm_entry_legacy.h
index 90c626432..24aa4cf8e 100644
--- a/src/lib/elm_entry_legacy.h
+++ b/src/lib/elm_entry_legacy.h
@@ -1170,3 +1170,27 @@ EAPI void elm_entry_input_panel_layout_variation_set(Evas_Obje
1170 * @since 1.8 1170 * @since 1.8
1171 */ 1171 */
1172EAPI int elm_entry_input_panel_layout_variation_get(const Evas_Object *obj); 1172EAPI int elm_entry_input_panel_layout_variation_get(const Evas_Object *obj);
1173
1174/**
1175 * Set the attribute to show the input panel in case of only an user's explicit Mouse Up event.
1176 * It doesn't request to show the input panel even though it has focus.
1177 *
1178 * @param obj The entry object
1179 * @param ondemand If true, the input panel will be shown in case of only Mouse up event.
1180 * (Focus event will be ignored.)
1181 * @since 1.8
1182 *
1183 * @ingroup Entry
1184 */
1185EAPI void elm_entry_input_panel_show_on_demand_set(Evas_Object *obj, Eina_Bool ondemand);
1186
1187/**
1188 * Get the attribute to show the input panel in case of only an user's explicit Mouse Up event.
1189 *
1190 * @param obj The entry object
1191 * @return @c EINA_TRUE if the input panel will be shown in case of only Mouse up event.
1192 * @since 1.8
1193 *
1194 * @ingroup Entry
1195 */
1196EAPI Eina_Bool elm_entry_input_panel_show_on_demand_get(const Evas_Object *obj);
diff --git a/src/lib/elm_widget_entry.h b/src/lib/elm_widget_entry.h
index 4ca6bdf16..2c37e88ef 100644
--- a/src/lib/elm_widget_entry.h
+++ b/src/lib/elm_widget_entry.h
@@ -95,6 +95,7 @@ struct _Elm_Entry_Smart_Data
95 Eina_Bool sel_mode : 1; 95 Eina_Bool sel_mode : 1;
96 Eina_Bool changed : 1; 96 Eina_Bool changed : 1;
97 Eina_Bool scroll : 1; 97 Eina_Bool scroll : 1;
98 Eina_Bool input_panel_show_on_demand : 1;
98}; 99};
99 100
100typedef struct _Elm_Entry_Item_Provider Elm_Entry_Item_Provider; 101typedef struct _Elm_Entry_Item_Provider Elm_Entry_Item_Provider;