ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER
} Ecore_IMF_Autocapital_Type;
+typedef enum
+{
+ ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
+} Ecore_IMF_Input_Panel_Layout;
+
+typedef enum
+{
+ ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
+ ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
+} Ecore_IMF_Input_Panel_Lang;
+
struct _Ecore_IMF_Event_Preedit_Start
{
Ecore_IMF_Context *ctx;
void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
void (*prediction_allow_set)(Ecore_IMF_Context *ctx, Eina_Bool prediction);
void (*autocapital_type_set)(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
+ void (*control_panel_show) (Ecore_IMF_Context *ctx);
+ void (*control_panel_hide) (Ecore_IMF_Context *ctx);
+ void (*input_panel_layout_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
+ Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
+ void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
+ Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
};
struct _Ecore_IMF_Context_Info
EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
EAPI Ecore_IMF_Autocapital_Type ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx);
+EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
+EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
+
+EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
+EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
+EAPI void ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
+EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
+EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
+EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
+
/* The following entry points must be exported by each input method module
*/
ecore_event_add(ECORE_IMF_EVENT_DELETE_SURROUNDING,
ev, _ecore_imf_event_free_delete_surrounding, NULL);
}
+
+/**
+ * Ask the Input Method Context to show the control panel of using Input Method.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_control_panel_show");
+ return;
+ }
+
+ if (ctx->klass->control_panel_show) ctx->klass->control_panel_show(ctx);
+}
+
+/**
+ * Ask the Input Method Context to hide the control panel of using Input Method.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_control_panel_hide");
+ return;
+ }
+
+ if (ctx->klass->control_panel_hide) ctx->klass->control_panel_hide(ctx);
+}
+
+/**
+ * Set the language of the input panel.
+ * This API can be used when you want to show the English keyboard.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param lang the language to be set to the input panel.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_language_set");
+ return;
+ }
+
+ if (ctx->klass->input_panel_language_set) ctx->klass->input_panel_language_set(ctx, lang);
+ ctx->input_panel_lang = lang;
+}
+
+/**
+ * Get the language of the input panel.
+ *
+ * See @ref ecore_imf_context_input_panel_language_set for more details.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Ecore_IMF_Input_Panel_Lang
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Ecore_IMF_Input_Panel_Lang
+ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_language_get");
+ return ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC;
+ }
+
+ return ctx->input_panel_lang;
+}
+
Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
void *retrieve_surrounding_data;
Ecore_IMF_Autocapital_Type autocapital_type;
+ Ecore_IMF_Input_Panel_Layout input_panel_layout;
+ Ecore_IMF_Input_Panel_Lang input_panel_lang;
Eina_Bool allow_prediction : 1;
};