Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / nsIScreenManager.idl
blob9203d7891f307729ed3531b6b53bca6c05e881db
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
8 #include "nsIScreen.idl"
10 %{C++
11 #include "nsCOMPtr.h"
14 [scriptable, uuid(e8a96e60-6b61-4a14-bacc-53891604b502)]
15 interface nsIScreenManager : nsISupports
17 // Returns the screen that contains the rectangle. If the rect overlaps
18 // multiple screens, it picks the screen with the greatest area of intersection.
20 // The coordinates are in pixels (not twips) and in screen coordinates.
21 nsIScreen screenForRect(in long left, in long top, in long width, in long height) ;
23 %{C++
24 already_AddRefed<nsIScreen> ScreenForRect(const mozilla::DesktopIntRect& aRect) {
25 nsCOMPtr<nsIScreen> screen;
26 ScreenForRect(aRect.x, aRect.y, aRect.width, aRect.height, getter_AddRefs(screen));
27 return screen.forget();
31 // The screen with the menubar/taskbar. This shouldn't be needed very often.
32 readonly attribute nsIScreen primaryScreen;
34 // The total number of pixels across all monitors.
35 readonly attribute int64_t totalScreenPixels;