Line data Source code
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 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_VCL_INC_UNX_SALVD_H
21 : #define INCLUDED_VCL_INC_UNX_SALVD_H
22 :
23 : #include <prex.h>
24 : #include <postx.h>
25 :
26 : #include <unx/saltype.h>
27 : #include <salvd.hxx>
28 :
29 : class SalDisplay;
30 : class X11SalGraphics;
31 :
32 : class X11SalVirtualDevice : public SalVirtualDevice
33 : {
34 : SalDisplay *pDisplay_;
35 : X11SalGraphics *pGraphics_;
36 :
37 : Pixmap hDrawable_;
38 : SalX11Screen m_nXScreen;
39 :
40 : int nDX_;
41 : int nDY_;
42 : sal_uInt16 nDepth_;
43 : bool bGraphics_; // is Graphics used
44 : bool bExternPixmap_;
45 :
46 : public:
47 : X11SalVirtualDevice(SalGraphics *pGraphics, long &nDX, long &nDY,
48 : sal_uInt16 nBitCount, const SystemGraphicsData *pData, X11SalGraphics* pNewGraphics);
49 :
50 : virtual ~X11SalVirtualDevice();
51 :
52 354 : Display *GetXDisplay() const
53 : {
54 354 : return pDisplay_->GetDisplay();
55 : }
56 180 : SalDisplay *GetDisplay() const
57 : {
58 180 : return pDisplay_;
59 : }
60 : bool IsDisplay() const
61 : {
62 : return pDisplay_->IsDisplay();
63 : }
64 528 : Pixmap GetDrawable() const { return hDrawable_; }
65 357 : sal_uInt16 GetDepth() const { return nDepth_; }
66 180 : SalX11Screen GetXScreenNumber() const { return m_nXScreen; }
67 :
68 : virtual SalGraphics* AcquireGraphics() SAL_OVERRIDE;
69 : virtual void ReleaseGraphics( SalGraphics* pGraphics ) SAL_OVERRIDE;
70 :
71 : /// Set new size, without saving the old contents
72 : virtual bool SetSize( long nNewDX, long nNewDY ) SAL_OVERRIDE;
73 :
74 : // SalGeometryProvider
75 0 : virtual long GetWidth() const SAL_OVERRIDE { return nDX_; }
76 0 : virtual long GetHeight() const SAL_OVERRIDE { return nDY_; }
77 : };
78 :
79 : #endif // INCLUDED_VCL_INC_UNX_SALVD_H
80 :
81 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|