1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/windows/nsScreenManagerWin.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 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 nsScreenManagerWin_h___ 1.10 +#define nsScreenManagerWin_h___ 1.11 + 1.12 +#include "nsIScreenManager.h" 1.13 + 1.14 +#include <windows.h> 1.15 +#include "nsCOMPtr.h" 1.16 +#include "nsTArray.h" 1.17 +#include "mozilla/Attributes.h" 1.18 + 1.19 +class nsIScreen; 1.20 + 1.21 +//------------------------------------------------------------------------ 1.22 + 1.23 +class ScreenListItem 1.24 +{ 1.25 +public: 1.26 + ScreenListItem ( HMONITOR inMon, nsIScreen* inScreen ) 1.27 + : mMon(inMon), mScreen(inScreen) { } ; 1.28 + 1.29 + HMONITOR mMon; 1.30 + nsCOMPtr<nsIScreen> mScreen; 1.31 +}; 1.32 + 1.33 +class nsScreenManagerWin MOZ_FINAL : public nsIScreenManager 1.34 +{ 1.35 +public: 1.36 + nsScreenManagerWin ( ); 1.37 + ~nsScreenManagerWin(); 1.38 + 1.39 + NS_DECL_ISUPPORTS 1.40 + NS_DECL_NSISCREENMANAGER 1.41 + 1.42 +private: 1.43 + 1.44 + nsIScreen* CreateNewScreenObject ( HMONITOR inScreen ) ; 1.45 + 1.46 + uint32_t mNumberOfScreens; 1.47 + 1.48 + // cache the screens to avoid the memory allocations 1.49 + nsAutoTArray<ScreenListItem, 8> mScreenList; 1.50 + 1.51 +}; 1.52 + 1.53 +#endif // nsScreenManagerWin_h___