Adaptor refactor
[platform/core/uifw/dali-adaptor.git] / dali / internal / input / common / imf-manager-impl.cpp
1 /*
2  * Copyright (c) 2017 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::NotifyCursorPosition()
54 {}
55
56 void ImfManager::ConnectCallbacks()
57 {}
58
59 void ImfManager::DisconnectCallbacks()
60 {}
61
62 void ImfManager::Activate()
63 {}
64
65 void ImfManager::Deactivate()
66 {}
67
68 void ImfManager::Reset()
69 {}
70
71 ImfContext *ImfManager::GetContext()
72 {
73   return nullptr;
74 }
75
76 bool ImfManager::RestoreAfterFocusLost() const
77 {
78   return false;
79 }
80
81 void ImfManager::SetRestoreAfterFocusLost(bool toggle)
82 {}
83
84 void ImfManager::PreEditChanged(void *data, ImfContext *imfContext, void *event_info)
85 {}
86
87 void ImfManager::CommitReceived(void *data, ImfContext *imfContext, void *event_info)
88 {}
89
90 bool ImfManager::RetrieveSurrounding(void *data, ImfContext *imfContext, char **text, int *cursorPosition)
91 {
92   return false;
93 }
94
95 void ImfManager::DeleteSurrounding(void *data, ImfContext *imfContext, void *event_info)
96 {}
97
98 void ImfManager::SendPrivateCommand(void *data, ImfContext *imfContext, void *event_info)
99 {}
100
101 void ImfManager::SetCursorPosition(unsigned int cursorPosition)
102 {}
103
104 unsigned int ImfManager::GetCursorPosition() const
105 {
106   return 0;
107 }
108
109 void ImfManager::SetSurroundingText(const std::string &text)
110 {}
111
112 const std::string &ImfManager::GetSurroundingText() const
113 {
114   static std::string str("");
115   return str;
116 }
117
118 void ImfManager::NotifyTextInputMultiLine(bool multiLine)
119 {}
120
121 Dali::ImfManager::TextDirection ImfManager::GetTextDirection()
122 {
123   return Dali::ImfManager::TextDirection();
124 }
125
126 Dali::Rect<int> ImfManager::GetInputMethodArea()
127 {
128   return Dali::Rect<int>();
129 }
130
131 void ImfManager::ApplyOptions(const InputMethodOptions &options)
132 {}
133
134 void ImfManager::SetInputPanelData(const std::string &data)
135 {}
136
137 void ImfManager::GetInputPanelData(std::string &data)
138 {}
139
140 Dali::ImfManager::State ImfManager::GetInputPanelState()
141 {
142   return Dali::ImfManager::State();
143 }
144
145 void ImfManager::SetReturnKeyState(bool visible)
146 {}
147
148 void ImfManager::AutoEnableInputPanel(bool enabled)
149 {}
150
151 void ImfManager::ShowInputPanel()
152 {}
153
154 void ImfManager::HideInputPanel()
155 {}
156
157 Dali::ImfManager::KeyboardType ImfManager::GetKeyboardType()
158 {
159   return Dali::ImfManager::KeyboardType();
160 }
161
162 std::string ImfManager::GetInputPanelLocale()
163 {
164   return std::string();
165 }
166
167 }
168 }
169 }