ecore-imf: support input panel state callback 68/43068/1 accepted/tizen/mobile/20150708.015542 accepted/tizen/tv/20150708.015557 accepted/tizen/wearable/20150708.015609 submit/tizen/20150707.113118
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 6 Jul 2015 12:56:31 +0000 (21:56 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Jul 2015 01:23:34 +0000 (10:23 +0900)
Change-Id: I32b101c4deec7bb7c53ec97876158298415eb261

src/modules/ecore_imf/wayland/text-client-protocol.h
src/modules/ecore_imf/wayland/wayland_imcontext.c

index bcad325fce566a49b0811f8d11c4e49530948625..f6f42f680e660d00513cbc8d65f8abc3a2260673 100644 (file)
@@ -157,6 +157,15 @@ enum wl_text_input_text_direction
 };
 #endif /* WL_TEXT_INPUT_TEXT_DIRECTION_ENUM */
 
+#ifndef WL_TEXT_INPUT_INPUT_PANEL_STATE_ENUM
+#define WL_TEXT_INPUT_INPUT_PANEL_STATE_ENUM
+enum wl_text_input_input_panel_state
+{
+   WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE = 0,
+   WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW = 1,
+};
+#endif /* WL_TEXT_INPUT_INPUT_PANEL_STATE_ENUM */
+
 /**
  * wl_text_input - text input
  * @enter: enter event
index aebebf2906272dc766f56b5fb154278ebf0e9b0b..a4b8ae6816d435c172f7e6cec5858a334deae1df 100644 (file)
@@ -588,6 +588,25 @@ text_input_input_panel_state(void                 *data EINA_UNUSED,
                              struct wl_text_input *text_input EINA_UNUSED,
                              uint32_t              state EINA_UNUSED)
 {
+    WaylandIMContext *imcontext = (WaylandIMContext *)data;
+    Ecore_IMF_Input_Panel_State ecore_imf_input_panel_state;
+
+    switch (state)
+      {
+       case WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE:
+          ecore_imf_input_panel_state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
+          break;
+       case WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW:
+          ecore_imf_input_panel_state = ECORE_IMF_INPUT_PANEL_STATE_SHOW;
+          break;
+       default:
+          ecore_imf_input_panel_state = (Ecore_IMF_Input_Panel_State)state;
+          break;
+      }
+
+    ecore_imf_context_input_panel_event_callback_call(imcontext->ctx,
+                                                      ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+                                                      ecore_imf_input_panel_state);
 }
 
 static void