merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / drawing / XSlidePreviewCache.idl
blobee40c5f34fa612d6fd3f4d4edfaa2419d93c3d7a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_drawing_XSlidePreviewCache_idl__
29 #define __com_sun_star_drawing_XSlidePreviewCache_idl__
31 #ifndef __com_sun_star_container_XIndexAccess_idl__
32 #include <com/sun/star/container/XIndexAccess.idl>
33 #endif
34 #ifndef __com_sun_star_geometry_IntegerSize2D_idl__
35 #include <com/sun/star/geometry/IntegerSize2D.idl>
36 #endif
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include <com/sun/star/lang/IllegalArgumentException.idl>
39 #endif
40 #ifndef __com_sun_star_rendering_XBitmap_idl__
41 #include <com/sun/star/rendering/XBitmap.idl>
42 #endif
43 #ifndef __com_sun_star_rendering_XCanvas_idl__
44 #include <com/sun/star/rendering/XCanvas.idl>
45 #endif
48 module com { module sun { module star { module drawing {
50 /** Listener for asynchronous preview creations. Called when a slide
51 preview has been created that was previously requested via a call to
52 <method>XSlidePreviewCache::getSlidePreview()</method>. The
53 implementor may then call <method>getSlidePreview()</method> a second
54 time to get the up-to-date version of the preview.
56 interface XSlidePreviewCacheListener
58 /** Called by a <interface>XSlidePreviewCache</interface> object when a
59 preview has been created for the slide with the given index.
60 @param nSlideIndex
61 The index of the slide for which a new preview has been created.
63 void notifyPreviewCreation ([in] long nSlideIndex);
69 /** A cache of preview bitmaps for the slides of one Impress or Draw
70 document in one size. There may be more than one cache for one
71 document. These are internally connected and for missing previews one
72 cache may take it from another cache and scale it to the desired size.
73 When a preview is not present then it is created asynchronously. On
74 creation all registered listeners are notified.
76 Slides are referenced via their index in an XIndexAccess container in
77 order to allow multiple references to a single slide (custom
78 presentations).
80 interface XSlidePreviewCache
82 /** Set the set of slides for which the cache will provide the
83 previews. All slides in the given XIndexAccess are required to come
84 from the given model.
85 @param xSlides
86 The set of slides for which the called cache will provide the
87 previews. This container defines the indices that are used to
88 look up slides.
89 @param xDocument
90 The model that contains the slides reference by the xSlides argument.
92 void setDocumentSlides (
93 [in] ::com::sun::star::container::XIndexAccess xSlides,
94 [in] ::com::sun::star::uno::XInterface xDocument);
96 /** Define which slides are currently visible on the screen and which
97 are not. This information is used for give preview creation for
98 visible slides a higher priority than for those slides that are not
99 visible.
101 void setVisibleRange ([in] long nFirstVisibleSlideIndex, [in] long nLastVisibleSlideIndex);
103 /** Define the size of the previews that are managed by the called
104 cache.
106 void setPreviewSize ([in] ::com::sun::star::geometry::IntegerSize2D aSize);
108 /** Return a preview for the given slide index.
109 The returned bitmap may be the requested preview, a preview of the
110 preview, i.e. a scaled up or down version, or an empty reference
111 when the preview is not yet present.
113 This call may lead to the asynchronous creation of the requested
114 preview. In that case all registered listeners are notified when
115 the preview has been created.
117 ::com::sun::star::rendering::XBitmap getSlidePreview (
118 [in] long nSlideIndex,
119 [in] ::com::sun::star::rendering::XCanvas xCanvas)
120 raises(::com::sun::star::lang::IllegalArgumentException);
122 /** Register a listener that is called when a preview has been created
123 asynchronously.
125 void addPreviewCreationNotifyListener ([in] XSlidePreviewCacheListener xListener);
127 /** Remove a previously registered listener for preview creations.
129 void removePreviewCreationNotifyListener ([in] XSlidePreviewCacheListener xListener);
131 /** Stop the asynchronous creation of previews temporarily.
132 Call <method>resume()</method> to restart it.
134 void pause ();
136 /** Resume the asynchronous creation of slide previews.
138 void resume ();
141 }; }; }; }; // ::com::sun::star::drawing
143 #endif