bump product version to 7.2.5.1
[LibreOffice.git] / vcl / inc / headless / svpvd.hxx
blobca9e38cee31afa9e3d0cef363bf50f5fe33e96ef
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>
24 #include <vcl/salgtype.hxx>
25 #include <basegfx/vector/b2ivector.hxx>
27 #include <vector>
29 class SvpSalGraphics;
30 typedef struct _cairo_surface cairo_surface_t;
32 class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice
34 cairo_surface_t* m_pRefSurface;
35 cairo_surface_t* m_pSurface;
36 bool m_bOwnsSurface; // nearly always true, except for edge case of tdf#127529
37 basegfx::B2IVector m_aFrameSize;
38 std::vector< SvpSalGraphics* > m_aGraphics;
40 void CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer);
42 protected:
43 SvpSalGraphics* AddGraphics(SvpSalGraphics* aGraphics);
45 public:
46 SvpSalVirtualDevice(cairo_surface_t* pRefSurface, cairo_surface_t* pPreExistingTarget);
47 virtual ~SvpSalVirtualDevice() override;
49 // SalVirtualDevice
50 virtual SalGraphics* AcquireGraphics() override;
51 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
53 virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
54 virtual bool SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY,
55 sal_uInt8 * pBuffer
56 ) override;
58 cairo_surface_t* GetSurface() const { return m_pSurface; }
60 // SalGeometryProvider
61 virtual tools::Long GetWidth() const override;
62 virtual tools::Long GetHeight() const override;
65 #endif // INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */