chromium/native_client_sdk/doc_generated/pepper_stable/c/struct_p_p_b___wheel_input_event__1__0.html

{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_WheelInputEvent 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_WheelInputEvent" --><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___wheel_input_event__1__0.html#ab9058129b7d0988881f1eea9734e4a4d">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers, const struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a> *wheel_delta, const struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a> *wheel_ticks, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> scroll_by_page)</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___wheel_input_event__1__0.html#aa67dcdcd6b98c48f5564987a0b080c13">IsWheelInputEvent</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#a7a6b1fb017bb6d872b014def298f70db">GetDelta</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#acc7a5e1f0cfe6481ccc33bbb3b06cd33">GetTicks</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)</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___wheel_input_event__1__0.html#a51ceeec58953923770768c283405612b">GetScrollByPage</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_WheelIputEvent</code> interface contains pointers to several functions related to wheel input events. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="ab9058129b7d0988881f1eea9734e4a4d"></a><!-- doxytag: member="PPB_WheelInputEvent::Create" ref="ab9058129b7d0988881f1eea9734e4a4d" args=")(PP_Instance instance, PP_TimeTicks time_stamp, uint32_t modifiers, const struct PP_FloatPoint *wheel_delta, const struct PP_FloatPoint *wheel_ticks, PP_Bool scroll_by_page)" -->
<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___wheel_input_event__1__0.html#ab9058129b7d0988881f1eea9734e4a4d">PPB_WheelInputEvent::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers, const struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a> *wheel_delta, const struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a> *wheel_ticks, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> scroll_by_page)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#ab9058129b7d0988881f1eea9734e4a4d" title="Create() creates a wheel input event with the given parameters.">Create()</a> creates a wheel input event with the given parameters. </p>
<p>Normally you will get a wheel event passed through the <code>HandleInputEvent</code> and will not need to create them, but some applications may want to create their own for internal use.</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">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>
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_delta</td><td>The scroll wheel's horizontal and vertical scroll amounts.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_ticks</td><td>The number of "clicks" of the scroll wheel that have produced the event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">scroll_by_page</td><td>When true, the user is requesting to scroll by pages. When false, the user is requesting to scroll by lines.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> containing the new wheel input event. </dd></dl>
</div>
</div>
<a class="anchor" id="a7a6b1fb017bb6d872b014def298f70db"></a><!-- doxytag: member="PPB_WheelInputEvent::GetDelta" ref="a7a6b1fb017bb6d872b014def298f70db" args=")(PP_Resource wheel_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a>(* <a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#a7a6b1fb017bb6d872b014def298f70db">PPB_WheelInputEvent::GetDelta</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#a7a6b1fb017bb6d872b014def298f70db" title="GetDelta() returns the amount vertically and horizontally the user has requested to scroll by with th...">GetDelta()</a> returns the amount vertically and horizontally the user has requested to scroll by with their mouse wheel. </p>
<p>A scroll down or to the right (where the content moves up or left) is represented as positive values, and a scroll up or to the left (where the content moves down or right) is represented as negative values.</p>
<p>This amount is system dependent and will take into account the user's preferred scroll sensitivity and potentially also nonlinear acceleration based on the speed of the scrolling.</p>
<p>Devices will be of varying resolution. Some mice with large detents will only generate integer scroll amounts. But fractional values are also possible, for example, on some trackpads and newer mice that don't have "clicks".</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_event</td><td>A <code>PP_Resource</code> corresponding to a wheel event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The vertical and horizontal scroll values. The units are either in pixels (when scroll_by_page is false) or pages (when scroll_by_page is true). For example, y = -3 means scroll up 3 pixels when scroll_by_page is false, and scroll up 3 pages when scroll_by_page is true. </dd></dl>
</div>
</div>
<a class="anchor" id="a51ceeec58953923770768c283405612b"></a><!-- doxytag: member="PPB_WheelInputEvent::GetScrollByPage" ref="a51ceeec58953923770768c283405612b" args=")(PP_Resource wheel_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_b___wheel_input_event__1__0.html#a51ceeec58953923770768c283405612b">PPB_WheelInputEvent::GetScrollByPage</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#a51ceeec58953923770768c283405612b" title="GetScrollByPage() indicates if the scroll delta x/y indicates pages or lines to scroll by...">GetScrollByPage()</a> indicates if the scroll delta x/y indicates pages or lines to scroll by. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_event</td><td>A <code>PP_Resource</code> corresponding to a wheel event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the event is a wheel event and the user is scrolling by pages. <code>PP_FALSE</code> if not or if the resource is not a wheel event. </dd></dl>
</div>
</div>
<a class="anchor" id="acc7a5e1f0cfe6481ccc33bbb3b06cd33"></a><!-- doxytag: member="PPB_WheelInputEvent::GetTicks" ref="acc7a5e1f0cfe6481ccc33bbb3b06cd33" args=")(PP_Resource wheel_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___float_point.html">PP_FloatPoint</a>(* <a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#acc7a5e1f0cfe6481ccc33bbb3b06cd33">PPB_WheelInputEvent::GetTicks</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> wheel_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#acc7a5e1f0cfe6481ccc33bbb3b06cd33" title='GetTicks() returns the number of "clicks" of the scroll wheel that have produced the event...'>GetTicks()</a> returns the number of "clicks" of the scroll wheel that have produced the event. </p>
<p>The value may have system-specific acceleration applied to it, depending on the device. The positive and negative meanings are the same as for <a class="el" href="struct_p_p_b___wheel_input_event__1__0.html#a7a6b1fb017bb6d872b014def298f70db" title="GetDelta() returns the amount vertically and horizontally the user has requested to scroll by with th...">GetDelta()</a>.</p>
<p>If you are scrolling, you probably want to use the delta values. These tick events can be useful if you aren't doing actual scrolling and don't want or pixel values. An example may be cycling between different items in a game.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_event</td><td>A <code>PP_Resource</code> corresponding to a wheel event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of "clicks" of the scroll wheel. You may receive fractional values for the wheel ticks if the mouse wheel is high resolution or doesn't have "clicks". If your program wants discrete events (as in the "picking items" example) you should accumulate fractional click values from multiple messages until the total value reaches positive or negative one. This should represent a similar amount of scrolling as for a mouse that has a discrete mouse wheel. </dd></dl>
</div>
</div>
<a class="anchor" id="aa67dcdcd6b98c48f5564987a0b080c13"></a><!-- doxytag: member="PPB_WheelInputEvent::IsWheelInputEvent" ref="aa67dcdcd6b98c48f5564987a0b080c13" 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___wheel_input_event__1__0.html#aa67dcdcd6b98c48f5564987a0b080c13">PPB_WheelInputEvent::IsWheelInputEvent</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___wheel_input_event__1__0.html#aa67dcdcd6b98c48f5564987a0b080c13" title="IsWheelInputEvent() determines if a resource is a wheel event.">IsWheelInputEvent()</a> determines if a resource is a wheel event. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">wheel_event</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 wheel input event. </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}}