Move setting of LD_LIBRARY_PATH closer to invocation of cppunittester
[LibreOffice.git] / canvas / source / directx / dx_devicehelper.hxx
blobd5fa62b07c54c41854868182dd400a0a526c90ed
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 #pragma once
22 #include <com/sun/star/awt/Rectangle.hpp>
23 #include <com/sun/star/rendering/XGraphicDevice.hpp>
24 #include <com/sun/star/rendering/XBufferController.hpp>
26 #include "dx_rendermodule.hxx"
27 #include "dx_bitmap.hxx"
29 #include <rendering/isurfaceproxymanager.hxx>
30 #include <vcl/vclptr.hxx>
32 class OutputDevice;
33 /* Definition of DeviceHelper class */
35 namespace dxcanvas
37 class DeviceHelper
39 public:
40 DeviceHelper();
41 ~DeviceHelper();
43 /// make noncopyable
44 DeviceHelper(const DeviceHelper&) = delete;
45 const DeviceHelper& operator=(const DeviceHelper&) = delete;
47 /** Init the device helper
49 @param hdc
50 private or class dc of the output device. is only stored,
51 not release
53 @param rDevice
54 Ref back to owning UNO device
56 void init( HDC hdc, OutputDevice* pOutputDev,
57 css::rendering::XGraphicDevice& rDevice );
59 /// Dispose all internal references
60 void disposing();
62 // XWindowGraphicDevice
63 css::geometry::RealSize2D getPhysicalResolution();
64 css::geometry::RealSize2D getPhysicalSize();
65 css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
66 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
67 const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
68 css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
69 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
70 const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
71 css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
72 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
73 const css::geometry::IntegerSize2D& size );
74 css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
75 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
76 const css::geometry::IntegerSize2D& size );
77 css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
78 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
79 const css::geometry::IntegerSize2D& size );
80 css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
81 const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
82 const css::geometry::IntegerSize2D& size );
84 css::uno::Any isAccelerated() const;
85 css::uno::Any getDeviceHandle() const;
86 css::uno::Any getSurfaceHandle() const;
87 css::uno::Reference<
88 css::rendering::XColorSpace > getColorSpace() const;
90 /** called when DumpScreenContent property is enabled on
91 XGraphicDevice, and writes out bitmaps of current screen.
93 void dumpScreenContent() const {}
95 protected:
96 HDC getHDC() const { return mnHDC; }
97 css::rendering::XGraphicDevice* getDevice() const { return mpDevice; }
99 private:
100 /** Phyical output device
102 Deliberately not a refcounted reference, because of
103 potential circular references for canvas. Needed to
104 create bitmaps
106 css::rendering::XGraphicDevice* mpDevice;
107 HDC mnHDC;
108 VclPtr<OutputDevice> mpOutDev;
111 typedef ::rtl::Reference< css::rendering::XGraphicDevice > DeviceRef;
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */