1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile: externalmediashape.hxx,v $
9 * last change: $Author: thb $ $Date: 2008/07/02 19:51:17 $
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 ************************************************************************/
36 #ifndef INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX
37 #define INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX
39 #include <boost/shared_ptr.hpp>
48 /** Represents a shape containing media (video, sound).
50 This interface adds media handling methods to a shape. It
51 allows starting/stopping and pausing playback.
53 class ExternalMediaShape
: public Shape
57 //------------------------------------------------------------------
59 /** Notify the Shape that it should start with playback
61 This method enters playback mode on all registered
62 views. It makes the media initially visible (for videos).
64 virtual void play() = 0;
66 /** Notify the Shape that it should stop playback
68 This method leaves playback mode on all registered
69 views. The media is then rewound to the start, and
70 removed from screen (for videos)
72 virtual void stop() = 0;
74 /** Notify the Shape that it should pause playback
76 This method stops playback on all registered
77 views. The media stays visible (for videos)
79 virtual void pause() = 0;
81 /** Query whether the media is currently playing.
83 virtual bool isPlaying() const = 0;
85 /** Set media time in seconds.
88 Time in seconds of the media time line, that should now be
91 virtual void setMediaTime(double fTime
) = 0;
94 typedef ::boost::shared_ptr
< ExternalMediaShape
> ExternalMediaShapeSharedPtr
;
99 #endif /* INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX */