2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <imf-manager-impl.h>
22 #include <dali/public-api/events/key-event.h>
23 #include <dali/public-api/object/type-registry.h>
24 #include <dali/integration-api/debug.h>
27 #include <input-method-devel.h>
29 #include <locale-utils.h>
30 #include <window-render-surface.h>
31 #include <adaptor-impl.h>
32 #include <singleton-service-impl.h>
34 #define TOKEN_STRING(x) #x
36 Ecore_IMF_Input_Panel_Layout panelLayoutMap[] =
38 ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL,
39 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER,
40 ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL,
41 ECORE_IMF_INPUT_PANEL_LAYOUT_URL,
42 ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER,
43 ECORE_IMF_INPUT_PANEL_LAYOUT_IP,
44 ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH,
45 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY,
46 ECORE_IMF_INPUT_PANEL_LAYOUT_HEX,
47 ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL,
48 ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD,
49 ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME,
50 ECORE_IMF_INPUT_PANEL_LAYOUT_EMOTICON,
51 ECORE_IMF_INPUT_PANEL_LAYOUT_VOICE
54 Ecore_IMF_Autocapital_Type autoCapitalMap[] =
56 ECORE_IMF_AUTOCAPITAL_TYPE_NONE,
57 ECORE_IMF_AUTOCAPITAL_TYPE_WORD,
58 ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE,
59 ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER,
62 Ecore_IMF_Input_Panel_Return_Key_Type returnKeyTypeMap[] =
64 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT,
65 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE,
66 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO,
67 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,
68 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,
69 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,
70 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,
71 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND,
72 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN
86 #if defined(DEBUG_ENABLED)
87 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_IMF_MANAGER");
90 // Currently this code is internal to dali/dali/internal/event/text/utf8.h but should be made Public and used from there instead.
91 size_t Utf8SequenceLength(const unsigned char leadByte)
95 if ((leadByte & 0x80) == 0 ) //ASCII character (lead bit zero)
99 else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
103 else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
107 else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
115 // Static function calls used by ecore 'c' style callback registration
116 void Commit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
120 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
121 imfManager->CommitReceived( data, imfContext, event_info );
125 void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
129 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
130 imfManager->PreEditChanged( data, imfContext, event_info );
134 Eina_Bool ImfRetrieveSurrounding(void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )
138 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
139 return imfManager->RetrieveSurrounding( data, imfContext, text, cursorPosition );
147 void InputPanelStateChangeCallback( void* data, Ecore_IMF_Context* context, int value )
153 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
156 case ECORE_IMF_INPUT_PANEL_STATE_SHOW:
158 imfManager->StatusChangedSignal().Emit( true );
162 case ECORE_IMF_INPUT_PANEL_STATE_HIDE:
164 imfManager->StatusChangedSignal().Emit( false );
168 case ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW:
177 void InputPanelLanguageChangeCallback( void* data, Ecore_IMF_Context* context, int value )
183 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
184 // Emit the signal that the language has changed
185 imfManager->LanguageChangedSignal().Emit();
188 void InputPanelGeometryChangedCallback ( void *data, Ecore_IMF_Context *context, int value )
194 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
195 // Emit signal that the keyboard is resized
196 imfManager->ResizedSignal().Emit();
200 * Called when an IMF delete surrounding event is received.
201 * Here we tell the application that it should delete a certain range.
203 void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
207 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
208 imfManager->DeleteSurrounding( data, imfContext, event_info );
213 * Called when the input method sends a private command.
215 void PrivateCommand( void *data, Ecore_IMF_Context *imfContext, void *event_info )
219 ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
220 imfManager->SendPrivateCommand( data, imfContext, event_info );
226 return ImfManager::Get();
229 TypeRegistration IMF_MANAGER_TYPE( typeid(Dali::ImfManager), typeid(Dali::BaseHandle), Create );
231 } // unnamed namespace
233 bool ImfManager::IsAvailable()
235 bool available( false );
237 Dali::SingletonService service( SingletonService::Get() );
240 available = service.GetSingleton( typeid( Dali::ImfManager ) );
246 Dali::ImfManager ImfManager::Get()
248 Dali::ImfManager manager;
250 Dali::SingletonService service( SingletonService::Get() );
253 // Check whether the singleton is already created
254 Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::ImfManager ) );
257 // If so, downcast the handle
258 manager = Dali::ImfManager( dynamic_cast< ImfManager* >( handle.GetObjectPtr() ) );
260 else if ( Adaptor::IsAvailable() )
262 // Create instance and register singleton only if the adaptor is available
264 Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
265 Any nativeWindow = adaptorImpl.GetNativeWindowHandle();
267 // The Ecore_Wl_Window needs to use the ImfManager.
268 // Only when the render surface is window, we can get the Ecore_Wl_Window.
269 Ecore_Wl_Window *ecoreWwin( AnyCast< Ecore_Wl_Window* >( nativeWindow ) );
272 // If we fail to get Ecore_Wl_Window, we can't use the ImfManager correctly.
273 // Thus you have to call "ecore_imf_context_client_window_set" somewhere.
274 // In EvasPlugIn, this function is called in EvasPlugin::ConnectEcoreEvent().
276 manager = Dali::ImfManager( new ImfManager( ecoreWwin ) );
277 service.Register( typeid( manager ), manager );
281 DALI_LOG_ERROR("Failed to get native window handle\n");
289 ImfManager::ImfManager( Ecore_Wl_Window *ecoreWlwin )
291 mIMFCursorPosition( 0 ),
293 mRestoreAfterFocusLost( false ),
294 mIdleCallbackConnected( false )
297 CreateContext( ecoreWlwin );
302 ImfManager::~ImfManager()
304 DisconnectCallbacks();
307 ecore_imf_shutdown();
311 void ImfManager::CreateContext( Ecore_Wl_Window *ecoreWlwin )
313 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::CreateContext\n" );
315 const char *contextId = ecore_imf_context_default_id_get();
318 mIMFContext = ecore_imf_context_add( contextId );
324 ecore_imf_context_client_window_set( mIMFContext,
325 reinterpret_cast<void*>( ecore_wl_window_id_get(ecoreWlwin)) );
330 DALI_LOG_WARNING("IMF Unable to get IMF Context\n");
335 DALI_LOG_WARNING("IMF Unable to get IMF Context\n");
339 void ImfManager::DeleteContext()
341 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DeleteContext\n" );
345 ecore_imf_context_del( mIMFContext );
350 // Callbacks for predicitive text support.
351 void ImfManager::ConnectCallbacks()
355 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::ConnectCallbacks\n" );
357 ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, PreEdit, this );
358 ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_COMMIT, Commit, this );
359 ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding, this );
360 ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_PRIVATE_COMMAND_SEND, PrivateCommand, this );
362 ecore_imf_context_input_panel_event_callback_add( mIMFContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, InputPanelStateChangeCallback, this );
363 ecore_imf_context_input_panel_event_callback_add( mIMFContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, InputPanelLanguageChangeCallback, this );
364 ecore_imf_context_input_panel_event_callback_add( mIMFContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, InputPanelGeometryChangedCallback, this );
366 ecore_imf_context_retrieve_surrounding_callback_set( mIMFContext, ImfRetrieveSurrounding, this);
370 void ImfManager::DisconnectCallbacks()
374 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DisconnectCallbacks\n" );
376 ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, PreEdit );
377 ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_COMMIT, Commit );
378 ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding );
379 ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_PRIVATE_COMMAND_SEND, PrivateCommand );
381 ecore_imf_context_input_panel_event_callback_del( mIMFContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, InputPanelStateChangeCallback );
382 ecore_imf_context_input_panel_event_callback_del( mIMFContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, InputPanelLanguageChangeCallback );
383 ecore_imf_context_input_panel_event_callback_del( mIMFContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, InputPanelGeometryChangedCallback );
385 // We do not need to unset the retrieve surrounding callback.
389 void ImfManager::Activate()
391 // Reset mIdleCallbackConnected
392 mIdleCallbackConnected = false;
396 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Activate\n" );
398 ecore_imf_context_focus_in( mIMFContext );
400 // emit keyboard activated signal
401 Dali::ImfManager handle( this );
402 mActivatedSignal.Emit( handle );
406 void ImfManager::Deactivate()
410 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Deactivate\n" );
413 ecore_imf_context_focus_out( mIMFContext );
416 // Reset mIdleCallbackConnected
417 mIdleCallbackConnected = false;
420 void ImfManager::Reset()
422 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Reset\n" );
426 ecore_imf_context_reset( mIMFContext );
430 Ecore_IMF_Context* ImfManager::GetContext()
432 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetContext\n" );
437 bool ImfManager::RestoreAfterFocusLost() const
439 return mRestoreAfterFocusLost;
442 void ImfManager::SetRestoreAfterFocusLost( bool toggle )
444 mRestoreAfterFocusLost = toggle;
448 * Called when an IMF Pre-Edit changed event is received.
449 * We are still predicting what the user is typing. The latest string is what the IMF module thinks
450 * the user wants to type.
452 void ImfManager::PreEditChanged( void*, Ecore_IMF_Context* imfContext, void* event_info )
454 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::PreEditChanged\n" );
456 char* preEditString( NULL );
457 int cursorPosition( 0 );
458 Eina_List* attrs = NULL;
461 Ecore_IMF_Preedit_Attr* attr;
463 // Retrieves attributes as well as the string the cursor position offset from start of pre-edit string.
464 // the attributes (attrs) is used in languages that use the soft arrows keys to insert characters into a current pre-edit string.
465 ecore_imf_context_preedit_string_with_attributes_get( imfContext, &preEditString, &attrs, &cursorPosition );
469 // iterate through the list of attributes getting the type, start and end position.
470 for ( l = attrs, (attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ); l; l = eina_list_next(l), ( attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ))
472 #ifdef DALI_PROFILE_UBUNTU
473 if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3 ) // (Ecore_IMF)
474 #else // DALI_PROFILE_UBUNTU
475 if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB4 ) // (Ecore_IMF)
476 #endif // DALI_PROFILE_UBUNTU
478 // check first byte so know how many bytes a character is represented by as keyboard returns cursor position in bytes. Which is different for some languages.
480 size_t visualCharacterIndex = 0;
481 size_t byteIndex = 0;
483 // iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).
484 const char leadByte = preEditString[byteIndex];
485 while( leadByte != '\0' )
487 // attr->end_index is provided as a byte position not character and we need to know the character position.
488 const size_t currentSequenceLength = Utf8SequenceLength( leadByte ); // returns number of bytes used to represent character.
489 if ( byteIndex == attr->end_index )
491 cursorPosition = visualCharacterIndex;
493 // end loop as found cursor position that matches byte position
497 byteIndex += currentSequenceLength; // jump to next character
498 visualCharacterIndex++; // increment character count so we know our position for when we get a match
501 DALI_ASSERT_DEBUG( visualCharacterIndex < strlen( preEditString ));
507 if ( Dali::Adaptor::IsAvailable() )
509 Dali::ImfManager handle( this );
510 Dali::ImfManager::ImfEventData imfEventData( Dali::ImfManager::PREEDIT, preEditString, cursorPosition, 0 );
511 Dali::ImfManager::ImfCallbackData callbackData = mEventSignal.Emit( handle, imfEventData );
513 if ( callbackData.update )
515 SetCursorPosition( callbackData.cursorPosition );
516 SetSurroundingText( callbackData.currentText );
518 NotifyCursorPosition();
521 if ( callbackData.preeditResetRequired )
526 free( preEditString );
529 void ImfManager::CommitReceived( void*, Ecore_IMF_Context* imfContext, void* event_info )
531 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::CommitReceived\n" );
533 if ( Dali::Adaptor::IsAvailable() )
535 const std::string keyString( static_cast<char*>( event_info ) );
537 Dali::ImfManager handle( this );
538 Dali::ImfManager::ImfEventData imfEventData( Dali::ImfManager::COMMIT, keyString, 0, 0 );
539 Dali::ImfManager::ImfCallbackData callbackData = mEventSignal.Emit( handle, imfEventData );
541 if( callbackData.update )
543 SetCursorPosition( callbackData.cursorPosition );
544 SetSurroundingText( callbackData.currentText );
546 NotifyCursorPosition();
552 * Called when an IMF retrieve surround event is received.
553 * Here the IMF module wishes to know the string we are working with and where within the string the cursor is
554 * We need to signal the application to tell us this information.
556 Eina_Bool ImfManager::RetrieveSurrounding( void* data, Ecore_IMF_Context* imfContext, char** text, int* cursorPosition )
558 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::RetrieveSurrounding\n" );
560 Dali::ImfManager::ImfEventData imfData( Dali::ImfManager::GETSURROUNDING, std::string(), 0, 0 );
561 Dali::ImfManager handle( this );
562 mEventSignal.Emit( handle, imfData );
566 *text = strdup( mSurroundingText.c_str() );
571 *cursorPosition = mIMFCursorPosition;
578 * Called when an IMF delete surrounding event is received.
579 * Here we tell the application that it should delete a certain range.
581 void ImfManager::DeleteSurrounding( void* data, Ecore_IMF_Context* imfContext, void* event_info )
583 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DeleteSurrounding\n" );
585 if( Dali::Adaptor::IsAvailable() )
587 Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( event_info );
589 Dali::ImfManager::ImfEventData imfData( Dali::ImfManager::DELETESURROUNDING, std::string(), deleteSurroundingEvent->offset, deleteSurroundingEvent->n_chars );
590 Dali::ImfManager handle( this );
591 mEventSignal.Emit( handle, imfData );
596 * Called when the input method sends a private command.
598 void ImfManager::SendPrivateCommand( void* data, Ecore_IMF_Context* imfContext, void* event_info )
600 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SendPrivateCommand\n" );
602 if( Dali::Adaptor::IsAvailable() )
604 const char* privateCommandSendEvent = static_cast<const char*>( event_info );
606 Dali::ImfManager::ImfEventData imfData( Dali::ImfManager::PRIVATECOMMAND, privateCommandSendEvent, 0, 0 );
607 Dali::ImfManager handle( this );
608 mEventSignal.Emit( handle, imfData );
612 void ImfManager::NotifyCursorPosition()
614 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::NotifyCursorPosition\n" );
618 ecore_imf_context_cursor_position_set( mIMFContext, mIMFCursorPosition );
622 void ImfManager::SetCursorPosition( unsigned int cursorPosition )
624 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetCursorPosition\n" );
626 mIMFCursorPosition = static_cast<int>( cursorPosition );
629 unsigned int ImfManager::GetCursorPosition() const
631 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetCursorPosition\n" );
633 return static_cast<unsigned int>( mIMFCursorPosition );
636 void ImfManager::SetSurroundingText( const std::string& text )
638 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetSurroundingText\n" );
640 mSurroundingText = text;
643 const std::string& ImfManager::GetSurroundingText() const
645 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetSurroundingText\n" );
647 return mSurroundingText;
650 void ImfManager::NotifyTextInputMultiLine( bool multiLine )
652 Ecore_IMF_Input_Hints currentHint = ecore_imf_context_input_hint_get(mIMFContext);
653 ecore_imf_context_input_hint_set(mIMFContext, (Ecore_IMF_Input_Hints)(multiLine ?
654 (currentHint | ECORE_IMF_INPUT_HINT_MULTILINE) :
655 (currentHint & ~ECORE_IMF_INPUT_HINT_MULTILINE)));
658 Dali::ImfManager::TextDirection ImfManager::GetTextDirection()
660 Dali::ImfManager::TextDirection direction ( Dali::ImfManager::LeftToRight );
662 if ( ImfManager::IsAvailable() /* We do not want to create an instance of ImfManager */ )
666 char* locale( NULL );
667 ecore_imf_context_input_panel_language_locale_get( mIMFContext, &locale );
671 direction = Locale::GetTextDirection( std::string( locale ) );
679 Rect<int> ImfManager::GetInputMethodArea()
681 int xPos, yPos, width, height;
683 width = height = xPos = yPos = 0;
687 ecore_imf_context_input_panel_geometry_get( mIMFContext, &xPos, &yPos, &width, &height );
691 DALI_LOG_WARNING("VKB Unable to get IMF Context so GetSize unavailable\n");
692 // return 0 as real size unknown.
695 return Rect<int>(xPos,yPos,width,height);
698 void ImfManager::ApplyOptions( const InputMethodOptions& options )
700 using namespace Dali::InputMethod::Category;
704 if (mIMFContext == NULL)
706 DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");
710 if ( mOptions.CompareAndSet(PANEL_LAYOUT, options, index) )
712 ecore_imf_context_input_panel_layout_set( mIMFContext, panelLayoutMap[index] );
714 if ( mOptions.CompareAndSet(AUTO_CAPITALISE, options, index) )
716 ecore_imf_context_autocapital_type_set( mIMFContext, autoCapitalMap[index] );
718 if ( mOptions.CompareAndSet(ACTION_BUTTON_TITLE, options, index) )
720 ecore_imf_context_input_panel_return_key_type_set( mIMFContext, returnKeyTypeMap[index] );
722 if ( mOptions.CompareAndSet(VARIATION, options, index) )
724 ecore_imf_context_input_panel_layout_variation_set( mIMFContext, index );
728 void ImfManager::SetInputPanelUserData( const std::string& data )
730 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetInputPanelUserData\n" );
734 int length = data.length();
735 ecore_imf_context_input_panel_imdata_set( mIMFContext, &data, length );
739 void ImfManager::GetInputPanelUserData( std::string& data )
741 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelUserData\n" );
746 ecore_imf_context_input_panel_imdata_get( mIMFContext, &data, length );
750 Dali::ImfManager::State ImfManager::GetInputPanelState()
752 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetInputPanelState\n" );
757 value = ecore_imf_context_input_panel_state_get( mIMFContext );
761 case ECORE_IMF_INPUT_PANEL_STATE_SHOW:
763 return Dali::ImfManager::SHOW;
767 case ECORE_IMF_INPUT_PANEL_STATE_HIDE:
769 return Dali::ImfManager::HIDE;
773 case ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW:
775 return Dali::ImfManager::WILL_SHOW;
781 return Dali::ImfManager::DEFAULT;
785 return Dali::ImfManager::DEFAULT;
788 void ImfManager::SetReturnKeyState( bool visible )
790 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetReturnKeyState\n" );
794 ecore_imf_context_input_panel_return_key_disabled_set( mIMFContext, !visible );
798 void ImfManager::AutoEnableInputPanel( bool enabled )
800 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::AutoEnableInputPanel\n" );
804 ecore_imf_context_input_panel_enabled_set( mIMFContext, enabled );
808 void ImfManager::ShowInputPanel()
810 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::ShowInputPanel\n" );
814 ecore_imf_context_input_panel_show( mIMFContext );
818 void ImfManager::HideInputPanel()
820 DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::HideInputPanel\n" );
824 ecore_imf_context_input_panel_hide( mIMFContext );