| 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_mode.h" |
| 13 #include "ui/base/ime/text_input_type.h" | 13 #include "ui/base/ime/text_input_type.h" |
| 14 #include "ui/base/ui_export.h" | 14 #include "ui/base/ui_base_export.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 #include "ui/gfx/range/range.h" | 16 #include "ui/gfx/range/range.h" |
| 17 | 17 |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Rect; | 19 class Rect; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace ui { | 22 namespace ui { |
| 23 | 23 |
| 24 // An interface implemented by a View that needs text input support. | 24 // An interface implemented by a View that needs text input support. |
| 25 class UI_EXPORT TextInputClient { | 25 class UI_BASE_EXPORT TextInputClient { |
| 26 public: | 26 public: |
| 27 virtual ~TextInputClient(); | 27 virtual ~TextInputClient(); |
| 28 | 28 |
| 29 // Input method result ------------------------------------------------------- | 29 // Input method result ------------------------------------------------------- |
| 30 | 30 |
| 31 // Sets composition text and attributes. If there is composition text already, | 31 // Sets composition text and attributes. If there is composition text already, |
| 32 // it'll be replaced by the new one. Otherwise, current selection will be | 32 // it'll be replaced by the new one. Otherwise, current selection will be |
| 33 // replaced. If there is no selection, the composition text will be inserted | 33 // replaced. If there is no selection, the composition text will be inserted |
| 34 // at the insertion point. | 34 // at the insertion point. |
| 35 virtual void SetCompositionText(const ui::CompositionText& composition) = 0; | 35 virtual void SetCompositionText(const ui::CompositionText& composition) = 0; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 virtual void OnCandidateWindowShown() = 0; | 152 virtual void OnCandidateWindowShown() = 0; |
| 153 // Called when IME updates any appearance of the current candidate window. | 153 // Called when IME updates any appearance of the current candidate window. |
| 154 virtual void OnCandidateWindowUpdated() = 0; | 154 virtual void OnCandidateWindowUpdated() = 0; |
| 155 // Called when IME hides the candidate window. | 155 // Called when IME hides the candidate window. |
| 156 virtual void OnCandidateWindowHidden() = 0; | 156 virtual void OnCandidateWindowHidden() = 0; |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace ui | 159 } // namespace ui |
| 160 | 160 |
| 161 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 161 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |