| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 * for scrolling, producing the nested scrolling behavior users expect from | 258 * for scrolling, producing the nested scrolling behavior users expect from |
| 259 * frames in a page. | 259 * frames in a page. |
| 260 */ | 260 */ |
| 261 PP_INPUTEVENT_CLASS_WHEEL = 1 << 2, | 261 PP_INPUTEVENT_CLASS_WHEEL = 1 << 2, |
| 262 | 262 |
| 263 /** | 263 /** |
| 264 * Identifies touch input events. | 264 * Identifies touch input events. |
| 265 * | 265 * |
| 266 * Request touch events only if you intend to handle them. If the browser | 266 * Request touch events only if you intend to handle them. If the browser |
| 267 * knows you do not need to handle touch events, it can handle them at a | 267 * knows you do not need to handle touch events, it can handle them at a |
| 268 * higher level and achieve higher performance. | 268 * higher level and achieve higher performance. If the plugin does not |
| 269 * register for touch-events, then it will receive synthetic mouse events that |
| 270 * are generated from the touch events (e.g. mouse-down for touch-start, |
| 271 * mouse-move for touch-move (with left-button down), and mouse-up for |
| 272 * touch-end. If the plugin does register for touch events, then the synthetic |
| 273 * mouse events are not created. |
| 269 */ | 274 */ |
| 270 PP_INPUTEVENT_CLASS_TOUCH = 1 << 3, | 275 PP_INPUTEVENT_CLASS_TOUCH = 1 << 3, |
| 271 | 276 |
| 272 /** | 277 /** |
| 273 * Identifies IME composition input events. | 278 * Identifies IME composition input events. |
| 274 * | 279 * |
| 275 * Request this input event class if you allow on-the-spot IME input. | 280 * Request this input event class if you allow on-the-spot IME input. |
| 276 */ | 281 */ |
| 277 PP_INPUTEVENT_CLASS_IME = 1 << 4 | 282 PP_INPUTEVENT_CLASS_IME = 1 << 4 |
| 278 }; | 283 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 299 * to non-filtering mode). | 304 * to non-filtering mode). |
| 300 * | 305 * |
| 301 * Input events may have high overhead, so you should only request input | 306 * Input events may have high overhead, so you should only request input |
| 302 * events that your plugin will actually handle. For example, the browser may | 307 * events that your plugin will actually handle. For example, the browser may |
| 303 * do optimizations for scroll or touch events that can be processed | 308 * do optimizations for scroll or touch events that can be processed |
| 304 * substantially faster if it knows there are no non-default receivers for | 309 * substantially faster if it knows there are no non-default receivers for |
| 305 * that message. Requesting that such messages be delivered, even if they are | 310 * that message. Requesting that such messages be delivered, even if they are |
| 306 * processed very quickly, may have a noticeable effect on the performance of | 311 * processed very quickly, may have a noticeable effect on the performance of |
| 307 * the page. | 312 * the page. |
| 308 * | 313 * |
| 314 * Note that synthetic mouse events will be generated from touch events if |
| 315 * (and only if) the you do not request touch events. |
| 316 * |
| 309 * When requesting input events through this function, the events will be | 317 * When requesting input events through this function, the events will be |
| 310 * 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 |
| 311 * 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 |
| 312 * a crack at the message. | 320 * a crack at the message. |
| 313 * | 321 * |
| 314 * <strong>Example:</strong> | 322 * <strong>Example:</strong> |
| 315 * <code> | 323 * <code> |
| 316 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); | 324 * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); |
| 317 * RequestFilteringInputEvents(instance, | 325 * RequestFilteringInputEvents(instance, |
| 318 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); | 326 * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 * @param[in] list The list. | 898 * @param[in] list The list. |
| 891 * | 899 * |
| 892 * @param[in] touch_id The id of the touch-point. | 900 * @param[in] touch_id The id of the touch-point. |
| 893 * | 901 * |
| 894 * @return A <code>PP_TouchPoint</code> representing the touch-point. | 902 * @return A <code>PP_TouchPoint</code> representing the touch-point. |
| 895 */ | 903 */ |
| 896 PP_TouchPoint GetTouchById([in] PP_Resource resource, | 904 PP_TouchPoint GetTouchById([in] PP_Resource resource, |
| 897 [in] PP_TouchListType list, | 905 [in] PP_TouchListType list, |
| 898 [in] uint32_t touch_id); | 906 [in] uint32_t touch_id); |
| 899 }; | 907 }; |
| OLD | NEW |