2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: ilpipeint.h /main/3 1995/10/23 15:58:54 rswiston $ */
24 /**---------------------------------------------------------------------
26 *** (c)Copyright 1991 Hewlett-Packard Co.
28 *** RESTRICTED RIGHTS LEGEND
29 *** Use, duplication, or disclosure by the U.S. Government is subject to
30 *** restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
31 *** Technical Data and Computer Software clause in DFARS 252.227-7013.
32 *** Hewlett-Packard Company
33 *** 3000 Hanover Street
34 *** Palo Alto, CA 94304 U.S.A.
35 *** Rights for non-DOD U.S. Government Departments and Agencies are as set
36 *** forth in FAR 52.227-19(c)(1,2).
38 ***-------------------------------------------------------------------*/
43 /* Private definitions for special hooks into /ilc/ilpipe.c . Not needed
44 to access normal pipe functions!
53 /* Values for pipe producerCode, defines what producer was */
54 #define IL_PIPE_FEED_IMAGE 0 /* previous was ilFeedFromImage() */
55 #define IL_PIPE_IMAGE 1 /* previous was ilReadImage() */
56 #define IL_PIPE_NOT_IMAGE 2 /* previous element not an image */
58 /* In /ilc/ilpipe.c : */
60 /* Called by ilReadImage() to set *pImage as the producer to this pipe.
61 The pipe MUST be in the empty state. "needProducerThrottle" is true iff a
62 throttle must be inserted before next element added by ilAddPipeElement().
64 IL_EXTERN ilBool _ilAddProducerImage (
67 unsigned int producerCode,
71 ilBool needProducerThrottle
74 /* Called by ilFeedPipe() to set info for the first element in the given pipe,
75 which will be ilFeedProducerThrottleExecute(). If feeding compressed data:
76 "start" is the byte offset into the compressed data, and "nCompBytes" is
77 the number of bytes at that offset. If uncompressed data: "start" is the
78 starting line, and "nCompBytes" is ignored. Returns FALSE if the pipe was
79 not started with a ilFeedFromImage() producer.
81 IL_EXTERN ilBool _ilSetFeedPipeData (
88 /* Called by ilConvert() to "typecast" the pipe image to the given des and/or
89 format (ignored if pDes/pFormat null). No validation is done on the result!
91 IL_EXTERN void _ilSetPipeDesFormat (
94 ilImageFormat *pFormat
97 /* Add the given object to a list of objects to be destroyed when this pipe
98 is emptied. The object's refCount should be inc'd before this call, so that
99 the object cannot be freed until this pipe is destroyed.
100 The pipe must be in the forming or complete state.
101 NOTE: a hard limit exists on the # of objects which can be added; not intended
102 for unlimited use, e.g. by filters!
103 Sets context->error to error code or success.
105 IL_EXTERN ilBool _ilAddPipeDestroyObject (
111 /* In /ilc/ilrwimage.c : */
113 /* Insert a "filter" which merely copies the pipe image to the dest image.
114 This is necessary when the pipe is "<Read Image> <WriteImage>", because both
115 ilReadImage() allows the next filter to read directly from its image, and
116 ilWriteImage() allows the previous filter to write directly to its image,
117 but together, there needs to be a filter in between.
118 "height" is the height of the pipe image.
120 IL_EXTERN ilBool _ilInsertCopyFilter (
125 /* Insert a "filter" which copies the compressed pipe image to the dest image.
126 This is the equivalent to ilInsertCopyFilter(), except for compressed images.
128 IL_EXTERN ilBool _ilInsertCompressedCopyFilter (
132 /* Called by ilAddPipeElement to add a "throttle" pipe element to feed
133 strips of height "stripHeight" or zero (0) to the next element.
134 For uncompressed images only: if "constantStrip" is true, the strips out of
135 this filter must all be "stripHeight" or zero lines high, except for the last
136 strip; if false, the height of each strip must be <= "stripHeight".
137 If "producerCode" is not IL_PIPE_NOT_IMAGE, then the throttle is a
138 logical producer: the pipe began with an ilReadImage() or ilFeedFromImage()
139 and must signal IL_ERROR_LAST_STRIP; else the throttle is not the producer.
140 This flag is used in place of "tempImage" in pipe info which IS INCORRECT -
141 ilExecutePipe() changes it to avoid infinite recursion.
142 The strip height from this filter is returned to "*pStripHeight", and
143 "*pConstantStrip" is set true if constant strips are output.
144 Returns: true if success, else false.
146 IL_EXTERN ilBool _ilAddThrottlePipeElement (
149 ilBool constantStrip,
150 unsigned int producerCode,
152 ilBool *pConstantStrip