2010-02-08 06:38:14 +03:00
|
|
|
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-02-08 06:38:14 +03:00
|
|
|
|
|
|
|
#include "nsIMacDockSupport.h"
|
|
|
|
#include "nsIStandaloneNativeMenu.h"
|
2013-03-03 14:58:00 +04:00
|
|
|
#include "nsITaskbarProgress.h"
|
|
|
|
#include "nsITimer.h"
|
2010-02-08 06:38:14 +03:00
|
|
|
#include "nsCOMPtr.h"
|
2011-12-05 13:57:45 +04:00
|
|
|
#include "nsString.h"
|
2013-04-17 10:51:52 +04:00
|
|
|
#include "nsNativeThemeCocoa.h"
|
2010-02-08 06:38:14 +03:00
|
|
|
|
2013-03-03 14:58:00 +04:00
|
|
|
class nsMacDockSupport : public nsIMacDockSupport, public nsITaskbarProgress
|
2010-02-08 06:38:14 +03:00
|
|
|
{
|
|
|
|
public:
|
2013-03-03 14:58:00 +04:00
|
|
|
nsMacDockSupport();
|
|
|
|
|
2010-02-08 06:38:14 +03:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIMACDOCKSUPPORT
|
2013-03-03 14:58:00 +04:00
|
|
|
NS_DECL_NSITASKBARPROGRESS
|
2010-02-08 06:38:14 +03:00
|
|
|
|
|
|
|
protected:
|
2014-07-06 19:25:31 +04:00
|
|
|
virtual ~nsMacDockSupport();
|
|
|
|
|
2010-02-08 06:38:14 +03:00
|
|
|
nsCOMPtr<nsIStandaloneNativeMenu> mDockMenu;
|
2011-12-05 13:57:45 +04:00
|
|
|
nsString mBadgeText;
|
2013-03-03 14:58:00 +04:00
|
|
|
|
|
|
|
NSImage *mAppIcon, *mProgressBackground;
|
|
|
|
|
2013-04-17 10:51:52 +04:00
|
|
|
HIRect mProgressBounds;
|
2013-03-03 14:58:00 +04:00
|
|
|
nsTaskbarProgressState mProgressState;
|
|
|
|
double mProgressFraction;
|
|
|
|
nsCOMPtr<nsITimer> mProgressTimer;
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsNativeThemeCocoa> mTheme;
|
2013-03-03 14:58:00 +04:00
|
|
|
|
|
|
|
static void RedrawIconCallback(nsITimer* aTimer, void* aClosure);
|
|
|
|
|
|
|
|
bool InitProgress();
|
|
|
|
nsresult RedrawIcon();
|
2010-02-08 06:38:14 +03:00
|
|
|
};
|