OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 5 #ifndef UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // key states when the character is generated. This method should only be | 50 // key states when the character is generated. This method should only be |
51 // called when a key press is not handled by the input method but still | 51 // called when a key press is not handled by the input method but still |
52 // generates a character (eg. by the keyboard driver). In another word, the | 52 // generates a character (eg. by the keyboard driver). In another word, the |
53 // preceding key press event should not be a VKEY_PROCESSKEY. | 53 // preceding key press event should not be a VKEY_PROCESSKEY. |
54 // This method will be called whenever a char is generated by the keyboard, | 54 // This method will be called whenever a char is generated by the keyboard, |
55 // even if the current text input type is TEXT_INPUT_TYPE_NONE. | 55 // even if the current text input type is TEXT_INPUT_TYPE_NONE. |
56 virtual void InsertChar(base::char16 ch, int flags) = 0; | 56 virtual void InsertChar(base::char16 ch, int flags) = 0; |
57 | 57 |
58 // Input context information ------------------------------------------------- | 58 // Input context information ------------------------------------------------- |
59 | 59 |
60 // Returns native window to which input context is bound. | |
61 virtual gfx::NativeWindow GetAttachedWindow() const = 0; | |
62 | |
63 // Returns current text input type. It could be changed and even becomes | 60 // Returns current text input type. It could be changed and even becomes |
64 // TEXT_INPUT_TYPE_NONE at runtime. | 61 // TEXT_INPUT_TYPE_NONE at runtime. |
65 virtual ui::TextInputType GetTextInputType() const = 0; | 62 virtual ui::TextInputType GetTextInputType() const = 0; |
66 | 63 |
67 // Returns current text input mode. It could be changed and even becomes | 64 // Returns current text input mode. It could be changed and even becomes |
68 // TEXT_INPUT_MODE_DEFAULT at runtime. | 65 // TEXT_INPUT_MODE_DEFAULT at runtime. |
69 virtual ui::TextInputMode GetTextInputMode() const = 0; | 66 virtual ui::TextInputMode GetTextInputMode() const = 0; |
70 | 67 |
71 // Returns the current text input flags, which is a bit map of | 68 // Returns the current text input flags, which is a bit map of |
72 // WebTextInputType defined in blink. This is valid only for web input fileds; | 69 // WebTextInputType defined in blink. This is valid only for web input fileds; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // This allows a TextInputClient to be informed of a platform-independent edit | 169 // This allows a TextInputClient to be informed of a platform-independent edit |
173 // command that has been derived from the key event currently being dispatched | 170 // command that has been derived from the key event currently being dispatched |
174 // (but not yet sent to the TextInputClient). The edit command will take into | 171 // (but not yet sent to the TextInputClient). The edit command will take into |
175 // account any OS-specific, or user-specified, keybindings that may be set up. | 172 // account any OS-specific, or user-specified, keybindings that may be set up. |
176 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; | 173 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; |
177 }; | 174 }; |
178 | 175 |
179 } // namespace ui | 176 } // namespace ui |
180 | 177 |
181 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 178 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
OLD | NEW |