Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
text_input_controller.h
Go to the documentation of this file.
1 // Copyright 2013 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 <stdint.h>
9 
10 #include <string>
11 
12 #include "ppapi/c/ppb_text_input_controller.h"
14 #include "ppapi/cpp/var.h"
15 
18 
19 namespace pp {
20 
21 class Rect;
22 class Instance;
23 
27  public:
32  explicit TextInputController(const InstanceHandle& instance);
33 
36 
41  void SetTextInputType(PP_TextInput_Type type);
42 
47  void UpdateCaretPosition(const Rect& caret);
48 
51  void CancelCompositionText();
52 
65  void UpdateSurroundingText(const Var& text,
66  uint32_t caret,
67  uint32_t anchor);
68 
69  private:
70  InstanceHandle instance_;
71 };
72 
73 } // namespace pp
74 
75 #endif // PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_
void UpdateSurroundingText(const Var &text, uint32_t caret, uint32_t anchor)
Definition: rect.h:21
Definition: instance_handle.h:44
void SetTextInputType(PP_TextInput_Type type)
void UpdateCaretPosition(const Rect &caret)
Definition: text_input_controller.h:26
A generic type used for passing data types between the module and the page.
Definition: var.h:23
~TextInputController()
Destructor.
TextInputController(const InstanceHandle &instance)