Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / ui / dialogs / XFilePreview.idl
blob2bb74c91cbfaf83e7b070bc40cde56bfdf47b71f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFilePreview.idl,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_ui_dialogs_XFilePreview_idl__
32 #define __com_sun_star_ui_dialogs_XFilePreview_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include <com/sun/star/uno/XInterface.idl>
36 #endif
38 #ifndef __com_sun_star_util_Color_idl__
39 #include <com/sun/star/util/Color.idl>
40 #endif
42 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43 #include <com/sun/star/lang/IllegalArgumentException.idl>
44 #endif
46 //=============================================================================
48 module com { module sun { module star { module ui { module dialogs {
50 //=============================================================================
51 /** FilePicker that support the preview of various file formats should implement
52 this interface.
55 published interface XFilePreview: com::sun::star::uno::XInterface
57 //-------------------------------------------------------------------------
58 /** The method returns all image formats that the preview supports.
60 @returns
61 A sequence of all supported preview formats
63 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
64 */
65 sequence< short > getSupportedImageFormats( );
67 //-------------------------------------------------------------------------
68 /** The method returns the supported color depth of the target device.
70 @returns
71 The color depth in bit, e.g. 8 bit, 16 bit, 32 bit.
73 com::sun::star::util::Color getTargetColorDepth( );
75 //-------------------------------------------------------------------------
76 /** The method returns the available width of the preview window
77 even if the window is invisible or could not be created.
78 If a service implementation doesn't support a file preview
79 0 will be returned.
81 @returns
82 The width of the preview window in pixel.
84 long getAvailableWidth( );
86 //-------------------------------------------------------------------------
87 /** The method returns the available height of the preview window
88 even if the window is invisible or could not be created.
89 If a service implementation doesn't support a file preview
90 0 will be returned.
92 @returns
93 The heigth of the preview window in pixel.
95 long getAvailableHeight( );
97 //-------------------------------------------------------------------------
98 /** Sets a new image. If the preview is currently hidden the
99 image will be ignored. An empty any will clear the preview window.
101 @param aImageFormat
102 Specifies the format of the data that will be delivered
104 @param aImage
105 The image data, the image format defines how
106 the image data have to be delivered
108 @throws com::sun::star::lang::IllegalArgumentException
109 If the specified image format is invalid or not
110 supported by the preview implementation
112 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
114 void setImage( [in] short aImageFormat, [in] any aImage )
115 raises( ::com::sun::star::lang::IllegalArgumentException );
117 //-------------------------------------------------------------------------
118 /** Optionally sets the current show state of the preview. It is possible
119 that the preview implementation doesn't support hiding the preview.
121 @param bShowState
122 A value of <TRUE/> shows the preview window.
123 <p>A value of <FALSE/> hides the preview window.</p>
125 @returns
126 A value of <TRUE/> on success.
127 <p>A vaue of <FALSE/> if the operation fails for any reason or the preview
128 implementation doesn't support hiding the preview.</p>
130 boolean setShowState( [in] boolean bShowState );
132 //-------------------------------------------------------------------------
133 /** Returns the current show state of the preview.
135 @returns
136 A value of <TRUE/> if the preview window is visible.
137 <p>A value of <FALSE/> if the preview window is invisible.</p>
139 boolean getShowState( );
142 //=============================================================================
144 }; }; }; }; };
147 #endif