home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newlibs / ifflb161.zoo / iff.h < prev    next >
C/C++ Source or Header  |  1988-12-01  |  2KB  |  69 lines

  1. /* C include file for the iff.library V16.1, 01-Dec-88   by CHW */
  2.  
  3. #ifndef LIBRARIES_IFF_H
  4. #define LIBRARIES_IFF_H
  5. #ifndef EXEC_TYPES_H
  6. #include "exec/types.h"
  7. #endif
  8.  
  9. #define IFFNAME "iff.library"
  10. #define IFFVERSION 16L              /* Current library version */
  11.  
  12.  
  13. /************** E R R O R - C O D E S ***********************************/
  14.  
  15. #define IFF_BADTASK -1              /* IffError() called by wrong task */
  16.  
  17. #define IFF_CANTOPENFILE 16         /* File not found */
  18. #define IFF_READERROR 17            /* Error reading file */
  19. #define IFF_NOMEM 18                /* Not enough memory */
  20. #define IFF_NOTIFF 19               /* File is not an IFF file */
  21. #define IFF_WRITEERROR 20           /* Error writing file */
  22.  
  23. #define IFF_NOILBM 24               /* IFF file is not of type ILBM */
  24. #define IFF_NOBMHD 25               /* BMHD chunk not found */
  25. #define IFF_NOBODY 26               /* BODY chunk not found */
  26. #define IFF_TOOMANYPLANES 27        /* BODY has more planes than BitMap */
  27. #define IFF_UNKNOWNCOMPRESSION 28   /* Unknown compression type */
  28.  
  29.  
  30. /************** S T R U C T U R E S *************************************/
  31.  
  32. struct Chunk
  33. {
  34.    LONG  ckID;
  35.    LONG  ckSize;
  36.    UBYTE ckData[1];    /* should be UBYTE ckData[ckSize] */
  37. };
  38.  
  39.  
  40. struct BitMapHeader
  41. {
  42.    UWORD w,h;
  43.    WORD  x,y;
  44.    UBYTE nPlanes;
  45.    UBYTE masking;
  46.    UBYTE compression;
  47.    UBYTE pad1;
  48.    UWORD transparentColor;
  49.    UBYTE xAspect,yAspect;
  50.    WORD  pageWidth,pageHeight;
  51. };
  52.  
  53.  
  54. /************** F U N C T I O N   D E C L A R A T I O N S ***************/
  55.  
  56. APTR OpenIFF();
  57. void CloseIFF();
  58. struct Chunk *FindChunk();
  59. LONG GetColorTab();
  60. struct BitMapHeader *GetBMHD();
  61. BOOL DecodePic();
  62. BOOL SaveBitMap();
  63. BOOL SaveClip();
  64. LONG IffError();
  65. UWORD GetViewModes();
  66. APTR NewOpenIFF();
  67.  
  68. #endif !LIBRARIES_IFF_H
  69.