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>
28 #include <window-render-surface.h>
29 #include <adaptor-impl.h>
30 #include <singleton-service-impl.h>
31 #include <virtual-keyboard-impl.h>
42 bool ImfManager::IsAvailable()
47 Dali::ImfManager ImfManager::Get()
49 // Return empty handle as not supported
50 return Dali::ImfManager();
53 ImfManager::~ImfManager()
57 void ImfManager::DeleteContext()
61 void ImfManager::ConnectCallbacks()
65 void ImfManager::DisconnectCallbacks()
69 void ImfManager::Activate()
73 void ImfManager::Deactivate()
77 void ImfManager::Reset()
81 Ecore_IMF_Context* ImfManager::GetContext()
86 bool ImfManager::RestoreAfterFocusLost() const
88 return mRestoreAfterFocusLost;
91 void ImfManager::SetRestoreAfterFocusLost( bool toggle )
93 mRestoreAfterFocusLost = toggle;
96 void ImfManager::PreEditChanged( void *, Ecore_IMF_Context *imfContext, void *event_info )
100 void ImfManager::CommitReceived( void *, Ecore_IMF_Context *imfContext, void *event_info )
104 Eina_Bool ImfManager::RetrieveSurrounding( void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )
109 void ImfManager::DeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
113 void ImfManager::NotifyCursorPosition()
117 void ImfManager::SetCursorPosition( unsigned int cursorPosition )
119 mIMFCursorPosition = static_cast<int>( cursorPosition );
122 unsigned int ImfManager::GetCursorPosition() const
124 return static_cast<unsigned int>( mIMFCursorPosition );
127 void ImfManager::SetSurroundingText( const std::string& text )
129 mSurroundingText = text;
132 const std::string& ImfManager::GetSurroundingText() const
134 return mSurroundingText;