Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / vcl / inc / unx / gtk / gtksys.hxx
blob0dd756f7a7d9560f96870a56011af2b28dc65140
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 */
10 #pragma once
12 #include <unx/gensys.h>
13 #include <gtk/gtk.h>
14 #include <unx/saltype.h>
15 #include <deque>
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;
23 #endif
24 public:
25 GtkSalSystem();
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);
44 #endif
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */