X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fx11%2Fimf-manager-impl-x.cpp;h=3a2f913a9da61b78bec853558d2f9c8ac8559942;hb=ce8ba6c25e4a8fd72e75c30780d5f33e8589d965;hp=14dc3854c31bca3d5dfa9a1bd9005e26c8291d9b;hpb=90953b60ec6286a5cabe3ab23e8a5e578d5614dd;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/x11/imf-manager-impl-x.cpp b/adaptors/x11/imf-manager-impl-x.cpp index 14dc385..3a2f913 100644 --- a/adaptors/x11/imf-manager-impl-x.cpp +++ b/adaptors/x11/imf-manager-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "ecore-virtual-keyboard.h" @@ -215,12 +216,12 @@ void ImfManager::CreateContext( Ecore_X_Window ecoreXwin ) } else { - DALI_LOG_WARNING("IMF Unable to get IMF Context\n"); + DALI_LOG_INFO( gLogFilter, Debug::General, "IMF Unable to get IMF Context\n"); } } else { - DALI_LOG_WARNING("IMF Unable to get IMF Context\n"); + DALI_LOG_INFO( gLogFilter, Debug::General, "IMF Unable to get IMF Context\n"); } } @@ -520,6 +521,71 @@ void ImfManager::NotifyTextInputMultiLine( bool multiLine ) { } +Dali::ImfManager::TextDirection ImfManager::GetTextDirection() +{ + Dali::ImfManager::TextDirection direction ( Dali::ImfManager::LeftToRight ); + + if ( ImfManager::IsAvailable() /* We do not want to create an instance of ImfManager */ ) + { + if ( mIMFContext ) + { + char* locale( NULL ); + ecore_imf_context_input_panel_language_locale_get( mIMFContext, &locale ); + + if ( locale ) + { + direction = Locale::GetTextDirection( std::string( locale ) ); + free( locale ); + } + } + } + return direction; +} + +Rect ImfManager::GetInputMethodArea() +{ + int xPos, yPos, width, height; + + width = height = xPos = yPos = 0; + + if( mIMFContext ) + { + ecore_imf_context_input_panel_geometry_get( mIMFContext, &xPos, &yPos, &width, &height ); + } + else + { + DALI_LOG_WARNING("VKB Unable to get IMF Context so GetSize unavailable\n"); + } + + return Rect(xPos,yPos,width,height); +} + +void ImfManager::ApplyOptions( const InputMethodOptions& options ) +{ + using namespace Dali::InputMethod::Category; + + int index; + + if (mIMFContext == NULL) + { + DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n"); + return; + } + + if ( mOptions.CompareAndSet(PANEL_LAYOUT, options, index) ) + { + } + if ( mOptions.CompareAndSet(AUTO_CAPITALISE, options, index) ) + { + } + if ( mOptions.CompareAndSet(ACTION_BUTTON_TITLE, options, index) ) + { + } + if ( mOptions.CompareAndSet(VARIATION, options, index) ) + { + } +} + } // Adaptor } // Internal