LibreOffice Module vcl (master)  1
gtksys.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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
11 
12 #include <unx/gensys.h>
13 #include <gtk/gtk.h>
14 #include <unx/saltype.h>
15 #include <deque>
16 
17 class GtkSalSystem final : public SalGenericSystem
18 {
19  GdkDisplay *mpDisplay;
20  // Number of monitors for every active screen.
21  std::deque<std::pair<GdkScreen*, int> > maScreenMonitors;
22 public:
23  GtkSalSystem();
24  virtual ~GtkSalSystem() override;
25  static GtkSalSystem *GetSingleton();
26 
27  virtual bool IsUnifiedDisplay() override;
28  virtual unsigned int GetDisplayScreenCount() override;
29  virtual unsigned int GetDisplayBuiltInScreen() override;
30  virtual tools::Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override;
31  virtual int ShowNativeDialog (const OUString& rTitle,
32  const OUString& rMessage,
33  const std::vector< OUString >& rButtons) override;
36  SalX11Screen getXScreenFromDisplayScreen(unsigned int nDisplayScreen);
37  void countScreenMonitors();
38  // We have a 'screen' number that is combined from screen-idx + monitor-idx
39  int getScreenIdxFromPtr (GdkScreen *pScreen);
40  int getScreenMonitorIdx (GdkScreen *pScreen, int nX, int nY);
41  GdkScreen *getScreenMonitorFromIdx (int nIdx, gint &nMonitor);
42 };
43 
44 #endif // INCLUDED_VCL_INC_UNX_GTK_GTKSYS_HXX
45 
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SalX11Screen GetDisplayDefaultXScreen()
Definition: gtksys.hxx:34
void countScreenMonitors()
SalX11Screen getXScreenFromDisplayScreen(unsigned int nDisplayScreen)
virtual ~GtkSalSystem() override
GdkScreen * getScreenMonitorFromIdx(int nIdx, gint &nMonitor)
virtual tools::Rectangle GetDisplayScreenPosSizePixel(unsigned int nScreen) override
virtual int ShowNativeDialog(const OUString &rTitle, const OUString &rMessage, const std::vector< OUString > &rButtons) override
std::deque< std::pair< GdkScreen *, int > > maScreenMonitors
Definition: gtksys.hxx:21
virtual unsigned int GetDisplayScreenCount() override
int getScreenMonitorIdx(GdkScreen *pScreen, int nX, int nY)
static GtkSalSystem * GetSingleton()
GdkDisplay * mpDisplay
Definition: gtksys.hxx:19
virtual unsigned int GetDisplayBuiltInScreen() override
virtual bool IsUnifiedDisplay() override
int getScreenIdxFromPtr(GdkScreen *pScreen)