Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / unx / gtk / gtksys.hxx
blobd888bce5bca3e20f671d3990792f067bbe4db9c1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9 #ifndef INCLUDED_VCL_INC_UNX_GTK_GTKSYS_HXX
10 #define INCLUDED_VCL_INC_UNX_GTK_GTKSYS_HXX
12 #include "unx/gensys.h"
13 #include <gtk/gtk.h>
14 #include <unx/saltype.h>
15 #include <deque>
17 class GtkSalSystem : public SalGenericSystem
19 typedef std::deque<std::pair<GdkScreen*, int> > ScreenMonitors_t;
21 GdkDisplay *mpDisplay;
22 // Number of monitors for every active screen.
23 ScreenMonitors_t maScreenMonitors;
24 public:
25 GtkSalSystem();
26 virtual ~GtkSalSystem() override;
27 static GtkSalSystem *GetSingleton();
29 virtual bool IsUnifiedDisplay() override;
30 virtual unsigned int GetDisplayScreenCount() override;
31 virtual unsigned int GetDisplayBuiltInScreen() override;
32 virtual tools::Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override;
33 virtual int ShowNativeDialog (const OUString& rTitle,
34 const OUString& rMessage,
35 const std::list< OUString >& rButtons,
36 int nDefButton) override;
37 SalX11Screen GetDisplayDefaultXScreen()
38 { return getXScreenFromDisplayScreen( GetDisplayBuiltInScreen() ); }
39 int GetDisplayXScreenCount();
40 SalX11Screen getXScreenFromDisplayScreen(unsigned int nDisplayScreen);
41 void countScreenMonitors();
42 // We have a 'screen' number that is combined from screen-idx + monitor-idx
43 int getScreenIdxFromPtr (GdkScreen *pScreen);
44 int getScreenMonitorIdx (GdkScreen *pScreen, int nX, int nY);
45 GdkScreen *getScreenMonitorFromIdx (int nIdx, gint &nMonitor);
48 #endif // INCLUDED_VCL_INC_UNX_GTK_GTKSYS_HXX
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */