| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // This method will be called whenever a char is generated by the keyboard, | 53 // This method will be called whenever a char is generated by the keyboard, |
| 54 // even if the current text input type is TEXT_INPUT_TYPE_NONE. | 54 // even if the current text input type is TEXT_INPUT_TYPE_NONE. |
| 55 virtual void InsertChar(char16 ch, int flags) = 0; | 55 virtual void InsertChar(char16 ch, int flags) = 0; |
| 56 | 56 |
| 57 // Input context information ------------------------------------------------- | 57 // Input context information ------------------------------------------------- |
| 58 | 58 |
| 59 // Returns current text input type. It could be changed and even becomes | 59 // Returns current text input type. It could be changed and even becomes |
| 60 // TEXT_INPUT_TYPE_NONE at runtime. | 60 // TEXT_INPUT_TYPE_NONE at runtime. |
| 61 virtual ui::TextInputType GetTextInputType() const = 0; | 61 virtual ui::TextInputType GetTextInputType() const = 0; |
| 62 | 62 |
| 63 // Returns current caret (insertion point) bounds relative to the View’s | 63 // Returns current caret (insertion point) bounds relative to the screen |
| 64 // coordinates. If there is selection, then the selection bounds will be | 64 // coordinates. If there is selection, then the selection bounds will be |
| 65 // returned. | 65 // returned. |
| 66 // TODO(yusukes): Currently views::NativeTextfieldViews which implements this |
| 67 // interface returns its view's coordinates. We should to do the following: |
| 68 // 1) Modify NativeTextfieldViews so it returns screen coordinates. |
| 69 // 2) Remove view-to-screen coordinates conversion code in InputMethodBridge. |
| 70 // 3) Modify InputMethodWin. It requires a rect in toplevel window's |
| 71 // coordinates instead of screen. |
| 66 virtual gfx::Rect GetCaretBounds() = 0; | 72 virtual gfx::Rect GetCaretBounds() = 0; |
| 67 | 73 |
| 68 // Returns true if there is composition text. | 74 // Returns true if there is composition text. |
| 69 virtual bool HasCompositionText() = 0; | 75 virtual bool HasCompositionText() = 0; |
| 70 | 76 |
| 71 // Document content operations ---------------------------------------------- | 77 // Document content operations ---------------------------------------------- |
| 72 | 78 |
| 73 // Retrieves the UTF-16 based character range containing accessibled text in | 79 // Retrieves the UTF-16 based character range containing accessibled text in |
| 74 // the View. It must cover the composition and selection range. | 80 // the View. It must cover the composition and selection range. |
| 75 // Returns false if the information cannot be retrieved right now. | 81 // Returns false if the information cannot be retrieved right now. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // alignment of the current text box. It’s for supporting ctrl-shift on | 116 // alignment of the current text box. It’s for supporting ctrl-shift on |
| 111 // Windows. | 117 // Windows. |
| 112 // Returns false if the operation is not supported. | 118 // Returns false if the operation is not supported. |
| 113 virtual bool ChangeTextDirectionAndLayoutAlignment( | 119 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 114 base::i18n::TextDirection direction) = 0; | 120 base::i18n::TextDirection direction) = 0; |
| 115 }; | 121 }; |
| 116 | 122 |
| 117 } // namespace ui | 123 } // namespace ui |
| 118 | 124 |
| 119 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 125 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |