📄 libmng_trace.h
字号:
/* ************************************************************************** *//* * For conditions of distribution and use, * *//* * see copyright notice in libmng.h * *//* ************************************************************************** *//* * * *//* * project : libmng * *//* * file : libmng_trace.h copyright (c) 2000 G.Juyn * *//* * version : 1.0.3 * *//* * * *//* * purpose : Trace functions (definition) * *//* * * *//* * author : G.Juyn * *//* * web : http://www.3-t.com * *//* * email : mailto:info@3-t.com * *//* * * *//* * comment : Definition of the trace functions * *//* * * *//* * changes : 0.5.1 - 05/08/2000 - G.Juyn * *//* * - added chunk-access function trace-codes * *//* * - changed strict-ANSI stuff * *//* * 0.5.1 - 05/12/2000 - G.Juyn * *//* * - changed trace to macro for callback error-reporting * *//* * 0.5.1 - 05/13/2000 - G.Juyn * *//* * - added save_state & restore_state trace-codes * *//* * 0.5.1 - 05/15/2000 - G.Juyn * *//* * - added getimgdata & putimgdata trace-codes * *//* * * *//* * 0.5.2 - 05/20/2000 - G.Juyn * *//* * - added JNG tracecodes * *//* * 0.5.2 - 05/23/2000 - G.Juyn * *//* * - added trace-table entry definition * *//* * 0.5.2 - 05/24/2000 - G.Juyn * *//* * - added tracecodes for global animation color-chunks * *//* * - added tracecodes for get/set of default ZLIB/IJG parms * *//* * - added tracecodes for global PLTE,tRNS,bKGD * *//* * 0.5.2 - 05/30/2000 - G.Juyn * *//* * - added tracecodes for image-object promotion * *//* * - added tracecodes for delta-image processing * *//* * 0.5.2 - 06/02/2000 - G.Juyn * *//* * - added tracecodes for getalphaline callback * *//* * 0.5.2 - 06/05/2000 - G.Juyn * *//* * - added tracecode for RGB8_A8 canvasstyle * *//* * 0.5.2 - 06/06/2000 - G.Juyn * *//* * - added tracecode for mng_read_resume HLAPI function * *//* * * *//* * 0.5.3 - 06/06/2000 - G.Juyn * *//* * - added tracecodes for tracing JPEG progression * *//* * 0.5.3 - 06/21/2000 - G.Juyn * *//* * - added tracecodes for get/set speedtype * *//* * - added tracecodes for get imagelevel * *//* * 0.5.3 - 06/22/2000 - G.Juyn * *//* * - added tracecode for delta-image processing * *//* * - added tracecodes for PPLT chunk processing * *//* * * *//* * 0.9.1 - 07/07/2000 - G.Juyn * *//* * - added tracecodes for special display processing * *//* * 0.9.1 - 07/08/2000 - G.Juyn * *//* * - added tracecode for get/set suspensionmode * *//* * - added tracecodes for get/set display variables * *//* * - added tracecode for read_databuffer (I/O-suspension) * *//* * 0.9.1 - 07/15/2000 - G.Juyn * *//* * - added tracecodes for SAVE/SEEK callbacks * *//* * - added tracecodes for get/set sectionbreaks * *//* * - added tracecode for special error routine * *//* * 0.9.1 - 07/19/2000 - G.Juyn * *//* * - added tracecode for updatemngheader * *//* * * *//* * 0.9.2 - 07/31/2000 - G.Juyn * *//* * - added tracecodes for status_xxxxx functions * *//* * 0.9.2 - 08/05/2000 - G.Juyn * *//* * - changed file-prefixes * *//* * - added tracecode for updatemngsimplicity * *//* * * *//* * 0.9.3 - 08/26/2000 - G.Juyn * *//* * - added MAGN chunk * *//* * 0.9.3 - 09/07/2000 - G.Juyn * *//* * - added support for new filter_types * *//* * 0.9.3 - 10/10/2000 - G.Juyn * *//* * - added support for alpha-depth prediction * *//* * 0.9.3 - 10/11/2000 - G.Juyn * *//* * - added JDAA chunk * *//* * - added support for nEED * *//* * 0.9.3 - 10/16/2000 - G.Juyn * *//* * - added functions to retrieve PNG/JNG specific header-info * *//* * - added optional support for bKGD for PNG images * *//* * 0.9.3 - 10/17/2000 - G.Juyn * *//* * - added callback to process non-critical unknown chunks * *//* * - added routine to discard "invalid" objects * *//* * 0.9.3 - 10/19/2000 - G.Juyn * *//* * - implemented delayed delta-processing * *//* * 0.9.3 - 10/20/2000 - G.Juyn * *//* * - added get/set for bKGD preference setting * *//* * 0.9.3 - 10/21/2000 - G.Juyn * *//* * - added get function for interlace/progressive display * *//* * * *//* * 0.9.4 - 1/18/2001 - G.Juyn * *//* * - added "new" MAGN methods 3, 4 & 5 * *//* * * *//* * 1.0.1 - 02/08/2001 - G.Juyn * *//* * - added MEND processing callback * *//* * 1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly) * *//* * - added BGRA8 canvas with premultiplied alpha * *//* * 1.0.1 - 05/02/2001 - G.Juyn * *//* * - added "default" sRGB generation (Thanks Marti!) * *//* * * *//* * 1.0.2 - 06/23/2001 - G.Juyn * *//* * - added optimization option for MNG-video playback * *//* * - added processterm callback * *//* * 1.0.2 - 06/25/2001 - G.Juyn * *//* * - added option to turn off progressive refresh * *//* * * *//* * 1.0.3 - 08/06/2001 - G.Juyn * *//* * - added get function for last processed BACK chunk * *//* * * *//* ************************************************************************** */#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)#pragma option -A /* force ANSI-C */#endif#ifndef _libmng_trace_h_#define _libmng_trace_h_/* ************************************************************************** */#ifdef MNG_INCLUDE_TRACE_PROCS/* ************************************************************************** *//* TODO: add a trace-mask so certain functions can be excluded */mng_retcode mng_trace (mng_datap pData, mng_uint32 iFunction, mng_uint32 iLocation);/* ************************************************************************** */#define MNG_TRACE(D,F,L) { mng_retcode iR = mng_trace (D,F,L); \ if (iR) return iR; }#define MNG_TRACEB(D,F,L) { if (mng_trace (D,F,L)) return MNG_FALSE; }#define MNG_TRACEX(D,F,L) { if (mng_trace (D,F,L)) return 0; }/* ************************************************************************** */#define MNG_LC_START 1#define MNG_LC_END 2#define MNG_LC_INITIALIZE 3#define MNG_LC_CLEANUP 4/* ************************************************************************** */#define MNG_LC_JPEG_CREATE_DECOMPRESS 101#define MNG_LC_JPEG_READ_HEADER 102#define MNG_LC_JPEG_START_DECOMPRESS 103#define MNG_LC_JPEG_START_OUTPUT 104#define MNG_LC_JPEG_READ_SCANLINES 105#define MNG_LC_JPEG_FINISH_OUTPUT 106#define MNG_LC_JPEG_FINISH_DECOMPRESS 107#define MNG_LC_JPEG_DESTROY_DECOMPRESS 108/* ************************************************************************** */#define MNG_FN_INITIALIZE 1#define MNG_FN_RESET 2#define MNG_FN_CLEANUP 3#define MNG_FN_READ 4#define MNG_FN_WRITE 5#define MNG_FN_CREATE 6#define MNG_FN_READDISPLAY 7#define MNG_FN_DISPLAY 8#define MNG_FN_DISPLAY_RESUME 9#define MNG_FN_DISPLAY_FREEZE 10#define MNG_FN_DISPLAY_RESET 11#define MNG_FN_DISPLAY_GOFRAME 12#define MNG_FN_DISPLAY_GOLAYER 13#define MNG_FN_DISPLAY_GOTIME 14#define MNG_FN_GETLASTERROR 15#define MNG_FN_READ_RESUME 16#define MNG_FN_SETCB_MEMALLOC 101#define MNG_FN_SETCB_MEMFREE 102#define MNG_FN_SETCB_READDATA 103#define MNG_FN_SETCB_WRITEDATA 104#define MNG_FN_SETCB_ERRORPROC 105#define MNG_FN_SETCB_TRACEPROC 106#define MNG_FN_SETCB_PROCESSHEADER 107#define MNG_FN_SETCB_PROCESSTEXT 108#define MNG_FN_SETCB_GETCANVASLINE 109#define MNG_FN_SETCB_GETBKGDLINE 110#define MNG_FN_SETCB_REFRESH 111#define MNG_FN_SETCB_GETTICKCOUNT 112#define MNG_FN_SETCB_SETTIMER 113#define MNG_FN_SETCB_PROCESSGAMMA 114#define MNG_FN_SETCB_PROCESSCHROMA 115#define MNG_FN_SETCB_PROCESSSRGB 116#define MNG_FN_SETCB_PROCESSICCP 117#define MNG_FN_SETCB_PROCESSAROW 118#define MNG_FN_SETCB_OPENSTREAM 119#define MNG_FN_SETCB_CLOSESTREAM 120#define MNG_FN_SETCB_GETALPHALINE 121#define MNG_FN_SETCB_PROCESSSAVE 122#define MNG_FN_SETCB_PROCESSSEEK 123#define MNG_FN_SETCB_PROCESSNEED 124#define MNG_FN_SETCB_PROCESSUNKNOWN 125#define MNG_FN_SETCB_PROCESSMEND 126#define MNG_FN_SETCB_PROCESSTERM 127#define MNG_FN_GETCB_MEMALLOC 201#define MNG_FN_GETCB_MEMFREE 202#define MNG_FN_GETCB_READDATA 203#define MNG_FN_GETCB_WRITEDATA 204#define MNG_FN_GETCB_ERRORPROC 205#define MNG_FN_GETCB_TRACEPROC 206#define MNG_FN_GETCB_PROCESSHEADER 207#define MNG_FN_GETCB_PROCESSTEXT 208#define MNG_FN_GETCB_GETCANVASLINE 209#define MNG_FN_GETCB_GETBKGDLINE 210#define MNG_FN_GETCB_REFRESH 211#define MNG_FN_GETCB_GETTICKCOUNT 212#define MNG_FN_GETCB_SETTIMER 213#define MNG_FN_GETCB_PROCESSGAMMA 214#define MNG_FN_GETCB_PROCESSCHROMA 215#define MNG_FN_GETCB_PROCESSSRGB 216#define MNG_FN_GETCB_PROCESSICCP 217#define MNG_FN_GETCB_PROCESSAROW 218#define MNG_FN_GETCB_OPENSTREAM 219#define MNG_FN_GETCB_CLOSESTREAM 220#define MNG_FN_GETCB_GETALPHALINE 221#define MNG_FN_GETCB_PROCESSSAVE 222#define MNG_FN_GETCB_PROCESSSEEK 223#define MNG_FN_GETCB_PROCESSNEED 224#define MNG_FN_GETCB_PROCESSUNKNOWN 225#define MNG_FN_GETCB_PROCESSMEND 226#define MNG_FN_GETCB_PROCESSTERM 227#define MNG_FN_SET_USERDATA 301#define MNG_FN_SET_CANVASSTYLE 302#define MNG_FN_SET_BKGDSTYLE 303#define MNG_FN_SET_BGCOLOR 304#define MNG_FN_SET_STORECHUNKS 305#define MNG_FN_SET_VIEWGAMMA 306#define MNG_FN_SET_DISPLAYGAMMA 307#define MNG_FN_SET_DFLTIMGGAMMA 308#define MNG_FN_SET_SRGB 309#define MNG_FN_SET_OUTPUTPROFILE 310#define MNG_FN_SET_SRGBPROFILE 311#define MNG_FN_SET_MAXCANVASWIDTH 312#define MNG_FN_SET_MAXCANVASHEIGHT 313#define MNG_FN_SET_MAXCANVASSIZE 314#define MNG_FN_SET_ZLIB_LEVEL 315#define MNG_FN_SET_ZLIB_METHOD 316#define MNG_FN_SET_ZLIB_WINDOWBITS 317#define MNG_FN_SET_ZLIB_MEMLEVEL 318#define MNG_FN_SET_ZLIB_STRATEGY 319#define MNG_FN_SET_ZLIB_MAXIDAT 320#define MNG_FN_SET_JPEG_DCTMETHOD 321#define MNG_FN_SET_JPEG_QUALITY 322#define MNG_FN_SET_JPEG_SMOOTHING 323#define MNG_FN_SET_JPEG_PROGRESSIVE 324#define MNG_FN_SET_JPEG_OPTIMIZED 325#define MNG_FN_SET_JPEG_MAXJDAT 326#define MNG_FN_SET_SPEED 327#define MNG_FN_SET_SUSPENSIONMODE 328#define MNG_FN_SET_SECTIONBREAKS 329#define MNG_FN_SET_USEBKGD 330#define MNG_FN_SET_OUTPUTPROFILE2 331#define MNG_FN_SET_SRGBPROFILE2 332#define MNG_FN_SET_OUTPUTSRGB 333#define MNG_FN_SET_SRGBIMPLICIT 334#define MNG_FN_SET_CACHEPLAYBACK 335#define MNG_FN_SET_DOPROGRESSIVE 336#define MNG_FN_GET_USERDATA 401#define MNG_FN_GET_SIGTYPE 402#define MNG_FN_GET_IMAGETYPE 403#define MNG_FN_GET_IMAGEWIDTH 404#define MNG_FN_GET_IMAGEHEIGHT 405#define MNG_FN_GET_TICKS 406#define MNG_FN_GET_FRAMECOUNT 407#define MNG_FN_GET_LAYERCOUNT 408#define MNG_FN_GET_PLAYTIME 409#define MNG_FN_GET_SIMPLICITY 410#define MNG_FN_GET_CANVASSTYLE 411#define MNG_FN_GET_BKGDSTYLE 412#define MNG_FN_GET_BGCOLOR 413#define MNG_FN_GET_STORECHUNKS 414#define MNG_FN_GET_VIEWGAMMA 415#define MNG_FN_GET_DISPLAYGAMMA 416#define MNG_FN_GET_DFLTIMGGAMMA 417#define MNG_FN_GET_SRGB 418#define MNG_FN_GET_MAXCANVASWIDTH 419#define MNG_FN_GET_MAXCANVASHEIGHT 420#define MNG_FN_GET_ZLIB_LEVEL 421#define MNG_FN_GET_ZLIB_METHOD 422#define MNG_FN_GET_ZLIB_WINDOWBITS 423#define MNG_FN_GET_ZLIB_MEMLEVEL 424#define MNG_FN_GET_ZLIB_STRATEGY 425#define MNG_FN_GET_ZLIB_MAXIDAT 426#define MNG_FN_GET_JPEG_DCTMETHOD 427#define MNG_FN_GET_JPEG_QUALITY 428#define MNG_FN_GET_JPEG_SMOOTHING 429#define MNG_FN_GET_JPEG_PROGRESSIVE 430
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -