| 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" |
| 11 #include "ui/base/ime/composition_text.h" | 11 #include "ui/base/ime/composition_text.h" |
| 12 #include "ui/base/ime/text_input_mode.h" |
| 12 #include "ui/base/ime/text_input_type.h" | 13 #include "ui/base/ime/text_input_type.h" |
| 13 #include "ui/base/range/range.h" | 14 #include "ui/base/range/range.h" |
| 14 #include "ui/base/ui_export.h" | 15 #include "ui/base/ui_export.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Rect; | 19 class Rect; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace ui { | 22 namespace ui { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 57 |
| 57 // Input context information ------------------------------------------------- | 58 // Input context information ------------------------------------------------- |
| 58 | 59 |
| 59 // Returns native window to which input context is bound. | 60 // Returns native window to which input context is bound. |
| 60 virtual gfx::NativeWindow GetAttachedWindow() const = 0; | 61 virtual gfx::NativeWindow GetAttachedWindow() const = 0; |
| 61 | 62 |
| 62 // Returns current text input type. It could be changed and even becomes | 63 // Returns current text input type. It could be changed and even becomes |
| 63 // TEXT_INPUT_TYPE_NONE at runtime. | 64 // TEXT_INPUT_TYPE_NONE at runtime. |
| 64 virtual ui::TextInputType GetTextInputType() const = 0; | 65 virtual ui::TextInputType GetTextInputType() const = 0; |
| 65 | 66 |
| 67 // Returns current text input mode. It could be changed and even becomes |
| 68 // TEXT_INPUT_MODE_DEFAULT at runtime. |
| 69 virtual ui::TextInputMode GetTextInputMode() const = 0; |
| 70 |
| 66 // Returns if the client supports inline composition currently. | 71 // Returns if the client supports inline composition currently. |
| 67 virtual bool CanComposeInline() const = 0; | 72 virtual bool CanComposeInline() const = 0; |
| 68 | 73 |
| 69 // Returns current caret (insertion point) bounds relative to the screen | 74 // Returns current caret (insertion point) bounds relative to the screen |
| 70 // coordinates. If there is selection, then the selection bounds will be | 75 // coordinates. If there is selection, then the selection bounds will be |
| 71 // returned. | 76 // returned. |
| 72 virtual gfx::Rect GetCaretBounds() = 0; | 77 virtual gfx::Rect GetCaretBounds() = 0; |
| 73 | 78 |
| 74 // Retrieves the composition character boundary rectangle relative to the | 79 // Retrieves the composition character boundary rectangle relative to the |
| 75 // screen coordinates. The |index| is zero-based index of character position | 80 // screen coordinates. The |index| is zero-based index of character position |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; | 143 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; |
| 139 | 144 |
| 140 // Ensure the caret is within |rect|. |rect| is in screen coordinates and | 145 // Ensure the caret is within |rect|. |rect| is in screen coordinates and |
| 141 // may extend beyond the bounds of this TextInputClient. | 146 // may extend beyond the bounds of this TextInputClient. |
| 142 virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0; | 147 virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0; |
| 143 }; | 148 }; |
| 144 | 149 |
| 145 } // namespace ui | 150 } // namespace ui |
| 146 | 151 |
| 147 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 152 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |