EAPI Ecore_IMF_Context * ecore_imf_context_add(const char *id) { Ecore_IMF_Context *ctx; if (!id) return NULL; ctx = ecore_imf_module_context_create(id); if (!ctx || !ctx->klass) return NULL; if (ctx->klass->add) ctx->klass->add(ctx); /* default use_preedit is EINA_TRUE, so let's make sure it's * set on the immodule */ ecore_imf_context_use_preedit_set(ctx, EINA_TRUE); /* default prediction is EINA_TRUE, so let's make sure it's * set on the immodule */ ecore_imf_context_prediction_allow_set(ctx, EINA_TRUE); /* default autocapital type is SENTENCE type, so let's make sure it's * set on the immodule */ ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE); /* default input panel enabled status is EINA_TRUE, so let's make sure it's * set on the immodule */ ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE); /* default input panel layout type is NORMAL type, so let's make sure it's * set on the immodule */ ecore_imf_context_input_panel_layout_set(ctx, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL); /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's * set on the immodule */ ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL); return ctx; }
/** * Sets whether or not the entry object is in password mode. In password mode, * the entry displays '*' instead of the characters * * @param entry an entry object * @param password_mode 1 to turn on password mode, 0 to turn it off */ EAPI void e_entry_password_set(Evas_Object *entry, int password_mode) { E_Entry_Smart_Data *sd; if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; e_editable_password_set(sd->editable_object, password_mode); #ifdef HAVE_ECORE_IMF if (sd->imf_context) ecore_imf_context_input_mode_set(sd->imf_context, password_mode ? ECORE_IMF_INPUT_MODE_FULL & ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL); #endif }
/** * Create a new Input Method Context defined by the given id. * * @param id The Input Method Context id. * @return A newly allocated Input Method Context; * on failure it returns NULL. * @ingroup Ecore_IMF_Context_Group */ EAPI Ecore_IMF_Context * ecore_imf_context_add(const char *id) { Ecore_IMF_Context *ctx; if (!id) return NULL; ctx = ecore_imf_module_context_create(id); if (!ctx || !ctx->klass) return NULL; if (ctx->klass->add) ctx->klass->add(ctx); /* default use_preedit is EINA_TRUE, so let's make sure it's * set on the immodule */ ecore_imf_context_use_preedit_set(ctx, EINA_TRUE); /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's * set on the immodule */ ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL); return ctx; }