LCOV - code coverage report
Current view: top level - libreoffice/canvas/source/vcl - canvas.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 Functions: 0 6 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef _VCLCANVAS_CANVAS_HXX_
      21             : #define _VCLCANVAS_CANVAS_HXX_
      22             : 
      23             : #include <rtl/ref.hxx>
      24             : 
      25             : #include <com/sun/star/uno/XComponentContext.hpp>
      26             : #include <com/sun/star/beans/XPropertySet.hpp>
      27             : #include <com/sun/star/lang/XServiceName.hpp>
      28             : #include <com/sun/star/util/XUpdatable.hpp>
      29             : #include <com/sun/star/rendering/XBitmapCanvas.hpp>
      30             : #include <com/sun/star/rendering/XIntegerBitmap.hpp>
      31             : #include <com/sun/star/rendering/XGraphicDevice.hpp>
      32             : #include <com/sun/star/rendering/XBufferController.hpp>
      33             : 
      34             : #include <cppuhelper/compbase7.hxx>
      35             : #include <comphelper/uno3.hxx>
      36             : 
      37             : #include <canvas/base/disambiguationhelper.hxx>
      38             : #include <canvas/base/integerbitmapbase.hxx>
      39             : #include <canvas/base/graphicdevicebase.hxx>
      40             : 
      41             : #include "canvashelper.hxx"
      42             : #include "impltools.hxx"
      43             : #include "devicehelper.hxx"
      44             : #include "repainttarget.hxx"
      45             : 
      46             : #define CANVAS_SERVICE_NAME        "com.sun.star.rendering.Canvas.VCL"
      47             : #define CANVAS_IMPLEMENTATION_NAME "com.sun.star.comp.rendering.Canvas.VCL"
      48             : 
      49             : namespace vclcanvas
      50             : {
      51             :     typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::rendering::XBitmapCanvas,
      52             :                                               ::com::sun::star::rendering::XIntegerBitmap,
      53             :                                                ::com::sun::star::rendering::XGraphicDevice,
      54             :                                               ::com::sun::star::lang::XMultiServiceFactory,
      55             :                                               ::com::sun::star::util::XUpdatable,
      56             :                                               ::com::sun::star::beans::XPropertySet,
      57             :                                               ::com::sun::star::lang::XServiceName >    GraphicDeviceBase_Base;
      58             :     typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
      59             :                                            DeviceHelper,
      60             :                                            tools::LocalGuard,
      61             :                                            ::cppu::OWeakObject >    CanvasBase_Base;
      62             :     typedef ::canvas::IntegerBitmapBase< CanvasBase_Base,
      63             :                                          CanvasHelper,
      64             :                                          tools::LocalGuard,
      65             :                                          ::cppu::OWeakObject >      CanvasBaseT;
      66             : 
      67             :     /** Product of this component's factory.
      68             : 
      69             :         The Canvas object combines the actual Window canvas with
      70             :         the XGraphicDevice interface. This is because there's a
      71             :         one-to-one relation between them, anyway, since each window
      72             :         can have exactly one canvas and one associated
      73             :         XGraphicDevice. And to avoid messing around with circular
      74             :         references, this is implemented as one single object.
      75             :      */
      76             :     class Canvas : public CanvasBaseT,
      77             :                    public RepaintTarget
      78             :     {
      79             :     public:
      80             :         Canvas( const ::com::sun::star::uno::Sequence<
      81             :                       ::com::sun::star::uno::Any >&               aArguments,
      82             :                 const ::com::sun::star::uno::Reference<
      83             :                       ::com::sun::star::uno::XComponentContext >& rxContext );
      84             : 
      85             :         void initialize();
      86             : 
      87             :         /// For resource tracking
      88             :         ~Canvas();
      89             : 
      90             :         /// Dispose all internal references
      91             :         virtual void disposeThis();
      92             : 
      93             :         // Forwarding the XComponent implementation to the
      94             :         // cppu::ImplHelper templated base
      95             :         //                                    Classname     Base doing refcounting        Base implementing the XComponent interface
      96             :         //                                       |                 |                            |
      97             :         //                                       V                 V                            V
      98           0 :         DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas,   GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
      99             : 
     100             :         // XServiceName
     101             :         virtual ::rtl::OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
     102             : 
     103             :         // RepaintTarget
     104             :         virtual bool repaint( const GraphicObjectSharedPtr&                 rGrf,
     105             :                               const com::sun::star::rendering::ViewState&   viewState,
     106             :                               const com::sun::star::rendering::RenderState& renderState,
     107             :                               const ::Point&                                rPt,
     108             :                               const ::Size&                                 rSz,
     109             :                               const GraphicAttr&                            rAttr ) const;
     110             : 
     111             :     private:
     112             :         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >                maArguments;
     113             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
     114             :     };
     115             : 
     116             :     typedef ::rtl::Reference< Canvas > CanvasRef;
     117             : }
     118             : 
     119             : #endif
     120             : 
     121             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10