2006-01-12 00:28:25 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-01-12 00:27:48 +03:00
|
|
|
|
|
|
|
#ifndef nsScreenManagerGtk_h___
|
|
|
|
#define nsScreenManagerGtk_h___
|
|
|
|
|
|
|
|
#include "nsIScreenManager.h"
|
2006-01-12 00:28:02 +03:00
|
|
|
#include "nsIScreen.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2008-07-14 07:20:21 +04:00
|
|
|
#include "nsCOMArray.h"
|
2008-07-14 07:20:27 +04:00
|
|
|
#include "prlink.h"
|
2008-07-14 07:20:30 +04:00
|
|
|
#include "gdk/gdk.h"
|
2008-08-07 00:48:55 +04:00
|
|
|
#ifdef MOZ_X11
|
2008-07-14 07:20:30 +04:00
|
|
|
#include <X11/Xlib.h>
|
2008-08-07 00:48:55 +04:00
|
|
|
#endif
|
2006-01-12 00:27:48 +03:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class nsScreenManagerGtk : public nsIScreenManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsScreenManagerGtk ( );
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISCREENMANAGER
|
|
|
|
|
2008-08-07 00:48:55 +04:00
|
|
|
#ifdef MOZ_X11
|
2008-07-14 07:20:30 +04:00
|
|
|
Atom NetWorkareaAtom() { return mNetWorkareaAtom; }
|
2008-08-07 00:48:55 +04:00
|
|
|
#endif
|
2008-07-14 07:20:30 +04:00
|
|
|
|
|
|
|
// For internal use, or reinitialization from change notification.
|
|
|
|
nsresult Init();
|
|
|
|
|
2006-01-12 00:27:48 +03:00
|
|
|
private:
|
2014-06-24 20:36:44 +04:00
|
|
|
virtual ~nsScreenManagerGtk();
|
2006-01-12 00:27:48 +03:00
|
|
|
|
2008-07-14 07:20:30 +04:00
|
|
|
nsresult EnsureInit();
|
2006-01-12 00:27:48 +03:00
|
|
|
|
2008-07-14 07:20:24 +04:00
|
|
|
// Cached screen array. Its length is the number of screens we have.
|
2008-07-14 07:20:21 +04:00
|
|
|
nsCOMArray<nsIScreen> mCachedScreenArray;
|
2008-07-14 07:20:27 +04:00
|
|
|
|
|
|
|
PRLibrary *mXineramalib;
|
2008-07-14 07:20:30 +04:00
|
|
|
|
|
|
|
GdkWindow *mRootWindow;
|
2008-08-07 00:48:55 +04:00
|
|
|
#ifdef MOZ_X11
|
2008-07-14 07:20:30 +04:00
|
|
|
Atom mNetWorkareaAtom;
|
2008-08-07 00:48:55 +04:00
|
|
|
#endif
|
2006-01-12 00:27:48 +03:00
|
|
|
};
|
|
|
|
|
2015-02-10 10:14:00 +03:00
|
|
|
#endif // nsScreenManagerGtk_h___
|