OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ | |
6 #define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ | |
7 | |
8 #include "ppapi/c/pp_stdint.h" | |
9 #include "ppapi/cpp/instance_handle.h" | |
10 | |
11 namespace pp { | |
12 | |
13 class Instance; | |
14 class Rect; | |
15 class Scrollbar_Dev; | |
16 class Widget_Dev; | |
17 | |
18 // This class provides a C++ interface for callbacks related to widgets. You | |
19 // would normally use multiple inheritance to derive from this class in your | |
20 // instance. | |
21 class WidgetClient_Dev { | |
22 public: | |
23 explicit WidgetClient_Dev(Instance* instance); | |
24 virtual ~WidgetClient_Dev(); | |
25 | |
26 /** | |
27 * Notification that the given widget should be repainted. This is the | |
28 * implementation for PPP_Widget_Dev. | |
29 */ | |
30 virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0; | |
31 | |
32 /** | |
33 * Notification that the given scrollbar should change value. This is the | |
34 * implementation for PPP_Scrollbar_Dev. | |
35 */ | |
36 virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar, | |
37 uint32_t value) = 0; | |
38 | |
39 /** | |
40 * Notification that the given scrollbar's overlay type has changed. This is | |
41 * the implementation for PPP_Scrollbar_Dev. | |
42 */ | |
43 virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar, | |
44 bool type) = 0; | |
45 | |
46 private: | |
47 InstanceHandle associated_instance_; | |
48 }; | |
49 | |
50 } // namespace pp | |
51 | |
52 #endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ | |
OLD | NEW |