1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_awt_XImageConsumer_idl__ 24#define __com_sun_star_awt_XImageConsumer_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30//============================================================================= 31 32 module com { module sun { module star { module awt { 33 34 published interface XImageProducer; 35 36//============================================================================= 37 38/** specifies a data sink for an image. 39 40 <p>An image consumer is a component which wants to display or just 41 receive an image from an image producer.</p> 42 43 @see XImageProducer 44 */ 45published interface XImageConsumer: com::sun::star::uno::XInterface 46{ 47 //------------------------------------------------------------------------- 48 49 /** initializes the consumer with image dimensions. 50 */ 51 [oneway] void init( [in] long Width, 52 [in] long Height ); 53 54 //------------------------------------------------------------------------- 55 56 /** changes color model for next pixels 57 typically called once after initialization. 58 */ 59 [oneway] void setColorModel( [in] short BitCount, 60 [in] sequence<long> RGBAPal, 61 [in] long RedMask, 62 [in] long GreenMask, 63 [in] long BlueMask, 64 [in] long AlphaMask ); 65 66 //------------------------------------------------------------------------- 67 68 /** delivers a chunk of pixels as <atom>long</atom> values. 69 70 <p>The pixels of the image are delivered using one or more calls 71 to this method. Each call specifies the location and size of the 72 rectangle of source pixels that are contained in the array of pixels. 73 The specified color model object should be used to convert 74 the pixels into their corresponding color and alpha components. Pixel 75 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var> 76 + m + nOffset).</p> 77 */ 78 [oneway] void setPixelsByBytes( [in] long nX, 79 [in] long nY, 80 [in] long nWidth, 81 [in] long nHeight, 82 [in] sequence<byte> aProducerData, 83 [in] long nOffset, 84 [in] long nScanSize ); 85 86 //------------------------------------------------------------------------- 87 88 /** delivers a chunk of pixels as <atom>byte</atom> values. 89 90 <p>The pixels of the image are delivered using one or more calls 91 to this method. Each call specifies the location and size of the 92 rectangle of source pixels that are contained in the array of pixels. 93 The specified color model object should be used to convert 94 the pixels into their corresponding color and alpha components. Pixel 95 (m,n) is stored in the pixels array at index (n * <var>nScanSize</var> 96 + m + nOffset).</p> 97 */ 98 [oneway] void setPixelsByLongs( [in] long nX, 99 [in] long nY, 100 [in] long nWidth, 101 [in] long nHeight, 102 [in] sequence<long> aProducerData, 103 [in] long nOffset, 104 [in] long nScanSize ); 105 106 //------------------------------------------------------------------------- 107 108 /** is called for the notification of the degree to which the 109 image is delivered. 110 111 <p>The complete method is called when the image producer 112 has finished delivering all of the pixels that the source image 113 contains, or when a single frame of a multi-frame animation has 114 been completed, or when an error in loading or producing the 115 image has occurred. The image consumer should remove itself from the 116 list of consumers registered with the image producer 117 at this time, unless it is interested in successive frames.</p> 118 */ 119 [oneway] void complete( [in] long Status, 120 [in] XImageProducer xProducer ); 121 122}; 123 124//============================================================================= 125 126}; }; }; }; 127 128#endif 129