Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_beta / c / struct_p_p_b___mouse_lock__1__0.html
1 {{+bindTo:partials.standard_nacl_article}}
2 <h1>PPB_MouseLock Struct Reference</h1>
3 <div>
4 <!-- Generated by Doxygen 1.7.6.1 -->
5
6
7 </div>
8 <!--header-->
9 <div class="contents">
10 <!-- doxytag: class="PPB_MouseLock" --><h2>
11 Data Fields</h2><table class="memberdecls">
12
13 <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_lock__1__0.html#ac137bc2d66abfa39428ea67236c85401">LockMouse</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
14 <tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___mouse_lock__1__0.html#a1b9ab648a3638b469be6235d4c76d634">UnlockMouse</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
15 </table>
16 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
17 <div class="textblock"><p>The <code>PPB_MouseLock</code> interface is implemented by the browser. </p>
18 <p>This interface provides a way of locking the target of mouse events to a single module instance and removing the cursor from view. This mode is useful for certain classes of applications, especially first-person perspective 3D applications and 3D modeling software. </p>
19 </div><hr /><h2>Field Documentation</h2>
20 <a class="anchor" id="ac137bc2d66abfa39428ea67236c85401"></a><!-- doxytag: member="PPB_MouseLock::LockMouse" ref="ac137bc2d66abfa39428ea67236c85401" args=")(PP_Instance instance, struct PP_CompletionCallback callback)" -->
21 <div class="memitem">
22 <div class="memproto">
23 <table class="memname">
24 <tr>
25 <td class="memname">int32_t(* <a class="el" href="struct_p_p_b___mouse_lock__1__0.html#ac137bc2d66abfa39428ea67236c85401">PPB_MouseLock::LockMouse</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
26 </tr>
27 </table>
28 </div>
29 <div class="memdoc">
30 <p><a class="el" href="struct_p_p_b___mouse_lock__1__0.html#ac137bc2d66abfa39428ea67236c85401" title="LockMouse() requests the mouse to be locked.">LockMouse()</a> requests the mouse to be locked. </p>
31 <p>While the mouse is locked, the cursor is implicitly hidden from the user. Any movement of the mouse will generate a <code>PP_INPUTEVENT_TYPE_MOUSEMOVE</code> event. The <code>GetPosition()</code> function in the <code>PPB_MouseInputEvent</code> interface reports the last known mouse position just as mouse lock was entered. The <code>GetMovement()</code> function provides relative movement information indicating what the change in position of the mouse would be had it not been locked.</p>
32 <p>The browser may revoke the mouse lock for reasons including (but not limited to) the user pressing the ESC key, the user activating another program using a reserved keystroke (e.g. ALT+TAB), or some other system event.</p>
33 <dl class="params"><dt><b>Parameters:</b></dt><dd>
34 <table class="params">
35 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module. </td></tr>
36 <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion.</td></tr>
37 </table>
38 </dd>
39 </dl>
40 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
41 </div>
42 </div>
43 <a class="anchor" id="a1b9ab648a3638b469be6235d4c76d634"></a><!-- doxytag: member="PPB_MouseLock::UnlockMouse" ref="a1b9ab648a3638b469be6235d4c76d634" args=")(PP_Instance instance)" -->
44 <div class="memitem">
45 <div class="memproto">
46 <table class="memname">
47 <tr>
48 <td class="memname">void(* <a class="el" href="struct_p_p_b___mouse_lock__1__0.html#a1b9ab648a3638b469be6235d4c76d634">PPB_MouseLock::UnlockMouse</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
49 </tr>
50 </table>
51 </div>
52 <div class="memdoc">
53 <p><a class="el" href="struct_p_p_b___mouse_lock__1__0.html#a1b9ab648a3638b469be6235d4c76d634" title="UnlockMouse() causes the mouse to be unlocked, allowing it to track user movement again...">UnlockMouse()</a> causes the mouse to be unlocked, allowing it to track user movement again. </p>
54 <p>This is an asynchronous operation. The module instance will be notified using the <code>PPP_MouseLock</code> interface when it has lost the mouse lock.</p>
55 <dl class="params"><dt><b>Parameters:</b></dt><dd>
56 <table class="params">
57 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module. </td></tr>
58 </table>
59 </dd>
60 </dl>
61 </div>
62 </div>
63 <hr />The documentation for this struct was generated from the following file:<ul>
64 <li><a class="el" href="ppb__mouse__lock_8h.html">ppb_mouse_lock.h</a></li>
65 </ul>
66 </div><!-- contents -->
67 {{/partials.standard_nacl_article}}