1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
12 #include <unx/gensys.h>
14 #include <unx/saltype.h>
17 class GtkSalSystem final
: public SalGenericSystem
19 GdkDisplay
*mpDisplay
;
20 #if !GTK_CHECK_VERSION(4,0,0)
21 // Number of monitors for every active screen.
22 std::deque
<std::pair
<GdkScreen
*, int> > maScreenMonitors
;
26 virtual ~GtkSalSystem() override
;
27 static GtkSalSystem
*GetSingleton();
29 virtual unsigned int GetDisplayScreenCount() override
;
30 virtual unsigned int GetDisplayBuiltInScreen() override
;
31 virtual AbsoluteScreenPixelRectangle
GetDisplayScreenPosSizePixel(unsigned int nScreen
) override
;
32 virtual int ShowNativeDialog (const OUString
& rTitle
,
33 const OUString
& rMessage
,
34 const std::vector
< OUString
>& rButtons
) override
;
35 SalX11Screen
GetDisplayDefaultXScreen()
36 { return getXScreenFromDisplayScreen( GetDisplayBuiltInScreen() ); }
37 SalX11Screen
getXScreenFromDisplayScreen(unsigned int nDisplayScreen
);
38 #if !GTK_CHECK_VERSION(4,0,0)
39 void countScreenMonitors();
40 // We have a 'screen' number that is combined from screen-idx + monitor-idx
41 int getScreenIdxFromPtr (GdkScreen
*pScreen
);
42 int getScreenMonitorIdx (GdkScreen
*pScreen
, int nX
, int nY
);
43 GdkScreen
*getScreenMonitorFromIdx (int nIdx
, gint
&nMonitor
);
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */