1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _TOOLKIT_AWT_VCLXPOINTER_HXX_
21 #define _TOOLKIT_AWT_VCLXPOINTER_HXX_
24 #include <com/sun/star/awt/XPointer.hpp>
25 #include <com/sun/star/lang/XTypeProvider.hpp>
26 #include <com/sun/star/lang/XUnoTunnel.hpp>
27 #include <cppuhelper/weak.hxx>
28 #include <osl/mutex.hxx>
30 #include <vcl/pointr.hxx>
32 // ----------------------------------------------------
34 // ----------------------------------------------------
36 class VCLXPointer
: public ::com::sun::star::awt::XPointer
,
37 public ::com::sun::star::lang::XTypeProvider
,
38 public ::com::sun::star::lang::XUnoTunnel
,
39 public ::cppu::OWeakObject
46 ::osl::Mutex
& GetMutex() { return maMutex
; }
52 const Pointer
& GetPointer() const { return maPointer
; }
54 // ::com::sun::star::uno::XInterface
55 ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
56 void SAL_CALL
acquire() throw() { OWeakObject::acquire(); }
57 void SAL_CALL
release() throw() { OWeakObject::release(); }
59 // ::com::sun::star::lang::XUnoTunnel
60 static const ::com::sun::star::uno::Sequence
< sal_Int8
>& GetUnoTunnelId() throw();
61 static VCLXPointer
* GetImplementation( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& rxIFace
);
62 sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& rIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
64 // ::com::sun::star::lang::XTypeProvider
65 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes() throw(::com::sun::star::uno::RuntimeException
);
66 ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() throw(::com::sun::star::uno::RuntimeException
);
68 // ::com::sun::star::awt::XPointer
69 void SAL_CALL
setType( sal_Int32 nType
) throw(::com::sun::star::uno::RuntimeException
);
70 sal_Int32 SAL_CALL
getType( ) throw(::com::sun::star::uno::RuntimeException
);
76 #endif // _TOOLKIT_AWT_VCLXPOINTER_HXX_
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */