widget/windows/nsScreenWin.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/nsScreenWin.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsScreenWin_h___
    1.10 +#define nsScreenWin_h___
    1.11 +
    1.12 +#include <windows.h>
    1.13 +#include "nsBaseScreen.h"
    1.14 +
    1.15 +//------------------------------------------------------------------------
    1.16 +
    1.17 +class nsScreenWin : public nsBaseScreen
    1.18 +{
    1.19 +public:
    1.20 +  nsScreenWin ( HMONITOR inScreen );
    1.21 +  ~nsScreenWin();
    1.22 +
    1.23 +  // These methods return the size in device (physical) pixels
    1.24 +  NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
    1.25 +  NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
    1.26 +
    1.27 +  // And these methods get the screen size in 'display pixels' (AKA 'logical pixels')
    1.28 +  // that are dependent on the logical DPI setting in windows
    1.29 +  NS_IMETHOD GetRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
    1.30 +                               int32_t *outWidth, int32_t *outHeight);
    1.31 +  NS_IMETHOD GetAvailRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
    1.32 +                                    int32_t *outWidth, int32_t *outHeight);
    1.33 +
    1.34 +  NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth);
    1.35 +  NS_IMETHOD GetColorDepth(int32_t* aColorDepth);
    1.36 +
    1.37 +private:
    1.38 +
    1.39 +  HMONITOR mScreen;
    1.40 +};
    1.41 +
    1.42 +#endif  // nsScreenWin_h___ 

mercurial