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

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 574 lines · 324 code · 73 blank · 177 comment · 12 complexity · 45b4515acf810cb9fc4bcb571847b3ea MD5 · raw file

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