OLD | NEW |
---|---|
(Empty) | |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 * Use of this source code is governed by a BSD-style license that can be | |
3 * found in the LICENSE file. | |
4 */ | |
5 | |
6 /** | |
7 * This file defines the <code>PPB_CursorControl_Dev</code> interface | |
8 * implemented by the browser for controlling the cursor. | |
9 */ | |
10 | |
11 label Chrome { | |
12 M14 = 0.4 | |
13 }; | |
14 | |
15 interface PPB_CursorControl_Dev { | |
16 /** | |
17 * Set a cursor. If "type" is PP_CURSORTYPE_CUSTOM, then "custom_image" | |
18 * must be an ImageData resource containing the cursor and "hot_spot" must | |
19 * contain the offset within that image that refers to the cursor's position. | |
20 */ | |
21 PP_Bool SetCursor( | |
22 [in] PP_Instance instance, | |
23 [in] PP_CursorType_Dev type, | |
24 [in] PP_Resource custom_image, | |
25 [in] PP_Point hot_spot); | |
dmichael (off chromium)
2011/11/17 19:04:41
nit: Why not use C++-style indentation?
(I saw so
jvoung - send to chromium...
2011/11/17 20:51:34
Oh, I guess I got lucky and picked an example IDL
dmichael (off chromium)
2011/11/17 21:05:49
If we're ~50-50, and there's no good reason to do
jvoung - send to chromium...
2011/11/17 22:00:09
Ok, done =)
| |
26 | |
27 /** | |
28 * This method causes the cursor to be moved to the center of the | |
29 * instance and be locked, preventing the user from moving it. | |
30 * The cursor is implicitly hidden from the user while locked. | |
31 * Cursor lock may only be requested in response to a | |
32 * PP_InputEvent_MouseDown, and then only if the event was generated via | |
33 * user gesture. | |
34 * | |
35 * While the cursor is locked, any movement of the mouse will | |
36 * generate a PP_InputEvent_Type_MouseMove, whose x and y values | |
37 * indicate the position the cursor would have been moved to had | |
38 * the cursor not been locked, and had the screen been infinite in size. | |
39 * | |
40 * The browser may revoke cursor lock for reasons including but not | |
41 * limited to the user pressing the ESC key, the user activating | |
42 * another program via a reserved keystroke (e.g., ALT+TAB), or | |
43 * some other system event. | |
44 * | |
45 * Returns PP_TRUE if the cursor could be locked, PP_FALSE otherwise. | |
46 */ | |
47 PP_Bool LockCursor( | |
48 [in] PP_Instance instance); | |
49 | |
50 /** | |
51 * Causes the cursor to be unlocked, allowing it to track user | |
52 * movement again. | |
53 */ | |
54 PP_Bool UnlockCursor( | |
55 [in] PP_Instance instance); | |
56 | |
57 /** | |
58 * Returns PP_TRUE if the cursor is locked, PP_FALSE otherwise. | |
59 */ | |
60 PP_Bool HasCursorLock( | |
61 [in] PP_Instance instance); | |
62 | |
63 /** | |
64 * Returns PP_TRUE if the cursor can be locked, PP_FALSE otherwise. | |
65 */ | |
66 PP_Bool CanLockCursor( | |
67 [in] PP_Instance instance); | |
68 }; | |
69 | |
OLD | NEW |