widget/windows/TaskbarPreviewButton.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/TaskbarPreviewButton.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +/* vim: se cin sw=2 ts=2 et : */
     1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.6 + *
     1.7 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef __mozilla_widget_TaskbarPreviewButton_h__
    1.12 +#define __mozilla_widget_TaskbarPreviewButton_h__
    1.13 +
    1.14 +#include <windows.h>
    1.15 +#include <shobjidl.h>
    1.16 +#undef LogSeverity // SetupAPI.h #defines this as DWORD
    1.17 +
    1.18 +#include <nsITaskbarPreviewButton.h>
    1.19 +#include <nsAutoPtr.h>
    1.20 +#include <nsString.h>
    1.21 +#include <nsWeakReference.h>
    1.22 +
    1.23 +namespace mozilla {
    1.24 +namespace widget {
    1.25 +
    1.26 +class TaskbarWindowPreview;
    1.27 +class TaskbarPreviewButton : public nsITaskbarPreviewButton, public nsSupportsWeakReference
    1.28 +{
    1.29 +public: 
    1.30 +  TaskbarPreviewButton(TaskbarWindowPreview* preview, uint32_t index);
    1.31 +  virtual ~TaskbarPreviewButton();
    1.32 +
    1.33 +  NS_DECL_ISUPPORTS
    1.34 +  NS_DECL_NSITASKBARPREVIEWBUTTON
    1.35 +
    1.36 +private:
    1.37 +  THUMBBUTTON&            Button();
    1.38 +  nsresult                Update();
    1.39 +
    1.40 +  nsRefPtr<TaskbarWindowPreview> mPreview;
    1.41 +  uint32_t                mIndex;
    1.42 +  nsString                mTooltip;
    1.43 +  nsCOMPtr<imgIContainer> mImage;
    1.44 +};
    1.45 +
    1.46 +} // namespace widget
    1.47 +} // namespace mozilla
    1.48 +
    1.49 +#endif /* __mozilla_widget_TaskbarPreviewButton_h__ */
    1.50 +

mercurial