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 INCLUDED_TOOLKIT_AWT_ANIMATEDIMAGESPEER_HXX
21 #define INCLUDED_TOOLKIT_AWT_ANIMATEDIMAGESPEER_HXX
23 #include <toolkit/awt/vclxwindow.hxx>
24 #include <com/sun/star/container/XContainerListener.hpp>
26 #include <com/sun/star/awt/XAnimation.hpp>
27 #include <com/sun/star/util/XModifyListener.hpp>
29 #include <cppuhelper/implbase.hxx>
37 //= AnimatedImagesPeer
39 struct AnimatedImagesPeer_Data
;
40 typedef cppu::ImplInheritanceHelper
< VCLXWindow
,
42 css::container::XContainerListener
,
43 css::util::XModifyListener
44 > AnimatedImagesPeer_Base
;
46 class AnimatedImagesPeer final
: public AnimatedImagesPeer_Base
52 virtual ~AnimatedImagesPeer() override
;
56 virtual void SAL_CALL
startAnimation( ) override
;
57 virtual void SAL_CALL
stopAnimation( ) override
;
58 virtual sal_Bool SAL_CALL
isAnimationRunning( ) override
;
61 virtual void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
62 virtual css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
65 virtual void SAL_CALL
elementInserted( const css::container::ContainerEvent
& Event
) override
;
66 virtual void SAL_CALL
elementRemoved( const css::container::ContainerEvent
& Event
) override
;
67 virtual void SAL_CALL
elementReplaced( const css::container::ContainerEvent
& Event
) override
;
70 virtual void SAL_CALL
disposing( const css::lang::EventObject
& i_event
) override
;
73 virtual void SAL_CALL
modified( const css::lang::EventObject
& i_event
) override
;
76 void SAL_CALL
dispose( ) override
;
79 void ProcessWindowEvent( const VclWindowEvent
& i_windowEvent
) override
;
81 /** updates our images with the ones from the given XAnimatedImages component
83 void impl_updateImages_nolck( const css::uno::Reference
< css::uno::XInterface
>& i_animatedImages
);
85 AnimatedImagesPeer(const AnimatedImagesPeer
&) = delete;
86 AnimatedImagesPeer
& operator=(const AnimatedImagesPeer
&) = delete;
88 std::unique_ptr
< AnimatedImagesPeer_Data
> m_xData
;
92 } // namespace toolkit
95 #endif // INCLUDED_TOOLKIT_AWT_ANIMATEDIMAGESPEER_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */