diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 6 | ||||
-rw-r--r-- | content/content.h | 15 |
2 files changed, 19 insertions, 2 deletions
diff --git a/content/content.c b/content/content.c index 2a2cf700e..0538d52c3 100644 --- a/content/content.c +++ b/content/content.c @@ -1,5 +1,5 @@ /** - * $Id: content.c,v 1.9 2003/05/10 11:13:34 bursa Exp $ + * $Id: content.c,v 1.10 2003/06/05 13:17:55 philpem Exp $ */ #include <assert.h> @@ -11,6 +11,7 @@ #include "netsurf/render/textplain.h" #include "netsurf/riscos/jpeg.h" #include "netsurf/riscos/png.h" +#include "netsurf/riscos/gif.h" #include "netsurf/utils/utils.h" @@ -20,6 +21,7 @@ struct mime_entry { content_type type; }; static const struct mime_entry mime_map[] = { + {"image/gif", CONTENT_GIF}, {"image/jpeg", CONTENT_JPEG}, {"image/png", CONTENT_PNG}, {"text/css", CONTENT_CSS}, @@ -49,6 +51,8 @@ static const struct handler_entry handler_map[] = { {css_create, css_process_data, css_convert, css_revive, css_reformat, css_destroy, 0}, {nspng_create, nspng_process_data, nspng_convert, nspng_revive, nspng_reformat, nspng_destroy, nspng_redraw}, + {nsgif_create, nsgif_process_data, nsgif_convert, nsgif_revive, + nsgif_reformat, nsgif_destroy, nsgif_redraw} }; diff --git a/content/content.h b/content/content.h index 8a4fcbd17..c9fa9870b 100644 --- a/content/content.h +++ b/content/content.h @@ -1,5 +1,5 @@ /** - * $Id: content.h,v 1.10 2003/05/10 11:13:34 bursa Exp $ + * $Id: content.h,v 1.11 2003/06/05 13:17:55 philpem Exp $ */ #ifndef _NETSURF_DESKTOP_CONTENT_H_ @@ -7,6 +7,7 @@ #include "libxml/HTMLparser.h" #include "libpng/png.h" +#include "libungif/gif_lib.h" #include "oslib/osspriteop.h" #include "netsurf/content/cache.h" #include "netsurf/css/css.h" @@ -34,6 +35,7 @@ typedef enum { CONTENT_JPEG, CONTENT_CSS, CONTENT_PNG, + CONTENT_GIF, CONTENT_OTHER } content_type; @@ -110,6 +112,17 @@ struct content enum { PNG_PALETTE, PNG_DITHER, PNG_DEEP } type; } png; + // Structure for the GIF handler + struct + { + GifFileType *giffile; // GIF file handler + char *data; // GIF data + unsigned long length; // Length of GIF data + unsigned long buffer_pos; // Position in the buffer + osspriteop_area *sprite_area; // Sprite area + char *sprite_image; // Sprite image + } gif; + } data; struct cache_entry *cache; |