| 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 dev/ppb_widget_dev.idl modified Fri Aug 26 15:18:14 2011. */ | 6 /* From dev/ppb_widget_dev.idl modified Wed Oct 5 14:06:02 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_WIDGET_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_WIDGET_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_WIDGET_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_WIDGET_DEV_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
| 13 #include "ppapi/c/pp_point.h" | 13 #include "ppapi/c/pp_point.h" |
| 14 #include "ppapi/c/pp_rect.h" | 14 #include "ppapi/c/pp_rect.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_size.h" | 16 #include "ppapi/c/pp_size.h" |
| 17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
| 18 | 18 |
| 19 #define PPB_WIDGET_DEV_INTERFACE_0_3 "PPB_Widget(Dev);0.3" | 19 #define PPB_WIDGET_DEV_INTERFACE_0_3 "PPB_Widget(Dev);0.3" |
| 20 #define PPB_WIDGET_DEV_INTERFACE PPB_WIDGET_DEV_INTERFACE_0_3 | 20 #define PPB_WIDGET_DEV_INTERFACE PPB_WIDGET_DEV_INTERFACE_0_3 |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * @file | 23 * @file |
| 24 * Implementation of the widgets interface. | 24 * Implementation of the widgets interface. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * @addtogroup Interfaces | 29 * @addtogroup Interfaces |
| 30 * @{ | 30 * @{ |
| 31 */ | 31 */ |
| 32 /** | 32 /** |
| 33 * The interface for reusing browser widgets. | 33 * The interface for reusing browser widgets. |
| 34 */ | 34 */ |
| 35 struct PPB_Widget_Dev { | 35 struct PPB_Widget_Dev_0_3 { |
| 36 /** | 36 /** |
| 37 * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the | 37 * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the |
| 38 * resource is invalid or some type other than an Widget. | 38 * resource is invalid or some type other than an Widget. |
| 39 */ | 39 */ |
| 40 PP_Bool (*IsWidget)(PP_Resource resource); | 40 PP_Bool (*IsWidget)(PP_Resource resource); |
| 41 /** | 41 /** |
| 42 * Paint the given rectangle of the widget into the given image. | 42 * Paint the given rectangle of the widget into the given image. |
| 43 * Returns PP_TRUE on success, PP_FALSE on failure. | 43 * Returns PP_TRUE on success, PP_FALSE on failure. |
| 44 */ | 44 */ |
| 45 PP_Bool (*Paint)(PP_Resource widget, | 45 PP_Bool (*Paint)(PP_Resource widget, |
| 46 const struct PP_Rect* rect, | 46 const struct PP_Rect* rect, |
| 47 PP_Resource image); | 47 PP_Resource image); |
| 48 /** | 48 /** |
| 49 * Pass in an event to a widget. It'll return PP_TRUE if the event was | 49 * Pass in an event to a widget. It'll return PP_TRUE if the event was |
| 50 * consumed. | 50 * consumed. |
| 51 */ | 51 */ |
| 52 PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event); | 52 PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event); |
| 53 /** | 53 /** |
| 54 * Get the location of the widget. | 54 * Get the location of the widget. |
| 55 */ | 55 */ |
| 56 PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location); | 56 PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location); |
| 57 /** | 57 /** |
| 58 * Set the location of the widget. | 58 * Set the location of the widget. |
| 59 */ | 59 */ |
| 60 void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location); | 60 void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location); |
| 61 }; | 61 }; |
| 62 |
| 63 typedef struct PPB_Widget_Dev_0_3 PPB_Widget_Dev; |
| 62 /** | 64 /** |
| 63 * @} | 65 * @} |
| 64 */ | 66 */ |
| 65 | 67 |
| 66 #endif /* PPAPI_C_DEV_PPB_WIDGET_DEV_H_ */ | 68 #endif /* PPAPI_C_DEV_PPB_WIDGET_DEV_H_ */ |
| 67 | 69 |
| OLD | NEW |