/*\r
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
// EXTERNAL INCLUDES\r
#include <dali/public-api/events/key-event.h>\r
#include <dali/public-api/object/type-registry.h>\r
+#include <dali/devel-api/common/singleton-service.h>\r
#include <dali/integration-api/debug.h>\r
\r
// INTERNAL INCLUDES\r
#include <dali/internal/input/common/key-impl.h>\r
#include <dali/internal/input/common/virtual-keyboard-impl.h>\r
#include <dali/internal/system/common/locale-utils.h>\r
-#include <dali/internal/system/common/singleton-service-impl.h>\r
\r
namespace Dali\r
{\r
namespace Adaptor\r
{\r
\r
+namespace\r
+{\r
+#if defined(DEBUG_ENABLED)\r
+Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_INPUT_METHOD_CONTEXT" );\r
+#endif\r
+}\r
+\r
InputMethodContextPtr InputMethodContextWin::New( Dali::Actor actor )\r
{\r
InputMethodContextPtr manager;\r
mIMFCursorPosition( 0 ),\r
mSurroundingText(),\r
mRestoreAfterFocusLost( false ),\r
- mIdleCallbackConnected( false ),\r
- mPreeditType( Dali::InputMethodContext::PreeditStyle::NONE )\r
+ mIdleCallbackConnected( false )\r
{\r
\r
- actor.OnStageSignal().Connect( this, &InputMethodContextWin::OnStaged );\r
+ actor.OnSceneSignal().Connect( this, &InputMethodContextWin::OnStaged );\r
}\r
\r
InputMethodContextWin::~InputMethodContextWin()\r
\r
Dali::InputMethodContext::TextDirection InputMethodContextWin::GetTextDirection()\r
{\r
- Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );\r
+ Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );\r
\r
return direction;\r
}\r
{\r
bool eventHandled( false );\r
\r
- if ( ! KeyLookup::IsDeviceButton( keyEvent.keyPressedName.c_str() ))\r
+ if ( ! KeyLookup::IsDeviceButton( keyEvent.GetKeyName().c_str() ))\r
{\r
//check whether it's key down or key up event\r
- if ( keyEvent.state == KeyEvent::Down )\r
+ if ( keyEvent.GetState() == Dali::KeyEvent::DOWN )\r
{\r
eventHandled = ProcessEventKeyDown( keyEvent );\r
}\r
- else if ( keyEvent.state == KeyEvent::Up )\r
+ else if ( keyEvent.GetState() == Dali::KeyEvent::UP )\r
{\r
eventHandled = ProcessEventKeyUp( keyEvent );\r
}\r
DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetInputPanelPosition\n" );\r
}\r
\r
-Dali::InputMethodContext::PreeditStyle InputMethodContextWin::GetPreeditStyle() const\r
+void InputMethodContextWin::GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const\r
{\r
DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetPreeditStyle\n" );\r
- return mPreeditType;\r
+ attrs = mPreeditAttrs;\r
}\r
\r
-bool InputMethodContextWin::ProcessEventKeyDown( const KeyEvent& keyEvent )\r
+bool InputMethodContextWin::ProcessEventKeyDown( const Dali::KeyEvent& keyEvent )\r
{\r
bool eventHandled( false );\r
return eventHandled;\r
}\r
\r
-bool InputMethodContextWin::ProcessEventKeyUp( const KeyEvent& keyEvent )\r
+bool InputMethodContextWin::ProcessEventKeyUp( const Dali::KeyEvent& keyEvent )\r
{\r
bool eventHandled( false );\r
return eventHandled;\r