Bump version to 5.0-14
[LibreOffice.git] / sdext / source / presenter / PresenterCurrentSlideObserver.hxx
blob1e9848269222013f31e8585714fcfee19d9e66b2
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_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/compbase1.hxx>
28 #include <cppuhelper/basemutex.hxx>
29 #include <rtl/ref.hxx>
30 #include <salhelper/timer.hxx>
32 namespace sdext { namespace presenter {
34 namespace {
35 typedef ::cppu::WeakComponentImplHelper1 <
36 css::presentation::XSlideShowListener
37 > PresenterCurrentSlideObserverInterfaceBase;
40 /** Check periodically the slide show controller and the
41 frame::XController whether the current slide has changed. If so,
42 then inform the presenter controller about it.
44 Objects of this class have their own lifetime control and destroy
45 themselves when the presenter controller is disposed.
47 class PresenterCurrentSlideObserver
48 : protected ::cppu::BaseMutex,
49 public PresenterCurrentSlideObserverInterfaceBase
51 public:
52 PresenterCurrentSlideObserver (
53 const ::rtl::Reference<PresenterController>& rxPresenterController,
54 const css::uno::Reference<css::presentation::XSlideShowController>& rxSlideShowController);
55 virtual ~PresenterCurrentSlideObserver();
57 virtual void SAL_CALL disposing() SAL_OVERRIDE;
59 // XSlideShowListener
60 virtual void SAL_CALL paused( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 virtual void SAL_CALL resumed( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 virtual void SAL_CALL slideTransitionStarted( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 virtual void SAL_CALL slideTransitionEnded( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 virtual void SAL_CALL slideAnimationsEnded( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 virtual void SAL_CALL slideEnded(sal_Bool bReverse) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 virtual void SAL_CALL hyperLinkClicked( const OUString& hyperLink ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 // XAnimationListener
69 virtual void SAL_CALL beginEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 virtual void SAL_CALL endEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 virtual void SAL_CALL repeat( const css::uno::Reference< css::animations::XAnimationNode >& Node, ::sal_Int32 Repeat ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 // XEventListener
74 virtual void SAL_CALL disposing (
75 const css::lang::EventObject& rEvent)
76 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 private:
79 ::rtl::Reference<PresenterController> mpPresenterController;
80 css::uno::Reference<css::presentation::XSlideShowController> mxSlideShowController;
83 } } // end of namespace ::sdext::presenter
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */