add cursor pos in Ise_Context structure
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 5 Sep 2012 04:57:03 +0000 (13:57 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Oct 2012 11:32:46 +0000 (20:32 +0900)
Change-Id: I977f4a54445fac1018846e0f7be06277873c13d3

ism/extras/efl_immodule/isf_imf_control_ui.cpp
ism/src/ise_context.h

index 539f048..39401a4 100644 (file)
@@ -367,14 +367,20 @@ EAPI void isf_imf_context_input_panel_show (Ecore_IMF_Context* ctx)
     iseContext.caps_mode = caps_mode_check (ctx, EINA_TRUE, EINA_FALSE);
     LOGD (" - caps mode : %d\n", iseContext.caps_mode);
 
+    /* set X Client window ID */
     iseContext.client_window = _client_window_id_get (ctx);
     LOGD (" - client_window : %#x\n", iseContext.client_window);
 
+    /* set the size of imdata */
     ecore_imf_context_input_panel_imdata_get (ctx, (void *)imdata, &iseContext.imdata_size);
 
     LOGD (" - password mode : %d\n", iseContext.password_mode);
     LOGD (" - prediction_allow : %d\n", iseContext.prediction_allow);
 
+    /* set the cursor position of the editable widget */
+    ecore_imf_context_surrounding_get (ctx, NULL, &iseContext.cursor_pos);
+    LOGD (" - cursor position : %d\n", iseContext.cursor_pos);
+
     /* calculate packet size */
     length = sizeof (iseContext);
     length += iseContext.imdata_size;
index 949a66c..3017292 100644 (file)
@@ -38,7 +38,8 @@ typedef struct {
     Eina_Bool password_mode;
     Eina_Bool caps_mode;
     Ecore_X_Window client_window;
-    int reserved[14];
+    int cursor_pos;
+    int reserved[13];
 } Ise_Context;
 
 #endif  /* __ISE_CONTEXT_H */