blob: 87371b1b725df33aa60521d4d46e523d8a0edb12 [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_MouseCursor 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_MouseCursor" --><h2>
Data Fields</h2><table class="memberdecls">
<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_cursor__1__0.html#affb0522468db2deccac0715c3997c2da">SetCursor</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, enum <a class="el" href="group___enums.html#gac53273018386c1db9542d2a06bbe118b">PP_MouseCursor_Type</a> type, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> image, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *hot_spot)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_MouseCursor</code> allows setting the mouse cursor. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="affb0522468db2deccac0715c3997c2da"></a><!-- doxytag: member="PPB_MouseCursor::SetCursor" ref="affb0522468db2deccac0715c3997c2da" args=")(PP_Instance instance, enum PP_MouseCursor_Type type, PP_Resource image, const struct PP_Point *hot_spot)" -->
<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_cursor__1__0.html#affb0522468db2deccac0715c3997c2da">PPB_MouseCursor::SetCursor</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, enum <a class="el" href="group___enums.html#gac53273018386c1db9542d2a06bbe118b">PP_MouseCursor_Type</a> type, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> image, const struct <a class="el" href="struct_p_p___point.html">PP_Point</a> *hot_spot)</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 0 and the hot spot to NULL. 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 <code>PP_Instance</code> 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.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>A <code>PPB_ImageData</code> resource 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 must be 0.</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>PP_TRUE on success, or PP_FALSE if the instance or cursor type is invalid, or if the image is too large. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__mouse__cursor_8h.html">ppb_mouse_cursor.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}