diff options
author | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 00:26:33 +0000 |
---|---|---|
committer | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 00:26:33 +0000 |
commit | f4eb5c51a3c5cf078db192c043e187368d222c9e (patch) | |
tree | 1cc4f339579d4dbb802d88b2929ee354c5f2f60e /ppapi/c | |
parent | 01a605f142eccfd11a4cb4132fd1551eecc05324 (diff) | |
download | chromium_src-f4eb5c51a3c5cf078db192c043e187368d222c9e.zip chromium_src-f4eb5c51a3c5cf078db192c043e187368d222c9e.tar.gz chromium_src-f4eb5c51a3c5cf078db192c043e187368d222c9e.tar.bz2 |
Convert zoom and widget to IDL
NOTE: In converting widget I noticed that GetLocation returns
bool, implying it can fail. I assume this is when the PP_Resource
is not actually a widget. Shouldn't SetLocation match this?
TEST= ./generator.py & try
BUG= http://code.google.com/p/chromium/issues/detail?id=89968
Review URL: http://codereview.chromium.org/7767007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_widget_dev.h | 64 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_zoom_dev.h | 44 |
2 files changed, 78 insertions, 30 deletions
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_ */ |