+void WindowBaseEcoreWl2::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetPositionSizeWithAngle, angle: %d, x: %d, y: %d, w: %d, h: %d\n", angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+ ecore_wl2_window_rotation_geometry_set(mEcoreWindow, angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+}
+
+void WindowBaseEcoreWl2::InitializeIme()
+{
+ Eina_Iterator* globals;
+ struct wl_registry* registry;
+ Ecore_Wl2_Global* global;
+ Ecore_Wl2_Display* ecoreWl2Display;
+
+ if(!(ecoreWl2Display = ecore_wl2_connected_display_get(NULL)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 connected display\n");
+ return;
+ }
+
+ DALI_LOG_RELEASE_INFO("InitializeIme: Ecore_Wl2_Display: %p, ecore wl window: %p\n", ecoreWl2Display, mEcoreWindow);
+
+ if(!(registry = ecore_wl2_display_registry_get(ecoreWl2Display)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 display registry\n");
+ return;
+ }
+
+ if(!(globals = ecore_wl2_display_globals_get(ecoreWl2Display)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 globals\n");
+ return;
+ }
+
+ EINA_ITERATOR_FOREACH(globals, global)
+ {
+ if(strcmp(global->interface, "wl_input_panel") == 0)
+ {
+ mWlInputPanel = (wl_input_panel*)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
+ }
+ else if(strcmp(global->interface, "wl_output") == 0)
+ {
+ mWlOutput = (wl_output*)wl_registry_bind(registry, global->id, &wl_output_interface, 1);
+ }
+ }
+
+ if(!mWlInputPanel)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel interface\n");
+ return;
+ }
+
+ if(!mWlOutput)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland output panel interface\n");
+ return;
+ }
+
+ mWlInputPanelSurface = wl_input_panel_get_input_panel_surface(mWlInputPanel, mWlSurface);
+ if(!mWlInputPanelSurface)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel surface\n");
+ return;
+ }
+
+ wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
+}
+
+void WindowBaseEcoreWl2::ImeWindowReadyToRender()
+{
+ if(!mWlInputPanelSurface)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::ImeWindowReadyToRender(), wayland input panel surface is null\n");
+ return;
+ }
+
+ wl_input_panel_surface_set_ready(mWlInputPanelSurface, 1);
+}
+