blob: f5e628ec2ebad2b6fc75b75a9f9c11401fcb65cd [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_TouchInputEvent 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_TouchInputEvent" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a34366a8a64a16fee610eaeac7ecc8ae3">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#gaca7296cfec99fcb6646b7144d1d6a0c5">PP_InputEvent_Type</a> type, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#abf9e7c7977ee60b29c2207a674f263c9">AddTouchPoint</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> touch_event, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, const struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a> *point)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a1bed0c3d25f593b85ba26cb6e0c0bbab">IsTouchInputEvent</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#af762fe8562a13c15a06b5825cf3b3bb9">GetTouchCount</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a1d108acb025c5a9ce74c15034955de63">GetTouchByIndex</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, uint32_t index)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a401d82dc926d1c2bbc32c5b91ee9e0d5">GetTouchById</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, uint32_t touch_id)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_TouchInputEvent</code> interface contains pointers to several functions related to touch events. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="abf9e7c7977ee60b29c2207a674f263c9"></a><!-- doxytag: member="PPB_TouchInputEvent::AddTouchPoint" ref="abf9e7c7977ee60b29c2207a674f263c9" args=")(PP_Resource touch_event, PP_TouchListType list, const struct PP_TouchPoint *point)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="struct_p_p_b___touch_input_event__1__0.html#abf9e7c7977ee60b29c2207a674f263c9">PPB_TouchInputEvent::AddTouchPoint</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> touch_event, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, const struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a> *point)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Adds a touch point to the touch event in the specified touch-list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">touch_event</td><td>A <code>PP_Resource</code> corresponding to a touch event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>The list to add the touch point to.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">point</td><td>The point to add to the list. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a34366a8a64a16fee610eaeac7ecc8ae3"></a><!-- doxytag: member="PPB_TouchInputEvent::Create" ref="a34366a8a64a16fee610eaeac7ecc8ae3" args=")(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a34366a8a64a16fee610eaeac7ecc8ae3">PPB_TouchInputEvent::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#gaca7296cfec99fcb6646b7144d1d6a0c5">PP_InputEvent_Type</a> type, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a touch input event with the given parameters. </p>
<p>Normally you will get a touch event passed through the HandleInputEvent and will not need to create them, but some applications may want to create their own for internal use. The type must be one of the touch event types. This newly created touch input event does not have any touch point in any of the touch-point lists. <code>AddTouchPoint</code> should be called to add the touch-points.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance for which this event occurred.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>A <code>PP_InputEvent_Type</code> identifying the type of input event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">time_stamp</td><td>A <code>PP_TimeTicks</code> indicating the time when the event occurred.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">modifiers</td><td>A bit field combination of the <code>PP_InputEvent_Modifier</code> flags.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> containing the new touch input event. </dd></dl>
</div>
</div>
<a class="anchor" id="a401d82dc926d1c2bbc32c5b91ee9e0d5"></a><!-- doxytag: member="PPB_TouchInputEvent::GetTouchById" ref="a401d82dc926d1c2bbc32c5b91ee9e0d5" args=")(PP_Resource resource, PP_TouchListType list, uint32_t touch_id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a>(* <a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a401d82dc926d1c2bbc32c5b91ee9e0d5">PPB_TouchInputEvent::GetTouchById</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, uint32_t touch_id)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the touch-point with the specified touch-id in the specified list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to a touch event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>The list.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">touch_id</td><td>The id of the touch-point.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="struct_p_p___touch_point.html" title="The PP_TouchPoint struct represents all information about a single touch point, such as position...">PP_TouchPoint</a></code> representing the touch-point. </dd></dl>
</div>
</div>
<a class="anchor" id="a1d108acb025c5a9ce74c15034955de63"></a><!-- doxytag: member="PPB_TouchInputEvent::GetTouchByIndex" ref="a1d108acb025c5a9ce74c15034955de63" args=")(PP_Resource resource, PP_TouchListType list, uint32_t index)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___touch_point.html">PP_TouchPoint</a>(* <a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a1d108acb025c5a9ce74c15034955de63">PPB_TouchInputEvent::GetTouchByIndex</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list, uint32_t index)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the touch-point at the specified index from the specified list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to a touch event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>The list.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="struct_p_p___touch_point.html" title="The PP_TouchPoint struct represents all information about a single touch point, such as position...">PP_TouchPoint</a></code> representing the touch-point. </dd></dl>
</div>
</div>
<a class="anchor" id="af762fe8562a13c15a06b5825cf3b3bb9"></a><!-- doxytag: member="PPB_TouchInputEvent::GetTouchCount" ref="af762fe8562a13c15a06b5825cf3b3bb9" args=")(PP_Resource resource, PP_TouchListType list)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___touch_input_event__1__0.html#af762fe8562a13c15a06b5825cf3b3bb9">PPB_TouchInputEvent::GetTouchCount</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource, <a class="el" href="group___enums.html#gad5885a239d04166c8777432c81e39d0a">PP_TouchListType</a> list)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of touch-points in the specified list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to a touch event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>The list.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of touch-points in the specified list. </dd></dl>
</div>
</div>
<a class="anchor" id="a1bed0c3d25f593b85ba26cb6e0c0bbab"></a><!-- doxytag: member="PPB_TouchInputEvent::IsTouchInputEvent" ref="a1bed0c3d25f593b85ba26cb6e0c0bbab" args=")(PP_Resource resource)" -->
<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_b___touch_input_event__1__0.html#a1bed0c3d25f593b85ba26cb6e0c0bbab">PPB_TouchInputEvent::IsTouchInputEvent</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___touch_input_event__1__0.html#a1bed0c3d25f593b85ba26cb6e0c0bbab" title="IsTouchInputEvent() determines if a resource is a touch event.">IsTouchInputEvent()</a> determines if a resource is a touch event. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to an event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the given resource is a valid touch input event, otherwise <code>PP_FALSE</code>. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__input__event_8h.html">ppb_input_event.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}