}
callback->on_ise_show(ic, impl->get_screen_rotation_degree(), ise_context);
if (ui) {
+ SclSize portrait;
+ SclSize landscape;
+ ui->get_keyboard_size(&portrait, &landscape);
+ /* If the ime_set_size() API is not called and IME is shown, the app can not receive the keyboard window's geometry from ISF.
+ And the ime_set_size() API is not called unless the IME size changes.
+ */
+ ui->update_keyboard_geometry(portrait, landscape);
ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_SHOW);
- }
+ } else
+ LOGW("Failed to get core UI");
#ifdef WEBSOCKET
g_websocket.on_set_layout(ise_context.layout);
void CSCLCoreImpl::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
{
m_core_ui.set_keyboard_size_hints(portrait, landscape);
+ m_core_ui.update_keyboard_geometry(portrait, landscape);
}
sclwindow CSCLCoreImpl::create_option_window()
m_main_window = SCLWINDOW_INVALID;
m_appid = NULL;
m_display = NULL;
+ m_portrait_size.width = 0;
+ m_portrait_size.height = 0;
+ m_landscape_size.width = 0;
+ m_landscape_size.height = 0;
memset(m_option_window_info, 0x00, sizeof(m_option_window_info));
}
*/
#endif
LOGD("%d %d %d %d", portrait.width, portrait.height, landscape.width, landscape.height);
+
+ m_portrait_size = portrait;
+ m_landscape_size = landscape;
}
void CSCLCoreUIEFL::set_floating_mode(sclboolean floating_mode)
wl_input_panel_surface_set_floating_drag_enabled(wlkb.ips, enabled);
}
+void CSCLCoreUIEFL::update_keyboard_geometry(SclSize portrait, SclSize landscape)
+{
+ Evas_Object *main_window = NATIVE_WINDOW_CAST(m_main_window);
+ Evas_Coord win_w = 0, win_h = 0;
+ elm_win_screen_size_get(main_window, NULL, NULL, &win_w, &win_h);
+ int degree = elm_win_rotation_get(main_window);
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ if (degree == 0 || degree == 180)
+ impl->update_geometry((win_w - portrait.width) / 2, win_h - portrait.height, portrait.width, portrait.height);
+ else
+ impl->update_geometry((win_h - landscape.width) / 2, win_w - landscape.height, landscape.width, landscape.height);
+ }
+}
+
+void CSCLCoreUIEFL::get_keyboard_size(SclSize *portrait, SclSize *landscape)
+{
+ *portrait = m_portrait_size;
+ *landscape = m_landscape_size;
+}
+
static int language_changed_cb(void *event_info, void* data)
{
char clang[_POSIX_PATH_MAX] = {0};
void set_floating_mode(sclboolean floating_mode);
void set_floating_drag_enabled(sclboolean enabled);
+
+ void update_keyboard_geometry(SclSize portrait, SclSize landscape);
+ void get_keyboard_size(SclSize *portrait, SclSize *landscape);
private:
sclboolean m_initialized;
sclwindow m_main_window;
const sclchar *m_appid;
const sclchar *m_display;
+ SclSize m_portrait_size;
+ SclSize m_landscape_size;
OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX];
};
if (m_impl) {
m_impl->set_floating_drag_enabled(enabled);
}
+}
+
+void CSCLCoreUI::update_keyboard_geometry(SclSize portrait, SclSize landscape)
+{
+ if (m_impl) {
+ m_impl->update_keyboard_geometry(portrait, landscape);
+ }
+}
+
+void CSCLCoreUI::get_keyboard_size(SclSize *portrait, SclSize *landscape)
+{
+ if (m_impl) {
+ m_impl->get_keyboard_size(portrait, landscape);
+ }
}
\ No newline at end of file
*/
virtual void set_floating_drag_enabled(sclboolean enabled);
+ /**
+ * @brief Requests to update the keyboard window's geometry
+ */
+ virtual void update_keyboard_geometry(SclSize portrait, SclSize landscape);
+
+ /**
+ * @brief Requests to get the keyboard size
+ */
+ virtual void get_keyboard_size(SclSize *portrait, SclSize *landscape);
+
protected:
std::string m_backend_identifier;