OLD | NEW |
(Empty) | |
| 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 |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 #ifndef PPAPI_C_PPP_INPUT_EVENT_H_ |
| 7 #define PPAPI_C_PPP_INPUT_EVENT_H_ |
| 8 |
| 9 #include "ppapi/c/pp_bool.h" |
| 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/pp_resource.h" |
| 12 |
| 13 #define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1" |
| 14 #define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1 |
| 15 |
| 16 struct PPP_InputEvent { |
| 17 /** |
| 18 * Function for receiving input events from the browser. |
| 19 * |
| 20 * In order to receive input events, you must register for them by calling |
| 21 * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By |
| 22 * default, no events are delivered. |
| 23 * |
| 24 * In general, you should try to keep input event handling short. Especially |
| 25 * for filtered input events, the browser or page may be blocked waiting for |
| 26 * you to respond. |
| 27 * |
| 28 * @return PP_TRUE if the event was handled, PP_FALSE if not. If you have |
| 29 * registered to filter this class of events by calling |
| 30 * RequestFilteringInputEvents, and you return PP_FALSE, the event will |
| 31 * be forwarded to the page (and eventually the browser) for the default |
| 32 * handling. |
| 33 */ |
| 34 PP_Bool (*HandleInputEvent)(PP_Instance instance, PP_Resource input_event); |
| 35 }; |
| 36 |
| 37 #endif // PPAPI_C_PPP_INPUT_EVENT_H_ |
OLD | NEW |