Eneboo - Documentación para desarrolladores
src/qt/src/3rdparty/libmng/libmng_objects.h
Ir a la documentación de este archivo.
00001 /* ************************************************************************** */
00002 /* *             For conditions of distribution and use,                    * */
00003 /* *                see copyright notice in libmng.h                        * */
00004 /* ************************************************************************** */
00005 /* *                                                                        * */
00006 /* * project   : libmng                                                     * */
00007 /* * file      : libmng_objects.h          copyright (c) 2000 G.Juyn        * */
00008 /* * version   : 1.0.0                                                      * */
00009 /* *                                                                        * */
00010 /* * purpose   : Internal object structures (definition)                    * */
00011 /* *                                                                        * */
00012 /* * author    : G.Juyn                                                     * */
00013 /* * web       : http://www.3-t.com                                         * */
00014 /* * email     : mailto:info@3-t.com                                        * */
00015 /* *                                                                        * */
00016 /* * comment   : Definition of the internal object structures               * */
00017 /* *                                                                        * */
00018 /* * changes   : 0.5.1 - 05/08/2000 - G.Juyn                                * */
00019 /* *             - changed strict-ANSI stuff                                * */
00020 /* *                                                                        * */
00021 /* *             0.5.2 - 05/23/2000 - G.Juyn                                * */
00022 /* *             - changed inclusion to DISPLAY_PROCS                       * */
00023 /* *             0.5.2 - 05/24/2000 - G.Juyn                                * */
00024 /* *             - added global color-chunks for animations                 * */
00025 /* *             - added global PLTE,tRNS,bKGD chunks for animation         * */
00026 /* *             - added SAVE & SEEK animation objects                      * */
00027 /* *             0.5.2 - 05/29/2000 - G.Juyn                                * */
00028 /* *             - added framenr/layernr/playtime to object header          * */
00029 /* *             0.5.2 - 05/30/2000 - G.Juyn                                * */
00030 /* *             - added ani-objects for delta-image processing             * */
00031 /* *             - added compression/filter/interlace fields to             * */
00032 /* *               object-buffer for delta-image processing                 * */
00033 /* *                                                                        * */
00034 /* *             0.5.3 - 06/17/2000 - G.Juyn                                * */
00035 /* *             - changed definition of aTRNSentries                       * */
00036 /* *             0.5.3 - 06/22/2000 - G.Juyn                                * */
00037 /* *             - added definition for PPLT animation-processing           * */
00038 /* *                                                                        * */
00039 /* *             0.9.2 - 08/05/2000 - G.Juyn                                * */
00040 /* *             - changed file-prefixes                                    * */
00041 /* *                                                                        * */
00042 /* *             0.9.3 - 08/26/2000 - G.Juyn                                * */
00043 /* *             - added MAGN chunk                                         * */
00044 /* *             0.9.3 - 09/10/2000 - G.Juyn                                * */
00045 /* *             - fixed DEFI behavior                                      * */
00046 /* *             0.9.3 - 10/16/2000 - G.Juyn                                * */
00047 /* *             - added support for delta-JNG                              * */
00048 /* *             0.9.3 - 10/17/2000 - G.Juyn                                * */
00049 /* *             - added valid-flag to stored objects for read() / display()* */
00050 /* *             0.9.3 - 10/19/2000 - G.Juyn                                * */
00051 /* *             - added storage for pixel-/alpha-sampledepth for delta's   * */
00052 /* *                                                                        * */
00053 /* ************************************************************************** */
00054 
00055 #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
00056 #pragma option -A                      /* force ANSI-C */
00057 #endif
00058 
00059 #ifndef _libmng_objects_h_
00060 #define _libmng_objects_h_
00061 
00062 /* ************************************************************************** */
00063 
00064 #ifdef MNG_INCLUDE_DISPLAY_PROCS
00065 
00066 /* ************************************************************************** */
00067 
00068 typedef mng_retcode (*mng_cleanupobject) (mng_datap    pData,
00069                                           mng_objectp  pHeader);
00070 
00071 typedef mng_retcode (*mng_processobject) (mng_datap    pData,
00072                                           mng_objectp  pHeader);
00073 
00074 /* ************************************************************************** */
00075 
00076 typedef struct {
00077            mng_cleanupobject fCleanup;
00078            mng_processobject fProcess;
00079            mng_objectp       pNext;              /* for double-linked list */
00080            mng_objectp       pPrev;
00081            mng_uint32        iFramenr;
00082            mng_uint32        iLayernr;
00083            mng_uint32        iPlaytime;
00084         } mng_object_header;
00085 typedef mng_object_header * mng_object_headerp;
00086 
00087 /* ************************************************************************** */
00088 
00089 typedef struct {                                 /* MNG specification "object-buffer" */
00090            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00091            mng_uint32        iRefcount;          /* reference counter */
00092            mng_bool          bFrozen;            /* frozen flag */
00093            mng_bool          bConcrete;          /* concrete flag */
00094            mng_bool          bViewable;          /* viewable flag */
00095            mng_uint32        iWidth;             /* image specifics */
00096            mng_uint32        iHeight;
00097            mng_uint8         iBitdepth;
00098            mng_uint8         iColortype;
00099            mng_uint8         iCompression;
00100            mng_uint8         iFilter;
00101            mng_uint8         iInterlace;
00102            
00103            mng_uint8         iAlphabitdepth;     /* used only for JNG images */
00104            mng_uint8         iJHDRcompression;
00105            mng_uint8         iJHDRinterlace;
00106 
00107            mng_uint8         iPixelsampledepth;  /* used with delta-images */
00108            mng_uint8         iAlphasampledepth;
00109 
00110            mng_bool          bHasPLTE;           /* PLTE chunk present */
00111            mng_bool          bHasTRNS;           /* tRNS chunk present */
00112            mng_bool          bHasGAMA;           /* gAMA chunk present */
00113            mng_bool          bHasCHRM;           /* cHRM chunk present */
00114            mng_bool          bHasSRGB;           /* sRGB chunk present */
00115            mng_bool          bHasICCP;           /* iCCP chunk present */
00116            mng_bool          bHasBKGD;           /* bKGD chunk present */
00117 
00118            mng_uint32        iPLTEcount;         /* PLTE fields */
00119            mng_rgbpaltab     aPLTEentries;
00120 
00121            mng_uint16        iTRNSgray;          /* tRNS fields */
00122            mng_uint16        iTRNSred;
00123            mng_uint16        iTRNSgreen;
00124            mng_uint16        iTRNSblue;
00125            mng_uint32        iTRNScount;
00126            mng_uint8arr      aTRNSentries;
00127 
00128            mng_uint32        iGamma;             /* gAMA fields */
00129 
00130            mng_uint32        iWhitepointx;       /* cHRM fields */
00131            mng_uint32        iWhitepointy;
00132            mng_uint32        iPrimaryredx;
00133            mng_uint32        iPrimaryredy;
00134            mng_uint32        iPrimarygreenx;
00135            mng_uint32        iPrimarygreeny;
00136            mng_uint32        iPrimarybluex;
00137            mng_uint32        iPrimarybluey;
00138 
00139            mng_uint8         iRenderingintent;   /* sRGB fields */
00140 
00141            mng_uint32        iProfilesize;       /* iCCP fields */
00142            mng_ptr           pProfile;
00143 
00144            mng_uint8         iBKGDindex;         /* bKGD fields */
00145            mng_uint16        iBKGDgray;
00146            mng_uint16        iBKGDred;
00147            mng_uint16        iBKGDgreen;
00148            mng_uint16        iBKGDblue;
00149 
00150            mng_uint32        iSamplesize;        /* size of a sample */
00151            mng_uint32        iRowsize;           /* size of a row of samples */
00152            mng_uint32        iImgdatasize;       /* size of the sample data buffer */
00153            mng_uint8p        pImgdata;           /* actual sample data buffer */
00154 
00155          } mng_imagedata;
00156 typedef mng_imagedata * mng_imagedatap;
00157 
00158 /* ************************************************************************** */
00159 
00160 typedef struct {                                 /* MNG specification "object" */
00161            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00162            mng_uint16        iId;                /* object-id */
00163            mng_bool          bFrozen;            /* frozen flag */
00164            mng_bool          bVisible;           /* potential visibility flag */
00165            mng_bool          bViewable;          /* viewable flag */
00166            mng_bool          bValid;             /* marks invalid when only reading */
00167            mng_int32         iPosx;              /* location fields */
00168            mng_int32         iPosy;
00169            mng_bool          bClipped;           /* clipping fields */
00170            mng_int32         iClipl;
00171            mng_int32         iClipr;
00172            mng_int32         iClipt;
00173            mng_int32         iClipb;
00174            mng_uint16        iMAGN_MethodX;      /* magnification (MAGN) */
00175            mng_uint16        iMAGN_MethodY;
00176            mng_uint16        iMAGN_MX;
00177            mng_uint16        iMAGN_MY;
00178            mng_uint16        iMAGN_ML;
00179            mng_uint16        iMAGN_MR;
00180            mng_uint16        iMAGN_MT;
00181            mng_uint16        iMAGN_MB;
00182            mng_imagedatap    pImgbuf;            /* the image-data buffer */
00183         } mng_image;
00184 typedef mng_image * mng_imagep;
00185 
00186 /* ************************************************************************** */
00187 
00188                                                  /* "on-the-fly" image (= object 0) */       
00189 typedef mng_image mng_ani_image;                 /* let's (ab)use the general "object" */
00190 typedef mng_ani_image * mng_ani_imagep;          /* that's actualy crucial, so don't change it! */
00191 
00192 /* ************************************************************************** */
00193 
00194 typedef struct {                                 /* global PLTE object */
00195            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00196            mng_uint32        iEntrycount;
00197            mng_rgbpaltab     aEntries;
00198         } mng_ani_plte;
00199 typedef mng_ani_plte * mng_ani_pltep;
00200 
00201 /* ************************************************************************** */
00202 
00203 typedef struct {                                 /* global tRNS object */
00204            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00205            mng_uint32        iRawlen;
00206            mng_uint8arr      aRawdata;
00207         } mng_ani_trns;
00208 typedef mng_ani_trns * mng_ani_trnsp;
00209 
00210 /* ************************************************************************** */
00211 
00212 typedef struct {                                 /* global gAMA object */
00213            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00214            mng_bool          bEmpty;
00215            mng_uint32        iGamma;
00216         } mng_ani_gama;
00217 typedef mng_ani_gama * mng_ani_gamap;
00218 
00219 /* ************************************************************************** */
00220 
00221 typedef struct {                                 /* global gCRM object */
00222            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00223            mng_bool          bEmpty;
00224            mng_uint32        iWhitepointx;
00225            mng_uint32        iWhitepointy;
00226            mng_uint32        iRedx;
00227            mng_uint32        iRedy;
00228            mng_uint32        iGreenx;
00229            mng_uint32        iGreeny;
00230            mng_uint32        iBluex;
00231            mng_uint32        iBluey;
00232         } mng_ani_chrm;
00233 typedef mng_ani_chrm * mng_ani_chrmp;
00234 
00235 /* ************************************************************************** */
00236 
00237 typedef struct {                                 /* global sRGB object */
00238            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00239            mng_bool          bEmpty;
00240            mng_uint8         iRenderingintent;
00241         } mng_ani_srgb;
00242 typedef mng_ani_srgb * mng_ani_srgbp;
00243 
00244 /* ************************************************************************** */
00245 
00246 typedef struct {                                 /* global iCCP object */
00247            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00248            mng_bool          bEmpty;
00249            mng_uint32        iProfilesize;
00250            mng_ptr           pProfile;
00251         } mng_ani_iccp;
00252 typedef mng_ani_iccp * mng_ani_iccpp;
00253 
00254 /* ************************************************************************** */
00255 
00256 typedef struct {                                 /* global bKGD object */
00257            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00258            mng_uint16        iRed;
00259            mng_uint16        iGreen;
00260            mng_uint16        iBlue;
00261         } mng_ani_bkgd;
00262 typedef mng_ani_bkgd * mng_ani_bkgdp;
00263 
00264 /* ************************************************************************** */
00265 
00266 typedef struct {                                 /* LOOP object */
00267            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00268            mng_uint8         iLevel;
00269            mng_uint32        iRepeatcount;
00270            mng_uint8         iTermcond;
00271            mng_uint32        iItermin;
00272            mng_uint32        iItermax;
00273            mng_uint32        iCount;
00274            mng_uint32p       pSignals;
00275 
00276            mng_uint32        iRunningcount;      /* running counter */
00277         } mng_ani_loop;
00278 typedef mng_ani_loop * mng_ani_loopp;
00279 
00280 /* ************************************************************************** */
00281 
00282 typedef struct {                                 /* ENDL object */
00283            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00284            mng_uint8         iLevel;
00285 
00286            mng_ani_loopp     pLOOP;              /* matching LOOP */
00287         } mng_ani_endl;
00288 typedef mng_ani_endl * mng_ani_endlp;
00289 
00290 /* ************************************************************************** */
00291 
00292 typedef struct {                                 /* DEFI object */
00293            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00294            mng_uint16        iId;                
00295            mng_bool          bHasdonotshow;
00296            mng_uint8         iDonotshow;
00297            mng_bool          bHasconcrete;
00298            mng_uint8         iConcrete;
00299            mng_bool          bHasloca;           
00300            mng_int32         iLocax;
00301            mng_int32         iLocay;
00302            mng_bool          bHasclip;
00303            mng_int32         iClipl;
00304            mng_int32         iClipr;
00305            mng_int32         iClipt;
00306            mng_int32         iClipb;
00307         } mng_ani_defi;
00308 typedef mng_ani_defi * mng_ani_defip;
00309 
00310 /* ************************************************************************** */
00311 
00312 typedef struct {                                 /* BASI object */
00313            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00314            mng_uint16        iRed;               
00315            mng_uint16        iGreen;             
00316            mng_uint16        iBlue;              
00317            mng_bool          bHasalpha;             
00318            mng_uint16        iAlpha;
00319            mng_uint8         iViewable;
00320         } mng_ani_basi;
00321 typedef mng_ani_basi * mng_ani_basip;
00322 
00323 /* ************************************************************************** */
00324 
00325 typedef struct {                                 /* CLON object */
00326            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00327            mng_uint16        iCloneid;
00328            mng_uint16        iSourceid;
00329            mng_uint8         iClonetype;
00330            mng_bool          bHasdonotshow;
00331            mng_uint8         iDonotshow;
00332            mng_uint8         iConcrete;
00333            mng_bool          bHasloca;
00334            mng_uint8         iLocatype;
00335            mng_int32         iLocax;
00336            mng_int32         iLocay;
00337         } mng_ani_clon;
00338 typedef mng_ani_clon * mng_ani_clonp;
00339 
00340 /* ************************************************************************** */
00341 
00342 typedef struct {                                 /* BACK object */
00343            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00344            mng_uint16        iRed;
00345            mng_uint16        iGreen;
00346            mng_uint16        iBlue;
00347            mng_uint8         iMandatory;
00348            mng_uint16        iImageid;
00349            mng_uint8         iTile;
00350         } mng_ani_back;
00351 typedef mng_ani_back * mng_ani_backp;
00352 
00353 /* ************************************************************************** */
00354 
00355 typedef struct {                                 /* FRAM object */
00356            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00357            mng_uint8         iFramemode;
00358            mng_uint8         iChangedelay;
00359            mng_uint32        iDelay;
00360            mng_uint8         iChangetimeout;
00361            mng_uint32        iTimeout;
00362            mng_uint8         iChangeclipping;
00363            mng_uint8         iCliptype;
00364            mng_int32         iClipl;
00365            mng_int32         iClipr;
00366            mng_int32         iClipt;
00367            mng_int32         iClipb;
00368         } mng_ani_fram;
00369 typedef mng_ani_fram * mng_ani_framp;
00370 
00371 /* ************************************************************************** */
00372 
00373 typedef struct {                                 /* MOVE object */
00374            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00375            mng_uint16        iFirstid;           
00376            mng_uint16        iLastid;            
00377            mng_uint8         iType;              
00378            mng_int32         iLocax;             
00379            mng_int32         iLocay;
00380         } mng_ani_move;
00381 typedef mng_ani_move * mng_ani_movep;
00382 
00383 /* ************************************************************************** */
00384 
00385 typedef struct {                                 /* CLIP object */
00386            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00387            mng_uint16        iFirstid;           
00388            mng_uint16        iLastid;            
00389            mng_uint8         iType;              
00390            mng_int32         iClipl;             
00391            mng_int32         iClipr;             
00392            mng_int32         iClipt;             
00393            mng_int32         iClipb;
00394         } mng_ani_clip;
00395 typedef mng_ani_clip * mng_ani_clipp;
00396 
00397 /* ************************************************************************** */
00398 
00399 typedef struct {                                 /* SHOW object */
00400            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00401            mng_uint16        iFirstid;           
00402            mng_uint16        iLastid;            
00403            mng_uint8         iMode;
00404         } mng_ani_show;
00405 typedef mng_ani_show * mng_ani_showp;
00406 
00407 /* ************************************************************************** */
00408 
00409 typedef struct {                                 /* TERM object */
00410            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00411            mng_uint8         iTermaction;        
00412            mng_uint8         iIteraction;        
00413            mng_uint32        iDelay;             
00414            mng_uint32        iItermax;
00415         } mng_ani_term;
00416 typedef mng_ani_term * mng_ani_termp;
00417 
00418 /* ************************************************************************** */
00419 
00420 typedef struct {                                 /* SAVE object */
00421            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00422         } mng_ani_save;
00423 typedef mng_ani_save * mng_ani_savep;
00424 
00425 /* ************************************************************************** */
00426 
00427 typedef struct {                                 /* SEEK object */
00428            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00429         } mng_ani_seek;
00430 typedef mng_ani_seek * mng_ani_seekp;
00431 
00432 /* ************************************************************************** */
00433 
00434 typedef struct {                                 /* DHDR object */
00435            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00436            mng_uint16        iObjectid;
00437            mng_uint8         iImagetype;
00438            mng_uint8         iDeltatype;
00439            mng_uint32        iBlockwidth;
00440            mng_uint32        iBlockheight;
00441            mng_uint32        iBlockx;
00442            mng_uint32        iBlocky;
00443         } mng_ani_dhdr;
00444 typedef mng_ani_dhdr * mng_ani_dhdrp;
00445 
00446 /* ************************************************************************** */
00447 
00448 typedef struct {                                 /* PROM object */
00449            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00450            mng_uint8         iBitdepth;
00451            mng_uint8         iColortype;
00452            mng_uint8         iFilltype;
00453         } mng_ani_prom;
00454 typedef mng_ani_prom * mng_ani_promp;
00455 
00456 /* ************************************************************************** */
00457 
00458 typedef struct {                                 /* IPNG object */
00459            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00460         } mng_ani_ipng;
00461 typedef mng_ani_ipng * mng_ani_ipngp;
00462 
00463 /* ************************************************************************** */
00464 
00465 typedef struct {                                 /* IJNG object */
00466            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00467         } mng_ani_ijng;
00468 typedef mng_ani_ijng * mng_ani_ijngp;
00469 
00470 /* ************************************************************************** */
00471 
00472 typedef struct {                                 /* PPLT object */
00473            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00474            mng_uint8         iType;
00475            mng_uint32        iCount;
00476            mng_rgbpaltab     aIndexentries;
00477            mng_uint8arr      aAlphaentries;
00478            mng_uint8arr      aUsedentries;
00479         } mng_ani_pplt;
00480 typedef mng_ani_pplt * mng_ani_ppltp;
00481 
00482 /* ************************************************************************** */
00483 
00484 typedef struct {                                 /* MAGN object */
00485            mng_object_header sHeader;            /* default header (DO NOT REMOVE) */
00486            mng_uint16        iFirstid;
00487            mng_uint16        iLastid;
00488            mng_uint16        iMethodX;
00489            mng_uint16        iMX;
00490            mng_uint16        iMY;
00491            mng_uint16        iML;
00492            mng_uint16        iMR;
00493            mng_uint16        iMT;
00494            mng_uint16        iMB;
00495            mng_uint16        iMethodY;
00496         } mng_ani_magn;
00497 typedef mng_ani_magn * mng_ani_magnp;
00498 
00499 /* ************************************************************************** */
00500 
00501 #endif /* MNG_INCLUDE_DISPLAY_PROCS */
00502 
00503 /* ************************************************************************** */
00504 
00505 #endif /* _libmng_objects_h_ */
00506 
00507 /* ************************************************************************** */
00508 /* * end of file                                                            * */
00509 /* ************************************************************************** */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'