diff options
author | James Bursa <james@netsurf-browser.org> | 2004-01-24 17:08:16 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-01-24 17:08:16 +0000 |
commit | 1bdcb446392b9fd67d45df22d360dd72d7c353cc (patch) | |
tree | 5a23f86b3ee9b77728dbe4cde6915d54bbed2cc9 /content | |
parent | b116f20cd4d75f539164a0e858272145d99e4e6d (diff) | |
download | netsurf-1bdcb446392b9fd67d45df22d360dd72d7c353cc.tar.gz netsurf-1bdcb446392b9fd67d45df22d360dd72d7c353cc.tar.bz2 |
[project @ 2004-01-24 17:08:15 by bursa]
Add permitted_types to html_fetch_object().
svn path=/import/netsurf/; revision=500
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 6 | ||||
-rw-r--r-- | content/content.h | 33 | ||||
-rw-r--r-- | content/content_type.h | 51 |
3 files changed, 54 insertions, 36 deletions
diff --git a/content/content.c b/content/content.c index 61b8cd1c9..927269441 100644 --- a/content/content.c +++ b/content/content.c @@ -109,15 +109,13 @@ static const struct handler_entry handler_map[] = { html_add_instance, html_remove_instance, html_reshape_instance}, {textplain_create, textplain_process_data, textplain_convert, textplain_revive, textplain_reformat, textplain_destroy, 0, 0, 0, 0}, + {css_create, css_process_data, css_convert, css_revive, + css_reformat, css_destroy, 0, 0, 0, 0}, #ifdef riscos #ifdef WITH_JPEG {jpeg_create, jpeg_process_data, jpeg_convert, jpeg_revive, jpeg_reformat, jpeg_destroy, jpeg_redraw, 0, 0, 0}, #endif -#endif - {css_create, css_process_data, css_convert, css_revive, - css_reformat, css_destroy, 0, 0, 0, 0}, -#ifdef riscos #ifdef WITH_PNG {nspng_create, nspng_process_data, nspng_convert, nspng_revive, nspng_reformat, nspng_destroy, nspng_redraw, 0, 0, 0}, diff --git a/content/content.h b/content/content.h index d5adf1a6f..7235011a4 100644 --- a/content/content.h +++ b/content/content.h @@ -28,6 +28,7 @@ #include "libxml/HTMLparser.h" #include "netsurf/utils/config.h" #include "netsurf/content/cache.h" +#include "netsurf/content/content_type.h" #include "netsurf/content/fetch.h" #include "netsurf/content/other.h" #include "netsurf/css/css.h" @@ -56,38 +57,6 @@ #endif -/** The type of a content. */ -typedef enum { - CONTENT_HTML, - CONTENT_TEXTPLAIN, -#ifdef riscos -#ifdef WITH_JPEG - CONTENT_JPEG, -#endif -#endif - CONTENT_CSS, -#ifdef riscos -#ifdef WITH_PNG - CONTENT_PNG, -#endif -#ifdef WITH_GIF - CONTENT_GIF, -#endif -#ifdef WITH_SPRITE - CONTENT_SPRITE, -#endif -#ifdef WITH_DRAW - CONTENT_DRAW, -#endif -#ifdef WITH_PLUGIN - CONTENT_PLUGIN, -#endif -#endif - CONTENT_OTHER, - CONTENT_UNKNOWN /**< content-type not received yet */ -} content_type; - - /** Used in callbacks to indicate what has occurred. */ typedef enum { CONTENT_MSG_LOADING, /**< fetching or converting */ diff --git a/content/content_type.h b/content/content_type.h new file mode 100644 index 000000000..fbafe9e6b --- /dev/null +++ b/content/content_type.h @@ -0,0 +1,51 @@ +/* + * This file is part of NetSurf, http://netsurf.sourceforge.net/ + * Licensed under the GNU General Public License, + * http://www.opensource.org/licenses/gpl-license + * Copyright 2003 James Bursa <bursa@users.sourceforge.net> + */ + +/** \file + * Declaration of content_type enum. + * + * The content_type enum is defined here to prevent cyclic dependencies. + */ + +#ifndef _NETSURF_DESKTOP_CONTENT_TYPE_H_ +#define _NETSURF_DESKTOP_CONTENT_TYPE_H_ + +#include "netsurf/utils/config.h" + + +/** The type of a content. */ +typedef enum { + CONTENT_HTML, + CONTENT_TEXTPLAIN, + CONTENT_CSS, +#ifdef riscos +#ifdef WITH_JPEG + CONTENT_JPEG, +#endif +#ifdef WITH_PNG + CONTENT_PNG, +#endif +#ifdef WITH_GIF + CONTENT_GIF, +#endif +#ifdef WITH_SPRITE + CONTENT_SPRITE, +#endif +#ifdef WITH_DRAW + CONTENT_DRAW, +#endif +#ifdef WITH_PLUGIN + CONTENT_PLUGIN, +#endif +#endif + /* these must be the last two */ + CONTENT_OTHER, + CONTENT_UNKNOWN /**< content-type not received yet */ +} content_type; + + +#endif |