nss: upgrade to release 3.73
[LibreOffice.git] / vcl / unx / gtk3 / cairo_gtk3_cairo.hxx
blob59ed1437f1b65a0cbd6a9a9fa399a867879a740d
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/.
8 */
10 #ifndef INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_GTK3_CAIRO_HXX
11 #define INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_GTK3_CAIRO_HXX
13 #include <sal/config.h>
15 #include <vcl/cairo.hxx>
17 class GtkSalGraphics;
18 class OutputDevice;
20 namespace cairo {
22 class Gtk3Surface : public Surface
24 const GtkSalGraphics* mpGraphics;
25 cairo_t* cr;
26 CairoSurfaceSharedPtr mpSurface;
27 public:
28 /// takes over ownership of passed cairo_surface
29 explicit Gtk3Surface(const CairoSurfaceSharedPtr& pSurface);
30 /// create surface on subarea of given drawable
31 explicit Gtk3Surface(const GtkSalGraphics* pGraphics, int x, int y, int width, int height);
33 // Surface interface
34 virtual CairoSharedPtr getCairo() const override;
35 virtual CairoSurfaceSharedPtr getCairoSurface() const override { return mpSurface; }
36 virtual SurfaceSharedPtr getSimilar(int nContentType, int width, int height) const override;
38 virtual VclPtr<VirtualDevice> createVirtualDevice() const override;
40 virtual void flush() const override;
42 virtual ~Gtk3Surface() override;
47 #endif
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */