1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef WIDGET_WINDOWS_NSWINDOWTASKBARCONCEALER_H_
7 #define WIDGET_WINDOWS_NSWINDOWTASKBARCONCEALER_H_
10 #include "mozilla/Maybe.h"
13 * nsWindow::TaskbarConcealer
15 * Fullscreen-state (and, thus, taskbar-occlusion) manager.
17 class nsWindow::TaskbarConcealer
{
19 // To be called when a window acquires focus. (Note that no action need be
20 // taken when focus is lost.)
21 static void OnFocusAcquired(nsWindow
* aWin
);
23 // To be called during or after a window's destruction. The corresponding
24 // nsWindow pointer is not needed, and will not be acquired or accessed.
25 static void OnWindowDestroyed(HWND aWnd
);
27 // To be called when the Gecko-fullscreen state of a window changes.
28 static void OnFullscreenChanged(nsWindow
* aWin
, bool enteredFullscreen
);
30 // To be called when the position of a window changes. (Performs its own
31 // batching; irrelevant movements will be cheap.)
32 static void OnWindowPosChanged(nsWindow
* aWin
);
34 // To be called when the cloaking state of any window changes. (Expects that
35 // all windows' internal cloaking-state mirror variables are up-to-date.)
36 static void OnCloakChanged();
39 static void UpdateAllState(HWND destroyedHwnd
= nullptr);
45 static mozilla::Maybe
<WindowState
> GetWindowState(HWND
);
47 static nsTHashMap
<HWND
, HMONITOR
> sKnownWindows
;
51 #endif // WIDGET_WINDOWS_NSWINDOWTASKBARCONCEALER_H_