|
1 /* vim: se cin sw=2 ts=2 et : */ |
|
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
3 * |
|
4 * This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 #ifndef __mozilla_widget_TaskbarPreviewButton_h__ |
|
9 #define __mozilla_widget_TaskbarPreviewButton_h__ |
|
10 |
|
11 #include <windows.h> |
|
12 #include <shobjidl.h> |
|
13 #undef LogSeverity // SetupAPI.h #defines this as DWORD |
|
14 |
|
15 #include <nsITaskbarPreviewButton.h> |
|
16 #include <nsAutoPtr.h> |
|
17 #include <nsString.h> |
|
18 #include <nsWeakReference.h> |
|
19 |
|
20 namespace mozilla { |
|
21 namespace widget { |
|
22 |
|
23 class TaskbarWindowPreview; |
|
24 class TaskbarPreviewButton : public nsITaskbarPreviewButton, public nsSupportsWeakReference |
|
25 { |
|
26 public: |
|
27 TaskbarPreviewButton(TaskbarWindowPreview* preview, uint32_t index); |
|
28 virtual ~TaskbarPreviewButton(); |
|
29 |
|
30 NS_DECL_ISUPPORTS |
|
31 NS_DECL_NSITASKBARPREVIEWBUTTON |
|
32 |
|
33 private: |
|
34 THUMBBUTTON& Button(); |
|
35 nsresult Update(); |
|
36 |
|
37 nsRefPtr<TaskbarWindowPreview> mPreview; |
|
38 uint32_t mIndex; |
|
39 nsString mTooltip; |
|
40 nsCOMPtr<imgIContainer> mImage; |
|
41 }; |
|
42 |
|
43 } // namespace widget |
|
44 } // namespace mozilla |
|
45 |
|
46 #endif /* __mozilla_widget_TaskbarPreviewButton_h__ */ |
|
47 |