Refractor ImfManager to InputMethodContext 60/166060/26
authorxb.teng <xb.teng@samsung.com>
Fri, 5 Jan 2018 11:39:31 +0000 (19:39 +0800)
committerxb.teng <xb.teng@samsung.com>
Wed, 25 Apr 2018 08:10:19 +0000 (16:10 +0800)
Here are some changes:
1. Add process procedure for text controls
2. Update text-editor/field for refractoring ImfManager

Change-Id: I8928b2a244d64c93e19f0df9d2486262a01ee56f

34 files changed:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit-styling/CMakeLists.txt
automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit-third-party/CMakeLists.txt
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp [deleted file]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp [new file with mode: 0755]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.h [moved from automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.h with 62% similarity, mode: 0755]
automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp [changed mode: 0644->0755]
dali-toolkit/devel-api/controls/control-devel.cpp [changed mode: 0644->0755]
dali-toolkit/devel-api/controls/control-devel.h [changed mode: 0644->0755]
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.cpp [new file with mode: 0755]
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h [changed mode: 0644->0755]
dali-toolkit/devel-api/controls/text-controls/text-field-devel.cpp [new file with mode: 0755]
dali-toolkit/devel-api/controls/text-controls/text-field-devel.h [changed mode: 0644->0755]
dali-toolkit/devel-api/file.list [changed mode: 0644->0755]
dali-toolkit/internal/controls/control/control-data-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/control/control-data-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/text-controls/text-editor-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/text-controls/text-field-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/text/text-controller-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/text/text-controller-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/public-api/controls/control-impl.cpp

index 8b2160f..902b00d 100755 (executable)
@@ -39,7 +39,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 9248151..7768344
@@ -357,8 +357,9 @@ void ConfigureTextLabel( ControllerPtr controller )
   // Set cursor's width to zero.
   controller->GetLayoutEngine().SetCursorWidth( 0 );
 
   // Set cursor's width to zero.
   controller->GetLayoutEngine().SetCursorWidth( 0 );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Disables the text input.
   // Disables the text input.
-  controller->EnableTextInput( NULL );
+  controller->EnableTextInput( NULL, inputMethodContext );
 
   // Disables the vertical scrolling.
   controller->SetVerticalScrollEnabled( false );
 
   // Disables the vertical scrolling.
   controller->SetVerticalScrollEnabled( false );
@@ -382,8 +383,9 @@ void ConfigureTextField( ControllerPtr controller )
   // Set the text layout as multi-line.
   controller->GetLayoutEngine().SetLayout( Layout::Engine::SINGLE_LINE_BOX );
 
   // Set the text layout as multi-line.
   controller->GetLayoutEngine().SetLayout( Layout::Engine::SINGLE_LINE_BOX );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   // Enables the vertical scrolling after the text input has been enabled.
   controller->SetVerticalScrollEnabled( false );
 
   // Enables the vertical scrolling after the text input has been enabled.
   controller->SetVerticalScrollEnabled( false );
@@ -410,8 +412,9 @@ void ConfigureTextEditor( ControllerPtr controller )
   // Set the text layout as multi-line.
   controller->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
 
   // Set the text layout as multi-line.
   controller->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   // Enables the vertical scrolling after the text input has been enabled.
   controller->SetVerticalScrollEnabled( true );
 
   // Enables the vertical scrolling after the text input has been enabled.
   controller->SetVerticalScrollEnabled( true );
old mode 100644 (file)
new mode 100755 (executable)
index ad36607..c87af41
@@ -146,9 +146,9 @@ int UtcDaliTextControllerEnableCursorBlinking(void)
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
-
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   // Enables the cursor blink.
   controller->SetEnableCursorBlink( true );
 
   // Enables the cursor blink.
   controller->SetEnableCursorBlink( true );
@@ -173,7 +173,7 @@ int UtcDaliTextControllerImfEvent(void)
   ControllerPtr controller = Controller::New();
 
   std::string text;
   ControllerPtr controller = Controller::New();
 
   std::string text;
-  ImfManager::ImfEventData imfEvent;
+  InputMethodContext::EventData imfEvent;
 
   DALI_TEST_CHECK( controller );
 
 
   DALI_TEST_CHECK( controller );
 
@@ -182,41 +182,39 @@ int UtcDaliTextControllerImfEvent(void)
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
 
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   // Set the placeholder text.
   controller->SetPlaceholderText( Controller::PLACEHOLDER_TYPE_INACTIVE, "Hello Dali" );
 
 
   // Set the placeholder text.
   controller->SetPlaceholderText( Controller::PLACEHOLDER_TYPE_INACTIVE, "Hello Dali" );
 
-  // Creates an ImfManager.
-  ImfManager imfManager = ImfManager::Get();
-
   // For coverage.
   // For coverage.
-  imfEvent = ImfManager::ImfEventData( ImfManager::GETSURROUNDING, "", 0, 0 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  imfEvent = InputMethodContext::EventData( InputMethodContext::GET_SURROUNDING, "", 0, 0 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   // Send VOID event.
 
   // Send VOID event.
-  imfEvent = ImfManager::ImfEventData( ImfManager::VOID, "", 0, 0 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  imfEvent = InputMethodContext::EventData( InputMethodContext::VOID, "", 0, 0 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   controller->GetText( text );
   DALI_TEST_CHECK( text.empty() );
 
 
   controller->GetText( text );
   DALI_TEST_CHECK( text.empty() );
 
-  imfEvent = ImfManager::ImfEventData( ImfManager::COMMIT, "Hello ", 0, 6 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  imfEvent = InputMethodContext::EventData( InputMethodContext::COMMIT, "Hello ", 0, 6 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
   controller->GetNaturalSize();
 
   // Check 'Delete All' key which means the input panel send a big range
   controller->GetNaturalSize();
 
   // Check 'Delete All' key which means the input panel send a big range
-  imfEvent = ImfManager::ImfEventData( ImfManager::DELETESURROUNDING, "", -100, 100 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  imfEvent = InputMethodContext::EventData( InputMethodContext::DELETE_SURROUNDING, "", -100, 100 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
   controller->GetNaturalSize();
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "", text, TEST_LOCATION );
 
   // Send COMMIT event.
   controller->GetNaturalSize();
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "", text, TEST_LOCATION );
 
   // Send COMMIT event.
-  imfEvent = ImfManager::ImfEventData( ImfManager::COMMIT, "Hello ", 0, 6 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  imfEvent = InputMethodContext::EventData( InputMethodContext::COMMIT, "Hello ", 0, 6 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   // Force to update the model.
   controller->GetNaturalSize();
 
   // Force to update the model.
   controller->GetNaturalSize();
@@ -224,9 +222,9 @@ int UtcDaliTextControllerImfEvent(void)
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
 
-  // Send PREEDIT event
-  imfEvent = ImfManager::ImfEventData( ImfManager::PREEDIT, "w", 6, 1 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  // Send PRE_EDIT event
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   // Force to update the model.
   controller->GetNaturalSize();
 
   // Force to update the model.
   controller->GetNaturalSize();
@@ -234,9 +232,9 @@ int UtcDaliTextControllerImfEvent(void)
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
 
-  // Send DELETESURROUNDING event
-  imfEvent = ImfManager::ImfEventData( ImfManager::DELETESURROUNDING, "", -1, 1 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  // Send DELETE_SURROUNDING event
+  imfEvent = InputMethodContext::EventData( InputMethodContext::DELETE_SURROUNDING, "", -1, 1 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   // Force to update the model.
   controller->GetNaturalSize();
 
   // Force to update the model.
   controller->GetNaturalSize();
@@ -244,9 +242,9 @@ int UtcDaliTextControllerImfEvent(void)
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
 
-  // Send PREEDIT event
-  imfEvent = ImfManager::ImfEventData( ImfManager::PREEDIT, "wo", 6, 2 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  // Send PRE_EDIT event
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "wo", 6, 2 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   // Force to update the model.
   controller->GetNaturalSize();
 
   // Force to update the model.
   controller->GetNaturalSize();
@@ -254,16 +252,16 @@ int UtcDaliTextControllerImfEvent(void)
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
 
-  // Send GETSURROUNDING event
-  imfEvent = ImfManager::ImfEventData( ImfManager::GETSURROUNDING, "", 0, 0 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  // Send GET_SURROUNDING event
+  imfEvent = InputMethodContext::EventData( InputMethodContext::GET_SURROUNDING, "", 0, 0 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
 
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
 
-  // Send PRIVATECOMMAND event
-  imfEvent = ImfManager::ImfEventData( ImfManager::PRIVATECOMMAND, "", 0, 0 );
-  controller->OnImfEvent( imfManager, imfEvent );
+  // Send PRIVATE_COMMAND event
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRIVATE_COMMAND, "", 0, 0 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
 
   controller->GetText( text );
   DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION );
@@ -291,8 +289,9 @@ int UtcDaliTextControllerTextPopupButtonTouched(void)
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
 
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
                                                        *controller );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   // Creates the text's popup.
   TextSelectionPopupCallbackInterface& callbackInterface = *controller;
 
   // Creates the text's popup.
   TextSelectionPopupCallbackInterface& callbackInterface = *controller;
@@ -479,8 +478,9 @@ int UtcDaliTextControllerSetGetCheckProperty(void)
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller, *controller );
 
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller, *controller );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   DALI_TEST_CHECK( !controller->IsInputModePassword() );
 
 
   DALI_TEST_CHECK( !controller->IsInputModePassword() );
 
@@ -523,8 +523,9 @@ int UtcDaliTextControllerSetGetTapLongPressAction(void)
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller, *controller );
 
   // Creates a decorator.
   Text::DecoratorPtr decorator = Text::Decorator::New( *controller, *controller );
 
+  InputMethodContext inputMethodContext = InputMethodContext::New();
   // Enables the text input.
   // Enables the text input.
-  controller->EnableTextInput( decorator );
+  controller->EnableTextInput( decorator, inputMethodContext );
 
   DALI_TEST_EQUALS( Controller::NoTextTap::NO_ACTION, controller->GetNoTextDoubleTapAction(), TEST_LOCATION );
   controller->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
 
   DALI_TEST_EQUALS( Controller::NoTextTap::NO_ACTION, controller->GetNoTextDoubleTapAction(), TEST_LOCATION );
   controller->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
index 51f2551..6b38451 100644 (file)
@@ -22,7 +22,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-feedback-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-file-loader.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-feedback-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-file-loader.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-native-image-source.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-native-image-source.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 5ec1f9f..591ec8f
@@ -1348,7 +1348,7 @@ int UtcDaliStyleManagerConfigSectionTest(void)
 
   Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
 
 
   Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
 
-  application.ProcessEvent( Integration::KeyEvent( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( Integration::KeyEvent( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", "", Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
index 9417822..43c4be3 100644 (file)
@@ -18,7 +18,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
index 4def66d..c754d35 100755 (executable)
@@ -76,7 +76,7 @@ LIST(APPEND TC_SOURCES
    dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    dali-toolkit-test-utils/toolkit-environment-variable.cpp
    dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
    dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    dali-toolkit-test-utils/toolkit-environment-variable.cpp
-   dali-toolkit-test-utils/toolkit-imf-manager.cpp
+   dali-toolkit-test-utils/toolkit-input-method-context.cpp
    dali-toolkit-test-utils/toolkit-orientation.cpp
    dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    dali-toolkit-test-utils/toolkit-style-monitor.cpp
    dali-toolkit-test-utils/toolkit-orientation.cpp
    dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
    dali-toolkit-test-utils/toolkit-style-monitor.cpp
index 50a5828..32dac4b 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali-test-suite-utils.h>
 #include "toolkit-test-application.h"
 #include "toolkit-application.h"
 #include <dali-test-suite-utils.h>
 #include "toolkit-test-application.h"
 #include "toolkit-application.h"
-#include "toolkit-imf-manager.h"
+#include "toolkit-input-method-context.h"
 #include "toolkit-clipboard-event-notifier.h"
 
 #endif // __DALI_TOOLKIT_TEST_SUITE_UTILS_H__
 #include "toolkit-clipboard-event-notifier.h"
 
 #endif // __DALI_TOOLKIT_TEST_SUITE_UTILS_H__
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.cpp
deleted file mode 100644 (file)
index edb97ba..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (c) 2014 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 "toolkit-imf-manager.h"
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
-#include <dali/integration-api/debug.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-class RenderSurface;
-
-
-class ImfManager : public Dali::BaseObject
-{
-public:
-  typedef Dali::ImfManager::ImfManagerSignalType ImfManagerSignalType;
-  typedef Dali::ImfManager::ImfEventSignalType ImfEventSignalType;
-  typedef Dali::ImfManager::StatusSignalType ImfStatusSignalType;
-  typedef Dali::ImfManager::VoidSignalType ImfVoidSignalType;
-
-public:
-  static Dali::ImfManager Get();
-
-  ImfManager( /* Ecore_X_Window ecoreXwin */ );
-  void ConnectCallbacks();
-  void DisconnectCallbacks();
-  void Activate();
-  void Deactivate();
-  void Reset();
-
-  bool RestoreAfterFocusLost() const;
-  void SetRestoreAfterFocusLost( bool toggle );
-  void NotifyCursorPosition();
-  void SetCursorPosition( unsigned int cursorPosition );
-  unsigned int GetCursorPosition() const;
-  void SetSurroundingText( const std::string& text );
-  const std::string& GetSurroundingText() const;
-  void ApplyOptions( const InputMethodOptions& options );
-
-public:  // Signals
-  ImfManagerSignalType& ActivatedSignal() { return mActivatedSignal; }
-  ImfEventSignalType& EventReceivedSignal() { return mEventSignal; }
-  ImfStatusSignalType& StatusChangedSignal() { return mKeyboardStatusSignal; }
-  ImfVoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
-  ImfVoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
-
-protected:
-  virtual ~ImfManager();
-
-private:
-  void CreateContext( /*Ecore_X_Window ecoreXwin*/ );
-  void DeleteContext();
-
-private:
-  // Undefined
-  ImfManager( const ImfManager& );
-  ImfManager& operator=( ImfManager& );
-
-private:
-  int mIMFCursorPosition;
-  std::string mSurroundingText;
-  bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.
-  bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.
-  InputMethodOptions        mOptions;
-
-  ImfManagerSignalType      mActivatedSignal;
-  ImfEventSignalType        mEventSignal;
-  ImfStatusSignalType       mKeyboardStatusSignal;
-  ImfVoidSignalType         mKeyboardResizeSignal;
-  ImfVoidSignalType         mKeyboardLanguageChangedSignal;
-
-  static Dali::ImfManager mToolkitImfManager;
-
-public:
-
-inline static Internal::Adaptor::ImfManager& GetImplementation(Dali::ImfManager& imfManager)
-{
-  Dali::ImfManager actualImfManager = ImfManager::Get();
-
-  BaseObject& handle = actualImfManager.GetBaseObject();
-  return static_cast<Internal::Adaptor::ImfManager&>(handle);
-}
-
-inline static const  Internal::Adaptor::ImfManager& GetImplementation(const Dali::ImfManager& imfManager)
-{
-  Dali::ImfManager actualImfManager = ImfManager::Get();
-
-  const BaseObject& handle = imfManager.GetBaseObject();
-  return static_cast<const Internal::Adaptor::ImfManager&>(handle);
-}
-
-};
-
-Dali::ImfManager Dali::Internal::Adaptor::ImfManager::mToolkitImfManager;
-
-Dali::ImfManager ImfManager::Get()
-{
-  Dali::ImfManager manager;
-
-  if( ! mToolkitImfManager )
-  {
-    mToolkitImfManager = Dali::ImfManager( new Dali::Internal::Adaptor::ImfManager() );
-  }
-  return mToolkitImfManager;
-}
-
-ImfManager::ImfManager( /*Ecore_X_Window ecoreXwin*/ )
-: mIMFCursorPosition( 0 ),
-  mSurroundingText(),
-  mRestoreAfterFocusLost( false ),
-  mIdleCallbackConnected( false )
-{
-  CreateContext( /*ecoreXwin*/ );
-  ConnectCallbacks();
-}
-
-ImfManager::~ImfManager()
-{
-  DisconnectCallbacks();
-  DeleteContext();
-}
-
-void ImfManager::CreateContext( /*Ecore_X_Window ecoreXwin*/ )
-{
-}
-
-void ImfManager::DeleteContext()
-{
-}
-
-// Callbacks for predicitive text support.
-void ImfManager::ConnectCallbacks()
-{
-}
-
-void ImfManager::DisconnectCallbacks()
-{
-}
-
-void ImfManager::Activate()
-{
-}
-
-void ImfManager::Deactivate()
-{
-}
-
-void ImfManager::Reset()
-{
-}
-
-bool ImfManager::RestoreAfterFocusLost() const
-{
-  return mRestoreAfterFocusLost;
-}
-
-void ImfManager::SetRestoreAfterFocusLost( bool toggle )
-{
-  mRestoreAfterFocusLost = toggle;
-}
-
-void ImfManager::NotifyCursorPosition()
-{
-}
-
-void ImfManager::SetCursorPosition( unsigned int cursorPosition )
-{
-  mIMFCursorPosition = static_cast< int >( cursorPosition );
-}
-
-unsigned int ImfManager::GetCursorPosition() const
-{
-  return static_cast<unsigned int>( mIMFCursorPosition );
-}
-
-void ImfManager::SetSurroundingText( const std::string& text )
-{
-  mSurroundingText = text;
-}
-
-const std::string& ImfManager::GetSurroundingText() const
-{
-  return mSurroundingText;
-}
-
-void ImfManager::ApplyOptions( const InputMethodOptions& options )
-{
-}
-
-} // Adaptor
-
-} // Internal
-
-
-/********************************************************************************/
-/*********************************  PUBLIC CLASS  *******************************/
-/********************************************************************************/
-
-ImfManager::ImfManager()
-{
-}
-
-ImfManager::~ImfManager()
-{
-}
-
-ImfManager ImfManager::Get()
-{
-  return Internal::Adaptor::ImfManager::Get();
-}
-
-void ImfManager::Activate()
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).Activate();
-}
-
-void ImfManager::Deactivate()
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).Deactivate();
-}
-
-bool ImfManager::RestoreAfterFocusLost() const
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).RestoreAfterFocusLost();
-}
-
-void ImfManager::SetRestoreAfterFocusLost( bool toggle )
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).SetRestoreAfterFocusLost( toggle );
-}
-
-void ImfManager::Reset()
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).Reset();
-}
-
-void ImfManager::NotifyCursorPosition()
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).NotifyCursorPosition();
-}
-
-void ImfManager::SetCursorPosition( unsigned int SetCursorPosition )
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).SetCursorPosition( SetCursorPosition );
-}
-
-unsigned int ImfManager::GetCursorPosition() const
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).GetCursorPosition();
-}
-
-void ImfManager::SetSurroundingText( const std::string& text )
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).SetSurroundingText( text );
-}
-
-const std::string& ImfManager::GetSurroundingText() const
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).GetSurroundingText();
-}
-
-void ImfManager::NotifyTextInputMultiLine( bool multiLine )
-{
-}
-
-void ImfManager::ApplyOptions( const InputMethodOptions& options )
-{
-  Internal::Adaptor::ImfManager::GetImplementation(*this).ApplyOptions( options );
-}
-
-ImfManager::ImfManagerSignalType& ImfManager::ActivatedSignal()
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).ActivatedSignal();
-}
-
-ImfManager::ImfEventSignalType& ImfManager::EventReceivedSignal()
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).EventReceivedSignal();
-}
-
-ImfManager::StatusSignalType& ImfManager::StatusChangedSignal()
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).StatusChangedSignal();
-}
-
-ImfManager::VoidSignalType& ImfManager::ResizedSignal()
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).ResizedSignal();
-}
-
-ImfManager::VoidSignalType& ImfManager::LanguageChangedSignal()
-{
-  return Internal::Adaptor::ImfManager::GetImplementation(*this).LanguageChangedSignal();
-}
-
-ImfManager::ImfManager(Internal::Adaptor::ImfManager *impl)
-  : BaseHandle(impl)
-{
-}
-
-} // namespace Dali
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
new file mode 100755 (executable)
index 0000000..775c0c0
--- /dev/null
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2018 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 "toolkit-input-method-context.h"
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/base-object.h>
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+class RenderSurface;
+
+
+class InputMethodContext : public Dali::BaseObject
+{
+public:
+  typedef Dali::InputMethodContext::ActivatedSignalType ActivatedSignalType;
+  typedef Dali::InputMethodContext::KeyboardEventSignalType KeyboardEventSignalType;
+  typedef Dali::InputMethodContext::StatusSignalType StatusSignalType;
+  typedef Dali::InputMethodContext::VoidSignalType VoidSignalType;
+
+public:
+  static Dali::InputMethodContext New();
+
+  InputMethodContext( /* Ecore_X_Window ecoreXwin */ );
+  void Finalize();
+  void ConnectCallbacks();
+  void DisconnectCallbacks();
+  void Activate();
+  void Deactivate();
+  void Reset();
+
+  bool RestoreAfterFocusLost() const;
+  void SetRestoreAfterFocusLost( bool toggle );
+  void NotifyCursorPosition();
+  void SetCursorPosition( unsigned int cursorPosition );
+  unsigned int GetCursorPosition() const;
+  void SetSurroundingText( const std::string& text );
+  const std::string& GetSurroundingText() const;
+  void ApplyOptions( const InputMethodOptions& options );
+  bool FilterEventKey( const Dali::KeyEvent& keyEvent );
+
+public:  // Signals
+  ActivatedSignalType& ActivatedSignal() { return mActivatedSignal; }
+  KeyboardEventSignalType& EventReceivedSignal() { return mEventSignal; }
+  StatusSignalType& StatusChangedSignal() { return mKeyboardStatusSignal; }
+  VoidSignalType& ResizedSignal() { return mKeyboardResizeSignal; }
+  VoidSignalType& LanguageChangedSignal() { return mKeyboardLanguageChangedSignal; }
+
+protected:
+  virtual ~InputMethodContext();
+
+private:
+  void CreateContext( /*Ecore_X_Window ecoreXwin*/ );
+  void DeleteContext();
+
+private:
+  // Undefined
+  InputMethodContext( const InputMethodContext& );
+  InputMethodContext& operator=( InputMethodContext& );
+
+private:
+  int mIMFCursorPosition;
+  std::string mSurroundingText;
+  bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.
+  bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.
+  InputMethodOptions        mOptions;
+
+  ActivatedSignalType      mActivatedSignal;
+  KeyboardEventSignalType  mEventSignal;
+  StatusSignalType         mKeyboardStatusSignal;
+  VoidSignalType           mKeyboardResizeSignal;
+  VoidSignalType           mKeyboardLanguageChangedSignal;
+
+  static Dali::InputMethodContext mToolkitInputMethodContext;
+
+public:
+
+inline static Internal::Adaptor::InputMethodContext& GetImplementation(Dali::InputMethodContext& inputMethodContext)
+{
+  BaseObject& handle = inputMethodContext.GetBaseObject();
+  return static_cast<Internal::Adaptor::InputMethodContext&>(handle);
+}
+
+inline static const  Internal::Adaptor::InputMethodContext& GetImplementation(const Dali::InputMethodContext& inputMethodContext)
+{
+  const BaseObject& handle = inputMethodContext.GetBaseObject();
+  return static_cast<const Internal::Adaptor::InputMethodContext&>(handle);
+}
+
+};
+
+Dali::InputMethodContext Dali::Internal::Adaptor::InputMethodContext::mToolkitInputMethodContext;
+
+Dali::InputMethodContext InputMethodContext::New()
+{
+  if( ! mToolkitInputMethodContext )
+  {
+    mToolkitInputMethodContext = Dali::InputMethodContext( new Dali::Internal::Adaptor::InputMethodContext() );
+  }
+  return mToolkitInputMethodContext;
+}
+
+InputMethodContext::InputMethodContext( /*Ecore_X_Window ecoreXwin*/ )
+: mIMFCursorPosition( 0 ),
+  mSurroundingText(),
+  mRestoreAfterFocusLost( false ),
+  mIdleCallbackConnected( false )
+{
+  CreateContext( /*ecoreXwin*/ );
+  ConnectCallbacks();
+}
+
+InputMethodContext::~InputMethodContext()
+{
+  DisconnectCallbacks();
+  DeleteContext();
+}
+
+void InputMethodContext::Finalize()
+{
+}
+
+void InputMethodContext::CreateContext( /*Ecore_X_Window ecoreXwin*/ )
+{
+}
+
+void InputMethodContext::DeleteContext()
+{
+}
+
+// Callbacks for predicitive text support.
+void InputMethodContext::ConnectCallbacks()
+{
+}
+
+void InputMethodContext::DisconnectCallbacks()
+{
+}
+
+void InputMethodContext::Activate()
+{
+}
+
+void InputMethodContext::Deactivate()
+{
+}
+
+void InputMethodContext::Reset()
+{
+}
+
+bool InputMethodContext::RestoreAfterFocusLost() const
+{
+  return mRestoreAfterFocusLost;
+}
+
+void InputMethodContext::SetRestoreAfterFocusLost( bool toggle )
+{
+  mRestoreAfterFocusLost = toggle;
+}
+
+void InputMethodContext::NotifyCursorPosition()
+{
+}
+
+void InputMethodContext::SetCursorPosition( unsigned int cursorPosition )
+{
+  mIMFCursorPosition = static_cast< int >( cursorPosition );
+}
+
+unsigned int InputMethodContext::GetCursorPosition() const
+{
+  return static_cast<unsigned int>( mIMFCursorPosition );
+}
+
+void InputMethodContext::SetSurroundingText( const std::string& text )
+{
+  mSurroundingText = text;
+}
+
+const std::string& InputMethodContext::GetSurroundingText() const
+{
+  return mSurroundingText;
+}
+
+void InputMethodContext::ApplyOptions( const InputMethodOptions& options )
+{
+}
+
+bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
+{
+  return false;
+}
+} // Adaptor
+
+} // Internal
+
+
+/********************************************************************************/
+/*********************************  PUBLIC CLASS  *******************************/
+/********************************************************************************/
+
+InputMethodContext::InputMethodContext()
+{
+}
+
+InputMethodContext::~InputMethodContext()
+{
+}
+
+InputMethodContext InputMethodContext::New()
+{
+  return Internal::Adaptor::InputMethodContext::New();
+}
+
+void InputMethodContext::Finalize()
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).Finalize();
+}
+
+void InputMethodContext::Activate()
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).Activate();
+}
+
+void InputMethodContext::Deactivate()
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).Deactivate();
+}
+
+bool InputMethodContext::RestoreAfterFocusLost() const
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).RestoreAfterFocusLost();
+}
+
+void InputMethodContext::SetRestoreAfterFocusLost( bool toggle )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetRestoreAfterFocusLost( toggle );
+}
+
+void InputMethodContext::Reset()
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).Reset();
+}
+
+void InputMethodContext::NotifyCursorPosition()
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).NotifyCursorPosition();
+}
+
+void InputMethodContext::SetCursorPosition( unsigned int SetCursorPosition )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetCursorPosition( SetCursorPosition );
+}
+
+unsigned int InputMethodContext::GetCursorPosition() const
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetCursorPosition();
+}
+
+void InputMethodContext::SetSurroundingText( const std::string& text )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetSurroundingText( text );
+}
+
+const std::string& InputMethodContext::GetSurroundingText() const
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetSurroundingText();
+}
+
+void InputMethodContext::NotifyTextInputMultiLine( bool multiLine )
+{
+}
+
+void InputMethodContext::ApplyOptions( const InputMethodOptions& options )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).ApplyOptions( options );
+}
+
+bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent );
+}
+
+InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ActivatedSignal();
+}
+
+InputMethodContext::KeyboardEventSignalType& InputMethodContext::EventReceivedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).EventReceivedSignal();
+}
+
+InputMethodContext::StatusSignalType& InputMethodContext::StatusChangedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).StatusChangedSignal();
+}
+
+InputMethodContext::VoidSignalType& InputMethodContext::ResizedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ResizedSignal();
+}
+
+InputMethodContext::VoidSignalType& InputMethodContext::LanguageChangedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).LanguageChangedSignal();
+}
+
+InputMethodContext::InputMethodContext(Internal::Adaptor::InputMethodContext *impl)
+  : BaseHandle(impl)
+{
+}
+
+} // namespace Dali
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_TOOLKIT_IMF_MANAGER_H__
-#define __DALI_TOOLKIT_TOOLKIT_IMF_MANAGER_H__
+#ifndef __DALI_TOOLKIT_TOOLKIT_INPUT_METHOD_CONTEXT_H__
+#define __DALI_TOOLKIT_TOOLKIT_INPUT_METHOD_CONTEXT_H__
 
 /*
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
  */
 
 // EXTERNAL INCLUDES
