static int _is_width_over(Evas_Object *obj);
static void _ellipsis_entry_to_width(Evas_Object *obj);
static int _textinput_control_function(void *data,void *input_data);
+static int _entry_length_get(Evas_Object *obj);
#define MIN_ENTRY_FONT_SIZE 8
#define MAX_ENTRY_FONT_SIZE 60
if (!wd->autoreturnkey) return;
if (_entry_length_get(obj) == 0) {
- ecore_imf_context_ise_set_disable_key(ic, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, ECORE_IMF_INPUT_PANEL_KEY_ENTER, EINA_TRUE);
+ ecore_imf_context_input_panel_key_disabled_set(ic, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, ECORE_IMF_INPUT_PANEL_KEY_ENTER, EINA_TRUE);
}
else {
- ecore_imf_context_ise_set_disable_key(ic, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, ECORE_IMF_INPUT_PANEL_KEY_ENTER, EINA_FALSE);
+ ecore_imf_context_input_panel_key_disabled_set(ic, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, ECORE_IMF_INPUT_PANEL_KEY_ENTER, EINA_FALSE);
}
}
return str;
}
-int
+static int
_entry_length_get(Evas_Object *obj)
{
int len;
char *oldstring, *value, *textlocater, *entrystring;
char *string, fontbuf[16];
- if (!wd) return NULL;
+ if (!wd) return;
entrystring = edje_object_part_text_get(wd->ent, "elm.text");
EAPI Ecore_IMF_Context *elm_entry_imf_context_get(Evas_Object *obj)
{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !wd->ent) return NULL;
EAPI void
elm_entry_autoenable_returnkey_set(Evas_Object *obj, Eina_Bool on)
{
- Widget_Data *wd = elm_widget_data_get(obj);
- wd->autoreturnkey = on;
- _check_enable_returnkey(obj);
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ wd->autoreturnkey = on;
+ _check_enable_returnkey(obj);
}
EAPI void
elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Eina_Bool autocap = on;
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (!wd->password)
autocap = EINA_FALSE;
EAPI void
elm_entry_fontsize_set(Evas_Object *obj, const int fontsize)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
char *string, fontvalue[16], *entrystring;
int len;
EAPI void
elm_entry_text_align_set(Evas_Object *obj, char *alignmode)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
char *string, *entrystring;
int len;
EAPI void
elm_entry_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
char *string, *entrystring, colorstring[16];
int len;
EAPI void
elm_entry_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
evas_object_color_set(wd->bg, r, g, b, a);
EAPI void
elm_entry_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
const char *t;
if (wd->ellipsis == ellipsis) return;
EAPI void
elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
{
+ ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
wd->input_panel_enable = enabled;
edje_object_part_text_input_panel_enabled_set(wd->ent, "elm.text", enabled);
}
EAPI void
elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout)
{
- Widget_Data *wd = elm_widget_data_get(obj);
+ ELM_CHECK_WIDTYPE(obj, widtype);
Ecore_IMF_Context *ic = elm_entry_imf_context_get(obj);
if (!ic) return;