chromium/native_client_sdk/doc_generated/pepper_beta/c/struct_p_p_b___mouse_input_event__1__1.html

{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_MouseInputEvent 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_MouseInputEvent" --><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___mouse_input_event__1__1.html#a3bde5af35e13f10a3472132e82b8bb45">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, <a class="el" href="group___enums.html#ga25113f3c8d33e863fd38b3f70f8a5e6e">PP_InputEvent_MouseButton</a> mouse_button, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *mouse_position, int32_t click_count, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *mouse_movement)</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___mouse_input_event__1__1.html#a4cf50f1f5527cf7e66788d4b47ae1638">IsMouseInputEvent</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga25113f3c8d33e863fd38b3f70f8a5e6e">PP_InputEvent_MouseButton</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a7a90bf6abb794ca5c42af76d8fd71d22">GetButton</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___point.html">PP_Point</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#ab7c3f20bd61bec3db563a7956fdeb7e0">GetPosition</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a2850b783ad0136b5818d876a1a01af22">GetClickCount</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___point.html">PP_Point</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a043229000d9f7d9436ae8a963bb6aca1">GetMovement</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_MouseInputEvent</code> interface contains pointers to several functions related to mouse input events. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="a3bde5af35e13f10a3472132e82b8bb45"></a><!-- doxytag: member="PPB_MouseInputEvent::Create" ref="a3bde5af35e13f10a3472132e82b8bb45" args=")(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const struct PP_Point *mouse_position, int32_t click_count, const struct PP_Point *mouse_movement)" -->
<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___mouse_input_event__1__1.html#a3bde5af35e13f10a3472132e82b8bb45">PPB_MouseInputEvent::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, <a class="el" href="group___enums.html#ga25113f3c8d33e863fd38b3f70f8a5e6e">PP_InputEvent_MouseButton</a> mouse_button, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *mouse_position, int32_t click_count, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *mouse_movement)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a3bde5af35e13f10a3472132e82b8bb45" title="Create() creates a mouse input event with the given parameters.">Create()</a> creates a mouse input event with the given parameters. </p>
<p>Normally you will get a mouse 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. The type must be one of the mouse event types.</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>
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_button</td><td>The button that changed for mouse down or up events. This value will be <code>PP_EVENT_MOUSEBUTTON_NONE</code> for mouse move, enter, and leave events.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_position</td><td>A <code>Point</code> containing the x and y position of the mouse when the event occurred.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_movement</td><td>The change in position of the mouse.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> containing the new mouse input event. </dd></dl>
</div>
</div>
<a class="anchor" id="a7a90bf6abb794ca5c42af76d8fd71d22"></a><!-- doxytag: member="PPB_MouseInputEvent::GetButton" ref="a7a90bf6abb794ca5c42af76d8fd71d22" args=")(PP_Resource mouse_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga25113f3c8d33e863fd38b3f70f8a5e6e">PP_InputEvent_MouseButton</a>(* <a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a7a90bf6abb794ca5c42af76d8fd71d22">PPB_MouseInputEvent::GetButton</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a7a90bf6abb794ca5c42af76d8fd71d22" title="GetButton() returns the mouse button that generated a mouse down or up event.">GetButton()</a> returns the mouse button that generated a mouse down or up event. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_event</td><td>A <code>PP_Resource</code> corresponding to a mouse event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The mouse button associated with mouse down and up events. This value will be <code>PP_EVENT_MOUSEBUTTON_NONE</code> for mouse move, enter, and leave events, and for all non-mouse events. </dd></dl>
</div>
</div>
<a class="anchor" id="a2850b783ad0136b5818d876a1a01af22"></a><!-- doxytag: member="PPB_MouseInputEvent::GetClickCount" ref="a2850b783ad0136b5818d876a1a01af22" args=")(PP_Resource mouse_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a2850b783ad0136b5818d876a1a01af22">PPB_MouseInputEvent::GetClickCount</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a043229000d9f7d9436ae8a963bb6aca1"></a><!-- doxytag: member="PPB_MouseInputEvent::GetMovement" ref="a043229000d9f7d9436ae8a963bb6aca1" args=")(PP_Resource mouse_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___point.html">PP_Point</a>(* <a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#a043229000d9f7d9436ae8a963bb6aca1">PPB_MouseInputEvent::GetMovement</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the change in position of the mouse. </p>
<p>When the mouse is locked, although the mouse position doesn't actually change, this function still provides movement information, which indicates what the change in position would be had the mouse not been locked.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_event</td><td>A <code>PP_Resource</code> corresponding to a mouse event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The change in position of the mouse, relative to the previous position. </dd></dl>
</div>
</div>
<a class="anchor" id="ab7c3f20bd61bec3db563a7956fdeb7e0"></a><!-- doxytag: member="PPB_MouseInputEvent::GetPosition" ref="ab7c3f20bd61bec3db563a7956fdeb7e0" args=")(PP_Resource mouse_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___point.html">PP_Point</a>(* <a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#ab7c3f20bd61bec3db563a7956fdeb7e0">PPB_MouseInputEvent::GetPosition</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> mouse_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___mouse_input_event__1__1.html#ab7c3f20bd61bec3db563a7956fdeb7e0" title="GetPosition() returns the pixel location of a mouse input event.">GetPosition()</a> returns the pixel location of a mouse input event. </p>
<p>When the mouse is locked, it returns the last known mouse position just as mouse lock was entered.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mouse_event</td><td>A <code>PP_Resource</code> corresponding to a mouse event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The point associated with the mouse event, relative to the upper- left of the instance receiving the event. These values can be negative for mouse drags. The return value will be (0, 0) for non-mouse events. </dd></dl>
</div>
</div>
<a class="anchor" id="a4cf50f1f5527cf7e66788d4b47ae1638"></a><!-- doxytag: member="PPB_MouseInputEvent::IsMouseInputEvent" ref="a4cf50f1f5527cf7e66788d4b47ae1638" 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___mouse_input_event__1__1.html#a4cf50f1f5527cf7e66788d4b47ae1638">PPB_MouseInputEvent::IsMouseInputEvent</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___mouse_input_event__1__1.html#a4cf50f1f5527cf7e66788d4b47ae1638" title="IsMouseInputEvent() determines if a resource is a mouse event.">IsMouseInputEvent()</a> determines if a resource is a mouse 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 mouse 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}}