| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 ppp_input_event.idl modified Thu Dec 15 12:44:27 2011. */ | 6 /* From ppp_input_event.idl modified Mon Dec 19 19:44:12 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPP_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PPP_INPUT_EVENT_H_ |
| 9 #define PPAPI_C_PPP_INPUT_EVENT_H_ | 9 #define PPAPI_C_PPP_INPUT_EVENT_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 | 16 |
| 17 #define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1" | 17 #define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1" |
| 18 #define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1 | 18 #define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1 |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * @file | 21 * @file |
| 22 * This file defines the API for receiving input events from the browser. | 22 * This file defines the API for receiving input events from the browser. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * @addtogroup Interfaces | 27 * @addtogroup Interfaces |
| 28 * @{ | 28 * @{ |
| 29 */ | 29 */ |
| 30 struct PPP_InputEvent { | 30 struct PPP_InputEvent_0_1 { |
| 31 /** | 31 /** |
| 32 * Function for receiving input events from the browser. | 32 * Function for receiving input events from the browser. |
| 33 * | 33 * |
| 34 * In order to receive input events, you must register for them by calling | 34 * In order to receive input events, you must register for them by calling |
| 35 * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By | 35 * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By |
| 36 * default, no events are delivered. | 36 * default, no events are delivered. |
| 37 * | 37 * |
| 38 * If the event was handled, it will not be forwarded to the web page or | 38 * If the event was handled, it will not be forwarded to the web page or |
| 39 * browser. If it was not handled, it will bubble according to the normal | 39 * browser. If it was not handled, it will bubble according to the normal |
| 40 * rules. So it is important that an instance respond accurately with whether | 40 * rules. So it is important that an instance respond accurately with whether |
| (...skipping 26 matching lines...) Expand all Loading... |
| 67 * PPB_InputEvent.RequestFilteringInputEvents | 67 * PPB_InputEvent.RequestFilteringInputEvents |
| 68 * | 68 * |
| 69 * @return PP_TRUE if the event was handled, PP_FALSE if not. If you have | 69 * @return PP_TRUE if the event was handled, PP_FALSE if not. If you have |
| 70 * registered to filter this class of events by calling | 70 * registered to filter this class of events by calling |
| 71 * RequestFilteringInputEvents, and you return PP_FALSE, the event will | 71 * RequestFilteringInputEvents, and you return PP_FALSE, the event will |
| 72 * be forwarded to the page (and eventually the browser) for the default | 72 * be forwarded to the page (and eventually the browser) for the default |
| 73 * handling. For non-filtered events, the return value will be ignored. | 73 * handling. For non-filtered events, the return value will be ignored. |
| 74 */ | 74 */ |
| 75 PP_Bool (*HandleInputEvent)(PP_Instance instance, PP_Resource input_event); | 75 PP_Bool (*HandleInputEvent)(PP_Instance instance, PP_Resource input_event); |
| 76 }; | 76 }; |
| 77 |
| 78 typedef struct PPP_InputEvent_0_1 PPP_InputEvent; |
| 77 /** | 79 /** |
| 78 * @} | 80 * @} |
| 79 */ | 81 */ |
| 80 | 82 |
| 81 #endif /* PPAPI_C_PPP_INPUT_EVENT_H_ */ | 83 #endif /* PPAPI_C_PPP_INPUT_EVENT_H_ */ |
| 82 | 84 |
| OLD | NEW |