Remove unnecessary Ecore Virtual Keyboard dependency from Ubuntu X11 profile 52/280652/3
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 1 Sep 2022 13:44:46 +0000 (14:44 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 1 Sep 2022 14:43:05 +0000 (15:43 +0100)
Change-Id: I43962c1767cd274fdfcfdc55566a362f85433e4d

dali/internal/input/file.list
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp [deleted file]

index 89f9b93..404abb0 100644 (file)
@@ -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
index baa721e..3f8abe0 100644 (file)
@@ -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 <dali/internal/input/common/key-impl.h>
 #include <dali/internal/input/common/virtual-keyboard-impl.h>
 #include <dali/internal/input/linux/dali-ecore-imf.h>
-#include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>
 #include <dali/internal/input/ubuntu-x11/dali-ecore-input.h>
 #include <dali/internal/system/common/locale-utils.h>
 #include <dali/internal/system/linux/dali-ecore.h>
@@ -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 (file)
index 1e01853..0000000
+++ /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 <dali/internal/input/common/virtual-keyboard-impl.h>
-
-// EXTERNAL INCLUDES
-#include <X11/Xlib.h>
-#include <dali/integration-api/debug.h>
-#include <algorithm>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-#include <dali/internal/input/ubuntu-x11/input-method-context-impl-x.h>
-#include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/linux/dali-ecore-x.h>
-
-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<Ecore_X_Window>(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