1 {{+bindTo:partials.standard_nacl_article}}
2 <h1>PPB_TextInputController Struct Reference</h1>
4 <!-- Generated by Doxygen 1.7.6.1 -->
10 <!-- doxytag: class="PPB_TextInputController" --><h2>
11 Data Fields</h2><table class="memberdecls">
13 <tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___text_input_controller__1__0.html#a4cb36e7536a78dc5893c288c2885cb97">SetTextInputType</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#ga5fef49ee4c2cc6dcead825340da0f116">PP_TextInput_Type</a> type)</td></tr>
14 <tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___text_input_controller__1__0.html#ab34cfc4db88d4387845317042ceb63af">UpdateCaretPosition</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___rect.html">PP_Rect</a> *caret)</td></tr>
15 <tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___text_input_controller__1__0.html#a4b05a8a76a6daadab941fb24ce5d23ce">CancelCompositionText</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
16 <tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___text_input_controller__1__0.html#aca1b52ba11e4384255eeecd90fc45ba5">UpdateSurroundingText</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> text, uint32_t caret, uint32_t anchor)</td></tr>
18 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
19 <div class="textblock"><p><code>PPB_TextInputController</code> 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). </p>
20 </div><hr /><h2>Field Documentation</h2>
21 <a class="anchor" id="a4b05a8a76a6daadab941fb24ce5d23ce"></a><!-- doxytag: member="PPB_TextInputController::CancelCompositionText" ref="a4b05a8a76a6daadab941fb24ce5d23ce" args=")(PP_Instance instance)" -->
23 <div class="memproto">
24 <table class="memname">
26 <td class="memname">void(* <a class="el" href="struct_p_p_b___text_input_controller__1__0.html#a4b05a8a76a6daadab941fb24ce5d23ce">PPB_TextInputController::CancelCompositionText</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
31 <p>Cancels the current composition in IME. </p>
34 <a class="anchor" id="a4cb36e7536a78dc5893c288c2885cb97"></a><!-- doxytag: member="PPB_TextInputController::SetTextInputType" ref="a4cb36e7536a78dc5893c288c2885cb97" args=")(PP_Instance instance, PP_TextInput_Type type)" -->
36 <div class="memproto">
37 <table class="memname">
39 <td class="memname">void(* <a class="el" href="struct_p_p_b___text_input_controller__1__0.html#a4cb36e7536a78dc5893c288c2885cb97">PPB_TextInputController::SetTextInputType</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#ga5fef49ee4c2cc6dcead825340da0f116">PP_TextInput_Type</a> type)</td>
44 <p>Informs the browser about the current text input mode of the plugin. </p>
45 <p>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). </p>
48 <a class="anchor" id="ab34cfc4db88d4387845317042ceb63af"></a><!-- doxytag: member="PPB_TextInputController::UpdateCaretPosition" ref="ab34cfc4db88d4387845317042ceb63af" args=")(PP_Instance instance, const struct PP_Rect *caret)" -->
50 <div class="memproto">
51 <table class="memname">
53 <td class="memname">void(* <a class="el" href="struct_p_p_b___text_input_controller__1__0.html#ab34cfc4db88d4387845317042ceb63af">PPB_TextInputController::UpdateCaretPosition</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___rect.html">PP_Rect</a> *caret)</td>
58 <p>Informs the browser about the coordinates of the text input caret area. </p>
59 <p>Typical use of this information in the browser is to layout IME windows etc. </p>
62 <a class="anchor" id="aca1b52ba11e4384255eeecd90fc45ba5"></a><!-- doxytag: member="PPB_TextInputController::UpdateSurroundingText" ref="aca1b52ba11e4384255eeecd90fc45ba5" args=")(PP_Instance instance, struct PP_Var text, uint32_t caret, uint32_t anchor)" -->
64 <div class="memproto">
65 <table class="memname">
67 <td class="memname">void(* <a class="el" href="struct_p_p_b___text_input_controller__1__0.html#aca1b52ba11e4384255eeecd90fc45ba5">PPB_TextInputController::UpdateSurroundingText</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> text, uint32_t caret, uint32_t anchor)</td>
72 <p>Informs the browser about the current text selection and surrounding text. </p>
73 <p><code>text</code> is a UTF-8 string that contains the current range of text selection in the plugin. <code>caret</code> is the byte-index of the caret position within <code>text</code>. <code>anchor</code> 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 <code>caret</code>. If there are no selection, <code>anchor</code> is equal to <code>caret</code>.</p>
74 <p>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).</p>
75 <p>When the focus is not on text, call this function setting <code>text</code> to an empty string and <code>caret</code> and <code>anchor</code> 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). </p>
78 <hr />The documentation for this struct was generated from the following file:<ul>
79 <li><a class="el" href="ppb__text__input__controller_8h.html">ppb_text_input_controller.h</a></li>
81 </div><!-- contents -->
82 {{/partials.standard_nacl_article}}