evas_object_smart_callback_call(data, SIG_UNFOCUSED, NULL);
}
+static void
+_entry_maxlength_reached(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ evas_object_smart_callback_call(data, "maxlength,reached", NULL);
+}
+
/**
* This adds a scrolled entry to @p parent object.
evas_object_smart_callback_add(wd->entry, "longpressed", _entry_longpressed, obj);
evas_object_smart_callback_add(wd->entry, "focused", _entry_focused, obj);
evas_object_smart_callback_add(wd->entry, "unfocused", _entry_unfocused, obj);
+ evas_object_smart_callback_add(wd->entry, "maxlength,reached", _entry_maxlength_reached, obj);
_sizing_eval(obj);
static int _textinput_control_function(void *data,void *input_data)
{
/*calculate character count*/
- Widget_Data *wd = elm_widget_data_get(data);
+ Evas_Object *entry = (Evas_Object *)data;
+ Widget_Data *wd = elm_widget_data_get((Evas_Object *)data);
char buf[10]="\0";
size_t byte_len;
size_t insert_text_len=0;
insert_text_len = strlen(insert_text);
if(remain_bytes<insert_text_len)
{
- evas_object_smart_callback_call(input_data, "maxlength,reached", NULL);
+ evas_object_smart_callback_call(entry, "maxlength,reached", NULL);
return EINA_TRUE;
}
if(byte_len>=wd->max_no_of_bytes)
{
- evas_object_smart_callback_call(input_data, "maxlength,reached", NULL);
+ evas_object_smart_callback_call(entry, "maxlength,reached", NULL);
return EINA_TRUE;
}
}