diff options
-rw-r--r-- | ppapi/api/dev/ppb_widget_dev.idl | 49 | ||||
-rw-r--r-- | ppapi/api/dev/ppb_zoom_dev.idl | 34 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_widget_dev.h | 64 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_zoom_dev.h | 44 |
4 files changed, 161 insertions, 30 deletions
diff --git a/ppapi/api/dev/ppb_widget_dev.idl b/ppapi/api/dev/ppb_widget_dev.idl new file mode 100644 index 0000000..e7e62d4 --- /dev/null +++ b/ppapi/api/dev/ppb_widget_dev.idl @@ -0,0 +1,49 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * Implementation of the widgets interface. + */ + +label Chrome { + M14 = 0.3 +}; + +/** + * The interface for reusing browser widgets. + */ +interface PPB_Widget_Dev { + /** + * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the + * resource is invalid or some type other than an Widget. + */ + PP_Bool IsWidget([in] PP_Resource resource); + + /** + * Paint the given rectangle of the widget into the given image. + * Returns PP_TRUE on success, PP_FALSE on failure. + */ + PP_Bool Paint([in] PP_Resource widget, + [in] PP_Rect rect, + [in] PP_Resource image); + + /** + * Pass in an event to a widget. It'll return PP_TRUE if the event was + * consumed. + */ + PP_Bool HandleEvent([in] PP_Resource widget, [in] PP_Resource input_event); + + /** + * Get the location of the widget. + */ + PP_Bool GetLocation([in] PP_Resource widget, + [out] PP_Rect location); + + /** + * Set the location of the widget. + */ + void SetLocation([in] PP_Resource widget, + [in] PP_Rect location); +}; diff --git a/ppapi/api/dev/ppb_zoom_dev.idl b/ppapi/api/dev/ppb_zoom_dev.idl new file mode 100644 index 0000000..0e51fc0 --- /dev/null +++ b/ppapi/api/dev/ppb_zoom_dev.idl @@ -0,0 +1,34 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * Implementation of the Zoom interface. + */ + +label Chrome { + M14 = 0.2 +}; + +/** + * Zoom interface should only apply to those full-page "plugin-document". + */ +interface PPB_Zoom_Dev { + /** + * Informs the browser about the new zoom factor for the plugin (see + * ppp_zoom_dev.h for a description of zoom factor). The plugin should only + * call this function if the zoom change was triggered by the browser, it's + * only needed in case a plugin can update its own zoom, say because of its + * own UI. + */ + void ZoomChanged([in] PP_Instance instance, + [in] double_t factor); + /** + * Sets the mininum and maximium zoom factors. + */ + void ZoomLimitsChanged([in] PP_Instance instance, + [in] double_t minimum_factor, + [in] double_t maximium_factor); +}; + diff --git a/ppapi/c/dev/ppb_widget_dev.h b/ppapi/c/dev/ppb_widget_dev.h index 0b04f79..003bace 100644 --- a/ppapi/c/dev/ppb_widget_dev.h +++ b/ppapi/c/dev/ppb_widget_dev.h @@ -1,41 +1,67 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + +/* From dev/ppb_widget_dev.idl modified Fri Aug 26 15:18:14 2011. */ + #ifndef PPAPI_C_DEV_PPB_WIDGET_DEV_H_ #define PPAPI_C_DEV_PPB_WIDGET_DEV_H_ #include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_point.h" +#include "ppapi/c/pp_rect.h" #include "ppapi/c/pp_resource.h" - -struct PP_Rect; +#include "ppapi/c/pp_size.h" +#include "ppapi/c/pp_stdint.h" #define PPB_WIDGET_DEV_INTERFACE_0_3 "PPB_Widget(Dev);0.3" #define PPB_WIDGET_DEV_INTERFACE PPB_WIDGET_DEV_INTERFACE_0_3 -// The interface for reusing browser widgets. +/** + * @file + * Implementation of the widgets interface. + */ + + +/** + * @addtogroup Interfaces + * @{ + */ +/** + * The interface for reusing browser widgets. + */ struct PPB_Widget_Dev { - // Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the - // resource is invalid or some type other than an Widget. + /** + * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the + * resource is invalid or some type other than an Widget. + */ PP_Bool (*IsWidget)(PP_Resource resource); - - // Paint the given rectangle of the widget into the given image. - // Returns PP_TRUE on success, PP_FALSE on failure + /** + * Paint the given rectangle of the widget into the given image. + * Returns PP_TRUE on success, PP_FALSE on failure. + */ PP_Bool (*Paint)(PP_Resource widget, const struct PP_Rect* rect, PP_Resource image); - - // Pass in an event to a widget. It'll return PP_TRUE if the event was - // consumed. + /** + * Pass in an event to a widget. It'll return PP_TRUE if the event was + * consumed. + */ PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event); - - // Get/set the location of the widget. - PP_Bool (*GetLocation)(PP_Resource widget, - struct PP_Rect* location); - - void (*SetLocation)(PP_Resource widget, - const struct PP_Rect* location); + /** + * Get the location of the widget. + */ + PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location); + /** + * Set the location of the widget. + */ + void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location); }; +/** + * @} + */ #endif /* PPAPI_C_DEV_PPB_WIDGET_DEV_H_ */ diff --git a/ppapi/c/dev/ppb_zoom_dev.h b/ppapi/c/dev/ppb_zoom_dev.h index 8aac17d..299e7e7 100644 --- a/ppapi/c/dev/ppb_zoom_dev.h +++ b/ppapi/c/dev/ppb_zoom_dev.h @@ -1,30 +1,52 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + +/* From dev/ppb_zoom_dev.idl modified Fri Aug 26 15:06:04 2011. */ + #ifndef PPAPI_C_DEV_PPB_ZOOM_DEV_H_ #define PPAPI_C_DEV_PPB_ZOOM_DEV_H_ #include "ppapi/c/pp_instance.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_stdint.h" -// Zoom interface should only apply to those full-page "plugin-document". #define PPB_ZOOM_DEV_INTERFACE_0_2 "PPB_Zoom(Dev);0.2" #define PPB_ZOOM_DEV_INTERFACE PPB_ZOOM_DEV_INTERFACE_0_2 +/** + * @file + * Implementation of the Zoom interface. + */ + + +/** + * @addtogroup Interfaces + * @{ + */ +/** + * Zoom interface should only apply to those full-page "plugin-document". + */ struct PPB_Zoom_Dev { - // Informs the browser about the new zoom factor for the plugin (see - // ppp_zoom_dev.h for a description of zoom factor). The plugin should only - // call this function if the zoom change was triggered by the browser, it's - // only needed in case a plugin can update its own zoom, say because of its - // own UI. - void (*ZoomChanged)(PP_Instance instance, - double factor); - - // Sets the mininum and maximium zoom factors. + /** + * Informs the browser about the new zoom factor for the plugin (see + * ppp_zoom_dev.h for a description of zoom factor). The plugin should only + * call this function if the zoom change was triggered by the browser, it's + * only needed in case a plugin can update its own zoom, say because of its + * own UI. + */ + void (*ZoomChanged)(PP_Instance instance, double factor); + /** + * Sets the mininum and maximium zoom factors. + */ void (*ZoomLimitsChanged)(PP_Instance instance, double minimum_factor, double maximium_factor); }; +/** + * @} + */ #endif /* PPAPI_C_DEV_PPB_ZOOM_DEV_H_ */ |