cnpwidgetdata = data;
elm_cbhm_helper_init(obj);
if (elm_entry_cnp_textonly_get(obj))
- elm_cbhm_send_raw_data("show0");
+ elm_cbhm_send_raw_data("show0");
else
- elm_cbhm_send_raw_data("show1");
+ elm_cbhm_send_raw_data("show1");
// end for cbhm
}
fs = elm_finger_size_get();
if ((cy + y) - wd->mgf_height - fs < 0)
- oy = -1 * ((cy + y) - wd->mgf_height - fs);
+ oy = -1 * ((cy + y) - wd->mgf_height - fs);
if (wd->mgf_type == _ENTRY_MAGNIFIER_FIXEDSIZE)
- evas_object_move(wd->mgf_bg, (cx + x + cw/2) + ox, (cy + y) - wd->mgf_height - fs + oy);
+ evas_object_move(wd->mgf_bg, (cx + x + cw/2) + ox, (cy + y) - wd->mgf_height - fs + oy);
else if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
- evas_object_move(wd->mgf_bg, x, (cy + y) - wd->mgf_height - fs + oy);
+ evas_object_move(wd->mgf_bg, x, (cy + y) - wd->mgf_height - fs + oy);
else
- return;
+ return;
evas_object_move(wd->mgf_proxy, (1 - wd->mgf_scale) * cx + x + ox, (1 - wd->mgf_scale) * cy + y - wd->mgf_height/2 - ch/2 - fs + oy);
}
wd->mgf_bg = edje_object_add(evas_object_evas_get(data));
if (wd->mgf_type == _ENTRY_MAGNIFIER_FIXEDSIZE)
- _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fixed-size");
+ _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fixed-size");
else if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
- _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fill-width");
+ _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fill-width");
else
- return;
+ return;
wd->mgf_clip = evas_object_rectangle_add(evas_object_evas_get(data));
evas_object_color_set(wd->mgf_clip, 255, 255, 255, 255);
if (key_data) wd->mgf_scale = atof(key_data);
if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
- evas_object_resize(wd->mgf_bg, w, wd->mgf_height);
+ evas_object_resize(wd->mgf_bg, w, wd->mgf_height);
if (wd->scroll)
wd->mgf_proxy = evas_object_image_add(evas_object_evas_get(wd->scroller));
}
text = elm_entry_entry_get(data);
if (text == NULL)
- return;
+ return;
textlen = strlen(text);
if (textlen < wd->matchlist_threshold)
EINA_LIST_FOREACH(wd->match_list, l, str_list)
{
if (wd->matchlist_case_sensitive)
- str_result = strstr(str_list, text);
+ str_result = strstr(str_list, text);
else
- str_result = strcasestr(str_list, text);
+ str_result = strcasestr(str_list, text);
if (str_result)
{
}
}
else
- return;
+ return;
if (textfound)
{
Elm_List_Item *it = (Elm_List_Item *) elm_list_selected_item_get(obj);
Widget_Data *wd = elm_widget_data_get(data);
if ((it == NULL) || (wd == NULL))
- return;
+ return;
const char *text = elm_list_item_label_get(it);
evas_object_smart_callback_call((Evas_Object *)data, "selected", (void *)text);
if (!wd) return;
if (match_list)
- {
- Evas_Coord max_w = 9999, max_h = 9999;
- const char* key_data = NULL;
-
- wd->matchlist_threshold = 1;
- wd->hover = elm_hover_add(elm_widget_parent_get(obj));
- elm_hover_parent_set(wd->hover, elm_widget_parent_get(obj));
- elm_hover_target_set(wd->hover, obj);
- elm_object_style_set(wd->hover, "matchlist");
-
- wd->layout = elm_layout_add(wd->hover);
- elm_layout_theme_set(wd->layout, "entry", "matchlist", "default");
- wd->list = elm_list_add(wd->layout);
- evas_object_size_hint_weight_set(wd->list, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(wd->list, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_list_mode_set(wd->list, ELM_LIST_EXPAND);
- elm_object_style_set(wd->list, "matchlist");
-
- key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_width");
- if (key_data) max_w = atoi(key_data);
- key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_height");
- if (key_data) max_h = atoi(key_data);
-
- elm_list_go(wd->list);
- evas_object_size_hint_max_set(wd->list, max_w, max_h);
- evas_object_smart_callback_add(wd->list, "selected", _matchlist_list_clicked, obj);
- elm_layout_content_set(wd->layout, "elm.swallow.content", wd->list);
- elm_hover_content_set(wd->hover, "bottom", wd->layout);
-
- wd->match_list = match_list;
- }
+ {
+ Evas_Coord max_w = 9999, max_h = 9999;
+ const char* key_data = NULL;
+
+ wd->matchlist_threshold = 1;
+ wd->hover = elm_hover_add(elm_widget_parent_get(obj));
+ elm_hover_parent_set(wd->hover, elm_widget_parent_get(obj));
+ elm_hover_target_set(wd->hover, obj);
+ elm_object_style_set(wd->hover, "matchlist");
+
+ wd->layout = elm_layout_add(wd->hover);
+ elm_layout_theme_set(wd->layout, "entry", "matchlist", "default");
+ wd->list = elm_list_add(wd->layout);
+ evas_object_size_hint_weight_set(wd->list, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(wd->list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_list_mode_set(wd->list, ELM_LIST_EXPAND);
+ elm_object_style_set(wd->list, "matchlist");
+
+ key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_width");
+ if (key_data) max_w = atoi(key_data);
+ key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_height");
+ if (key_data) max_h = atoi(key_data);
+
+ elm_list_go(wd->list);
+ evas_object_size_hint_max_set(wd->list, max_w, max_h);
+ evas_object_smart_callback_add(wd->list, "selected", _matchlist_list_clicked, obj);
+ elm_layout_content_set(wd->layout, "elm.swallow.content", wd->list);
+ elm_hover_content_set(wd->hover, "bottom", wd->layout);
+
+ wd->match_list = match_list;
+ }
else
- {
- if (wd->hover)
- evas_object_del(wd->hover);
+ {
+ if (wd->hover)
+ evas_object_del(wd->hover);
- wd->match_list = NULL;
- }
+ wd->match_list = NULL;
+ }
wd->matchlist_case_sensitive = case_sensitive;
}