LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/vcl/inc/unx/gtk - gtkinst.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2013-07-09 Functions: 0 3 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 _VCL_GTKINST_HXX
      21             : #define _VCL_GTKINST_HXX
      22             : 
      23             : #include <boost/shared_ptr.hpp>
      24             : 
      25             : #include <unx/salinst.h>
      26             : #include <generic/gensys.h>
      27             : #include <headless/svpinst.hxx>
      28             : #include <gtk/gtk.h>
      29             : 
      30             : namespace vcl
      31             : {
      32             : namespace unx
      33             : {
      34             : class GtkPrintWrapper;
      35             : }
      36             : }
      37             : 
      38             : class GenPspGraphics;
      39           0 : class GtkYieldMutex : public SalYieldMutex
      40             : {
      41             :     std::list<sal_uLong> aYieldStack;
      42             : 
      43             : public:
      44             :                         GtkYieldMutex();
      45             :     virtual void        acquire();
      46             :     virtual void        release();
      47             : 
      48             :     void ThreadsEnter();
      49             :     void ThreadsLeave();
      50             : };
      51             : 
      52             : 
      53             : 
      54             : class GtkSalTimer;
      55             : #if GTK_CHECK_VERSION(3,0,0)
      56             : class GtkInstance : public SvpSalInstance
      57             : #else
      58             : class GtkInstance : public X11SalInstance
      59             : #endif
      60             : {
      61             : #if GTK_CHECK_VERSION(3,0,0)
      62             :     typedef SvpSalInstance Superclass_t;
      63             : #else
      64             :     typedef X11SalInstance Superclass_t;
      65             : #endif
      66             : public:
      67             :             GtkInstance( SalYieldMutex* pMutex );
      68             :     virtual ~GtkInstance();
      69             :     void    Init();
      70             : 
      71             :     virtual SalFrame*           CreateFrame( SalFrame* pParent, sal_uLong nStyle );
      72             :     virtual SalFrame*           CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
      73             :     virtual SalObject*          CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
      74             :     virtual SalSystem*          CreateSalSystem();
      75             :     virtual SalInfoPrinter*     CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup);
      76             :     virtual SalPrinter*         CreatePrinter( SalInfoPrinter* pInfoPrinter );
      77             :     virtual SalMenu*            CreateMenu( sal_Bool, Menu* );
      78             :     virtual void                DestroyMenu( SalMenu* pMenu );
      79             :     virtual SalMenuItem*        CreateMenuItem( const SalItemParams* );
      80             :     virtual void                DestroyMenuItem( SalMenuItem* pItem );
      81             :     virtual SalTimer*           CreateSalTimer();
      82             :     virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
      83             :     virtual SalVirtualDevice*   CreateVirtualDevice( SalGraphics*,
      84             :                                                      long nDX, long nDY,
      85             :                                                      sal_uInt16 nBitCount,
      86             :                                                      const SystemGraphicsData* );
      87             :     virtual SalBitmap*          CreateSalBitmap();
      88             : 
      89             :     virtual void                Yield( bool bWait, bool bHandleAllCurrentEvents );
      90             :     virtual bool                AnyInput( sal_uInt16 nType );
      91             : 
      92             :     virtual GenPspGraphics     *CreatePrintGraphics();
      93             : 
      94           0 :     virtual bool hasNativeFileSelection() const { return true; }
      95             : 
      96             :     virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 >
      97             :         createFilePicker( const com::sun::star::uno::Reference<
      98             :                               com::sun::star::uno::XComponentContext >& );
      99             :     virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker2 >
     100             :         createFolderPicker( const com::sun::star::uno::Reference<
     101             :                                 com::sun::star::uno::XComponentContext >& );
     102             : 
     103             :     void                        RemoveTimer (SalTimer *pTimer);
     104             : 
     105             :     // for managing a mirror of the in-flight un-dispatched gdk event queue
     106             :     void                        addEvent( sal_uInt16 nMask );
     107             :     void                        subtractEvent( sal_uInt16 nMask );
     108             : 
     109             :     boost::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const;
     110             :   private:
     111             :     std::vector<GtkSalTimer *>  m_aTimers;
     112             :     bool                        IsTimerExpired();
     113             : 
     114             :     mutable boost::shared_ptr<vcl::unx::GtkPrintWrapper> m_pPrintWrapper;
     115             : };
     116             : 
     117             : #endif // _VCL_GTKINST_HXX
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10