use insert function instead of for loop
[LibreOffice.git] / offapi / com / sun / star / awt / XImageConsumer.idl
blob3bc66426e399916d072e62a006a9a729c7b52e51
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 awt {
23 published interface XImageProducer;
26 /** specifies a data sink for an image.
28 <p>An image consumer is a component which wants to display or just
29 receive an image from an image producer.</p>
31 @see XImageProducer
33 published interface XImageConsumer: com::sun::star::uno::XInterface
36 /** initializes the consumer with image dimensions.
38 void init( [in] long Width,
39 [in] long Height );
42 /** changes color model for next pixels
43 typically called once after initialization.
45 void setColorModel( [in] short BitCount,
46 [in] sequence<long> RGBAPal,
47 [in] long RedMask,
48 [in] long GreenMask,
49 [in] long BlueMask,
50 [in] long AlphaMask );
53 /** delivers a chunk of pixels as `long` values.
55 <p>The pixels of the image are delivered using one or more calls
56 to this method. Each call specifies the location and size of the
57 rectangle of source pixels that are contained in the array of pixels.
58 The specified color model object should be used to convert
59 the pixels into their corresponding color and alpha components. Pixel
60 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
61 + m + nOffset).</p>
63 void setPixelsByBytes( [in] long nX,
64 [in] long nY,
65 [in] long nWidth,
66 [in] long nHeight,
67 [in] sequence<byte> aProducerData,
68 [in] long nOffset,
69 [in] long nScanSize );
72 /** delivers a chunk of pixels as `byte` values.
74 <p>The pixels of the image are delivered using one or more calls
75 to this method. Each call specifies the location and size of the
76 rectangle of source pixels that are contained in the array of pixels.
77 The specified color model object should be used to convert
78 the pixels into their corresponding color and alpha components. Pixel
79 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var>
80 + m + nOffset).</p>
82 void setPixelsByLongs( [in] long nX,
83 [in] long nY,
84 [in] long nWidth,
85 [in] long nHeight,
86 [in] sequence<long> aProducerData,
87 [in] long nOffset,
88 [in] long nScanSize );
91 /** is called for the notification of the degree to which the
92 image is delivered.
94 <p>The complete method is called when the image producer
95 has finished delivering all of the pixels that the source image
96 contains, or when a single frame of a multi-frame animation has
97 been completed, or when an error in loading or producing the
98 image has occurred. The image consumer should remove itself from the
99 list of consumers registered with the image producer
100 at this time, unless it is interested in successive frames.</p>
102 void complete( [in] long Status,
103 [in] XImageProducer xProducer );
108 }; }; }; };
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */