Eneboo - Documentación para desarrolladores
src/qt/src/3rdparty/libmng/libmng.h
Ir a la documentación de este archivo.
00001 /* ************************************************************************** */
00002 /* *                                                                        * */
00003 /* * COPYRIGHT NOTICE:                                                      * */
00004 /* *                                                                        * */
00005 /* * Copyright (c) 2000-2002 Gerard Juyn (gerard@libmng.com)                * */
00006 /* * [You may insert additional notices after this sentence if you modify   * */
00007 /* *  this source]                                                          * */
00008 /* *                                                                        * */
00009 /* * For the purposes of this copyright and license, "Contributing Authors" * */
00010 /* * is defined as the following set of individuals:                        * */
00011 /* *                                                                        * */
00012 /* *    Gerard Juyn (gerard@libmng.com)                                     * */
00013 /* *                                                                        * */
00014 /* * The MNG Library is supplied "AS IS".  The Contributing Authors         * */
00015 /* * disclaim all warranties, expressed or implied, including, without      * */
00016 /* * limitation, the warranties of merchantability and of fitness for any   * */
00017 /* * purpose.  The Contributing Authors assume no liability for direct,     * */
00018 /* * indirect, incidental, special, exemplary, or consequential damages,    * */
00019 /* * which may result from the use of the MNG Library, even if advised of   * */
00020 /* * the possibility of such damage.                                        * */
00021 /* *                                                                        * */
00022 /* * Permission is hereby granted to use, copy, modify, and distribute this * */
00023 /* * source code, or portions hereof, for any purpose, without fee, subject * */
00024 /* * to the following restrictions:                                         * */
00025 /* *                                                                        * */
00026 /* * 1. The origin of this source code must not be misrepresented;          * */
00027 /* *    you must not claim that you wrote the original software.            * */
00028 /* *                                                                        * */
00029 /* * 2. Altered versions must be plainly marked as such and must not be     * */
00030 /* *    misrepresented as being the original source.                        * */
00031 /* *                                                                        * */
00032 /* * 3. This Copyright notice may not be removed or altered from any source * */
00033 /* *    or altered source distribution.                                     * */
00034 /* *                                                                        * */
00035 /* * The Contributing Authors specifically permit, without fee, and         * */
00036 /* * encourage the use of this source code as a component to supporting     * */
00037 /* * the MNG and JNG file format in commercial products.  If you use this   * */
00038 /* * source code in a product, acknowledgment would be highly appreciated.  * */
00039 /* *                                                                        * */
00040 /* ************************************************************************** */
00041 /* *                                                                        * */
00042 /* * Parts of this software have been adapted from the libpng package.      * */
00043 /* * Although this library supports all features from the PNG specification * */
00044 /* * (as MNG descends from it) it does not require the libpng package.      * */
00045 /* * It does require the zlib library and optionally the IJG jpeg library,  * */
00046 /* * and/or the "little-cms" library by Marti Maria (depending on the       * */
00047 /* * inclusion of support for JNG and Full-Color-Management respectively.   * */
00048 /* *                                                                        * */
00049 /* * This library's function is primarily to read and display MNG           * */
00050 /* * animations. It is not meant as a full-featured image-editing           * */
00051 /* * component! It does however offer creation and editing functionality    * */
00052 /* * at the chunk level.                                                    * */
00053 /* * (future modifications may include some more support for creation       * */
00054 /* *  and or editing)                                                       * */
00055 /* *                                                                        * */
00056 /* ************************************************************************** */
00057 
00058 /* ************************************************************************** */
00059 /* *                                                                        * */
00060 /* * Version numbering                                                      * */
00061 /* *                                                                        * */
00062 /* * X.Y.Z : X = release (0 = initial build)                                * */
00063 /* *         Y = major version (uneven = test; even = production)           * */
00064 /* *         Z = minor version (bugfixes; 2 is older than 10)               * */
00065 /* *                                                                        * */
00066 /* * production versions only appear when a test-version is extensively     * */
00067 /* * tested and found stable or for intermediate bug-fixes (recognized by   * */
00068 /* * a change in the Z number)                                              * */
00069 /* *                                                                        * */
00070 /* * x.1.x      = test version                                              * */
00071 /* * x.2.x      = production version                                        * */
00072 /* * x.3.x      = test version                                              * */
00073 /* * x.4.x      = production version                                        * */
00074 /* *  etc.                                                                  * */
00075 /* *                                                                        * */
00076 /* ************************************************************************** */
00077 /* *                                                                        * */
00078 /* * Identifier naming conventions throughout this library                  * */
00079 /* *                                                                        * */
00080 /* * iXxxx      = an integer                                                * */
00081 /* * dXxxx      = a float                                                   * */
00082 /* * pXxxx      = a pointer                                                 * */
00083 /* * bXxxx      = a boolean                                                 * */
00084 /* * eXxxx      = an enumeration                                            * */
00085 /* * hXxxx      = a handle                                                  * */
00086 /* * zXxxx      = a zero-terminated string (pchar)                          * */
00087 /* * fXxxx      = a pointer to a function (callback)                        * */
00088 /* * aXxxx      = an array                                                  * */
00089 /* * sXxxx      = a structure                                               * */
00090 /* *                                                                        * */
00091 /* * Macros & defines are in all uppercase.                                 * */
00092 /* * Functions & typedefs in all lowercase.                                 * */
00093 /* * Exported stuff is prefixed with MNG_ or mng_ respectively.             * */
00094 /* *                                                                        * */
00095 /* * (I may have missed a couple; don't hesitate to let me know!)           * */
00096 /* *                                                                        * */
00097 /* ************************************************************************** */
00098 
00099 /* ************************************************************************** */
00100 /* *                                                                        * */
00101 /* * project   : libmng                                                     * */
00102 /* * file      : libmng.h                  copyright (c) 2000-2002 G.Juyn   * */
00103 /* * version   : 1.0.4                                                      * */
00104 /* *                                                                        * */
00105 /* * purpose   : main application interface                                 * */
00106 /* *                                                                        * */
00107 /* * author    : G.Juyn                                                     * */
00108 /* * web       : http://www.3-t.com                                         * */
00109 /* * email     : mailto:info@3-t.com                                        * */
00110 /* *                                                                        * */
00111 /* * comment   : The main application interface. An application should not  * */
00112 /* *             need access to any of the other modules!                   * */
00113 /* *                                                                        * */
00114 /* * changes   : 0.5.1 - 05/06/2000 - G.Juyn                                * */
00115 /* *             - changed chunk iteration function                         * */
00116 /* *             0.5.1 - 05/08/2000 - G.Juyn                                * */
00117 /* *             - added chunk access functions                             * */
00118 /* *             - added version control constants & functions              * */
00119 /* *             - changed strict-ANSI stuff                                * */
00120 /* *             0.5.1 - 05/11/2000 - G.Juyn                                * */
00121 /* *             - added set_outputprofile2 & set_srgbprofile2              * */
00122 /* *             - added empty-chunk put-routines                           * */
00123 /* *             0.5.1 - 05/12/2000 - G.Juyn                                * */
00124 /* *             - added version_dll & VERSION_DLL (for consistency)        * */
00125 /* *             - added version control explanatory text & samples         * */
00126 /* *             0.5.1 - 05/15/2000 - G.Juyn                                * */
00127 /* *             - added getimgdata & putimgdata functions                  * */
00128 /* *                                                                        * */
00129 /* *             0.5.2 - 05/16/2000 - G.Juyn                                * */
00130 /* *             - changed the version parameters (obviously)               * */
00131 /* *             0.5.2 - 05/18/2000 - G.Juyn                                * */
00132 /* *             - complimented constants for chunk-property values         * */
00133 /* *             0.5.2 - 05/23/2000 - G.Juyn                                * */
00134 /* *             - fixed MNG_UINT_pHYg value                                * */
00135 /* *             0.5.2 - 05/24/2000 - G.Juyn                                * */
00136 /* *             - added support for get/set default zlib/IJG parms         * */
00137 /* *             0.5.2 - 06/02/2000 - G.Juyn                                * */
00138 /* *             - added MNG_BIGENDIAN_SUPPORT (contributed by Tim Rowley)  * */
00139 /* *             - separated configuration-options into "mng_conf.h"        * */
00140 /* *             - added RGB8_A8 canvasstyle                                * */
00141 /* *             - added getalphaline callback for RGB8_A8 canvasstyle      * */
00142 /* *             0.5.2 - 06/06/2000 - G.Juyn                                * */
00143 /* *             - moved errorcodes from "mng_error.h"                      * */
00144 /* *             - added mng_read_resume function to support                * */
00145 /* *               read-suspension                                          * */
00146 /* *                                                                        * */
00147 /* *             0.5.3 - 06/16/2000 - G.Juyn                                * */
00148 /* *             - changed the version parameters (obviously)               * */
00149 /* *             0.5.3 - 06/21/2000 - G.Juyn                                * */
00150 /* *             - added get/set for speedtype to facilitate testing        * */
00151 /* *             - added get for imagelevel during processtext callback     * */
00152 /* *             0.5.3 - 06/24/2000 - G.Juyn                                * */
00153 /* *             - fixed inclusion of IJG read/write code                   * */
00154 /* *             0.5.3 - 06/26/2000 - G.Juyn                                * */
00155 /* *             - changed userdata variable to mng_ptr                     * */
00156 /* *                                                                        * */
00157 /* *             0.9.0 - 06/30/2000 - G.Juyn                                * */
00158 /* *             - changed refresh parameters to 'x,y,width,height'         * */
00159 /* *                                                                        * */
00160 /* *             0.9.1 - 07/06/2000 - G.Juyn                                * */
00161 /* *             - added MNG_NEEDTIMERWAIT errorcode                        * */
00162 /* *             - changed comments to indicate modified behavior for       * */
00163 /* *               timer & suspension breaks                                * */
00164 /* *             0.9.1 - 07/08/2000 - G.Juyn                                * */
00165 /* *             - added get routines for internal display variables        * */
00166 /* *             - added get/set routines for suspensionmode variable       * */
00167 /* *             0.9.1 - 07/15/2000 - G.Juyn                                * */
00168 /* *             - added callbacks for SAVE/SEEK processing                 * */
00169 /* *             - added get/set routines for sectionbreak variable         * */
00170 /* *             - added NEEDSECTIONWAIT errorcode                          * */
00171 /* *             0.9.1 - 07/19/2000 - G.Juyn                                * */
00172 /* *             - added function to set frame-/layer-count & playtime      * */
00173 /* *             - added errorcode for updatemngheader if not a MNG         * */
00174 /* *                                                                        * */
00175 /* *             0.9.2 - 07/31/2000 - G.Juyn                                * */
00176 /* *             - fixed problem with trace-functions improperly wrapped    * */
00177 /* *             - added status_xxxx functions                              * */
00178 /* *             0.9.2 - 08/05/2000 - G.Juyn                                * */
00179 /* *             - changed file-prefixes                                    * */
00180 /* *             - added function to set simplicity field                   * */
00181 /* *                                                                        * */
00182 /* *             0.9.3 - 08/09/2000 - G.Juyn                                * */
00183 /* *             - added check for simplicity-bits in MHDR                  * */
00184 /* *             0.9.3 - 08/12/2000 - G.Juyn                                * */
00185 /* *             - added workaround for faulty PhotoShop iCCP chunk         * */
00186 /* *             0.9.3 - 08/26/2000 - G.Juyn                                * */
00187 /* *             - added MAGN chunk                                         * */
00188 /* *             0.9.3 - 09/07/2000 - G.Juyn                                * */
00189 /* *             - added support for new filter_types                       * */
00190 /* *             0.9.3 - 10/10/2000 - G.Juyn                                * */
00191 /* *             - added support for alpha-depth prediction                 * */
00192 /* *             0.9.3 - 10/11/2000 - G.Juyn                                * */
00193 /* *             - fixed processing of unknown critical chunks              * */
00194 /* *             - removed test-MaGN                                        * */
00195 /* *             - added PNG/MNG spec version indicators                    * */
00196 /* *             - added support for nEED                                   * */
00197 /* *             0.9.3 - 10/16/2000 - G.Juyn                                * */
00198 /* *             - added functions to retrieve PNG/JNG specific header-info * */
00199 /* *             - added JDAA chunk                                         * */
00200 /* *             0.9.3 - 10/17/2000 - G.Juyn                                * */
00201 /* *             - added callback to process non-critical unknown chunks    * */
00202 /* *             0.9.3 - 10/20/2000 - G.Juyn                                * */
00203 /* *             - added errocode for delayed delta-processing              * */
00204 /* *             - added get/set for bKGD preference setting                * */
00205 /* *             0.9.3 - 10/21/2000 - G.Juyn                                * */
00206 /* *             - added get function for interlace/progressive display     * */
00207 /* *                                                                        * */
00208 /* *             0.9.4 - 01/18/2001 - G.Juyn                                * */
00209 /* *             - added errorcode for MAGN methods                         * */
00210 /* *             - removed test filter-methods 1 & 65                       * */
00211 /* *                                                                        * */
00212 /* *             1.0.0 - 02/05/2001 - G.Juyn                                * */
00213 /* *             - version numbers (obviously)                              * */
00214 /* *                                                                        * */
00215 /* *             1.0.1 - 02/08/2001 - G.Juyn                                * */
00216 /* *             - added MEND processing callback                           * */
00217 /* *             1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly)              * */
00218 /* *             - added BGRA8 canvas with premultiplied alpha              * */
00219 /* *             1.0.1 - 05/02/2001 - G.Juyn                                * */
00220 /* *             - added "default" sRGB generation (Thanks Marti!)          * */
00221 /* *                                                                        * */
00222 /* *             1.0.2 - 06/23/2001 - G.Juyn                                * */
00223 /* *             - added optimization option for MNG-video playback         * */
00224 /* *             - added processterm callback                               * */
00225 /* *             1.0.2 - 06/25/2001 - G.Juyn                                * */
00226 /* *             - added late binding errorcode (not used internally)       * */
00227 /* *             - added option to turn off progressive refresh             * */
00228 /* *                                                                        * */
00229 /* *             1.0.3 - 08/06/2001 - G.Juyn                                * */
00230 /* *             - added get function for last processed BACK chunk         * */
00231 /* *                                                                        * */
00232 /* ************************************************************************** */
00233 
00234 #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
00235 #pragma option -A                      /* force ANSI-C */
00236 #endif
00237 
00238 #ifndef _libmng_h_
00239 #define _libmng_h_
00240 
00241 /* ************************************************************************** */
00242 
00243 #include "libmng_conf.h"               /* user-specific configuration options */
00244 
00245 /* ************************************************************************** */
00246 
00247 #define MNG_CHECK_BAD_ICCP             /* let's catch that sucker !!! */
00248 
00249 #ifdef MNG_SUPPORT_READ                /* dependencies based on user-configuration */
00250 #define MNG_INCLUDE_READ_PROCS
00251 #endif
00252 
00253 #ifdef MNG_SUPPORT_WRITE
00254 #define MNG_INCLUDE_WRITE_PROCS
00255 #endif
00256 
00257 #ifdef MNG_SUPPORT_DISPLAY
00258 #define MNG_INCLUDE_FILTERS
00259 #define MNG_INCLUDE_INTERLACE
00260 #define MNG_INCLUDE_OBJECTS
00261 #define MNG_INCLUDE_DISPLAY_PROCS
00262 #define MNG_INCLUDE_TIMING_PROCS
00263 #define MNG_INCLUDE_ZLIB
00264 #endif
00265 
00266 #ifdef MNG_STORE_CHUNKS
00267 #define MNG_INCLUDE_ZLIB
00268 #endif
00269 
00270 #ifdef MNG_SUPPORT_IJG6B
00271 #define MNG_INCLUDE_JNG
00272 #define MNG_INCLUDE_IJG6B
00273 #define MNG_USE_SETJMP
00274 #endif
00275 
00276 #ifdef MNG_INCLUDE_JNG
00277 #if defined(MNG_SUPPORT_DISPLAY) || defined(MNG_ACCESS_CHUNKS)
00278 #define MNG_INCLUDE_JNG_READ
00279 #endif
00280 #if defined(MNG_SUPPORT_WRITE) || defined(MNG_ACCESS_CHUNKS)
00281 #define MNG_INCLUDE_JNG_WRITE
00282 #endif
00283 #endif
00284 
00285 #ifdef MNG_FULL_CMS
00286 #define MNG_INCLUDE_LCMS
00287 #endif
00288 
00289 #ifdef MNG_AUTO_DITHER
00290 #define MNG_INCLUDE_DITHERING
00291 #endif
00292 
00293 #ifdef MNG_SUPPORT_TRACE
00294 #define MNG_INCLUDE_TRACE_PROCS
00295 #ifdef MNG_TRACE_TELLTALE
00296 #define MNG_INCLUDE_TRACE_STRINGS
00297 #endif
00298 #endif
00299 
00300 #ifdef MNG_ERROR_TELLTALE
00301 #define MNG_INCLUDE_ERROR_STRINGS
00302 #endif
00303 
00304 /* ************************************************************************** */
00305 
00306 #include "libmng_types.h"              /* platform-specific definitions
00307                                           and other assorted stuff */
00308 
00309 /* ************************************************************************** */
00310 
00311 #ifdef __cplusplus
00312 extern "C" {
00313 #endif
00314 
00315 /* ************************************************************************** */
00316 /* *                                                                        * */
00317 /* *  Versioning control                                                    * */
00318 /* *                                                                        * */
00319 /* *  version_so and version_dll will NOT reflect version_major;            * */
00320 /* *  these will only change for binary incompatible changes (which will    * */
00321 /* *  hopefully never occur)                                                * */
00322 /* *  note: they will be set to 1 on the first public release !!!           * */
00323 /* *                                                                        * */
00324 /* *  first public release:                                                 * */
00325 /* *  #define MNG_VERSION_TEXT    "1.0.0"                                   * */
00326 /* *  #define MNG_VERSION_SO      1       eg. libmng.so.1                   * */
00327 /* *  #define MNG_VERSION_DLL     1       eg. libmng.dll                    * */
00328 /* *  #define MNG_VERSION_MAJOR   1                                         * */
00329 /* *  #define MNG_VERSION_MINOR   0                                         * */
00330 /* *  #define MNG_VERSION_RELEASE 0                                         * */
00331 /* *                                                                        * */
00332 /* *  bug fix & cosmetics :                                                 * */
00333 /* *  #define MNG_VERSION_TEXT    "1.0.1"                                   * */
00334 /* *  #define MNG_VERSION_SO      1       eg. libmng.so.1                   * */
00335 /* *  #define MNG_VERSION_DLL     1       eg. libmng.dll                    * */
00336 /* *  #define MNG_VERSION_MAJOR   1                                         * */
00337 /* *  #define MNG_VERSION_MINOR   0                                         * */
00338 /* *  #define MNG_VERSION_RELEASE 1                                         * */
00339 /* *                                                                        * */
00340 /* *  feature change :                                                      * */
00341 /* *  #define MNG_VERSION_TEXT    "1.2.0"                                   * */
00342 /* *  #define MNG_VERSION_SO      1       eg. libmng.so.1                   * */
00343 /* *  #define MNG_VERSION_DLL     1       eg. libmng.dll                    * */
00344 /* *  #define MNG_VERSION_MAJOR   1                                         * */
00345 /* *  #define MNG_VERSION_MINOR   2                                         * */
00346 /* *  #define MNG_VERSION_RELEASE 0                                         * */
00347 /* *                                                                        * */
00348 /* *  major rewrite (still binary compatible) :                             * */
00349 /* *  #define MNG_VERSION_TEXT    "2.0.0"                                   * */
00350 /* *  #define MNG_VERSION_SO      1       eg. libmng.so.1                   * */
00351 /* *  #define MNG_VERSION_DLL     1       eg. libmng.dll                    * */
00352 /* *  #define MNG_VERSION_MAJOR   2                                         * */
00353 /* *  #define MNG_VERSION_MINOR   0                                         * */
00354 /* *  #define MNG_VERSION_RELEASE 0                                         * */
00355 /* *                                                                        * */
00356 /* *  binary incompatible change:                                           * */
00357 /* *  #define MNG_VERSION_TEXT    "13.0.0"                                  * */
00358 /* *  #define MNG_VERSION_SO      2       eg. libmng.so.2                   * */
00359 /* *  #define MNG_VERSION_DLL     2       eg. libmng2.dll                   * */
00360 /* *  #define MNG_VERSION_MAJOR   13                                        * */
00361 /* *  #define MNG_VERSION_MINOR   0                                         * */
00362 /* *  #define MNG_VERSION_RELEASE 0                                         * */
00363 /* *                                                                        * */
00364 /* *  note that version_so & version_dll will always remain equal so it     * */
00365 /* *  doesn't matter which one is called to do version-checking; they are   * */
00366 /* *  just provided for their target platform                               * */
00367 /* *                                                                        * */
00368 /* ************************************************************************** */
00369 
00370 #define MNG_VERSION_TEXT    "1.0.4"
00371 #define MNG_VERSION_SO      1          /* eg. libmng.so.1  */
00372 #define MNG_VERSION_DLL     1          /* but: libmng.dll (!) */
00373 #define MNG_VERSION_MAJOR   1
00374 #define MNG_VERSION_MINOR   0
00375 #define MNG_VERSION_RELEASE 4
00376 
00377 MNG_EXT mng_pchar MNG_DECL mng_version_text    (void);
00378 MNG_EXT mng_uint8 MNG_DECL mng_version_so      (void);
00379 MNG_EXT mng_uint8 MNG_DECL mng_version_dll     (void);
00380 MNG_EXT mng_uint8 MNG_DECL mng_version_major   (void);
00381 MNG_EXT mng_uint8 MNG_DECL mng_version_minor   (void);
00382 MNG_EXT mng_uint8 MNG_DECL mng_version_release (void);
00383 
00384 /* ************************************************************************** */
00385 /* *                                                                        * */
00386 /* *  MNG/PNG specification level conformance                               * */
00387 /* *                                                                        * */
00388 /* ************************************************************************** */
00389 
00390 #define MNG_PNG_VERSION     "1.2"
00391 #define MNG_PNG_VERSION_MAJ 1
00392 #define MNG_PNG_VERSION_MIN 2
00393 
00394 #define MNG_MNG_VERSION     "1.0"
00395 #define MNG_MNG_VERSION_MAJ 1
00396 #define MNG_MNG_VERSION_MIN 0
00397 #define MNG_MNG_DRAFT       99         /* deprecated;
00398                                           only used for nEED "MNG DRAFT nn" */
00399 
00400 /* ************************************************************************** */
00401 /* *                                                                        * */
00402 /* *  High-level application functions                                      * */
00403 /* *                                                                        * */
00404 /* ************************************************************************** */
00405 
00406 /* library initialization function */
00407 /* must be the first called before anything can be done at all */
00408 /* initializes internal datastructure(s) */
00409 MNG_EXT mng_handle  MNG_DECL mng_initialize      (mng_ptr       pUserdata,
00410                                                   mng_memalloc  fMemalloc,
00411                                                   mng_memfree   fMemfree,
00412                                                   mng_traceproc fTraceproc);
00413 
00414 /* library reset function */
00415 /* can be used to re-initialize the library, so another image can be
00416    processed. there's absolutely no harm in calling it, even when it's not
00417    really necessary */
00418 MNG_EXT mng_retcode MNG_DECL mng_reset           (mng_handle    hHandle);
00419 
00420 /* library cleanup function */
00421 /* must be the last called to clean up internal datastructure(s) */
00422 MNG_EXT mng_retcode MNG_DECL mng_cleanup         (mng_handle*   hHandle);
00423 
00424 /* high-level read functions */
00425 /* use mng_read if you simply want to read a Network Graphic */
00426 /* mng_read_resume is used in I/O-read-suspension scenarios, where the
00427    "readdata" callback may return FALSE & length=0 indicating it's buffer is
00428    depleted or too short to supply the required bytes, and the buffer needs
00429    to be refilled; libmng will return the errorcode MNG_NEEDMOREDATA telling
00430    the app to refill it's read-buffer after which it must call mng_read_resume
00431    (or mng_display_resume if it also displaying the image simultaneously) */
00432 #ifdef MNG_SUPPORT_READ
00433 MNG_EXT mng_retcode MNG_DECL mng_read            (mng_handle    hHandle);
00434 MNG_EXT mng_retcode MNG_DECL mng_read_resume     (mng_handle    hHandle);
00435 #endif
00436 
00437 /* high-level write & create functions */
00438 /* use this if you want to write a previously read Network Graphic or
00439    if you want to create a new graphic and write it */
00440 /* to write a previously read graphic you must have defined MNG_STORE_CHUNKS */
00441 /* to create a new graphic you'll also need access to the chunks
00442    (eg. #define MNG_ACCESS_CHUNKS !) */
00443 #ifdef MNG_SUPPORT_WRITE
00444 MNG_EXT mng_retcode MNG_DECL mng_write           (mng_handle    hHandle);
00445 MNG_EXT mng_retcode MNG_DECL mng_create          (mng_handle    hHandle);
00446 #endif
00447 
00448 /* high-level display functions */
00449 /* use these to display a previously read or created graphic or
00450    to read & display a graphic simultaneously */
00451 /* mng_display_resume should be called after a timer-interval
00452    expires that was set through the settimer-callback, after a
00453    read suspension-break, or, to resume an animation after a call
00454    to mng_display_freeze/mng_display_reset */
00455 /* mng_display_freeze thru mng_display_gotime can be used to influence
00456    the display of an image, BUT ONLY if it has been completely read! */
00457 #ifdef MNG_SUPPORT_DISPLAY
00458 #ifdef MNG_SUPPORT_READ
00459 MNG_EXT mng_retcode MNG_DECL mng_readdisplay     (mng_handle    hHandle);
00460 #endif
00461 MNG_EXT mng_retcode MNG_DECL mng_display         (mng_handle    hHandle);
00462 MNG_EXT mng_retcode MNG_DECL mng_display_resume  (mng_handle    hHandle);
00463 MNG_EXT mng_retcode MNG_DECL mng_display_freeze  (mng_handle    hHandle);
00464 MNG_EXT mng_retcode MNG_DECL mng_display_reset   (mng_handle    hHandle);
00465 MNG_EXT mng_retcode MNG_DECL mng_display_goframe (mng_handle    hHandle,
00466                                                   mng_uint32    iFramenr);
00467 MNG_EXT mng_retcode MNG_DECL mng_display_golayer (mng_handle    hHandle,
00468                                                   mng_uint32    iLayernr);
00469 MNG_EXT mng_retcode MNG_DECL mng_display_gotime  (mng_handle    hHandle,
00470                                                   mng_uint32    iPlaytime);
00471 #endif /* MNG_SUPPORT_DISPLAY */
00472 
00473 /* error reporting function */
00474 /* use this if you need more detailed info on the last error */
00475 /* iExtra1 & iExtra2 may contain errorcodes from zlib, jpeg, etc... */
00476 /* zErrortext will only be filled if you #define MNG_ERROR_TELLTALE */
00477 MNG_EXT mng_retcode MNG_DECL mng_getlasterror    (mng_handle    hHandle,
00478                                                   mng_int8*     iSeverity,
00479                                                   mng_chunkid*  iChunkname,
00480                                                   mng_uint32*   iChunkseq,
00481                                                   mng_int32*    iExtra1,
00482                                                   mng_int32*    iExtra2,
00483                                                   mng_pchar*    zErrortext);
00484 
00485 /* ************************************************************************** */
00486 /* *                                                                        * */
00487 /* *  Callback set functions                                                * */
00488 /* *                                                                        * */
00489 /* ************************************************************************** */
00490 
00491 /* memory callbacks */
00492 /* called to allocate and release internal datastructures */
00493 #ifndef MNG_INTERNAL_MEMMNGMT
00494 MNG_EXT mng_retcode MNG_DECL mng_setcb_memalloc      (mng_handle        hHandle,
00495                                                       mng_memalloc      fProc);
00496 MNG_EXT mng_retcode MNG_DECL mng_setcb_memfree       (mng_handle        hHandle,
00497                                                       mng_memfree       fProc);
00498 #endif /* MNG_INTERNAL_MEMMNGMT */
00499 
00500 /* open- & close-stream callbacks */
00501 /* called to open & close streams for input or output */
00502 #if defined(MNG_SUPPORT_READ) || defined(MNG_SUPPORT_WRITE)
00503 MNG_EXT mng_retcode MNG_DECL mng_setcb_openstream    (mng_handle        hHandle,
00504                                                       mng_openstream    fProc);
00505 MNG_EXT mng_retcode MNG_DECL mng_setcb_closestream   (mng_handle        hHandle,
00506                                                       mng_closestream   fProc);
00507 #endif
00508 
00509 /* read callback */
00510 /* called to get data from the inputstream */
00511 #ifdef MNG_SUPPORT_READ
00512 MNG_EXT mng_retcode MNG_DECL mng_setcb_readdata      (mng_handle        hHandle,
00513                                                       mng_readdata      fProc);
00514 #endif
00515 
00516 /* write callback */
00517 /* called to put data into the outputstream */
00518 #ifdef MNG_SUPPORT_WRITE
00519 MNG_EXT mng_retcode MNG_DECL mng_setcb_writedata     (mng_handle        hHandle,
00520                                                       mng_writedata     fProc);
00521 #endif
00522 
00523 /* error callback */
00524 /* called when an error occurs */
00525 /* the application can determine if the error is recoverable,
00526    and may inform the library by setting specific returncodes */
00527 MNG_EXT mng_retcode MNG_DECL mng_setcb_errorproc     (mng_handle        hHandle,
00528                                                       mng_errorproc     fProc);
00529 
00530 /* trace callback */
00531 /* called to show the currently executing function */
00532 #ifdef MNG_SUPPORT_TRACE
00533 MNG_EXT mng_retcode MNG_DECL mng_setcb_traceproc     (mng_handle        hHandle,
00534                                                       mng_traceproc     fProc);
00535 #endif
00536 
00537 /* callbacks for read processing */
00538 /* processheader is called when all header information has been gathered
00539    from the inputstream */
00540 /* processtext is called for every tEXt, zTXt and iTXt chunk in the
00541    inputstream (iType=0 for tEXt, 1 for zTXt and 2 for iTXt);
00542    you can call get_imagelevel to check at what nesting-level the chunk is
00543    encountered (eg. tEXt inside an embedded image inside a MNG -> level == 2;
00544                 in most other case -> level == 1) */
00545 /* processsave & processseek are called for SAVE/SEEK chunks */
00546 /* processneed is called for the nEED chunk; you should specify a callback
00547    for this as the default behavior will be to abort processing */
00548 /* processunknown is called after reading each non-critical unknown chunk */
00549 #ifdef MNG_SUPPORT_READ
00550 MNG_EXT mng_retcode MNG_DECL mng_setcb_processheader (mng_handle        hHandle,
00551                                                       mng_processheader fProc);
00552 MNG_EXT mng_retcode MNG_DECL mng_setcb_processtext   (mng_handle        hHandle,
00553                                                       mng_processtext   fProc);
00554 MNG_EXT mng_retcode MNG_DECL mng_setcb_processsave   (mng_handle        hHandle,
00555                                                       mng_processsave   fProc);
00556 MNG_EXT mng_retcode MNG_DECL mng_setcb_processseek   (mng_handle        hHandle,
00557                                                       mng_processseek   fProc);
00558 MNG_EXT mng_retcode MNG_DECL mng_setcb_processneed   (mng_handle        hHandle,
00559                                                       mng_processneed   fProc);
00560 MNG_EXT mng_retcode MNG_DECL mng_setcb_processmend   (mng_handle        hHandle,
00561                                                       mng_processmend   fProc);
00562 MNG_EXT mng_retcode MNG_DECL mng_setcb_processunknown(mng_handle        hHandle,
00563                                                       mng_processunknown fProc);
00564 MNG_EXT mng_retcode MNG_DECL mng_setcb_processterm   (mng_handle        hHandle,
00565                                                       mng_processterm   fProc);
00566 #endif
00567 
00568 /* callbacks for display processing */
00569 /* getcanvasline is called to get an access-pointer to a line on the
00570    drawing-canvas */
00571 /* getbkgdline is called to get an access-pointer to a line from the
00572    background-canvas */
00573 /* refresh is called to inform the GUI to redraw the current canvas onto
00574    it's output device (eg. in Win32 this would mean sending an
00575    invalidate message for the specified region */
00576 /* NOTE that the update-region is specified as x,y,width,height; eg. the
00577    invalidate message for Windows requires left,top,right,bottom parameters
00578    where the bottom-right is exclusive of the region!!
00579    to get these correctly is as simple as:
00580    left   = x;
00581    top    = y;
00582    right  = x + width;
00583    bottom = y + height;
00584    if your implementation requires inclusive points, simply subtract 1 from
00585    both the right & bottom values calculated above.
00586    */
00587 #ifdef MNG_SUPPORT_DISPLAY
00588 MNG_EXT mng_retcode MNG_DECL mng_setcb_getcanvasline (mng_handle        hHandle,
00589                                                       mng_getcanvasline fProc);
00590 MNG_EXT mng_retcode MNG_DECL mng_setcb_getbkgdline   (mng_handle        hHandle,
00591                                                       mng_getbkgdline   fProc);
00592 MNG_EXT mng_retcode MNG_DECL mng_setcb_getalphaline  (mng_handle        hHandle,
00593                                                       mng_getalphaline  fProc);
00594 MNG_EXT mng_retcode MNG_DECL mng_setcb_refresh       (mng_handle        hHandle,
00595                                                       mng_refresh       fProc);
00596 
00597 /* timing callbacks */
00598 /* gettickcount is called to get the system tickcount (milliseconds);
00599    this is used to determine the remaining interval between frames */
00600 /* settimer is called to inform the application that it should set a timer;
00601    when the timer is triggered the app must call mng_display_resume */
00602 MNG_EXT mng_retcode MNG_DECL mng_setcb_gettickcount  (mng_handle        hHandle,
00603                                                       mng_gettickcount  fProc);
00604 MNG_EXT mng_retcode MNG_DECL mng_setcb_settimer      (mng_handle        hHandle,
00605                                                       mng_settimer      fProc);
00606 
00607 /* color management callbacks */
00608 /* called to transmit color management information to the application */
00609 /* these are only used when you #define MNG_APP_CMS */
00610 #ifdef MNG_APP_CMS
00611 MNG_EXT mng_retcode MNG_DECL mng_setcb_processgamma  (mng_handle        hHandle,
00612                                                       mng_processgamma  fProc);
00613 MNG_EXT mng_retcode MNG_DECL mng_setcb_processchroma (mng_handle        hHandle,
00614                                                       mng_processchroma fProc);
00615 MNG_EXT mng_retcode MNG_DECL mng_setcb_processsrgb   (mng_handle        hHandle,
00616                                                       mng_processsrgb   fProc);
00617 MNG_EXT mng_retcode MNG_DECL mng_setcb_processiccp   (mng_handle        hHandle,
00618                                                       mng_processiccp   fProc);
00619 MNG_EXT mng_retcode MNG_DECL mng_setcb_processarow   (mng_handle        hHandle,
00620                                                       mng_processarow   fProc);
00621 #endif /* MNG_APP_CMS */
00622 #endif /* MNG_SUPPORT_DISPLAY */
00623 
00624 /* ************************************************************************** */
00625 /* *                                                                        * */
00626 /* *  Callback get functions                                                * */
00627 /* *                                                                        * */
00628 /* ************************************************************************** */
00629 
00630 /* see _setcb_ */
00631 #ifndef MNG_INTERNAL_MEMMNGMT
00632 MNG_EXT mng_memalloc      MNG_DECL mng_getcb_memalloc      (mng_handle hHandle);
00633 MNG_EXT mng_memfree       MNG_DECL mng_getcb_memfree       (mng_handle hHandle);
00634 #endif
00635 
00636 /* see _setcb_ */
00637 #if defined(MNG_SUPPORT_READ) || defined(MNG_WRITE_SUPPORT)
00638 MNG_EXT mng_openstream    MNG_DECL mng_getcb_openstream    (mng_handle hHandle);
00639 MNG_EXT mng_closestream   MNG_DECL mng_getcb_closestream   (mng_handle hHandle);
00640 #endif
00641 
00642 /* see _setcb_ */
00643 #ifdef MNG_SUPPORT_READ
00644 MNG_EXT mng_readdata      MNG_DECL mng_getcb_readdata      (mng_handle hHandle);
00645 #endif
00646 
00647 /* see _setcb_ */
00648 #ifdef MNG_SUPPORT_WRITE
00649 MNG_EXT mng_writedata     MNG_DECL mng_getcb_writedata     (mng_handle hHandle);
00650 #endif
00651 
00652 /* see _setcb_ */
00653 MNG_EXT mng_errorproc     MNG_DECL mng_getcb_errorproc     (mng_handle hHandle);
00654 
00655 /* see _setcb_ */
00656 #ifdef MNG_SUPPORT_TRACE
00657 MNG_EXT mng_traceproc     MNG_DECL mng_getcb_traceproc     (mng_handle hHandle);
00658 #endif
00659 
00660 /* see _setcb_ */
00661 #ifdef MNG_SUPPORT_READ
00662 MNG_EXT mng_processheader MNG_DECL mng_getcb_processheader (mng_handle hHandle);
00663 MNG_EXT mng_processtext   MNG_DECL mng_getcb_processtext   (mng_handle hHandle);
00664 MNG_EXT mng_processsave   MNG_DECL mng_getcb_processsave   (mng_handle hHandle);
00665 MNG_EXT mng_processseek   MNG_DECL mng_getcb_processseek   (mng_handle hHandle);
00666 MNG_EXT mng_processneed   MNG_DECL mng_getcb_processneed   (mng_handle hHandle);
00667 MNG_EXT mng_processunknown MNG_DECL mng_getcb_processunknown (mng_handle hHandle);
00668 MNG_EXT mng_processterm   MNG_DECL mng_getcb_processterm   (mng_handle hHandle);
00669 #endif
00670 
00671 /* see _setcb_ */
00672 #ifdef MNG_SUPPORT_DISPLAY
00673 MNG_EXT mng_getcanvasline MNG_DECL mng_getcb_getcanvasline (mng_handle hHandle);
00674 MNG_EXT mng_getbkgdline   MNG_DECL mng_getcb_getbkgdline   (mng_handle hHandle);
00675 MNG_EXT mng_getalphaline  MNG_DECL mng_getcb_getalphaline  (mng_handle hHandle);
00676 MNG_EXT mng_refresh       MNG_DECL mng_getcb_refresh       (mng_handle hHandle);
00677 
00678 /* see _setcb_ */
00679 MNG_EXT mng_gettickcount  MNG_DECL mng_getcb_gettickcount  (mng_handle hHandle);
00680 MNG_EXT mng_settimer      MNG_DECL mng_getcb_settimer      (mng_handle hHandle);
00681 
00682 /* see _setcb_ */
00683 #ifdef MNG_APP_CMS
00684 MNG_EXT mng_processgamma  MNG_DECL mng_getcb_processgamma  (mng_handle hHandle);
00685 MNG_EXT mng_processchroma MNG_DECL mng_getcb_processchroma (mng_handle hHandle);
00686 MNG_EXT mng_processsrgb   MNG_DECL mng_getcb_processsrgb   (mng_handle hHandle);
00687 MNG_EXT mng_processiccp   MNG_DECL mng_getcb_processiccp   (mng_handle hHandle);
00688 MNG_EXT mng_processarow   MNG_DECL mng_getcb_processarow   (mng_handle hHandle);
00689 #endif /* MNG_APP_CMS */
00690 #endif /* MNG_SUPPORT_DISPLAY */
00691 
00692 /* ************************************************************************** */
00693 /* *                                                                        * */
00694 /* *  Property set functions                                                * */
00695 /* *                                                                        * */
00696 /* ************************************************************************** */
00697 
00698 /* Application data pointer */
00699 /* provided for application use; not used by the library */
00700 MNG_EXT mng_retcode MNG_DECL mng_set_userdata        (mng_handle        hHandle,
00701                                                       mng_ptr           pUserdata);
00702 
00703 /* The style of the drawing- & background-canvas */
00704 /* only used for displaying images */
00705 /* both are initially set to 24-bit RGB (eg. 8-bit per channel) */
00706 MNG_EXT mng_retcode MNG_DECL mng_set_canvasstyle     (mng_handle        hHandle,
00707                                                       mng_uint32        iStyle);
00708 MNG_EXT mng_retcode MNG_DECL mng_set_bkgdstyle       (mng_handle        hHandle,
00709                                                       mng_uint32        iStyle);
00710 
00711 /* The default background color */
00712 /* only used if the getbkgdline callback is not defined */
00713 /* for initially painting the canvas and restoring (part of) the background */
00714 MNG_EXT mng_retcode MNG_DECL mng_set_bgcolor         (mng_handle        hHandle,
00715                                                       mng_uint16        iRed,
00716                                                       mng_uint16        iGreen,
00717                                                       mng_uint16        iBlue);
00718 
00719 /* Indicates preferred use of the bKGD chunk for PNG images */
00720 MNG_EXT mng_retcode MNG_DECL mng_set_usebkgd         (mng_handle        hHandle,
00721                                                       mng_bool          bUseBKGD);
00722 
00723 /* Indicates storage of read chunks */
00724 /* only useful if you #define mng_store_chunks */
00725 /* can be used to dynamically change storage management */
00726 MNG_EXT mng_retcode MNG_DECL mng_set_storechunks     (mng_handle        hHandle,
00727                                                       mng_bool          bStorechunks);
00728 
00729 /* Indicates breaks requested when processing SAVE/SEEK */
00730 /* set this to let the app handle section breaks; the library will return
00731    MNG_NEEDSECTIONWAIT return-codes for each SEEK chunk */
00732 MNG_EXT mng_retcode MNG_DECL mng_set_sectionbreaks   (mng_handle        hHandle,
00733                                                       mng_bool          bSectionbreaks);
00734 
00735 /* Indicates storage of playback info (ON by default!) */
00736 /* can be used to turn off caching of playback info; this is useful to
00737    specifically optimize MNG-video playback; note that if caching is turned off
00738    LOOP chunks will be flagged as errors! TERM chunks will be ignored and only
00739    passed to the processterm() callback if it is defined by the app; also, this
00740    feature can only be used with mng_readdisplay(); mng_read(),
00741    mng_display_reset() and mng_display_goxxxx() will return an error;
00742    once this option is turned off it can't be turned on for the same stream!!! */
00743 MNG_EXT mng_retcode MNG_DECL mng_set_cacheplayback   (mng_handle        hHandle,
00744                                                       mng_bool          bCacheplayback);
00745 
00746 /* Indicates automatic progressive refreshes for large images (ON by default!) */
00747 /* turn this off if you do not want intermittent painting while a large image
00748    is being read. useful if the input-stream comes from a fast medium, such
00749    as a local harddisk */
00750 MNG_EXT mng_retcode MNG_DECL mng_set_doprogressive   (mng_handle        hHandle,
00751                                                       mng_bool          bDoProgressive);
00752 
00753 /* Color-management necessaries */
00754 /*
00755     *************************************************************************
00756                   !!!!!!!! THIS BIT IS IMPORTANT !!!!!!!!!
00757     *************************************************************************
00758 
00759     If you have defined MNG_FULL_CMS (and are using lcms), you will have to
00760     think hard about the following routines.
00761 
00762     lcms requires 2 profiles to work off the differences in the input-image
00763     and the output-device. The ICC profile for the input-image will be
00764     embedded within it to reflect its color-characteristics, but the output
00765     profile depends on the output-device, which is something only *YOU* know
00766     about. sRGB (standard RGB) is common for x86 compatible environments
00767     (eg. Windows, Linux and some others)
00768 
00769     If you are compiling for a sRGB compliant system you probably won't have
00770     to do anything special. (unless you want to ofcourse)
00771 
00772     If you are compiling for a non-sRGB compliant system
00773     (eg. SGI, Mac, Next, others...)
00774     you *MUST* define a proper ICC profile for the generic output-device
00775     associated with that platform.
00776 
00777     In either event, you may also want to offer an option to your users to
00778     set the profile manually, or, if you know how, set it from a
00779     system-defined default.
00780 
00781     TO RECAP: for sRGB systems (Windows, Linux) no action required!
00782               for non-sRGB systems (SGI, Mac, Next) ACTION REQUIRED!
00783 
00784     Please visit http://www.srgb.com, http://www.color.org and
00785     http://www.littlecms.com for more info.
00786 
00787     *************************************************************************
00788                   !!!!!!!! THIS BIT IS IMPORTANT !!!!!!!!!
00789     *************************************************************************
00790 */
00791 /* mng_set_srgb tells libmng if it's running on a sRGB compliant system or not
00792    the default is already set to MNG_TRUE */
00793 /* mng_set_outputprofile, mng_set_outputprofile2, mng_set_outputsrgb
00794    are used to set the default profile describing the output-device
00795    by default it is already initialized with an sRGB profile */
00796 /* mng_set_srgbprofile, mng_set_srgbprofile2, mng_set_srgbimplicit
00797    are used to set the default profile describing a standard sRGB device
00798    this is used when the input-image is tagged only as being sRGB, but the
00799    output-device is defined as not being sRGB compliant
00800    by default it is already initialized with a standard sRGB profile */
00801 #if defined(MNG_SUPPORT_DISPLAY)
00802 MNG_EXT mng_retcode MNG_DECL mng_set_srgb            (mng_handle        hHandle,
00803                                                       mng_bool          bIssRGB);
00804 MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile   (mng_handle        hHandle,
00805                                                       mng_pchar         zFilename);
00806 MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile2  (mng_handle        hHandle,
00807                                                       mng_uint32        iProfilesize,
00808                                                       mng_ptr           pProfile);
00809 MNG_EXT mng_retcode MNG_DECL mng_set_outputsrgb      (mng_handle        hHandle);
00810 MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile     (mng_handle        hHandle,
00811                                                       mng_pchar         zFilename);
00812 MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile2    (mng_handle        hHandle,
00813                                                       mng_uint32        iProfilesize,
00814                                                       mng_ptr           pProfile);
00815 MNG_EXT mng_retcode MNG_DECL mng_set_srgbimplicit    (mng_handle        hHandle);
00816 #endif
00817 
00818 /* Gamma settings */
00819 /* only used if you #define MNG_FULL_CMS or #define MNG_GAMMA_ONLY */
00820 /* ... blabla (explain gamma processing a little; eg. formula & stuff) ... */
00821 MNG_EXT mng_retcode MNG_DECL mng_set_viewgamma       (mng_handle        hHandle,
00822                                                       mng_float         dGamma);
00823 MNG_EXT mng_retcode MNG_DECL mng_set_displaygamma    (mng_handle        hHandle,
00824                                                       mng_float         dGamma);
00825 MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggamma    (mng_handle        hHandle,
00826                                                       mng_float         dGamma);
00827 MNG_EXT mng_retcode MNG_DECL mng_set_viewgammaint    (mng_handle        hHandle,
00828                                                       mng_uint32        iGamma);
00829 MNG_EXT mng_retcode MNG_DECL mng_set_displaygammaint (mng_handle        hHandle,
00830                                                       mng_uint32        iGamma);
00831 MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggammaint (mng_handle        hHandle,
00832                                                       mng_uint32        iGamma);
00833 
00834 /* Ultimate clipping size */
00835 /* used to limit extreme graphics from overloading the system */
00836 /* if a graphic exceeds these limits a warning is issued, which can
00837    be ignored by the app (using the errorproc callback). in that case
00838    the library will use these settings to clip the input graphic, and
00839    the app's canvas must account for this */
00840 MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvaswidth  (mng_handle        hHandle,
00841                                                       mng_uint32        iMaxwidth);
00842 MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvasheight (mng_handle        hHandle,
00843                                                       mng_uint32        iMaxheight);
00844 MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvassize   (mng_handle        hHandle,
00845                                                       mng_uint32        iMaxwidth,
00846                                                       mng_uint32        iMaxheight);
00847 
00848 /* ZLIB default compression parameters */
00849 /* these are used when writing out chunks */
00850 /* they are also used when compressing PNG image-data or JNG alpha-data;
00851    in this case you can set them just before calling mng_putimgdata_ihdr */
00852 /* set to your liking; usually the defaults will suffice though! */
00853 /* check the documentation for ZLIB for details on these parameters */
00854 #ifdef MNG_INCLUDE_ZLIB
00855 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_level      (mng_handle        hHandle,
00856                                                       mng_int32         iZlevel);
00857 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_method     (mng_handle        hHandle,
00858                                                       mng_int32         iZmethod);
00859 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_windowbits (mng_handle        hHandle,
00860                                                       mng_int32         iZwindowbits);
00861 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_memlevel   (mng_handle        hHandle,
00862                                                       mng_int32         iZmemlevel);
00863 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_strategy   (mng_handle        hHandle,
00864                                                       mng_int32         iZstrategy);
00865 
00866 MNG_EXT mng_retcode MNG_DECL mng_set_zlib_maxidat    (mng_handle        hHandle,
00867                                                       mng_uint32        iMaxIDAT);
00868 #endif /* MNG_INCLUDE_ZLIB */
00869 
00870 /* JNG default compression parameters (based on IJG code) */
00871 /* these are used when compressing JNG image-data; so you can set them
00872    just before calling mng_putimgdata_jhdr */
00873 /* set to your liking; usually the defaults will suffice though! */
00874 /* check the documentation for IJGSRC6B for details on these parameters */
00875 #ifdef MNG_INCLUDE_JNG
00876 #ifdef MNG_INCLUDE_IJG6B
00877 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_dctmethod  (mng_handle        hHandle,
00878                                                       mngjpeg_dctmethod eJPEGdctmethod);
00879 #endif
00880 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_quality    (mng_handle        hHandle,
00881                                                       mng_int32         iJPEGquality);
00882 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_smoothing  (mng_handle        hHandle,
00883                                                       mng_int32         iJPEGsmoothing);
00884 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_progressive(mng_handle        hHandle,
00885                                                       mng_bool          bJPEGprogressive);
00886 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_optimized  (mng_handle        hHandle,
00887                                                       mng_bool          bJPEGoptimized);
00888 
00889 MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_maxjdat    (mng_handle        hHandle,
00890                                                       mng_uint32        iMaxJDAT);
00891 #endif /* MNG_INCLUDE_JNG */
00892 
00893 /* Suspension-mode setting */
00894 /* use this to activate the internal suspension-buffer to improve
00895    read-suspension processing */
00896 /* TODO: write-suspension ??? */   
00897 #if defined(MNG_SUPPORT_READ)
00898 MNG_EXT mng_retcode MNG_DECL mng_set_suspensionmode  (mng_handle        hHandle,
00899                                                       mng_bool          bSuspensionmode);
00900 #endif
00901 
00902 /* Speed setting */
00903 /* use this to influence the display-speed of animations */
00904 #if defined(MNG_SUPPORT_DISPLAY)
00905 MNG_EXT mng_retcode MNG_DECL mng_set_speed           (mng_handle        hHandle,
00906                                                       mng_speedtype     iSpeed);
00907 #endif
00908 
00909 /* ************************************************************************** */
00910 /* *                                                                        * */
00911 /* *  Property get functions                                                * */
00912 /* *                                                                        * */
00913 /* ************************************************************************** */
00914 
00915 /* see _set_ */
00916 MNG_EXT mng_ptr     MNG_DECL mng_get_userdata        (mng_handle        hHandle);
00917 
00918 /* Network Graphic header details */
00919 /* these get filled once the graphics header is processed,
00920    so they are available in the processheader callback; before that
00921    they are zeroed out and imagetype is set to it_unknown */
00922 /* this might be a good point for the app to initialize the drawing-canvas! */
00923 /* note that some fields are only set for the first(!) header-chunk:
00924    MNG/MHDR (imagetype = mng_it_mng) - ticks thru simplicity
00925    PNG/IHDR (imagetype = mng_it_png) - bitdepth thru interlace
00926    JNG/JHDR (imagetype = mng_it_jng) - bitdepth thru compression &
00927                                        interlace thru alphainterlace */
00928 MNG_EXT mng_imgtype MNG_DECL mng_get_sigtype         (mng_handle        hHandle);
00929 MNG_EXT mng_imgtype MNG_DECL mng_get_imagetype       (mng_handle        hHandle);
00930 MNG_EXT mng_uint32  MNG_DECL mng_get_imagewidth      (mng_handle        hHandle);
00931 MNG_EXT mng_uint32  MNG_DECL mng_get_imageheight     (mng_handle        hHandle);
00932 
00933 MNG_EXT mng_uint32  MNG_DECL mng_get_ticks           (mng_handle        hHandle);
00934 MNG_EXT mng_uint32  MNG_DECL mng_get_framecount      (mng_handle        hHandle);
00935 MNG_EXT mng_uint32  MNG_DECL mng_get_layercount      (mng_handle        hHandle);
00936 MNG_EXT mng_uint32  MNG_DECL mng_get_playtime        (mng_handle        hHandle);
00937 MNG_EXT mng_uint32  MNG_DECL mng_get_simplicity      (mng_handle        hHandle);
00938 
00939 MNG_EXT mng_uint8   MNG_DECL mng_get_bitdepth        (mng_handle        hHandle);
00940 MNG_EXT mng_uint8   MNG_DECL mng_get_colortype       (mng_handle        hHandle);
00941 MNG_EXT mng_uint8   MNG_DECL mng_get_compression     (mng_handle        hHandle);
00942 MNG_EXT mng_uint8   MNG_DECL mng_get_filter          (mng_handle        hHandle);
00943 MNG_EXT mng_uint8   MNG_DECL mng_get_interlace       (mng_handle        hHandle);
00944 MNG_EXT mng_uint8   MNG_DECL mng_get_alphabitdepth   (mng_handle        hHandle);
00945 MNG_EXT mng_uint8   MNG_DECL mng_get_alphacompression(mng_handle        hHandle);
00946 MNG_EXT mng_uint8   MNG_DECL mng_get_alphafilter     (mng_handle        hHandle);
00947 MNG_EXT mng_uint8   MNG_DECL mng_get_alphainterlace  (mng_handle        hHandle);
00948 
00949 /* indicates the predicted alpha-depth required to properly display the image */
00950 /* gets set once the graphics header is processed and is available in the
00951    processheader callback for any type of input-image (PNG, JNG or MNG) */
00952 /* possible values are 0,1,2,4,8,16
00953    0  = no transparency required
00954    1  = on/off transparency required (alpha-values are 0 or 2^bit_depth-1)
00955    2+ = semi-transparency required (values will be scaled to the bitdepth of the
00956                                     canvasstyle supplied by the application) */
00957 MNG_EXT mng_uint8   MNG_DECL mng_get_alphadepth      (mng_handle        hHandle);
00958 
00959 /* defines whether a refresh() callback is called for an interlace pass (PNG)
00960    or progressive scan (JNG) */
00961 /* returns the interlace pass number for PNG or a fabricated pass number for JNG;
00962    returns 0 in all other cases */
00963 /* only useful if the image_type = mng_it_png or mng_it_jng and if the image
00964    is actually interlaced (PNG) or progressive (JNG) */
00965 MNG_EXT mng_uint8   MNG_DECL mng_get_refreshpass     (mng_handle        hHandle);
00966 
00967 /* see _set_ */
00968 MNG_EXT mng_uint32  MNG_DECL mng_get_canvasstyle     (mng_handle        hHandle);
00969 MNG_EXT mng_uint32  MNG_DECL mng_get_bkgdstyle       (mng_handle        hHandle);
00970 
00971 /* see _set_ */
00972 MNG_EXT mng_retcode MNG_DECL mng_get_bgcolor         (mng_handle        hHandle,
00973                                                       mng_uint16*       iRed,
00974                                                       mng_uint16*       iGreen,
00975                                                       mng_uint16*       iBlue);
00976 
00977 /* see _set_ */
00978 MNG_EXT mng_bool    MNG_DECL mng_get_usebkgd         (mng_handle        hHandle);
00979 
00980 /* see _set_ */
00981 MNG_EXT mng_bool    MNG_DECL mng_get_storechunks     (mng_handle        hHandle);
00982 
00983 /* see _set_ */
00984 MNG_EXT mng_bool    MNG_DECL mng_get_sectionbreaks   (mng_handle        hHandle);
00985 
00986 /* see _set_ */
00987 MNG_EXT mng_bool    MNG_DECL mng_get_cacheplayback   (mng_handle        hHandle);
00988 
00989 /* see _set_ */
00990 MNG_EXT mng_bool    MNG_DECL mng_get_doprogressive   (mng_handle        hHandle);
00991 
00992 /* see _set_ */
00993 #if defined(MNG_SUPPORT_DISPLAY) && defined(MNG_FULL_CMS)
00994 MNG_EXT mng_bool    MNG_DECL mng_get_srgb            (mng_handle        hHandle);
00995 #endif
00996 
00997 /* see _set_ */
00998 MNG_EXT mng_float   MNG_DECL mng_get_viewgamma       (mng_handle        hHandle);
00999 MNG_EXT mng_float   MNG_DECL mng_get_displaygamma    (mng_handle        hHandle);
01000 MNG_EXT mng_float   MNG_DECL mng_get_dfltimggamma    (mng_handle        hHandle);
01001 MNG_EXT mng_uint32  MNG_DECL mng_get_viewgammaint    (mng_handle        hHandle);
01002 MNG_EXT mng_uint32  MNG_DECL mng_get_displaygammaint (mng_handle        hHandle);
01003 MNG_EXT mng_uint32  MNG_DECL mng_get_dfltimggammaint (mng_handle        hHandle);
01004 
01005 /* see _set_ */
01006 MNG_EXT mng_uint32  MNG_DECL mng_get_maxcanvaswidth  (mng_handle        hHandle);
01007 MNG_EXT mng_uint32  MNG_DECL mng_get_maxcanvasheight (mng_handle        hHandle);
01008 
01009 /* see _set_ */
01010 #ifdef MNG_INCLUDE_ZLIB
01011 MNG_EXT mng_int32   MNG_DECL mng_get_zlib_level      (mng_handle        hHandle);
01012 MNG_EXT mng_int32   MNG_DECL mng_get_zlib_method     (mng_handle        hHandle);
01013 MNG_EXT mng_int32   MNG_DECL mng_get_zlib_windowbits (mng_handle        hHandle);
01014 MNG_EXT mng_int32   MNG_DECL mng_get_zlib_memlevel   (mng_handle        hHandle);
01015 MNG_EXT mng_int32   MNG_DECL mng_get_zlib_strategy   (mng_handle        hHandle);
01016 
01017 MNG_EXT mng_uint32  MNG_DECL mng_get_zlib_maxidat    (mng_handle        hHandle);
01018 #endif /* MNG_INCLUDE_ZLIB */
01019 
01020 /* see _set_ */
01021 #ifdef MNG_INCLUDE_JNG
01022 #ifdef MNG_INCLUDE_IJG6B
01023 MNG_EXT mngjpeg_dctmethod
01024                     MNG_DECL mng_get_jpeg_dctmethod  (mng_handle        hHandle);
01025 #endif
01026 MNG_EXT mng_int32   MNG_DECL mng_get_jpeg_quality    (mng_handle        hHandle);
01027 MNG_EXT mng_int32   MNG_DECL mng_get_jpeg_smoothing  (mng_handle        hHandle);
01028 MNG_EXT mng_bool    MNG_DECL mng_get_jpeg_progressive(mng_handle        hHandle);
01029 MNG_EXT mng_bool    MNG_DECL mng_get_jpeg_optimized  (mng_handle        hHandle);
01030 
01031 MNG_EXT mng_uint32  MNG_DECL mng_get_jpeg_maxjdat    (mng_handle        hHandle);
01032 #endif /* MNG_INCLUDE_JNG */
01033 
01034 /* see _set_  */
01035 #if defined(MNG_SUPPORT_READ)
01036 MNG_EXT mng_bool    MNG_DECL mng_get_suspensionmode  (mng_handle        hHandle);
01037 #endif
01038 
01039 /* see _set_  */
01040 #if defined(MNG_SUPPORT_DISPLAY)
01041 MNG_EXT mng_speedtype
01042                     MNG_DECL mng_get_speed           (mng_handle        hHandle);
01043 #endif
01044 
01045 /* Image-level */
01046 /* this can be used inside the processtext callback to determine the level of
01047    text of the image being processed; the value 1 is returned for top-level
01048    texts, and the value 2 for a text inside an embedded image inside a MNG */
01049 MNG_EXT mng_uint32  MNG_DECL mng_get_imagelevel      (mng_handle        hHandle);
01050 
01051 /* BACK info */
01052 /* can be used to retrieve the color & mandatory values for the last processed
01053    BACK chunk of a MNG (will fail for other image-types);
01054    if no BACK chunk was processed yet, it will return all zeroes */
01055 MNG_EXT mng_retcode MNG_DECL mng_get_lastbackchunk   (mng_handle        hHandle,
01056                                                       mng_uint16*       iRed,
01057                                                       mng_uint16*       iGreen,
01058                                                       mng_uint16*       iBlue,
01059                                                       mng_uint8*        iMandatory);
01060 
01061 /* Display status variables */
01062 /* these get filled & updated during display processing */
01063 /* starttime is the tickcount at the start of displaying the animation */
01064 /* runtime is the actual number of millisecs since the start of the animation */
01065 /* currentframe, currentlayer & currentplaytime indicate the current
01066    frame/layer/playtime(msecs) in the animation (these keep increasing;
01067    even after the animation loops back to the TERM chunk) */
01068 #if defined(MNG_SUPPORT_DISPLAY)
01069 MNG_EXT mng_uint32  MNG_DECL mng_get_starttime       (mng_handle        hHandle);
01070 MNG_EXT mng_uint32  MNG_DECL mng_get_runtime         (mng_handle        hHandle);
01071 MNG_EXT mng_uint32  MNG_DECL mng_get_currentframe    (mng_handle        hHandle);
01072 MNG_EXT mng_uint32  MNG_DECL mng_get_currentlayer    (mng_handle        hHandle);
01073 MNG_EXT mng_uint32  MNG_DECL mng_get_currentplaytime (mng_handle        hHandle);
01074 #endif
01075 
01076 /* Status variables */
01077 /* these indicate the internal state of the library */
01078 /* most indicate exactly what you would expect:
01079    status_error returns MNG_TRUE if the last function call returned an errorcode
01080    status_reading returns MNG_TRUE if the library is (still) reading an image
01081    status_suspendbreak returns MNG_TRUE if the library has suspended for "I/O"
01082    status_creating returns MNG_TRUE if the library is in the middle of creating an image
01083    status_writing returns MNG_TRUE if the library is in the middle of writing an image
01084    status_displaying returns MNG_TRUE if the library is displaying an image
01085    status_running returns MNG_TRUE if display processing is active (eg. not frozen or reset)
01086    status_timerbreak returns MNG_TRUE if the library has suspended for a "timer-break" */
01087 /* eg. mng_readdisplay() will turn the reading, displaying and running status on;
01088    when EOF is reached the reading status will be turned off */   
01089 MNG_EXT mng_bool    MNG_DECL mng_status_error        (mng_handle        hHandle);
01090 #ifdef MNG_SUPPORT_READ
01091 MNG_EXT mng_bool    MNG_DECL mng_status_reading      (mng_handle        hHandle);
01092 MNG_EXT mng_bool    MNG_DECL mng_status_suspendbreak (mng_handle        hHandle);
01093 #endif
01094 #ifdef MNG_SUPPORT_WRITE
01095 MNG_EXT mng_bool    MNG_DECL mng_status_creating     (mng_handle        hHandle);
01096 MNG_EXT mng_bool    MNG_DECL mng_status_writing      (mng_handle        hHandle);
01097 #endif
01098 #ifdef MNG_SUPPORT_DISPLAY
01099 MNG_EXT mng_bool    MNG_DECL mng_status_displaying   (mng_handle        hHandle);
01100 MNG_EXT mng_bool    MNG_DECL mng_status_running      (mng_handle        hHandle);
01101 MNG_EXT mng_bool    MNG_DECL mng_status_timerbreak   (mng_handle        hHandle);
01102 #endif
01103 
01104 /* ************************************************************************** */
01105 /* *                                                                        * */
01106 /* *  Chunk access functions                                                * */
01107 /* *                                                                        * */
01108 /* ************************************************************************** */
01109 
01110 #ifdef MNG_ACCESS_CHUNKS
01111 
01112 /* ************************************************************************** */
01113 
01114 /* use this to iterate the stored chunks */
01115 /* requires MNG_ACCESS_CHUNKS & MNG_STORE_CHUNKS */
01116 /* starts from the supplied chunk-index-nr; the first chunk has index 0!! */
01117 MNG_EXT mng_retcode MNG_DECL mng_iterate_chunks      (mng_handle       hHandle,
01118                                                       mng_uint32       iChunkseq,
01119                                                       mng_iteratechunk fProc);
01120 
01121 /* ************************************************************************** */
01122 
01123 /* use these to get chunk data from within the callback in iterate_chunks */
01124 MNG_EXT mng_retcode MNG_DECL mng_getchunk_ihdr       (mng_handle       hHandle,
01125                                                       mng_handle       hChunk,
01126                                                       mng_uint32       *iWidth,
01127                                                       mng_uint32       *iHeight,
01128                                                       mng_uint8        *iBitdepth,
01129                                                       mng_uint8        *iColortype,
01130                                                       mng_uint8        *iCompression,
01131                                                       mng_uint8        *iFilter,
01132                                                       mng_uint8        *iInterlace);
01133 
01134 MNG_EXT mng_retcode MNG_DECL mng_getchunk_plte       (mng_handle       hHandle,
01135                                                       mng_handle       hChunk,
01136                                                       mng_uint32       *iCount,
01137                                                       mng_palette8     *aPalette);
01138 
01139 MNG_EXT mng_retcode MNG_DECL mng_getchunk_idat       (mng_handle       hHandle,
01140                                                       mng_handle       hChunk,
01141                                                       mng_uint32       *iRawlen,
01142                                                       mng_ptr          *pRawdata);
01143 
01144 MNG_EXT mng_retcode MNG_DECL mng_getchunk_trns       (mng_handle       hHandle,
01145                                                       mng_handle       hChunk,
01146                                                       mng_bool         *bEmpty,
01147                                                       mng_bool         *bGlobal,
01148                                                       mng_uint8        *iType,
01149                                                       mng_uint32       *iCount,
01150                                                       mng_uint8arr     *aAlphas,
01151                                                       mng_uint16       *iGray,
01152                                                       mng_uint16       *iRed,
01153                                                       mng_uint16       *iGreen,
01154                                                       mng_uint16       *iBlue,
01155                                                       mng_uint32       *iRawlen,
01156                                                       mng_uint8arr     *aRawdata);
01157 
01158 MNG_EXT mng_retcode MNG_DECL mng_getchunk_gama       (mng_handle       hHandle,
01159                                                       mng_handle       hChunk,
01160                                                       mng_bool         *bEmpty,
01161                                                       mng_uint32       *iGamma);
01162 
01163 MNG_EXT mng_retcode MNG_DECL mng_getchunk_chrm       (mng_handle       hHandle,
01164                                                       mng_handle       hChunk,
01165                                                       mng_bool         *bEmpty,
01166                                                       mng_uint32       *iWhitepointx,
01167                                                       mng_uint32       *iWhitepointy,
01168                                                       mng_uint32       *iRedx,
01169                                                       mng_uint32       *iRedy,
01170                                                       mng_uint32       *iGreenx,
01171                                                       mng_uint32       *iGreeny,
01172                                                       mng_uint32       *iBluex,
01173                                                       mng_uint32       *iBluey);
01174 
01175 MNG_EXT mng_retcode MNG_DECL mng_getchunk_srgb       (mng_handle       hHandle,
01176                                                       mng_handle       hChunk,
01177                                                       mng_bool         *bEmpty,
01178                                                       mng_uint8        *iRenderingintent);
01179 
01180 MNG_EXT mng_retcode MNG_DECL mng_getchunk_iccp       (mng_handle       hHandle,
01181                                                       mng_handle       hChunk,
01182                                                       mng_bool         *bEmpty,
01183                                                       mng_uint32       *iNamesize,
01184                                                       mng_pchar        *zName,
01185                                                       mng_uint8        *iCompression,
01186                                                       mng_uint32       *iProfilesize,
01187                                                       mng_ptr          *pProfile);
01188 
01189 MNG_EXT mng_retcode MNG_DECL mng_getchunk_text       (mng_handle       hHandle,
01190                                                       mng_handle       hChunk,
01191                                                       mng_uint32       *iKeywordsize,
01192                                                       mng_pchar        *zKeyword,
01193                                                       mng_uint32       *iTextsize,
01194                                                       mng_pchar        *zText);
01195 
01196 MNG_EXT mng_retcode MNG_DECL mng_getchunk_ztxt       (mng_handle       hHandle,
01197                                                       mng_handle       hChunk,
01198                                                       mng_uint32       *iKeywordsize,
01199                                                       mng_pchar        *zKeyword,
01200                                                       mng_uint8        *iCompression,
01201                                                       mng_uint32       *iTextsize,
01202                                                       mng_pchar        *zText);
01203 
01204 MNG_EXT mng_retcode MNG_DECL mng_getchunk_itxt       (mng_handle       hHandle,
01205                                                       mng_handle       hChunk,
01206                                                       mng_uint32       *iKeywordsize,
01207                                                       mng_pchar        *zKeyword,
01208                                                       mng_uint8        *iCompressionflag,
01209                                                       mng_uint8        *iCompressionmethod,
01210                                                       mng_uint32       *iLanguagesize,
01211                                                       mng_pchar        *zLanguage,
01212                                                       mng_uint32       *iTranslationsize,
01213                                                       mng_pchar        *zTranslation,
01214                                                       mng_uint32       *iTextsize,
01215                                                       mng_pchar        *zText);
01216 
01217 MNG_EXT mng_retcode MNG_DECL mng_getchunk_bkgd       (mng_handle       hHandle,
01218                                                       mng_handle       hChunk,
01219                                                       mng_bool         *bEmpty,
01220                                                       mng_uint8        *iType,
01221                                                       mng_uint8        *iIndex,
01222                                                       mng_uint16       *iGray,
01223                                                       mng_uint16       *iRed,
01224                                                       mng_uint16       *iGreen,
01225                                                       mng_uint16       *iBlue);
01226 
01227 MNG_EXT mng_retcode MNG_DECL mng_getchunk_phys       (mng_handle       hHandle,
01228                                                       mng_handle       hChunk,
01229                                                       mng_bool         *bEmpty,
01230                                                       mng_uint32       *iSizex,
01231                                                       mng_uint32       *iSizey,
01232                                                       mng_uint8        *iUnit);
01233 
01234 MNG_EXT mng_retcode MNG_DECL mng_getchunk_sbit       (mng_handle       hHandle,
01235                                                       mng_handle       hChunk,
01236                                                       mng_bool         *bEmpty,
01237                                                       mng_uint8        *iType,
01238                                                       mng_uint8arr4    *aBits);
01239 
01240 MNG_EXT mng_retcode MNG_DECL mng_getchunk_splt       (mng_handle       hHandle,
01241                                                       mng_handle       hChunk,
01242                                                       mng_bool         *bEmpty,
01243                                                       mng_uint32       *iNamesize,
01244                                                       mng_pchar        *zName,
01245                                                       mng_uint8        *iSampledepth,
01246                                                       mng_uint32       *iEntrycount,
01247                                                       mng_ptr          *pEntries);
01248 
01249 MNG_EXT mng_retcode MNG_DECL mng_getchunk_hist       (mng_handle       hHandle,
01250                                                       mng_handle       hChunk,
01251                                                       mng_uint32       *iEntrycount,
01252                                                       mng_uint16arr    *aEntries);
01253 
01254 MNG_EXT mng_retcode MNG_DECL mng_getchunk_time       (mng_handle       hHandle,
01255                                                       mng_handle       hChunk,
01256                                                       mng_uint16       *iYear,
01257                                                       mng_uint8        *iMonth,
01258                                                       mng_uint8        *iDay,
01259                                                       mng_uint8        *iHour,
01260                                                       mng_uint8        *iMinute,
01261                                                       mng_uint8        *iSecond);
01262 
01263 MNG_EXT mng_retcode MNG_DECL mng_getchunk_mhdr       (mng_handle       hHandle,
01264                                                       mng_handle       hChunk,
01265                                                       mng_uint32       *iWidth,
01266                                                       mng_uint32       *iHeight,
01267                                                       mng_uint32       *iTicks,
01268                                                       mng_uint32       *iLayercount,
01269                                                       mng_uint32       *iFramecount,
01270                                                       mng_uint32       *iPlaytime,
01271                                                       mng_uint32       *iSimplicity);
01272 
01273 MNG_EXT mng_retcode MNG_DECL mng_getchunk_loop       (mng_handle       hHandle,
01274                                                       mng_handle       hChunk,
01275                                                       mng_uint8        *iLevel,
01276                                                       mng_uint32       *iRepeat,
01277                                                       mng_uint8        *iTermination,
01278                                                       mng_uint32       *iItermin,
01279                                                       mng_uint32       *iItermax,
01280                                                       mng_uint32       *iCount,
01281                                                       mng_uint32p      *pSignals);
01282 
01283 MNG_EXT mng_retcode MNG_DECL mng_getchunk_endl       (mng_handle       hHandle,
01284                                                       mng_handle       hChunk,
01285                                                       mng_uint8        *iLevel);
01286 
01287 MNG_EXT mng_retcode MNG_DECL mng_getchunk_defi       (mng_handle       hHandle,
01288                                                       mng_handle       hChunk,
01289                                                       mng_uint16       *iObjectid,
01290                                                       mng_uint8        *iDonotshow,
01291                                                       mng_uint8        *iConcrete,
01292                                                       mng_bool         *bHasloca,
01293                                                       mng_int32        *iXlocation,
01294                                                       mng_int32        *iYlocation,
01295                                                       mng_bool         *bHasclip,
01296                                                       mng_int32        *iLeftcb,
01297                                                       mng_int32        *iRightcb,
01298                                                       mng_int32        *iTopcb,
01299                                                       mng_int32        *iBottomcb);
01300 
01301 MNG_EXT mng_retcode MNG_DECL mng_getchunk_basi       (mng_handle       hHandle,
01302                                                       mng_handle       hChunk,
01303                                                       mng_uint32       *iWidth,
01304                                                       mng_uint32       *iHeight,
01305                                                       mng_uint8        *iBitdepth,
01306                                                       mng_uint8        *iColortype,
01307                                                       mng_uint8        *iCompression,
01308                                                       mng_uint8        *iFilter,
01309                                                       mng_uint8        *iInterlace,
01310                                                       mng_uint16       *iRed,
01311                                                       mng_uint16       *iGreen,
01312                                                       mng_uint16       *iBlue,
01313                                                       mng_uint16       *iAlpha,
01314                                                       mng_uint8        *iViewable);
01315 
01316 MNG_EXT mng_retcode MNG_DECL mng_getchunk_clon       (mng_handle       hHandle,
01317                                                       mng_handle       hChunk,
01318                                                       mng_uint16       *iSourceid,
01319                                                       mng_uint16       *iCloneid,
01320                                                       mng_uint8        *iClonetype,
01321                                                       mng_uint8        *iDonotshow,
01322                                                       mng_uint8        *iConcrete,
01323                                                       mng_bool         *bHasloca,
01324                                                       mng_uint8        *iLocationtype,
01325                                                       mng_int32        *iLocationx,
01326                                                       mng_int32        *iLocationy);
01327 
01328 MNG_EXT mng_retcode MNG_DECL mng_getchunk_past       (mng_handle       hHandle,
01329                                                       mng_handle       hChunk,
01330                                                       mng_uint16       *iDestid,
01331                                                       mng_uint8        *iTargettype,
01332                                                       mng_int32        *iTargetx,
01333                                                       mng_int32        *iTargety,
01334                                                       mng_uint32       *iCount);
01335 
01336 MNG_EXT mng_retcode MNG_DECL mng_getchunk_past_src   (mng_handle       hHandle,
01337                                                       mng_handle       hChunk,
01338                                                       mng_uint32       iEntry,
01339                                                       mng_uint16       *iSourceid,
01340                                                       mng_uint8        *iComposition,
01341                                                       mng_uint8        *iOrientation,
01342                                                       mng_uint8        *iOffsettype,
01343                                                       mng_int32        *iOffsetx,
01344                                                       mng_int32        *iOffsety,
01345                                                       mng_uint8        *iBoundarytype,
01346                                                       mng_int32        *iBoundaryl,
01347                                                       mng_int32        *iBoundaryr,
01348                                                       mng_int32        *iBoundaryt,
01349                                                       mng_int32        *iBoundaryb);
01350 
01351 MNG_EXT mng_retcode MNG_DECL mng_getchunk_disc       (mng_handle       hHandle,
01352                                                       mng_handle       hChunk,
01353                                                       mng_uint32       *iCount,
01354                                                       mng_uint16p      *pObjectids);
01355 
01356 MNG_EXT mng_retcode MNG_DECL mng_getchunk_back       (mng_handle       hHandle,
01357                                                       mng_handle       hChunk,
01358                                                       mng_uint16       *iRed,
01359                                                       mng_uint16       *iGreen,
01360                                                       mng_uint16       *iBlue,
01361                                                       mng_uint8        *iMandatory,
01362                                                       mng_uint16       *iImageid,
01363                                                       mng_uint8        *iTile);
01364 
01365 MNG_EXT mng_retcode MNG_DECL mng_getchunk_fram       (mng_handle       hHandle,
01366                                                       mng_handle       hChunk,
01367                                                       mng_bool         *bEmpty,
01368                                                       mng_uint8        *iMode,
01369                                                       mng_uint32       *iNamesize,
01370                                                       mng_pchar        *zName,
01371                                                       mng_uint8        *iChangedelay,
01372                                                       mng_uint8        *iChangetimeout,
01373                                                       mng_uint8        *iChangeclipping,
01374                                                       mng_uint8        *iChangesyncid,
01375                                                       mng_uint32       *iDelay,
01376                                                       mng_uint32       *iTimeout,
01377                                                       mng_uint8        *iBoundarytype,
01378                                                       mng_int32        *iBoundaryl,
01379                                                       mng_int32        *iBoundaryr,
01380                                                       mng_int32        *iBoundaryt,
01381                                                       mng_int32        *iBoundaryb,
01382                                                       mng_uint32       *iCount,
01383                                                       mng_uint32p      *pSyncids);
01384 
01385 MNG_EXT mng_retcode MNG_DECL mng_getchunk_move       (mng_handle       hHandle,
01386                                                       mng_handle       hChunk,
01387                                                       mng_uint16       *iFirstid,
01388                                                       mng_uint16       *iLastid,
01389                                                       mng_uint8        *iMovetype,
01390                                                       mng_int32        *iMovex,
01391                                                       mng_int32        *iMovey);
01392 
01393 MNG_EXT mng_retcode MNG_DECL mng_getchunk_clip       (mng_handle       hHandle,
01394                                                       mng_handle       hChunk,
01395                                                       mng_uint16       *iFirstid,
01396                                                       mng_uint16       *iLastid,
01397                                                       mng_uint8        *iCliptype,
01398                                                       mng_int32        *iClipl,
01399                                                       mng_int32        *iClipr,
01400                                                       mng_int32        *iClipt,
01401                                                       mng_int32        *iClipb);
01402 
01403 MNG_EXT mng_retcode MNG_DECL mng_getchunk_show       (mng_handle       hHandle,
01404                                                       mng_handle       hChunk,
01405                                                       mng_bool         *bEmpty,
01406                                                       mng_uint16       *iFirstid,
01407                                                       mng_uint16       *iLastid,
01408                                                       mng_uint8        *iMode);
01409 
01410 MNG_EXT mng_retcode MNG_DECL mng_getchunk_term       (mng_handle       hHandle,
01411                                                       mng_handle       hChunk,
01412                                                       mng_uint8        *iTermaction,
01413                                                       mng_uint8        *iIteraction,
01414                                                       mng_uint32       *iDelay,
01415                                                       mng_uint32       *iItermax);
01416 
01417 MNG_EXT mng_retcode MNG_DECL mng_getchunk_save       (mng_handle       hHandle,
01418                                                       mng_handle       hChunk,
01419                                                       mng_bool         *bEmpty,
01420                                                       mng_uint8        *iOffsettype,
01421                                                       mng_uint32       *iCount);
01422 
01423 MNG_EXT mng_retcode MNG_DECL mng_getchunk_save_entry (mng_handle       hHandle,
01424                                                       mng_handle       hChunk,
01425                                                       mng_uint32       iEntry,
01426                                                       mng_uint8        *iEntrytype,
01427                                                       mng_uint32arr2   *iOffset,
01428                                                       mng_uint32arr2   *iStarttime,
01429                                                       mng_uint32       *iLayernr,
01430                                                       mng_uint32       *iFramenr,
01431                                                       mng_uint32       *iNamesize,
01432                                                       mng_pchar        *zName);
01433 
01434 MNG_EXT mng_retcode MNG_DECL mng_getchunk_seek       (mng_handle       hHandle,
01435                                                       mng_handle       hChunk,
01436                                                       mng_uint32       *iNamesize,
01437                                                       mng_pchar        *zName);
01438 
01439 MNG_EXT mng_retcode MNG_DECL mng_getchunk_expi       (mng_handle       hHandle,
01440                                                       mng_handle       hChunk,
01441                                                       mng_uint16       *iSnapshotid,
01442                                                       mng_uint32       *iNamesize,
01443                                                       mng_pchar        *zName);
01444 
01445 MNG_EXT mng_retcode MNG_DECL mng_getchunk_fpri       (mng_handle       hHandle,
01446                                                       mng_handle       hChunk,
01447                                                       mng_uint8        *iDeltatype,
01448                                                       mng_uint8        *iPriority);
01449 
01450 MNG_EXT mng_retcode MNG_DECL mng_getchunk_need       (mng_handle       hHandle,
01451                                                       mng_handle       hChunk,
01452                                                       mng_uint32       *iKeywordssize,
01453                                                       mng_pchar        *zKeywords);
01454 
01455 MNG_EXT mng_retcode MNG_DECL mng_getchunk_phyg       (mng_handle       hHandle,
01456                                                       mng_handle       hChunk,
01457                                                       mng_bool         *bEmpty,
01458                                                       mng_uint32       *iSizex,
01459                                                       mng_uint32       *iSizey,
01460                                                       mng_uint8        *iUnit);
01461 
01462 MNG_EXT mng_retcode MNG_DECL mng_getchunk_jhdr       (mng_handle       hHandle,
01463                                                       mng_handle       hChunk,
01464                                                       mng_uint32       *iWidth,
01465                                                       mng_uint32       *iHeight,
01466                                                       mng_uint8        *iColortype,
01467                                                       mng_uint8        *iImagesampledepth,
01468                                                       mng_uint8        *iImagecompression,
01469                                                       mng_uint8        *iImageinterlace,
01470                                                       mng_uint8        *iAlphasampledepth,
01471                                                       mng_uint8        *iAlphacompression,
01472                                                       mng_uint8        *iAlphafilter,
01473                                                       mng_uint8        *iAlphainterlace);
01474 
01475 MNG_EXT mng_retcode MNG_DECL mng_getchunk_jdat       (mng_handle       hHandle,
01476                                                       mng_handle       hChunk,
01477                                                       mng_uint32       *iRawlen,
01478                                                       mng_ptr          *pRawdata);
01479 
01480 MNG_EXT mng_retcode MNG_DECL mng_getchunk_jdaa       (mng_handle       hHandle,
01481                                                       mng_handle       hChunk,
01482                                                       mng_uint32       *iRawlen,
01483                                                       mng_ptr          *pRawdata);
01484 
01485 MNG_EXT mng_retcode MNG_DECL mng_getchunk_dhdr       (mng_handle       hHandle,
01486                                                       mng_handle       hChunk,
01487                                                       mng_uint16       *iObjectid,
01488                                                       mng_uint8        *iImagetype,
01489                                                       mng_uint8        *iDeltatype,
01490                                                       mng_uint32       *iBlockwidth,
01491                                                       mng_uint32       *iBlockheight,
01492                                                       mng_uint32       *iBlockx,
01493                                                       mng_uint32       *iBlocky);
01494 
01495 MNG_EXT mng_retcode MNG_DECL mng_getchunk_prom       (mng_handle       hHandle,
01496                                                       mng_handle       hChunk,
01497                                                       mng_uint8        *iColortype,
01498                                                       mng_uint8        *iSampledepth,
01499                                                       mng_uint8        *iFilltype);
01500 
01501 MNG_EXT mng_retcode MNG_DECL mng_getchunk_pplt       (mng_handle       hHandle,
01502                                                       mng_handle       hChunk,
01503                                                       mng_uint32       *iCount);
01504 
01505 MNG_EXT mng_retcode MNG_DECL mng_getchunk_pplt_entry (mng_handle       hHandle,
01506                                                       mng_handle       hChunk,
01507                                                       mng_uint32       iEntry,
01508                                                       mng_uint16       *iRed,
01509                                                       mng_uint16       *iGreen,
01510                                                       mng_uint16       *iBlue,
01511                                                       mng_uint16       *iAlpha,
01512                                                       mng_bool         *bUsed);
01513 
01514 MNG_EXT mng_retcode MNG_DECL mng_getchunk_drop       (mng_handle       hHandle,
01515                                                       mng_handle       hChunk,
01516                                                       mng_uint32       *iCount,
01517                                                       mng_chunkidp     *pChunknames);
01518 
01519 MNG_EXT mng_retcode MNG_DECL mng_getchunk_dbyk       (mng_handle       hHandle,
01520                                                       mng_handle       hChunk,
01521                                                       mng_chunkid      *iChunkname,
01522                                                       mng_uint8        *iPolarity,
01523                                                       mng_uint32       *iKeywordssize,
01524                                                       mng_pchar        *zKeywords);
01525 
01526 MNG_EXT mng_retcode MNG_DECL mng_getchunk_ordr       (mng_handle       hHandle,
01527                                                       mng_handle       hChunk,
01528                                                       mng_uint32       *iCount);
01529 
01530 MNG_EXT mng_retcode MNG_DECL mng_getchunk_ordr_entry (mng_handle       hHandle,
01531                                                       mng_handle       hChunk,
01532                                                       mng_uint32       iEntry,
01533                                                       mng_chunkid      *iChunkname,
01534                                                       mng_uint8        *iOrdertype);
01535 
01536 MNG_EXT mng_retcode MNG_DECL mng_getchunk_magn       (mng_handle       hHandle,
01537                                                       mng_handle       hChunk,
01538                                                       mng_uint16       *iFirstid,
01539                                                       mng_uint16       *iLastid,
01540                                                       mng_uint16       *iMethodX,
01541                                                       mng_uint16       *iMX,
01542                                                       mng_uint16       *iMY,
01543                                                       mng_uint16       *iML,
01544                                                       mng_uint16       *iMR,
01545                                                       mng_uint16       *iMT,
01546                                                       mng_uint16       *iMB,
01547                                                       mng_uint16       *iMethodY);
01548 
01549 MNG_EXT mng_retcode MNG_DECL mng_getchunk_unknown    (mng_handle       hHandle,
01550                                                       mng_handle       hChunk,
01551                                                       mng_chunkid      *iChunkname,
01552                                                       mng_uint32       *iRawlen,
01553                                                       mng_ptr          *pRawdata);
01554 
01555 /* ************************************************************************** */
01556 
01557 #ifdef MNG_INCLUDE_WRITE_PROCS
01558 
01559 /* use these to create new chunks at the end of the chunk-list */
01560 /* requires at least MNG_ACCESS_CHUNKS (MNG_SUPPORT_WRITE may be nice too) */
01561 MNG_EXT mng_retcode MNG_DECL mng_putchunk_ihdr       (mng_handle       hHandle,
01562                                                       mng_uint32       iWidth,
01563                                                       mng_uint32       iHeight,
01564                                                       mng_uint8        iBitdepth,
01565                                                       mng_uint8        iColortype,
01566                                                       mng_uint8        iCompression,
01567                                                       mng_uint8        iFilter,
01568                                                       mng_uint8        iInterlace);
01569 
01570 MNG_EXT mng_retcode MNG_DECL mng_putchunk_plte       (mng_handle       hHandle,
01571                                                       mng_uint32       iCount,
01572                                                       mng_palette8     aPalette);
01573 
01574 MNG_EXT mng_retcode MNG_DECL mng_putchunk_idat       (mng_handle       hHandle,
01575                                                       mng_uint32       iRawlen,
01576                                                       mng_ptr          pRawdata);
01577 
01578 MNG_EXT mng_retcode MNG_DECL mng_putchunk_iend       (mng_handle       hHandle);
01579 
01580 MNG_EXT mng_retcode MNG_DECL mng_putchunk_trns       (mng_handle       hHandle,
01581                                                       mng_bool         bEmpty,
01582                                                       mng_bool         bGlobal,
01583                                                       mng_uint8        iType,
01584                                                       mng_uint32       iCount,
01585                                                       mng_uint8arr     aAlphas,
01586                                                       mng_uint16       iGray,
01587                                                       mng_uint16       iRed,
01588                                                       mng_uint16       iGreen,
01589                                                       mng_uint16       iBlue,
01590                                                       mng_uint32       iRawlen,
01591                                                       mng_uint8arr     aRawdata);
01592 
01593 MNG_EXT mng_retcode MNG_DECL mng_putchunk_gama       (mng_handle       hHandle,
01594                                                       mng_bool         bEmpty,
01595                                                       mng_uint32       iGamma);
01596 
01597 MNG_EXT mng_retcode MNG_DECL mng_putchunk_chrm       (mng_handle       hHandle,
01598                                                       mng_bool         bEmpty,
01599                                                       mng_uint32       iWhitepointx,
01600                                                       mng_uint32       iWhitepointy,
01601                                                       mng_uint32       iRedx,
01602                                                       mng_uint32       iRedy,
01603                                                       mng_uint32       iGreenx,
01604                                                       mng_uint32       iGreeny,
01605                                                       mng_uint32       iBluex,
01606                                                       mng_uint32       iBluey);
01607 
01608 MNG_EXT mng_retcode MNG_DECL mng_putchunk_srgb       (mng_handle       hHandle,
01609                                                       mng_bool         bEmpty,
01610                                                       mng_uint8        iRenderingintent);
01611 
01612 MNG_EXT mng_retcode MNG_DECL mng_putchunk_iccp       (mng_handle       hHandle,
01613                                                       mng_bool         bEmpty,
01614                                                       mng_uint32       iNamesize,
01615                                                       mng_pchar        zName,
01616                                                       mng_uint8        iCompression,
01617                                                       mng_uint32       iProfilesize,
01618                                                       mng_ptr          pProfile);
01619 
01620 MNG_EXT mng_retcode MNG_DECL mng_putchunk_text       (mng_handle       hHandle,
01621                                                       mng_uint32       iKeywordsize,
01622                                                       mng_pchar        zKeyword,
01623                                                       mng_uint32       iTextsize,
01624                                                       mng_pchar        zText);
01625 
01626 MNG_EXT mng_retcode MNG_DECL mng_putchunk_ztxt       (mng_handle       hHandle,
01627                                                       mng_uint32       iKeywordsize,
01628                                                       mng_pchar        zKeyword,
01629                                                       mng_uint8        iCompression,
01630                                                       mng_uint32       iTextsize,
01631                                                       mng_pchar        zText);
01632 
01633 MNG_EXT mng_retcode MNG_DECL mng_putchunk_itxt       (mng_handle       hHandle,
01634                                                       mng_uint32       iKeywordsize,
01635                                                       mng_pchar        zKeyword,
01636                                                       mng_uint8        iCompressionflag,
01637                                                       mng_uint8        iCompressionmethod,
01638                                                       mng_uint32       iLanguagesize,
01639                                                       mng_pchar        zLanguage,
01640                                                       mng_uint32       iTranslationsize,
01641                                                       mng_pchar        zTranslation,
01642                                                       mng_uint32       iTextsize,
01643                                                       mng_pchar        zText);
01644 
01645 MNG_EXT mng_retcode MNG_DECL mng_putchunk_bkgd       (mng_handle       hHandle,
01646                                                       mng_bool         bEmpty,
01647                                                       mng_uint8        iType,
01648                                                       mng_uint8        iIndex,
01649                                                       mng_uint16       iGray,
01650                                                       mng_uint16       iRed,
01651                                                       mng_uint16       iGreen,
01652                                                       mng_uint16       iBlue);
01653 
01654 MNG_EXT mng_retcode MNG_DECL mng_putchunk_phys       (mng_handle       hHandle,
01655                                                       mng_bool         bEmpty,
01656                                                       mng_uint32       iSizex,
01657                                                       mng_uint32       iSizey,
01658                                                       mng_uint8        iUnit);
01659 
01660 MNG_EXT mng_retcode MNG_DECL mng_putchunk_sbit       (mng_handle       hHandle,
01661                                                       mng_bool         bEmpty,
01662                                                       mng_uint8        iType,
01663                                                       mng_uint8arr4    aBits);
01664 
01665 MNG_EXT mng_retcode MNG_DECL mng_putchunk_splt       (mng_handle       hHandle,
01666                                                       mng_bool         bEmpty,
01667                                                       mng_uint32       iNamesize,
01668                                                       mng_pchar        zName,
01669                                                       mng_uint8        iSampledepth,
01670                                                       mng_uint32       iEntrycount,
01671                                                       mng_ptr          pEntries);
01672 
01673 MNG_EXT mng_retcode MNG_DECL mng_putchunk_hist       (mng_handle       hHandle,
01674                                                       mng_uint32       iEntrycount,
01675                                                       mng_uint16arr    aEntries);
01676 
01677 MNG_EXT mng_retcode MNG_DECL mng_putchunk_time       (mng_handle       hHandle,
01678                                                       mng_uint16       iYear,
01679                                                       mng_uint8        iMonth,
01680                                                       mng_uint8        iDay,
01681                                                       mng_uint8        iHour,
01682                                                       mng_uint8        iMinute,
01683                                                       mng_uint8        iSecond);
01684 
01685 MNG_EXT mng_retcode MNG_DECL mng_putchunk_mhdr       (mng_handle       hHandle,
01686                                                       mng_uint32       iWidth,
01687                                                       mng_uint32       iHeight,
01688                                                       mng_uint32       iTicks,
01689                                                       mng_uint32       iLayercount,
01690                                                       mng_uint32       iFramecount,
01691                                                       mng_uint32       iPlaytime,
01692                                                       mng_uint32       iSimplicity);
01693 
01694 MNG_EXT mng_retcode MNG_DECL mng_putchunk_mend       (mng_handle       hHandle);
01695 
01696 MNG_EXT mng_retcode MNG_DECL mng_putchunk_loop       (mng_handle       hHandle,
01697                                                       mng_uint8        iLevel,
01698                                                       mng_uint32       iRepeat,
01699                                                       mng_uint8        iTermination,
01700                                                       mng_uint32       iItermin,
01701                                                       mng_uint32       iItermax,
01702                                                       mng_uint32       iCount,
01703                                                       mng_uint32p      pSignals);
01704 
01705 MNG_EXT mng_retcode MNG_DECL mng_putchunk_endl       (mng_handle       hHandle,
01706                                                       mng_uint8        iLevel);
01707 
01708 MNG_EXT mng_retcode MNG_DECL mng_putchunk_defi       (mng_handle       hHandle,
01709                                                       mng_uint16       iObjectid,
01710                                                       mng_uint8        iDonotshow,
01711                                                       mng_uint8        iConcrete,
01712                                                       mng_bool         bHasloca,
01713                                                       mng_int32        iXlocation,
01714                                                       mng_int32        iYlocation,
01715                                                       mng_bool         bHasclip,
01716                                                       mng_int32        iLeftcb,
01717                                                       mng_int32        iRightcb,
01718                                                       mng_int32        iTopcb,
01719                                                       mng_int32        iBottomcb);
01720 
01721 MNG_EXT mng_retcode MNG_DECL mng_putchunk_basi       (mng_handle       hHandle,
01722                                                       mng_uint32       iWidth,
01723                                                       mng_uint32       iHeight,
01724                                                       mng_uint8        iBitdepth,
01725                                                       mng_uint8        iColortype,
01726                                                       mng_uint8        iCompression,
01727                                                       mng_uint8        iFilter,
01728                                                       mng_uint8        iInterlace,
01729                                                       mng_uint16       iRed,
01730                                                       mng_uint16       iGreen,
01731                                                       mng_uint16       iBlue,
01732                                                       mng_uint16       iAlpha,
01733                                                       mng_uint8        iViewable);
01734 
01735 MNG_EXT mng_retcode MNG_DECL mng_putchunk_clon       (mng_handle       hHandle,
01736                                                       mng_uint16       iSourceid,
01737                                                       mng_uint16       iCloneid,
01738                                                       mng_uint8        iClonetype,
01739                                                       mng_uint8        iDonotshow,
01740                                                       mng_uint8        iConcrete,
01741                                                       mng_bool         bHasloca,
01742                                                       mng_uint8        iLocationtype,
01743                                                       mng_int32        iLocationx,
01744                                                       mng_int32        iLocationy);
01745 
01746 MNG_EXT mng_retcode MNG_DECL mng_putchunk_past       (mng_handle       hHandle,
01747                                                       mng_uint16       iDestid,
01748                                                       mng_uint8        iTargettype,
01749                                                       mng_int32        iTargetx,
01750                                                       mng_int32        iTargety,
01751                                                       mng_uint32       iCount);
01752 
01753 MNG_EXT mng_retcode MNG_DECL mng_putchunk_past_src   (mng_handle       hHandle,
01754                                                       mng_uint32       iEntry,
01755                                                       mng_uint16       iSourceid,
01756                                                       mng_uint8        iComposition,
01757                                                       mng_uint8        iOrientation,
01758                                                       mng_uint8        iOffsettype,
01759                                                       mng_int32        iOffsetx,
01760                                                       mng_int32        iOffsety,
01761                                                       mng_uint8        iBoundarytype,
01762                                                       mng_int32        iBoundaryl,
01763                                                       mng_int32        iBoundaryr,
01764                                                       mng_int32        iBoundaryt,
01765                                                       mng_int32        iBoundaryb);
01766 
01767 MNG_EXT mng_retcode MNG_DECL mng_putchunk_disc       (mng_handle       hHandle,
01768                                                       mng_uint32       iCount,
01769                                                       mng_uint16p      pObjectids);
01770 
01771 MNG_EXT mng_retcode MNG_DECL mng_putchunk_back       (mng_handle       hHandle,
01772                                                       mng_uint16       iRed,
01773                                                       mng_uint16       iGreen,
01774                                                       mng_uint16       iBlue,
01775                                                       mng_uint8        iMandatory,
01776                                                       mng_uint16       iImageid,
01777                                                       mng_uint8        iTile);
01778 
01779 MNG_EXT mng_retcode MNG_DECL mng_putchunk_fram       (mng_handle       hHandle,
01780                                                       mng_bool         bEmpty,
01781                                                       mng_uint8        iMode,
01782                                                       mng_uint32       iNamesize,
01783                                                       mng_pchar        zName,
01784                                                       mng_uint8        iChangedelay,
01785                                                       mng_uint8        iChangetimeout,
01786                                                       mng_uint8        iChangeclipping,
01787                                                       mng_uint8        iChangesyncid,
01788                                                       mng_uint32       iDelay,
01789                                                       mng_uint32       iTimeout,
01790                                                       mng_uint8        iBoundarytype,
01791                                                       mng_int32        iBoundaryl,
01792                                                       mng_int32        iBoundaryr,
01793                                                       mng_int32        iBoundaryt,
01794                                                       mng_int32        iBoundaryb,
01795                                                       mng_uint32       iCount,
01796                                                       mng_uint32p      pSyncids);
01797 
01798 MNG_EXT mng_retcode MNG_DECL mng_putchunk_move       (mng_handle       hHandle,
01799                                                       mng_uint16       iFirstid,
01800                                                       mng_uint16       iLastid,
01801                                                       mng_uint8        iMovetype,
01802                                                       mng_int32        iMovex,
01803                                                       mng_int32        iMovey);
01804 
01805 MNG_EXT mng_retcode MNG_DECL mng_putchunk_clip       (mng_handle       hHandle,
01806                                                       mng_uint16       iFirstid,
01807                                                       mng_uint16       iLastid,
01808                                                       mng_uint8        iCliptype,
01809                                                       mng_int32        iClipl,
01810                                                       mng_int32        iClipr,
01811                                                       mng_int32        iClipt,
01812                                                       mng_int32        iClipb);
01813 
01814 MNG_EXT mng_retcode MNG_DECL mng_putchunk_show       (mng_handle       hHandle,
01815                                                       mng_bool         bEmpty,
01816                                                       mng_uint16       iFirstid,
01817                                                       mng_uint16       iLastid,
01818                                                       mng_uint8        iMode);
01819 
01820 MNG_EXT mng_retcode MNG_DECL mng_putchunk_term       (mng_handle       hHandle,
01821                                                       mng_uint8        iTermaction,
01822                                                       mng_uint8        iIteraction,
01823                                                       mng_uint32       iDelay,
01824                                                       mng_uint32       iItermax);
01825 
01826 MNG_EXT mng_retcode MNG_DECL mng_putchunk_save       (mng_handle       hHandle,
01827                                                       mng_bool         bEmpty,
01828                                                       mng_uint8        iOffsettype,
01829                                                       mng_uint32       iCount);
01830 
01831 MNG_EXT mng_retcode MNG_DECL mng_putchunk_save_entry (mng_handle       hHandle,
01832                                                       mng_uint32       iEntry,
01833                                                       mng_uint8        iEntrytype,
01834                                                       mng_uint32arr2   iOffset,
01835                                                       mng_uint32arr2   iStarttime,
01836                                                       mng_uint32       iLayernr,
01837                                                       mng_uint32       iFramenr,
01838                                                       mng_uint32       iNamesize,
01839                                                       mng_pchar        zName);
01840 
01841 MNG_EXT mng_retcode MNG_DECL mng_putchunk_seek       (mng_handle       hHandle,
01842                                                       mng_uint32       iNamesize,
01843                                                       mng_pchar        zName);
01844 
01845 MNG_EXT mng_retcode MNG_DECL mng_putchunk_expi       (mng_handle       hHandle,
01846                                                       mng_uint16       iSnapshotid,
01847                                                       mng_uint32       iNamesize,
01848                                                       mng_pchar        zName);
01849 
01850 MNG_EXT mng_retcode MNG_DECL mng_putchunk_fpri       (mng_handle       hHandle,
01851                                                       mng_uint8        iDeltatype,
01852                                                       mng_uint8        iPriority);
01853 
01854 MNG_EXT mng_retcode MNG_DECL mng_putchunk_need       (mng_handle       hHandle,
01855                                                       mng_uint32       iKeywordssize,
01856                                                       mng_pchar        zKeywords);
01857 
01858 MNG_EXT mng_retcode MNG_DECL mng_putchunk_phyg       (mng_handle       hHandle,
01859                                                       mng_bool         bEmpty,
01860                                                       mng_uint32       iSizex,
01861                                                       mng_uint32       iSizey,
01862                                                       mng_uint8        iUnit);
01863 
01864 MNG_EXT mng_retcode MNG_DECL mng_putchunk_jhdr       (mng_handle       hHandle,
01865                                                       mng_uint32       iWidth,
01866                                                       mng_uint32       iHeight,
01867                                                       mng_uint8        iColortype,
01868                                                       mng_uint8        iImagesampledepth,
01869                                                       mng_uint8        iImagecompression,
01870                                                       mng_uint8        iImageinterlace,
01871                                                       mng_uint8        iAlphasampledepth,
01872                                                       mng_uint8        iAlphacompression,
01873                                                       mng_uint8        iAlphafilter,
01874                                                       mng_uint8        iAlphainterlace);
01875 
01876 MNG_EXT mng_retcode MNG_DECL mng_putchunk_jdat       (mng_handle       hHandle,
01877                                                       mng_uint32       iRawlen,
01878                                                       mng_ptr          pRawdata);
01879 
01880 MNG_EXT mng_retcode MNG_DECL mng_putchunk_jdaa       (mng_handle       hHandle,
01881                                                       mng_uint32       iRawlen,
01882                                                       mng_ptr          pRawdata);
01883 
01884 MNG_EXT mng_retcode MNG_DECL mng_putchunk_jsep       (mng_handle       hHandle);
01885 
01886 MNG_EXT mng_retcode MNG_DECL mng_putchunk_dhdr       (mng_handle       hHandle,
01887                                                       mng_uint16       iObjectid,
01888                                                       mng_uint8        iImagetype,
01889                                                       mng_uint8        iDeltatype,
01890                                                       mng_uint32       iBlockwidth,
01891                                                       mng_uint32       iBlockheight,
01892                                                       mng_uint32       iBlockx,
01893                                                       mng_uint32       iBlocky);
01894 
01895 MNG_EXT mng_retcode MNG_DECL mng_putchunk_prom       (mng_handle       hHandle,
01896                                                       mng_uint8        iColortype,
01897                                                       mng_uint8        iSampledepth,
01898                                                       mng_uint8        iFilltype);
01899 
01900 MNG_EXT mng_retcode MNG_DECL mng_putchunk_ipng       (mng_handle       hHandle);
01901 
01902 MNG_EXT mng_retcode MNG_DECL mng_putchunk_pplt       (mng_handle       hHandle,
01903                                                       mng_uint32       iCount);
01904 
01905 MNG_EXT mng_retcode MNG_DECL mng_putchunk_pplt_entry (mng_handle       hHandle,
01906                                                       mng_uint32       iEntry,
01907                                                       mng_uint16       iRed,
01908                                                       mng_uint16       iGreen,
01909                                                       mng_uint16       iBlue,
01910                                                       mng_uint16       iAlpha,
01911                                                       mng_bool         bUsed);
01912 
01913 MNG_EXT mng_retcode MNG_DECL mng_putchunk_jpng       (mng_handle       hHandle);
01914 
01915 MNG_EXT mng_retcode MNG_DECL mng_putchunk_drop       (mng_handle       hHandle,
01916                                                       mng_uint32       iCount,
01917                                                       mng_chunkidp     pChunknames);
01918 
01919 MNG_EXT mng_retcode MNG_DECL mng_putchunk_dbyk       (mng_handle       hHandle,
01920                                                       mng_chunkid      iChunkname,
01921                                                       mng_uint8        iPolarity,
01922                                                       mng_uint32       iKeywordssize,
01923                                                       mng_pchar        zKeywords);
01924 
01925 MNG_EXT mng_retcode MNG_DECL mng_putchunk_ordr       (mng_handle       hHandle,
01926                                                       mng_uint32       iCount);
01927 
01928 MNG_EXT mng_retcode MNG_DECL mng_putchunk_ordr_entry (mng_handle       hHandle,
01929                                                       mng_uint32       iEntry,
01930                                                       mng_chunkid      iChunkname,
01931                                                       mng_uint8        iOrdertype);
01932 
01933 MNG_EXT mng_retcode MNG_DECL mng_putchunk_magn       (mng_handle       hHandle,
01934                                                       mng_uint16       iFirstid,
01935                                                       mng_uint16       iLastid,
01936                                                       mng_uint16       iMethodX,
01937                                                       mng_uint16       iMX,
01938                                                       mng_uint16       iMY,
01939                                                       mng_uint16       iML,
01940                                                       mng_uint16       iMR,
01941                                                       mng_uint16       iMT,
01942                                                       mng_uint16       iMB,
01943                                                       mng_uint16       iMethodY);
01944 
01945 MNG_EXT mng_retcode MNG_DECL mng_putchunk_unknown    (mng_handle       hHandle,
01946                                                       mng_chunkid      iChunkname,
01947                                                       mng_uint32       iRawlen,
01948                                                       mng_ptr          pRawdata);
01949 
01950 #endif /* MNG_INCLUDE_WRITE_PROCS */
01951 
01952 /* ************************************************************************** */
01953 
01954 /* use these functions to access the actual image-data in stored chunks,
01955    as opposed to the IDAT/JDAT data */
01956 /* to get accurate pixel-data the canvasstyle should seriously reflect the
01957    bitdepth/colortype combination of the preceding IHDR/JHDR/BASI/DHDR;
01958    all input can be converted to rgb(a)8 (rgb(a)16 for 16-bit images), but
01959    there are only limited conversions back (see below for putimgdata)  */
01960 
01961 /* call this function if you want to extract the nth image from the list;
01962    the first image is designated seqnr 0! */
01963 /* this function finds the IHDR/JHDR/BASI/DHDR with the appropriate seqnr,
01964    starting from the beginning of the chunk-list; this may tend to get a little
01965    slow for animations with a large number of chunks for images near the end */
01966 /* supplying a seqnr past the last image in the animation will return with
01967    an errorcode */   
01968 MNG_EXT mng_retcode MNG_DECL mng_getimgdata_seq      (mng_handle        hHandle,
01969                                                       mng_uint32        iSeqnr,
01970                                                       mng_uint32        iCanvasstyle,
01971                                                       mng_getcanvasline fGetcanvasline);
01972 
01973 /* both the following functions will search forward to find the first IDAT/JDAT,
01974    and then traverse back to find the start of the image (IHDR,JHDR,DHDR,BASI);
01975    note that this is very fast compared to decoding the IDAT/JDAT, so there's
01976    not really a need for optimization; either can be called from the
01977    iterate_chunks callback when a IHDR/JHDR is encountered; for BASI/DHDR there
01978    may not be real image-data so it's wisest to keep iterating till the IEND,
01979    and then call either of these functions if necessary (remember the correct seqnr!) */
01980 
01981 /* call this function if you want to extract the image starting at or after the nth
01982    position in the chunk-list; this number is returned in the iterate_chunks callback */
01983 MNG_EXT mng_retcode MNG_DECL mng_getimgdata_chunkseq (mng_handle        hHandle,
01984                                                       mng_uint32        iSeqnr,
01985                                                       mng_uint32        iCanvasstyle,
01986                                                       mng_getcanvasline fGetcanvasline);
01987 
01988 /* call this function if you want to extract the image starting at or after the
01989    indicated chunk; the handle of a chunk is returned in the iterate_chunks callback */
01990 MNG_EXT mng_retcode MNG_DECL mng_getimgdata_chunk    (mng_handle        hHandle,
01991                                                       mng_handle        hChunk,
01992                                                       mng_uint32        iCanvasstyle,
01993                                                       mng_getcanvasline fGetcanvasline);
01994 
01995 /* ************************************************************************** */
01996 
01997 #ifdef MNG_INCLUDE_WRITE_PROCS
01998 
01999 /* use the following functions to add image-data to the list of stored chunks */
02000 /* note that this only adds the IDAT or JDAT chunks and no others; you must call
02001    one of these functions after you 'put' the initial chunks of the image and
02002    before you 'put' the closing chunks */
02003 /* the canvasstyle should seriously reflect the bitdepth/colortype combination;
02004    eg. bitdepth=16 would expect a 16-bit canvasstyle,
02005    colortype=g or ga would expect a gray or gray+alpha style respectively
02006    and so on, and so forth ...
02007    (nb. the number of conversions will be extremely limited for the moment!) */
02008 
02009 MNG_EXT mng_retcode MNG_DECL mng_putimgdata_ihdr     (mng_handle        hHandle,
02010                                                       mng_uint32        iWidth,
02011                                                       mng_uint32        iHeight,
02012                                                       mng_uint8         iColortype,
02013                                                       mng_uint8         iBitdepth,
02014                                                       mng_uint8         iCompression,
02015                                                       mng_uint8         iFilter,
02016                                                       mng_uint8         iInterlace,
02017                                                       mng_uint32        iCanvasstyle,
02018                                                       mng_getcanvasline fGetcanvasline);
02019 
02020 MNG_EXT mng_retcode MNG_DECL mng_putimgdata_jhdr     (mng_handle        hHandle,
02021                                                       mng_uint32        iWidth,
02022                                                       mng_uint32        iHeight,
02023                                                       mng_uint8         iColortype,
02024                                                       mng_uint8         iBitdepth,
02025                                                       mng_uint8         iCompression,
02026                                                       mng_uint8         iInterlace,
02027                                                       mng_uint8         iAlphaBitdepth,
02028                                                       mng_uint8         iAlphaCompression,
02029                                                       mng_uint8         iAlphaFilter,
02030                                                       mng_uint8         iAlphaInterlace,
02031                                                       mng_uint32        iCanvasstyle,
02032                                                       mng_getcanvasline fGetcanvasline);
02033 
02034 /* ************************************************************************** */
02035 
02036 /* use the following functions to set the framecount/layercount/playtime or
02037    simplicity of an animation you are creating; this may be useful if these
02038    variables are calculated during the creation-process */
02039 
02040 MNG_EXT mng_retcode MNG_DECL mng_updatemngheader     (mng_handle        hHandle,
02041                                                       mng_uint32        iFramecount,
02042                                                       mng_uint32        iLayercount,
02043                                                       mng_uint32        iPlaytime);
02044 
02045 MNG_EXT mng_retcode MNG_DECL mng_updatemngsimplicity (mng_handle        hHandle,
02046                                                       mng_uint32        iSimplicity);
02047 
02048 /* ************************************************************************** */
02049 
02050 #endif /* MNG_INCLUDE_WRITE_PROCS */
02051 
02052 #endif /* MNG_ACCESS_CHUNKS */
02053 
02054 /* ************************************************************************** */
02055 /* *                                                                        * */
02056 /* * Error-code structure                                                   * */
02057 /* *                                                                        * */
02058 /* * 0b0000 00xx xxxx xxxx - basic errors; severity 9 (environment)         * */
02059 /* * 0b0000 01xx xxxx xxxx - chunk errors; severity 9 (image induced)       * */
02060 /* * 0b0000 10xx xxxx xxxx - severity 5 errors (application induced)        * */
02061 /* * 0b0001 00xx xxxx xxxx - severity 2 warnings (recoverable)              * */
02062 /* * 0b0010 00xx xxxx xxxx - severity 1 warnings (recoverable)              * */
02063 /* *                                                                        * */
02064 /* ************************************************************************** */
02065 
02066 #define MNG_NOERROR          (mng_retcode)0    /* er.. indicates all's well   */
02067 
02068 #define MNG_OUTOFMEMORY      (mng_retcode)1    /* oops, buy some megabytes!   */
02069 #define MNG_INVALIDHANDLE    (mng_retcode)2    /* call mng_initialize first   */
02070 #define MNG_NOCALLBACK       (mng_retcode)3    /* set the callbacks please    */
02071 #define MNG_UNEXPECTEDEOF    (mng_retcode)4    /* what'd ya do with the data? */
02072 #define MNG_ZLIBERROR        (mng_retcode)5    /* zlib burped                 */
02073 #define MNG_JPEGERROR        (mng_retcode)6    /* jpglib complained           */
02074 #define MNG_LCMSERROR        (mng_retcode)7    /* little cms stressed out     */
02075 #define MNG_NOOUTPUTPROFILE  (mng_retcode)8    /* no output-profile defined   */
02076 #define MNG_NOSRGBPROFILE    (mng_retcode)9    /* no sRGB-profile defined     */
02077 #define MNG_BUFOVERFLOW      (mng_retcode)10   /* zlib output-buffer overflow */
02078 #define MNG_FUNCTIONINVALID  (mng_retcode)11   /* ay, totally inappropriate   */
02079 #define MNG_OUTPUTERROR      (mng_retcode)12   /* disk full ?                 */
02080 #define MNG_JPEGBUFTOOSMALL  (mng_retcode)13   /* can't handle buffer overflow*/
02081 #define MNG_NEEDMOREDATA     (mng_retcode)14   /* I'm hungry, give me more    */
02082 #define MNG_NEEDTIMERWAIT    (mng_retcode)15   /* Sleep a while then wake me  */
02083 #define MNG_NEEDSECTIONWAIT  (mng_retcode)16   /* just processed a SEEK       */
02084 #define MNG_LOOPWITHCACHEOFF (mng_retcode)17   /* LOOP when playback info off */
02085 
02086 #define MNG_DLLNOTLOADED     (mng_retcode)99   /* late binding failed         */
02087 
02088 #define MNG_APPIOERROR       (mng_retcode)901  /* application I/O error       */
02089 #define MNG_APPTIMERERROR    (mng_retcode)902  /* application timing error    */
02090 #define MNG_APPCMSERROR      (mng_retcode)903  /* application CMS error       */
02091 #define MNG_APPMISCERROR     (mng_retcode)904  /* application other error     */
02092 #define MNG_APPTRACEABORT    (mng_retcode)905  /* application aborts on trace */
02093 
02094 #define MNG_INTERNALERROR    (mng_retcode)999  /* internal inconsistancy      */
02095 
02096 #define MNG_INVALIDSIG       (mng_retcode)1025 /* invalid graphics file       */
02097 #define MNG_INVALIDCRC       (mng_retcode)1027 /* crc check failed            */
02098 #define MNG_INVALIDLENGTH    (mng_retcode)1028 /* chunklength mystifies me    */
02099 #define MNG_SEQUENCEERROR    (mng_retcode)1029 /* invalid chunk sequence      */
02100 #define MNG_CHUNKNOTALLOWED  (mng_retcode)1030 /* completely out-of-place     */
02101 #define MNG_MULTIPLEERROR    (mng_retcode)1031 /* only one occurence allowed  */
02102 #define MNG_PLTEMISSING      (mng_retcode)1032 /* indexed-color requires PLTE */
02103 #define MNG_IDATMISSING      (mng_retcode)1033 /* IHDR-block requires IDAT    */
02104 #define MNG_CANNOTBEEMPTY    (mng_retcode)1034 /* must contain some data      */
02105 #define MNG_GLOBALLENGTHERR  (mng_retcode)1035 /* global data incorrect       */
02106 #define MNG_INVALIDBITDEPTH  (mng_retcode)1036 /* bitdepth out-of-range       */
02107 #define MNG_INVALIDCOLORTYPE (mng_retcode)1037 /* colortype out-of-range      */
02108 #define MNG_INVALIDCOMPRESS  (mng_retcode)1038 /* compression method invalid  */
02109 #define MNG_INVALIDFILTER    (mng_retcode)1039 /* filter method invalid       */
02110 #define MNG_INVALIDINTERLACE (mng_retcode)1040 /* interlace method invalid    */
02111 #define MNG_NOTENOUGHIDAT    (mng_retcode)1041 /* ran out of compressed data  */
02112 #define MNG_PLTEINDEXERROR   (mng_retcode)1042 /* palette-index out-of-range  */
02113 #define MNG_NULLNOTFOUND     (mng_retcode)1043 /* couldn't find null-separator*/
02114 #define MNG_KEYWORDNULL      (mng_retcode)1044 /* keyword cannot be empty     */
02115 #define MNG_OBJECTUNKNOWN    (mng_retcode)1045 /* the object can't be found   */
02116 #define MNG_OBJECTEXISTS     (mng_retcode)1046 /* the object already exists   */
02117 #define MNG_TOOMUCHIDAT      (mng_retcode)1047 /* got too much compressed data*/
02118 #define MNG_INVSAMPLEDEPTH   (mng_retcode)1048 /* sampledepth out-of-range    */
02119 #define MNG_INVOFFSETSIZE    (mng_retcode)1049 /* invalid offset-size         */
02120 #define MNG_INVENTRYTYPE     (mng_retcode)1050 /* invalid entry-type          */
02121 #define MNG_ENDWITHNULL      (mng_retcode)1051 /* may not end with NULL       */
02122 #define MNG_INVIMAGETYPE     (mng_retcode)1052 /* invalid image_type          */
02123 #define MNG_INVDELTATYPE     (mng_retcode)1053 /* invalid delta_type          */
02124 #define MNG_INVALIDINDEX     (mng_retcode)1054 /* index-value invalid         */
02125 #define MNG_TOOMUCHJDAT      (mng_retcode)1055 /* got too much compressed data*/
02126 #define MNG_JPEGPARMSERR     (mng_retcode)1056 /* JHDR/JPEG parms do not match*/
02127 #define MNG_INVFILLMETHOD    (mng_retcode)1057 /* invalid fill_method         */
02128 #define MNG_OBJNOTCONCRETE   (mng_retcode)1058 /* object must be concrete     */
02129 #define MNG_TARGETNOALPHA    (mng_retcode)1059 /* object has no alpha-channel */
02130 #define MNG_MNGTOOCOMPLEX    (mng_retcode)1060 /* can't handle complexity     */
02131 #define MNG_UNKNOWNCRITICAL  (mng_retcode)1061 /* unknown critical chunk found*/
02132 #define MNG_UNSUPPORTEDNEED  (mng_retcode)1062 /* nEED requirement unsupported*/
02133 #define MNG_INVALIDDELTA     (mng_retcode)1063 /* Delta operation illegal     */
02134 #define MNG_INVALIDMETHOD    (mng_retcode)1064 /* invalid MAGN method         */
02135 
02136 #define MNG_INVALIDCNVSTYLE  (mng_retcode)2049 /* can't make anything of this */
02137 #define MNG_WRONGCHUNK       (mng_retcode)2050 /* accessing the wrong chunk   */
02138 #define MNG_INVALIDENTRYIX   (mng_retcode)2051 /* accessing the wrong entry   */
02139 #define MNG_NOHEADER         (mng_retcode)2052 /* must have had header first  */
02140 #define MNG_NOCORRCHUNK      (mng_retcode)2053 /* can't find parent chunk     */
02141 #define MNG_NOMHDR           (mng_retcode)2054 /* no MNG header available     */
02142 
02143 #define MNG_IMAGETOOLARGE    (mng_retcode)4097 /* input-image way too big     */
02144 #define MNG_NOTANANIMATION   (mng_retcode)4098 /* file not a MNG              */
02145 #define MNG_FRAMENRTOOHIGH   (mng_retcode)4099 /* frame-nr out-of-range       */
02146 #define MNG_LAYERNRTOOHIGH   (mng_retcode)4100 /* layer-nr out-of-range       */
02147 #define MNG_PLAYTIMETOOHIGH  (mng_retcode)4101 /* playtime out-of-range       */
02148 #define MNG_FNNOTIMPLEMENTED (mng_retcode)4102 /* function not yet available  */
02149 
02150 #define MNG_IMAGEFROZEN      (mng_retcode)8193 /* stopped displaying          */
02151 
02152 #define MNG_LCMS_NOHANDLE    1                 /* LCMS returned NULL handle   */
02153 #define MNG_LCMS_NOMEM       2                 /* LCMS returned NULL gammatab */
02154 #define MNG_LCMS_NOTRANS     3                 /* LCMS returned NULL transform*/
02155 
02156 /* ************************************************************************** */
02157 /* *                                                                        * */
02158 /* *  Canvas styles                                                         * */
02159 /* *                                                                        * */
02160 /* *  Note that the intentions are pretty darn good, but that the focus     * */
02161 /* *  is currently on 8-bit color support                                   * */
02162 /* *                                                                        * */
02163 /* *  The RGB8_A8 style is defined for apps that require a separate         * */
02164 /* *  canvas for the color-planes and the alpha-plane (eg. mozilla)         * */
02165 /* *  This requires for the app to supply the "getalphaline" callback!!!    * */
02166 /* *                                                                        * */
02167 /* ************************************************************************** */
02168 
02169 #define MNG_CANVAS_RGB8      0x00000000L
02170 #define MNG_CANVAS_RGBA8     0x00001000L
02171 #define MNG_CANVAS_ARGB8     0x00003000L
02172 #define MNG_CANVAS_RGB8_A8   0x00005000L
02173 #define MNG_CANVAS_BGR8      0x00000001L
02174 #define MNG_CANVAS_BGRA8     0x00001001L
02175 #define MNG_CANVAS_BGRA8PM   0x00009001L
02176 #define MNG_CANVAS_ABGR8     0x00003001L
02177 #define MNG_CANVAS_RGB16     0x00000100L         /* not supported yet */
02178 #define MNG_CANVAS_RGBA16    0x00001100L         /* not supported yet */
02179 #define MNG_CANVAS_ARGB16    0x00003100L         /* not supported yet */
02180 #define MNG_CANVAS_BGR16     0x00000101L         /* not supported yet */
02181 #define MNG_CANVAS_BGRA16    0x00001101L         /* not supported yet */
02182 #define MNG_CANVAS_ABGR16    0x00003101L         /* not supported yet */
02183 #define MNG_CANVAS_GRAY8     0x00000002L         /* not supported yet */
02184 #define MNG_CANVAS_GRAY16    0x00000102L         /* not supported yet */
02185 #define MNG_CANVAS_GRAYA8    0x00001002L         /* not supported yet */
02186 #define MNG_CANVAS_GRAYA16   0x00001102L         /* not supported yet */
02187 #define MNG_CANVAS_AGRAY8    0x00003002L         /* not supported yet */
02188 #define MNG_CANVAS_AGRAY16   0x00003102L         /* not supported yet */
02189 #define MNG_CANVAS_DX15      0x00000003L         /* not supported yet */
02190 #define MNG_CANVAS_DX16      0x00000004L         /* not supported yet */
02191 
02192 #define MNG_CANVAS_PIXELTYPE(C)  (C & 0x000000FFL)
02193 #define MNG_CANVAS_BITDEPTH(C)   (C & 0x00000100L)
02194 #define MNG_CANVAS_HASALPHA(C)   (C & 0x00001000L)
02195 #define MNG_CANVAS_ALPHAFIRST(C) (C & 0x00002000L)
02196 #define MNG_CANVAS_ALPHASEPD(C)  (C & 0x00004000L)
02197 #define MNG_CANVAS_ALPHAPM(C)    (C & 0x00008000L)
02198 
02199 #define MNG_CANVAS_RGB(C)        (MNG_CANVAS_PIXELTYPE (C) == 0)
02200 #define MNG_CANVAS_BGR(C)        (MNG_CANVAS_PIXELTYPE (C) == 1)
02201 #define MNG_CANVAS_GRAY(C)       (MNG_CANVAS_PIXELTYPE (C) == 2)
02202 #define MNG_CANVAS_DIRECTX15(C)  (MNG_CANVAS_PIXELTYPE (C) == 3)
02203 #define MNG_CANVAS_DIRECTX16(C)  (MNG_CANVAS_PIXELTYPE (C) == 4)
02204 #define MNG_CANVAS_8BIT(C)       (!MNG_CANVAS_BITDEPTH (C))
02205 #define MNG_CANVAS_16BIT(C)      (MNG_CANVAS_BITDEPTH (C))
02206 #define MNG_CANVAS_PIXELFIRST(C) (!MNG_CANVAS_ALPHAFIRST (C))
02207 
02208 /* ************************************************************************** */
02209 /* *                                                                        * */
02210 /* *  Chunk names (idea adapted from libpng 1.1.0 - png.h)                  * */
02211 /* *                                                                        * */
02212 /* ************************************************************************** */
02213 
02214 #define MNG_UINT_HUH  0x40404040L
02215 
02216 #define MNG_UINT_BACK 0x4241434bL
02217 #define MNG_UINT_BASI 0x42415349L
02218 #define MNG_UINT_CLIP 0x434c4950L
02219 #define MNG_UINT_CLON 0x434c4f4eL
02220 #define MNG_UINT_DBYK 0x4442594bL
02221 #define MNG_UINT_DEFI 0x44454649L
02222 #define MNG_UINT_DHDR 0x44484452L
02223 #define MNG_UINT_DISC 0x44495343L
02224 #define MNG_UINT_DROP 0x44524f50L
02225 #define MNG_UINT_ENDL 0x454e444cL
02226 #define MNG_UINT_FRAM 0x4652414dL
02227 #define MNG_UINT_IDAT 0x49444154L
02228 #define MNG_UINT_IEND 0x49454e44L
02229 #define MNG_UINT_IHDR 0x49484452L
02230 #define MNG_UINT_IJNG 0x494a4e47L
02231 #define MNG_UINT_IPNG 0x49504e47L
02232 #define MNG_UINT_JDAA 0x4a444141L
02233 #define MNG_UINT_JDAT 0x4a444154L
02234 #define MNG_UINT_JHDR 0x4a484452L
02235 #define MNG_UINT_JSEP 0x4a534550L
02236 #define MNG_UINT_JdAA 0x4a644141L
02237 #define MNG_UINT_LOOP 0x4c4f4f50L
02238 #define MNG_UINT_MAGN 0x4d41474eL
02239 #define MNG_UINT_MEND 0x4d454e44L
02240 #define MNG_UINT_MHDR 0x4d484452L
02241 #define MNG_UINT_MOVE 0x4d4f5645L
02242 #define MNG_UINT_ORDR 0x4f524452L
02243 #define MNG_UINT_PAST 0x50415354L
02244 #define MNG_UINT_PLTE 0x504c5445L
02245 #define MNG_UINT_PPLT 0x50504c54L
02246 #define MNG_UINT_PROM 0x50524f4dL
02247 #define MNG_UINT_SAVE 0x53415645L
02248 #define MNG_UINT_SEEK 0x5345454bL
02249 #define MNG_UINT_SHOW 0x53484f57L
02250 #define MNG_UINT_TERM 0x5445524dL
02251 #define MNG_UINT_bKGD 0x624b4744L
02252 #define MNG_UINT_cHRM 0x6348524dL
02253 #define MNG_UINT_eXPI 0x65585049L
02254 #define MNG_UINT_fPRI 0x66505249L
02255 #define MNG_UINT_gAMA 0x67414d41L
02256 #define MNG_UINT_hIST 0x68495354L
02257 #define MNG_UINT_iCCP 0x69434350L
02258 #define MNG_UINT_iTXt 0x69545874L
02259 #define MNG_UINT_nEED 0x6e454544L
02260 #define MNG_UINT_oFFs 0x6f464673L
02261 #define MNG_UINT_pCAL 0x7043414cL
02262 #define MNG_UINT_pHYg 0x70444167L
02263 #define MNG_UINT_pHYs 0x70485973L
02264 #define MNG_UINT_sBIT 0x73424954L
02265 #define MNG_UINT_sCAL 0x7343414cL
02266 #define MNG_UINT_sPLT 0x73504c54L
02267 #define MNG_UINT_sRGB 0x73524742L
02268 #define MNG_UINT_tEXt 0x74455874L
02269 #define MNG_UINT_tIME 0x74494d45L
02270 #define MNG_UINT_tRNS 0x74524e53L
02271 #define MNG_UINT_zTXt 0x7a545874L
02272 
02273 /* ************************************************************************** */
02274 /* *                                                                        * */
02275 /* *  Chunk property values                                                 * */
02276 /* *                                                                        * */
02277 /* ************************************************************************** */
02278 
02279 #define MNG_BITDEPTH_1                   1       /* IHDR, BASI, JHDR, PROM */
02280 #define MNG_BITDEPTH_2                   2
02281 #define MNG_BITDEPTH_4                   4
02282 #define MNG_BITDEPTH_8                   8       /* sPLT */
02283 #define MNG_BITDEPTH_16                 16
02284 
02285 #define MNG_COLORTYPE_GRAY               0       /* IHDR, BASI, PROM */
02286 #define MNG_COLORTYPE_RGB                2
02287 #define MNG_COLORTYPE_INDEXED            3
02288 #define MNG_COLORTYPE_GRAYA              4
02289 #define MNG_COLORTYPE_RGBA               6
02290 
02291 #define MNG_COMPRESSION_DEFLATE          0       /* IHDR, zTXt, iTXt, iCCP,
02292                                                     BASI, JHDR */
02293 
02294 #define MNG_FILTER_ADAPTIVE              0       /* IHDR, BASI, JHDR */
02295 /* #define MNG_FILTER_NO_ADAPTIVE           1 */
02296 #define MNG_FILTER_NO_DIFFERING          0
02297 #define MNG_FILTER_DIFFERING             0x40
02298 /* #define MNG_FILTER_MASK                  (MNG_FILTER_NO_ADAPTIVE | MNG_FILTER_DIFFERING) */
02299 
02300 #define MNG_INTERLACE_NONE               0       /* IHDR, BASI, JHDR */
02301 #define MNG_INTERLACE_ADAM7              1
02302 
02303 #define MNG_FILTER_NONE                  0       /* IDAT */
02304 #define MNG_FILTER_SUB                   1
02305 #define MNG_FILTER_UP                    2
02306 #define MNG_FILTER_AVERAGE               3
02307 #define MNG_FILTER_PAETH                 4
02308 
02309 #define MNG_INTENT_PERCEPTUAL            0       /* sRGB */
02310 #define MNG_INTENT_RELATIVECOLORIMETRIC  1
02311 #define MNG_INTENT_SATURATION            2
02312 #define MNG_INTENT_ABSOLUTECOLORIMETRIC  3
02313                                                  /* tEXt, zTXt, iTXt */
02314 #define MNG_TEXT_TITLE                   "Title"
02315 #define MNG_TEXT_AUTHOR                  "Author"
02316 #define MNG_TEXT_DESCRIPTION             "Description"
02317 #define MNG_TEXT_COPYRIGHT               "Copyright"
02318 #define MNG_TEXT_CREATIONTIME            "Creation Time"
02319 #define MNG_TEXT_SOFTWARE                "Software"
02320 #define MNG_TEXT_DISCLAIMER              "Disclaimer"
02321 #define MNG_TEXT_WARNING                 "Warning"
02322 #define MNG_TEXT_SOURCE                  "Source"
02323 #define MNG_TEXT_COMMENT                 "Comment"
02324 
02325 #define MNG_FLAG_UNCOMPRESSED            0       /* iTXt */
02326 #define MNG_FLAG_COMPRESSED              1
02327 
02328 #define MNG_UNIT_UNKNOWN                 0       /* pHYs, pHYg */
02329 #define MNG_UNIT_METER                   1
02330                                                  /* MHDR */
02331 #define MNG_SIMPLICITY_VALID             0x00000001
02332 #define MNG_SIMPLICITY_SIMPLEFEATURES    0x00000002
02333 #define MNG_SIMPLICITY_COMPLEXFEATURES   0x00000004
02334 #define MNG_SIMPLICITY_TRANSPARENCY      0x00000008
02335 #define MNG_SIMPLICITY_JNG               0x00000010
02336 #define MNG_SIMPLICITY_DELTAPNG          0x00000020
02337 
02338 #define MNG_TERMINATION_DECODER_NC       0       /* LOOP */
02339 #define MNG_TERMINATION_USER_NC          1
02340 #define MNG_TERMINATION_EXTERNAL_NC      2
02341 #define MNG_TERMINATION_DETERMINISTIC_NC 3
02342 #define MNG_TERMINATION_DECODER_C        4
02343 #define MNG_TERMINATION_USER_C           5
02344 #define MNG_TERMINATION_EXTERNAL_C       6
02345 #define MNG_TERMINATION_DETERMINISTIC_C  7
02346 
02347 #define MNG_DONOTSHOW_VISIBLE            0       /* DEFI */
02348 #define MNG_DONOTSHOW_NOTVISIBLE         1
02349 
02350 #define MNG_ABSTRACT                     0       /* DEFI */
02351 #define MNG_CONCRETE                     1
02352 
02353 #define MNG_NOTVIEWABLE                  0       /* BASI */
02354 #define MNG_VIEWABLE                     1
02355 
02356 #define MNG_FULL_CLONE                   0       /* CLON */
02357 #define MNG_PARTIAL_CLONE                1
02358 #define MNG_RENUMBER                     2
02359 
02360 #define MNG_CONCRETE_ASPARENT            0       /* CLON */
02361 #define MNG_CONCRETE_MAKEABSTRACT        1
02362 
02363 #define MNG_LOCATION_ABSOLUTE            0       /* CLON, MOVE */
02364 #define MNG_LOCATION_RELATIVE            1
02365 
02366 #define MNG_TARGET_ABSOLUTE              0       /* PAST */
02367 #define MNG_TARGET_RELATIVE_SAMEPAST     1
02368 #define MNG_TARGET_RELATIVE_PREVPAST     2
02369 
02370 #define MNG_COMPOSITE_OVER               0       /* PAST */
02371 #define MNG_COMPOSITE_REPLACE            1
02372 #define MNG_COMPOSITE_UNDER              2
02373 
02374 #define MNG_ORIENTATION_SAME             0       /* PAST */
02375 #define MNG_ORIENTATION_180DEG           2
02376 #define MNG_ORIENTATION_FLIPHORZ         4
02377 #define MNG_ORIENTATION_FLIPVERT         6
02378 #define MNG_ORIENTATION_TILED            8
02379 
02380 #define MNG_OFFSET_ABSOLUTE              0       /* PAST */
02381 #define MNG_OFFSET_RELATIVE              1
02382 
02383 #define MNG_BOUNDARY_ABSOLUTE            0       /* PAST, FRAM */
02384 #define MNG_BOUNDARY_RELATIVE            1
02385 
02386 #define MNG_BACKGROUNDCOLOR_MANDATORY    0x01    /* BACK */
02387 #define MNG_BACKGROUNDIMAGE_MANDATORY    0x02    /* BACK */
02388 
02389 #define MNG_BACKGROUNDIMAGE_NOTILE       0       /* BACK */
02390 #define MNG_BACKGROUNDIMAGE_TILE         1
02391 
02392 #define MNG_FRAMINGMODE_NOCHANGE         0       /* FRAM */
02393 #define MNG_FRAMINGMODE_1                1
02394 #define MNG_FRAMINGMODE_2                2
02395 #define MNG_FRAMINGMODE_3                3
02396 #define MNG_FRAMINGMODE_4                4
02397 
02398 #define MNG_CHANGEDELAY_NO               0       /* FRAM */
02399 #define MNG_CHANGEDELAY_NEXTSUBFRAME     1
02400 #define MNG_CHANGEDELAY_DEFAULT          2
02401 
02402 #define MNG_CHANGETIMOUT_NO              0       /* FRAM */
02403 #define MNG_CHANGETIMOUT_DETERMINISTIC_1 1
02404 #define MNG_CHANGETIMOUT_DETERMINISTIC_2 2
02405 #define MNG_CHANGETIMOUT_DECODER_1       3
02406 #define MNG_CHANGETIMOUT_DECODER_2       4
02407 #define MNG_CHANGETIMOUT_USER_1          5
02408 #define MNG_CHANGETIMOUT_USER_2          6
02409 #define MNG_CHANGETIMOUT_EXTERNAL_1      7
02410 #define MNG_CHANGETIMOUT_EXTERNAL_2      8
02411 
02412 #define MNG_CHANGECLIPPING_NO            0       /* FRAM */
02413 #define MNG_CHANGECLIPPING_NEXTSUBFRAME  1
02414 #define MNG_CHANGECLIPPING_DEFAULT       2
02415 
02416 #define MNG_CHANGESYNCID_NO              0       /* FRAM */
02417 #define MNG_CHANGESYNCID_NEXTSUBFRAME    1
02418 #define MNG_CHANGESYNCID_DEFAULT         2
02419 
02420 #define MNG_CLIPPING_ABSOLUTE            0       /* CLIP */
02421 #define MNG_CLIPPING_RELATIVE            1
02422 
02423 #define MNG_SHOWMODE_0                   0       /* SHOW */
02424 #define MNG_SHOWMODE_1                   1
02425 #define MNG_SHOWMODE_2                   2
02426 #define MNG_SHOWMODE_3                   3
02427 #define MNG_SHOWMODE_4                   4
02428 #define MNG_SHOWMODE_5                   5
02429 #define MNG_SHOWMODE_6                   6
02430 #define MNG_SHOWMODE_7                   7
02431 
02432 #define MNG_TERMACTION_LASTFRAME         0       /* TERM */
02433 #define MNG_TERMACTION_CLEAR             1
02434 #define MNG_TERMACTION_FIRSTFRAME        2
02435 #define MNG_TERMACTION_REPEAT            3
02436 
02437 #define MNG_ITERACTION_LASTFRAME         0       /* TERM */
02438 #define MNG_ITERACTION_CLEAR             1
02439 #define MNG_ITERACTION_FIRSTFRAME        2
02440 
02441 #define MNG_SAVEOFFSET_4BYTE             4       /* SAVE */
02442 #define MNG_SAVEOFFSET_8BYTE             8
02443 
02444 #define MNG_SAVEENTRY_SEGMENTFULL        0       /* SAVE */
02445 #define MNG_SAVEENTRY_SEGMENT            1
02446 #define MNG_SAVEENTRY_SUBFRAME           2
02447 #define MNG_SAVEENTRY_EXPORTEDIMAGE      3
02448 
02449 #define MNG_PRIORITY_ABSOLUTE            0       /* fPRI */
02450 #define MNG_PRIORITY_RELATIVE            1
02451 
02452 #ifdef MNG_INCLUDE_JNG
02453 #define MNG_COLORTYPE_JPEGGRAY           8       /* JHDR */
02454 #define MNG_COLORTYPE_JPEGCOLOR         10
02455 #define MNG_COLORTYPE_JPEGGRAYA         12
02456 #define MNG_COLORTYPE_JPEGCOLORA        14
02457 
02458 #define MNG_BITDEPTH_JPEG8               8       /* JHDR */
02459 #define MNG_BITDEPTH_JPEG12             12
02460 #define MNG_BITDEPTH_JPEG8AND12         20
02461 
02462 #define MNG_COMPRESSION_BASELINEJPEG     8       /* JHDR */
02463 
02464 #define MNG_INTERLACE_SEQUENTIAL         0       /* JHDR */
02465 #define MNG_INTERLACE_PROGRESSIVE        8
02466 #endif /* MNG_INCLUDE_JNG */
02467 
02468 #define MNG_IMAGETYPE_UNKNOWN            0       /* DHDR */
02469 #define MNG_IMAGETYPE_PNG                1
02470 #define MNG_IMAGETYPE_JNG                2
02471 
02472 #define MNG_DELTATYPE_REPLACE            0       /* DHDR */
02473 #define MNG_DELTATYPE_BLOCKPIXELADD      1
02474 #define MNG_DELTATYPE_BLOCKALPHAADD      2
02475 #define MNG_DELTATYPE_BLOCKCOLORADD      3
02476 #define MNG_DELTATYPE_BLOCKPIXELREPLACE  4
02477 #define MNG_DELTATYPE_BLOCKALPHAREPLACE  5
02478 #define MNG_DELTATYPE_BLOCKCOLORREPLACE  6
02479 #define MNG_DELTATYPE_NOCHANGE           7
02480 
02481 #define MNG_FILLMETHOD_LEFTBITREPLICATE  0       /* PROM */
02482 #define MNG_FILLMETHOD_ZEROFILL          1
02483 
02484 #define MNG_DELTATYPE_REPLACERGB         0       /* PPLT */
02485 #define MNG_DELTATYPE_DELTARGB           1
02486 #define MNG_DELTATYPE_REPLACEALPHA       2
02487 #define MNG_DELTATYPE_DELTAALPHA         3
02488 #define MNG_DELTATYPE_REPLACERGBA        4
02489 #define MNG_DELTATYPE_DELTARGBA          5
02490 
02491 #define MNG_POLARITY_ONLY                0       /* DBYK */
02492 #define MNG_POLARITY_ALLBUT              1
02493 
02494 /* ************************************************************************** */
02495 /* *                                                                        * */
02496 /* *  Processtext callback types                                            * */
02497 /* *                                                                        * */
02498 /* ************************************************************************** */
02499 
02500 #define MNG_TYPE_TEXT 0
02501 #define MNG_TYPE_ZTXT 1
02502 #define MNG_TYPE_ITXT 2
02503 
02504 /* ************************************************************************** */
02505 
02506 #ifdef __cplusplus
02507 }
02508 #endif
02509 
02510 #endif /* _libmng_h_ */
02511 
02512 /* ************************************************************************** */
02513 /* * end of file                                                            * */
02514 /* ************************************************************************** */
02515 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'