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
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsScreenManagerGtk_h___
7 #define nsScreenManagerGtk_h___
9 #include "nsIScreenManager.h"
10 #include "nsIScreen.h"
11 #include "nsCOMPtr.h"
12 #include "nsCOMArray.h"
13 #include "prlink.h"
14 #include "gdk/gdk.h"
15 #ifdef MOZ_X11
16 #include <X11/Xlib.h>
17 #endif
19 //------------------------------------------------------------------------
21 class nsScreenManagerGtk : public nsIScreenManager
22 {
23 public:
24 nsScreenManagerGtk ( );
25 virtual ~nsScreenManagerGtk();
27 NS_DECL_ISUPPORTS
28 NS_DECL_NSISCREENMANAGER
30 #ifdef MOZ_X11
31 Atom NetWorkareaAtom() { return mNetWorkareaAtom; }
32 #endif
34 // For internal use, or reinitialization from change notification.
35 nsresult Init();
37 private:
39 nsresult EnsureInit();
41 // Cached screen array. Its length is the number of screens we have.
42 nsCOMArray<nsIScreen> mCachedScreenArray;
44 PRLibrary *mXineramalib;
46 GdkWindow *mRootWindow;
47 #ifdef MOZ_X11
48 Atom mNetWorkareaAtom;
49 #endif
50 };
52 #endif // nsScreenManagerGtk_h___