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.
7 * Implementation of the widgets interface.
18 * The interface for reusing browser widgets.
20 interface PPB_Widget_Dev
{
22 * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the
23 * resource is invalid or some type other than an Widget.
25 PP_Bool IsWidget
([in] PP_Resource resource
);
28 * Paint the given rectangle of the widget into the given image.
29 * Returns PP_TRUE on success, PP_FALSE on failure.
32 PP_Bool Paint
([in] PP_Resource widget
,
34 [in] PP_Resource image
);
37 * Pass in an event to a widget. It'll return PP_TRUE if the event was
41 PP_Bool HandleEvent
([in] PP_Resource widget
, [in] PP_Resource input_event
);
44 * Get the location of the widget.
47 PP_Bool GetLocation
([in] PP_Resource widget
,
48 [out] PP_Rect location
);
51 * Set the location of the widget.
54 void SetLocation
([in] PP_Resource widget
,
55 [in] PP_Rect location
);
58 * Set scale used during paint operations.
60 [version=0.4, report_errors
=False
]
61 void SetScale
([in] PP_Resource widget
,