Branch libreoffice-5-0-4
[LibreOffice.git] / canvas / source / vcl / devicehelper.hxx
blob55bf9bfa8ffe079bfdb26409485282ee297bfb14
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_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
21 #define INCLUDED_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
23 #include <com/sun/star/awt/Rectangle.hpp>
24 #include <com/sun/star/awt/XWindow2.hpp>
25 #include <com/sun/star/rendering/XGraphicDevice.hpp>
26 #include <com/sun/star/rendering/XBufferController.hpp>
28 #include <vcl/outdev.hxx>
29 #include <vcl/window.hxx>
31 #include "outdevprovider.hxx"
33 #include <boost/utility.hpp>
36 /* Definition of DeviceHelper class */
38 namespace vclcanvas
40 class DeviceHelper : private ::boost::noncopyable
42 public:
43 DeviceHelper();
45 void init( const OutDevProviderSharedPtr& rOutDev );
47 /// Dispose all internal references
48 void disposing();
50 // XWindowGraphicDevice
51 ::com::sun::star::geometry::RealSize2D getPhysicalResolution();
52 ::com::sun::star::geometry::RealSize2D getPhysicalSize();
53 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
54 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
55 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
56 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
57 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
58 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
59 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
60 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
61 const ::com::sun::star::geometry::IntegerSize2D& size );
62 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
63 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
64 const ::com::sun::star::geometry::IntegerSize2D& size );
65 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
66 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
67 const ::com::sun::star::geometry::IntegerSize2D& size );
68 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
69 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
70 const ::com::sun::star::geometry::IntegerSize2D& size );
71 bool enterFullScreenMode( bool bEnter );
73 ::com::sun::star::uno::Any isAccelerated() const;
74 ::com::sun::star::uno::Any getDeviceHandle() const;
75 ::com::sun::star::uno::Any getSurfaceHandle() const;
76 ::com::sun::star::uno::Reference<
77 ::com::sun::star::rendering::XColorSpace > getColorSpace() const;
79 OutDevProviderSharedPtr getOutDev() const { return mpOutDev; }
81 /** called when DumpScreenContent property is enabled on
82 XGraphicDevice, and writes out bitmaps of current screen.
84 void dumpScreenContent() const;
86 private:
87 /// For retrieving device info
88 OutDevProviderSharedPtr mpOutDev;
92 #endif // INCLUDED_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */