cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / api / dev / ppb_scrollbar_dev.idl
blobe06711d5ad30f2e2810428f78e66e52d2f8992cd
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 /**
7 * This file defines the <code>PPB_Buffer_Dev</code> interface.
8 */
9 label Chrome {
10 M14 = 0.5
13 [assert_size(4)]
14 enum PP_ScrollBy_Dev {
15 PP_SCROLLBY_PIXEL = 0,
16 PP_SCROLLBY_LINE = 1,
17 PP_SCROLLBY_PAGE = 2,
18 PP_SCROLLBY_DOCUMENT = 3
21 /**
22 * The interface for a scrollbar. A scrollbar is a widget, so the functions
23 * in PPB_Widget can also be used with scrollbar objects.
25 interface PPB_Scrollbar_Dev {
26 /**
27 * Create a new scrollbar. Returns 0 if the instance is invalid.
29 PP_Resource Create([in] PP_Instance instance,
30 [in] PP_Bool vertical);
32 /**
33 * Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if
34 * the resource is invalid or some type other than a scrollbar.
36 PP_Bool IsScrollbar([in] PP_Resource resource);
38 /**
39 * Gets the thickness of a scrollbar.
41 uint32_t GetThickness([in] PP_Resource resource);
43 /**
44 * Returns PP_TRUE if the system scrollbar style is an overlap scrollbar.
46 PP_Bool IsOverlay([in] PP_Resource scrollbar);
48 /**
49 * Gets the value of the scrollbar.
51 uint32_t GetValue([in] PP_Resource scrollbar);
53 /**
54 * Sets the value of the scrollbar.
56 void SetValue([in] PP_Resource scrollbar,
57 [in] uint32_t value);
59 /**
60 * Set the document size (i.e. total length of the region that's being
61 * scrolled).
63 void SetDocumentSize([in] PP_Resource scrollbar,
64 [in] uint32_t size);
66 /**
67 * Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks"
68 * contains "count" PP_Rect objects.
70 void SetTickMarks([in] PP_Resource scrollbar,
71 [in, size_as=count] PP_Rect[] tick_marks,
72 [in] uint32_t count);
74 /**
75 * Scroll by "multiplier" pixels/lines/pages units. Positive values are
76 * forward and negative are backward. If "unit" is document then any positive
77 * value goes to the end while any negative value goes to the beginning.
79 void ScrollBy([in] PP_Resource scrollbar,
80 [in] PP_ScrollBy_Dev unit,
81 [in] int32_t multiplier);