Chromium Code Reviews| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 * events. | 231 * events. |
| 232 */ | 232 */ |
| 233 struct PP_InputEvent_Wheel { | 233 struct PP_InputEvent_Wheel { |
| 234 /** | 234 /** |
| 235 * This value represents a combination of the <code>EVENT_MODIFIER</code> | 235 * This value represents a combination of the <code>EVENT_MODIFIER</code> |
| 236 * flags. | 236 * flags. |
| 237 */ | 237 */ |
| 238 uint32_t modifier; | 238 uint32_t modifier; |
| 239 | 239 |
| 240 /** | 240 /** |
| 241 * Indicates the amount vertically and horizontally the user has requested | 241 * This value indicates the amount vertically and horizontally the user has |
|
der Springer
2011/08/09 20:40:40
Horizontal only. And this sentence is pretty awkw
jond
2011/08/10 21:05:59
Done.
| |
| 242 * to scroll by with their mouse wheel. A scroll down or to the right (where | 242 * requested to scroll by with their mouse wheel. A scroll down or to the |
| 243 * the content moves up or left) is represented as positive values, and | 243 * right (where the content moves up or left) is represented as positive |
| 244 * a scroll up or to the left (where the content moves down or right) is | 244 * values, and a scroll up or to the left (where the content moves down or |
|
der Springer
2011/08/09 20:40:40
Remove references to "up/down" in this section.
jond
2011/08/10 21:05:59
Done.
| |
| 245 * represented as negative values. | 245 * right) is represented as negative values. |
| 246 * | 246 * |
| 247 * The units are either in pixels (when scroll_by_page is false) or pages | 247 * The units are either in pixels (when scroll_by_page is false) or pages |
| 248 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 | 248 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 |
| 249 * pixels when scroll_by_page is false, and scroll up 3 pages when | 249 * pixels when scroll_by_page is false, and scroll up 3 pages when |
| 250 * scroll_by_page is true. | 250 * scroll_by_page is true. |
| 251 * | 251 * |
| 252 * This amount is system dependent and will take into account the user's | 252 * This amount is system dependent and will take into account the user's |
| 253 * preferred scroll sensitivity and potentially also nonlinear acceleration | 253 * preferred scroll sensitivity and potentially also nonlinear acceleration |
| 254 * based on the speed of the scrolling. | 254 * based on the speed of the scrolling. |
| 255 * | 255 * |
| 256 * Devices will be of varying resolution. Some mice with large detents will | 256 * Devices will be of varying resolution. Some mice with large detents will |
| 257 * only generate integer scroll amounts. But fractional values are also | 257 * only generate integer scroll amounts. But fractional values are also |
| 258 * possible, for example, on some trackpads and newer mice that don't have | 258 * possible, for example, on some trackpads and newer mice that don't have |
| 259 * "clicks". | 259 * "clicks". |
| 260 */ | 260 */ |
| 261 float delta_x; | 261 float delta_x; |
| 262 | 262 |
| 263 /** This value represents */ | 263 /** |
| 264 * This value indicates the amount vertically and horizontally the user has | |
|
der Springer
2011/08/09 20:40:40
Vertical only. Also, this sentence is awkward (se
jond
2011/08/10 21:05:59
Done.
| |
| 265 * requested to scroll by with their mouse wheel. A scroll down or to the | |
| 266 * right (where the content moves up or left) is represented as positive | |
|
der Springer
2011/08/09 20:40:40
Remove references to "left/right" in this section.
jond
2011/08/10 21:05:59
Done.
| |
| 267 * values, and a scroll up or to the left (where the content moves down or | |
| 268 * right) is represented as negative values. | |
| 269 * | |
| 270 * The units are either in pixels (when scroll_by_page is false) or pages | |
| 271 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 | |
| 272 * pixels when scroll_by_page is false, and scroll up 3 pages when | |
| 273 * scroll_by_page is true. | |
| 274 * | |
| 275 * This amount is system dependent and will take into account the user's | |
| 276 * preferred scroll sensitivity and potentially also nonlinear acceleration | |
| 277 * based on the speed of the scrolling. | |
| 278 * | |
| 279 * Devices will be of varying resolution. Some mice with large detents will | |
| 280 * only generate integer scroll amounts. But fractional values are also | |
| 281 * possible, for example, on some trackpads and newer mice that don't have | |
| 282 * "clicks". | |
| 283 */ | |
| 264 float delta_y; | 284 float delta_y; |
| 265 | 285 |
| 266 /** | 286 /** |
| 267 * The number of "clicks" of the scroll wheel that have produced the | 287 * The number of "clicks" of the scroll wheel that have produced the |
| 268 * event. The value may have system-specific acceleration applied to it, | 288 * event. The value may have system-specific acceleration applied to it, |
| 269 * depending on the device. The positive and negative meanings are the same | 289 * depending on the device. The positive and negative meanings are the same |
| 270 * as for <code>delta_x</code> and <code>delta_y</code>. | 290 * as for <code>delta_x</code> and <code>delta_y</code>. |
| 271 * | 291 * |
| 272 * If you are scrolling, you probably want to use the delta values above. | 292 * If you are scrolling, you probably want to use the delta values above. |
| 273 * These tick events can be useful if you aren't doing actual scrolling and | 293 * These tick events can be useful if you aren't doing actual scrolling and |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 */ | 357 */ |
| 338 char padding[64]; | 358 char padding[64]; |
| 339 } u; | 359 } u; |
| 340 }; | 360 }; |
| 341 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80); | 361 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80); |
| 342 /** | 362 /** |
| 343 * @} | 363 * @} |
| 344 */ | 364 */ |
| 345 | 365 |
| 346 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ | 366 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ |
| OLD | NEW |