summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/presentation/XSlideShow.idl
blob: ca31d88d8e24ed4c0718ad52191446c9b5b0da9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

module com {  module sun {  module star {  module presentation {

/** Slide show interface to perform slide show presentations.<p>

    This interface provides the necessary methods to run and control a
    slide show from a given set of XDrawPage slides. The slide show can
    be displayed simultaneously on multiple targets.<p>

    Note: To control a running slide show inside a presentation, please
    use XPresentation2 and XSlideShowController.

    @since OOo 3.0
 */
interface XSlideShow : ::com::sun::star::uno::XInterface
{
    /** Trigger the next effect of the slide show.<p>

        This method triggers the next effect on the currently
        displayed slide. If there is currently no slide show running,
        this method does nothing. If there are no more effects on the
        current slide, a possible slide transition effect is issued
        and the next slide is displayed.<p>

        @return `TRUE`, if the next effect was successfully
        triggered. This method returns `FALSE`, if there is no show
        running, the last effect on the last slide was already
        triggered, or the implementation failed to trigger the next
        effect.
     */
    boolean nextEffect();

    /** Undo the last effect in the main sequence of the slide show.<p>

        The current slide is displayed as if the last user-triggered effect
        has never been triggered.  If there is no previous effect on the
        current slide then slideEnded(true) is called at the registered
        XSlideShowListener objects, which can then trigger a change to the
        previous slide.  Note that this command is executed asynchronously.
        Multiple calls to update() may be necessary to complete its execution.
        If there is currently no slide show running, this method does
        nothing.<p>

        @return `TRUE`, if the previous effect was successfully
        triggered. This method returns `FALSE`, if there is no show
        running, the first effect on the first slide was not yet
        triggered, or the implementation failed to trigger the previous
        effect.
     */
    boolean previousEffect();

    /** Start a shape-intrinsic animation or activity.<p>

        This method starts an animation or activity intrinsic to the
        given shape. Shape-intrinsic activities are things like video
        playback for multimedia shapes, sounds, GIF animations and
        drawing layer animations (flipping between shapes in a group,
        or scroll text).<p>

        @param xShape
        The shape to start the activity for
     */
    boolean startShapeActivity( [in] ::com::sun::star::drawing::XShape xShape );

    /** Stop a shape-intrinsic animation or activity.<p>

        This method stops an animation or activity intrinsic to the
        given shape. Shape-intrinsic activities are things like video
        playback for multimedia shapes, sounds, GIF animations and
        drawing layer animations (flipping between shapes in a group,
        or scroll text).<p>

        @param xShape
        The shape to stop the activity for
     */
    boolean stopShapeActivity( [in] ::com::sun::star::drawing::XShape xShape );

    /** Jump to the given slide.<p>

        This method ends all effects on the current slide, displays a
        possible slide transition, followed by the given slide. If the
        current slide is equal to the requested slide here, this
        method does nothing (this especially means, that any currently
        active effects will remain running).<p>

        @param xSlide
        The slide to display.

        @param xDrawPages
        For future use.

        @param AnimationNode
        The animation node determine the animations to display.

        @param aProperties
        Sequence of property values, which influence the way the
        slide is displayed. Currently, the
        following values are recognized:
        <ul>
            <li>name: Prefetch, value: ::com::sun::star::drawing::XDrawPage. When given,
                this slide is prepared in the background to be displayed next. The next
                call to displaySlide() with the given slide may be faster if there was
                enough time for prefetching. If the next call to displaySlide() uses
                a different slide, this will still work but will not have any performance
                improvements
                </li>
            <li>name: SkipAllMainSequenceEffects, value: boolean.
                When `TRUE` then all main sequence effects on the new slide
                are triggered.  This is typically used when going back one
                effect leads to the previous slide.  On that slide all
                effects have to be shown in order to continue the backward
                traveling.
                When `FALSE`, the default, then no main sequence effect is
                triggered.
                </li>
            <li>name: SkipSlideTransition, value: boolean.
                When `TRUE` then the slide transition animation, if there
                is any, is not displayed.  This is typically used when going
                back one effect leads to the previous slide.  Typically used
                together with SkipAllMainSequenceEffects also being `TRUE`.
                When `FALSE`, the default, then the slide transition
                effect, if it exists, is played.
                </li>
        </ul>
    */
    void displaySlide(
        [in] ::com::sun::star::drawing::XDrawPage xSlide,
        [in] ::com::sun::star::drawing::XDrawPagesSupplier xDrawPages,
        [in] ::com::sun::star::animations::XAnimationNode AnimationNode,
        [in] sequence< ::com::sun::star::beans::PropertyValue > aProperties );

    /** Change the pause state of the slide show.<p>

        This method either pauses the slide show (all currently
        running effects are stopped), or starts a previously stopped
        show again (all paused effects start again).<p>

        @param bPauseShow
        When `TRUE`, the show is paused. When `FALSE`, and the show
        was paused, it starts running at the paused position again.

        @return `TRUE`, if the requested action was successfully
        performed.
     */
    boolean pause( [in] boolean bPauseShow );

