OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 /* From pp_input_event.idl modified Mon Mar 5 10:13:42 2012. */ | 6 /* From pp_input_event.idl modified Thu Mar 28 10:52:59 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ |
9 #define PPAPI_C_PP_INPUT_EVENT_H_ | 9 #define PPAPI_C_PP_INPUT_EVENT_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
14 #include "ppapi/c/ppb_input_event.h" | 14 #include "ppapi/c/ppb_input_event.h" |
15 | 15 |
16 /** | 16 /** |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 * a '%'. The key down and up events will give you the scan code for the "5" | 61 * a '%'. The key down and up events will give you the scan code for the "5" |
62 * key, and the character event will give you the '%' character. | 62 * key, and the character event will give you the '%' character. |
63 * | 63 * |
64 * You may not get a character event for all key down events if the key doesn't | 64 * You may not get a character event for all key down events if the key doesn't |
65 * generate a character. Likewise, you may actually get multiple character | 65 * generate a character. Likewise, you may actually get multiple character |
66 * events in a row. For example, some locales have an accent key that modifies | 66 * events in a row. For example, some locales have an accent key that modifies |
67 * the next character typed. You might get this stream of events: accent down, | 67 * the next character typed. You might get this stream of events: accent down, |
68 * accent up (it didn't generate a character), letter key down, letter with | 68 * accent up (it didn't generate a character), letter key down, letter with |
69 * accent character event (it was modified by the previous accent key), letter | 69 * accent character event (it was modified by the previous accent key), letter |
70 * key up. If the letter can't be combined with the accent, like an umlaut and | 70 * key up. If the letter can't be combined with the accent, like an umlaut and |
71 * an 'R', the system might send unlaut down, umlaut up, 'R' key down, umlaut | 71 * an 'R', the system might send umlaut down, umlaut up, 'R' key down, umlaut |
72 * character (can't combine it with 'R', so just send the raw unlaut so it | 72 * character (can't combine it with 'R', so just send the raw umlaut so it |
73 * isn't lost"), 'R' character event, 'R' key up. | 73 * isn't lost"), 'R' character event, 'R' key up. |
74 */ | 74 */ |
75 struct PP_InputEvent_Character { | 75 struct PP_InputEvent_Character { |
76 /** A combination of the <code>PP_InputEvent_Modifier</code> flags. */ | 76 /** A combination of the <code>PP_InputEvent_Modifier</code> flags. */ |
77 uint32_t modifier; | 77 uint32_t modifier; |
78 /** | 78 /** |
79 * This value represents the typed character as a single null-terminated UTF-8 | 79 * This value represents the typed character as a single null-terminated UTF-8 |
80 * character. Any unused bytes will be filled with null bytes. Since the | 80 * character. Any unused bytes will be filled with null bytes. Since the |
81 * maximum UTF-8 character is 4 bytes, there will always be at least one null | 81 * maximum UTF-8 character is 4 bytes, there will always be at least one null |
82 * at the end so you can treat this as a null-terminated UTF-8 string. | 82 * at the end so you can treat this as a null-terminated UTF-8 string. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 */ | 205 */ |
206 PP_Bool scroll_by_page; | 206 PP_Bool scroll_by_page; |
207 }; | 207 }; |
208 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); | 208 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); |
209 /** | 209 /** |
210 * @} | 210 * @} |
211 */ | 211 */ |
212 | 212 |
213 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ | 213 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ |
214 | 214 |
OLD | NEW |