chromium/native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_mouse_input_event.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::MouseInputEvent Class 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="pp::MouseInputEvent" --><!-- doxytag: inherits="pp::InputEvent" --><div class="dynheader">
Inheritance diagram for pp::MouseInputEvent:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_mouse_input_event__inherit__graph.png" border="0" usemap="#pp_1_1_mouse_input_event_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_mouse_input_event_inherit__map" id="pp_1_1_mouse_input_event_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_input_event.html" title="This class represents an input event resource." alt="" coords="25,80,140,107"></area><area shape="rect" id="node3" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="31,5,135,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_mouse_input_event-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#a3a7fa73996bd504fc3aa86c447222761">MouseInputEvent</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#ad63fc6a3e5f29b5cb787fc74ebf0b33d">MouseInputEvent</a> (const <a class="el" href="classpp_1_1_input_event.html">InputEvent</a> &amp;event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#a4e2f16fb54382135f07cf53e22905d3a">MouseInputEvent</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;mouse_position, int32_t click_count, const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;mouse_movement)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_InputEvent_MouseButton&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#ae953b64120ab5c84c31114d1e5d15e1b">GetButton</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#a95bb484c3628871ed4d8cbd3b44effe2">GetPosition</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#a2e125cde20848ee70495e2f981b7417e">GetClickCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_input_event.html#a33e589dc8460c5fd2064cef39f19970b">GetMovement</a> () const </td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class handles mouse events. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3a7fa73996bd504fc3aa86c447222761"></a><!-- doxytag: member="pp::MouseInputEvent::MouseInputEvent" ref="a3a7fa73996bd504fc3aa86c447222761" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_mouse_input_event.html#a3a7fa73996bd504fc3aa86c447222761">pp::MouseInputEvent::MouseInputEvent</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructs an <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a> mouse input event object. </p>
</div>
</div>
<a class="anchor" id="ad63fc6a3e5f29b5cb787fc74ebf0b33d"></a><!-- doxytag: member="pp::MouseInputEvent::MouseInputEvent" ref="ad63fc6a3e5f29b5cb787fc74ebf0b33d" args="(const InputEvent &amp;event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_mouse_input_event.html#a3a7fa73996bd504fc3aa86c447222761">pp::MouseInputEvent::MouseInputEvent</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_input_event.html">InputEvent</a> &amp;&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td><code> [explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This constructor constructs a mouse input event object from the provided generic input event. </p>
<p>If the given event is itself <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a> or is not a mouse input event, the mouse object will be <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">event</td><td>An <code><a class="el" href="classpp_1_1_input_event.html" title="This class represents an input event resource.">InputEvent</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4e2f16fb54382135f07cf53e22905d3a"></a><!-- doxytag: member="pp::MouseInputEvent::MouseInputEvent" ref="a4e2f16fb54382135f07cf53e22905d3a" args="(const InstanceHandle &amp;instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const Point &amp;mouse_position, int32_t click_count, const Point &amp;mouse_movement)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_mouse_input_event.html#a3a7fa73996bd504fc3aa86c447222761">pp::MouseInputEvent::MouseInputEvent</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;&#160;</td>
<td class="paramname"><em>instance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_InputEvent_Type&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_TimeTicks&#160;</td>
<td class="paramname"><em>time_stamp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>modifiers</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_InputEvent_MouseButton&#160;</td>
<td class="paramname"><em>mouse_button</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>mouse_position</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>click_count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>mouse_movement</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This constructor manually constructs a mouse event from the provided parameters. </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><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></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">click_count</td><td></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>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="ae953b64120ab5c84c31114d1e5d15e1b"></a><!-- doxytag: member="pp::MouseInputEvent::GetButton" ref="ae953b64120ab5c84c31114d1e5d15e1b" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_InputEvent_MouseButton <a class="el" href="classpp_1_1_mouse_input_event.html#ae953b64120ab5c84c31114d1e5d15e1b">pp::MouseInputEvent::GetButton</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_mouse_input_event.html#ae953b64120ab5c84c31114d1e5d15e1b" title="GetButton() returns the mouse position for a mouse input event.">GetButton()</a> returns the mouse position for a mouse input event. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The mouse button associated with mouse down and up events. This value will be PP_EVENT_MOUSEBUTTON_NONE for mouse move, enter, and leave events, and for all non-mouse events. </dd></dl>
</div>
</div>
<a class="anchor" id="a2e125cde20848ee70495e2f981b7417e"></a><!-- doxytag: member="pp::MouseInputEvent::GetClickCount" ref="a2e125cde20848ee70495e2f981b7417e" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_mouse_input_event.html#a2e125cde20848ee70495e2f981b7417e">pp::MouseInputEvent::GetClickCount</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a33e589dc8460c5fd2064cef39f19970b"></a><!-- doxytag: member="pp::MouseInputEvent::GetMovement" ref="a33e589dc8460c5fd2064cef39f19970b" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> <a class="el" href="classpp_1_1_mouse_input_event.html#a33e589dc8460c5fd2064cef39f19970b">pp::MouseInputEvent::GetMovement</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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="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="a95bb484c3628871ed4d8cbd3b44effe2"></a><!-- doxytag: member="pp::MouseInputEvent::GetPosition" ref="a95bb484c3628871ed4d8cbd3b44effe2" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> <a class="el" href="classpp_1_1_mouse_input_event.html#a95bb484c3628871ed4d8cbd3b44effe2">pp::MouseInputEvent::GetPosition</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_mouse_input_event.html#a95bb484c3628871ed4d8cbd3b44effe2" 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="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>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="input__event_8h.html">input_event.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}