lib/DtHelp/il: remove register keyword
[oweals/cde.git] / cde / lib / DtHelp / il / ilpipeint.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /* $XConsortium: ilpipeint.h /main/3 1995/10/23 15:58:54 rswiston $ */
24 /**---------------------------------------------------------------------
25 ***     
26 ***    (c)Copyright 1991 Hewlett-Packard Co.
27 ***    
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).
37 ***
38 ***-------------------------------------------------------------------*/
39
40 #ifndef ILPIPEINT_H
41 #define ILPIPEINT_H
42
43     /*  Private definitions for special hooks into /ilc/ilpipe.c .  Not needed
44         to access normal pipe functions!
45     */
46 #ifndef ILINT_H
47 #include "ilint.h"
48 #endif
49 #ifndef ILIMAGE_H
50 #include "ilimage.h"
51 #endif
52
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 */
57
58         /*  In /ilc/ilpipe.c : */
59
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().
63     */
64 IL_EXTERN ilBool _ilAddProducerImage (
65     ilPipe              pipe,
66     ilImagePtr pImage,
67     unsigned int        producerCode,
68     long                height,
69     long                stripHeight,
70     ilBool              constantStrip,
71     ilBool              needProducerThrottle
72     );
73
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.
80         */
81 IL_EXTERN ilBool _ilSetFeedPipeData (
82     ilPipe              pipe,
83     long                start,
84     long                nLines,
85     long                nCompBytes
86     );
87
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!
90         */
91 IL_EXTERN void _ilSetPipeDesFormat (
92     ilPipe              pipe,
93     ilImageDes         *pDes,
94     ilImageFormat      *pFormat
95     );
96
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.
104         */
105 IL_EXTERN ilBool _ilAddPipeDestroyObject (
106     ilPipe              pipe,
107     ilObject            object
108     );
109
110
111         /*  In /ilc/ilrwimage.c : */
112
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.
119         */
120 IL_EXTERN ilBool _ilInsertCopyFilter (
121     ilPipe              pipe,
122     long                height
123     );
124
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.
127         */
128 IL_EXTERN ilBool _ilInsertCompressedCopyFilter (
129     ilPipe              pipe
130     );
131
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.
145     */
146 IL_EXTERN ilBool _ilAddThrottlePipeElement (
147     ilPipe              pipe,
148     long                stripHeight,
149     ilBool              constantStrip,
150     unsigned int        producerCode,
151     long               *pStripHeight,
152     ilBool             *pConstantStrip
153     );
154
155 #endif