[4.0] Add ImfManager KeyboardResizedSignalType and LanguageChangedSignalType 47/155947/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 11 Oct 2017 13:11:20 +0000 (22:11 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 16 Oct 2017 13:27:28 +0000 (22:27 +0900)
- The user can get the resolved parameter of ResizedSignal() and
LanguageChangedSignal() in ImfManager.

Change-Id: Icf14e9d294f5120f8342e62d06bc837299d8eba3
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
adaptors/common/virtual-keyboard-impl.h
adaptors/devel-api/adaptor-framework/imf-manager.cpp
adaptors/devel-api/adaptor-framework/imf-manager.h
adaptors/devel-api/adaptor-framework/virtual-keyboard.cpp
adaptors/devel-api/adaptor-framework/virtual-keyboard.h
adaptors/ecore/common/ecore-virtual-keyboard.cpp
adaptors/ecore/wayland/imf-manager-impl-ecore-wl.cpp
adaptors/ecore/wayland/imf-manager-impl.h
adaptors/integration-api/x11/imf-manager-impl.h
adaptors/wayland/input/text/imf/imf-manager-impl.h

index b0bc55b..b5d74d2 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_VIRTUAL_KEYBOARD_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -94,12 +94,12 @@ Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal();
 /**
  * @copydox Dali::VirtualKeyboard::ResizedSignal()
  */
-Dali::VirtualKeyboard::VoidSignalType& ResizedSignal();
+Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal();
 
 /**
  * @copydox Dali::VirtualKeyboard::LanguageChangedSignal()
  */
-Dali::VirtualKeyboard::VoidSignalType& LanguageChangedSignal();
+Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal();
 
 /**
  * @copydoc Dali::VirtualKeyboard::GetTextDirection
index 8571653..faa1041 100755 (executable)
@@ -173,12 +173,12 @@ ImfManager::StatusSignalType& ImfManager::StatusChangedSignal()
   return Internal::Adaptor::ImfManager::GetImplementation(*this).StatusChangedSignal();
 }
 
-ImfManager::VoidSignalType& ImfManager::ResizedSignal()
+ImfManager::KeyboardResizedSignalType& ImfManager::ResizedSignal()
 {
   return Internal::Adaptor::ImfManager::GetImplementation(*this).ResizedSignal();
 }
 
-ImfManager::VoidSignalType& ImfManager::LanguageChangedSignal()
+ImfManager::LanguageChangedSignalType& ImfManager::LanguageChangedSignal()
 {
   return Internal::Adaptor::ImfManager::GetImplementation(*this).LanguageChangedSignal();
 }
index 0efdeac..84b0bd8 100755 (executable)
@@ -164,8 +164,10 @@ public:
   typedef Signal< void (ImfManager&) > ImfManagerSignalType; ///< Keyboard actived signal
   typedef Signal< ImfCallbackData ( ImfManager&, const ImfEventData& ) > ImfEventSignalType; ///< keyboard events
   typedef Signal< void () > VoidSignalType;
-  typedef Signal< void (bool) > StatusSignalType;
-  typedef Signal< void (KeyboardType) > KeyboardTypeSignalType; ///< keyboard type
+  typedef Signal< void ( bool ) > StatusSignalType;
+  typedef Signal< void ( KeyboardType ) > KeyboardTypeSignalType; ///< keyboard type
+  typedef Signal< void ( int ) > KeyboardResizedSignalType;  ///< Keyboard resized signal
+  typedef Signal< void ( int ) > LanguageChangedSignalType;  ///< Language changed signal
 
 public:
 
@@ -380,24 +382,28 @@ public:
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName();
+   *   void YourCallbackName( int resolvedResize );
    * @endcode
+   * The parameter sends the resolved resize defined by the IMF.
+   *
    * User can get changed size by using GetInputMethodArea() in the callback
    * @return The signal to connect to.
    */
-  VoidSignalType& ResizedSignal();
+  KeyboardResizedSignalType& ResizedSignal();
 
   /**
    * @brief Connect to this signal to be notified when the virtual keyboard's language is changed.
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName();
+   *   void YourCallbackName( int resolvedLanguage );
    * @endcode
+   * The parameter sends the resolved language defined by the IMF.
+   *
    * User can get the text direction of the language by calling GetTextDirection() in the callback.
    * @return The signal to connect to.
    */
-  VoidSignalType& LanguageChangedSignal();
+  LanguageChangedSignalType& LanguageChangedSignal();
 
   /**
    * @brief Connect to this signal to be notified when the keyboard type is changed.
index f79d442..905a734 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -82,12 +82,12 @@ StatusSignalType& StatusChangedSignal()
   return Internal::Adaptor::VirtualKeyboard::StatusChangedSignal();
 }
 
-VoidSignalType& ResizedSignal()
+KeyboardResizedSignalType& ResizedSignal()
 {
   return Internal::Adaptor::VirtualKeyboard::ResizedSignal();
 }
 
-VoidSignalType& LanguageChangedSignal()
+LanguageChangedSignalType& LanguageChangedSignal()
 {
   return Internal::Adaptor::VirtualKeyboard::LanguageChangedSignal();
 }
index f0e0a94..cb87cf4 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_VIRTUAL_KEYBOARD_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -45,7 +45,9 @@ namespace VirtualKeyboard
 // Types
 
 typedef Signal< void () > VoidSignalType;
-typedef Signal< void (bool) > StatusSignalType;
+typedef Signal< void ( bool ) > StatusSignalType;
+typedef Signal< void ( int ) > KeyboardResizedSignalType;
+typedef Signal< void ( int ) > LanguageChangedSignalType;
 
 // Enumerations
 
@@ -168,24 +170,28 @@ DALI_IMPORT_API StatusSignalType& StatusChangedSignal();
  *
  * A callback of the following type may be connected:
  * @code
- *   void YourCallbackName();
+ *   void YourCallbackName( int resolvedResize );
  * @endcode
+ * The parameter sends the resolved resize defined by the IMF.
+ *
  * User can get changed size by using GetSizeAndPosition() in the callback
  * @return The signal to connect to.
  */
-DALI_IMPORT_API VoidSignalType& ResizedSignal();
+DALI_IMPORT_API KeyboardResizedSignalType& ResizedSignal();
 
 /**
  * @brief Connect to this signal to be notified when the virtual keyboard's language is changed.
  *
  * A callback of the following type may be connected:
  * @code
- *   void YourCallbackName();
+ *   void YourCallbackName( int resolvedLanguage );
  * @endcode
+ * The parameter sends the resolved language defined by the IMF.
+ *
  * User can get the text direction of the language by calling GetTextDirection() in the callback.
  * @return The signal to connect to.
  */
-DALI_IMPORT_API VoidSignalType& LanguageChangedSignal();
+DALI_IMPORT_API LanguageChangedSignalType& LanguageChangedSignal();
 
 } // namespace VirtualKeyboard
 
