Pepper_31_C_interfaces
Public Attributes | List of all members
PPB_TextInput_Dev_0_2 Struct Reference

#include <ppb_text_input_dev.h>

Collaboration diagram for PPB_TextInput_Dev_0_2:
Collaboration graph

Public Attributes

void(* SetTextInputType )(PP_Instance instance, PP_TextInput_Type_Dev type)
 
void(* UpdateCaretPosition )(PP_Instance instance, const struct PP_Rect *caret, const struct PP_Rect *bounding_box)
 
void(* CancelCompositionText )(PP_Instance instance)
 
void(* UpdateSurroundingText )(PP_Instance instance, const char *text, uint32_t caret, uint32_t anchor)
 
void(* SelectionChanged )(PP_Instance instance)
 

Detailed Description

PPB_TextInput_Dev provides a set of functions for giving hints to the browser about the text input status of plugins, and functions for controlling input method editors (IMEs).

Definition at line 70 of file ppb_text_input_dev.h.

Member Data Documentation

void(* PPB_TextInput_Dev_0_2::CancelCompositionText)(PP_Instance instance)

Cancels the current composition in IME.

Definition at line 90 of file ppb_text_input_dev.h.

void(* PPB_TextInput_Dev_0_2::SelectionChanged)(PP_Instance instance)

Informs the browser when a range of text selection is changed in a plugin. When the browser needs to know the content of the updated selection, it pings back by PPP_TextInput_Dev::RequestSurroundingText. The plugin then should send the information with UpdateSurroundingText.

Definition at line 125 of file ppb_text_input_dev.h.

void(* PPB_TextInput_Dev_0_2::SetTextInputType)(PP_Instance instance, PP_TextInput_Type_Dev type)

Informs the browser about the current text input mode of the plugin. Typical use of this information in the browser is to properly display/suppress tools for supporting text inputs (such as virtual keyboards in touch screen based devices, or input method editors often used for composing East Asian characters).

Definition at line 78 of file ppb_text_input_dev.h.

void(* PPB_TextInput_Dev_0_2::UpdateCaretPosition)(PP_Instance instance, const struct PP_Rect *caret, const struct PP_Rect *bounding_box)

Informs the browser about the coordinates of the text input caret and the bounding box of the text input area. Typical use of this information in the browser is to layout IME windows etc.

Definition at line 84 of file ppb_text_input_dev.h.

void(* PPB_TextInput_Dev_0_2::UpdateSurroundingText)(PP_Instance instance, const char *text, uint32_t caret, uint32_t anchor)

In response to the PPP_TextInput_Dev::RequestSurroundingText call, informs the browser about the current text selection and surrounding text. text is a UTF-8 string that contains the current range of text selection in the plugin. caret is the byte-index of the caret position within text. anchor is the byte-index of the anchor position (i.e., if a range of text is selected, it is the other edge of selection different from caret. If there are no selection, anchor is equal to caret.

Typical use of this information in the browser is to enable "reconversion" features of IME that puts back the already committed text into the pre-commit composition state. Another use is to improve the precision of suggestion of IME by taking the context into account (e.g., if the caret looks to be on the beginning of a sentence, suggest capital letters in a virtual keyboard).

When the focus is not on text, call this function setting text to an empty string and caret and anchor to zero. Also, the plugin should send the empty text when it does not want to reveal the selection to IME (e.g., when the surrounding text is containing password text).

Definition at line 114 of file ppb_text_input_dev.h.


The documentation for this struct was generated from the following file: