} Ecore_IMF_Device_Subclass; /**< A general subclass of device @since 1.14 */
/**
+ * @enum _Ecore_IMF_Input_Panel_Align
+ * @brief Enumeration for defining the types of Ecore_IMF Input Panel align
+ * @since 1.28
+ *
+ * @since_tizen 9.0
+ */
+typedef enum _Ecore_IMF_Input_Panel_Align
+{
+ ECORE_IMF_INPUT_PANEL_ALIGN_TOP_LEFT, /**< The top-left corner */
+ ECORE_IMF_INPUT_PANEL_ALIGN_TOP_CENTER, /**< The top-center position */
+ ECORE_IMF_INPUT_PANEL_ALIGN_TOP_RIGHT, /**< The top-right corner */
+ ECORE_IMF_INPUT_PANEL_ALIGN_MIDDLE_LEFT, /**< The middle-left position */
+ ECORE_IMF_INPUT_PANEL_ALIGN_MIDDLE_CENTER, /**< The middle-center position */
+ ECORE_IMF_INPUT_PANEL_ALIGN_MIDDLE_RIGHT, /**< The middle-right position */
+ ECORE_IMF_INPUT_PANEL_ALIGN_BOTTOM_LEFT, /**< The bottom-left corner */
+ ECORE_IMF_INPUT_PANEL_ALIGN_BOTTOM_CENTER, /**< The bottom-center position */
+ ECORE_IMF_INPUT_PANEL_ALIGN_BOTTOM_RIGHT, /**< The bottom-right corner */
+} Ecore_IMF_Input_Panel_Align;
+
+/**
* @struct _Ecore_IMF_Event_Preedit_Start
* @brief The structure type used with the Preedit_Start Input Method event
*/
void (*prediction_hint_set) (Ecore_IMF_Context *ctx, const char *prediction_hint); /**< Set the prediction hint to the input panel */
void (*mime_type_accept_set) (Ecore_IMF_Context *ctx, const char *mime_type); /**< Set the MIME type to the input panel */
void (*input_panel_position_set) (Ecore_IMF_Context *ctx, int x, int y); /**< Set the position of the input panel */
+ void (*input_panel_position_align_set) (Ecore_IMF_Context *ctx, int x, int y, Ecore_IMF_Input_Panel_Align align); /**< Set the alignment of the input panel */
};
/**
*/
EAPI const Eina_Hash *ecore_imf_context_prediction_hint_hash_get(Ecore_IMF_Context *ctx);
+/**
+ * @internal
+ *
+ * @ingroup Ecore_IMF_Context_Group
+ * @brief Sets the alignment and its x,y coordinates of the input panel.
+ *
+ * Regardless of the rotation degree, the x, y values of the top-left corner on the screen are based on 0, 0.
+ * When the IME size is changed, its size will change according to the set alignment.
+ *
+ * @remarks This API can be used to set the alignment of a floating IME.
+ *
+ * @since 1.28.0
+ *
+ * @param[in] ctx An #Ecore_IMF_Context
+ * @param x The x coordinate of the #Ecore_IMF_Input_Panel_Align value
+ * @param y The y coordinate of the #Ecore_IMF_Input_Panel_Align value
+ * @param align one of the #Ecore_IMF_Input_Panel_Align values specifying the desired alignment
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
+ *
+ * @since_tizen 9.0
+ */
+EAPI Eina_Bool ecore_imf_context_input_panel_position_align_set(Ecore_IMF_Context *ctx, int x, int y, Ecore_IMF_Input_Panel_Align align);
+
/* The following entry points must be exported by each input method module
*/
return ctx->prediction_hint_hash;
}
+
+EAPI Eina_Bool
+ecore_imf_context_input_panel_position_align_set(Ecore_IMF_Context *ctx, int x, int y, Ecore_IMF_Input_Panel_Align align)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_position_align_set");
+ return EINA_FALSE;
+ }
+
+ if (ctx->klass && ctx->klass->input_panel_position_align_set)
+ ctx->klass->input_panel_position_align_set(ctx, x, y, align);
+ else
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}