mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
8ba424eabb
This is the most important part of the patch series. It removes the PScreenManager protocol and use ScreenManager directly in the content processes. Initial and subsequent updates are sent via PContent::RefreshScreens. struct ScreenDetails are kept to serialize Screen over IPC. nsIScreenManager::ScreenForNativeWidget is removed because nsIWidget::GetWidgetScreen can replace it. nsIScreen::GetId is removed because it's not useful for the more general Screen class. MozReview-Commit-ID: 5dJO3isgBuQ --HG-- extra : rebase_source : 06aa4e4fd56e2b2af1e7483aee7c0cc7f35bdb97
45 lines
2.0 KiB
Plaintext
45 lines
2.0 KiB
Plaintext
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
#include "nsIScreen.idl"
|
|
|
|
[scriptable, uuid(e8a96e60-6b61-4a14-bacc-53891604b502)]
|
|
interface nsIScreenManager : nsISupports
|
|
{
|
|
//
|
|
// Returns the screen that contains the rectangle. If the rect overlaps
|
|
// multiple screens, it picks the screen with the greatest area of intersection.
|
|
//
|
|
// The coordinates are in pixels (not twips) and in screen coordinates.
|
|
//
|
|
nsIScreen screenForRect ( in long left, in long top, in long width, in long height ) ;
|
|
|
|
// The screen with the menubar/taskbar. This shouldn't be needed very
|
|
// often.
|
|
readonly attribute nsIScreen primaryScreen;
|
|
|
|
// The default DPI scaling factor of the screen environment (number of
|
|
// screen pixels corresponding to 1 CSS px, at the default zoom level).
|
|
//
|
|
// This is currently fixed at 1.0 on most platforms, but varies on Windows
|
|
// if the "logical DPI" scaling option in the Display control panel is set
|
|
// to a value other than 100% (e.g. 125% or 150% are increasingly common
|
|
// defaults on laptops with high-dpi screens). See bug 851520.
|
|
//
|
|
// NOTE that on OS X, this does -not- reflect the "backing scale factor"
|
|
// used to support Retina displays, which is a per-display property,
|
|
// not a system-wide scaling factor. The default ratio of CSS pixels to
|
|
// Cocoa points remains 1:1, even on a Retina screen where one Cocoa point
|
|
// corresponds to two device pixels. (This is exposed via other APIs:
|
|
// see window.devicePixelRatio).
|
|
//
|
|
// NOTE also that on Linux, this does -not- currently reflect changes
|
|
// to the system-wide (X11 or Gtk2) DPI value, as Firefox does not yet
|
|
// honor these settings. See bug 798362 and bug 712898.
|
|
readonly attribute float systemDefaultScale;
|
|
};
|