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

Generated by: LCOV version 1.10