OLD | NEW |
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 #ifndef PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ |
6 #define PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
12 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
13 | 13 |
14 struct PP_Rect; | 14 struct PP_Rect; |
15 | 15 |
16 typedef enum { | 16 typedef enum { |
17 PP_SCROLLBY_PIXEL = 0, | 17 PP_SCROLLBY_PIXEL = 0, |
18 PP_SCROLLBY_LINE = 1, | 18 PP_SCROLLBY_LINE = 1, |
19 PP_SCROLLBY_PAGE = 2, | 19 PP_SCROLLBY_PAGE = 2, |
20 PP_SCROLLBY_DOCUMENT = 3 | 20 PP_SCROLLBY_DOCUMENT = 3 |
21 } PP_ScrollBy_Dev; | 21 } PP_ScrollBy_Dev; |
22 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ScrollBy_Dev, 4); | 22 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ScrollBy_Dev, 4); |
23 | 23 |
24 #define PPB_SCROLLBAR_DEV_INTERFACE "PPB_Scrollbar(Dev);0.3" | 24 #define PPB_SCROLLBAR_DEV_INTERFACE_0_3 "PPB_Scrollbar(Dev);0.3" |
| 25 #define PPB_SCROLLBAR_DEV_INTERFACE PPB_SCROLLBAR_DEV_INTERFACE_0_3 |
25 | 26 |
26 // The interface for a scrollbar. A scrollbar is a widget, so the functions | 27 // The interface for a scrollbar. A scrollbar is a widget, so the functions |
27 // in PPB_Widget can also be used with scrollbar objects. | 28 // in PPB_Widget can also be used with scrollbar objects. |
28 struct PPB_Scrollbar_Dev { | 29 struct PPB_Scrollbar_Dev { |
29 // Create a new scrollbar. Returns 0 if the instance is invalid. | 30 // Create a new scrollbar. Returns 0 if the instance is invalid. |
30 PP_Resource (*Create)(PP_Instance instance, | 31 PP_Resource (*Create)(PP_Instance instance, |
31 PP_Bool vertical); | 32 PP_Bool vertical); |
32 | 33 |
33 // Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if | 34 // 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. | 35 // the resource is invalid or some type other than a scrollbar. |
(...skipping 22 matching lines...) Expand all Loading... |
57 // Scroll by "multiplier" pixels/lines/pages units. Positive values are | 58 // Scroll by "multiplier" pixels/lines/pages units. Positive values are |
58 // forward and negative are backward. If "unit" is document then any positive | 59 // forward and negative are backward. If "unit" is document then any positive |
59 // value goes to the end while any negative value goes to the beginning. | 60 // value goes to the end while any negative value goes to the beginning. |
60 void (*ScrollBy)(PP_Resource scrollbar, | 61 void (*ScrollBy)(PP_Resource scrollbar, |
61 PP_ScrollBy_Dev unit, | 62 PP_ScrollBy_Dev unit, |
62 int32_t multiplier); | 63 int32_t multiplier); |
63 }; | 64 }; |
64 | 65 |
65 #endif /* PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ */ | 66 #endif /* PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ */ |
66 | 67 |
OLD | NEW |