OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /** | 6 /** |
7 * This file defines the Input Event interfaces. | 7 * This file defines the Input Event interfaces. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M13 = 1.0, | 11 M13 = 1.0, |
12 M14 = 1.1 | 12 M14 = 1.1 |
13 }; | 13 }; |
14 | 14 |
15 /** | 15 /** |
16 * This enumeration contains the types of input events. | 16 * This enumeration contains the types of input events. |
17 */ | 17 */ |
18 [assert_size(4)] | 18 [assert_size(4)] |
19 enum PP_InputEvent_Type { | 19 enum PP_InputEvent_Type { |
20 PP_INPUTEVENT_TYPE_UNDEFINED = -1, | 20 PP_INPUTEVENT_TYPE_UNDEFINED = -1, |
21 | 21 |
22 /** | 22 /** |
23 * Notification that a mouse button was pressed. | 23 * Notification that a mouse button was pressed. |
24 * | 24 * |
25 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 25 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
26 */ | 26 */ |
27 PP_INPUTEVENT_TYPE_MOUSEDOWN = 0, | 27 PP_INPUTEVENT_TYPE_MOUSEDOWN = 0, |
28 | 28 |
29 /** | 29 /** |
30 * Notification that a mouse button was released. | 30 * Notification that a mouse button was released. |
31 * | 31 * |
32 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 32 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
33 */ | 33 */ |
34 PP_INPUTEVENT_TYPE_MOUSEUP = 1, | 34 PP_INPUTEVENT_TYPE_MOUSEUP = 1, |
35 | 35 |
36 /** | 36 /** |
37 * Notification that a mouse button was moved when it is over the instance | 37 * Notification that a mouse button was moved when it is over the instance |
38 * or dragged out of it. | 38 * or dragged out of it. |
39 * | 39 * |
40 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 40 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
41 */ | 41 */ |
42 PP_INPUTEVENT_TYPE_MOUSEMOVE = 2, | 42 PP_INPUTEVENT_TYPE_MOUSEMOVE = 2, |
43 | 43 |
44 /** | 44 /** |
45 * Notification that the mouse entered the instance's bounds. | 45 * Notification that the mouse entered the instance's bounds. |
46 * | 46 * |
47 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 47 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
48 */ | 48 */ |
49 PP_INPUTEVENT_TYPE_MOUSEENTER = 3, | 49 PP_INPUTEVENT_TYPE_MOUSEENTER = 3, |
50 | 50 |
51 /** | 51 /** |
52 * Notification that a mouse left the instance's bounds. | 52 * Notification that a mouse left the instance's bounds. |
53 * | 53 * |
54 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 54 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
55 */ | 55 */ |
56 PP_INPUTEVENT_TYPE_MOUSELEAVE = 4, | 56 PP_INPUTEVENT_TYPE_MOUSELEAVE = 4, |
57 | 57 |
58 /** | 58 /** |
59 * Notification that the scroll wheel was used. | 59 * Notification that the scroll wheel was used. |
60 * | 60 * |
61 * Register for this event using the PP_INPUTEVENT_CLASS_WHEEL class. | 61 * Register for this event using the PP_INPUTEVENT_CLASS_WHEEL class. |
62 */ | 62 */ |
63 PP_INPUTEVENT_TYPE_WHEEL = 5, | 63 PP_INPUTEVENT_TYPE_WHEEL = 5, |
64 | 64 |
65 /** | 65 /** |
66 * Notification that a key transitioned from "up" to "down". | 66 * Notification that a key transitioned from "up" to "down". |
67 * TODO(brettw) differentiate from KEYDOWN. | 67 * TODO(brettw) differentiate from KEYDOWN. |
68 * | 68 * |
69 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. | 69 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. |
70 */ | 70 */ |
71 PP_INPUTEVENT_TYPE_RAWKEYDOWN = 6, | 71 PP_INPUTEVENT_TYPE_RAWKEYDOWN = 6, |
72 | 72 |
73 /** | 73 /** |
74 * Notification that a key was pressed. This does not necessarily correspond | 74 * Notification that a key was pressed. This does not necessarily correspond |
75 * to a character depending on the key and language. Use the | 75 * to a character depending on the key and language. Use the |
76 * PP_INPUTEVENT_TYPE_CHAR for character input. | 76 * PP_INPUTEVENT_TYPE_CHAR for character input. |
77 * | 77 * |
78 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. | 78 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. |
79 */ | 79 */ |
80 PP_INPUTEVENT_TYPE_KEYDOWN = 7, | 80 PP_INPUTEVENT_TYPE_KEYDOWN = 7, |
81 | 81 |
82 /** | 82 /** |
83 * Notification that a key was released. | 83 * Notification that a key was released. |
84 * | 84 * |
85 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. | 85 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. |
86 */ | 86 */ |
87 PP_INPUTEVENT_TYPE_KEYUP = 8, | 87 PP_INPUTEVENT_TYPE_KEYUP = 8, |
88 | 88 |
89 /** | 89 /** |
90 * Notification that a character was typed. Use this for text input. Key | 90 * Notification that a character was typed. Use this for text input. Key |
91 * down events may generate 0, 1, or more than one character event depending | 91 * down events may generate 0, 1, or more than one character event depending |
92 * on the key, locale, and operating system. | 92 * on the key, locale, and operating system. |
93 * | 93 * |
94 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. | 94 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. |
95 */ | 95 */ |
96 PP_INPUTEVENT_TYPE_CHAR = 9, | 96 PP_INPUTEVENT_TYPE_CHAR = 9, |
97 | 97 |
98 /** | 98 /** |
99 * TODO(brettw) when is this used? | 99 * TODO(brettw) when is this used? |
100 * | 100 * |
101 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. | 101 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. |
102 */ | 102 */ |
103 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10, | 103 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10, |
104 | 104 |
105 /** | 105 /** |
106 * Notification that an input method composition process has just started. | 106 * Notification that an input method composition process has just started. |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 * @param[in] character_event A <code>PP_Resource</code> corresponding to a | 722 * @param[in] character_event A <code>PP_Resource</code> corresponding to a |
723 * keyboard event. | 723 * keyboard event. |
724 * | 724 * |
725 * @return A string var representing a single typed character for character | 725 * @return A string var representing a single typed character for character |
726 * input events. For non-character input events the return value will be an | 726 * input events. For non-character input events the return value will be an |
727 * undefined var. | 727 * undefined var. |
728 */ | 728 */ |
729 PP_Var GetCharacterText([in] PP_Resource character_event); | 729 PP_Var GetCharacterText([in] PP_Resource character_event); |
730 }; | 730 }; |
731 | 731 |
OLD | NEW |