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.
19 #include <dali/internal/input/common/virtual-keyboard-impl.h>
22 //#include <X11/Xlib.h>
23 //#include <Ecore_X.h>
26 #include <dali/integration-api/debug.h>
29 #include <dali/integration-api/adaptor.h>
30 #include <dali/internal/system/common/locale-utils.h>
31 #include <dali/internal/input/windows/input-method-context-impl-win.h>
42 namespace VirtualKeyboard
58 void ApplySettings( const Property::Map& settingsMap )
63 void EnablePrediction( const bool enable )
68 bool IsPredictionEnabled()
73 Rect<int> GetSizeAndPosition()
79 Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal()
81 Dali::VirtualKeyboard::StatusSignalType ret;
85 Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal()
87 Dali::VirtualKeyboard::KeyboardResizedSignalType ret;
91 Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal()
93 Dali::VirtualKeyboard::LanguageChangedSignalType ret;
97 Dali::VirtualKeyboard::TextDirection GetTextDirection()
99 return Dali::VirtualKeyboard::LeftToRight;
102 Dali::InputMethod::ActionButton gActionButtonFunction = Dali::InputMethod::ACTION_DEFAULT;
104 //Ecore_IMF_Input_Panel_Return_Key_Type buttonActionMapping(Dali::InputMethod::ButtonAction::Type buttonAction )
106 // switch( buttonAction )
108 // case InputMethod::ButtonAction::DEFAULT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
109 // case InputMethod::ButtonAction::DONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
110 // case InputMethod::ButtonAction::GO: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
111 // case InputMethod::ButtonAction::JOIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
112 // case InputMethod::ButtonAction::LOGIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
113 // case InputMethod::ButtonAction::NEXT: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
114 // case InputMethod::ButtonAction::PREVIOUS: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
115 // case InputMethod::ButtonAction::SEARCH: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
116 // case InputMethod::ButtonAction::SEND: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
117 // case InputMethod::ButtonAction::SIGNIN: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
118 // case InputMethod::ButtonAction::UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
119 // case InputMethod::ButtonAction::NONE: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
120 // default: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
124 void RotateTo(int angle)
126 // Get focus window used by Keyboard and rotate it
127 //Display* display = XOpenDisplay(0);
130 // ::Window focusWindow;
132 // // Get Focus window
133 // XGetInputFocus(display, &focusWindow, &revert);
135 // ecore_x_window_prop_property_set( focusWindow,
136 // ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
137 // ECORE_X_ATOM_CARDINAL, 32, &angle, 1 );
138 // XCloseDisplay(display);
142 void SetReturnKeyType( const InputMethod::ButtonAction::Type type )
144 //Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) when setting values
145 //Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>(ImfManager::GetImplementation( imfManager ).GetContext());
149 // gActionButtonFunction = type;
150 // ecore_imf_context_input_panel_return_key_type_set( imfContext, actionButtonMapping( type ) );
154 Dali::InputMethod::ButtonAction::Type GetReturnKeyType()
156 return Dali::InputMethod::ButtonAction::DEFAULT;
159 } // namespace VirtualKeyboard
161 } // namespace Adaptor
163 } // namespace Internal