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 .
19 #ifndef __com_sun_star_awt_XImageConsumer_idl__
20 #define __com_sun_star_awt_XImageConsumer_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
25 module com
{ module sun
{ module star
{ module awt
{
27 published
interface XImageProducer
;
30 /** specifies a data sink for an image.
32 <p>An image consumer is a component which wants to display or just
33 receive an image from an image producer.</p>
37 published
interface XImageConsumer
: com
::sun
::star
::uno
::XInterface
40 /** initializes the consumer with image dimensions.
42 void init
( [in] long Width
,
46 /** changes color model for next pixels
47 typically called once after initialization.
49 void setColorModel
( [in] short BitCount
,
50 [in] sequence
<long> RGBAPal
,
54 [in] long AlphaMask
);
57 /** delivers a chunk of pixels as `long` values.
59 <p>The pixels of the image are delivered using one or more calls
60 to this method. Each call specifies the location and size of the
61 rectangle of source pixels that are contained in the array of pixels.
62 The specified color model object should be used to convert
63 the pixels into their corresponding color and alpha components. Pixel
64 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
67 void setPixelsByBytes
( [in] long nX
,
71 [in] sequence
<byte> aProducerData
,
73 [in] long nScanSize
);
76 /** delivers a chunk of pixels as `byte` values.
78 <p>The pixels of the image are delivered using one or more calls
79 to this method. Each call specifies the location and size of the
80 rectangle of source pixels that are contained in the array of pixels.
81 The specified color model object should be used to convert
82 the pixels into their corresponding color and alpha components. Pixel
83 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
86 void setPixelsByLongs
( [in] long nX
,
90 [in] sequence
<long> aProducerData
,
92 [in] long nScanSize
);
95 /** is called for the notification of the degree to which the
98 <p>The complete method is called when the image producer
99 has finished delivering all of the pixels that the source image
100 contains, or when a single frame of a multi-frame animation has
101 been completed, or when an error in loading or producing the
102 image has occurred. The image consumer should remove itself from the
103 list of consumers registered with the image producer
104 at this time, unless it is interested in successive frames.</p>
106 void complete
( [in] long Status
,
107 [in] XImageProducer xProducer
);
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */