--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include "input_method_setting_win.h"
+
+Evas_Object *im_setting_window_create(const char *name, Eina_Bool allow_rotation, Eina_Bool alpha)
+{
+ Evas_Object *win = elm_win_add(NULL, name, ELM_WIN_BASIC);
+ if (win) {
+ elm_win_title_set(win, name);
+ elm_win_borderless_set(win, EINA_TRUE);
+ elm_win_alpha_set(win, alpha);
+ elm_win_conformant_set(win, EINA_TRUE);
+ elm_win_autodel_set(win, EINA_TRUE);
+ elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+ elm_win_indicator_opacity_set(win, ELM_WIN_INDICATOR_OPAQUE);
+
+ if (allow_rotation) {
+ if (elm_win_wm_rotation_supported_get(win)) {
+ int rots[4] = {0, 90, 180, 270};
+ elm_win_wm_rotation_available_rotations_set(win, rots, 4);
+ }
+ }
+ }
+
+ return win;
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <Elementary.h>
+
+#ifndef __INPUTMETHOD_SETTING_WINDOW_H
+#define __INPUTMETHOD_SETTING_WINDOW_H
+
+Evas_Object *im_setting_window_create(const char *name, Eina_Bool allow_rotation, Eina_Bool alpha);
+
+#endif
SET(SRC_LIST
../common/input_method_setting_genlist.cpp
+ ../common/input_method_setting_win.cpp
../common/ime_info.cpp
input_method_setting_list_ui.cpp
input_method_setting_list.cpp
#include "input_method_setting_list_ui.h"
#include "input_method_setting_list_popup_view.h"
#include "../common/input_method_setting_genlist.h"
+#include "../common/input_method_setting_win.h"
#include "../common/ime_info.h"
#include <string>
static Evas_Object *
im_setting_list_main_window_create(const char *name, int app_type)
{
- Evas_Object *eo = NULL;
- eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
- if (eo) {
- elm_win_title_set(eo, name);
- elm_win_borderless_set(eo, EINA_TRUE);
- elm_win_alpha_set(eo, EINA_FALSE);
- elm_win_conformant_set(eo, EINA_TRUE);
- elm_win_autodel_set(eo, EINA_TRUE);
- elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
- elm_win_indicator_opacity_set(eo, ELM_WIN_INDICATOR_OPAQUE);
-
- if (app_type != APP_TYPE_SETTING_NO_ROTATION) {
- int rots[4] = {0, 90, 180, 270};
- elm_win_wm_rotation_available_rotations_set(eo, rots, 4);
- }
- }
+ Evas_Object *eo = im_setting_window_create(name, app_type == APP_TYPE_SETTING_NO_ROTATION ? EINA_FALSE : EINA_TRUE, EINA_FALSE);
+
return eo;
}
SET(SRC_LIST
../common/input_method_setting_genlist.cpp
+ ../common/input_method_setting_win.cpp
../common/ime_info.cpp
input_method_setting_selector_ui.cpp
input_method_setting_selector.cpp
#include <tzplatform_config.h>
#include <inputmethod_manager.h>
#include "../common/input_method_setting_genlist.h"
+#include "../common/input_method_setting_win.h"
#include "../common/ime_info.h"
#define IM_SETTING_SELECTOR_PACKAGE PACKAGE
static Evas_Object *
im_setting_selector_main_window_create(const char *name)
{
- Evas_Object *eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
- if (eo) {
- Evas *e;
- Ecore_Evas *ee;
- Evas_Coord w = -1, h = -1;
-
- elm_win_title_set(eo, name);
- elm_win_borderless_set(eo, EINA_TRUE);
- elm_win_alpha_set(eo, EINA_TRUE);
- elm_win_conformant_set(eo, EINA_TRUE);
- elm_win_autodel_set(eo, EINA_TRUE);
- elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
- elm_win_indicator_opacity_set(eo, ELM_WIN_INDICATOR_OPAQUE);
-
- if (elm_win_wm_rotation_supported_get(eo)) {
- int rots[4] = {0, 90, 180, 270};
- elm_win_wm_rotation_available_rotations_set(eo, rots, 4);
- }
- e = evas_object_evas_get(eo);
- if (e) {
- ee = ecore_evas_ecore_evas_get(e);
- if (ee) {
- ecore_evas_name_class_set(ee, "SYSTEM_POPUP", "SYSTEM_POPUP");
- }
+ Evas *e;
+ Ecore_Evas *ee;
+ Evas_Coord w = -1, h = -1;
+ Evas_Object *eo = im_setting_window_create(name, EINA_TRUE, EINA_TRUE);
+ e = evas_object_evas_get(eo);
+ if (e) {
+ ee = ecore_evas_ecore_evas_get(e);
+ if (ee) {
+ ecore_evas_name_class_set(ee, "SYSTEM_POPUP", "SYSTEM_POPUP");
}
+ }
- elm_win_screen_size_get(eo, NULL, NULL, &w, &h);
- if (w > 0 && h > 0) {
- evas_object_resize(eo, w, h);
- }
+ elm_win_screen_size_get(eo, NULL, NULL, &w, &h);
+ if (w > 0 && h > 0) {
+ evas_object_resize(eo, w, h);
}
+
return eo;
}