| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // TODO(ime): Have a clear spec whether the returned value is DIP or not. | 92 // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
| 93 // http://crbug.com/360334 | 93 // http://crbug.com/360334 |
| 94 virtual bool GetCompositionCharacterBounds(uint32 index, | 94 virtual bool GetCompositionCharacterBounds(uint32 index, |
| 95 gfx::Rect* rect) const = 0; | 95 gfx::Rect* rect) const = 0; |
| 96 | 96 |
| 97 // Returns true if there is composition text. | 97 // Returns true if there is composition text. |
| 98 virtual bool HasCompositionText() const = 0; | 98 virtual bool HasCompositionText() const = 0; |
| 99 | 99 |
| 100 // Document content operations ---------------------------------------------- | 100 // Document content operations ---------------------------------------------- |
| 101 | 101 |
| 102 // Retrieves the UTF-16 based character range containing accessibled text in | 102 // Retrieves the UTF-16 based character range containing accessible text in |
| 103 // the View. It must cover the composition and selection range. | 103 // the View. It must cover the composition and selection range. |
| 104 // Returns false if the information cannot be retrieved right now. | 104 // Returns false if the information cannot be retrieved right now. |
| 105 virtual bool GetTextRange(gfx::Range* range) const = 0; | 105 virtual bool GetTextRange(gfx::Range* range) const = 0; |
| 106 | 106 |
| 107 // Retrieves the UTF-16 based character range of current composition text. | 107 // Retrieves the UTF-16 based character range of current composition text. |
| 108 // Returns false if the information cannot be retrieved right now. | 108 // Returns false if the information cannot be retrieved right now. |
| 109 virtual bool GetCompositionTextRange(gfx::Range* range) const = 0; | 109 virtual bool GetCompositionTextRange(gfx::Range* range) const = 0; |
| 110 | 110 |
| 111 // Retrieves the UTF-16 based character range of current selection. | 111 // Retrieves the UTF-16 based character range of current selection. |
| 112 // Returns false if the information cannot be retrieved right now. | 112 // Returns false if the information cannot be retrieved right now. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // 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 |
| 170 // 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 |
| 171 // (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 |
| 172 // 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. |
| 173 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; | 173 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 } // namespace ui | 176 } // namespace ui |
| 177 | 177 |
| 178 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 178 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |