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 .
19 #ifndef _com_sun_star_presentation_XSlideShow_idl
20 #define _com_sun_star_presentation_XSlideShow_idl
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
24 #include
<com
/sun
/star
/geometry
/RealRectangle2D.idl
>
25 #include
<com
/sun
/star
/rendering
/XSpriteCanvas.idl
>
26 #include
<com
/sun
/star
/animations
/XAnimationNode.idl
>
27 #include
<com
/sun
/star
/lang
/XMultiServiceFactory.idl
>
28 #include
<com
/sun
/star
/drawing
/XDrawPage.idl
>
29 #include
<com
/sun
/star
/drawing
/XDrawPagesSupplier.idl
>
30 #include
<com
/sun
/star
/drawing
/XShape.idl
>
31 #include
<com
/sun
/star
/presentation
/XSlideShowView.idl
>
32 #include
<com
/sun
/star
/presentation
/XSlideShowListener.idl
>
33 #include
<com
/sun
/star
/presentation
/XShapeEventListener.idl
>
35 module com
{ module sun
{ module star
{ module presentation
{
37 /** Slide show interface to perform slide show presentations.<p>
39 This interface provides the necessary methods to run and control a
40 slide show from a given set of XDrawPage slides. The slide show can
41 be displayed simultaneously on multiple targets.<p>
43 Note: To control a running slide show inside a presentation, please
44 use XPresentation2 and XSlideShowController.
48 interface XSlideShow
: ::com
::sun
::star
::uno
::XInterface
50 /** Trigger the next effect of the slide show.<p>
52 This method triggers the next effect on the currently
53 displayed slide. If there is currently no slide show running,
54 this method does nothing. If there are no more effects on the
55 current slide, a possible slide transition effect is issued
56 and the next slide is displayed.<p>
58 @return `TRUE`, if the next effect was successfully
59 triggered. This method returns `FALSE`, if there is no show
60 running, the last effect on the last slide was already
61 triggered, or the implementation failed to trigger the next
66 /** Undo the last effect in the main sequence of the slide show.<p>
68 The current slide is displayed as if the last user-triggered effect
69 has never been triggered. If there is no previous effect on the
70 current slide then slideEnded(true) is called at the registered
71 XSlideShowListener objects, which can then trigger a change to the
72 previous slide. Note that this command is executed asynchronously.
73 Multiple calls to update() may be necessary to complete its execution.
74 If there is currently no slide show running, this method does
77 @return `TRUE`, if the previous effect was successfully
78 triggered. This method returns `FALSE`, if there is no show
79 running, the first effect on the first slide was not yet
80 triggered, or the implementation failed to trigger the previous
83 boolean previousEffect
();
85 /** Start a shape-intrinsic animation or activity.<p>
87 This method starts an animation or activity intrinsic to the
88 given shape. Shape-intrinsic activities are things like video
89 playback for multimedia shapes, sounds, GIF animations and
90 drawing layer animations (flipping between shapes in a group,
94 The shape to start the activity for
96 boolean startShapeActivity
( [in] ::com
::sun
::star
::drawing
::XShape xShape
);
98 /** Stop a shape-intrinsic animation or activity.<p>
100 This method stops an animation or activity intrinsic to the
101 given shape. Shape-intrinsic activities are things like video
102 playback for multimedia shapes, sounds, GIF animations and
103 drawing layer animations (flipping between shapes in a group,
107 The shape to stop the activity for
109 boolean stopShapeActivity
( [in] ::com
::sun
::star
::drawing
::XShape xShape
);
111 /** Jump to the given slide.<p>
113 This method ends all effects on the current slide, displays a
114 possible slide transition, followed by the given slide. If the
115 current slide is equal to the requested slide here, this
116 method does nothing (this especially means, that any currently
117 active effects will remain running).<p>
120 The slide to display.
126 The animation node determine the animations to display.
129 Sequence of property values, which influence the way the
130 slide is displayed. Currently, the
131 following values are recognized:
133 <li>name: Prefetch, value: ::com::sun::star::drawing::XDrawPage. When given,
134 this slide is prepared in the background to be displayed next. The next
135 call to displaySlide() with the given slide may be faster if there was
136 enough time for prefetching. If the next call to displaySlide() uses
137 a different slide, this will still work but will not have any performance
140 <li>name: SkipAllMainSequenceEffects, value: boolean.
141 When `TRUE` then all main sequence effects on the new slide
142 are triggered. This is typically used when going back one
143 effect leads to the previous slide. On that slide all
144 effects have to be shown in order to continue the backward
146 When `FALSE`, the default, then no main sequence effect is
149 <li>name: SkipSlideTransition, value: boolean.
150 When `TRUE` then the slide transition animation, if there
151 is any, is not displayed. This is typically used when going
152 back one effect leads to the previous slide. Typically used
153 together with SkipAllMainSequenceEffects also being `TRUE`.
154 When `FALSE`, the default, then the slide transition
155 effect, if it exists, is played.
160 [in] ::com
::sun
::star
::drawing
::XDrawPage xSlide
,
161 [in] ::com
::sun
::star
::drawing
::XDrawPagesSupplier xDrawPages
,
162 [in] ::com
::sun
::star
::animations
::XAnimationNode AnimationNode
,
163 [in] sequence
< ::com
::sun
::star
::beans
::PropertyValue
> aProperties
);
165 /** Change the pause state of the slide show.<p>
167 This method either pauses the slide show (all currently
168 running effects are stopped), or starts a previously stopped
169 show again (all paused effects start again).<p>
172 When `TRUE`, the show is paused. When `FALSE`, and the show
173 was paused, it starts running at the paused position again.
175 @return `TRUE`, if the requested action was successfully
178 boolean pause
( [in] boolean bPauseShow
);
180 /** Query the currently displayed slide.<p>
182 @return the instance of the current slide. If there's no
183 slide show running at the moment, this method returns an
186 ::com
::sun
::star
::drawing
::XDrawPage getCurrentSlide
();
188 /** Register drawn polygons in presentation mode
194 void registerUserPaintPolygons
([in] ::com
::sun
::star
::lang
::XMultiServiceFactory xDocFactory
);
196 /** Change a property of the slide show.<p>
199 Property values, which influence the way the slides are
200 shown. Note that this might possibly be a subset of what is
201 supported on show(). Currently, the following values
204 <li>name: AutomaticAdvancement, value: double. When given, effects
205 and slides are advanced automatically. The double value specifies
206 the timeout between the end of one effect until the start of the
207 next one. Negative values are truncated to zero here. When given,
208 but with empty value, automatic advancement is disabled again.</li>
209 <li>name: UserPaintColor, value: long. When given, the slide show
210 will display a small stylus as the mouse cursor. When pressing the
211 left mouse key, the user can paint a thin line in the given color.</li>
213 A changed property is effective immediately.
216 [in] ::com
::sun
::star
::beans
::PropertyValue aShowProperty
);
218 /** Add a view to the slide show.<p>
220 This method adds a view to the slide show. After successful
221 completion of this method, the slide show will be visible on
222 the added view, scaled according to the view's output area.<p>
227 @return `TRUE`, if the view has been successfully
228 added. Otherwise, `FALSE` is returned (e.g. if the view is
231 boolean addView
( [in] XSlideShowView xView
);
233 /** Remove view from the slide show.<p>
235 This method removes the given view from the slide show. After
236 successful completion of this method, the slide show will
237 cease to display on this view.<p>
242 @return `TRUE`, if the view was successfully removed, `FALSE`
243 otherwise (e.g. if the view was not added in the first place).
245 boolean removeView
( [in] XSlideShowView xView
);
247 /** Update the animations.<p>
249 This method updates all currently active slide animations. The
250 XSlideShow implementations do not render animations
251 automatically, but must be called from their clients. This
252 allows for various update mechanisms to be employed, ranging
253 from a dedicated rendering thread, over timer-based updates,
254 to rendering in an idle function. Either way, the client of
255 this interface decide about the details.<p>
258 Via this value, the implementation can return a timeout value,
259 denoting the maximal time span that must not be exceeded from
260 the return of this method to the next update call. Otherwise,
261 the animations might show visible jerks.
263 @return `TRUE`, if further update calls are required. If
264 `FALSE` is returned, no further update calls are necessary,
265 until anyone of the other interface methods is called (most
266 notably, the next/previousSlide(), nextEffect() and show()
267 methods will nearly always make further update() calls
270 boolean update
( [out] double nNextTimeout
);
272 /** Add a slide show listener.<p>
274 This method adds a listener to the slide show, which will get
275 notified when a registered shape is clicked upon, or a new
276 slide is about to be displayed. Note that the listeners will
277 <em>not</em> be notified, when the slide change is directly
278 requested by one of the nextSlide(), previousSlide() or
279 displaySlide() methods.
284 void addSlideShowListener
( [in] XSlideShowListener xListener
);
286 /** Revoke a previously registered slide show listener.<p>
289 Listener interface to revoke from being called.
291 void removeSlideShowListener
( [in] XSlideShowListener xListener
);
293 /** Add a shape event listener.<p>
295 This method adds a listener to the slide show, which will get
296 notified when a mouse click is performed on the given
297 shape. This can be used by clients of the slide show to
298 trigger external actions, such as jumps to different slides.<p>
304 Shape to register a listener for.
306 void addShapeEventListener
(
307 [in] XShapeEventListener xListener
,
308 [in] ::com
::sun
::star
::drawing
::XShape xShape
);
310 /** Revoke a previously registered shape event listener.<p>
313 Listener interface to revoke from being called.
316 Shape for which the listener should be revoked.
318 void removeShapeEventListener
(
319 [in] XShapeEventListener xListener
,
320 [in] ::com
::sun
::star
::drawing
::XShape xShape
);
322 /** Set a special mouse cursor for a shape.<p>
324 This method requests the slide show to display a special
325 cursor, whenever the mouse is hovering over the given shape.<p>
328 Shape to display a special mouse cursor.
331 Type of mouse cursor to display. Must be one of the
332 ::com::sun::star::awt::SystemPointer values.
335 [in] ::com
::sun
::star
::drawing
::XShape xShape
,
336 [in] short nPointerShape
);
344 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */