{{+bindTo:partials.standard_nacl_api}}
<h1>PPP_InputEvent 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="PPP_InputEvent" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_p___input_event__0__1.html#ae684a39a2bf6b58aee0f7420aab43150">HandleInputEvent</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> input_event)</td></tr>
</table>
<hr /><h2>Field Documentation</h2>
<a class="anchor" id="ae684a39a2bf6b58aee0f7420aab43150"></a><!-- doxytag: member="PPP_InputEvent::HandleInputEvent" ref="ae684a39a2bf6b58aee0f7420aab43150" args=")(PP_Instance instance, PP_Resource input_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_p___input_event__0__1.html#ae684a39a2bf6b58aee0f7420aab43150">PPP_InputEvent::HandleInputEvent</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> input_event)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function for receiving input events from the browser. </p>
<p>In order to receive input events, you must register for them by calling <a class="el" href="struct_p_p_b___input_event__1__0.html#a369d79730ad84d0b8dee9127c114086e" title="RequestInputEvent() requests that input events corresponding to the given input events are delivered ...">PPB_InputEvent.RequestInputEvents()</a> or RequestFilteringInputEvents(). By default, no events are delivered.</p>
<p>If the event was handled, it will not be forwarded to the default handlers in the web page. If it was not handled, it may be dispatched to a default handler. So it is important that an instance respond accurately with whether event propagation should continue.</p>
<p>Event propagation also controls focus. If you handle an event like a mouse event, typically the instance will be given focus. Returning false from a filtered event handler or not registering for an event type means that the click will be given to a lower part of the page and your instance will not receive focus. This allows an instance to be partially transparent, where clicks on the transparent areas will behave like clicks to the underlying page.</p>
<p>In general, you should try to keep input event handling short. Especially for filtered input events, the browser or page may be blocked waiting for you to respond.</p>
<p>The caller of this function will maintain a reference to the input event resource during this call. Unless you take a reference to the resource to hold it for later, you don't need to release it.</p>
<p><b>Note:</b> If you're not receiving input events, make sure you register for the event classes you want by calling RequestInputEvents or RequestFilteringInputEvents. If you're still not receiving keyboard input events, make sure you're returning true (or using a non-filtered event handler) for mouse events. Otherwise, the instance will not receive focus and keyboard events will not be sent.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="struct_p_p_b___input_event__1__0.html#a369d79730ad84d0b8dee9127c114086e" title="RequestInputEvent() requests that input events corresponding to the given input events are delivered ...">PPB_InputEvent.RequestInputEvents</a> and <a class="el" href="struct_p_p_b___input_event__1__0.html#a42dcc8edf80141680e919258f3066069" title="RequestFilteringInputEvents() requests that input events corresponding to the given input events are ...">PPB_InputEvent.RequestFilteringInputEvents</a></dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>PP_TRUE if the event was handled, PP_FALSE if not. If you have registered to filter this class of events by calling RequestFilteringInputEvents, and you return PP_FALSE, the event will be forwarded to the page (and eventually the browser) for the default handling. For non-filtered events, the return value will be ignored. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppp__input__event_8h.html">ppp_input_event.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}