| 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 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ | 5 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ |
| 6 #define PPAPI_C_PP_INPUT_EVENT_H_ | 6 #define PPAPI_C_PP_INPUT_EVENT_H_ |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @file | 9 * @file |
| 10 * This file defines the API used to handle mouse and keyboard input events. | 10 * This file defines the API used to handle mouse and keyboard input events. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 * | 108 * |
| 109 * If your module depends on receiving key up events, it should also handle | 109 * If your module depends on receiving key up events, it should also handle |
| 110 * "lost focus" as the equivalent of "all keys up." | 110 * "lost focus" as the equivalent of "all keys up." |
| 111 */ | 111 */ |
| 112 struct PP_InputEvent_Key { | 112 struct PP_InputEvent_Key { |
| 113 /** This value is a bit field combination of the EVENT_MODIFIER flags. */ | 113 /** This value is a bit field combination of the EVENT_MODIFIER flags. */ |
| 114 uint32_t modifier; | 114 uint32_t modifier; |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * The key code. | 117 * The key code. |
| 118 * | |
| 119 * TODO(brettw) define what these actually are. | |
| 120 */ | 118 */ |
| 119 |
| 120 // TODO(brettw) define what these actually are. |
| 121 uint32_t key_code; | 121 uint32_t key_code; |
| 122 }; | 122 }; |
| 123 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Key, 8); | 123 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Key, 8); |
| 124 /** | 124 /** |
| 125 * @} | 125 * @} |
| 126 */ | 126 */ |
| 127 | 127 |
| 128 /** | 128 /** |
| 129 * @addtogroup Structs | 129 * @addtogroup Structs |
| 130 * @{ | 130 * @{ |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 * This values represents the y coordinate of the mouse when the event | 201 * This values represents the y coordinate of the mouse when the event |
| 202 * occurred. | 202 * occurred. |
| 203 * | 203 * |
| 204 * In most, but not all, cases these coordinates will just be integers. | 204 * In most, but not all, cases these coordinates will just be integers. |
| 205 * For example, the plugin element might be arbitrarily scaled or transformed | 205 * For example, the plugin element might be arbitrarily scaled or transformed |
| 206 * in the DOM, and translating a mouse event into the coordinate space of the | 206 * in the DOM, and translating a mouse event into the coordinate space of the |
| 207 * plugin will give non-integer values. | 207 * plugin will give non-integer values. |
| 208 */ | 208 */ |
| 209 float y; | 209 float y; |
| 210 | 210 |
| 211 /** TODO(brettw) figure out exactly what this means. */ | 211 // TODO(brettw) figure out exactly what this means. |
| 212 int32_t click_count; | 212 int32_t click_count; |
| 213 }; | 213 }; |
| 214 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Mouse, 20); | 214 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Mouse, 20); |
| 215 /** | 215 /** |
| 216 * @} | 216 * @} |
| 217 */ | 217 */ |
| 218 | 218 |
| 219 /** | 219 /** |
| 220 * @addtogroup Structs | 220 * @addtogroup Structs |
| 221 * @{ | 221 * @{ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 */ | 327 */ |
| 328 char padding[64]; | 328 char padding[64]; |
| 329 } u; | 329 } u; |
| 330 }; | 330 }; |
| 331 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80); | 331 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80); |
| 332 /** | 332 /** |
| 333 * @} | 333 * @} |
| 334 */ | 334 */ |
| 335 | 335 |
| 336 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ | 336 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ |
| OLD | NEW |