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 librararies 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: GraphicsP.h /main/4 1996/05/09 03:43:09 drk $ */
24 #ifndef _DtGraphicsP_h
25 #define _DtGraphicsP_h
28 #include <X11/Intrinsic.h>
34 * Input stream data structures
37 /* Stream source types */
38 enum _DtGrStreamType { _DtGrNONE, _DtGrBUFFER, _DtGrFILE };
40 /* Stream file data */
45 char *uncompressed_filename;
48 /* Stream buffer data */
60 enum _DtGrStreamType type;
69 * Input stream function prototypes
72 /* Open a file stream */
78 /* Open a buffer stream */
90 /* Reads data from a stream into a buffer */
98 /* Sets the position of the next input operation on a stream */
105 /* Reads a character from a stream and advances the stream position */
110 /* Reads a string from a stream and advances the stream position */
111 char *_DtGrGetString(
118 * Inline graphics data structures
121 enum _DtGrColorModel { _DtGrCOLOR, _DtGrGRAY_SCALE, _DtGrBITONAL };
122 enum _DtGrLoadStatus { _DtGrSUCCESS, _DtGrCOLOR_REDUCE,_DtGrCONVERT_FAILURE,
123 _DtGrOPEN_FAILED, _DtGrFILE_INVALID, _DtGrNO_MEMORY,
126 /* Context structure used by image type converters */
132 typedef enum _DtGrLoadStatus (*_DtGrLoadProc)(
141 enum _DtGrColorModel color_model,
142 Boolean allow_reduced_colors,
143 Dimension *in_out_width,
144 Dimension *in_out_height,
145 unsigned short media_resolution,
150 _DtGrContext *context);
152 typedef void (*_DtGrDestroyContextProc)(
153 _DtGrContext *context);
156 * Inline graphics function prototypes
159 /* Loads an image into a pixmap */
160 enum _DtGrLoadStatus _DtGrLoad(
170 enum _DtGrColorModel color_model,
171 Boolean allow_reduced_colors,
172 Dimension *in_out_width,
173 Dimension *in_out_height,
174 unsigned short media_resolution,
179 _DtGrContext *context);
181 /* Destroys a context */
182 void _DtGrDestroyContext(
183 _DtGrContext *context);
185 /* Registers a converter for a graphic type */
186 void _DtGrRegisterConverter(
188 _DtGrLoadProc convert_proc,
189 _DtGrDestroyContextProc destroy_context_proc,
190 _DtGrLoadProc *current_convert_proc,
191 _DtGrDestroyContextProc *current_destroy_proc);
196 #endif /* _DtGraphicsP_h */
197 /* DON'T ADD ANYTHING AFTER THIS #endif */