index affbda2..ca137c1 100644 (file)
@@ -290,7 +290,7 @@ Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal()
   return imfManager.StatusChangedSignal();
 }
 
-Dali::VirtualKeyboard::VoidSignalType& ResizedSignal()
+Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal()
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ResizedSignal() is deprecated and will be removed from next release. Use ImfManager.ResizedSignal() instead.\n" );
 
@@ -298,7 +298,7 @@ Dali::VirtualKeyboard::VoidSignalType& ResizedSignal()
   return imfManager.ResizedSignal();
 }
 
-Dali::VirtualKeyboard::VoidSignalType& LanguageChangedSignal()
+Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal()
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: LanguageChangedSignal() is deprecated and will be removed from next release. Use ImfManager.LanguageChangedSignal() instead.\n" );
 
index 51694ad..7fd3857 100755 (executable)
@@ -185,7 +185,7 @@ void InputPanelLanguageChangeCallback( void* data, Ecore_IMF_Context* context, i
   }
   ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
   // Emit the signal that the language has changed
-  imfManager->LanguageChangedSignal().Emit();
+  imfManager->LanguageChangedSignal().Emit( value );
 }
 
 void InputPanelGeometryChangedCallback ( void *data, Ecore_IMF_Context *context, int value )
@@ -196,7 +196,7 @@ void InputPanelGeometryChangedCallback ( void *data, Ecore_IMF_Context *context,
   }
   ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
   // Emit signal that the keyboard is resized
-  imfManager->ResizedSignal().Emit();
+  imfManager->ResizedSignal().Emit( value );
 }
 
 void InputPanelKeyboardTypeChangedCallback( void *data, Ecore_IMF_Context *context, int value )
index 3d2d451..623533a 100755 (executable)
@@ -49,6 +49,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
 
@@ -249,12 +251,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -302,8 +304,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
 public:
index f8d456b..1492175 100755 (executable)
@@ -46,6 +46,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
 
@@ -247,12 +249,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -296,8 +298,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
 public:
index 8b4df80..261676d 100755 (executable)
@@ -58,6 +58,8 @@ public:
   typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
   typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
   typedef Dali::ImfManager::KeyboardTypeSignalType ImfKeyboardTypeSignalType;
+  typedef Dali::ImfManager::KeyboardResizedSignalType KeyboardResizedSignalType;
+  typedef Dali::ImfManager::LanguageChangedSignalType LanguageChangedSignalType;
 
 public:
   /**
@@ -240,12 +242,12 @@ public:  // Signals
   /**
    * @copydoc Dali::ImfManager::ResizedSignal()
    */
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  KeyboardResizedSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
 
   /**
    * @copydoc Dali::ImfManager::LanguageChangedSignal()
    */
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+  LanguageChangedSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::KeyboardTypeChangedSignal()
@@ -296,8 +298,8 @@ private:
   ImfManagerSignalType       mActivatedSignal;
   ImfEventSignalType         mEventSignal;
   ImfStatusSignalType        mKeyboardStatusSignal;
-  ImfVoidSignalType          mKeyboardResizeSignal;
-  ImfVoidSignalType          mKeyboardLanguageChangedSignal;
+  KeyboardResizedSignalType  mKeyboardResizeSignal;
+  LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   ImfKeyboardTypeSignalType  mKeyboardTypeChangedSignal;
 
   // Undefined