From 7b30c414432019a602c6c0ea4c76e4ad14ad19d7 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 23 Jan 2014 11:02:51 +0900 Subject: [PATCH] ecore_imf: Add selection_set callback type to allow Input Method to select a region of text --- src/lib/ecore_imf/Ecore_IMF.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h index 2d96a22ab0..f4521fba44 100644 --- a/src/lib/ecore_imf/Ecore_IMF.h +++ b/src/lib/ecore_imf/Ecore_IMF.h @@ -107,6 +107,7 @@ typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End; typedef struct _Ecore_IMF_Event_Preedit_Changed Ecore_IMF_Event_Preedit_Changed; typedef struct _Ecore_IMF_Event_Commit Ecore_IMF_Event_Commit; typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding; +typedef struct _Ecore_IMF_Event_Selection Ecore_IMF_Event_Selection; /* Events to filter */ typedef struct _Ecore_IMF_Event_Mouse_Down Ecore_IMF_Event_Mouse_Down; @@ -147,7 +148,8 @@ typedef enum ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. @since 1.2 */ ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. @since 1.2 */ ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user @since 1.2 */ - ECORE_IMF_CALLBACK_DELETE_SURROUNDING /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor @since 1.2 */ + ECORE_IMF_CALLBACK_DELETE_SURROUNDING, /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor @since 1.2 */ + ECORE_IMF_CALLBACK_SELECTION_SET /**< "SELECTION_SET" is called when the input method needs to set the selection @since 1.9 */ } Ecore_IMF_Callback_Type; /** @@ -344,6 +346,13 @@ struct _Ecore_IMF_Event_Delete_Surrounding int n_chars; }; +struct _Ecore_IMF_Event_Selection +{ + Ecore_IMF_Context *ctx; + int start; + int end; +}; + struct _Ecore_IMF_Event_Mouse_Down { int button; /**< The button which has been pressed */