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

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::MouseCursor 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::MouseCursor" -->
<p><a href="classpp_1_1_mouse_cursor-members.html">List of all members.</a></p>
<h2>
Static Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_mouse_cursor.html#a94fc61cd6f995af87e1bf198c3fe788d">SetCursor</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;instance, PP_MouseCursor_Type type, const <a class="el" href="classpp_1_1_image_data.html">ImageData</a> &amp;image=<a class="el" href="classpp_1_1_image_data.html">ImageData</a>(), const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;hot_spot=<a class="el" href="classpp_1_1_point.html">Point</a>(0, 0))</td></tr>
</table>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="a94fc61cd6f995af87e1bf198c3fe788d"></a><!-- doxytag: member="pp::MouseCursor::SetCursor" ref="a94fc61cd6f995af87e1bf198c3fe788d" args="(const InstanceHandle &amp;instance, PP_MouseCursor_Type type, const ImageData &amp;image=ImageData(), const Point &amp;hot_spot=Point(0, 0))" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classpp_1_1_mouse_cursor.html#a94fc61cd6f995af87e1bf198c3fe788d">pp::MouseCursor::SetCursor</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_MouseCursor_Type&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_image_data.html">ImageData</a> &amp;&#160;</td>
<td class="paramname"><em>image</em> = <code><a class="el" href="classpp_1_1_image_data.html">ImageData</a>()</code>, </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>hot_spot</em> = <code><a class="el" href="classpp_1_1_point.html">Point</a>(0,&#160;0)</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the given mouse cursor. </p>
<p>The mouse cursor will be in effect whenever the mouse is over the given instance until it is set again by another call. Note that you can hide the mouse cursor by setting it to the <code>PP_MOUSECURSOR_TYPE_NONE</code> type.</p>
<p>This function allows setting both system defined mouse cursors and custom cursors. To set a system-defined cursor, pass the type you want and set the custom image to a default-constructor <a class="el" href="classpp_1_1_image_data.html">ImageData</a> object. To set a custom cursor, set the type to <code>PP_MOUSECURSOR_TYPE_CUSTOM</code> and specify your image and hot spot.</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>A handle identifying the instance that the mouse cursor will affect.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>A <code>PP_MouseCursor_Type</code> identifying the type of mouse cursor to show. See <code>ppapi/c/ppb_mouse_cursor.h</code>.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>A <code><a class="el" href="classpp_1_1_image_data.html">ImageData</a></code> object identifying the custom image to set when the type is <code>PP_MOUSECURSOR_TYPE_CUSTOM</code>. The image must be less than 32 pixels in each direction and must be of the system's native image format. When you are specifying a predefined cursor, this parameter should be a default-constructed <a class="el" href="classpp_1_1_image_data.html">ImageData</a>.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">hot_spot</td><td>When setting a custom cursor, this identifies the pixel position within the given image of the "hot spot" of the cursor. When specifying a stock cursor, this parameter is ignored.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false if the instance or cursor type was invalid or if the image was too large. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="mouse__cursor_8h.html">mouse_cursor.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}