LibreOffice Module vcl (master)  1
opengl/x11/salvd.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 
10 #ifndef INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
11 #define INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
12 
13 #include <memory>
14 #include <X11/Xlib.h>
15 #include <X11/Xutil.h>
16 
17 #include <unx/saltype.h>
18 #include <salvd.hxx>
19 
20 class SalDisplay;
21 class X11OpenGLSalGraphics;
22 class X11SalGraphics;
23 
25 {
27  std::unique_ptr<X11SalGraphics>
29  bool mbGraphics; // is Graphics used
31  int mnWidth;
32  int mnHeight;
33 
34 public:
35  X11OpenGLSalVirtualDevice( SalGraphics const *pGraphics,
36  long nDX, long nDY,
37  const SystemGraphicsData *pData,
38  std::unique_ptr<X11SalGraphics> pNewGraphics);
39  virtual ~X11OpenGLSalVirtualDevice() override;
40 
41  // SalGeometryProvider
42  virtual long GetWidth() const override { return mnWidth; }
43  virtual long GetHeight() const override { return mnHeight; }
44 
45  SalDisplay * GetDisplay() const { return mpDisplay; }
46  const SalX11Screen& GetXScreenNumber() const { return mnXScreen; }
47 
48  virtual SalGraphics* AcquireGraphics() override;
49  virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
50 
51  // Set new size, without saving the old contents
52  virtual bool SetSize( long nNewDX, long nNewDY ) override;
53 };
54 
55 #endif // INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
56 
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< X11SalGraphics > mpGraphics
virtual long GetWidth() const override
SalDisplay * GetDisplay() const
X11OpenGLSalVirtualDevice(SalGraphics const *pGraphics, long nDX, long nDY, const SystemGraphicsData *pData, std::unique_ptr< X11SalGraphics > pNewGraphics)
virtual long GetHeight() const override
virtual SalGraphics * AcquireGraphics() override
const SalX11Screen & GetXScreenNumber() const
virtual void ReleaseGraphics(SalGraphics *pGraphics) override
A non-visible drawable/buffer (e.g. an X11 Pixmap).
Definition: salvd.hxx:28
virtual ~X11OpenGLSalVirtualDevice() override
virtual bool SetSize(long nNewDX, long nNewDY) override