-typedef struct _IMAGEN
-{
- 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 */
- 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_ARCHIVO -1 /* error opening file */
-#define E_FORMATO -2 /* error in gif header */
-#define E_MEMORIA -3 /* error allocating memory */
-
-
-class wxGIFDecoder
+
+// --------------------------------------------------------------------------
+// Constants
+// --------------------------------------------------------------------------
+
+// Error codes:
+// Note that the error code wxGIF_TRUNCATED means that the image itself
+// is most probably OK, but the decoder didn't reach the end of the data
+// stream; this means that if it was not reading directly from file,
+// the stream will not be correctly positioned.
+//
+enum wxGIFErrorCode