| 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 ppb_input_event.idl modified Thu Mar 28 10:51:06 2013. */ | 6 /* From ppb_input_event.idl modified Thu Mar 28 10:51:06 2013. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ |
| 9 #define PPAPI_C_PPB_INPUT_EVENT_H_ | 9 #define PPAPI_C_PPB_INPUT_EVENT_H_ |
| 10 | 10 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 * | 328 * |
| 329 * Note that synthetic mouse events will be generated from touch events if | 329 * Note that synthetic mouse events will be generated from touch events if |
| 330 * (and only if) the you do not request touch events. | 330 * (and only if) the you do not request touch events. |
| 331 * | 331 * |
| 332 * When requesting input events through this function, the events will be | 332 * When requesting input events through this function, the events will be |
| 333 * delivered and <i>not</i> bubbled to the page. This means that even if you | 333 * delivered and <i>not</i> bubbled to the page. This means that even if you |
| 334 * aren't interested in the message, no other parts of the page will get | 334 * aren't interested in the message, no other parts of the page will get |
| 335 * a crack at the message. | 335 * a crack at the message. |
| 336 * | 336 * |
| 337 * <strong>Example:</strong> | 337 * <strong>Example:</strong> |
| 338 * <code> | 338 * @code |
| 339 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 339 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
| 340 * RequestFilteringInputEvents(instance, | 340 * RequestFilteringInputEvents(instance, |
| 341 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 341 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
| 342 * </code> | 342 * @endcode |
| 343 * | 343 * |
| 344 * @param instance The <code>PP_Instance</code> of the instance requesting | 344 * @param instance The <code>PP_Instance</code> of the instance requesting |
| 345 * the given events. | 345 * the given events. |
| 346 * | 346 * |
| 347 * @param event_classes A combination of flags from | 347 * @param event_classes A combination of flags from |
| 348 * <code>PP_InputEvent_Class</code> that identifies the classes of events the | 348 * <code>PP_InputEvent_Class</code> that identifies the classes of events the |
| 349 * instance is requesting. The flags are combined by logically ORing their | 349 * instance is requesting. The flags are combined by logically ORing their |
| 350 * values. | 350 * values. |
| 351 * | 351 * |
| 352 * @return <code>PP_OK</code> if the operation succeeded, | 352 * @return <code>PP_OK</code> if the operation succeeded, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 369 * this function instead of RequestInputEvents(). | 369 * this function instead of RequestInputEvents(). |
| 370 * | 370 * |
| 371 * Filtering input events requires significantly more overhead than just | 371 * Filtering input events requires significantly more overhead than just |
| 372 * delivering them to the instance. As such, you should only request | 372 * delivering them to the instance. As such, you should only request |
| 373 * filtering in those cases where it's absolutely necessary. The reason is | 373 * filtering in those cases where it's absolutely necessary. The reason is |
| 374 * that it requires the browser to stop and block for the instance to handle | 374 * that it requires the browser to stop and block for the instance to handle |
| 375 * the input event, rather than sending the input event asynchronously. This | 375 * the input event, rather than sending the input event asynchronously. This |
| 376 * can have significant overhead. | 376 * can have significant overhead. |
| 377 * | 377 * |
| 378 * <strong>Example:</strong> | 378 * <strong>Example:</strong> |
| 379 * <code> | 379 * @code |
| 380 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 380 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
| 381 * RequestFilteringInputEvents(instance, | 381 * RequestFilteringInputEvents(instance, |
| 382 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 382 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
| 383 * </code> | 383 * @endcode |
| 384 * | 384 * |
| 385 * @return <code>PP_OK</code> if the operation succeeded, | 385 * @return <code>PP_OK</code> if the operation succeeded, |
| 386 * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or | 386 * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or |
| 387 * <code>PP_ERROR_NOTSUPPORTED</code> if one of the event class bits were | 387 * <code>PP_ERROR_NOTSUPPORTED</code> if one of the event class bits were |
| 388 * illegal. In the case of an invalid bit, all valid bits will be applied | 388 * illegal. In the case of an invalid bit, all valid bits will be applied |
| 389 * and only the illegal bits will be ignored. | 389 * and only the illegal bits will be ignored. |
| 390 */ | 390 */ |
| 391 int32_t (*RequestFilteringInputEvents)(PP_Instance instance, | 391 int32_t (*RequestFilteringInputEvents)(PP_Instance instance, |
| 392 uint32_t event_classes); | 392 uint32_t event_classes); |
| 393 /** | 393 /** |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 uint32_t touch_id); | 888 uint32_t touch_id); |
| 889 }; | 889 }; |
| 890 | 890 |
| 891 typedef struct PPB_TouchInputEvent_1_0 PPB_TouchInputEvent; | 891 typedef struct PPB_TouchInputEvent_1_0 PPB_TouchInputEvent; |
| 892 /** | 892 /** |
| 893 * @} | 893 * @} |
| 894 */ | 894 */ |
| 895 | 895 |
| 896 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ | 896 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ |
| 897 | 897 |
| OLD | NEW |