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: XImageConsumer.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 ************************************************************************/
30 #ifndef __com_sun_star_awt_XImageConsumer_idl__
31 #define __com_sun_star_awt_XImageConsumer_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 //=============================================================================
39 module com
{ module sun
{ module star
{ module awt
{
41 published
interface XImageProducer
;
43 //=============================================================================
45 /** specifies a data sink for an image.
47 <p>An image consumer is a component which wants to display or just
48 receive an image from an image producer.</p>
52 published
interface XImageConsumer
: com
::sun
::star
::uno
::XInterface
54 //-------------------------------------------------------------------------
56 /** initializes the consumer with image dimensions.
58 [oneway
] void init
( [in] long Width
,
61 //-------------------------------------------------------------------------
63 /** changes color model for next pixels
64 typically called once after initialization.
66 [oneway
] void setColorModel
( [in] short BitCount
,
67 [in] sequence
<long> RGBAPal
,
71 [in] long AlphaMask
);
73 //-------------------------------------------------------------------------
75 /** delivers a chunk of pixels as <atom>long</atom> values.
77 <p>The pixels of the image are delivered using one or more calls
78 to this method. Each call specifies the location and size of the
79 rectangle of source pixels that are contained in the array of pixels.
80 The specified color model object should be used to convert
81 the pixels into their corresponding color and alpha components. Pixel
82 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
85 [oneway
] void setPixelsByBytes
( [in] long nX
,
89 [in] sequence
<byte> aProducerData
,
91 [in] long nScanSize
);
93 //-------------------------------------------------------------------------
95 /** delivers a chunk of pixels as <atom>byte</atom> values.
97 <p>The pixels of the image are delivered using one or more calls
98 to this method. Each call specifies the location and size of the
99 rectangle of source pixels that are contained in the array of pixels.
100 The specified color model object should be used to convert
101 the pixels into their corresponding color and alpha components. Pixel
102 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
105 [oneway
] void setPixelsByLongs
( [in] long nX
,
109 [in] sequence
<long> aProducerData
,
111 [in] long nScanSize
);
113 //-------------------------------------------------------------------------
115 /** is called for the notification of the degree to which the
118 <p>The complete method is called when the image producer
119 has finished delivering all of the pixels that the source image
120 contains, or when a single frame of a multi-frame animation has
121 been completed, or when an error in loading or producing the
122 image has occurred. The image consumer should remove itself from the
123 list of consumers registered with the image producer
124 at this time, unless it is interested in successive frames.</p>
126 [oneway
] void complete
( [in] long Status
,
127 [in] XImageProducer xProducer
);
131 //=============================================================================