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_SDEXT_SOURCE_PRESENTER_PRESENTERCURRENTSLIDEOBSERVER_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERCURRENTSLIDEOBSERVER_HXX
23 #include "PresenterController.hxx"
24 #include <com/sun/star/presentation/XSlideShow.hpp>
25 #include <com/sun/star/presentation/XSlideShowController.hpp>
26 #include <com/sun/star/frame/XController.hpp>
27 #include <cppuhelper/compbase.hxx>
28 #include <cppuhelper/basemutex.hxx>
29 #include <rtl/ref.hxx>
30 #include <salhelper/timer.hxx>
32 namespace sdext
{ namespace presenter
{
34 typedef ::cppu::WeakComponentImplHelper
<
35 css::presentation::XSlideShowListener
36 > PresenterCurrentSlideObserverInterfaceBase
;
38 /** Check periodically the slide show controller and the
39 frame::XController whether the current slide has changed. If so,
40 then inform the presenter controller about it.
42 Objects of this class have their own lifetime control and destroy
43 themselves when the presenter controller is disposed.
45 class PresenterCurrentSlideObserver
46 : protected ::cppu::BaseMutex
,
47 public PresenterCurrentSlideObserverInterfaceBase
50 PresenterCurrentSlideObserver (
51 const ::rtl::Reference
<PresenterController
>& rxPresenterController
,
52 const css::uno::Reference
<css::presentation::XSlideShowController
>& rxSlideShowController
);
53 virtual ~PresenterCurrentSlideObserver() override
;
55 virtual void SAL_CALL
disposing() override
;
58 virtual void SAL_CALL
paused( ) override
;
59 virtual void SAL_CALL
resumed( ) override
;
60 virtual void SAL_CALL
slideTransitionStarted( ) override
;
61 virtual void SAL_CALL
slideTransitionEnded( ) override
;
62 virtual void SAL_CALL
slideAnimationsEnded( ) override
;
63 virtual void SAL_CALL
slideEnded(sal_Bool bReverse
) override
;
64 virtual void SAL_CALL
hyperLinkClicked( const OUString
& hyperLink
) override
;
67 virtual void SAL_CALL
beginEvent( const css::uno::Reference
< css::animations::XAnimationNode
>& Node
) override
;
68 virtual void SAL_CALL
endEvent( const css::uno::Reference
< css::animations::XAnimationNode
>& Node
) override
;
69 virtual void SAL_CALL
repeat( const css::uno::Reference
< css::animations::XAnimationNode
>& Node
, ::sal_Int32 Repeat
) override
;
72 virtual void SAL_CALL
disposing (
73 const css::lang::EventObject
& rEvent
) override
;
76 ::rtl::Reference
<PresenterController
> mpPresenterController
;
77 css::uno::Reference
<css::presentation::XSlideShowController
> mxSlideShowController
;
80 } } // end of namespace ::sdext::presenter
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */