Warning: That file was not part of the compilation database. It may have many parsing errors.
1 | /* ************************************************************************** */ |
---|---|
2 | /* * For conditions of distribution and use, * */ |
3 | /* * see copyright notice in libmng.h * */ |
4 | /* ************************************************************************** */ |
5 | /* * * */ |
6 | /* * project : libmng * */ |
7 | /* * file : libmng_types.h copyright (c) 2000-2007 G.Juyn * */ |
8 | /* * version : 1.0.10 * */ |
9 | /* * * */ |
10 | /* * purpose : type specifications * */ |
11 | /* * * */ |
12 | /* * author : G.Juyn * */ |
13 | /* * * */ |
14 | /* * comment : Specification of the types used by the library * */ |
15 | /* * Creates platform-independant structure * */ |
16 | /* * * */ |
17 | /* * changes : 0.5.1 - 05/06/2000 - G.Juyn * */ |
18 | /* * - added iteratechunk callback definition * */ |
19 | /* * 0.5.1 - 05/08/2000 - G.Juyn * */ |
20 | /* * - improved definitions for DLL support * */ |
21 | /* * - added 8-bit palette definition * */ |
22 | /* * - added general array definitions * */ |
23 | /* * - added MNG_NULL definition * */ |
24 | /* * - changed strict-ANSI stuff * */ |
25 | /* * 0.5.1 - 05/11/2000 - G.Juyn * */ |
26 | /* * - changed most callback prototypes to allow the app * */ |
27 | /* * to report errors during callback processing * */ |
28 | /* * 0.5.1 - 05/16/2000 - G.Juyn * */ |
29 | /* * - moved standard header includes into this file * */ |
30 | /* * (stdlib/mem for mem-mngmt & math for fp gamma-calc) * */ |
31 | /* * * */ |
32 | /* * 0.5.2 - 05/18/2000 - G.Juyn * */ |
33 | /* * - B003 - fixed problem with <mem.h> being proprietary * */ |
34 | /* * to Borland platform * */ |
35 | /* * - added helper definitions for JNG (IJG-based) * */ |
36 | /* * - fixed support for IJGSRC6B * */ |
37 | /* * 0.5.2 - 05/24/2000 - G.Juyn * */ |
38 | /* * - added default IJG compression parameters and such * */ |
39 | /* * 0.5.2 - 05/31/2000 - G.Juyn * */ |
40 | /* * - fixed inclusion for memcpy (contributed by Tim Rowley) * */ |
41 | /* * - added mng_int32p (contributed by Tim Rowley) * */ |
42 | /* * 0.5.2 - 06/02/2000 - G.Juyn * */ |
43 | /* * - removed SWAP_ENDIAN reference (contributed by Tim Rowley)* */ |
44 | /* * - added getalphaline callback for RGB8_A8 canvasstyle * */ |
45 | /* * * */ |
46 | /* * 0.5.3 - 06/21/2000 - G.Juyn * */ |
47 | /* * - added speedtype to facilitate testing * */ |
48 | /* * 0.5.3 - 06/27/2000 - G.Juyn * */ |
49 | /* * - added typedef for mng_size_t * */ |
50 | /* * - changed size parameter for memory callbacks to * */ |
51 | /* * mng_size_t * */ |
52 | /* * 0.5.3 - 06/28/2000 - G.Juyn * */ |
53 | /* * - changed definition of 32-bit ints (64-bit platforms) * */ |
54 | /* * - changed definition of mng_handle (64-bit platforms) * */ |
55 | /* * 0.5.3 - 06/29/2000 - G.Juyn * */ |
56 | /* * - changed definition of mng_handle (again) * */ |
57 | /* * - swapped refresh parameters * */ |
58 | /* * - added inclusion of stdlib.h for abs() * */ |
59 | /* * * */ |
60 | /* * 0.9.0 - 06/30/2000 - G.Juyn * */ |
61 | /* * - changed refresh parameters to 'x,y,width,height' * */ |
62 | /* * 0.9.1 - 07/10/2000 - G.Juyn * */ |
63 | /* * - added suspendbuffer constants * */ |
64 | /* * 0.9.1 - 07/15/2000 - G.Juyn * */ |
65 | /* * - added callbacks for SAVE/SEEK processing * */ |
66 | /* * * */ |
67 | /* * 0.9.2 - 08/05/2000 - G.Juyn * */ |
68 | /* * - changed file-prefixes * */ |
69 | /* * * */ |
70 | /* * 0.9.3 - 08/07/2000 - G.Juyn * */ |
71 | /* * - B111300 - fixup for improved portability * */ |
72 | /* * 0.9.3 - 08/12/2000 - G.Juyn * */ |
73 | /* * - added workaround for faulty PhotoShop iCCP chunk * */ |
74 | /* * 0.9.3 - 09/11/2000 - G.Juyn * */ |
75 | /* * - added export of zlib functions from windows dll * */ |
76 | /* * - fixed inclusion parameters once again to make those * */ |
77 | /* * external libs work together * */ |
78 | /* * - re-fixed fixed inclusion parameters * */ |
79 | /* * (these freeking libraries make me mad) * */ |
80 | /* * 0.9.3 - 10/11/2000 - G.Juyn * */ |
81 | /* * - added support for nEED * */ |
82 | /* * 0.9.3 - 10/17/2000 - G.Juyn * */ |
83 | /* * - added callback to process non-critical unknown chunks * */ |
84 | /* * * */ |
85 | /* * 0.9.4 - 11/20/2000 - R.Giles * */ |
86 | /* * - fixed inclusion of lcms header for non-windows platforms * */ |
87 | /* * 0.9.4 - 12/12/2000 - G.Juyn * */ |
88 | /* * - changed callback convention for MSVC (Thanks Chad) * */ |
89 | /* * 0.9.4 - 12/16/2000 - G.Juyn * */ |
90 | /* * - fixed mixup of data- & function-pointers (thanks Dimitri)* */ |
91 | /* * * */ |
92 | /* * 1.0.1 - 02/08/2001 - G.Juyn * */ |
93 | /* * - added MEND processing callback * */ |
94 | /* * * */ |
95 | /* * 1.0.2 - 06/23/2001 - G.Juyn * */ |
96 | /* * - added processterm callback * */ |
97 | /* * * */ |
98 | /* * 1.0.3 - 08/06/2001 - G.Juyn * */ |
99 | /* * - changed inclusion of lcms.h for Linux platforms * */ |
100 | /* * * */ |
101 | /* * 1.0.5 - 08/19/2002 - G.Juyn * */ |
102 | /* * - B597134 - libmng pollutes the linker namespace * */ |
103 | /* * * */ |
104 | /* * 1.0.6 - 04/11/2003 - G.Juyn * */ |
105 | /* * - B719420 - fixed several MNG_APP_CMS problems * */ |
106 | /* * 1.0.6 - 06/15/2003 - R.Giles * */ |
107 | /* * - lcms.h inclusion is generally no longer prefixed * */ |
108 | /* * 1.0.6 - 07/07/2003 - G. R-P. * */ |
109 | /* * - added png_imgtypes enumeration * */ |
110 | /* * * */ |
111 | /* * 1.0.7 - 03/10/2004 - G.R-P * */ |
112 | /* * - added conditionals around openstream/closestream * */ |
113 | /* * * */ |
114 | /* * 1.0.8 - 04/11/2004 - G.Juyn * */ |
115 | /* * - added data-push mechanisms for specialized decoders * */ |
116 | /* * 1.0.8 - 08/01/2004 - G.Juyn * */ |
117 | /* * - added support for 3+byte pixelsize for JPEG's * */ |
118 | /* * * */ |
119 | /* * 1.0.9 - 12/05/2004 - G.Juyn * */ |
120 | /* * - inclusion of zlib/lcms/ijgsrc6b with <> instead of "" * */ |
121 | /* * 1.0.9 - 12/06/2004 - G.Juyn * */ |
122 | /* * - added conditional MNG_OPTIMIZE_CHUNKREADER * */ |
123 | /* * * */ |
124 | /* * 1.0.10 - 04/08/2007 - G.Juyn * */ |
125 | /* * - added support for mPNG proposal * */ |
126 | /* * 1.0.10 - 04/12/2007 - G.Juyn * */ |
127 | /* * - added support for ANG proposal * */ |
128 | /* * * */ |
129 | /* ************************************************************************** */ |
130 | |
131 | #ifndef _libmng_types_h_ |
132 | #define _libmng_types_h_ |
133 | |
134 | /* ************************************************************************** */ |
135 | |
136 | #ifdef __BORLANDC__ |
137 | #pragma option -AT /* turn off strict ANSI-C for the moment */ |
138 | #endif |
139 | |
140 | #ifndef WIN32 |
141 | #if defined(_WIN32) || defined(__WIN32__) || defined(_Windows) || defined(_WINDOWS) |
142 | #define WIN32 /* gather them into a single define */ |
143 | #endif |
144 | #endif |
145 | |
146 | /* ************************************************************************** */ |
147 | /* * * */ |
148 | /* * Here's where the external & standard libs are embedded * */ |
149 | /* * * */ |
150 | /* * (it can be a bit of a pain in the lower-back to get them to work * */ |
151 | /* * together) * */ |
152 | /* * * */ |
153 | /* ************************************************************************** */ |
154 | #ifdef HIDDEN_FOR_NOW |
155 | #ifdef WIN32 /* only include needed stuff */ |
156 | #ifndef WIN32_LEAN_AND_MEAN |
157 | #define WIN32_LEAN_AND_MEAN |
158 | #endif |
159 | #endif |
160 | #endif /* HIDDEN_FOR_NOW */ |
161 | |
162 | #ifdef MNG_USE_DLL |
163 | #ifdef MNG_SKIP_ZLIB |
164 | #undef MNG_INCLUDE_ZLIB |
165 | #endif |
166 | #ifdef MNG_SKIP_LCMS |
167 | #undef MNG_INCLUDE_LCMS |
168 | #endif |
169 | #ifdef MNG_SKIP_IJG6B |
170 | #undef MNG_INCLUDE_IJG6B |
171 | #endif |
172 | #endif |
173 | |
174 | #ifdef MNG_INCLUDE_ZLIB /* zlib by Mark Adler & Jean-loup Gailly */ |
175 | #include <zlib.h> |
176 | #endif |
177 | |
178 | #ifdef MNG_INCLUDE_LCMS /* little cms by Marti Maria Saguer */ |
179 | #ifndef ZLIB_DLL |
180 | #undef FAR |
181 | #endif |
182 | #ifdef HAVE_LIBLCMS1 |
183 | #include <lcms.h> |
184 | #elif defined(HAVE_LIBLCMS2) |
185 | #include <lcms2.h> |
186 | #endif |
187 | #endif /* MNG_INCLUDE_LCMS */ |
188 | |
189 | #ifdef MNG_INCLUDE_IJG6B /* IJG's jpgsrc6b */ |
190 | #define JPEG_INTERNAL_OPTIONS /* for RGB_PIXELSIZE */ |
191 | #ifdef MNG_USE_SETJMP |
192 | #include <setjmp.h> /* needed for error-recovery (blergh) */ |
193 | #else |
194 | #ifdef WIN32 |
195 | /* #define USE_WINDOWS_MESSAGEBOX */ /* display a messagebox under Windoze */ |
196 | #endif |
197 | #endif /* MNG_USE_SETJMP */ |
198 | #ifdef FAR |
199 | #undef FAR /* possibly defined by zlib or lcms */ |
200 | #endif |
201 | #define JPEG_INTERNAL_OPTIONS /* for RGB_PIXELSIZE */ |
202 | /* There has been a change in jpeg-9 : */ |
203 | #ifndef _WIN32 |
204 | #define HAVE_BOOLEAN |
205 | typedef int boolean; |
206 | #endif |
207 | #include <stdio.h> |
208 | #include <jpeglib.h> |
209 | #endif /* MNG_INCLUDE_IJG6B */ |
210 | |
211 | #if defined(MNG_INTERNAL_MEMMNGMT) || defined(MNG_INCLUDE_FILTERS) |
212 | #include <stdlib.h> /* "calloc" & "free" & "abs" */ |
213 | #endif |
214 | |
215 | #include <limits.h> /* get proper integer widths */ |
216 | |
217 | #ifdef WIN32 |
218 | #if defined __BORLANDC__ |
219 | #include <mem.h> /* defines "memcpy" for BCB */ |
220 | #else |
221 | #include <memory.h> /* defines "memcpy" for other win32 platforms */ |
222 | #endif |
223 | #include <string.h> /* "strncmp" + "strcmp" */ |
224 | #else /* WIN32 */ |
225 | #ifdef BSD |
226 | #include <strings.h> /* defines "memcpy", etc for BSD (?) */ |
227 | #else |
228 | #include <string.h> /* defines "memcpy", etc for all others (???) */ |
229 | #endif |
230 | #endif /* WIN32 */ |
231 | |
232 | #if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS) |
233 | #include <math.h> /* fp gamma-calculation */ |
234 | #endif |
235 | |
236 | /* ************************************************************************** */ |
237 | /* * * */ |
238 | /* * Platform-dependant stuff * */ |
239 | /* * * */ |
240 | /* ************************************************************************** */ |
241 | |
242 | /* TODO: this may require some elaboration for other platforms; |
243 | only works with BCB for now */ |
244 | |
245 | #ifndef MNG_DLL |
246 | #if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) |
247 | #define MNG_DLL |
248 | #endif |
249 | #endif |
250 | |
251 | #define MNG_LOCAL static |
252 | |
253 | #if defined(MNG_DLL) && defined(WIN32) /* setup DLL calling conventions */ |
254 | #define MNG_DECL __stdcall |
255 | #if defined(MNG_BUILD_DLL) |
256 | #define MNG_EXT __declspec(dllexport) |
257 | #elif defined(MNG_USE_DLL) |
258 | #define MNG_EXT __declspec(dllimport) |
259 | #else |
260 | #define MNG_EXT |
261 | #endif |
262 | #ifdef MNG_STRICT_ANSI |
263 | #undef MNG_STRICT_ANSI /* can't do strict-ANSI with this DLL-stuff */ |
264 | #endif |
265 | #else |
266 | #define MNG_DECL /* dummies for non-DLL */ |
267 | #define MNG_EXT |
268 | #endif /* MNG_DLL && WIN32 */ |
269 | |
270 | #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI) |
271 | #pragma option -A /* now force ANSI-C from here on */ |
272 | #endif |
273 | |
274 | /* ************************************************************************** */ |
275 | |
276 | #if USHRT_MAX == 0xffffffffU /* get the proper 32-bit width !!! */ |
277 | typedef unsigned short mng_uint32; |
278 | typedef signed short mng_int32; |
279 | #elif UINT_MAX == 0xffffffffU |
280 | typedef unsigned int mng_uint32; |
281 | typedef signed int mng_int32; |
282 | #elif ULONG_MAX == 0xffffffffU |
283 | typedef unsigned long mng_uint32; |
284 | typedef signed long mng_int32; |
285 | #else |
286 | #error "Sorry, I can't find any 32-bit integers on this platform." |
287 | #endif |
288 | |
289 | typedef signed short mng_int16; /* other basic integers */ |
290 | typedef unsigned short mng_uint16; |
291 | typedef signed char mng_int8; |
292 | typedef unsigned char mng_uint8; |
293 | |
294 | typedef double mng_float; /* basic float */ |
295 | |
296 | typedef size_t mng_size_t; /* size field for memory allocation */ |
297 | |
298 | typedef char * mng_pchar; /* string */ |
299 | typedef void * mng_ptr; /* generic pointer */ |
300 | typedef void (*mng_fptr) (void); /* generic function pointer */ |
301 | |
302 | /* ************************************************************************** */ |
303 | /* * * */ |
304 | /* * Platform-independant from here * */ |
305 | /* * * */ |
306 | /* ************************************************************************** */ |
307 | |
308 | typedef mng_uint32 * mng_uint32p; /* pointer to unsigned longs */ |
309 | typedef mng_int32 * mng_int32p; /* pointer to longs */ |
310 | typedef mng_uint16 * mng_uint16p; /* pointer to unsigned words */ |
311 | typedef mng_uint8 * mng_uint8p; /* pointer to unsigned bytes */ |
312 | |
313 | typedef mng_int8 mng_bool; /* booleans */ |
314 | |
315 | struct mng_data_struct; |
316 | typedef struct mng_data_struct * mng_handle; /* generic handle */ |
317 | |
318 | typedef mng_int32 mng_retcode; /* generic return code */ |
319 | typedef mng_int32 mng_chunkid; /* 4-byte chunkname identifier */ |
320 | typedef mng_ptr mng_chunkp; /* pointer to a chunk-structure */ |
321 | typedef mng_ptr mng_objectp; /* pointer to an object-structure */ |
322 | |
323 | typedef mng_chunkid * mng_chunkidp; /* pointer to chunkid */ |
324 | |
325 | typedef struct { /* 8-bit palette element */ |
326 | mng_uint8 iRed; |
327 | mng_uint8 iGreen; |
328 | mng_uint8 iBlue; |
329 | } mng_palette8e; |
330 | typedef mng_palette8e mng_palette8[256]; /* 8-bit palette */ |
331 | typedef mng_palette8e * mng_palette8ep; |
332 | |
333 | typedef mng_uint8 mng_uint8arr[256]; /* generic arrays */ |
334 | typedef mng_uint8 mng_uint8arr4[4]; |
335 | typedef mng_uint16 mng_uint16arr[256]; |
336 | typedef mng_uint32 mng_uint32arr2[2]; |
337 | |
338 | /* ************************************************************************** */ |
339 | |
340 | #define MNG_FALSE 0 |
341 | #define MNG_TRUE 1 |
342 | #define MNG_NULL 0 |
343 | |
344 | #define MNG_SUSPENDBUFFERSIZE 32768 |
345 | #define MNG_SUSPENDREQUESTSIZE 1024 |
346 | |
347 | /* ************************************************************************** */ |
348 | |
349 | #ifdef MNG_INCLUDE_ZLIB |
350 | |
351 | /* size of temporary zlib buffer for deflate processing */ |
352 | #define MNG_ZLIB_MAXBUF 8192 |
353 | |
354 | /* default zlib compression parameters for deflateinit2 */ |
355 | #define MNG_ZLIB_LEVEL 9 /* level */ |
356 | #define MNG_ZLIB_METHOD Z_DEFLATED /* method */ |
357 | #define MNG_ZLIB_WINDOWBITS 15 /* window size */ |
358 | #define MNG_ZLIB_MEMLEVEL 9 /* memory level */ |
359 | #define MNG_ZLIB_STRATEGY Z_DEFAULT_STRATEGY /* strategy */ |
360 | |
361 | #define MNG_MAX_IDAT_SIZE 4096 /* maximum size of IDAT data */ |
362 | |
363 | #endif /* MNG_INCLUDE_ZLIB */ |
364 | |
365 | /* ************************************************************************** */ |
366 | |
367 | #ifdef MNG_INCLUDE_JNG |
368 | |
369 | #ifdef MNG_INCLUDE_IJG6B /* IJG helper defs */ |
370 | typedef struct jpeg_compress_struct mngjpeg_comp; |
371 | typedef struct jpeg_decompress_struct mngjpeg_decomp; |
372 | typedef struct jpeg_error_mgr mngjpeg_error; |
373 | typedef struct jpeg_source_mgr mngjpeg_source; |
374 | |
375 | typedef mngjpeg_comp * mngjpeg_compp; |
376 | typedef mngjpeg_decomp * mngjpeg_decompp; |
377 | typedef mngjpeg_error * mngjpeg_errorp; |
378 | typedef mngjpeg_source * mngjpeg_sourcep; |
379 | |
380 | typedef J_DCT_METHOD mngjpeg_dctmethod; |
381 | |
382 | /* default IJG parameters for compression */ |
383 | #define MNG_JPEG_DCT JDCT_DEFAULT /* DCT algorithm (JDCT_ISLOW) */ |
384 | #define MNG_JPEG_QUALITY 100 /* quality 0..100; 100=best */ |
385 | #define MNG_JPEG_SMOOTHING 0 /* default no smoothing */ |
386 | #define MNG_JPEG_PROGRESSIVE MNG_FALSE /* default is just baseline */ |
387 | #define MNG_JPEG_OPTIMIZED MNG_FALSE /* default is not optimized */ |
388 | #endif /* MNG_INCLUDE_IJG6B */ |
389 | |
390 | #define MNG_JPEG_MAXBUF 65500 /* max size of temp JPEG buffer */ |
391 | #define MNG_MAX_JDAT_SIZE 4096 /* maximum size of JDAT data */ |
392 | |
393 | #endif /* MNG_INCLUDE_JNG */ |
394 | |
395 | /* ************************************************************************** */ |
396 | |
397 | #ifdef MNG_INCLUDE_LCMS |
398 | typedef cmsHPROFILE mng_cmsprof; /* little CMS helper defs */ |
399 | typedef cmsHTRANSFORM mng_cmstrans; |
400 | typedef cmsCIExyY mng_CIExyY; |
401 | typedef cmsCIExyYTRIPLE mng_CIExyYTRIPLE; |
402 | |
403 | #ifdef HAVE_LIBLCMS1 |
404 | typedef LPGAMMATABLE mng_gammatabp; |
405 | #elif defined(HAVE_LIBLCMS2) |
406 | typedef cmsToneCurve* mng_gammatabp; |
407 | #endif |
408 | #endif /* MNG_INCLUDE_LCMS */ |
409 | |
410 | /* ************************************************************************** */ |
411 | |
412 | /* enumeration of known graphics types */ |
413 | enum mng_imgtypes {mng_it_unknown, mng_it_png, mng_it_mng, mng_it_jng |
414 | #ifdef MNG_INCLUDE_MPNG_PROPOSAL |
415 | ,mng_it_mpng |
416 | #endif |
417 | #ifdef MNG_INCLUDE_ANG_PROPOSAL |
418 | ,mng_it_ang |
419 | #endif |
420 | }; |
421 | typedef enum mng_imgtypes mng_imgtype; |
422 | |
423 | /* enumeration of animation speed-types */ |
424 | enum mng_speedtypes {mng_st_normal, mng_st_fast, mng_st_slow, mng_st_slowest}; |
425 | typedef enum mng_speedtypes mng_speedtype; |
426 | |
427 | #ifdef MNG_OPTIMIZE_CHUNKREADER |
428 | /* enumeration object-creation indicators */ |
429 | enum mng_createobjtypes {mng_create_none, mng_create_always, mng_create_ifglobal}; |
430 | typedef enum mng_createobjtypes mng_createobjtype; |
431 | #endif |
432 | |
433 | /* ************************************************************************** */ |
434 | |
435 | /* enumeration of PNG image types */ |
436 | #ifdef MNG_OPTIMIZE_FOOTPRINT_INIT |
437 | enum png_imgtypes |
438 | { |
439 | png_g1, |
440 | png_g2, |
441 | png_g4, |
442 | png_g8, |
443 | png_rgb8, |
444 | png_idx1, |
445 | png_idx2, |
446 | png_idx4, |
447 | png_idx8, |
448 | png_ga8, |
449 | png_rgba8, |
450 | #ifdef MNG_INCLUDE_JNG |
451 | png_jpeg_a1, |
452 | png_jpeg_a2, |
453 | png_jpeg_a4, |
454 | png_jpeg_a8, |
455 | #endif |
456 | #ifndef MNG_NO_16BIT_SUPPORT |
457 | png_g16, |
458 | png_ga16, |
459 | png_rgb16, |
460 | png_rgba16, |
461 | #ifdef MNG_INCLUDE_JNG |
462 | png_jpeg_a16, |
463 | #endif |
464 | #endif |
465 | png_none |
466 | }; |
467 | |
468 | typedef enum png_imgtypes png_imgtype; |
469 | #endif |
470 | /* ************************************************************************** */ |
471 | |
472 | /* memory management callbacks */ |
473 | typedef mng_ptr (MNG_DECL *mng_memalloc) (mng_size_t iLen); |
474 | typedef void (MNG_DECL *mng_memfree) (mng_ptr iPtr, |
475 | mng_size_t iLen); |
476 | |
477 | typedef void (MNG_DECL *mng_releasedata) (mng_ptr pUserdata, |
478 | mng_ptr pData, |
479 | mng_size_t iLength); |
480 | |
481 | /* I/O management callbacks */ |
482 | #ifndef MNG_NO_OPEN_CLOSE_STREAM |
483 | typedef mng_bool (MNG_DECL *mng_openstream) (mng_handle hHandle); |
484 | typedef mng_bool (MNG_DECL *mng_closestream) (mng_handle hHandle); |
485 | #endif |
486 | typedef mng_bool (MNG_DECL *mng_readdata) (mng_handle hHandle, |
487 | mng_ptr pBuf, |
488 | mng_uint32 iBuflen, |
489 | mng_uint32p pRead); |
490 | typedef mng_bool (MNG_DECL *mng_writedata) (mng_handle hHandle, |
491 | mng_ptr pBuf, |
492 | mng_uint32 iBuflen, |
493 | mng_uint32p pWritten); |
494 | |
495 | /* error & trace processing callbacks */ |
496 | typedef mng_bool (MNG_DECL *mng_errorproc) (mng_handle hHandle, |
497 | mng_int32 iErrorcode, |
498 | mng_int8 iSeverity, |
499 | mng_chunkid iChunkname, |
500 | mng_uint32 iChunkseq, |
501 | mng_int32 iExtra1, |
502 | mng_int32 iExtra2, |
503 | mng_pchar zErrortext); |
504 | typedef mng_bool (MNG_DECL *mng_traceproc) (mng_handle hHandle, |
505 | mng_int32 iFuncnr, |
506 | mng_int32 iFuncseq, |
507 | mng_pchar zFuncname); |
508 | |
509 | /* read processing callbacks */ |
510 | typedef mng_bool (MNG_DECL *mng_processheader) (mng_handle hHandle, |
511 | mng_uint32 iWidth, |
512 | mng_uint32 iHeight); |
513 | typedef mng_bool (MNG_DECL *mng_processtext) (mng_handle hHandle, |
514 | mng_uint8 iType, |
515 | mng_pchar zKeyword, |
516 | mng_pchar zText, |
517 | mng_pchar zLanguage, |
518 | mng_pchar zTranslation); |
519 | typedef mng_bool (MNG_DECL *mng_processsave) (mng_handle hHandle); |
520 | typedef mng_bool (MNG_DECL *mng_processseek) (mng_handle hHandle, |
521 | mng_pchar zName); |
522 | typedef mng_bool (MNG_DECL *mng_processneed) (mng_handle hHandle, |
523 | mng_pchar zKeyword); |
524 | typedef mng_bool (MNG_DECL *mng_processmend) (mng_handle hHandle, |
525 | mng_uint32 iIterationsdone, |
526 | mng_uint32 iIterationsleft); |
527 | typedef mng_bool (MNG_DECL *mng_processunknown) (mng_handle hHandle, |
528 | mng_chunkid iChunkid, |
529 | mng_uint32 iRawlen, |
530 | mng_ptr pRawdata); |
531 | typedef mng_bool (MNG_DECL *mng_processterm) (mng_handle hHandle, |
532 | mng_uint8 iTermaction, |
533 | mng_uint8 iIteraction, |
534 | mng_uint32 iDelay, |
535 | mng_uint32 iItermax); |
536 | |
537 | /* display processing callbacks */ |
538 | typedef mng_ptr (MNG_DECL *mng_getcanvasline) (mng_handle hHandle, |
539 | mng_uint32 iLinenr); |
540 | typedef mng_ptr (MNG_DECL *mng_getbkgdline) (mng_handle hHandle, |
541 | mng_uint32 iLinenr); |
542 | typedef mng_ptr (MNG_DECL *mng_getalphaline) (mng_handle hHandle, |
543 | mng_uint32 iLinenr); |
544 | typedef mng_bool (MNG_DECL *mng_refresh) (mng_handle hHandle, |
545 | mng_uint32 iX, |
546 | mng_uint32 iY, |
547 | mng_uint32 iWidth, |
548 | mng_uint32 iHeight); |
549 | |
550 | /* timer management callbacks */ |
551 | typedef mng_uint32 (MNG_DECL *mng_gettickcount) (mng_handle hHandle); |
552 | typedef mng_bool (MNG_DECL *mng_settimer) (mng_handle hHandle, |
553 | mng_uint32 iMsecs); |
554 | |
555 | /* color management callbacks */ |
556 | typedef mng_bool (MNG_DECL *mng_processgamma) (mng_handle hHandle, |
557 | mng_uint32 iGamma); |
558 | typedef mng_bool (MNG_DECL *mng_processchroma) (mng_handle hHandle, |
559 | mng_uint32 iWhitepointx, |
560 | mng_uint32 iWhitepointy, |
561 | mng_uint32 iRedx, |
562 | mng_uint32 iRedy, |
563 | mng_uint32 iGreenx, |
564 | mng_uint32 iGreeny, |
565 | mng_uint32 iBluex, |
566 | mng_uint32 iBluey); |
567 | typedef mng_bool (MNG_DECL *mng_processsrgb) (mng_handle hHandle, |
568 | mng_uint8 iRenderingintent); |
569 | typedef mng_bool (MNG_DECL *mng_processiccp) (mng_handle hHandle, |
570 | mng_uint32 iProfilesize, |
571 | mng_ptr pProfile); |
572 | typedef mng_bool (MNG_DECL *mng_processarow) (mng_handle hHandle, |
573 | mng_uint32 iRowsamples, |
574 | mng_bool bIsRGBA16, |
575 | mng_ptr pRow); |
576 | |
577 | /* chunk access callback(s) */ |
578 | typedef mng_bool (MNG_DECL *mng_iteratechunk) (mng_handle hHandle, |
579 | mng_handle hChunk, |
580 | mng_chunkid iChunkid, |
581 | mng_uint32 iChunkseq); |
582 | |
583 | /* ************************************************************************** */ |
584 | |
585 | #endif /* _libmng_types_h_ */ |
586 | |
587 | /* ************************************************************************** */ |
588 | /* * end of file * */ |
589 | /* ************************************************************************** */ |
590 | |
591 |
Warning: That file was not part of the compilation database. It may have many parsing errors.