Merge "Move KeyGrab and Internal Widget from internal to public" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / input / common / imf-manager-impl.cpp
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
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>
22
23 namespace Dali
24 {
25 namespace Internal
26 {
27
28 namespace Adaptor
29 {
30
31
32 bool ImfManager::IsAvailable()
33 {
34   bool available(false);
35
36   Dali::SingletonService service(SingletonService::Get());
37   if(service)
38   {
39     available = service.GetSingleton(typeid(Dali::ImfManager));
40   }
41
42   return available;
43 }
44
45 Dali::ImfManager ImfManager::Get()
46 {
47   return Dali::Internal::Adaptor::ImfManagerFactory::CreateImfManager();
48 }
49
50 ImfManager::~ImfManager()
51 {}
52
53 void ImfManager::Finalize()
54 {}
55
56 void ImfManager::NotifyCursorPosition()
57 {}
58
59 void ImfManager::ConnectCallbacks()
60 {}
61
62 void ImfManager::DisconnectCallbacks()
63 {}
64
65 void ImfManager::Activate()
66 {}
67
68 void ImfManager::Deactivate()
69 {}
70
71 void ImfManager::Reset()
72 {}
73
74 ImfContext *ImfManager::GetContext()
75 {
76   return nullptr;
77 }
78
79 bool ImfManager::RestoreAfterFocusLost() const
80 {
81   return false;
82 }
83
84 void ImfManager::SetRestoreAfterFocusLost(bool toggle)
85 {}
86
87 void ImfManager::PreEditChanged(void *data, ImfContext *imfContext, void *event_info)
88 {}
89
90 void ImfManager::CommitReceived(void *data, ImfContext *imfContext, void *event_info)
91 {}
92
93 bool ImfManager::RetrieveSurrounding(void *data, ImfContext *imfContext, char **text, int *cursorPosition)
94 {
95   return false;
96 }
97
98 void ImfManager::DeleteSurrounding(void *data, ImfContext *imfContext, void *event_info)
99 {}
100
101 void ImfManager::SendPrivateCommand(void *data, ImfContext *imfContext, void *event_info)
102 {}
103
104 void ImfManager::SetCursorPosition(unsigned int cursorPosition)
105 {}
106
107 unsigned int ImfManager::GetCursorPosition() const
108 {
109   return 0;
110 }
111
112 void ImfManager::SetSurroundingText(const std::string &text)
113 {}
114
115 const std::string &ImfManager::GetSurroundingText() const
116 {
117   static std::string str("");
118   return str;
119 }
120
121 void ImfManager::NotifyTextInputMultiLine(bool multiLine)
122 {}
123
124 Dali::ImfManager::TextDirection ImfManager::GetTextDirection()
125 {
126   return Dali::ImfManager::TextDirection();
127 }
128
129 Dali::Rect<int> ImfManager::GetInputMethodArea()
130 {
131   return Dali::Rect<int>();
132 }
133
134 void ImfManager::ApplyOptions(const InputMethodOptions &options)
135 {}
136
137 void ImfManager::SetInputPanelData(const std::string &data)
138 {}
139
140 void ImfManager::GetInputPanelData(std::string &data)
141 {}
142
143 Dali::ImfManager::State ImfManager::GetInputPanelState()
144 {
145   return Dali::ImfManager::State();
146 }
147
148 void ImfManager::SetReturnKeyState(bool visible)
149 {}
150
151 void ImfManager::AutoEnableInputPanel(bool enabled)
152 {}
153
154 void ImfManager::ShowInputPanel()
155 {}
156
157 void ImfManager::HideInputPanel()
158 {}
159
160 Dali::ImfManager::KeyboardType ImfManager::GetKeyboardType()
161 {
162   return Dali::ImfManager::KeyboardType();
163 }
164
165 std::string ImfManager::GetInputPanelLocale()
166 {
167   return std::string();
168 }
169
170 }
171 }
172 }