Move ECore_Wayland specific code to ecore folder
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / imf-manager-impl-ecore-wl.cpp
1 /*
2  * Copyright (c) 2014 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 // CLASS HEADER
19 #include <imf-manager-impl.h>
20
21 // EXTERNAL INCLUDES
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>
25
26 // INTERNAL INCLUDES
27 #include <adaptor.h>
28 #include <window-render-surface.h>
29 #include <adaptor-impl.h>
30 #include <singleton-service-impl.h>
31 #include <virtual-keyboard-impl.h>
32
33 namespace Dali
34 {
35
36 namespace Internal
37 {
38
39 namespace Adaptor
40 {
41
42 namespace
43 {
44
45 BaseHandle Create()
46 {
47   return ImfManager::Get();
48 }
49
50 TypeRegistration IMF_MANAGER_TYPE( typeid(Dali::ImfManager), typeid(Dali::BaseHandle), Create );
51
52 } // unnamed namespace
53
54 bool ImfManager::IsAvailable()
55 {
56   return false;
57 }
58
59 Dali::ImfManager ImfManager::Get()
60 {
61   // Return empty handle as not supported
62   return Dali::ImfManager();
63 }
64
65 ImfManager::~ImfManager()
66 {
67 }
68
69 void ImfManager::DeleteContext()
70 {
71 }
72
73 void ImfManager::ConnectCallbacks()
74 {
75 }
76
77 void ImfManager::DisconnectCallbacks()
78 {
79 }
80
81 void ImfManager::Activate()
82 {
83 }
84
85 void ImfManager::Deactivate()
86 {
87 }
88
89 void ImfManager::Reset()
90 {
91 }
92
93 Ecore_IMF_Context* ImfManager::GetContext()
94 {
95   return mIMFContext;
96 }
97
98 bool ImfManager::RestoreAfterFocusLost() const
99 {
100   return mRestoreAfterFocusLost;
101 }
102
103 void ImfManager::SetRestoreAfterFocusLost( bool toggle )
104 {
105   mRestoreAfterFocusLost = toggle;
106 }
107
108 void ImfManager::PreEditChanged( void *, Ecore_IMF_Context *imfContext, void *event_info )
109 {
110 }
111
112 void ImfManager::CommitReceived( void *, Ecore_IMF_Context *imfContext, void *event_info )
113 {
114 }
115
116 Eina_Bool ImfManager::RetrieveSurrounding( void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )
117 {
118   return EINA_TRUE;
119 }
120
121 void ImfManager::DeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
122 {
123 }
124
125 void ImfManager::NotifyCursorPosition()
126 {
127 }
128
129 void ImfManager::SetCursorPosition( unsigned int cursorPosition )
130 {
131   mIMFCursorPosition = static_cast<int>( cursorPosition );
132 }
133
134 unsigned int ImfManager::GetCursorPosition() const
135 {
136   return static_cast<unsigned int>( mIMFCursorPosition );
137 }
138
139 void ImfManager::SetSurroundingText( const std::string& text )
140 {
141   mSurroundingText = text;
142 }
143
144 const std::string& ImfManager::GetSurroundingText() const
145 {
146   return mSurroundingText;
147 }
148
149 } // Adaptor
150
151 } // Internal
152
153 } // Dali