- unsigned int w; /* width */
- unsigned int h; /* height */
- unsigned int left; /* x coord (in logical screen) */
- unsigned int top; /* y coord (in logical screen) */
- int transparent; /* transparent color (-1 = none) */
- int disposal; /* disposal method (-1 = unspecified) */
- long delay; /* delay in ms (-1 = unused) */
- unsigned char *p; /* bitmap */
- unsigned char *pal; /* palette */
- struct _IMAGEN *next; /* next image */
- struct _IMAGEN *prev; /* prev image */
-} IMAGEN;
-
-
-/* disposal method */
-#define D_UNSPECIFIED -1 /* not specified */
-#define D_DONOTDISPOSE 0 /* do not dispose */
-#define D_TOBACKGROUND 1 /* restore to background colour */
-#define D_TOPREVIOUS 2 /* restore to previous image */
-
-/* error codes */
-#define E_OK 0 /* everything was OK */
-#define E_FORMATO 1 /* error in gif header */
-#define E_MEMORIA 2 /* error allocating memory */
-
-class WXDLLEXPORT wxGIFDecoder
+ wxGIF_OK = 0, /* everything was OK */
+ wxGIF_INVFORMAT, /* error in gif header */
+ wxGIF_MEMERR, /* error allocating memory */
+ wxGIF_TRUNCATED /* file appears to be truncated */
+};
+
+#define MAX_BLOCK_SIZE 256 /* max. block size */
+
+
+// --------------------------------------------------------------------------
+// wxGIFDecoder class
+// --------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGIFDecoder : public wxAnimationDecoder