{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_TextInputController Struct Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="PPB_TextInputController" --><h2>
Data Fields</h2><table class="memberdecls">
<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>
<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>
<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>
<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>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<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>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="a4b05a8a76a6daadab941fb24ce5d23ce"></a><!-- doxytag: member="PPB_TextInputController::CancelCompositionText" ref="a4b05a8a76a6daadab941fb24ce5d23ce" args=")(PP_Instance instance)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div>
<div class="memdoc">
<p>Cancels the current composition in IME. </p>
</div>
</div>
<a class="anchor" id="a4cb36e7536a78dc5893c288c2885cb97"></a><!-- doxytag: member="PPB_TextInputController::SetTextInputType" ref="a4cb36e7536a78dc5893c288c2885cb97" args=")(PP_Instance instance, PP_TextInput_Type type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div>
<div class="memdoc">
<p>Informs the browser about the current text input mode of the plugin. </p>
<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>
</div>
</div>
<a class="anchor" id="ab34cfc4db88d4387845317042ceb63af"></a><!-- doxytag: member="PPB_TextInputController::UpdateCaretPosition" ref="ab34cfc4db88d4387845317042ceb63af" args=")(PP_Instance instance, const struct PP_Rect *caret)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div>
<div class="memdoc">
<p>Informs the browser about the coordinates of the text input caret area. </p>
<p>Typical use of this information in the browser is to layout IME windows etc. </p>
</div>
</div>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div>
<div class="memdoc">
<p>Informs the browser about the current text selection and surrounding text. </p>
<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>
<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>
<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>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__text__input__controller_8h.html">ppb_text_input_controller.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}