merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / ui / dialogs / XFilePreview.idl
blob935b1528db1e855bdfaf0a2436fbf3f77ab47e23
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_ui_dialogs_XFilePreview_idl__
29 #define __com_sun_star_ui_dialogs_XFilePreview_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include <com/sun/star/uno/XInterface.idl>
33 #endif
35 #ifndef __com_sun_star_util_Color_idl__
36 #include <com/sun/star/util/Color.idl>
37 #endif
39 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
40 #include <com/sun/star/lang/IllegalArgumentException.idl>
41 #endif
43 //=============================================================================
45 module com { module sun { module star { module ui { module dialogs {
47 //=============================================================================
48 /** FilePicker that support the preview of various file formats should implement
49 this interface.
52 published interface XFilePreview: com::sun::star::uno::XInterface
54 //-------------------------------------------------------------------------
55 /** The method returns all image formats that the preview supports.
57 @returns
58 A sequence of all supported preview formats
60 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
62 sequence< short > getSupportedImageFormats( );
64 //-------------------------------------------------------------------------
65 /** The method returns the supported color depth of the target device.
67 @returns
68 The color depth in bit, e.g. 8 bit, 16 bit, 32 bit.
70 com::sun::star::util::Color getTargetColorDepth( );
72 //-------------------------------------------------------------------------
73 /** The method returns the available width of the preview window
74 even if the window is invisible or could not be created.
75 If a service implementation doesn't support a file preview
76 0 will be returned.
78 @returns
79 The width of the preview window in pixel.
81 long getAvailableWidth( );
83 //-------------------------------------------------------------------------
84 /** The method returns the available height of the preview window
85 even if the window is invisible or could not be created.
86 If a service implementation doesn't support a file preview
87 0 will be returned.
89 @returns
90 The heigth of the preview window in pixel.
92 long getAvailableHeight( );
94 //-------------------------------------------------------------------------
95 /** Sets a new image. If the preview is currently hidden the
96 image will be ignored. An empty any will clear the preview window.
98 @param aImageFormat
99 Specifies the format of the data that will be delivered
101 @param aImage
102 The image data, the image format defines how
103 the image data have to be delivered
105 @throws com::sun::star::lang::IllegalArgumentException
106 If the specified image format is invalid or not
107 supported by the preview implementation
109 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
111 void setImage( [in] short aImageFormat, [in] any aImage )
112 raises( ::com::sun::star::lang::IllegalArgumentException );
114 //-------------------------------------------------------------------------
115 /** Optionally sets the current show state of the preview. It is possible
116 that the preview implementation doesn't support hiding the preview.
118 @param bShowState
119 A value of <TRUE/> shows the preview window.
120 <p>A value of <FALSE/> hides the preview window.</p>
122 @returns
123 A value of <TRUE/> on success.
124 <p>A vaue of <FALSE/> if the operation fails for any reason or the preview
125 implementation doesn't support hiding the preview.</p>
127 boolean setShowState( [in] boolean bShowState );
129 //-------------------------------------------------------------------------
130 /** Returns the current show state of the preview.
132 @returns
133 A value of <TRUE/> if the preview window is visible.
134 <p>A value of <FALSE/> if the preview window is invisible.</p>
136 boolean getShowState( );
139 //=============================================================================
141 }; }; }; }; };
144 #endif