1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFilePreview.idl,v $
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
>
38 #ifndef __com_sun_star_util_Color_idl__
39 #include
<com
/sun
/star
/util
/Color.idl
>
42 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
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
55 published
interface XFilePreview
: com
::sun
::star
::uno
::XInterface
57 //-------------------------------------------------------------------------
58 /** The method returns all image formats that the preview supports.
61 A sequence of all supported preview formats
63 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
65 sequence
< short > getSupportedImageFormats
( );
67 //-------------------------------------------------------------------------
68 /** The method returns the supported color depth of the target device.
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
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
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.
102 Specifies the format of the data that will be delivered
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.
122 A value of <TRUE/> shows the preview window.
123 <p>A value of <FALSE/> hides the preview window.</p>
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.
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 //=============================================================================