OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |
| 6 #define PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "ppapi/c/ppb_text_input_controller.h" |
| 11 #include "ppapi/cpp/instance_handle.h" |
| 12 |
| 13 namespace pp { |
| 14 |
| 15 class Rect; |
| 16 class Instance; |
| 17 |
| 18 class TextInputController { |
| 19 public: |
| 20 explicit TextInputController(const InstanceHandle& instance); |
| 21 ~TextInputController(); |
| 22 |
| 23 void SetTextInputType(PP_TextInput_Type type); |
| 24 void UpdateCaretPosition(const Rect& caret, const Rect& bounding_box); |
| 25 void CancelCompositionText(); |
| 26 void UpdateSurroundingText(const std::string& text, |
| 27 uint32_t caret, uint32_t anchor); |
| 28 |
| 29 private: |
| 30 InstanceHandle instance_; |
| 31 }; |
| 32 |
| 33 } // namespace pp |
| 34 |
| 35 #endif // PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |
OLD | NEW |