| OLD | NEW |
| (Empty) |
| 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 */ | |
| 5 | |
| 6 /** | |
| 7 * Implementation of the widgets interface. | |
| 8 */ | |
| 9 | |
| 10 [generate_thunk] | |
| 11 | |
| 12 label Chrome { | |
| 13 M14 = 0.3, | |
| 14 M23 = 0.4 | |
| 15 }; | |
| 16 | |
| 17 /** | |
| 18 * The interface for reusing browser widgets. | |
| 19 */ | |
| 20 interface PPB_Widget_Dev { | |
| 21 /** | |
| 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. | |
| 24 */ | |
| 25 PP_Bool IsWidget([in] PP_Resource resource); | |
| 26 | |
| 27 /** | |
| 28 * Paint the given rectangle of the widget into the given image. | |
| 29 * Returns PP_TRUE on success, PP_FALSE on failure. | |
| 30 */ | |
| 31 [report_errors=False] | |
| 32 PP_Bool Paint([in] PP_Resource widget, | |
| 33 [in] PP_Rect rect, | |
| 34 [in] PP_Resource image); | |
| 35 | |
| 36 /** | |
| 37 * Pass in an event to a widget. It'll return PP_TRUE if the event was | |
| 38 * consumed. | |
| 39 */ | |
| 40 [report_errors=False] | |
| 41 PP_Bool HandleEvent([in] PP_Resource widget, [in] PP_Resource input_event); | |
| 42 | |
| 43 /** | |
| 44 * Get the location of the widget. | |
| 45 */ | |
| 46 [report_errors=False] | |
| 47 PP_Bool GetLocation([in] PP_Resource widget, | |
| 48 [out] PP_Rect location); | |
| 49 | |
| 50 /** | |
| 51 * Set the location of the widget. | |
| 52 */ | |
| 53 [report_errors=False] | |
| 54 void SetLocation([in] PP_Resource widget, | |
| 55 [in] PP_Rect location); | |
| 56 | |
| 57 /** | |
| 58 * Set scale used during paint operations. | |
| 59 */ | |
| 60 [version=0.4, report_errors=False] | |
| 61 void SetScale([in] PP_Resource widget, | |
| 62 [in] float_t scale); | |
| 63 }; | |
| OLD | NEW |