PageRenderTime 41ms CodeModel.GetById 19ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

/src/FreeImage/Source/LibMNG/libmng_types.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 574 lines | 324 code | 73 blank | 177 comment | 12 complexity | 45b4515acf810cb9fc4bcb571847b3ea MD5 | raw file
  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
155#ifdef WIN32                           /* only include needed stuff */
156#ifndef WIN32_LEAN_AND_MEAN
157#define WIN32_LEAN_AND_MEAN
158#endif
159#endif
160
161#ifdef MNG_USE_DLL
162#ifdef MNG_SKIP_ZLIB
163#undef MNG_INCLUDE_ZLIB
164#endif
165#ifdef MNG_SKIP_LCMS
166#undef MNG_INCLUDE_LCMS
167#endif
168#ifdef MNG_SKIP_IJG6B
169#undef MNG_INCLUDE_IJG6B
170#endif
171#endif
172
173#ifdef MNG_INCLUDE_ZLIB                /* zlib by Mark Adler & Jean-loup Gailly */
174#include <zlib.h>
175#endif
176
177#ifdef MNG_INCLUDE_LCMS                /* little cms by Marti Maria Saguer */
178#ifndef ZLIB_DLL
179#undef FAR
180#endif
181#include <lcms.h>
182#endif /* MNG_INCLUDE_LCMS */
183
184#ifdef MNG_INCLUDE_IJG6B               /* IJG's jpgsrc6b */
185#include <stdio.h>
186#ifdef MNG_USE_SETJMP
187#include <setjmp.h>                    /* needed for error-recovery (blergh) */
188#else
189#ifdef WIN32
190#define USE_WINDOWS_MESSAGEBOX         /* display a messagebox under Windoze */
191#endif
192#endif /* MNG_USE_SETJMP */
193#ifdef FAR
194#undef FAR                             /* possibly defined by zlib or lcms */
195#endif
196#define JPEG_INTERNAL_OPTIONS          /* for RGB_PIXELSIZE */
197#include "../LibJPEG/jpeglib.h"        /* all that for JPEG support  :-) */
198#endif /* MNG_INCLUDE_IJG6B */
199
200#if defined(MNG_INTERNAL_MEMMNGMT) || defined(MNG_INCLUDE_FILTERS)
201#include <stdlib.h>                    /* "calloc" & "free" & "abs" */
202#endif
203
204#include <limits.h>                    /* get proper integer widths */
205
206#ifdef WIN32
207#if defined __BORLANDC__
208#include <mem.h>                       /* defines "memcpy" for BCB */
209#else
210#include <memory.h>                    /* defines "memcpy" for other win32 platforms */
211#endif
212#include <string.h>                    /* "strncmp" + "strcmp" */
213#else /* WIN32 */
214#ifdef BSD
215#include <strings.h>                   /* defines "memcpy", etc for BSD (?) */
216#else
217#include <string.h>                    /* defines "memcpy", etc for all others (???) */
218#endif
219#endif /* WIN32 */
220
221#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
222#include <math.h>                      /* fp gamma-calculation */
223#endif
224
225/* ************************************************************************** */
226/* *                                                                        * */
227/* * Platform-dependant stuff                                               * */
228/* *                                                                        * */
229/* ************************************************************************** */
230
231/* TODO: this may require some elaboration for other platforms;
232   only works with BCB for now */
233
234#ifndef MNG_DLL
235#if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
236#define MNG_DLL
237#endif
238#endif
239
240#define MNG_LOCAL static
241
242#if defined(MNG_DLL) && defined(WIN32) /* setup DLL calling conventions */ 
243#define MNG_DECL __stdcall
244#if defined(MNG_BUILD_DLL)
245#define MNG_EXT __declspec(dllexport)
246#elif defined(MNG_USE_DLL)
247#define MNG_EXT __declspec(dllimport)
248#else
249#define MNG_EXT
250#endif
251#ifdef MNG_STRICT_ANSI
252#undef MNG_STRICT_ANSI                 /* can't do strict-ANSI with this DLL-stuff */
253#endif
254#else
255#define MNG_DECL                       /* dummies for non-DLL */
256#define MNG_EXT
257#endif /* MNG_DLL && WIN32 */
258
259#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
260#pragma option -A                      /* now force ANSI-C from here on */
261#endif
262
263/* ************************************************************************** */
264
265#if USHRT_MAX == 0xffffffffU                     /* get the proper 32-bit width !!! */
266typedef unsigned short   mng_uint32;
267typedef signed   short   mng_int32;
268#elif UINT_MAX == 0xffffffffU
269typedef unsigned int     mng_uint32;
270typedef signed   int     mng_int32;
271#elif ULONG_MAX == 0xffffffffU
272typedef unsigned long    mng_uint32;
273typedef signed   long    mng_int32;
274#else
275#error "Sorry, I can't find any 32-bit integers on this platform."
276#endif
277
278typedef signed   short   mng_int16;              /* other basic integers */
279typedef unsigned short   mng_uint16;
280typedef signed   char    mng_int8;
281typedef unsigned char    mng_uint8;
282
283typedef double           mng_float;              /* basic float */
284
285typedef size_t           mng_size_t;             /* size field for memory allocation */
286
287typedef char *           mng_pchar;              /* string */
288typedef void *           mng_ptr;                /* generic pointer */
289typedef void             (*mng_fptr) (void);     /* generic function pointer */
290
291/* ************************************************************************** */
292/* *                                                                        * */
293/* * Platform-independant from here                                         * */
294/* *                                                                        * */
295/* ************************************************************************** */
296
297typedef mng_uint32 *     mng_uint32p;            /* pointer to unsigned longs */
298typedef mng_int32 *      mng_int32p;             /* pointer to longs */
299typedef mng_uint16 *     mng_uint16p;            /* pointer to unsigned words */
300typedef mng_uint8 *      mng_uint8p;             /* pointer to unsigned bytes */
301
302typedef mng_int8         mng_bool;               /* booleans */
303
304struct mng_data_struct;
305typedef struct mng_data_struct * mng_handle;     /* generic handle */
306
307typedef mng_int32        mng_retcode;            /* generic return code */
308typedef mng_int32        mng_chunkid;            /* 4-byte chunkname identifier */
309typedef mng_ptr          mng_chunkp;             /* pointer to a chunk-structure */
310typedef mng_ptr          mng_objectp;            /* pointer to an object-structure */
311
312typedef mng_chunkid *    mng_chunkidp;           /* pointer to chunkid */
313
314typedef struct {                                 /* 8-bit palette element */
315          mng_uint8 iRed;
316          mng_uint8 iGreen;
317          mng_uint8 iBlue;
318        } mng_palette8e;
319typedef mng_palette8e   mng_palette8[256];       /* 8-bit palette */
320typedef mng_palette8e * mng_palette8ep;
321
322typedef mng_uint8       mng_uint8arr[256];       /* generic arrays */
323typedef mng_uint8       mng_uint8arr4[4];
324typedef mng_uint16      mng_uint16arr[256];
325typedef mng_uint32      mng_uint32arr2[2];
326
327/* ************************************************************************** */
328
329#define MNG_FALSE 0
330#define MNG_TRUE  1
331#define MNG_NULL  0
332
333#define MNG_SUSPENDBUFFERSIZE  32768
334#define MNG_SUSPENDREQUESTSIZE  1024
335
336/* ************************************************************************** */
337
338#ifdef MNG_INCLUDE_ZLIB
339
340/* size of temporary zlib buffer for deflate processing */
341#define MNG_ZLIB_MAXBUF     8192
342
343/* default zlib compression parameters for deflateinit2 */
344#define MNG_ZLIB_LEVEL      9                    /* level */
345#define MNG_ZLIB_METHOD     Z_DEFLATED           /* method */
346#define MNG_ZLIB_WINDOWBITS 15                   /* window size */
347#define MNG_ZLIB_MEMLEVEL   9                    /* memory level */
348#define MNG_ZLIB_STRATEGY   Z_DEFAULT_STRATEGY   /* strategy */
349
350#define MNG_MAX_IDAT_SIZE   4096                 /* maximum size of IDAT data */
351
352#endif /* MNG_INCLUDE_ZLIB */
353
354/* ************************************************************************** */
355
356#ifdef MNG_INCLUDE_JNG
357
358#ifdef MNG_INCLUDE_IJG6B                         /* IJG helper defs */
359typedef struct jpeg_compress_struct   mngjpeg_comp;
360typedef struct jpeg_decompress_struct mngjpeg_decomp;
361typedef struct jpeg_error_mgr         mngjpeg_error;
362typedef struct jpeg_source_mgr        mngjpeg_source;
363
364typedef mngjpeg_comp   * mngjpeg_compp;
365typedef mngjpeg_decomp * mngjpeg_decompp;
366typedef mngjpeg_error  * mngjpeg_errorp;
367typedef mngjpeg_source * mngjpeg_sourcep;
368
369typedef J_DCT_METHOD     mngjpeg_dctmethod;
370
371/* default IJG parameters for compression */
372#define MNG_JPEG_DCT         JDCT_DEFAULT        /* DCT algorithm (JDCT_ISLOW) */
373#define MNG_JPEG_QUALITY     100                 /* quality 0..100; 100=best */
374#define MNG_JPEG_SMOOTHING   0                   /* default no smoothing */
375#define MNG_JPEG_PROGRESSIVE MNG_FALSE           /* default is just baseline */
376#define MNG_JPEG_OPTIMIZED   MNG_FALSE           /* default is not optimized */
377#endif /* MNG_INCLUDE_IJG6B */
378
379#define MNG_JPEG_MAXBUF      65500               /* max size of temp JPEG buffer */
380#define MNG_MAX_JDAT_SIZE    4096                /* maximum size of JDAT data */
381
382#endif /* MNG_INCLUDE_JNG */
383
384/* ************************************************************************** */
385
386#ifdef MNG_INCLUDE_LCMS
387typedef cmsHPROFILE         mng_cmsprof;         /* little CMS helper defs */
388typedef cmsHTRANSFORM       mng_cmstrans;
389typedef cmsCIExyY           mng_CIExyY;
390typedef cmsCIExyYTRIPLE     mng_CIExyYTRIPLE;
391typedef LPGAMMATABLE        mng_gammatabp;
392#endif /* MNG_INCLUDE_LCMS */
393
394/* ************************************************************************** */
395
396                                       /* enumeration of known graphics types */
397enum mng_imgtypes {mng_it_unknown, mng_it_png, mng_it_mng, mng_it_jng
398#ifdef MNG_INCLUDE_MPNG_PROPOSAL
399     ,mng_it_mpng
400#endif     
401#ifdef MNG_INCLUDE_ANG_PROPOSAL
402     ,mng_it_ang
403#endif
404     };
405typedef enum mng_imgtypes mng_imgtype;
406
407                                       /* enumeration of animation speed-types */
408enum mng_speedtypes {mng_st_normal, mng_st_fast, mng_st_slow, mng_st_slowest};
409typedef enum mng_speedtypes mng_speedtype;
410
411#ifdef MNG_OPTIMIZE_CHUNKREADER
412                                       /* enumeration object-creation indicators */
413enum mng_createobjtypes {mng_create_none, mng_create_always, mng_create_ifglobal};
414typedef enum mng_createobjtypes mng_createobjtype;
415#endif
416
417/* ************************************************************************** */
418
419/* enumeration of PNG image types */
420#ifdef MNG_OPTIMIZE_FOOTPRINT_INIT
421enum png_imgtypes
422  {
423    png_g1,
424    png_g2,
425    png_g4,
426    png_g8,
427    png_rgb8,
428    png_idx1,
429    png_idx2,
430    png_idx4,
431    png_idx8,
432    png_ga8,
433    png_rgba8,
434#ifdef MNG_INCLUDE_JNG
435    png_jpeg_a1,
436    png_jpeg_a2,
437    png_jpeg_a4,
438    png_jpeg_a8,
439#endif
440#ifndef MNG_NO_16BIT_SUPPORT
441    png_g16,
442    png_ga16,
443    png_rgb16,
444    png_rgba16,
445#ifdef MNG_INCLUDE_JNG
446    png_jpeg_a16,
447#endif
448#endif
449    png_none
450  };
451    
452typedef enum png_imgtypes png_imgtype;
453#endif
454/* ************************************************************************** */
455
456                                       /* memory management callbacks */
457typedef mng_ptr    (MNG_DECL *mng_memalloc)      (mng_size_t  iLen);
458typedef void       (MNG_DECL *mng_memfree)       (mng_ptr     iPtr,
459                                                  mng_size_t  iLen);
460
461typedef void       (MNG_DECL *mng_releasedata)   (mng_ptr     pUserdata,
462                                                  mng_ptr     pData,
463                                                  mng_size_t  iLength);
464
465                                       /* I/O management callbacks */
466#ifndef MNG_NO_OPEN_CLOSE_STREAM
467typedef mng_bool   (MNG_DECL *mng_openstream)    (mng_handle  hHandle);
468typedef mng_bool   (MNG_DECL *mng_closestream)   (mng_handle  hHandle);
469#endif
470typedef mng_bool   (MNG_DECL *mng_readdata)      (mng_handle  hHandle,
471                                                  mng_ptr     pBuf,
472                                                  mng_uint32  iBuflen,
473                                                  mng_uint32p pRead);
474typedef mng_bool   (MNG_DECL *mng_writedata)     (mng_handle  hHandle,
475                                                  mng_ptr     pBuf,
476                                                  mng_uint32  iBuflen,
477                                                  mng_uint32p pWritten);
478
479                                       /* error & trace processing callbacks */
480typedef mng_bool   (MNG_DECL *mng_errorproc)     (mng_handle  hHandle,
481                                                  mng_int32   iErrorcode,
482                                                  mng_int8    iSeverity,
483                                                  mng_chunkid iChunkname,
484                                                  mng_uint32  iChunkseq,
485                                                  mng_int32   iExtra1,
486                                                  mng_int32   iExtra2,
487                                                  mng_pchar   zErrortext);
488typedef mng_bool   (MNG_DECL *mng_traceproc)     (mng_handle  hHandle,
489                                                  mng_int32   iFuncnr,
490                                                  mng_int32   iFuncseq,
491                                                  mng_pchar   zFuncname);
492
493                                       /* read processing callbacks */
494typedef mng_bool   (MNG_DECL *mng_processheader) (mng_handle  hHandle,
495                                                  mng_uint32  iWidth,
496                                                  mng_uint32  iHeight);
497typedef mng_bool   (MNG_DECL *mng_processtext)   (mng_handle  hHandle,
498                                                  mng_uint8   iType,
499                                                  mng_pchar   zKeyword,
500                                                  mng_pchar   zText,
501                                                  mng_pchar   zLanguage,
502                                                  mng_pchar   zTranslation);
503typedef mng_bool   (MNG_DECL *mng_processsave)   (mng_handle  hHandle);
504typedef mng_bool   (MNG_DECL *mng_processseek)   (mng_handle  hHandle,
505                                                  mng_pchar   zName);
506typedef mng_bool   (MNG_DECL *mng_processneed)   (mng_handle  hHandle,
507                                                  mng_pchar   zKeyword);
508typedef mng_bool   (MNG_DECL *mng_processmend)   (mng_handle  hHandle,
509                                                  mng_uint32  iIterationsdone,
510                                                  mng_uint32  iIterationsleft);
511typedef mng_bool   (MNG_DECL *mng_processunknown) (mng_handle  hHandle,
512                                                   mng_chunkid iChunkid,
513                                                   mng_uint32  iRawlen,
514                                                   mng_ptr     pRawdata);
515typedef mng_bool   (MNG_DECL *mng_processterm)   (mng_handle  hHandle,
516                                                  mng_uint8   iTermaction,
517                                                  mng_uint8   iIteraction,
518                                                  mng_uint32  iDelay,
519                                                  mng_uint32  iItermax);
520
521                                       /* display processing callbacks */
522typedef mng_ptr    (MNG_DECL *mng_getcanvasline) (mng_handle  hHandle,
523                                                  mng_uint32  iLinenr);
524typedef mng_ptr    (MNG_DECL *mng_getbkgdline)   (mng_handle  hHandle,
525                                                  mng_uint32  iLinenr);
526typedef mng_ptr    (MNG_DECL *mng_getalphaline)  (mng_handle  hHandle,
527                                                  mng_uint32  iLinenr);
528typedef mng_bool   (MNG_DECL *mng_refresh)       (mng_handle  hHandle,
529                                                  mng_uint32  iX,
530                                                  mng_uint32  iY,
531                                                  mng_uint32  iWidth,
532                                                  mng_uint32  iHeight);
533
534                                       /* timer management callbacks */
535typedef mng_uint32 (MNG_DECL *mng_gettickcount)  (mng_handle  hHandle);
536typedef mng_bool   (MNG_DECL *mng_settimer)      (mng_handle  hHandle,
537                                                  mng_uint32  iMsecs);
538
539                                       /* color management callbacks */
540typedef mng_bool   (MNG_DECL *mng_processgamma)  (mng_handle  hHandle,
541                                                  mng_uint32  iGamma);
542typedef mng_bool   (MNG_DECL *mng_processchroma) (mng_handle  hHandle,
543                                                  mng_uint32  iWhitepointx,
544                                                  mng_uint32  iWhitepointy,
545                                                  mng_uint32  iRedx,
546                                                  mng_uint32  iRedy,
547                                                  mng_uint32  iGreenx,
548                                                  mng_uint32  iGreeny,
549                                                  mng_uint32  iBluex,
550                                                  mng_uint32  iBluey);
551typedef mng_bool   (MNG_DECL *mng_processsrgb)   (mng_handle  hHandle,
552                                                  mng_uint8   iRenderingintent);
553typedef mng_bool   (MNG_DECL *mng_processiccp)   (mng_handle  hHandle,
554                                                  mng_uint32  iProfilesize,
555                                                  mng_ptr     pProfile);
556typedef mng_bool   (MNG_DECL *mng_processarow)   (mng_handle  hHandle,
557                                                  mng_uint32  iRowsamples,
558                                                  mng_bool    bIsRGBA16,
559                                                  mng_ptr     pRow);
560
561                                       /* chunk access callback(s) */
562typedef mng_bool   (MNG_DECL *mng_iteratechunk)  (mng_handle  hHandle,
563                                                  mng_handle  hChunk,
564                                                  mng_chunkid iChunkid,
565                                                  mng_uint32  iChunkseq);
566
567/* ************************************************************************** */
568
569#endif /* _libmng_types_h_ */
570
571/* ************************************************************************** */
572/* * end of file                                                            * */
573/* ************************************************************************** */
574