2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an ”AS IS” BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiIInputConnectionProvider.h
20 * @brief This is the header file for the %IInputConnectionProvider interface.
22 * This header file contains the declarations of the %IInputConnectionProvider interface.
27 #ifndef _FUI_IINPUT_CONNECTION_PROVIDER_H_
28 #define _FUI_IINPUT_CONNECTION_PROVIDER_H_
30 #include <FOspConfig.h>
32 namespace Tizen { namespace Base {
36 namespace Tizen { namespace Ui {
38 class InputConnection;
41 * @interface IInputConnectionProvider
42 * @brief This interface defines methods for processing between the InputConnection and the input method.
46 * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current active Input Method.
48 class _OSP_EXPORT_ IInputConnectionProvider
52 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
56 virtual ~IInputConnectionProvider(void) {}
59 * Called when the text needs to be deleted.
62 * @param[in] source The source of the event
63 * @param[in] offset The position to delete before the current cursor position
64 * @param[in] charCount The number of characters to delete
66 virtual void DeleteSurroundingText(Tizen::Ui::InputConnection& source, int offset, int charCount) = 0;
69 * Called when the input method requests the previous text.
72 * @param[in] source The source of the event
73 * @param[out] text The text to send to the Input Method
74 * @param[out] cursorPosition The current cursor position to send to the Input Method
75 * @remarks The text will be used for processing the auto-capitalization/auto-period. At least three letters in front of the cursor are required.
77 virtual void GetPreviousText(Tizen::Ui::InputConnection& source, Tizen::Base::String& text, int& cursorPosition) = 0;
81 // This method is for internal use only. Using this method can cause behavioral, security-related,
82 // and consistency-related issues in the application.
84 // This method is reserved and may change its name at any time without
87 virtual void IInputConnectionProvider_Reserved1(void) {}
90 // This method is for internal use only. Using this method can cause behavioral, security-related,
91 // and consistency-related issues in the application.
93 // This method is reserved and may change its name at any time without
96 virtual void IInputConnectionProvider_Reserved2(void) {}
99 // This method is for internal use only. Using this method can cause behavioral, security-related,
100 // and consistency-related issues in the application.
102 // This method is reserved and may change its name at any time without
105 virtual void IInputConnectionProvider_Reserved3(void) {}
106 }; // IInputConnectionProvider
109 #endif // _FUI_IINPUT_CONNECTION_PROVIDER_H_