michael@0: /* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIMacDockSupport.h" michael@0: #include "nsIStandaloneNativeMenu.h" michael@0: #include "nsITaskbarProgress.h" michael@0: #include "nsITimer.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: #include "nsNativeThemeCocoa.h" michael@0: michael@0: class nsMacDockSupport : public nsIMacDockSupport, public nsITaskbarProgress michael@0: { michael@0: public: michael@0: nsMacDockSupport(); michael@0: virtual ~nsMacDockSupport(); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIMACDOCKSUPPORT michael@0: NS_DECL_NSITASKBARPROGRESS michael@0: michael@0: protected: michael@0: nsCOMPtr mDockMenu; michael@0: nsString mBadgeText; michael@0: michael@0: NSImage *mAppIcon, *mProgressBackground; michael@0: michael@0: HIRect mProgressBounds; michael@0: nsTaskbarProgressState mProgressState; michael@0: double mProgressFraction; michael@0: nsCOMPtr mProgressTimer; michael@0: nsRefPtr mTheme; michael@0: michael@0: static void RedrawIconCallback(nsITimer* aTimer, void* aClosure); michael@0: michael@0: bool InitProgress(); michael@0: nsresult RedrawIcon(); michael@0: };