| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 * do optimizations for scroll or touch events that can be processed | 309 * do optimizations for scroll or touch events that can be processed |
| 310 * substantially faster if it knows there are no non-default receivers for | 310 * substantially faster if it knows there are no non-default receivers for |
| 311 * that message. Requesting that such messages be delivered, even if they are | 311 * that message. Requesting that such messages be delivered, even if they are |
| 312 * processed very quickly, may have a noticeable effect on the performance of | 312 * processed very quickly, may have a noticeable effect on the performance of |
| 313 * the page. | 313 * the page. |
| 314 * | 314 * |
| 315 * Note that synthetic mouse events will be generated from touch events if | 315 * Note that synthetic mouse events will be generated from touch events if |
| 316 * (and only if) you do not request touch events. | 316 * (and only if) you do not request touch events. |
| 317 * | 317 * |
| 318 * When requesting input events through this function, the events will be | 318 * When requesting input events through this function, the events will be |
| 319 * delivered and <i>not</i> bubbled to the page. This means that even if you | 319 * delivered and <i>not</i> bubbled to the default handlers. |
| 320 * aren't interested in the message, no other parts of the page will get | |
| 321 * a crack at the message. | |
| 322 * | 320 * |
| 323 * <strong>Example:</strong> | 321 * <strong>Example:</strong> |
| 324 * @code | 322 * @code |
| 325 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 323 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
| 326 * RequestFilteringInputEvents(instance, | 324 * RequestFilteringInputEvents(instance, |
| 327 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 325 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
| 328 * @endcode | 326 * @endcode |
| 329 * | 327 * |
| 330 * @param instance The <code>PP_Instance</code> of the instance requesting | 328 * @param instance The <code>PP_Instance</code> of the instance requesting |
| 331 * the given events. | 329 * the given events. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 346 int32_t RequestInputEvents([in] PP_Instance instance, | 344 int32_t RequestInputEvents([in] PP_Instance instance, |
| 347 [in] uint32_t event_classes); | 345 [in] uint32_t event_classes); |
| 348 | 346 |
| 349 /** | 347 /** |
| 350 * RequestFilteringInputEvents() requests that input events corresponding to | 348 * RequestFilteringInputEvents() requests that input events corresponding to |
| 351 * the given input events are delivered to the instance for filtering. | 349 * the given input events are delivered to the instance for filtering. |
| 352 * | 350 * |
| 353 * By default, no input events are delivered. In most cases you would | 351 * By default, no input events are delivered. In most cases you would |
| 354 * register to receive events by calling RequestInputEvents(). In some cases, | 352 * register to receive events by calling RequestInputEvents(). In some cases, |
| 355 * however, you may wish to filter events such that they can be bubbled up | 353 * however, you may wish to filter events such that they can be bubbled up |
| 356 * to the DOM. In this case, register for those classes of events using | 354 * to the default handlers. In this case, register for those classes of |
| 357 * this function instead of RequestInputEvents(). | 355 * events using this function instead of RequestInputEvents(). |
| 358 * | 356 * |
| 359 * Filtering input events requires significantly more overhead than just | 357 * Filtering input events requires significantly more overhead than just |
| 360 * delivering them to the instance. As such, you should only request | 358 * delivering them to the instance. As such, you should only request |
| 361 * filtering in those cases where it's absolutely necessary. The reason is | 359 * filtering in those cases where it's absolutely necessary. The reason is |
| 362 * that it requires the browser to stop and block for the instance to handle | 360 * that it requires the browser to stop and block for the instance to handle |
| 363 * the input event, rather than sending the input event asynchronously. This | 361 * the input event, rather than sending the input event asynchronously. This |
| 364 * can have significant overhead. | 362 * can have significant overhead. |
| 365 * | 363 * |
| 366 * <strong>Example:</strong> | 364 * <strong>Example:</strong> |
| 367 * @code | 365 * @code |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 * event. | 1078 * event. |
| 1081 * | 1079 * |
| 1082 * @param[out] start The start position of the current selection. | 1080 * @param[out] start The start position of the current selection. |
| 1083 * | 1081 * |
| 1084 * @param[out] end The end position of the current selection. | 1082 * @param[out] end The end position of the current selection. |
| 1085 */ | 1083 */ |
| 1086 void GetSelection([in] PP_Resource ime_event, | 1084 void GetSelection([in] PP_Resource ime_event, |
| 1087 [out] uint32_t start, | 1085 [out] uint32_t start, |
| 1088 [out] uint32_t end); | 1086 [out] uint32_t end); |
| 1089 }; | 1087 }; |
| OLD | NEW |