    /** Query the currently displayed slide.<p>

        @return the instance of the current slide. If there's no
        slide show running at the moment, this method returns an
        empty reference.
     */
    ::com::sun::star::drawing::XDrawPage getCurrentSlide();

    /** Register drawn polygons in presentation mode

     @param xDocFactory

     */

    void registerUserPaintPolygons([in] ::com::sun::star::lang::XMultiServiceFactory xDocFactory);

    /** Change a property of the slide show.<p>

        @param aShowProperty
        Property values, which influence the way the slides are
        shown. Note that this might possibly be a subset of what is
        supported on show(). Currently, the following values
        are recognized:
        <ul>
            <li>name: AutomaticAdvancement, value: double. When given, effects
                and slides are advanced automatically. The double value specifies
                the timeout between the end of one effect until the start of the
                next one. Negative values are truncated to zero here. When given,
                but with empty value, automatic advancement is disabled again.</li>
            <li>name: UserPaintColor, value: long. When given, the slide show
                will display a small stylus as the mouse cursor. When pressing the
                left mouse key, the user can paint a thin line in the given color.</li>
        </ul>
        A changed property is effective immediately.
     */
    boolean setProperty(
        [in] ::com::sun::star::beans::PropertyValue aShowProperty );

    /** Add a view to the slide show.<p>

        This method adds a view to the slide show. After successful
        completion of this method, the slide show will be visible on
        the added view, scaled according to the view's output area.<p>

        @param xView
        The view to add

        @return `TRUE`, if the view has been successfully
        added. Otherwise, `FALSE` is returned (e.g. if the view is
        already added).
     */
    boolean addView( [in] XSlideShowView xView );

    /** Remove view from the slide show.<p>

        This method removes the given view from the slide show. After
        successful completion of this method, the slide show will
        cease to display on this view.<p>

        @param xView
        View to remove

        @return `TRUE`, if the view was successfully removed, `FALSE`
        otherwise (e.g. if the view was not added in the first place).
     */
    boolean removeView( [in] XSlideShowView xView );

    /** Update the animations.<p>

        This method updates all currently active slide animations. The
        XSlideShow implementations do not render animations
        automatically, but must be called from their clients. This
        allows for various update mechanisms to be employed, ranging
        from a dedicated rendering thread, over timer-based updates,
        to rendering in an idle function. Either way, the client of
        this interface decide about the details.<p>

        @param nNextTimeout
        Via this value, the implementation can return a timeout value,
        denoting the maximal time span that must not be exceeded from
        the return of this method to the next update call. Otherwise,
        the animations might show visible jerks.

        @return `TRUE`, if further update calls are required. If
        `FALSE` is returned, no further update calls are necessary,
        until anyone of the other interface methods is called (most
        notably, the next/previousSlide(), nextEffect() and show()
        methods will nearly always make further update() calls
        necessary).
     */
    boolean update( [out] double nNextTimeout );

    /** Add a slide show listener.<p>

        This method adds a listener to the slide show, which will get
        notified when a registered shape is clicked upon, or a new
        slide is about to be displayed. Note that the listeners will
        <em>not</em> be notified, when the slide change is directly
        requested by one of the nextSlide(), previousSlide() or
        displaySlide() methods.

        @param xListener
        Listener to add.
     */
    void addSlideShowListener( [in] XSlideShowListener xListener );

    /** Revoke a previously registered slide show listener.<p>

        @param xListener
        Listener interface to revoke from being called.
     */
    void removeSlideShowListener( [in] XSlideShowListener xListener );

    /** Add a shape event listener.<p>

        This method adds a listener to the slide show, which will get
        notified when a mouse click is performed on the given
        shape. This can be used by clients of the slide show to
        trigger external actions, such as jumps to different slides.<p>

        @param xListener
        Listener to add.

        @param xShape
        Shape to register a listener for.
     */
    void addShapeEventListener(
        [in] XShapeEventListener xListener,
        [in] ::com::sun::star::drawing::XShape xShape );

    /** Revoke a previously registered shape event listener.<p>

        @param xListener
        Listener interface to revoke from being called.

        @param xShape
        Shape for which the listener should be revoked.
     */
    void removeShapeEventListener(
        [in] XShapeEventListener xListener,
        [in] ::com::sun::star::drawing::XShape xShape );

    /** Set a special mouse cursor for a shape.<p>

        This method requests the slide show to display a special
        cursor, whenever the mouse is hovering over the given shape.<p>

        @param xShape
        Shape to display a special mouse cursor.

        @param nPointerShape
        Type of mouse cursor to display. Must be one of the
        ::com::sun::star::awt::SystemPointer values.
     */
    void setShapeCursor(
        [in] ::com::sun::star::drawing::XShape xShape,
        [in] short nPointerShape );

};

}; }; }; };

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */