Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / headless / svpvd.hxx
blob7ac156305abdfe867c8b6d3763eb0a6ecbaafa06
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 INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
23 #include <salvd.hxx>
25 #include <list>
27 class SvpSalGraphics;
28 typedef struct _cairo_surface cairo_surface_t;
30 class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice
32 DeviceFormat m_eFormat;
33 cairo_surface_t* m_pSurface;
34 basegfx::B2IVector m_aFrameSize;
35 double m_fScale;
36 std::list< SvpSalGraphics* > m_aGraphics;
38 public:
39 SvpSalVirtualDevice(DeviceFormat eFormat, double fScale)
40 : m_eFormat(eFormat)
41 , m_pSurface(nullptr)
42 , m_fScale(fScale)
45 virtual ~SvpSalVirtualDevice() override;
47 // SalVirtualDevice
48 virtual SalGraphics* AcquireGraphics() override;
49 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
51 virtual bool SetSize( long nNewDX, long nNewDY ) override;
52 virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
53 sal_uInt8 * pBuffer
54 ) override;
56 // SalGeometryProvider
57 virtual long GetWidth() const override;
58 virtual long GetHeight() const override;
61 #endif // INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */