Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_widget_gtk_ScreenHelperGTK_h
8 : #define mozilla_widget_gtk_ScreenHelperGTK_h
9 :
10 : #include "mozilla/widget/ScreenManager.h"
11 :
12 : #include "prlink.h"
13 : #include "gdk/gdk.h"
14 : #ifdef MOZ_X11
15 : #include <X11/Xlib.h>
16 : #endif
17 :
18 : namespace mozilla {
19 : namespace widget {
20 :
21 : class ScreenHelperGTK final : public ScreenManager::Helper
22 : {
23 : public:
24 : ScreenHelperGTK();
25 : ~ScreenHelperGTK() override;
26 :
27 : static gint GetGTKMonitorScaleFactor();
28 :
29 : #ifdef MOZ_X11
30 3 : Atom NetWorkareaAtom() { return mNetWorkareaAtom; }
31 : #endif
32 :
33 : // For internal use from signal callback functions
34 : void RefreshScreens();
35 :
36 : private:
37 : PRLibrary* mXineramalib;
38 : GdkWindow* mRootWindow;
39 : #ifdef MOZ_X11
40 : Atom mNetWorkareaAtom;
41 : #endif
42 : };
43 :
44 : } // namespace widget
45 : } // namespace mozilla
46 :
47 : #endif // mozilla_widget_gtk_ScreenHelperGTK_h
|