Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsScreenWin_h___ |
michael@0 | 7 | #define nsScreenWin_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include <windows.h> |
michael@0 | 10 | #include "nsBaseScreen.h" |
michael@0 | 11 | |
michael@0 | 12 | //------------------------------------------------------------------------ |
michael@0 | 13 | |
michael@0 | 14 | class nsScreenWin : public nsBaseScreen |
michael@0 | 15 | { |
michael@0 | 16 | public: |
michael@0 | 17 | nsScreenWin ( HMONITOR inScreen ); |
michael@0 | 18 | ~nsScreenWin(); |
michael@0 | 19 | |
michael@0 | 20 | // These methods return the size in device (physical) pixels |
michael@0 | 21 | NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); |
michael@0 | 22 | NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); |
michael@0 | 23 | |
michael@0 | 24 | // And these methods get the screen size in 'display pixels' (AKA 'logical pixels') |
michael@0 | 25 | // that are dependent on the logical DPI setting in windows |
michael@0 | 26 | NS_IMETHOD GetRectDisplayPix(int32_t *outLeft, int32_t *outTop, |
michael@0 | 27 | int32_t *outWidth, int32_t *outHeight); |
michael@0 | 28 | NS_IMETHOD GetAvailRectDisplayPix(int32_t *outLeft, int32_t *outTop, |
michael@0 | 29 | int32_t *outWidth, int32_t *outHeight); |
michael@0 | 30 | |
michael@0 | 31 | NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth); |
michael@0 | 32 | NS_IMETHOD GetColorDepth(int32_t* aColorDepth); |
michael@0 | 33 | |
michael@0 | 34 | private: |
michael@0 | 35 | |
michael@0 | 36 | HMONITOR mScreen; |
michael@0 | 37 | }; |
michael@0 | 38 | |
michael@0 | 39 | #endif // nsScreenWin_h___ |