From e5539a9937bb439974d6579ecf3e2503cb07f909 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 28 Aug 2007 22:19:33 +0200 Subject: [PATCH] document/html: Move enum html_special_type from parser.h to renderer.h ...since it is renderer interface. --- src/document/html/parser.h | 18 +----------------- src/document/html/parser/parse.c | 1 + src/document/html/renderer.h | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/document/html/parser.h b/src/document/html/parser.h index 816ca0aa0..5a13a318b 100644 --- a/src/document/html/parser.h +++ b/src/document/html/parser.h @@ -17,6 +17,7 @@ struct menu_item; struct part; struct string; struct uri; +enum html_special_type; /* XXX: This is just terible - this interface is from 75% only for other HTML * files - there's lack of any well defined interface and it's all randomly @@ -136,23 +137,6 @@ struct html_element { #define is_inline_element(e) (e->linebreak == 0) #define is_block_element(e) (e->linebreak > 0) -enum html_special_type { - SP_TAG, - SP_FORM, - SP_CONTROL, - SP_TABLE, - SP_USED, - SP_FRAMESET, - SP_FRAME, - SP_NOWRAP, - SP_CACHE_CONTROL, - SP_CACHE_EXPIRES, - SP_REFRESH, - SP_STYLESHEET, - SP_COLOR_LINK_LINES, - SP_SCRIPT, -}; - /* Interface for the renderer */ struct html_context * diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index e71dfd223..fcf343213 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -20,6 +20,7 @@ #include "document/html/parser/parse.h" #include "document/html/parser/stack.h" #include "document/html/parser.h" +#include "document/html/renderer.h" #include "document/options.h" #include "intl/charsets.h" #include "util/conv.h" diff --git a/src/document/html/renderer.h b/src/document/html/renderer.h index 6fc4eacd3..316b28ede 100644 --- a/src/document/html/renderer.h +++ b/src/document/html/renderer.h @@ -12,6 +12,27 @@ struct string; void render_html_document(struct cache_entry *cached, struct document *document, struct string *buffer); + +/* Interface with parser.c */ + +enum html_special_type { + SP_TAG, + SP_FORM, + SP_CONTROL, + SP_TABLE, + SP_USED, + SP_FRAMESET, + SP_FRAME, + SP_NOWRAP, + SP_CACHE_CONTROL, + SP_CACHE_EXPIRES, + SP_REFRESH, + SP_STYLESHEET, + SP_COLOR_LINK_LINES, + SP_SCRIPT, +}; + + /* Interface with tables.c */ /* This holds some context about what we're currently rendering. We only need