1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/gtk/nsScreenManagerGtk.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 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 nsScreenManagerGtk_h___ 1.10 +#define nsScreenManagerGtk_h___ 1.11 + 1.12 +#include "nsIScreenManager.h" 1.13 +#include "nsIScreen.h" 1.14 +#include "nsCOMPtr.h" 1.15 +#include "nsCOMArray.h" 1.16 +#include "prlink.h" 1.17 +#include "gdk/gdk.h" 1.18 +#ifdef MOZ_X11 1.19 +#include <X11/Xlib.h> 1.20 +#endif 1.21 + 1.22 +//------------------------------------------------------------------------ 1.23 + 1.24 +class nsScreenManagerGtk : public nsIScreenManager 1.25 +{ 1.26 +public: 1.27 + nsScreenManagerGtk ( ); 1.28 + virtual ~nsScreenManagerGtk(); 1.29 + 1.30 + NS_DECL_ISUPPORTS 1.31 + NS_DECL_NSISCREENMANAGER 1.32 + 1.33 +#ifdef MOZ_X11 1.34 + Atom NetWorkareaAtom() { return mNetWorkareaAtom; } 1.35 +#endif 1.36 + 1.37 + // For internal use, or reinitialization from change notification. 1.38 + nsresult Init(); 1.39 + 1.40 +private: 1.41 + 1.42 + nsresult EnsureInit(); 1.43 + 1.44 + // Cached screen array. Its length is the number of screens we have. 1.45 + nsCOMArray<nsIScreen> mCachedScreenArray; 1.46 + 1.47 + PRLibrary *mXineramalib; 1.48 + 1.49 + GdkWindow *mRootWindow; 1.50 +#ifdef MOZ_X11 1.51 + Atom mNetWorkareaAtom; 1.52 +#endif 1.53 +}; 1.54 + 1.55 +#endif // nsScreenManagerGtk_h___