GIFLIB.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef GIF_LIB_H
00008 #define GIF_LIB_H
00009
00010 #define ERROR 0
00011
00012 #define OK 1
00013
00014 #ifndef TRUE
00015 #define TRUE 1
00016 #define FALSE 0
00017 #endif
00018
00019 #define FILE_BUFFER_SIZE 16384
00020
00021 typedef int BooleanType;
00022 typedef unsigned char PixelType;
00023 typedef unsigned char * RowType;
00024 typedef unsigned char ByteType;
00025
00026 #ifdef SYSV
00027 #define VoidPtr char *
00028 #else
00029 #define VoidPtr void *
00030 #endif
00031
00039 typedef struct GifColorType {
00040 ByteType Red, Green, Blue;
00041 } GifColorType;
00042
00043
00044
00052 typedef struct GifFileType {
00053 long SWidth, SHeight,
00054 SColorResolution, SBitsPerPixel,
00055 SBackGroundColor,
00056 ILeft, ITop, IWidth, IHeight,
00057 IInterlace,
00058 IBitsPerPixel;
00059 GifColorType *SColorMap, *IColorMap;
00060 VoidPtr Private;
00061 } GifFileType;
00062
00063 typedef enum {
00064 UNDEFINED_RECORD_TYPE,
00065 SCREEN_DESC_RECORD_TYPE,
00066 IMAGE_DESC_RECORD_TYPE,
00067 EXTENSION_RECORD_TYPE,
00068 TERMINATE_RECORD_TYPE
00069 } GifRecordType;
00070
00071
00072 #ifdef _SUNSTYLE
00073 GifFileType *EGifOpenFileName();
00074 GifFileType *EGifOpenFileHandle();
00075 long EGifPutScreenDesc();
00076 long EGifPutImageDesc();
00077 long EGifPutLine();
00078 long EGifPutCode();
00079 long EGifPutCodeNext();
00080 long EGifCloseFile();
00081 #else
00082 GifFileType *EGifOpenFileName(char *GifFileName,
00083 long GifTestExistance, long vers);
00084 GifFileType *EGifOpenFileHandle(char *filename, long vers);
00085 long EGifPutScreenDesc(GifFileType *GifFile,
00086 long GifWidth, long GifHeight, long GifColorRes, long GifBackGround,
00087 long GifBitsPerPixel, GifColorType *GifColorMap);
00088 long EGifPutImageDesc(GifFileType *GifFile,
00089 long GifLeft, long GifTop, long Width, long GifHeight, long GifInterlace,
00090 long GifBitsPerPixel, GifColorType *GifColorMap);
00091 long EGifPutControlDesc(GifFileType *GifFile,
00092 long transp, ByteType transpid, long delay, long dummy);
00093 long EGifPutBrowserControlDesc(GifFileType *GifFile,long repeat);
00094 long EGifPutLine(GifFileType *GifFile, PixelType *GifLine, long GifLineLen);
00095 long EGifPutCode(GifFileType *GifFile, long GifCodeSize, ByteType *GifCodeBlock);
00096 long EGifPutCodeNext(GifFileType *GifFile, ByteType *GifCodeBlock);
00097 long EGifCloseFile(GifFileType *GifFile);
00098 #endif
00099
00100 #define E_GIF_ERR_OpenFailed 1
00101 #define E_GIF_ERR_WriteFailed 2
00102 #define E_GIF_ERR_HasScrnDscr 3
00103 #define E_GIF_ERR_HasImagDscr 4
00104 #define E_GIF_ERR_NoColorMap 5
00105 #define E_GIF_ERR_DataTooBig 6
00106 #define E_GIF_ERR_NotEnoughMem 7
00107 #define E_GIF_ERR_DiskIsFull 8
00108 #define E_GIF_ERR_CloseFailed 9
00109 #define E_GIF_ERR_NotWriteable 10
00110
00111 #endif
00112