-#define __DALI_IMF_MANAGER_H__
+#define __DALI_INPUT_METHOD_CONTEXT_H__
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/devel-api/adaptor-framework/input-method-options.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/devel-api/adaptor-framework/input-method-options.h>
+#include <dali/public-api/events/key-event.h>
 
 namespace Dali DALI_IMPORT_API
 {
 
 namespace Dali DALI_IMPORT_API
 {
@@ -31,41 +32,41 @@ namespace Internal DALI_INTERNAL
 {
 namespace Adaptor
 {
 {
 namespace Adaptor
 {
-class ImfManager;
+class InputMethodContext;
 }
 }
 
 /**
 }
 }
 
 /**
- * @brief The ImfManager class
+ * @brief The InputMethodContext class
  *
  * Specifically manages the ecore input method framework which enables the virtual or hardware keyboards.
  */
  *
  * Specifically manages the ecore input method framework which enables the virtual or hardware keyboards.
  */
-class ImfManager : public BaseHandle
+class InputMethodContext : public BaseHandle
 {
 public:
 
   /**
 {
 public:
 
   /**
-   * @brief Events that are generated by the IMF.
+   * @brief Events that are generated by the input method context.
    */
    */
-  enum ImfEvent
+  enum EventType
   {
     VOID,                ///< No event
   {
     VOID,                ///< No event
-    PREEDIT,             ///< Pre-Edit changed
+    PRE_EDIT,             ///< Pre-Edit changed
     COMMIT,              ///< Commit recieved
     COMMIT,              ///< Commit recieved
-    DELETESURROUNDING,   ///< Event to delete a range of characters from the string
-    GETSURROUNDING,      ///< Event to query string and cursor position
-    PRIVATECOMMAND       ///< Private command sent from the input panel
+    DELETE_SURROUNDING,   ///< Event to delete a range of characters from the string
+    GET_SURROUNDING,      ///< Event to query string and cursor position
+    PRIVATE_COMMAND       ///< Private command sent from the input panel
   };
 
   /**
   };
 
   /**
-   * @brief This structure is used to pass on data from the IMF regarding predictive text.
+   * @brief This structure is used to pass on data from the input method cotext regarding predictive text.
    */
    */
-  struct ImfEventData
+  struct EventData
   {
     /**
      * @brief Default Constructor.
      */
   {
     /**
      * @brief Default Constructor.
      */
-    ImfEventData()
+    EventData()
     : predictiveString(),
       eventName( VOID ),
       cursorOffset( 0 ),
     : predictiveString(),
       eventName( VOID ),
       cursorOffset( 0 ),
@@ -76,12 +77,12 @@ public:
     /**
      * @brief Constructor
      *
     /**
      * @brief Constructor
      *
-     * @param[in] aEventName The name of the event from the IMF.
+     * @param[in] aEventName The name of the event from the input method context.
      * @param[in] aPredictiveString The pre-edit or commit string.
      * @param[in] aCursorOffset Start position from the current cursor position to start deleting characters.
      * @param[in] aNumberOfChars The number of characters to delete from the cursorOffset.
      */
      * @param[in] aPredictiveString The pre-edit or commit string.
      * @param[in] aCursorOffset Start position from the current cursor position to start deleting characters.
      * @param[in] aNumberOfChars The number of characters to delete from the cursorOffset.
      */
-    ImfEventData( ImfEvent aEventName, const std::string& aPredictiveString, int aCursorOffset, int aNumberOfChars )
+    EventData( EventType aEventName, const std::string& aPredictiveString, int aCursorOffset, int aNumberOfChars )
     : predictiveString( aPredictiveString ),
       eventName( aEventName ),
       cursorOffset( aCursorOffset ),
     : predictiveString( aPredictiveString ),
       eventName( aEventName ),
       cursorOffset( aCursorOffset ),
@@ -91,20 +92,20 @@ public:
 
     // Data
     std::string predictiveString; ///< The pre-edit or commit string.
 
     // Data
     std::string predictiveString; ///< The pre-edit or commit string.
-    ImfEvent eventName;           ///< The name of the event from the IMF.
+    EventType eventName;           ///< The name of the event from the input method context.
     int cursorOffset;             ///< Start position from the current cursor position to start deleting characters.
     int numberOfChars;            ///< number of characters to delete from the cursorOffset.
   };
 
   /**
     int cursorOffset;             ///< Start position from the current cursor position to start deleting characters.
     int numberOfChars;            ///< number of characters to delete from the cursorOffset.
   };
 
   /**
-   * @brief Data required by IMF from the callback
+   * @brief Data required by input method context from the callback
    */
    */
-  struct ImfCallbackData
+  struct CallbackData
   {
     /**
      * @brief Constructor
      */
   {
     /**
      * @brief Constructor
      */
-    ImfCallbackData()
+    CallbackData()
     : currentText(),
       cursorPosition( 0 ),
       update( false ),
     : currentText(),
       cursorPosition( 0 ),
       update( false ),
@@ -119,7 +120,7 @@ public:
      * @param[in] aCurrentText current text string
      * @param[in] aPreeditResetRequired flag if preedit reset is required.
      */
      * @param[in] aCurrentText current text string
      * @param[in] aPreeditResetRequired flag if preedit reset is required.
      */
-    ImfCallbackData( bool aUpdate, int aCursorPosition, const std::string& aCurrentText, bool aPreeditResetRequired )
+    CallbackData( bool aUpdate, int aCursorPosition, const std::string& aCurrentText, bool aPreeditResetRequired )
     : currentText( aCurrentText ),
       cursorPosition( aCursorPosition ),
       update( aUpdate ),
     : currentText( aCurrentText ),
       cursorPosition( aCursorPosition ),
       update( aUpdate ),
@@ -133,21 +134,28 @@ public:
     bool preeditResetRequired :1; ///< flag if preedit reset is required.
   };
 
     bool preeditResetRequired :1; ///< flag if preedit reset is required.
   };
 
-  typedef Signal< void (ImfManager&) > ImfManagerSignalType; ///< Keyboard actived signal
-  typedef Signal< ImfCallbackData ( ImfManager&, const ImfEventData& ) > ImfEventSignalType; ///< keyboard events
+  typedef Signal< void (InputMethodContext&) > ActivatedSignalType; ///< Keyboard actived signal
+  typedef Signal< CallbackData ( InputMethodContext&, const EventData& ) > KeyboardEventSignalType; ///< keyboard events
   typedef Signal< void () > VoidSignalType;
   typedef Signal< void (bool) > StatusSignalType;
 
 public:
 
   /**
   typedef Signal< void () > VoidSignalType;
   typedef Signal< void (bool) > StatusSignalType;
 
 public:
 
   /**
-   * @brief Retrieve a handle to the instance of ImfManager.
-   * @return A handle to the ImfManager.
+   * @brief Create a handle to the instance of InputMethodContext.
+   * @return A handle to the InputMethodContext.
    */
    */
-  static ImfManager Get();
+  static InputMethodContext New();
 
   /**
 
   /**
-   * @brief Activate the IMF.
+   * @brief Finalize the InputMethodContext.
+   *
+   * It means that the context will be deleted.
+   */
+  void Finalize();
+
+  /**
+   * @brief Activate the input method context.
    *
    * It means that the text editing is started at somewhere.
    * If the H/W keyboard isn't connected then it will show the virtual keyboard.
    *
    * It means that the text editing is started at somewhere.
    * If the H/W keyboard isn't connected then it will show the virtual keyboard.
@@ -155,7 +163,7 @@ public:
   void Activate();
 
   /**
   void Activate();
 
   /**
-   * @brief Deactivate the IMF.
+   * @brief Deactivate the input method context.
    *
    * It means that the text editing is finished at somewhere.
    */
    *
    * It means that the text editing is finished at somewhere.
    */
@@ -170,54 +178,54 @@ public:
   bool RestoreAfterFocusLost() const;
 
   /**
   bool RestoreAfterFocusLost() const;
 
   /**
-   * @brief Set status whether the IMF has to restore the keyboard after losing focus.
+   * @brief Set status whether the input method context has to restore the keyboard after losing focus.
    *
    * @param[in] toggle True means that keyboard should be restored after focus lost and regained.
    */
   void SetRestoreAfterFocusLost( bool toggle );
 
   /**
    *
    * @param[in] toggle True means that keyboard should be restored after focus lost and regained.
    */
   void SetRestoreAfterFocusLost( bool toggle );
 
   /**
-   * @brief Send message reset the pred-edit state / imf module.
+   * @brief Send message reset the pred-edit state / input method context module.
    *
    * Used to interupt pre-edit state maybe due to a touch input.
    */
   void Reset();
 
   /**
    *
    * Used to interupt pre-edit state maybe due to a touch input.
    */
   void Reset();
 
   /**
-   * @brief Notifies IMF context that the cursor position has changed, required for features like auto-capitalisation.
+   * @brief Notifies ImfContext that the cursor position has changed, required for features like auto-capitalisation.
    */
   void NotifyCursorPosition();
 
   /**
    */
   void NotifyCursorPosition();
 
   /**
-   * @brief Sets cursor position stored in VirtualKeyboard, this is required by the IMF context.
+   * @brief Sets cursor position stored in VirtualKeyboard, this is required by the ImfContext.
    *
    * @param[in] cursorPosition position of cursor
    */
   void SetCursorPosition( unsigned int cursorPosition );
 
   /**
    *
    * @param[in] cursorPosition position of cursor
    */
   void SetCursorPosition( unsigned int cursorPosition );
 
   /**
-   * @brief Gets cursor position stored in VirtualKeyboard, this is required by the IMF context.
+   * @brief Gets cursor position stored in VirtualKeyboard, this is required by the ImfContext.
    *
    * @return current position of cursor
    */
   unsigned int GetCursorPosition() const;
 
   /**
    *
    * @return current position of cursor
    */
   unsigned int GetCursorPosition() const;
 
   /**
-   * @brief Method to store the string required by the IMF, this is used to provide predictive word suggestions.
+   * @brief Method to store the string required by the input method context, this is used to provide predictive word suggestions.
    *
    * @param[in] text The text string surrounding the current cursor point.
    */
   void SetSurroundingText( const std::string& text );
 
   /**
    *
    * @param[in] text The text string surrounding the current cursor point.
    */
   void SetSurroundingText( const std::string& text );
 
   /**
-   * @brief Gets current text string set within the IMF manager, this is used to offer predictive suggestions.
+   * @brief Gets current text string set within the input method context, this is used to offer predictive suggestions.
    *
    * @return current position of cursor
    */
   const std::string& GetSurroundingText() const;
 
   /**
    *
    * @return current position of cursor
    */
   const std::string& GetSurroundingText() const;
 
   /**
-  * @brief Notifies IMF context that text input is set to multi line or not
+  * @brief Notifies ImfContext that text input is set to multi line or not
   */
   void NotifyTextInputMultiLine( bool multiLine );
 
   */
   void NotifyTextInputMultiLine( bool multiLine );
 
@@ -227,6 +235,14 @@ public:
    */
   void ApplyOptions( const InputMethodOptions& options );
 
    */
   void ApplyOptions( const InputMethodOptions& options );
 
+  /**
+   * @brief Process event key down or up, whether filter a key to isf.
+   *
+   * @param[in] keyEvent The event key to be handled.
+   * @return Whether the event key is handled.
+   */
+  bool FilterEventKey( const Dali::KeyEvent& keyEvent );
+
 public:
 
   // Signals
 public:
 
   // Signals
@@ -234,16 +250,16 @@ public:
   /**
    * @brief This is emitted when the virtual keyboard is connected to or the hardware keyboard is activated.
    *
   /**
    * @brief This is emitted when the virtual keyboard is connected to or the hardware keyboard is activated.
    *
-   * @return The IMF Activated signal.
+   * @return The input method context Activated signal.
    */
    */
-  ImfManagerSignalType& ActivatedSignal();
+  ActivatedSignalType& ActivatedSignal();
 
   /**
 
   /**
-   * @brief This is emitted when the IMF manager receives an event from the IMF.
+   * @brief This is emitted when the input method context receives an event.
    *
    * @return The Event signal containing the event data.
    */
    *
    * @return The Event signal containing the event data.
    */
-  ImfEventSignalType& EventReceivedSignal();
+  KeyboardEventSignalType& EventReceivedSignal();
 
   /**
    * @brief Connect to this signal to be notified when the virtual keyboard is shown or hidden.
 
   /**
    * @brief Connect to this signal to be notified when the virtual keyboard is shown or hidden.
@@ -271,23 +287,23 @@ public:
   /**
    * @brief Constructor.
    */
   /**
    * @brief Constructor.
    */
-  ImfManager();
+  InputMethodContext();
 
   /**
    * @brief Destructor
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
 
   /**
    * @brief Destructor
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
-  ~ImfManager();
+  ~InputMethodContext();
 
   /**
 
   /**
-   * @brief This constructor is used by ImfManager::Get().
+   * @brief This constructor is used by InputMethodContext::Get().
    *
    *
-   * @param[in] imfManager A pointer to the imf Manager.
+   * @param[in] inputMethodContext A pointer to the input method context.
    */
    */
-  explicit ImfManager( Internal::Adaptor::ImfManager* imfManager );
+  explicit InputMethodContext( Internal::Adaptor::InputMethodContext* inputMethodContext );
 };
 
 } // namespace Dali
 
 };
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_TOOLKIT_IMF_MANAGER_H__
+#endif // __DALI_TOOLKIT_TOOLKIT_INPUT_METHOD_CONTEXT_H__
old mode 100644 (file)
new mode 100755 (executable)
index f574485..4623958
@@ -250,7 +250,7 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation01(void)
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
-  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", Device::Class::TOUCH, Device::Subclass::NONE );
+  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( callback1.mIsCalled );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( callback1.mIsCalled );
@@ -296,7 +296,7 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation02(void)
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
-  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", Device::Class::TOUCH, Device::Subclass::NONE );
+  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( !callback1.mIsCalled );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( !callback1.mIsCalled );
old mode 100644 (file)
new mode 100755 (executable)
index becbaaa..8b9547a
@@ -865,7 +865,7 @@ int UtcDaliKeyboardFocusManagerSignalFocusedActorActivated(void)
   FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
   manager.FocusedActorEnterKeySignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
 
   FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
   manager.FocusedActorEnterKeySignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
 
-  Integration::KeyEvent returnEvent( "Return", "", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent returnEvent( "Return", "", 0, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
@@ -923,8 +923,8 @@ int UtcDaliKeyboardFocusManagerSignalFocusGroupChanged(void)
   FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
   manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
 
   FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
   manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
 
-  Integration::KeyEvent tabEvent( "Tab", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent shiftTabEvent( "Tab", "", 0, 1, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent tabEvent( "Tab", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent shiftTabEvent( "Tab", "", 0, 1, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
@@ -1063,12 +1063,12 @@ int UtcDaliKeyboardFocusManagerChangeFocusDirectionByKeyEvents(void)
   FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
   manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
 
   FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
   manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
 
-  Integration::KeyEvent leftEvent( "Left", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent rightEvent( "Right", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent upEvent( "Up", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent downEvent( "Down", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent pageUpEvent( "Prior", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
-  Integration::KeyEvent pageDownEvent( "Next", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent leftEvent( "Left", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent rightEvent( "Right", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent upEvent( "Up", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent downEvent( "Down", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent pageUpEvent( "Prior", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent pageDownEvent( "Next", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
old mode 100644 (file)
new mode 100755 (executable)
index 3e50df3..b190b5f
@@ -179,6 +179,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
+                                   const std::string& compose = "",
                                    const std::string& deviceName = "",
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE
                                    const std::string& deviceName = "",
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE
@@ -190,6 +191,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
+                                compose,
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
@@ -1432,7 +1434,7 @@ int UtcDaliPopupOnKeyEvent(void)
 
   popup.SetKeyInputFocus();
 
 
   popup.SetKeyInputFocus();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", Device::Class::TOUCH, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", "", Device::Class::TOUCH, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
old mode 100644 (file)
new mode 100755 (executable)
index a55d637..dd538d4
@@ -217,6 +217,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
+                                   const std::string& compose = "",
                                    const std::string& deviceName = DEFAULT_DEVICE_NAME,
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
                                    const std::string& deviceName = DEFAULT_DEVICE_NAME,
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
@@ -227,6 +228,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
+                                compose,
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
@@ -1012,7 +1014,7 @@ int utcDaliTextEditorTextChangedP(void)
   editor.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
   editor.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
-  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
@@ -1332,7 +1334,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1357,7 +1359,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1373,7 +1375,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1414,7 +1416,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   editor.SetProperty( TextEditor::Property::INPUT_EMBOSS, "emboss" );
   editor.SetProperty( TextEditor::Property::INPUT_OUTLINE, "outline" );
 
   editor.SetProperty( TextEditor::Property::INPUT_EMBOSS, "emboss" );
   editor.SetProperty( TextEditor::Property::INPUT_OUTLINE, "outline" );
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1522,7 +1524,7 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // Add a key event but as the text editor has not the focus it should do nothing.
   application.Render();
 
   // Add a key event but as the text editor has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1539,8 +1541,8 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // Now the text editor has the focus, so it can handle the key events.
   application.Render();
 
   // Now the text editor has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1571,8 +1573,8 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // The second text editor has the focus. It should handle the key events.
   application.Render();
 
   // The second text editor has the focus. It should handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1628,8 +1630,8 @@ int utcDaliTextEditorEvent02(void)
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text editor has the focus, so it can handle the key events.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text editor has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1653,8 +1655,8 @@ int utcDaliTextEditorEvent02(void)
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1664,8 +1666,8 @@ int utcDaliTextEditorEvent02(void)
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1703,8 +1705,8 @@ int utcDaliTextEditorEvent02(void)
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   editor.SetProperty( TextEditor::Property::TEXT, "" );
 
   // Render and notify
   editor.SetProperty( TextEditor::Property::TEXT, "" );
 
   // Render and notify
@@ -1853,8 +1855,8 @@ int utcDaliTextEditorEvent04(void)
   application.Render();
 
   // Move at the end of the text.
   application.Render();
 
   // Move at the end of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1862,8 +1864,8 @@ int utcDaliTextEditorEvent04(void)
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
     // Render and notify
     application.SendNotification();
 
     // Render and notify
     application.SendNotification();
@@ -1871,7 +1873,7 @@ int utcDaliTextEditorEvent04(void)
   }
 
   // Add a character
   }
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1880,8 +1882,8 @@ int utcDaliTextEditorEvent04(void)
   DALI_TEST_EQUALS( "Hello\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Add some key events
   DALI_TEST_EQUALS( "Hello\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Add some key events
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1889,8 +1891,8 @@ int utcDaliTextEditorEvent04(void)
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
     // Render and notify
     application.SendNotification();
 
     // Render and notify
     application.SendNotification();
@@ -1898,7 +1900,7 @@ int utcDaliTextEditorEvent04(void)
   }
 
   // Add a character
   }
 
   // Add a character
-  application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1948,8 +1950,8 @@ int utcDaliTextEditorEvent05(void)
   application.Render();
 
   // Move at the end of the text.
   application.Render();
 
   // Move at the end of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1958,7 +1960,7 @@ int utcDaliTextEditorEvent05(void)
   for( unsigned int index = 0u; index < 10u; ++index )
   {
     // Add a character
   for( unsigned int index = 0u; index < 10u; ++index )
   {
     // Add a character
-    application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
     // Render and notify
     application.SendNotification();
 
     // Render and notify
     application.SendNotification();
@@ -1970,7 +1972,7 @@ int utcDaliTextEditorEvent05(void)
   // Continuous scroll left to increase coverage
   for( unsigned int index = 0u; index < 10u; ++index )
   {
   // Continuous scroll left to increase coverage
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
     // Render and notify
     application.SendNotification();
 
     // Render and notify
     application.SendNotification();
@@ -1983,7 +1985,7 @@ int utcDaliTextEditorEvent05(void)
   DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   // Press Escape to increase coverage
   DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   // Press Escape to increase coverage
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
@@ -2026,7 +2028,7 @@ int utcDaliTextEditorEvent06(void)
   application.Render();
 
   // Move to seconds line of the text.
   application.Render();
 
   // Move to seconds line of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2036,12 +2038,12 @@ int utcDaliTextEditorEvent06(void)
 
 
   // Add  another script characters ( glyph height is defferent )
 
 
   // Add  another script characters ( glyph height is defferent )
-  application.ProcessEvent( GenerateKey( "d", "ㅁ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "d", "ኢ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "ㅁ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "ኢ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "ኢ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Delete characters
 
   // Delete characters
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_EQUALS( layoutHeight, editor.GetHeightForWidth( 100.f ), TEST_LOCATION );
 
 
   DALI_TEST_EQUALS( layoutHeight, editor.GetHeightForWidth( 100.f ), TEST_LOCATION );
 
@@ -2052,31 +2054,31 @@ int utcDaliTextEditorEvent06(void)
   DALI_TEST_EQUALS( "Hello\nworld\nHello world", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // For coverage
   DALI_TEST_EQUALS( "Hello\nworld\nHello world", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // For coverage
-  application.ProcessEvent( GenerateKey( "", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_UP, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
@@ -2117,25 +2119,25 @@ int utcDaliTextEditorEvent07(void)
   application.Render();
 
   // Move to second line of the text.
   application.Render();
 
   // Move to second line of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Select some text in the right of the current cursor position
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Select some text in the right of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Cut the selected text
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Cut the selected text
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, "x", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2144,34 +2146,34 @@ int utcDaliTextEditorEvent07(void)
   DALI_TEST_EQUALS( "Hello\nld\nHello world", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Select some text in the left of the current cursor position
   DALI_TEST_EQUALS( "Hello\nld\nHello world", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Select some text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down,  "",DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Copy the selected text
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Copy the selected text
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Move the cursor to the third line
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Move the cursor to the third line
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Paste the selected text at the current cursor position
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Paste the selected text at the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "v", "v", KEY_V_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "v", "v", KEY_V_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, "v", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2184,18 +2186,18 @@ int utcDaliTextEditorEvent07(void)
   editor.SetProperty( DevelTextEditor::Property::ENABLE_SHIFT_SELECTION, false );
 
   // Test to select some text in the right of the current cursor position
   editor.SetProperty( DevelTextEditor::Property::ENABLE_SHIFT_SELECTION, false );
 
   // Test to select some text in the right of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Cut the selected text
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Cut the selected text
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, "x", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2205,18 +2207,18 @@ int utcDaliTextEditorEvent07(void)
   DALI_TEST_EQUALS( "Hello\nld\nHello lo\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
   DALI_TEST_EQUALS( "Hello\nld\nHello lo\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Copy the selected text
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Copy the selected text
-  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", Dali::DevelKey::DALI_KEY_CONTROL_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, KEY_CONTROL_MODIFIER, 0, Integration::KeyEvent::Down, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2263,54 +2265,54 @@ int utcDaliTextEditorEvent08(void)
 
   // When the left selection handle and the right selection handle are at the same position, the highlight box should be deactivated.
   // Test to select some text in the left of the current cursor position
 
   // When the left selection handle and the right selection handle are at the same position, the highlight box should be deactivated.
   // Test to select some text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to the left selection handle position and the right selection handle position
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to the left selection handle position and the right selection handle position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to select full text in the left of the current cursor position
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to select full text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to release the current full text selection
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to release the current full text selection
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to move the current cursor position correctly
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test to move the current cursor position correctly
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2319,23 +2321,23 @@ int utcDaliTextEditorEvent08(void)
   DALI_TEST_EQUALS( "DdALi", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the right of the current cursor position
   DALI_TEST_EQUALS( "DdALi", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the right of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with right arrow key
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with right arrow key
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2344,25 +2346,25 @@ int utcDaliTextEditorEvent08(void)
   DALI_TEST_EQUALS( "DdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
   DALI_TEST_EQUALS( "DdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with left arrow key
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with left arrow key
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2371,24 +2373,24 @@ int utcDaliTextEditorEvent08(void)
   DALI_TEST_EQUALS( "DcdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the right of the current cursor position
   DALI_TEST_EQUALS( "DcdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the right of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with left arrow key
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with left arrow key
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "x", "x", KEY_X_CODE, 0, 0, Integration::KeyEvent::Down, "x", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2397,24 +2399,24 @@ int utcDaliTextEditorEvent08(void)
   DALI_TEST_EQUALS( "DcxdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
   DALI_TEST_EQUALS( "DcxdALci", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Test to select some text in the left of the current cursor position
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with right arrow key
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Test the cursor position with right arrow key
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "c", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::Down, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2874,3 +2876,14 @@ int UtcDaliTextEditorEnableGrabHandleProperty(void)
 
   END_TEST;
 }
 
   END_TEST;
 }
+
+int UtcDaliTextEditorGetInputMethodContext(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextEditorGetInputMethodContext");
+
+  TextEditor editor = TextEditor::New();
+  DALI_TEST_CHECK( DevelTextEditor::GetInputMethodContext( editor ) );
+
+  END_TEST;
+}
old mode 100644 (file)
new mode 100755 (executable)
index 96f0258..64a5d55
@@ -311,6 +311,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
+                                   const std::string& compose = "",
                                    const std::string& deviceName = DEFAULT_DEVICE_NAME,
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
                                    const std::string& deviceName = DEFAULT_DEVICE_NAME,
                                    const Device::Class::Type& deviceClass = Device::Class::NONE,
                                    const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
@@ -321,6 +322,7 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
+                                compose,
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
                                 deviceName,
                                 deviceClass,
                                 deviceSubclass );
@@ -1068,7 +1070,7 @@ int utcDaliTextFieldTextChangedP(void)
   field.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
   field.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
-  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
@@ -1121,8 +1123,8 @@ int utcDaliTextFieldMaxCharactersReachedP(void)
 
   gMaxCharactersCallBackCalled = false;
 
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( maxLengthReachedSignal );
 
   DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( maxLengthReachedSignal );
@@ -1153,13 +1155,13 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
 
   gMaxCharactersCallBackCalled = false;
 
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
 
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
 
-  application.ProcessEvent( GenerateKey( "Return", "\r", KEY_RETURN_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "Return", "\r", KEY_RETURN_CODE, 0, 0, Integration::KeyEvent::Down, "\r", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
@@ -1476,7 +1478,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1501,7 +1503,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1517,7 +1519,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1624,7 +1626,7 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1641,14 +1643,14 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // Pressing delete key should be fine even if there is no text in TextField.
   application.Render();
 
   // Pressing delete key should be fine even if there is no text in TextField.
-  application.ProcessEvent( GenerateKey( "Delete", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "Delete", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::Down, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1679,8 +1681,8 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // The second text field has the focus. It should handle the key events.
   application.Render();
 
   // The second text field has the focus. It should handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1738,8 +1740,8 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text field has the focus, so it can handle the key events.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1763,8 +1765,8 @@ int utcDaliTextFieldEvent02(void)
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1774,8 +1776,8 @@ int utcDaliTextFieldEvent02(void)
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -1813,8 +1815,8 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   field.SetProperty( TextField::Property::TEXT, "" );
 
   // Render and notify
   field.SetProperty( TextField::Property::TEXT, "" );
 
   // Render and notify
@@ -2230,14 +2232,14 @@ int utcDaliTextFieldEvent09(void)
   Property::Map map;
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_NONE;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   Property::Map map;
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_NONE;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
   map[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
   map[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
@@ -2246,7 +2248,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
     application.SendNotification();
     application.Render();
   }
     application.SendNotification();
     application.Render();
   }
@@ -2256,7 +2258,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
     application.SendNotification();
     application.Render();
   }
     application.SendNotification();
     application.Render();
   }
@@ -2264,16 +2266,16 @@ int utcDaliTextFieldEvent09(void)
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_LAST_CHARACTER;
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 0;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_LAST_CHARACTER;
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 0;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
   application.SendNotification();
   application.Render();
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 100;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 100;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
@@ -2385,7 +2387,7 @@ int utcDaliTextFieldStyleWhilstSelected(void)
   DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
 
   // Press Escape to increase coverage
   DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
 
   // Press Escape to increase coverage
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
@@ -2419,8 +2421,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2437,10 +2439,10 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2449,8 +2451,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
 
   // Generate a Esc key event. The text field should lose the focus.
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2459,8 +2461,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
   // No more text should be introduced
   DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
   // No more text should be introduced
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2525,24 +2527,24 @@ int utcDaliTextFieldSomeSpecialKeys(void)
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
 
   // Render and notify
   application.SendNotification();
@@ -2588,8 +2590,8 @@ int utcDaliTextFieldSizeUpdate(void)
   DALI_TEST_EQUALS( previousHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ) , TEST_LOCATION );
 
   // Add  another script characters ( glyph height is defferent )
   DALI_TEST_EQUALS( previousHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ) , TEST_LOCATION );
 
   // Add  another script characters ( glyph height is defferent )
-  application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
@@ -2820,3 +2822,14 @@ int UtcDaliTextFieldEnableGrabHandleProperty(void)
 
   END_TEST;
 }
 
   END_TEST;
 }
+
+int UtcDaliTextFieldGetInputMethodContext(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldGetInputMethodContext");
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( DevelTextField::GetInputMethodContext( field ) );
+
+  END_TEST;
+}
old mode 100644 (file)
new mode 100755 (executable)
index 116f69a..a9a83dd
@@ -96,6 +96,11 @@ void DoAction( Control& control, Dali::Property::Index visualIndex, Dali::Proper
   controlDataImpl.DoAction( visualIndex, actionId, attributes );
 }
 
   controlDataImpl.DoAction( visualIndex, actionId, attributes );
 }
 
+void SetInputMethodContext( Internal::Control& control, InputMethodContext& inputMethodContext )
+{
+  Internal::Control::Impl::Get( control ).SetInputMethodContext( inputMethodContext );
+}
+
 } // namespace DevelControl
 
 } // namespace Toolkit
 } // namespace DevelControl
 
 } // namespace Toolkit
old mode 100644 (file)
new mode 100755 (executable)
index ae90f4d..1fece4f
@@ -17,6 +17,8 @@
  * limitations under the License.
  *
  */
  * limitations under the License.
  *
  */
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
@@ -241,6 +243,14 @@ DALI_IMPORT_API Dali::Animation CreateTransition( Internal::Control& control, co
  */
 DALI_IMPORT_API void DoAction( Control& control, Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes );
 
  */
 DALI_IMPORT_API void DoAction( Control& control, Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes );
 
+/**
+ * @brief Set input method context.
+ *
+ * @param[in] control The control.
+ * @param[in] inputMethodContext The input method context.
+ */
+DALI_IMPORT_API void SetInputMethodContext( Internal::Control& control, InputMethodContext& inputMethodContext );
+
 } // namespace DevelControl
 
 } // namespace Toolkit
 } // namespace DevelControl
 
 } // namespace Toolkit
diff --git a/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.cpp b/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.cpp
new file mode 100755 (executable)
index 0000000..875e270
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
+#define DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
+#include <dali-toolkit/internal/controls/text-controls/text-editor-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelTextEditor
+{
+
+InputMethodContext GetInputMethodContext( TextEditor textEditor )
+{
+  return GetImpl( textEditor ).GetInputMethodContext();
+}
+
+} // namespace DevelTextEditor
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
old mode 100644 (file)
new mode 100755 (executable)
index 34c1b09..fd2d4bb
@@ -17,6 +17,8 @@
  * limitations under the License.
  *
  */
  * limitations under the License.
  *
  */
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
@@ -113,6 +115,14 @@ namespace Property
 
 } // namespace Property
 
 
 } // namespace Property
 
+/**
+ * @brief Return the input method context of TextEditor.
+ *
+ * @param[in] textEditor The instance of TextEditor.
+ * @return InputMethodContext instance.
+ */
+DALI_IMPORT_API InputMethodContext GetInputMethodContext( TextEditor textEditor );
+
 } // namespace DevelTextEditor
 
 } // namespace Toolkit
 } // namespace DevelTextEditor
 
 } // namespace Toolkit
diff --git a/dali-toolkit/devel-api/controls/text-controls/text-field-devel.cpp b/dali-toolkit/devel-api/controls/text-controls/text-field-devel.cpp
new file mode 100755 (executable)
index 0000000..c73bb5e
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
+#define DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
+#include <dali-toolkit/internal/controls/text-controls/text-field-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelTextField
+{
+
+InputMethodContext GetInputMethodContext( TextField textField )
+{
+  return GetImpl( textField ).GetInputMethodContext();
+}
+
+} // namespace DevelText
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
old mode 100644 (file)
new mode 100755 (executable)
index a5b1df3..5075358
@@ -17,6 +17,8 @@
  * limitations under the License.
  *
  */
  * limitations under the License.
  *
  */
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
@@ -102,6 +104,14 @@ namespace Property
   };
 } // namespace Property
 
   };
 } // namespace Property
 
+/**
+ * @brief Return the input method context of TextField.
+ *
+ * @param[in] textField The instance of TextField.
+ * @return InputMethodContext instance.
+ */
+DALI_IMPORT_API InputMethodContext GetInputMethodContext( TextField textField );
+
 } // namespace DevelText
 
 } // namespace Toolkit
 } // namespace DevelText
 
 } // namespace Toolkit
old mode 100644 (file)
new mode 100755 (executable)
index 03b3b6e..a04fc74
@@ -20,6 +20,8 @@ devel_api_src_files = \
   $(devel_api_src_dir)/controls/popup/popup.cpp \
   $(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \
   $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \
   $(devel_api_src_dir)/controls/popup/popup.cpp \
   $(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \
   $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \
+  $(devel_api_src_dir)/controls/text-controls/text-editor-devel.cpp \
+  $(devel_api_src_dir)/controls/text-controls/text-field-devel.cpp \
   $(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \
   $(devel_api_src_dir)/controls/text-controls/text-selection-toolbar.cpp \
   $(devel_api_src_dir)/controls/tool-bar/tool-bar.cpp \
   $(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \
   $(devel_api_src_dir)/controls/text-controls/text-selection-toolbar.cpp \
   $(devel_api_src_dir)/controls/tool-bar/tool-bar.cpp \
old mode 100644 (file)
new mode 100755 (executable)
index 369c409..af3aac4
@@ -338,7 +338,6 @@ Control::Impl::Impl( Control& controlImpl )
   mIsKeyboardNavigationSupported( false ),
   mIsKeyboardFocusGroup( false )
 {
   mIsKeyboardNavigationSupported( false ),
   mIsKeyboardFocusGroup( false )
 {
-
 }
 
 Control::Impl::~Impl()
 }
 
 Control::Impl::~Impl()
@@ -1392,6 +1391,22 @@ Extents Control::Impl::GetPadding() const
   return mControlImpl.mImpl->mPadding;
 }
 
   return mControlImpl.mImpl->mPadding;
 }
 
+void Control::Impl::SetInputMethodContext( InputMethodContext& inputMethodContext )
+{
+  mInputMethodContext = inputMethodContext;
+}
+
+bool Control::Impl::FilterKeyEvent( const KeyEvent& event )
+{
+  bool consumed ( false );
+
+  if ( mInputMethodContext )
+  {
+    consumed = mInputMethodContext.FilterEventKey( event );
+  }
+  return consumed;
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
 } // namespace Internal
 
 } // namespace Toolkit
old mode 100644 (file)
new mode 100755 (executable)
index ddd7506..a0ff3d1
@@ -300,6 +300,19 @@ public:
    */
   Extents GetPadding() const;
 
    */
   Extents GetPadding() const;
 
+  /**
+   * @brief Set the input method context.
+   * @param[in] inputMethodContext The input method context.
+   */
+  void SetInputMethodContext( InputMethodContext& inputMethodContext );
+
+  /**
+   * @brief Filter an key event.
+   * @param[in] event The key to be filtered.
+   * @return True if the key handled, otherwise false.
+   */
+  bool FilterKeyEvent( const KeyEvent& event );
+
 private:
 
   /**
 private:
 
   /**
@@ -370,6 +383,8 @@ public:
   // Tooltip
   TooltipPtr mTooltip;
 
   // Tooltip
   TooltipPtr mTooltip;
 
+  InputMethodContext mInputMethodContext;
+
   ControlBehaviour mFlags : CONTROL_BEHAVIOUR_FLAG_COUNT;    ///< Flags passed in from constructor.
   bool mIsKeyboardNavigationSupported :1;  ///< Stores whether keyboard navigation is supported by the control.
   bool mIsKeyboardFocusGroup :1;           ///< Stores whether the control is a focus group.
   ControlBehaviour mFlags : CONTROL_BEHAVIOUR_FLAG_COUNT;    ///< Flags passed in from constructor.
   bool mIsKeyboardNavigationSupported :1;  ///< Stores whether keyboard navigation is supported by the control.
   bool mIsKeyboardFocusGroup :1;           ///< Stores whether the control is a focus group.
old mode 100644 (file)
new mode 100755 (executable)
index 20fd25c..80e884a
@@ -44,6 +44,7 @@
 #include <dali-toolkit/internal/text/text-font-style.h>
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/internal/styling/style-manager-impl.h>
 #include <dali-toolkit/internal/text/text-font-style.h>
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/internal/styling/style-manager-impl.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 
 using namespace Dali::Toolkit::Text;
 
 
 using namespace Dali::Toolkit::Text;
 
@@ -1150,6 +1151,11 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
   return value;
 }
 
   return value;
 }
 
+InputMethodContext TextEditor::GetInputMethodContext()
+{
+  return mInputMethodContext;
+}
+
 bool TextEditor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   Dali::BaseHandle handle( object );
 bool TextEditor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   Dali::BaseHandle handle( object );
@@ -1198,10 +1204,12 @@ void TextEditor::OnInitialize()
   mDecorator = Text::Decorator::New( *mController,
                                      *mController );
 
   mDecorator = Text::Decorator::New( *mController,
                                      *mController );
 
+  mInputMethodContext = InputMethodContext::New();
+
   mController->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
 
   // Enables the text input.
   mController->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
 
   // Enables the text input.
-  mController->EnableTextInput( mDecorator );
+  mController->EnableTextInput( mDecorator, mInputMethodContext );
 
   // Enables the vertical scrolling after the text input has been enabled.
   mController->SetVerticalScrollEnabled( true );
 
   // Enables the vertical scrolling after the text input has been enabled.
   mController->SetVerticalScrollEnabled( true );
@@ -1222,8 +1230,6 @@ void TextEditor::OnInitialize()
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
 
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
 
-  mImfManager = ImfManager::Get();
-
   self.TouchSignal().Connect( this, &TextEditor::OnTouched );
 
   // Set BoundingBox to stage size if not already set.
   self.TouchSignal().Connect( this, &TextEditor::OnTouched );
 
   // Set BoundingBox to stage size if not already set.
@@ -1247,6 +1253,8 @@ void TextEditor::OnInitialize()
   self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
   self.OnStageSignal().Connect( this, &TextEditor::OnStageConnect );
 
   self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
   self.OnStageSignal().Connect( this, &TextEditor::OnStageConnect );
 
+  DevelControl::SetInputMethodContext( *this, mInputMethodContext );
+
   // Creates an extra control to be used as stencil buffer.
   mStencil = Control::New();
   mStencil.SetAnchorPoint( AnchorPoint::TOP_LEFT );
   // Creates an extra control to be used as stencil buffer.
   mStencil = Control::New();
   mStencil.SetAnchorPoint( AnchorPoint::TOP_LEFT );
@@ -1434,23 +1442,24 @@ void TextEditor::RenderText( Text::Controller::UpdateTextType updateTextType )
 void TextEditor::OnKeyInputFocusGained()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyInputFocusGained %p\n", mController.Get() );
 void TextEditor::OnKeyInputFocusGained()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyInputFocusGained %p\n", mController.Get() );
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.StatusChangedSignal().Connect( this, &TextEditor::KeyboardStatusChanged );
 
 
-  mImfManager.StatusChangedSignal().Connect( this, &TextEditor::KeyboardStatusChanged );
-
-  mImfManager.EventReceivedSignal().Connect( this, &TextEditor::OnImfEvent );
-
-  // Notify that the text editing start.
-  mImfManager.Activate();
+    mInputMethodContext.EventReceivedSignal().Connect( this, &TextEditor::OnInputMethodContextEvent );
 
 
-  // When window gain lost focus, the imf manager is deactivated. Thus when window gain focus again, the imf manager must be activated.
-  mImfManager.SetRestoreAfterFocusLost( true );
+    // Notify that the text editing start.
+    mInputMethodContext.Activate();
 
 
-   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
+    // When window gain lost focus, the InputMethodContext is deactivated. Thus when window gain focus again, the InputMethodContext must be activated.
+    mInputMethodContext.SetRestoreAfterFocusLost( true );
+  }
+  ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
 
-   if ( notifier )
-   {
-      notifier.ContentSelectedSignal().Connect( this, &TextEditor::OnClipboardTextSelected );
-   }
+  if ( notifier )
+  {
+    notifier.ContentSelectedSignal().Connect( this, &TextEditor::OnClipboardTextSelected );
+  }
 
   mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event
 
 
   mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event
 
@@ -1460,17 +1469,18 @@ void TextEditor::OnKeyInputFocusGained()
 void TextEditor::OnKeyInputFocusLost()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor:OnKeyInputFocusLost %p\n", mController.Get() );
 void TextEditor::OnKeyInputFocusLost()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor:OnKeyInputFocusLost %p\n", mController.Get() );
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.StatusChangedSignal().Disconnect( this, &TextEditor::KeyboardStatusChanged );
 
 
-  mImfManager.StatusChangedSignal().Disconnect( this, &TextEditor::KeyboardStatusChanged );
-
-  // The text editing is finished. Therefore the imf manager don't have restore activation.
-  mImfManager.SetRestoreAfterFocusLost( false );
-
-  // Notify that the text editing finish.
-  mImfManager.Deactivate();
+    // The text editing is finished. Therefore the InputMethodContext don't have restore activation.
+    mInputMethodContext.SetRestoreAfterFocusLost( false );
 
 
-  mImfManager.EventReceivedSignal().Disconnect( this, &TextEditor::OnImfEvent );
+    // Notify that the text editing finish.
+    mInputMethodContext.Deactivate();
 
 
+    mInputMethodContext.EventReceivedSignal().Disconnect( this, &TextEditor::OnInputMethodContextEvent );
+  }
   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
   if ( notifier )
   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
   if ( notifier )
@@ -1486,9 +1496,10 @@ void TextEditor::OnKeyInputFocusLost()
 void TextEditor::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnTap %p\n", mController.Get() );
 void TextEditor::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnTap %p\n", mController.Get() );
-
-  mImfManager.Activate();
-
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.Activate();
+  }
   // Deliver the tap before the focus event to controller; this allows us to detect when focus is gained due to tap-gestures
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   // Deliver the tap before the focus event to controller; this allows us to detect when focus is gained due to tap-gestures
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
@@ -1504,8 +1515,10 @@ void TextEditor::OnPan( const PanGesture& gesture )
 
 void TextEditor::OnLongPress( const LongPressGesture& gesture )
 {
 
 void TextEditor::OnLongPress( const LongPressGesture& gesture )
 {
-  mImfManager.Activate();
-
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.Activate();
+  }
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   mController->LongPressEvent( gesture.state, gesture.localPoint.x - padding.start, gesture.localPoint.y - padding.top );
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   mController->LongPressEvent( gesture.state, gesture.localPoint.x - padding.start, gesture.localPoint.y - padding.top );
@@ -1727,10 +1740,10 @@ void TextEditor::OnStageConnect( Dali::Actor actor )
   }
 }
 
   }
 }
 
-ImfManager::ImfCallbackData TextEditor::OnImfEvent( Dali::ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
+InputMethodContext::CallbackData TextEditor::OnInputMethodContextEvent( Dali::InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent )
 {
 {
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnImfEvent %p eventName %d\n", mController.Get(), imfEvent.eventName );
-  return mController->OnImfEvent( imfManager, imfEvent );
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnInputMethodContextEvent %p eventName %d\n", mController.Get(), inputMethodContextEvent.eventName );
+  return mController->OnInputMethodContextEvent( inputMethodContext, inputMethodContextEvent );
 }
 
 void TextEditor::GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType )
 }
 
 void TextEditor::GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType )
old mode 100644 (file)
new mode 100755 (executable)
index a3a8854..5595e18
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 #include <dali/public-api/animation/animation.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
 
 // INTERNAL INCLUDES
@@ -41,7 +42,6 @@ namespace Toolkit
 
 namespace Internal
 {
 
 namespace Internal
 {
-
 /**
  * @brief A control which renders a long text string with styles.
  */
 /**
  * @brief A control which renders a long text string with styles.
  */
@@ -75,6 +75,11 @@ public:
   static Property::Value GetProperty( BaseObject* object, Property::Index index );
 
   /**
   static Property::Value GetProperty( BaseObject* object, Property::Index index );
 
   /**
+   * @copydoc Dali::Toollkit::TextEditor::GetInputMethodContext()
+   */
+  InputMethodContext GetInputMethodContext();
+
+  /**
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
    * @param[in] tracker Used to disconnect the signal.
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
    * @param[in] tracker Used to disconnect the signal.
@@ -194,9 +199,9 @@ private: // From Control
 private: // Implementation
 
   /**
 private: // Implementation
 
   /**
-   * @copydoc Dali::Toolkit::Text::Controller::(ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent)
+   * @copydoc Dali::Toolkit::Text::Controller::(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent)
    */
    */
-  ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
@@ -283,7 +288,7 @@ private: // Data
   Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal;
   Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
 
   Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal;
   Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
 
-  ImfManager          mImfManager;
+  InputMethodContext mInputMethodContext;
   Text::ControllerPtr mController;
   Text::RendererPtr mRenderer;
   Text::DecoratorPtr mDecorator;
   Text::ControllerPtr mController;
   Text::RendererPtr mRenderer;
   Text::DecoratorPtr mDecorator;
old mode 100644 (file)
new mode 100755 (executable)
index 137d0c4..d92be64
@@ -44,6 +44,7 @@
 #include <dali-toolkit/internal/text/text-font-style.h>
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/internal/styling/style-manager-impl.h>
 #include <dali-toolkit/internal/text/text-font-style.h>
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/internal/styling/style-manager-impl.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 
 using namespace Dali::Toolkit::Text;
 
 
 using namespace Dali::Toolkit::Text;
 
@@ -586,7 +587,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl();
         if (control == textField)
         {
         Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl();
         if (control == textField)
         {
-          impl.mImfManager.ApplyOptions( impl.mInputMethodOptions );
+          impl.mInputMethodContext.ApplyOptions( impl.mInputMethodOptions );
         }
         break;
       }
         }
         break;
       }
@@ -1205,6 +1206,11 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
   return value;
 }
 
   return value;
 }
 
+InputMethodContext TextField::GetInputMethodContext()
+{
+  return mInputMethodContext;
+}
+
 bool TextField::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   Dali::BaseHandle handle( object );
 bool TextField::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   Dali::BaseHandle handle( object );
@@ -1261,10 +1267,12 @@ void TextField::OnInitialize()
   mDecorator = Text::Decorator::New( *mController,
                                      *mController );
 
   mDecorator = Text::Decorator::New( *mController,
                                      *mController );
 
+  mInputMethodContext = InputMethodContext::New();
+
   mController->GetLayoutEngine().SetLayout( Layout::Engine::SINGLE_LINE_BOX );
 
   // Enables the text input.
   mController->GetLayoutEngine().SetLayout( Layout::Engine::SINGLE_LINE_BOX );
 
   // Enables the text input.
-  mController->EnableTextInput( mDecorator );
+  mController->EnableTextInput( mDecorator, mInputMethodContext );
 
   // Enables the horizontal scrolling after the text input has been enabled.
   mController->SetHorizontalScrollEnabled( true );
 
   // Enables the horizontal scrolling after the text input has been enabled.
   mController->SetHorizontalScrollEnabled( true );
@@ -1282,8 +1290,6 @@ void TextField::OnInitialize()
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
 
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
 
-  mImfManager = ImfManager::Get();
-
   self.TouchSignal().Connect( this, &TextField::OnTouched );
 
   // Set BoundingBox to stage size if not already set.
   self.TouchSignal().Connect( this, &TextField::OnTouched );
 
   // Set BoundingBox to stage size if not already set.
@@ -1304,6 +1310,8 @@ void TextField::OnInitialize()
   self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
   self.OnStageSignal().Connect( this, &TextField::OnStageConnect );
 
   self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
   self.OnStageSignal().Connect( this, &TextField::OnStageConnect );
 
+  DevelControl::SetInputMethodContext( *this, mInputMethodContext );
+
   if( Dali::Toolkit::TextField::EXCEED_POLICY_CLIP == mExceedPolicy )
   {
     EnableClipping();
   if( Dali::Toolkit::TextField::EXCEED_POLICY_CLIP == mExceedPolicy )
   {
     EnableClipping();
@@ -1499,25 +1507,26 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType )
 void TextField::OnKeyInputFocusGained()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
 void TextField::OnKeyInputFocusGained()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.ApplyOptions( mInputMethodOptions );
 
 
-  mImfManager.ApplyOptions( mInputMethodOptions );
-
-  mImfManager.StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );
-
-  mImfManager.EventReceivedSignal().Connect( this, &TextField::OnImfEvent );
+    mInputMethodContext.StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );
 
 
-  // Notify that the text editing start.
-  mImfManager.Activate();
+    mInputMethodContext.EventReceivedSignal().Connect( this, &TextField::OnInputMethodContextEvent );
 
 
-  // When window gain lost focus, the imf manager is deactivated. Thus when window gain focus again, the imf manager must be activated.
-  mImfManager.SetRestoreAfterFocusLost( true );
+    // Notify that the text editing start.
+    mInputMethodContext.Activate();
 
 
-   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
+    // When window gain lost focus, the inputMethodContext is deactivated. Thus when window gain focus again, the inputMethodContext must be activated.
+    mInputMethodContext.SetRestoreAfterFocusLost( true );
+  }
+  ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
 
-   if ( notifier )
-   {
-      notifier.ContentSelectedSignal().Connect( this, &TextField::OnClipboardTextSelected );
-   }
+  if ( notifier )
+  {
+    notifier.ContentSelectedSignal().Connect( this, &TextField::OnClipboardTextSelected );
+  }
 
   mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event
 
 
   mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event
 
@@ -1527,16 +1536,17 @@ void TextField::OnKeyInputFocusGained()
 void TextField::OnKeyInputFocusLost()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField:OnKeyInputFocusLost %p\n", mController.Get() );
 void TextField::OnKeyInputFocusLost()
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField:OnKeyInputFocusLost %p\n", mController.Get() );
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.StatusChangedSignal().Disconnect( this, &TextField::KeyboardStatusChanged );
+    // The text editing is finished. Therefore the inputMethodContext don't have restore activation.
+    mInputMethodContext.SetRestoreAfterFocusLost( false );
 
 
-  mImfManager.StatusChangedSignal().Disconnect( this, &TextField::KeyboardStatusChanged );
-  // The text editing is finished. Therefore the imf manager don't have restore activation.
-  mImfManager.SetRestoreAfterFocusLost( false );
-
-  // Notify that the text editing finish.
-  mImfManager.Deactivate();
-
-  mImfManager.EventReceivedSignal().Disconnect( this, &TextField::OnImfEvent );
+    // Notify that the text editing finish.
+    mInputMethodContext.Deactivate();
 
 
+    mInputMethodContext.EventReceivedSignal().Disconnect( this, &TextField::OnInputMethodContextEvent );
+  }
   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
   if ( notifier )
   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
 
   if ( notifier )
@@ -1552,9 +1562,10 @@ void TextField::OnKeyInputFocusLost()
 void TextField::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnTap %p\n", mController.Get() );
 void TextField::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnTap %p\n", mController.Get() );
-
-  mImfManager.Activate();
-
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.Activate();
+  }
   // Deliver the tap before the focus event to controller; this allows us to detect when focus is gained due to tap-gestures
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   // Deliver the tap before the focus event to controller; this allows us to detect when focus is gained due to tap-gestures
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
@@ -1570,8 +1581,10 @@ void TextField::OnPan( const PanGesture& gesture )
 
 void TextField::OnLongPress( const LongPressGesture& gesture )
 {
 
 void TextField::OnLongPress( const LongPressGesture& gesture )
 {
-  mImfManager.Activate();
-
+  if ( mInputMethodContext )
+  {
+    mInputMethodContext.Activate();
+  }
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   mController->LongPressEvent( gesture.state, gesture.localPoint.x - padding.start, gesture.localPoint.y - padding.top );
   Extents padding;
   padding = Self().GetProperty<Extents>( Toolkit::Control::Property::PADDING );
   mController->LongPressEvent( gesture.state, gesture.localPoint.x - padding.start, gesture.localPoint.y - padding.top );
@@ -1699,10 +1712,10 @@ void TextField::OnStageConnect( Dali::Actor actor )
   }
 }
 
   }
 }
 
-ImfManager::ImfCallbackData TextField::OnImfEvent( Dali::ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
+InputMethodContext::CallbackData TextField::OnInputMethodContextEvent( Dali::InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent )
 {
 {
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnImfEvent %p eventName %d\n", mController.Get(), imfEvent.eventName );
-  return mController->OnImfEvent( imfManager, imfEvent );
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnInputMethodContextEvent %p eventName %d\n", mController.Get(), inputMethodContextEvent.eventName );
+  return mController->OnInputMethodContextEvent( inputMethodContext, inputMethodContextEvent );
 }
 
 void TextField::GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType )
 }
 
 void TextField::GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType )
old mode 100644 (file)
new mode 100755 (executable)
index b8f49ee..495f789
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
@@ -38,7 +39,6 @@ namespace Toolkit
 
 namespace Internal
 {
 
 namespace Internal
 {
-
 /**
  * @brief A control which renders a short text string.
  */
 /**
  * @brief A control which renders a short text string.
  */
@@ -72,6 +72,11 @@ public:
   static Property::Value GetProperty( BaseObject* object, Property::Index index );
 
   /**
   static Property::Value GetProperty( BaseObject* object, Property::Index index );
 
   /**
+   * @copydoc Dali::Toollkit::TextField::GetInputMethodContext()
+   */
+  InputMethodContext GetInputMethodContext();
+
+  /**
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
    * @param[in] tracker Used to disconnect the signal.
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
    * @param[in] tracker Used to disconnect the signal.
@@ -191,9 +196,9 @@ private: // From Control
 private: // Implementation
 
   /**
 private: // Implementation
 
   /**
-   * @copydoc Dali::Toolkit::Text::Controller::(ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent)
+   * @copydoc Dali::Toolkit::Text::Controller::(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent)
    */
    */
-  ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
@@ -265,7 +270,7 @@ private: // Data
   Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal;
   Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal;
 
   Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal;
   Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal;
 
-  ImfManager         mImfManager;
+  InputMethodContext mInputMethodContext;
   Text::ControllerPtr mController;
   Text::RendererPtr mRenderer;
   Text::DecoratorPtr mDecorator;
   Text::ControllerPtr mController;
   Text::RendererPtr mRenderer;
   Text::DecoratorPtr mDecorator;
old mode 100644 (file)
new mode 100755 (executable)
index 5f34488..caefc0c
@@ -67,9 +67,9 @@ namespace Toolkit
 namespace Text
 {
 
 namespace Text
 {
 
-EventData::EventData( DecoratorPtr decorator )
+EventData::EventData( DecoratorPtr decorator, InputMethodContext& inputMethodContext )
 : mDecorator( decorator ),
 : mDecorator( decorator ),
-  mImfManager(),
+  mInputMethodContext( inputMethodContext ),
   mPlaceholderFont( NULL ),
   mPlaceholderTextActive(),
   mPlaceholderTextInactive(),
   mPlaceholderFont( NULL ),
   mPlaceholderTextActive(),
   mPlaceholderTextInactive(),
@@ -112,7 +112,6 @@ EventData::EventData( DecoratorPtr decorator )
   mPlaceholderEllipsisFlag( false ),
   mShiftSelectionFlag( true )
 {
   mPlaceholderEllipsisFlag( false ),
   mShiftSelectionFlag( true )
 {
-  mImfManager = ImfManager::Get();
 }
 
 EventData::~EventData()
 }
 
 EventData::~EventData()
@@ -180,7 +179,7 @@ bool Controller::Impl::ProcessInputEvents()
   if( mEventData->mUpdateCursorPosition ||
       mEventData->mUpdateHighlightBox )
   {
   if( mEventData->mUpdateCursorPosition ||
       mEventData->mUpdateHighlightBox )
   {
-    NotifyImfManager();
+    NotifyInputMethodContext();
   }
 
   // The cursor must also be repositioned after inserts into the model
   }
 
   // The cursor must also be repositioned after inserts into the model
@@ -329,9 +328,9 @@ bool Controller::Impl::ProcessInputEvents()
   return decoratorUpdated;
 }
 
   return decoratorUpdated;
 }
 
-void Controller::Impl::NotifyImfManager()
+void Controller::Impl::NotifyInputMethodContext()
 {
 {
-  if( mEventData && mEventData->mImfManager )
+  if( mEventData && mEventData->mInputMethodContext )
   {
     CharacterIndex cursorPosition = GetLogicalCursorPosition();
 
   {
     CharacterIndex cursorPosition = GetLogicalCursorPosition();
 
@@ -347,17 +346,17 @@ void Controller::Impl::NotifyImfManager()
       cursorPosition -= numberOfWhiteSpaces;
     }
 
       cursorPosition -= numberOfWhiteSpaces;
     }
 
-    mEventData->mImfManager.SetCursorPosition( cursorPosition );
-    mEventData->mImfManager.NotifyCursorPosition();
+    mEventData->mInputMethodContext.SetCursorPosition( cursorPosition );
+    mEventData->mInputMethodContext.NotifyCursorPosition();
   }
 }
 
   }
 }
 
-void Controller::Impl::NotifyImfMultiLineStatus()
+void Controller::Impl::NotifyInputMethodContextMultiLineStatus()
 {
 {
-  if ( mEventData )
+  if ( mEventData && mEventData->mInputMethodContext )
   {
     Text::Layout::Engine::Type layout = mLayoutEngine.GetLayout();
   {
     Text::Layout::Engine::Type layout = mLayoutEngine.GetLayout();
-    mEventData->mImfManager.NotifyTextInputMultiLine( layout == Text::Layout::Engine::MULTI_LINE_BOX );
+    mEventData->mInputMethodContext.NotifyTextInputMultiLine( layout == Text::Layout::Engine::MULTI_LINE_BOX );
   }
 }
 
   }
 }
 
@@ -1320,11 +1319,11 @@ void Controller::Impl::OnCursorKeyEvent( const Event& event )
 
     if ( selecting )
     {
 
     if ( selecting )
     {
-      // Notify the cursor position to the imf manager.
-      if( mEventData->mImfManager )
+      // Notify the cursor position to the InputMethodContext.
+      if( mEventData->mInputMethodContext )
       {
       {
-        mEventData->mImfManager.SetCursorPosition( mEventData->mPrimaryCursorPosition );
-        mEventData->mImfManager.NotifyCursorPosition();
+        mEventData->mInputMethodContext.SetCursorPosition( mEventData->mPrimaryCursorPosition );
+        mEventData->mInputMethodContext.NotifyCursorPosition();
       }
 
       ChangeState( EventData::SELECTING );
       }
 
       ChangeState( EventData::SELECTING );
@@ -1396,11 +1395,11 @@ void Controller::Impl::OnTapEvent( const Event& event )
       mEventData->mScrollAfterUpdatePosition = true;
       mEventData->mUpdateInputStyle = true;
 
       mEventData->mScrollAfterUpdatePosition = true;
       mEventData->mUpdateInputStyle = true;
 
-      // Notify the cursor position to the imf manager.
-      if( mEventData->mImfManager )
+      // Notify the cursor position to the InputMethodContext.
+      if( mEventData->mInputMethodContext )
       {
       {
-        mEventData->mImfManager.SetCursorPosition( mEventData->mPrimaryCursorPosition );
-        mEventData->mImfManager.NotifyCursorPosition();
+        mEventData->mInputMethodContext.SetCursorPosition( mEventData->mPrimaryCursorPosition );
+        mEventData->mInputMethodContext.NotifyCursorPosition();
       }
     }
     else if( 2u == tapCount )
       }
     }
     else if( 2u == tapCount )
@@ -2418,8 +2417,8 @@ void Controller::Impl::RepositionSelectionHandles( float visualX, float visualY,
     mEventData->mUpdateRightSelectionPosition = true;
     mEventData->mUpdateHighlightBox = true;
 
     mEventData->mUpdateRightSelectionPosition = true;
     mEventData->mUpdateHighlightBox = true;
 
-    // It may happen an IMF commit event arrives before the selection event
-    // if the IMF manager is in pre-edit state. The commit event will set the
+    // It may happen an InputMethodContext commit event arrives before the selection event
+    // if the InputMethodContext is in pre-edit state. The commit event will set the
     // mEventData->mUpdateCursorPosition flag to true. If it's not set back
     // to false, the highlight box won't be updated.
     mEventData->mUpdateCursorPosition = false;
     // mEventData->mUpdateCursorPosition flag to true. If it's not set back
     // to false, the highlight box won't be updated.
     mEventData->mUpdateCursorPosition = false;
old mode 100644 (file)
new mode 100755 (executable)
index 52dad25..34601f5
@@ -97,7 +97,7 @@ struct EventData
     TEXT_PANNING
   };
 
     TEXT_PANNING
   };
 
-  EventData( DecoratorPtr decorator );
+  EventData( DecoratorPtr decorator, InputMethodContext& inputMethodContext );
 
   ~EventData();
 
 
   ~EventData();
 
@@ -107,7 +107,7 @@ struct EventData
   }
 
   DecoratorPtr       mDecorator;               ///< Pointer to the decorator.
   }
 
   DecoratorPtr       mDecorator;               ///< Pointer to the decorator.
-  ImfManager         mImfManager;              ///< The Input Method Framework Manager.
+  InputMethodContext mInputMethodContext;      ///< The Input Method Framework Manager.
   FontDefaults*      mPlaceholderFont;         ///< The placeholder default font.
   std::string        mPlaceholderTextActive;   ///< The text to display when the TextField is empty with key-input focus.
   std::string        mPlaceholderTextInactive; ///< The text to display when the TextField is empty and inactive.
   FontDefaults*      mPlaceholderFont;         ///< The placeholder default font.
   std::string        mPlaceholderTextActive;   ///< The text to display when the TextField is empty with key-input focus.
   std::string        mPlaceholderTextInactive; ///< The text to display when the TextField is empty and inactive.
@@ -455,14 +455,14 @@ struct Controller::Impl
     }
   }
 
     }
   }
 
-  void ResetImfManager()
+  void ResetInputMethodContext()
   {
     if( mEventData )
     {
       // Reset incase we are in a pre-edit state.
   {
     if( mEventData )
     {
       // Reset incase we are in a pre-edit state.
-      if( mEventData->mImfManager )
+      if( mEventData->mInputMethodContext )
       {
       {
-        mEventData->mImfManager.Reset(); // Will trigger a message ( commit, get surrounding )
+        mEventData->mInputMethodContext.Reset(); // Will trigger a message ( commit, get surrounding )
       }
 
       ClearPreEditFlag();
       }
 
       ClearPreEditFlag();
@@ -470,14 +470,14 @@ struct Controller::Impl
   }
 
   /**
   }
 
   /**
-   * @brief Helper to notify IMF manager with surrounding text & cursor changes.
+   * @brief Helper to notify InputMethodContext with surrounding text & cursor changes.
    */
    */
-  void NotifyImfManager();
+  void NotifyInputMethodContext();
 
   /**
 
   /**
-   * @brief Helper to notify IMF manager with multi line status.
+   * @brief Helper to notify InputMethodContext with multi line status.
    */
    */
-  void NotifyImfMultiLineStatus();
+  void NotifyInputMethodContextMultiLineStatus();
 
   /**
    * @brief Retrieve the current cursor position.
 
   /**
    * @brief Retrieve the current cursor position.
index f47b526..d878025 100755 (executable)
@@ -138,7 +138,7 @@ ControllerPtr Controller::New( ControlInterface* controlInterface,
 
 // public : Configure the text controller.
 
 
 // public : Configure the text controller.
 
-void Controller::EnableTextInput( DecoratorPtr decorator )
+void Controller::EnableTextInput( DecoratorPtr decorator, InputMethodContext& inputMethodContext )
 {
   if( !decorator )
   {
 {
   if( !decorator )
   {
@@ -151,7 +151,7 @@ void Controller::EnableTextInput( DecoratorPtr decorator )
 
   if( NULL == mImpl->mEventData )
   {
 
   if( NULL == mImpl->mEventData )
   {
-    mImpl->mEventData = new EventData( decorator );
+    mImpl->mEventData = new EventData( decorator, inputMethodContext );
   }
 }
 
   }
 }
 
@@ -493,7 +493,7 @@ void Controller::SetText( const std::string& text )
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::SetText\n" );
 
   // Reset keyboard as text changed
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::SetText\n" );
 
   // Reset keyboard as text changed
-  mImpl->ResetImfManager();
+  mImpl->ResetInputMethodContext();
 
   // Remove the previously set text and style.
   ResetText();
 
   // Remove the previously set text and style.
   ResetText();
@@ -2395,7 +2395,7 @@ void Controller::KeyboardFocusGainEvent()
       mImpl->mEventData->mUpdateCursorPosition = true; //If editing started without tap event, cursor update must be triggered.
       mImpl->mEventData->mUpdateInputStyle = true;
     }
       mImpl->mEventData->mUpdateCursorPosition = true; //If editing started without tap event, cursor update must be triggered.
       mImpl->mEventData->mUpdateInputStyle = true;
     }
-    mImpl->NotifyImfMultiLineStatus();
+    mImpl->NotifyInputMethodContextMultiLineStatus();
     if( mImpl->IsShowingPlaceholderText() )
     {
       // Show alternative placeholder-text when editing
     if( mImpl->IsShowingPlaceholderText() )
     {
       // Show alternative placeholder-text when editing
@@ -2554,7 +2554,7 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
     }
     else if( Dali::DALI_KEY_SHIFT_LEFT == keyCode )
     {
     }
     else if( Dali::DALI_KEY_SHIFT_LEFT == keyCode )
     {
-      // DALI_KEY_SHIFT_LEFT is the key code for the Left Shift. It's sent (by the imf?) when the predictive text is enabled
+      // DALI_KEY_SHIFT_LEFT is the key code for the Left Shift. It's sent (by the InputMethodContext?) when the predictive text is enabled
       // and a character is typed after the type of a upper case latin character.
 
       // Do nothing.
       // and a character is typed after the type of a upper case latin character.
 
       // Do nothing.
@@ -2570,7 +2570,7 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
     {
       DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::KeyEvent %p keyString %s\n", this, keyString.c_str() );
 
     {
       DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::KeyEvent %p keyString %s\n", this, keyString.c_str() );
 
-      // IMF manager is no longer handling key-events
+      // InputMethodContext is no longer handling key-events
       mImpl->ClearPreEditFlag();
 
       InsertText( keyString, COMMIT );
       mImpl->ClearPreEditFlag();
 
       InsertText( keyString, COMMIT );
@@ -2587,9 +2587,9 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
          ( Dali::DALI_KEY_VOLUME_UP != keyCode ) &&
          ( Dali::DALI_KEY_VOLUME_DOWN != keyCode ) )
     {
          ( Dali::DALI_KEY_VOLUME_UP != keyCode ) &&
          ( Dali::DALI_KEY_VOLUME_DOWN != keyCode ) )
     {
-      // Should not change the state if the key is the shift send by the imf manager.
+      // Should not change the state if the key is the shift send by the InputMethodContext.
       // Otherwise, when the state is SELECTING the text controller can't send the right
       // Otherwise, when the state is SELECTING the text controller can't send the right
-      // surrounding info to the imf.
+      // surrounding info to the InputMethodContext.
       mImpl->ChangeState( EventData::EDITING );
 
       // Will request for relayout.
       mImpl->ChangeState( EventData::EDITING );
 
       // Will request for relayout.
@@ -2686,7 +2686,7 @@ void Controller::TapEvent( unsigned int tapCount, float x, float y )
   }
 
   // Reset keyboard as tap event has occurred.
   }
 
   // Reset keyboard as tap event has occurred.
-  mImpl->ResetImfManager();
+  mImpl->ResetInputMethodContext();
 }
 
 void Controller::PanEvent( Gesture::State state, const Vector2& displacement )
 }
 
 void Controller::PanEvent( Gesture::State state, const Vector2& displacement )
@@ -2736,8 +2736,8 @@ void Controller::LongPressEvent( Gesture::State state, float x, float y  )
     }
     else if( !mImpl->IsClipboardVisible() )
     {
     }
     else if( !mImpl->IsClipboardVisible() )
     {
-      // Reset the imf manager to commit the pre-edit before selecting the text.
-      mImpl->ResetImfManager();
+      // Reset the InputMethodContext to commit the pre-edit before selecting the text.
+      mImpl->ResetInputMethodContext();
 
       Event event( Event::LONG_PRESS_EVENT );
       event.p1.mInt = state;
 
       Event event( Event::LONG_PRESS_EVENT );
       event.p1.mInt = state;
@@ -2752,35 +2752,35 @@ void Controller::LongPressEvent( Gesture::State state, float x, float y  )
   }
 }
 
   }
 }
 
-ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
+InputMethodContext::CallbackData Controller::OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent )
 {
   // Whether the text needs to be relaid-out.
   bool requestRelayout = false;
 
 {
   // Whether the text needs to be relaid-out.
   bool requestRelayout = false;
 
-  // Whether to retrieve the text and cursor position to be sent to the IMF manager.
+  // Whether to retrieve the text and cursor position to be sent to the InputMethodContext.
   bool retrieveText = false;
   bool retrieveCursor = false;
 
   bool retrieveText = false;
   bool retrieveCursor = false;
 
-  switch( imfEvent.eventName )
+  switch( inputMethodContextEvent.eventName )
   {
   {
-    case ImfManager::COMMIT:
+    case InputMethodContext::COMMIT:
     {
     {
-      InsertText( imfEvent.predictiveString, Text::Controller::COMMIT );
+      InsertText( inputMethodContextEvent.predictiveString, Text::Controller::COMMIT );
       requestRelayout = true;
       retrieveCursor = true;
       break;
     }
       requestRelayout = true;
       retrieveCursor = true;
       break;
     }
-    case ImfManager::PREEDIT:
+    case InputMethodContext::PRE_EDIT:
     {
     {
-      InsertText( imfEvent.predictiveString, Text::Controller::PRE_EDIT );
+      InsertText( inputMethodContextEvent.predictiveString, Text::Controller::PRE_EDIT );
       requestRelayout = true;
       retrieveCursor = true;
       break;
     }
       requestRelayout = true;
       retrieveCursor = true;
       break;
     }
-    case ImfManager::DELETESURROUNDING:
+    case InputMethodContext::DELETE_SURROUNDING:
     {
     {
-      const bool textDeleted = RemoveText( imfEvent.cursorOffset,
-                                           imfEvent.numberOfChars,
+      const bool textDeleted = RemoveText( inputMethodContextEvent.cursorOffset,
+                                           inputMethodContextEvent.numberOfChars,
                                            DONT_UPDATE_INPUT_STYLE );
 
       if( textDeleted )
                                            DONT_UPDATE_INPUT_STYLE );
 
       if( textDeleted )
@@ -2801,20 +2801,20 @@ ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, cons
       }
       break;
     }
       }
       break;
     }
-    case ImfManager::GETSURROUNDING:
+    case InputMethodContext::GET_SURROUNDING:
     {
       retrieveText = true;
       retrieveCursor = true;
       break;
     }
     {
       retrieveText = true;
       retrieveCursor = true;
       break;
     }
-    case ImfManager::PRIVATECOMMAND:
+    case InputMethodContext::PRIVATE_COMMAND:
     {
       // PRIVATECOMMAND event is just for getting the private command message
       retrieveText = true;
       retrieveCursor = true;
       break;
     }
     {
       // PRIVATECOMMAND event is just for getting the private command message
       retrieveText = true;
       retrieveCursor = true;
       break;
     }
-    case ImfManager::VOID:
+    case InputMethodContext::VOID:
     {
       // do nothing
       break;
     {
       // do nothing
       break;
@@ -2862,7 +2862,7 @@ ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, cons
     }
   }
 
     }
   }
 
-  ImfManager::ImfCallbackData callbackData( ( retrieveText || retrieveCursor ), cursorPosition, text, false );
+  InputMethodContext::CallbackData callbackData( ( retrieveText || retrieveCursor ), cursorPosition, text, false );
 
   if( requestRelayout &&
       ( NULL != mImpl->mEditableControlInterface ) )
 
   if( requestRelayout &&
       ( NULL != mImpl->mEditableControlInterface ) )
@@ -2881,7 +2881,7 @@ void Controller::PasteClipboardItemEvent()
   std::string stringToPaste( notifier.GetContent() );
 
   // Commit the current pre-edit text; the contents of the clipboard should be appended
   std::string stringToPaste( notifier.GetContent() );
 
   // Commit the current pre-edit text; the contents of the clipboard should be appended
-  mImpl->ResetImfManager();
+  mImpl->ResetInputMethodContext();
 
   // Temporary disable hiding clipboard
   mImpl->SetClipboardHideEnable( false );
 
   // Temporary disable hiding clipboard
   mImpl->SetClipboardHideEnable( false );
@@ -3073,7 +3073,7 @@ void Controller::InsertText( const std::string& text, Controller::InsertType typ
   // TODO: At the moment the underline runs are only for pre-edit.
   mImpl->mModel->mVisualModel->mUnderlineRuns.Clear();
 
   // TODO: At the moment the underline runs are only for pre-edit.
   mImpl->mModel->mVisualModel->mUnderlineRuns.Clear();
 
-  // Remove the previous IMF pre-edit.
+  // Remove the previous InputMethodContext pre-edit.
   if( mImpl->mEventData->mPreEditFlag && ( 0u != mImpl->mEventData->mPreEditLength ) )
   {
     removedPrevious = RemoveText( -static_cast<int>( mImpl->mEventData->mPrimaryCursorPosition - mImpl->mEventData->mPreEditStartPosition ),
   if( mImpl->mEventData->mPreEditFlag && ( 0u != mImpl->mEventData->mPreEditLength ) )
   {
     removedPrevious = RemoveText( -static_cast<int>( mImpl->mEventData->mPrimaryCursorPosition - mImpl->mEventData->mPreEditStartPosition ),
@@ -3120,10 +3120,10 @@ void Controller::InsertText( const std::string& text, Controller::InsertType typ
 
     mImpl->ChangeState( EventData::EDITING );
 
 
     mImpl->ChangeState( EventData::EDITING );
 
-    // Handle the IMF (predicitive text) state changes
+    // Handle the InputMethodContext (predicitive text) state changes
     if( COMMIT == type )
     {
     if( COMMIT == type )
     {
-      // IMF manager is no longer handling key-events
+      // InputMethodContext is no longer handling key-events
       mImpl->ClearPreEditFlag();
     }
     else // PRE_EDIT
       mImpl->ClearPreEditFlag();
     }
     else // PRE_EDIT
@@ -3297,7 +3297,7 @@ void Controller::InsertText( const std::string& text, Controller::InsertType typ
   {
     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "MaxLengthReached (%d)\n", mImpl->mModel->mLogicalModel->mText.Count() );
 
   {
     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "MaxLengthReached (%d)\n", mImpl->mModel->mLogicalModel->mText.Count() );
 
-    mImpl->ResetImfManager();
+    mImpl->ResetInputMethodContext();
 
     if( NULL != mImpl->mEditableControlInterface )
     {
 
     if( NULL != mImpl->mEditableControlInterface )
     {
@@ -3831,7 +3831,7 @@ bool Controller::DeleteEvent( int keyCode )
     return removed;
   }
 
     return removed;
   }
 
-  // IMF manager is no longer handling key-events
+  // InputMethodContext is no longer handling key-events
   mImpl->ClearPreEditFlag();
 
   if( EventData::SELECTING == mImpl->mEventData->mState )
   mImpl->ClearPreEditFlag();
 
   if( EventData::SELECTING == mImpl->mEventData->mState )
index b2321c4..92677f2 100755 (executable)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/imf-manager.h>
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 #include <dali/public-api/events/gesture.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/gesture.h>
 
 // INTERNAL INCLUDES
@@ -88,7 +88,7 @@ public: // Enumerated types.
   };
 
   /**
   };
 
   /**
-   * @brief Used to distinguish between regular key events and IMF events
+   * @brief Used to distinguish between regular key events and InputMethodContext events
    */
   enum InsertType
   {
    */
   enum InsertType
   {
@@ -179,8 +179,9 @@ public: // Configure the text controller.
    *
    * @note Selectable or editable controls should call this once after Controller::New().
    * @param[in] decorator Used to create cursor, selection handle decorations etc.
    *
    * @note Selectable or editable controls should call this once after Controller::New().
    * @param[in] decorator Used to create cursor, selection handle decorations etc.
+   * @param[in] inputMethodContext Used to manager ime.
    */
    */
-  void EnableTextInput( DecoratorPtr decorator );
+  void EnableTextInput( DecoratorPtr decorator, InputMethodContext& inputMethodContext );
 
   /**
    * @brief Used to switch between bitmap & vector based glyphs
 
   /**
    * @brief Used to switch between bitmap & vector based glyphs
@@ -1278,7 +1279,7 @@ public: // Text-input Event Queuing.
    * @brief Called by editable UI controls when key events are received.
    *
    * @param[in] event The key event.
    * @brief Called by editable UI controls when key events are received.
    *
    * @param[in] event The key event.
-   * @param[in] type Used to distinguish between regular key events and IMF events.
+   * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
    */
   bool KeyEvent( const Dali::KeyEvent& event );
 
    */
   bool KeyEvent( const Dali::KeyEvent& event );
 
@@ -1308,13 +1309,13 @@ public: // Text-input Event Queuing.
   void LongPressEvent( Gesture::State state, float x, float y );
 
   /**
   void LongPressEvent( Gesture::State state, float x, float y );
 
   /**
-   * @brief Event received from IMF manager
+   * @brief Event received from input method context
    *
    *
-   * @param[in] imfManager The IMF manager.
-   * @param[in] imfEvent The event received.
+   * @param[in] inputMethodContext The input method context.
+   * @param[in] inputMethodContextEvent The event received.
    * @return A data struture indicating if update is needed, cursor position and current text.
    */
    * @return A data struture indicating if update is needed, cursor position and current text.
    */
-  ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
 
   /**
    * @brief Event from Clipboard notifying an Item has been selected for pasting
 
   /**
    * @brief Event from Clipboard notifying an Item has been selected for pasting
@@ -1365,7 +1366,7 @@ private: // Update.
    * @brief Called by editable UI controls when key events are received.
    *
    * @param[in] text The text to insert.
    * @brief Called by editable UI controls when key events are received.
    *
    * @param[in] text The text to insert.
-   * @param[in] type Used to distinguish between regular key events and IMF events.
+   * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
    */
   void InsertText( const std::string& text, InsertType type );
 
    */
   void InsertText( const std::string& text, InsertType type );
 
index 49064a8..df78b15 100755 (executable)
@@ -465,13 +465,15 @@ bool Control::EmitKeyEventSignal( const KeyEvent& event )
 
   bool consumed = false;
 
 
   bool consumed = false;
 
+  consumed = mImpl->FilterKeyEvent( event );
+
   // signals are allocated dynamically when someone connects
   // signals are allocated dynamically when someone connects
-  if ( !mImpl->mKeyEventSignal.Empty() )
+  if ( !consumed && !mImpl->mKeyEventSignal.Empty() )
   {
     consumed = mImpl->mKeyEventSignal.Emit( handle, event );
   }
 
   {
     consumed = mImpl->mKeyEventSignal.Emit( handle, event );
   }
 
-  if (!consumed)
+  if ( !consumed )
   {
     // Notification for derived classes
     consumed = OnKeyEvent(event);
   {
     // Notification for derived classes
     consumed = OnKeyEvent(event);