Pepper_47_C++_interfaces
Public Member Functions | List of all members
pp::TextInputController Class Reference

#include <text_input_controller.h>

Collaboration diagram for pp::TextInputController:
Collaboration graph

Public Member Functions

 TextInputController (const InstanceHandle &instance)
 
 ~TextInputController ()
 Destructor. More...
 
void SetTextInputType (PP_TextInput_Type type)
 
void UpdateCaretPosition (const Rect &caret)
 
void CancelCompositionText ()
 
void UpdateSurroundingText (const Var &text, uint32_t caret, uint32_t anchor)
 

Detailed Description

This class can be used for giving hints to the browser about the text input status of plugins.

Definition at line 24 of file text_input_controller.h.

Constructor & Destructor Documentation

pp::TextInputController::TextInputController ( const InstanceHandle instance)
explicit

A constructor for creating a TextInputController.

Parameters
[in]instanceThe instance with which this resource will be associated.

Definition at line 22 of file text_input_controller.cc.

pp::TextInputController::~TextInputController ( )

Destructor.

Definition at line 26 of file text_input_controller.cc.

Member Function Documentation

void pp::TextInputController::CancelCompositionText ( )

CancelCompositionText() informs the browser that the current composition text is cancelled by the plugin.

Definition at line 43 of file text_input_controller.cc.

References pp::InstanceHandle::pp_instance().

void pp::TextInputController::SetTextInputType ( PP_TextInput_Type  type)

SetTextInputType() informs the browser about the current text input mode of the plugin.

Parameters
[in]typeThe type of text input type.

Definition at line 29 of file text_input_controller.cc.

References pp::InstanceHandle::pp_instance().

void pp::TextInputController::UpdateCaretPosition ( const Rect caret)

UpdateCaretPosition() informs the browser about the coordinates of the text input caret area.

Parameters
[in]caretA rectangle indicating the caret area.

Definition at line 36 of file text_input_controller.cc.

References pp::InstanceHandle::pp_instance(), and pp::Rect::pp_rect().

void pp::TextInputController::UpdateSurroundingText ( const Var text,
uint32_t  caret,
uint32_t  anchor 
)

UpdateSurroundingText() informs the browser about the current text selection and surrounding text.

Parameters
[in]textA UTF-8 sting indicating string buffer of current input context.
[in]caretA integer indicating the byte index of caret location in text.
[in]caretA integer indicating the byte index of anchor location in text. If there is no selection, this value should be equal to caret.

Definition at line 50 of file text_input_controller.cc.

References pp::InstanceHandle::pp_instance(), and pp::Var::pp_var().


The documentation for this class was generated from the following files: