widget/windows/TaskbarTabPreview.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* vim: se cin sw=2 ts=2 et : */
michael@0 2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 3 *
michael@0 4 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 #ifndef __mozilla_widget_TaskbarTabPreview_h__
michael@0 9 #define __mozilla_widget_TaskbarTabPreview_h__
michael@0 10
michael@0 11 #include "nsITaskbarTabPreview.h"
michael@0 12 #include "TaskbarPreview.h"
michael@0 13
michael@0 14 namespace mozilla {
michael@0 15 namespace widget {
michael@0 16
michael@0 17 class TaskbarTabPreview : public nsITaskbarTabPreview,
michael@0 18 public TaskbarPreview
michael@0 19 {
michael@0 20 public:
michael@0 21 TaskbarTabPreview(ITaskbarList4 *aTaskbar, nsITaskbarPreviewController *aController, HWND aHWND, nsIDocShell *aShell);
michael@0 22 virtual ~TaskbarTabPreview();
michael@0 23
michael@0 24 NS_DECL_ISUPPORTS
michael@0 25 NS_DECL_NSITASKBARTABPREVIEW
michael@0 26 NS_FORWARD_NSITASKBARPREVIEW(TaskbarPreview::)
michael@0 27
michael@0 28 private:
michael@0 29 virtual nsresult ShowActive(bool active);
michael@0 30 virtual HWND &PreviewWindow();
michael@0 31 virtual LRESULT WndProc(UINT nMsg, WPARAM wParam, LPARAM lParam);
michael@0 32 static LRESULT CALLBACK GlobalWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
michael@0 33
michael@0 34 virtual nsresult UpdateTaskbarProperties();
michael@0 35 virtual nsresult Enable();
michael@0 36 virtual nsresult Disable();
michael@0 37 virtual void DetachFromNSWindow();
michael@0 38
michael@0 39 // WindowHook procedure for hooking mWnd
michael@0 40 static bool MainWindowHook(void *aContext,
michael@0 41 HWND hWnd, UINT nMsg,
michael@0 42 WPARAM wParam, LPARAM lParam,
michael@0 43 LRESULT *aResult);
michael@0 44
michael@0 45 // Bug 520807 - we need to update the proxy window style based on the main
michael@0 46 // window's style to workaround a bug with the way the DWM displays the
michael@0 47 // previews.
michael@0 48 void UpdateProxyWindowStyle();
michael@0 49
michael@0 50 nsresult UpdateTitle();
michael@0 51 nsresult UpdateIcon();
michael@0 52 nsresult UpdateNext();
michael@0 53
michael@0 54 // Handle to the toplevel proxy window
michael@0 55 HWND mProxyWindow;
michael@0 56 nsString mTitle;
michael@0 57 nsCOMPtr<imgIContainer> mIconImage;
michael@0 58 // Cached Windows icon of mIconImage
michael@0 59 HICON mIcon;
michael@0 60 // Preview that follows this preview in the taskbar (left-to-right order)
michael@0 61 nsCOMPtr<nsITaskbarTabPreview> mNext;
michael@0 62 // True if this preview has been registered with the taskbar
michael@0 63 bool mRegistered;
michael@0 64 };
michael@0 65
michael@0 66 } // namespace widget
michael@0 67 } // namespace mozilla
michael@0 68
michael@0 69 #endif /* __mozilla_widget_TaskbarTabPreview_h__ */

mercurial