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 /** | 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 { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 * | 313 * |
314 * Note that synthetic mouse events will be generated from touch events if | 314 * Note that synthetic mouse events will be generated from touch events if |
315 * (and only if) the you do not request touch events. | 315 * (and only if) the you do not request touch events. |
316 * | 316 * |
317 * When requesting input events through this function, the events will be | 317 * When requesting input events through this function, the events will be |
318 * delivered and <i>not</i> bubbled to the page. This means that even if you | 318 * delivered and <i>not</i> bubbled to the page. This means that even if you |
319 * aren't interested in the message, no other parts of the page will get | 319 * aren't interested in the message, no other parts of the page will get |
320 * a crack at the message. | 320 * a crack at the message. |
321 * | 321 * |
322 * <strong>Example:</strong> | 322 * <strong>Example:</strong> |
323 * <code> | 323 * @code |
324 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 324 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
325 * RequestFilteringInputEvents(instance, | 325 * RequestFilteringInputEvents(instance, |
326 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 326 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
327 * </code> | 327 * @endcode |
328 * | 328 * |
329 * @param instance The <code>PP_Instance</code> of the instance requesting | 329 * @param instance The <code>PP_Instance</code> of the instance requesting |
330 * the given events. | 330 * the given events. |
331 * | 331 * |
332 * @param event_classes A combination of flags from | 332 * @param event_classes A combination of flags from |
333 * <code>PP_InputEvent_Class</code> that identifies the classes of events the | 333 * <code>PP_InputEvent_Class</code> that identifies the classes of events the |
334 * instance is requesting. The flags are combined by logically ORing their | 334 * instance is requesting. The flags are combined by logically ORing their |
335 * values. | 335 * values. |
336 * | 336 * |
337 * @return <code>PP_OK</code> if the operation succeeded, | 337 * @return <code>PP_OK</code> if the operation succeeded, |
(...skipping 18 matching lines...) Expand all Loading... |
356 * this function instead of RequestInputEvents(). | 356 * this function instead of RequestInputEvents(). |
357 * | 357 * |
358 * Filtering input events requires significantly more overhead than just | 358 * Filtering input events requires significantly more overhead than just |
359 * delivering them to the instance. As such, you should only request | 359 * delivering them to the instance. As such, you should only request |
360 * filtering in those cases where it's absolutely necessary. The reason is | 360 * filtering in those cases where it's absolutely necessary. The reason is |
361 * that it requires the browser to stop and block for the instance to handle | 361 * that it requires the browser to stop and block for the instance to handle |
362 * the input event, rather than sending the input event asynchronously. This | 362 * the input event, rather than sending the input event asynchronously. This |
363 * can have significant overhead. | 363 * can have significant overhead. |
364 * | 364 * |
365 * <strong>Example:</strong> | 365 * <strong>Example:</strong> |
366 * <code> | 366 * @code |
367 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 367 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
368 * RequestFilteringInputEvents(instance, | 368 * RequestFilteringInputEvents(instance, |
369 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 369 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
370 * </code> | 370 * @endcode |
371 * | 371 * |
372 * @return <code>PP_OK</code> if the operation succeeded, | 372 * @return <code>PP_OK</code> if the operation succeeded, |
373 * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or | 373 * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or |
374 * <code>PP_ERROR_NOTSUPPORTED</code> if one of the event class bits were | 374 * <code>PP_ERROR_NOTSUPPORTED</code> if one of the event class bits were |
375 * illegal. In the case of an invalid bit, all valid bits will be applied | 375 * illegal. In the case of an invalid bit, all valid bits will be applied |
376 * and only the illegal bits will be ignored. | 376 * and only the illegal bits will be ignored. |
377 */ | 377 */ |
378 int32_t RequestFilteringInputEvents([in] PP_Instance instance, | 378 int32_t RequestFilteringInputEvents([in] PP_Instance instance, |
379 [in] uint32_t event_classes); | 379 [in] uint32_t event_classes); |
380 | 380 |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 * @param[in] list The list. | 898 * @param[in] list The list. |
899 * | 899 * |
900 * @param[in] touch_id The id of the touch-point. | 900 * @param[in] touch_id The id of the touch-point. |
901 * | 901 * |
902 * @return A <code>PP_TouchPoint</code> representing the touch-point. | 902 * @return A <code>PP_TouchPoint</code> representing the touch-point. |
903 */ | 903 */ |
904 PP_TouchPoint GetTouchById([in] PP_Resource resource, | 904 PP_TouchPoint GetTouchById([in] PP_Resource resource, |
905 [in] PP_TouchListType list, | 905 [in] PP_TouchListType list, |
906 [in] uint32_t touch_id); | 906 [in] uint32_t touch_id); |
907 }; | 907 }; |
OLD | NEW |