fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dtrans / source / win32 / clipb / WinClipbImpl.hxx
bloba5da94cca792f76080a8784b01107a6ea61a7b2e
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 #ifndef INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_WINCLIPBIMPL_HXX
21 #define INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_WINCLIPBIMPL_HXX
23 #include <sal/types.h>
24 #include <rtl/ustring.hxx>
25 #include <com/sun/star/datatransfer/XTransferable.hpp>
26 #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
27 #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
28 #include "MtaOleClipb.hxx"
30 #if defined _MSC_VER
31 #pragma warning(push,1)
32 #endif
33 #include <windows.h>
34 #if defined _MSC_VER
35 #pragma warning(pop)
36 #endif
38 class CWinClipboard;
39 class CXNotifyingDataObject;
41 // impl class to avoid deadlocks between XTDataObject
42 // and the clipboard implementation
44 class CWinClipbImpl
46 public:
47 ~CWinClipbImpl( );
49 protected:
50 CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard );
52 ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
53 throw( ::com::sun::star::uno::RuntimeException );
55 void SAL_CALL setContents(
56 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
57 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
58 throw( ::com::sun::star::uno::RuntimeException );
60 OUString SAL_CALL getName( ) throw( ::com::sun::star::uno::RuntimeException );
62 // XClipboardEx
64 sal_Int8 SAL_CALL getRenderingCapabilities( ) throw( ::com::sun::star::uno::RuntimeException );
66 // XFlushableClipboard
68 void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
70 // XComponent
72 void SAL_CALL dispose( ) throw( ::com::sun::star::uno::RuntimeException );
74 // member functions
76 void SAL_CALL registerClipboardViewer( );
77 void SAL_CALL unregisterClipboardViewer( );
79 static void WINAPI onClipboardContentChanged();
81 private:
82 void SAL_CALL onReleaseDataObject( CXNotifyingDataObject* theCaller );
84 private:
85 OUString m_itsName;
86 CMtaOleClipboard m_MtaOleClipboard;
87 CWinClipboard* m_pWinClipboard;
88 CXNotifyingDataObject* m_pCurrentClipContent;
89 osl::Mutex m_ClipContentMutex;
91 static osl::Mutex s_aMutex;
92 static CWinClipbImpl* s_pCWinClipbImpl;
94 private:
95 CWinClipbImpl( const CWinClipbImpl& );
96 CWinClipbImpl& operator=( const CWinClipbImpl& );
98 friend class CWinClipboard;
99 friend class CXNotifyingDataObject;
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */