From 7df265a298719be48d35ecd4ac03ee388779e563 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Thu, 1 Sep 2022 14:44:46 +0100 Subject: [PATCH] Remove unnecessary Ecore Virtual Keyboard dependency from Ubuntu X11 profile Change-Id: I43962c1767cd274fdfcfdc55566a362f85433e4d --- dali/internal/input/file.list | 3 +- .../ubuntu-x11/input-method-context-impl-x.cpp | 5 +- .../input/ubuntu-x11/virtual-keyboard-impl-x.cpp | 105 --------------------- 3 files changed, 2 insertions(+), 111 deletions(-) delete mode 100644 dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp diff --git a/dali/internal/input/file.list b/dali/internal/input/file.list index 89f9b93..404abb0 100644 --- a/dali/internal/input/file.list +++ b/dali/internal/input/file.list @@ -19,11 +19,10 @@ SET( adaptor_input_tizen_wayland_src_files # module: input, backend: ubuntu-x11 SET( adaptor_input_ubuntu_x11_src_files - ${adaptor_input_dir}/tizen-wayland/ecore-virtual-keyboard.cpp ${adaptor_input_dir}/ubuntu-x11/input-method-context-factory-x.cpp ${adaptor_input_dir}/ubuntu-x11/input-method-context-impl-x.cpp ${adaptor_input_dir}/ubuntu-x11/key-mapping-x.cpp - ${adaptor_input_dir}/ubuntu-x11/virtual-keyboard-impl-x.cpp + ${adaptor_input_dir}/generic/virtual-keyboard-impl-generic.cpp ) # module: input, backend: libuv-x11 diff --git a/dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp b/dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp index baa721e..3f8abe0 100644 --- a/dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp +++ b/dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -143,7 +142,6 @@ InputMethodContextPtr InputMethodContextX::New(Dali::Actor actor) void InputMethodContextX::Finalize() { DALI_LOG_INFO(gLogFilter, Debug::General, "InputMethodContextX::Finalize\n"); - VirtualKeyboard::DisconnectCallbacks(mIMFContext); DisconnectCallbacks(); DeleteContext(); } @@ -171,7 +169,6 @@ void InputMethodContextX::Initialize() { CreateContext(); ConnectCallbacks(); - VirtualKeyboard::ConnectCallbacks(mIMFContext); } void InputMethodContextX::CreateContext() diff --git a/dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp b/dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp deleted file mode 100644 index 1e01853..0000000 --- a/dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. - * - * 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. - * - */ - -// CLASS HEADER -#include - -// EXTERNAL INCLUDES -#include -#include -#include - -// INTERNAL INCLUDES -#include -#include -#include -#include - -namespace Dali -{ -namespace Internal -{ -namespace Adaptor -{ -namespace VirtualKeyboard -{ -Dali::InputMethod::ButtonAction::Type gButtonActionFunction = Dali::InputMethod::ButtonAction::DEFAULT; - -Ecore_IMF_Input_Panel_Return_Key_Type buttonActionMapping(Dali::InputMethod::ButtonAction::Type buttonAction) -{ - switch(buttonAction) - { - case InputMethod::ButtonAction::DEFAULT: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; - case InputMethod::ButtonAction::DONE: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE; - case InputMethod::ButtonAction::GO: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO; - case InputMethod::ButtonAction::JOIN: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN; - case InputMethod::ButtonAction::LOGIN: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN; - case InputMethod::ButtonAction::NEXT: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT; - case InputMethod::ButtonAction::SEARCH: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH; - case InputMethod::ButtonAction::SEND: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND; - case InputMethod::ButtonAction::SIGNIN: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN; - default: - return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; - } -} - -void RotateTo(int angle) -{ - // Get focus window used by Keyboard and rotate it - Display* display = XOpenDisplay(0); - if(display) - { - ::Window focusWindow; - int revert; - // Get Focus window - XGetInputFocus(display, &focusWindow, &revert); - - ecore_x_window_prop_property_set(static_cast(focusWindow), - ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, - ECORE_X_ATOM_CARDINAL, - 32, - &angle, - 1); - XCloseDisplay(display); - } -} - -void SetReturnKeyType(const InputMethod::ButtonAction::Type type) -{ -} - -Dali::InputMethod::ButtonAction::Type GetReturnKeyType() -{ - return gButtonActionFunction; -} - -} // namespace VirtualKeyboard - -} // namespace Adaptor - -} // namespace Internal - -} // namespace Dali -- 2.7.4