1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef com_sun_star_graphic_GraphicDescriptor_idl
21#define com_sun_star_graphic_GraphicDescriptor_idl
22
23#include <com/sun/star/graphic/GraphicType.idl>
24#include <com/sun/star/beans/XPropertySet.idl>
25#include <com/sun/star/awt/Size.idl>
26
27module com { module sun { module star { module graphic
28{
29
30/** This service describes all graphic properties that are available
31    via the com::sun::star::beans::XPropertySet interface
32
33    @see XPropertySet
34*/
35published service GraphicDescriptor
36{
37    /** The property interface by which the properties of all
38        supported services are exchanged
39    */
40    interface ::com::sun::star::beans::XPropertySet;
41
42    /** The type of the graphic
43
44        @see GraphicType
45    */
46    [property] byte GraphicType;
47
48    /** The MimeType of the loaded graphic
49
50        <p> The mime can be the original mime type of the graphic
51        source the graphic container was constructed from or it
52        can be the internal mime type image/x-vclgraphic, in which
53        case the original mime type is not available anymore</p>
54
55        <p> Currently, the following mime types are supported for
56        loaded graphics:</p>
57        <ul>
58            <li>image/bmp</li>
59            <li>image/gif</li>
60            <li>image/jpeg</li>
61            <li>image/x-photo-cd</li>
62            <li>image/x-pcx</li>
63            <li>image/png</li>
64            <li>image/tiff</li>
65            <li>image/x-xbitmap</li>
66            <li>image/x-xpixmap</li>
67            <li>image/x-portable-bitmap</li>
68            <li>image/x-portable-graymap</li>
69            <li>image/x-portable-pixmap</li>
70            <li>image/x-cmu-raster</li>
71            <li>image/x-targa</li>
72            <li>image/x-photoshop</li>
73            <li>image/x-eps</li>
74            <li>image/x-dxf</li>
75            <li>image/x-met</li>
76            <li>image/x-pict</li>
77            <li>image/x-svm</li>
78            <li>image/x-wmf</li>
79            <li>image/x-emf</li>
80            <li>image/svg+xml</li>
81            <li>application/pdf</li>
82            <li>image/x-vclgraphic</li>
83        </ul>
84
85    */
86    [property] string MimeType;
87
88    /** The Size of the graphic in pixel.
89
90        <p> This property may not be available in case of
91        vector graphics or if the pixel size can not be
92        determined correctly for some formats without loading
93        the whole graphic</p>
94    */
95    [optional, property] ::com::sun::star::awt::Size SizePixel;
96
97    /** The Size of the graphic in 100th mm.
98
99        <p> This property may not be available in case of
100        pixel graphics or if the logical size can not be
101        determined correctly for some formats without loading
102        the whole graphic</p>
103    */
104    [optional, property] ::com::sun::star::awt::Size Size100thMM;
105
106    /** The number of bits per pixel used for the pixel graphic
107
108        <p> This property is not available for vector
109        graphics and may not be available for some kinds
110        of pixel graphics</p>
111    */
112    [optional, property] byte BitsPerPixel;
113
114    /** Indicates that it is a transparent graphic
115
116        <p>This property is always `TRUE` for vector graphics.
117        The status of this flag is not always clear if the
118        graphic was not loaded at all, e.g. in case of just
119        querying for the GraphicDescriptor.</p>
120    */
121    [optional, property] boolean Transparent;
122
123    /** Indicates that it is a pixel graphic with an alpha channel
124
125        <p>The status of this flag is not always clear if the
126        graphic was not loaded at all, e.g. in case of just
127        querying for the GraphicDescriptor</p>
128    */
129    [optional, property] boolean Alpha;
130
131    /** Indicates that it is a graphic that consists of several
132        frames that can be played as an animation
133
134        <p>The status of this flag is not always clear if the
135        graphic was not loaded at all, e.g. in case of just
136        querying for the GraphicDescriptor</p>
137    */
138    [optional, property] boolean Animated;
139
140    /** Indicates that the graphic is an external linked graphic
141
142        @since LibreOffice 6.1
143    */
144    [optional, property] boolean Linked;
145
146    /** The URL of the location from where the graphic was loaded from
147
148        @since LibreOffice 6.1
149    */
150    [optional, property] string OriginURL;
151};
152
153} ; } ; } ; } ;
154
155#endif
156
157/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
158