1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module ui
{ module dialogs
{
23 /** FilePicker that support the preview of various file formats should implement
27 published
interface XFilePreview
: com
::sun
::star
::uno
::XInterface
29 /** The method returns all image formats that the preview supports.
32 A sequence of all supported preview formats
34 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
36 sequence
< short > getSupportedImageFormats
( );
38 /** The method returns the supported color depth of the target device.
40 @deprecated - typically now just returns 0
43 The color depth in bit, e.g. 8 bit, 16 bit, 32 bit.
45 com
::sun
::star
::util
::Color getTargetColorDepth
( );
47 /** The method returns the available width of the preview window
48 even if the window is invisible or could not be created.
49 If a service implementation doesn't support a file preview
53 The width of the preview window in pixel.
55 long getAvailableWidth
( );
57 /** The method returns the available height of the preview window
58 even if the window is invisible or could not be created.
59 If a service implementation doesn't support a file preview
63 The height of the preview window in pixel.
65 long getAvailableHeight
( );
67 /** Sets a new image. If the preview is currently hidden the
68 image will be ignored. An empty any will clear the preview window.
71 Specifies the format of the data that will be delivered
74 The image data, the image format defines how
75 the image data have to be delivered
77 @throws com::sun::star::lang::IllegalArgumentException
78 If the specified image format is invalid or not
79 supported by the preview implementation
81 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
83 void setImage
( [in] short aImageFormat
, [in] any aImage
)
84 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
86 /** Optionally sets the current show state of the preview. It is possible
87 that the preview implementation doesn't support hiding the preview.
90 A value of `TRUE` shows the preview window.
91 <p>A value of `FALSE` hides the preview window.</p>
94 A value of `TRUE` on success.
95 <p>A value of `FALSE` if the operation fails for any reason or the preview
96 implementation doesn't support hiding the preview.</p>
98 boolean setShowState
( [in] boolean bShowState
);
100 /** Returns the current show state of the preview.
103 A value of `TRUE` if the preview window is visible.
104 <p>A value of `FALSE` if the preview window is invisible.</p>
106 boolean getShowState
( );
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */