Bug 1492908 [wpt PR 13122] - Check completeness of images with and without srcset...
[gecko.git] / widget / Screen.h
bloba1df5201265a7e154bc2ea934ac9abbb919a7984
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef mozilla_widget_Screen_h
8 #define mozilla_widget_Screen_h
10 #include "nsIScreen.h"
12 #include "Units.h"
14 namespace mozilla {
15 namespace dom {
16 class ScreenDetails;
17 } // namespace dom
18 } // namespace mozilla
20 namespace mozilla {
21 namespace widget {
23 class Screen final : public nsIScreen
25 public:
26 NS_DECL_ISUPPORTS
27 NS_DECL_NSISCREEN
29 Screen(LayoutDeviceIntRect aRect, LayoutDeviceIntRect aAvailRect,
30 uint32_t aPixelDepth, uint32_t aColorDepth,
31 DesktopToLayoutDeviceScale aContentsScale,
32 CSSToLayoutDeviceScale aDefaultCssScale,
33 float dpi);
34 explicit Screen(const mozilla::dom::ScreenDetails& aScreenDetails);
35 Screen(const Screen& aOther);
37 mozilla::dom::ScreenDetails ToScreenDetails();
39 private:
40 virtual ~Screen() {}
42 LayoutDeviceIntRect mRect;
43 LayoutDeviceIntRect mAvailRect;
44 DesktopIntRect mRectDisplayPix;
45 DesktopIntRect mAvailRectDisplayPix;
46 uint32_t mPixelDepth;
47 uint32_t mColorDepth;
48 DesktopToLayoutDeviceScale mContentsScale;
49 CSSToLayoutDeviceScale mDefaultCssScale;
50 float mDPI;
53 } // namespace widget
54 } // namespace mozilla
56 #endif