LCOV - code coverage report
Current view: top level - libreoffice/vcl/inc/unx - salvd.h (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 11 0.0 %
Date: 2012-12-27 Functions: 0 8 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 _SV_SALVD_H
      21             : #define _SV_SALVD_H
      22             : 
      23             : #include <unx/salstd.hxx>
      24             : #include <unx/saltype.h>
      25             : #include <salvd.hxx>
      26             : 
      27             : // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      28             : class SalDisplay;
      29             : class X11SalGraphics;
      30             : 
      31             : // -=-= SalVirDevData -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      32             : class X11SalVirtualDevice : public SalVirtualDevice
      33             : {
      34             :     SalDisplay      *pDisplay_;
      35             :     X11SalGraphics  *pGraphics_;
      36             : 
      37             : 
      38             :     Pixmap          hDrawable_;
      39             :     SalX11Screen    m_nXScreen;
      40             : 
      41             :     int             nDX_;
      42             :     int             nDY_;
      43             :     sal_uInt16      nDepth_;
      44             :     sal_Bool        bGraphics_;         // is Graphics used
      45             :     sal_Bool        bExternPixmap_;
      46             : 
      47             : public:
      48             :     X11SalVirtualDevice();
      49             :     virtual ~X11SalVirtualDevice();
      50             : 
      51             :     sal_Bool            Init( SalDisplay *pDisplay,
      52             :                               long nDX, long nDY,
      53             :                               sal_uInt16 nBitCount,
      54             :                               SalX11Screen nXScreen,
      55             :                               Pixmap hDrawable = None,
      56             :                               XRenderPictFormat* pXRenderFormat = NULL );
      57             :     inline  void            InitGraphics( X11SalVirtualDevice *pVD );
      58             : 
      59             :     inline  Display        *GetXDisplay() const;
      60             :     inline  SalDisplay     *GetDisplay() const;
      61             :     inline  sal_Bool        IsDisplay() const;
      62           0 :     inline  Pixmap          GetDrawable() const { return hDrawable_; }
      63           0 :     inline  sal_uInt16      GetDepth() const { return nDepth_; }
      64           0 :     int                     GetWidth() const { return nDX_; }
      65           0 :     int                     GetHeight() const { return nDY_; }
      66           0 :     SalX11Screen            GetXScreenNumber() const { return m_nXScreen; }
      67             : 
      68             :     virtual SalGraphics*    GetGraphics();
      69             :     virtual void            ReleaseGraphics( SalGraphics* pGraphics );
      70             : 
      71             :                             // Set new size, without saving the old contents
      72             :     virtual sal_Bool        SetSize( long nNewDX, long nNewDY );
      73             :     virtual void            GetSize( long& rWidth, long& rHeight );
      74             : };
      75             : 
      76             : #ifdef _SV_SALDISP_HXX
      77             : 
      78           0 : inline void X11SalVirtualDevice::InitGraphics( X11SalVirtualDevice *pVD )
      79           0 : { pGraphics_->Init( pVD ); }
      80             : 
      81           0 : inline Display *X11SalVirtualDevice::GetXDisplay() const
      82           0 : { return pDisplay_->GetDisplay(); }
      83             : 
      84           0 : inline SalDisplay *X11SalVirtualDevice::GetDisplay() const
      85           0 : { return pDisplay_; }
      86             : 
      87             : inline sal_Bool X11SalVirtualDevice::IsDisplay() const
      88             : { return pDisplay_->IsDisplay(); }
      89             : 
      90             : #endif
      91             : 
      92             : #endif // _SV_SALVD_H
      93             : 
      94             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10