2 * Copyright (c) 2018 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.
18 #include <dali/internal/input/common/imf-manager-impl.h>
19 #include <dali/internal/input/common/imf-manager-factory.h>
20 #include <dali/internal/system/common/locale-utils.h>
21 #include <dali/internal/system/common/singleton-service-impl.h>
32 bool ImfManager::IsAvailable()
34 bool available(false);
36 Dali::SingletonService service(SingletonService::Get());
39 available = service.GetSingleton(typeid(Dali::ImfManager));
45 Dali::ImfManager ImfManager::Get()
47 return Dali::Internal::Adaptor::ImfManagerFactory::CreateImfManager();
50 ImfManager::~ImfManager()
53 void ImfManager::Finalize()
56 void ImfManager::NotifyCursorPosition()
59 void ImfManager::ConnectCallbacks()
62 void ImfManager::DisconnectCallbacks()
65 void ImfManager::Activate()
68 void ImfManager::Deactivate()
71 void ImfManager::Reset()
74 ImfContext *ImfManager::GetContext()
79 bool ImfManager::RestoreAfterFocusLost() const
84 void ImfManager::SetRestoreAfterFocusLost(bool toggle)
87 void ImfManager::PreEditChanged(void *data, ImfContext *imfContext, void *event_info)
90 void ImfManager::CommitReceived(void *data, ImfContext *imfContext, void *event_info)
93 bool ImfManager::RetrieveSurrounding(void *data, ImfContext *imfContext, char **text, int *cursorPosition)
98 void ImfManager::DeleteSurrounding(void *data, ImfContext *imfContext, void *event_info)
101 void ImfManager::SendPrivateCommand(void *data, ImfContext *imfContext, void *event_info)
104 void ImfManager::SetCursorPosition(unsigned int cursorPosition)
107 unsigned int ImfManager::GetCursorPosition() const
112 void ImfManager::SetSurroundingText(const std::string &text)
115 const std::string &ImfManager::GetSurroundingText() const
117 static std::string str("");
121 void ImfManager::NotifyTextInputMultiLine(bool multiLine)
124 Dali::ImfManager::TextDirection ImfManager::GetTextDirection()
126 return Dali::ImfManager::TextDirection();
129 Dali::Rect<int> ImfManager::GetInputMethodArea()
131 return Dali::Rect<int>();
134 void ImfManager::ApplyOptions(const InputMethodOptions &options)
137 void ImfManager::SetInputPanelData(const std::string &data)
140 void ImfManager::GetInputPanelData(std::string &data)
143 Dali::ImfManager::State ImfManager::GetInputPanelState()
145 return Dali::ImfManager::State();
148 void ImfManager::SetReturnKeyState(bool visible)
151 void ImfManager::AutoEnableInputPanel(bool enabled)
154 void ImfManager::ShowInputPanel()
157 void ImfManager::HideInputPanel()
160 Dali::ImfManager::KeyboardType ImfManager::GetKeyboardType()
162 return Dali::ImfManager::KeyboardType();
165 std::string ImfManager::GetInputPanelLocale()
167 return std::string();