widget/cocoa/nsMacDockSupport.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/cocoa/nsMacDockSupport.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsIMacDockSupport.h"
    1.10 +#include "nsIStandaloneNativeMenu.h"
    1.11 +#include "nsITaskbarProgress.h"
    1.12 +#include "nsITimer.h"
    1.13 +#include "nsCOMPtr.h"
    1.14 +#include "nsString.h"
    1.15 +#include "nsNativeThemeCocoa.h"
    1.16 +
    1.17 +class nsMacDockSupport : public nsIMacDockSupport, public nsITaskbarProgress
    1.18 +{
    1.19 +public:
    1.20 +  nsMacDockSupport();
    1.21 +  virtual ~nsMacDockSupport();
    1.22 +
    1.23 +  NS_DECL_ISUPPORTS
    1.24 +  NS_DECL_NSIMACDOCKSUPPORT
    1.25 +  NS_DECL_NSITASKBARPROGRESS
    1.26 +
    1.27 +protected:
    1.28 +  nsCOMPtr<nsIStandaloneNativeMenu> mDockMenu;
    1.29 +  nsString mBadgeText;
    1.30 +
    1.31 +  NSImage *mAppIcon, *mProgressBackground;
    1.32 +
    1.33 +  HIRect mProgressBounds;
    1.34 +  nsTaskbarProgressState mProgressState;
    1.35 +  double mProgressFraction;
    1.36 +  nsCOMPtr<nsITimer> mProgressTimer;
    1.37 +  nsRefPtr<nsNativeThemeCocoa> mTheme;
    1.38 +
    1.39 +  static void RedrawIconCallback(nsITimer* aTimer, void* aClosure);
    1.40 +
    1.41 +  bool InitProgress();
    1.42 +  nsresult RedrawIcon();
    1.43 +};

mercurial