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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // 1) Modify NativeTextfieldViews so it returns screen coordinates. | 71 // 1) Modify NativeTextfieldViews so it returns screen coordinates. |
72 // 2) Remove view-to-screen coordinates conversion code in InputMethodBridge. | 72 // 2) Remove view-to-screen coordinates conversion code in InputMethodBridge. |
73 // 3) Modify InputMethodWin. It requires a rect in toplevel window's | 73 // 3) Modify InputMethodWin. It requires a rect in toplevel window's |
74 // coordinates instead of screen. | 74 // coordinates instead of screen. |
75 virtual gfx::Rect GetCaretBounds() = 0; | 75 virtual gfx::Rect GetCaretBounds() = 0; |
76 | 76 |
77 // Retrieves the composition character boundary rectangle relative to the | 77 // Retrieves the composition character boundary rectangle relative to the |
78 // screen coordinates. The |index| is zero-based index of character position | 78 // screen coordinates. The |index| is zero-based index of character position |
79 // in composition text. | 79 // in composition text. |
80 // Returns false if there is no composition text or |index| is out of range. | 80 // Returns false if there is no composition text or |index| is out of range. |
| 81 // The |rect| is not touched in the case of failure. |
81 virtual bool GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) = 0; | 82 virtual bool GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) = 0; |
82 | 83 |
83 // Returns true if there is composition text. | 84 // Returns true if there is composition text. |
84 virtual bool HasCompositionText() = 0; | 85 virtual bool HasCompositionText() = 0; |
85 | 86 |
86 // Document content operations ---------------------------------------------- | 87 // Document content operations ---------------------------------------------- |
87 | 88 |
88 // Retrieves the UTF-16 based character range containing accessibled text in | 89 // Retrieves the UTF-16 based character range containing accessibled text in |
89 // the View. It must cover the composition and selection range. | 90 // the View. It must cover the composition and selection range. |
90 // Returns false if the information cannot be retrieved right now. | 91 // Returns false if the information cannot be retrieved right now. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // alignment of the current text box. It’s for supporting ctrl-shift on | 126 // alignment of the current text box. It’s for supporting ctrl-shift on |
126 // Windows. | 127 // Windows. |
127 // Returns false if the operation is not supported. | 128 // Returns false if the operation is not supported. |
128 virtual bool ChangeTextDirectionAndLayoutAlignment( | 129 virtual bool ChangeTextDirectionAndLayoutAlignment( |
129 base::i18n::TextDirection direction) = 0; | 130 base::i18n::TextDirection direction) = 0; |
130 }; | 131 }; |
131 | 132 |
132 } // namespace ui | 133 } // namespace ui |
133 | 134 |
134 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 135 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
OLD | NEW |