Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiIInputConnectionProvider.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file                FUiIInputConnectionProvider.h
20  * @brief       This is the header file for the %IInputConnectionProvider class.
21  *
22  * This header file contains the declarations of the %IInputConnectionProvider class.
23  *
24  *
25  */
26
27 #ifndef _FUI_IINPUT_CONNECTION_PROVIDER_H_
28 #define _FUI_IINPUT_CONNECTION_PROVIDER_H_
29
30 #include <FOspConfig.h>
31
32 namespace Tizen { namespace Base {
33         class String;
34 }} // Tizen::Base
35
36 namespace Tizen { namespace Ui {
37
38 class InputConnection;
39
40 /**
41  * @class       IInputConnectionProvider
42  * @brief       This is the header file for the %IInputConnectionProvider class.
43  * This header file contains the declarations of the %IInputConnectionProvider class.
44  * It's possible to not work the callback depending on the current active Input Method.
45  * @since 2.0
46  *
47  * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method.
48  */
49 class _OSP_EXPORT_ IInputConnectionProvider
50 {
51 public:
52         /**
53          * 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.
54          *
55          * @since 2.0
56          */
57         virtual ~IInputConnectionProvider(void) {}
58
59         /**
60          * Called when the text needs to be deleted.
61          *
62          * @since 2.0
63          * @param[in]       source                  The source of the event
64          * @param[in]       offset                   The position to delete before the current cursor position.
65          * @param[in]       charCount             The number of characters to delete
66          */
67         virtual void DeleteSurroundingText(Tizen::Ui::InputConnection& source, int offset, int charCount) = 0;
68
69         /**
70          * Called when the input method requests the previous text.
71          *
72          * @since 2.0
73          * @param[in]   source          The source of the event
74          * @param[out]  text                    The text to send to the Input Method
75          * @param[out]  cursorPosition  The current cursor position to send to the Input Method
76          * @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          */
78         virtual void GetPreviousText(Tizen::Ui::InputConnection& source, Tizen::Base::String& text, int& cursorPosition) = 0;
79
80 protected:
81         //
82         // This method is for internal use only. Using this method can cause behavioral, security-related,
83         // and consistency-related issues in the application.
84         //
85         // This method is reserved and may change its name at any time without
86         // prior notice.
87         //
88         virtual void IInputConnectionProvider_Reserved1(void) {}
89
90         //
91         // This method is for internal use only. Using this method can cause behavioral, security-related,
92         // and consistency-related issues in the application.
93         //
94         // This method is reserved and may change its name at any time without
95         // prior notice.
96         //
97         virtual void IInputConnectionProvider_Reserved2(void) {}
98
99         //
100         // This method is for internal use only. Using this method can cause behavioral, security-related,
101         // and consistency-related issues in the application.
102         //
103         // This method is reserved and may change its name at any time without
104         // prior notice.
105         //
106         virtual void IInputConnectionProvider_Reserved3(void) {}
107 }; // IInputConnectionProvider
108
109 }} // Tizen::Ui
110 #endif // _FUI_IINPUT_CONNECTION_PROVIDER_H_
111