Line data Source code
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/. */
6 :
7 : #ifndef mozilla_widget_Screen_h
8 : #define mozilla_widget_Screen_h
9 :
10 : #include "nsIScreen.h"
11 :
12 : #include "Units.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 : class ScreenDetails;
17 : } // namespace dom
18 : } // namespace mozilla
19 :
20 : namespace mozilla {
21 : namespace widget {
22 :
23 : class Screen final : public nsIScreen
24 : {
25 : public:
26 : NS_DECL_ISUPPORTS
27 : NS_DECL_NSISCREEN
28 :
29 : Screen(LayoutDeviceIntRect aRect, LayoutDeviceIntRect aAvailRect,
30 : uint32_t aPixelDepth, uint32_t aColorDepth,
31 : DesktopToLayoutDeviceScale aContentsScale,
32 : CSSToLayoutDeviceScale aDefaultCssScale);
33 : explicit Screen(const mozilla::dom::ScreenDetails& aScreenDetails);
34 : Screen(const Screen& aOther);
35 :
36 : mozilla::dom::ScreenDetails ToScreenDetails();
37 :
38 : private:
39 0 : virtual ~Screen() {}
40 :
41 : LayoutDeviceIntRect mRect;
42 : LayoutDeviceIntRect mAvailRect;
43 : DesktopIntRect mRectDisplayPix;
44 : DesktopIntRect mAvailRectDisplayPix;
45 : uint32_t mPixelDepth;
46 : uint32_t mColorDepth;
47 : DesktopToLayoutDeviceScale mContentsScale;
48 : CSSToLayoutDeviceScale mDefaultCssScale;
49 : };
50 :
51 : } // namespace widget
52 : } // namespace mozilla
53 :
54 : #endif
55 :
|