| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "ui/base/ime/composition_text.h" | 13 #include "ui/base/ime/composition_text.h" |
| 14 #include "ui/base/ime/text_input_mode.h" | 14 #include "ui/base/ime/text_input_mode.h" |
| 15 #include "ui/base/ime/text_input_type.h" | 15 #include "ui/base/ime/text_input_type.h" |
| 16 #include "ui/base/ime/ui_base_ime_export.h" | 16 #include "ui/base/ime/ui_base_ime_export.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 18 #include "ui/gfx/range/range.h" | 18 #include "ui/gfx/range/range.h" |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 class Rect; | 21 class Rect; |
| 22 class RenderText; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace ui { | 25 namespace ui { |
| 25 | 26 |
| 26 class KeyEvent; | 27 class KeyEvent; |
| 27 | 28 |
| 28 // An interface implemented by a View that needs text input support. | 29 // An interface implemented by a View that needs text input support. |
| 29 class UI_BASE_IME_EXPORT TextInputClient { | 30 class UI_BASE_IME_EXPORT TextInputClient { |
| 30 public: | 31 public: |
| 31 virtual ~TextInputClient(); | 32 virtual ~TextInputClient(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 169 |
| 169 // Returns true if |command_id| is currently allowed to be executed. | 170 // Returns true if |command_id| is currently allowed to be executed. |
| 170 virtual bool IsEditCommandEnabled(int command_id) = 0; | 171 virtual bool IsEditCommandEnabled(int command_id) = 0; |
| 171 | 172 |
| 172 // Execute the command specified by |command_id| on the next key event. | 173 // Execute the command specified by |command_id| on the next key event. |
| 173 // This allows a TextInputClient to be informed of a platform-independent edit | 174 // This allows a TextInputClient to be informed of a platform-independent edit |
| 174 // command that has been derived from the key event currently being dispatched | 175 // command that has been derived from the key event currently being dispatched |
| 175 // (but not yet sent to the TextInputClient). The edit command will take into | 176 // (but not yet sent to the TextInputClient). The edit command will take into |
| 176 // account any OS-specific, or user-specified, keybindings that may be set up. | 177 // account any OS-specific, or user-specified, keybindings that may be set up. |
| 177 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; | 178 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; |
| 179 |
| 180 // |
| 181 const gfx::RenderText* GetTextAtPointInWindow(const gfx::Point& point, |
| 182 gfx::Range* range, |
| 183 gfx::Point* baseline_point) = 0; |
| 178 }; | 184 }; |
| 179 | 185 |
| 180 } // namespace ui | 186 } // namespace ui |
| 181 | 187 |
| 182 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 188 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |