X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-input-method-context.cpp;h=2446f29f9157e306ccb1d2f0acb17b66726e5acc;hp=775c0c0d99a748e7928446304ae47e3dbc20e81b;hb=590ede8c5f4771821ff5ac3f3acef0d189525008;hpb=e37f48bb34e81585a6ed436bd7a2f9dce02c19f5 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 index 775c0c0..2446f29 100755 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -59,6 +59,8 @@ public: const std::string& GetSurroundingText() const; void ApplyOptions( const InputMethodOptions& options ); bool FilterEventKey( const Dali::KeyEvent& keyEvent ); + void SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type ); + void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const; public: // Signals ActivatedSignalType& ActivatedSignal() { return mActivatedSignal; } @@ -85,6 +87,7 @@ private: 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; + Vector< Dali::InputMethodContext::PreeditAttributeData > mPreeditAttrs; ///< Stores preedit attr data ActivatedSignalType mActivatedSignal; KeyboardEventSignalType mEventSignal; @@ -212,6 +215,18 @@ bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent ) { return false; } + +void InputMethodContext::SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type ) +{ + Dali::InputMethodContext::PreeditAttributeData data; + data.preeditType = type; + mPreeditAttrs.PushBack( data ); +} + +void InputMethodContext::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const +{ + attrs = mPreeditAttrs; +} } // Adaptor } // Internal @@ -231,6 +246,11 @@ InputMethodContext::~InputMethodContext() InputMethodContext InputMethodContext::New() { + return InputMethodContext::New( Actor() ); +} + +InputMethodContext InputMethodContext::New( Actor actor ) +{ return Internal::Adaptor::InputMethodContext::New(); } @@ -303,6 +323,17 @@ bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent ) return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent ); } +void InputMethodContext::SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type ) +{ + Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetPreeditStyle( type ); +} + +void InputMethodContext::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const +{ + Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle( attrs ); +} + +// Signals InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal() { return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ActivatedSignal();