fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / vcl / inc / unx / salvd.h
blobf50cdd1516d12762c2ffdc6a642115e176d91489
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SV_SALVD_H
21 #define _SV_SALVD_H
23 #include <prex.h>
24 #include <postx.h>
26 #include <unx/saltype.h>
27 #include <salvd.hxx>
29 class SalDisplay;
30 class X11SalGraphics;
32 class X11SalVirtualDevice : public SalVirtualDevice
34 SalDisplay *pDisplay_;
35 X11SalGraphics *pGraphics_;
38 Pixmap hDrawable_;
39 SalX11Screen m_nXScreen;
41 int nDX_;
42 int nDY_;
43 sal_uInt16 nDepth_;
44 sal_Bool bGraphics_; // is Graphics used
45 sal_Bool bExternPixmap_;
47 public:
48 X11SalVirtualDevice();
49 virtual ~X11SalVirtualDevice();
51 sal_Bool Init( SalDisplay *pDisplay,
52 long nDX, long nDY,
53 sal_uInt16 nBitCount,
54 SalX11Screen nXScreen,
55 Pixmap hDrawable = None,
56 XRenderPictFormat* pXRenderFormat = NULL );
57 inline void InitGraphics( X11SalVirtualDevice *pVD );
59 inline Display *GetXDisplay() const;
60 inline SalDisplay *GetDisplay() const;
61 inline sal_Bool IsDisplay() const;
62 inline Pixmap GetDrawable() const { return hDrawable_; }
63 inline sal_uInt16 GetDepth() const { return nDepth_; }
64 int GetWidth() const { return nDX_; }
65 int GetHeight() const { return nDY_; }
66 SalX11Screen GetXScreenNumber() const { return m_nXScreen; }
68 virtual SalGraphics* GetGraphics();
69 virtual void ReleaseGraphics( SalGraphics* pGraphics );
71 // Set new size, without saving the old contents
72 virtual sal_Bool SetSize( long nNewDX, long nNewDY );
73 virtual void GetSize( long& rWidth, long& rHeight );
76 #ifdef _SV_SALDISP_HXX
78 inline void X11SalVirtualDevice::InitGraphics( X11SalVirtualDevice *pVD )
79 { pGraphics_->Init( pVD ); }
81 inline Display *X11SalVirtualDevice::GetXDisplay() const
82 { return pDisplay_->GetDisplay(); }
84 inline SalDisplay *X11SalVirtualDevice::GetDisplay() const
85 { return pDisplay_; }
87 inline sal_Bool X11SalVirtualDevice::IsDisplay() const
88 { return pDisplay_->IsDisplay(); }
90 #endif
92 #endif // _SV_SALVD_H
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */