Remove Observer methods in RTCVideoEncoderFactory.
[chromium-blink-merge.git] / ppapi / c / dev / ppb_widget_dev.h
blob7fec37869ccbdf5b67d9d0e32aa35dc7ec18bd92
1 /* Copyright (c) 2012 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 */
6 /* From dev/ppb_widget_dev.idl modified Mon Aug 20 10:21:06 2012. */
8 #ifndef PPAPI_C_DEV_PPB_WIDGET_DEV_H_
9 #define PPAPI_C_DEV_PPB_WIDGET_DEV_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_point.h"
14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_size.h"
17 #include "ppapi/c/pp_stdint.h"
19 #define PPB_WIDGET_DEV_INTERFACE_0_3 "PPB_Widget(Dev);0.3"
20 #define PPB_WIDGET_DEV_INTERFACE_0_4 "PPB_Widget(Dev);0.4"
21 #define PPB_WIDGET_DEV_INTERFACE PPB_WIDGET_DEV_INTERFACE_0_4
23 /**
24 * @file
25 * Implementation of the widgets interface.
29 /**
30 * @addtogroup Interfaces
31 * @{
33 /**
34 * The interface for reusing browser widgets.
36 struct PPB_Widget_Dev_0_4 {
37 /**
38 * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the
39 * resource is invalid or some type other than an Widget.
41 PP_Bool (*IsWidget)(PP_Resource resource);
42 /**
43 * Paint the given rectangle of the widget into the given image.
44 * Returns PP_TRUE on success, PP_FALSE on failure.
46 PP_Bool (*Paint)(PP_Resource widget,
47 const struct PP_Rect* rect,
48 PP_Resource image);
49 /**
50 * Pass in an event to a widget. It'll return PP_TRUE if the event was
51 * consumed.
53 PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event);
54 /**
55 * Get the location of the widget.
57 PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location);
58 /**
59 * Set the location of the widget.
61 void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location);
62 /**
63 * Set scale used during paint operations.
65 void (*SetScale)(PP_Resource widget, float scale);
68 typedef struct PPB_Widget_Dev_0_4 PPB_Widget_Dev;
70 struct PPB_Widget_Dev_0_3 {
71 PP_Bool (*IsWidget)(PP_Resource resource);
72 PP_Bool (*Paint)(PP_Resource widget,
73 const struct PP_Rect* rect,
74 PP_Resource image);
75 PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event);
76 PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location);
77 void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location);
79 /**
80 * @}
83 #endif /* PPAPI_C_DEV_PPB_WIDGET_DEV_H_ */