1d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5d1766043SAndrew Rist * distributed with this work for additional information 6d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14d1766043SAndrew Rist * software distributed under the License is distributed on an 15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17d1766043SAndrew Rist * specific language governing permissions and limitations 18d1766043SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20d1766043SAndrew Rist *************************************************************/ 21d1766043SAndrew Rist 22d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef _com_sun_star_presentation_XSlideShow_idl 24cdf0e10cSrcweir#define _com_sun_star_presentation_XSlideShow_idl 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__ 30cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl> 31cdf0e10cSrcweir#endif 32cdf0e10cSrcweir#ifndef __com_sun_star_geometry_RealRectangle2D_idl__ 33cdf0e10cSrcweir#include <com/sun/star/geometry/RealRectangle2D.idl> 34cdf0e10cSrcweir#endif 35cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__ 36cdf0e10cSrcweir#include <com/sun/star/rendering/XSpriteCanvas.idl> 37cdf0e10cSrcweir#endif 38cdf0e10cSrcweir#ifndef __com_sun_star_animations_XAnimationNode_idl__ 39cdf0e10cSrcweir#include <com/sun/star/animations/XAnimationNode.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir#endif 42cdf0e10cSrcweir#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ 43cdf0e10cSrcweir#include <com/sun/star/lang/XMultiServiceFactory.idl> 44cdf0e10cSrcweir#ifndef __com_sun_star_drawing_XDrawPage_idl__ 45cdf0e10cSrcweir#include <com/sun/star/drawing/XDrawPage.idl> 46cdf0e10cSrcweir#endif 47cdf0e10cSrcweir#ifndef __com_sun_star_drawing_XDrawPagesSupplier_idl__ 48cdf0e10cSrcweir#include <com/sun/star/drawing/XDrawPagesSupplier.idl> 49cdf0e10cSrcweir#endif 50cdf0e10cSrcweir#ifndef __com_sun_star_drawing_XShape_idl__ 51cdf0e10cSrcweir#include <com/sun/star/drawing/XShape.idl> 52cdf0e10cSrcweir#endif 53cdf0e10cSrcweir#ifndef __com_sun_star_presentation_XSlideShowView_idl__ 54cdf0e10cSrcweir#include <com/sun/star/presentation/XSlideShowView.idl> 55cdf0e10cSrcweir#endif 56cdf0e10cSrcweir#ifndef __com_sun_star_presentation_XSlideShowListener_idl__ 57cdf0e10cSrcweir#include <com/sun/star/presentation/XSlideShowListener.idl> 58cdf0e10cSrcweir#endif 59cdf0e10cSrcweir#ifndef __com_sun_star_presentation_XShapeEventListener_idl__ 60cdf0e10cSrcweir#include <com/sun/star/presentation/XShapeEventListener.idl> 61cdf0e10cSrcweir#endif 62cdf0e10cSrcweir 63cdf0e10cSrcweirmodule com { module sun { module star { module presentation { 64cdf0e10cSrcweir 65cdf0e10cSrcweir/** Slideshow interface to perform slideshow presentations.<p> 66cdf0e10cSrcweir 67cdf0e10cSrcweir This interface provides the necessary methods to run and control a 68cdf0e10cSrcweir slideshow from a given set of XDrawPage slides. The slideshow can 69cdf0e10cSrcweir be displayed simultaneously on multiple targets.<p> 70cdf0e10cSrcweir 71cdf0e10cSrcweir Note: To controll a running slideshow inside a presentation, please 72cdf0e10cSrcweir use <type>XPresentation2</type> and <type>XSlideShowController</type>. 73cdf0e10cSrcweir 74*96af39f7SJürgen Schmidt @since OpenOffice 3.0 75cdf0e10cSrcweir */ 76cdf0e10cSrcweirinterface XSlideShow : ::com::sun::star::uno::XInterface 77cdf0e10cSrcweir{ 78cdf0e10cSrcweir /** Trigger the next effect of the slideshow.<p> 79cdf0e10cSrcweir 80cdf0e10cSrcweir This method triggers the next effect on the currently 81cdf0e10cSrcweir displayed slide. If there is currently no slideshow running, 82cdf0e10cSrcweir this method does nothing. If there are no more effects on the 83cdf0e10cSrcweir current slide, a possible slide transition effect is issued 84cdf0e10cSrcweir and the next slide is displayed.<p> 85cdf0e10cSrcweir 86cdf0e10cSrcweir @return <TRUE>, if the next effect was successfully 87cdf0e10cSrcweir triggered. This method returns <FALSE>, if there is no show 88cdf0e10cSrcweir running, the last effect on the last slide was already 89cdf0e10cSrcweir triggered, or the implementation failed to trigger the next 90cdf0e10cSrcweir effect. 91cdf0e10cSrcweir */ 92cdf0e10cSrcweir boolean nextEffect(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir /** Undo the last effect in the main sequence of the slideshow.<p> 95cdf0e10cSrcweir 96cdf0e10cSrcweir The current slide is displayed as if the last user-triggered effect 97cdf0e10cSrcweir has never been triggered. If there is no previous effect on the 98cdf0e10cSrcweir current slide then slideEnded(true) is called at the registered 99cdf0e10cSrcweir XSlideShowListener objects, which can then trigger a change to the 100cdf0e10cSrcweir previous slide. Note that this command is executed asynchronously. 101cdf0e10cSrcweir Multiple calls to update() may be necessary to complete its execution. 102cdf0e10cSrcweir If there is currently no slideshow running, this method does 103cdf0e10cSrcweir nothing.<p> 104cdf0e10cSrcweir 105cdf0e10cSrcweir @return <TRUE/>, if the previous effect was successfully 106cdf0e10cSrcweir triggered. This method returns <FALSE/>, if there is no show 107cdf0e10cSrcweir running, the first effect on the first slide was not yet 108cdf0e10cSrcweir triggered, or the implementation failed to trigger the previous 109cdf0e10cSrcweir effect. 110cdf0e10cSrcweir */ 111cdf0e10cSrcweir boolean previousEffect(); 112cdf0e10cSrcweir 113cdf0e10cSrcweir /** Start a shape-intrinsic animation or activity.<p> 114cdf0e10cSrcweir 115cdf0e10cSrcweir This method starts an animation or activity intrinsic to the 116cdf0e10cSrcweir given shape. Shape-intrinsic activities are things like video 117cdf0e10cSrcweir playback for multimedia shapes, sounds, GIF animations and 118cdf0e10cSrcweir drawing layer animations (flipping between shapes in a group, 119cdf0e10cSrcweir or scroll text).<p> 120cdf0e10cSrcweir 121cdf0e10cSrcweir @param xShape 122cdf0e10cSrcweir The shape to start the activity for 123cdf0e10cSrcweir */ 124cdf0e10cSrcweir boolean startShapeActivity( [in] ::com::sun::star::drawing::XShape xShape ); 125cdf0e10cSrcweir 126cdf0e10cSrcweir /** Stop a shape-intrinsic animation or activity.<p> 127cdf0e10cSrcweir 128cdf0e10cSrcweir This method stops an animation or activity intrinsic to the 129cdf0e10cSrcweir given shape. Shape-intrinsic activities are things like video 130cdf0e10cSrcweir playback for multimedia shapes, sounds, GIF animations and 131cdf0e10cSrcweir drawing layer animations (flipping between shapes in a group, 132cdf0e10cSrcweir or scroll text).<p> 133cdf0e10cSrcweir 134cdf0e10cSrcweir @param xShape 135cdf0e10cSrcweir The shape to stop the activity for 136cdf0e10cSrcweir */ 137cdf0e10cSrcweir boolean stopShapeActivity( [in] ::com::sun::star::drawing::XShape xShape ); 138cdf0e10cSrcweir 139cdf0e10cSrcweir /** Jump to the given slide.<p> 140cdf0e10cSrcweir 141cdf0e10cSrcweir This method ends all effects on the current slide, displays a 142cdf0e10cSrcweir possible slide transition, followed by the given slide. If the 143cdf0e10cSrcweir current slide is equal to the requested slide here, this 144cdf0e10cSrcweir method does nothing (this especially means, that any currently 145cdf0e10cSrcweir active effects will remain running).<p> 146cdf0e10cSrcweir 147cdf0e10cSrcweir @param xPage 148cdf0e10cSrcweir The slide to display. 149cdf0e10cSrcweir 150cdf0e10cSrcweir @param xDrawPages 151cdf0e10cSrcweir For future use. 152cdf0e10cSrcweir 153cdf0e10cSrcweir @param xAnimationNode 154cdf0e10cSrcweir The animation node determine the animations to display. 155cdf0e10cSrcweir 156cdf0e10cSrcweir @param aProperties 157cdf0e10cSrcweir Sequence of property values, which influence the way the 158cdf0e10cSrcweir slide is displayed. Currently, the 159cdf0e10cSrcweir following values are recognized: 160cdf0e10cSrcweir <ul> 161cdf0e10cSrcweir <li>name: Prefetch, value: ::com::sun::star::drawing::XDrawPage. When given, 162cdf0e10cSrcweir this slide is prepared in the background to be displayed next. The next 163cdf0e10cSrcweir call to displaySlide() with the given slide may be faster if there was 164cdf0e10cSrcweir enough time for prefatching. If the next call to displaySlide() uses 165cdf0e10cSrcweir a different slide, this will still work but will not have any performance 166cdf0e10cSrcweir improvements 167cdf0e10cSrcweir </li> 168cdf0e10cSrcweir <li>name: SkipAllMainSequenceEffects, value: boolean. 169cdf0e10cSrcweir When <TRUE/> then all main sequence effects on the new slide 170cdf0e10cSrcweir are triggered. This is typically used when going back one 171cdf0e10cSrcweir effect leads to the previous slide. On that slide all 172cdf0e10cSrcweir effects have to be shown in order to continue the backward 173cdf0e10cSrcweir travelling. 174cdf0e10cSrcweir When <FALSE/>, the default, then no main sequence effect is 175cdf0e10cSrcweir triggered. 176cdf0e10cSrcweir </li> 177cdf0e10cSrcweir <li>name: SkipSlideTransition, value: boolean. 178cdf0e10cSrcweir When <TRUE/> then the slide transition animation, if there 179cdf0e10cSrcweir is any, is not displayed. This is typically used when going 180cdf0e10cSrcweir back one effect leads to the previous slide. Typically used 181cdf0e10cSrcweir together with SkipAllMainSequenceEffects also being <TRUE/>. 182cdf0e10cSrcweir When <FALSE/>, the default, then the slide transition 183cdf0e10cSrcweir effect, if it exists, is played. 184cdf0e10cSrcweir </li> 185cdf0e10cSrcweir </ul> 186cdf0e10cSrcweir */ 187cdf0e10cSrcweir void displaySlide( 188cdf0e10cSrcweir [in] ::com::sun::star::drawing::XDrawPage xSlide, 189cdf0e10cSrcweir [in] ::com::sun::star::drawing::XDrawPagesSupplier xDrawPages, 190cdf0e10cSrcweir [in] ::com::sun::star::animations::XAnimationNode aAnimationNode, 191cdf0e10cSrcweir [in] sequence< ::com::sun::star::beans::PropertyValue > aProperties ); 192cdf0e10cSrcweir 193cdf0e10cSrcweir /** Change the pause state of the slide show.<p> 194cdf0e10cSrcweir 195cdf0e10cSrcweir This method either pauses the slide show (all currently 196cdf0e10cSrcweir running effects are stopped), or starts a previously stopped 197cdf0e10cSrcweir show again (all paused effects start again).<p> 198cdf0e10cSrcweir 199cdf0e10cSrcweir @param bPauseShow 200cdf0e10cSrcweir When <TRUE>, the show is paused. When <FALSE>, and the show 201cdf0e10cSrcweir was paused, it starts running at the paused position again. 202cdf0e10cSrcweir 203cdf0e10cSrcweir @return <TRUE>, if the requested action was successfully 204cdf0e10cSrcweir performed. 205cdf0e10cSrcweir */ 206cdf0e10cSrcweir boolean pause( [in] boolean bPauseShow ); 207cdf0e10cSrcweir 208cdf0e10cSrcweir /** Query the currently displayed slide.<p> 209cdf0e10cSrcweir 210cdf0e10cSrcweir @return the instance of the current slide. If there's no 211cdf0e10cSrcweir slideshow running at the moment, this method returns an 212cdf0e10cSrcweir empty reference. 213cdf0e10cSrcweir */ 214cdf0e10cSrcweir ::com::sun::star::drawing::XDrawPage getCurrentSlide(); 215cdf0e10cSrcweir 216cdf0e10cSrcweir /** Register drawn polygons in presentation mode 217cdf0e10cSrcweir 218cdf0e10cSrcweir @param xDocFactory 219cdf0e10cSrcweir 220cdf0e10cSrcweir */ 221cdf0e10cSrcweir 222cdf0e10cSrcweir void registerUserPaintPolygons([in] ::com::sun::star::lang::XMultiServiceFactory xDocFactory); 223cdf0e10cSrcweir 224cdf0e10cSrcweir /** Change a property of the slideshow.<p> 225cdf0e10cSrcweir 226cdf0e10cSrcweir @param aShowProperty 227cdf0e10cSrcweir Property values, which influence the way the slides are 228cdf0e10cSrcweir shown. Note that this might possibly be a subset of what is 229cdf0e10cSrcweir supported on show(). Currently, the following values 230cdf0e10cSrcweir are recognized: 231cdf0e10cSrcweir <ul> 232cdf0e10cSrcweir <li>name: AutomaticAdvancement, value: double. When given, effects 233cdf0e10cSrcweir and slides are advanced automatically. The double value specifies 234cdf0e10cSrcweir the timeout between the end of one effect until the start of the 235cdf0e10cSrcweir next one. Negative values are truncated to zero here. When given, 236cdf0e10cSrcweir but with empty value, automatic advancement is disabled again.</li> 237cdf0e10cSrcweir <li>name: UserPaintColor, value: long. When given, the slide show 238cdf0e10cSrcweir will display a small stylus as the mouse cursor. When pressing the 239cdf0e10cSrcweir left mouse key, the user can paint a thin line in the given color.</li> 240cdf0e10cSrcweir </ul> 241cdf0e10cSrcweir A changed property is effective immediately. 242cdf0e10cSrcweir */ 243cdf0e10cSrcweir boolean setProperty( 244cdf0e10cSrcweir [in] ::com::sun::star::beans::PropertyValue aShowProperty ); 245cdf0e10cSrcweir 246cdf0e10cSrcweir /** Add a view to the slide show.<p> 247cdf0e10cSrcweir 248cdf0e10cSrcweir This method adds a view to the slide show. After successful 249cdf0e10cSrcweir completion of this method, the slide show will be visible on 250cdf0e10cSrcweir the added view, scaled according to the view's output area.<p> 251cdf0e10cSrcweir 252cdf0e10cSrcweir @param xView 253cdf0e10cSrcweir The view to add 254cdf0e10cSrcweir 255cdf0e10cSrcweir @return <TRUE>, if the view has been successfully 256cdf0e10cSrcweir added. Otherwise, <FALSE> is returned (e.g. if the view is 257cdf0e10cSrcweir already added). 258cdf0e10cSrcweir */ 259cdf0e10cSrcweir boolean addView( [in] XSlideShowView xView ); 260cdf0e10cSrcweir 261cdf0e10cSrcweir /** Remove view from the slide show.<p> 262cdf0e10cSrcweir 263cdf0e10cSrcweir This method removes the given view from the slide show. After 264cdf0e10cSrcweir successful completion of this method, the slide show will 265cdf0e10cSrcweir cease to display on this view.<p> 266cdf0e10cSrcweir 267cdf0e10cSrcweir @param xView 268cdf0e10cSrcweir View to remove 269cdf0e10cSrcweir 270cdf0e10cSrcweir @return <TRUE>, if the view was successfully removed, <FALSE> 271cdf0e10cSrcweir otherwise (e.g. if the view was not added in the first place). 272cdf0e10cSrcweir */ 273cdf0e10cSrcweir boolean removeView( [in] XSlideShowView xView ); 274cdf0e10cSrcweir 275cdf0e10cSrcweir /** Update the animations.<p> 276cdf0e10cSrcweir 277cdf0e10cSrcweir This method updates all currently active slide animations. The 278cdf0e10cSrcweir XSlideShow implementations do not render animations 279cdf0e10cSrcweir automatically, but must be called from their clients. This 280cdf0e10cSrcweir allows for various update mechanisms to be employed, ranging 281cdf0e10cSrcweir from a dedicated rendering thread, over timer-based updates, 282cdf0e10cSrcweir to rendering in an idle function. Either way, the client of 283cdf0e10cSrcweir this interface decide about the details.<p> 284cdf0e10cSrcweir 285cdf0e10cSrcweir @param nNextTimeout 286cdf0e10cSrcweir Via this value, the implementation can return a timeout value, 287cdf0e10cSrcweir denoting the maximal time span that must not be exceeded from 288cdf0e10cSrcweir the return of this method to the next update call. Otherwise, 289cdf0e10cSrcweir the animations might show visible jerks. 290cdf0e10cSrcweir 291cdf0e10cSrcweir @return <TRUE>, if further update calls are required. If 292cdf0e10cSrcweir <FALSE> is returned, no further update calls are necessary, 293cdf0e10cSrcweir until anyone of the other interface methods is called (most 294cdf0e10cSrcweir notably, the next/previousSlide(), nextEffect() and show() 295cdf0e10cSrcweir methods will nearly always make further update() calls 296cdf0e10cSrcweir necessary). 297cdf0e10cSrcweir */ 298cdf0e10cSrcweir boolean update( [out] double nNextTimeout ); 299cdf0e10cSrcweir 300cdf0e10cSrcweir /** Add a slide show listener.<p> 301cdf0e10cSrcweir 302cdf0e10cSrcweir This method adds a listener to the slide show, which will get 303cdf0e10cSrcweir notified when a registerend shape is clicked upon, or a new 304cdf0e10cSrcweir slide is about to be displayed. Note that the listeners will 305cdf0e10cSrcweir <em>not</em> be notified, when the slide change is directly 306cdf0e10cSrcweir requested by one of the nextSlide(), previousSlide() or 307cdf0e10cSrcweir displaySlide() methods. 308cdf0e10cSrcweir 309cdf0e10cSrcweir @param xListener 310cdf0e10cSrcweir Listener to add. 311cdf0e10cSrcweir */ 312cdf0e10cSrcweir void addSlideShowListener( [in] XSlideShowListener xListener ); 313cdf0e10cSrcweir 314cdf0e10cSrcweir /** Revoke a previously registered slide show listener.<p> 315cdf0e10cSrcweir 316cdf0e10cSrcweir @param xListener 317cdf0e10cSrcweir Listener interface to revoke from being called. 318cdf0e10cSrcweir */ 319cdf0e10cSrcweir void removeSlideShowListener( [in] XSlideShowListener xListener ); 320cdf0e10cSrcweir 321cdf0e10cSrcweir /** Add a shape event listener.<p> 322cdf0e10cSrcweir 323cdf0e10cSrcweir This method adds a listener to the slide show, which will get 324cdf0e10cSrcweir notified when a mouse click is performed on the given 325cdf0e10cSrcweir shape. This can be used by clients of the slide show to 326cdf0e10cSrcweir trigger external actions, such as jumps to different slides.<p> 327cdf0e10cSrcweir 328cdf0e10cSrcweir @param xListener 329cdf0e10cSrcweir Listener to add. 330cdf0e10cSrcweir 331cdf0e10cSrcweir @param xShape 332cdf0e10cSrcweir Shape to register a listener for. 333cdf0e10cSrcweir */ 334cdf0e10cSrcweir void addShapeEventListener( 335cdf0e10cSrcweir [in] XShapeEventListener xListener, 336cdf0e10cSrcweir [in] ::com::sun::star::drawing::XShape xShape ); 337cdf0e10cSrcweir 338cdf0e10cSrcweir /** Revoke a previously registered shape event listener.<p> 339cdf0e10cSrcweir 340cdf0e10cSrcweir @param xListener 341cdf0e10cSrcweir Listener interface to revoke from being called. 342cdf0e10cSrcweir 343cdf0e10cSrcweir @param xShape 344cdf0e10cSrcweir Shape for which the listener should be revoked. 345cdf0e10cSrcweir */ 346cdf0e10cSrcweir void removeShapeEventListener( 347cdf0e10cSrcweir [in] XShapeEventListener xListener, 348cdf0e10cSrcweir [in] ::com::sun::star::drawing::XShape xShape ); 349cdf0e10cSrcweir 350cdf0e10cSrcweir /** Set a special mouse cursor for a shape.<p> 351cdf0e10cSrcweir 352cdf0e10cSrcweir This method requests the slide show to display a special 353cdf0e10cSrcweir cursor, whenever the mouse is hovering over the given shape.<p> 354cdf0e10cSrcweir 355cdf0e10cSrcweir @param xShape 356cdf0e10cSrcweir Shape to display a special mouse cursor. 357cdf0e10cSrcweir 358cdf0e10cSrcweir @param nPointerShape 359cdf0e10cSrcweir Type of mouse cursor to display. Must be one of the 360cdf0e10cSrcweir ::com::sun::star::awt::SystemPointer values. 361cdf0e10cSrcweir */ 362cdf0e10cSrcweir void setShapeCursor( 363cdf0e10cSrcweir [in] ::com::sun::star::drawing::XShape xShape, 364cdf0e10cSrcweir [in] short nPointerShape ); 365cdf0e10cSrcweir 366cdf0e10cSrcweir}; 367cdf0e10cSrcweir 368cdf0e10cSrcweirservice SlideShow : XSlideShow; 369cdf0e10cSrcweir 370cdf0e10cSrcweir}; }; }; }; 371cdf0e10cSrcweir 372cdf0e10cSrcweir#endif 373cdf0e10cSrcweir 374