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 "mozilla/RefPtr.h" 16 #include <nsITaskbarPreviewButton.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, 25 public nsSupportsWeakReference { 26 virtual ~TaskbarPreviewButton(); 27 28 public: 29 TaskbarPreviewButton(TaskbarWindowPreview* preview, uint32_t index); 30 31 NS_DECL_ISUPPORTS 32 NS_DECL_NSITASKBARPREVIEWBUTTON 33 34 private: 35 THUMBBUTTON& Button(); 36 nsresult Update(); 37 38 RefPtr<TaskbarWindowPreview> mPreview; 39 uint32_t mIndex; 40 nsString mTooltip; 41 nsCOMPtr<imgIContainer> mImage; 42 }; 43 44 } // namespace widget 45 } // namespace mozilla 46 47 #endif /* __mozilla_widget_TaskbarPreviewButton_h__ */ 48