no more gbuild loops: break early on nonexistent objects (this commit breaks multi...
[LibreOffice.git] / slideshow / source / inc / externalmediashape.hxx
blob9e5c412c481599f2555407b4d53947e1f080653e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX
30 #define INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX
32 #include <boost/shared_ptr.hpp>
34 #include "shape.hxx"
37 namespace slideshow
39 namespace internal
41 /** Represents a shape containing media (video, sound).
43 This interface adds media handling methods to a shape. It
44 allows starting/stopping and pausing playback.
46 class ExternalMediaShape : public Shape
48 public:
49 // Animation methods
50 //------------------------------------------------------------------
52 /** Notify the Shape that it should start with playback
54 This method enters playback mode on all registered
55 views. It makes the media initially visible (for videos).
57 virtual void play() = 0;
59 /** Notify the Shape that it should stop playback
61 This method leaves playback mode on all registered
62 views. The media is then rewound to the start, and
63 removed from screen (for videos)
65 virtual void stop() = 0;
67 /** Notify the Shape that it should pause playback
69 This method stops playback on all registered
70 views. The media stays visible (for videos)
72 virtual void pause() = 0;
74 /** Query whether the media is currently playing.
76 virtual bool isPlaying() const = 0;
78 /** Set media time in seconds.
80 @param fTime
81 Time in seconds of the media time line, that should now be
82 presented
84 virtual void setMediaTime(double fTime) = 0;
87 typedef ::boost::shared_ptr< ExternalMediaShape > ExternalMediaShapeSharedPtr;
92 #endif /* INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX */
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */