diff options
author | James Bursa <james@netsurf-browser.org> | 2004-02-20 00:43:17 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-02-20 00:43:17 +0000 |
commit | a7f3829d558f768db5d2f7c783ccc08a9694f409 (patch) | |
tree | 1624cdfc7dac6367e4b5889aff3f4c1995e2765a /render/html.h | |
parent | 919805da51f243482475d06cce998c2c6390e9e2 (diff) | |
download | netsurf-a7f3829d558f768db5d2f7c783ccc08a9694f409.tar.gz netsurf-a7f3829d558f768db5d2f7c783ccc08a9694f409.tar.bz2 |
[project @ 2004-02-20 00:43:17 by bursa]
Fix html_destroy() crash, add documentation.
svn path=/import/netsurf/; revision=562
Diffstat (limited to 'render/html.h')
-rw-r--r-- | render/html.h | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/render/html.h b/render/html.h index d69a1a0fe..52f175cb0 100644 --- a/render/html.h +++ b/render/html.h @@ -5,12 +5,18 @@ * Copyright 2004 James Bursa <bursa@users.sourceforge.net> */ +/** \file + * Content for text/html (interface). + * + * These functions should in general be called via the content interface. + */ + #ifndef _NETSURF_RENDER_HTML_H_ #define _NETSURF_RENDER_HTML_H_ +#include "libxml/HTMLparser.h" #include "netsurf/content/content_type.h" #include "netsurf/css/css.h" -#include "netsurf/render/box.h" #include "netsurf/utils/pool.h" struct box; @@ -27,36 +33,52 @@ struct box_position { int char_offset; }; +/** Data specific to CONTENT_HTML. */ struct content_html_data { - htmlParserCtxt *parser; - char *source; - int length; + htmlParserCtxt *parser; /**< HTML parser context. */ + + char *source; /**< Source data. */ + int length; /**< Length of source. */ + xmlCharEncoding encoding; /**< Encoding of source. */ + char *base_url; /**< Base URL (may be a copy of content->url). */ - struct box *layout; - colour background_colour; + + struct box *layout; /**< Box tree, or 0. */ + colour background_colour; /**< Document background colour. */ + + /** Number of entries in stylesheet_content. */ unsigned int stylesheet_count; + /** Stylesheets. Each may be 0. Stylesheet 0 is the base style sheet, + * stylesheet 1 is any <style> elements (not cached). */ struct content **stylesheet_content; - struct css_style *style; + struct css_style *style; /**< Base style. */ + struct { struct box_position start; struct box_position end; enum { alter_UNKNOWN, alter_START, alter_END } altering; int selected; /* 0 = unselected, 1 = selected */ } text_selection; - struct font_set *fonts; - unsigned int object_count; /* images etc. */ + + struct font_set *fonts; /**< Set of fonts. */ + + /** Number of entries in object. */ + unsigned int object_count; + /** Objects. Each may be 0. */ struct { - char *url; - struct content *content; - struct box *box; + char *url; /**< URL of this object. */ + struct content *content; /**< Content, or 0. */ + struct box *box; /**< Node in box tree containing it. */ /** Pointer to array of permitted content_type, terminated by * CONTENT_UNKNOWN, or 0 if any type is acceptable. */ const content_type *permitted_types; } *object; + pool box_pool; /**< Memory pool for box tree. */ pool string_pool; /**< Memory pool for strings. */ }; + void html_create(struct content *c, const char *params[]); void html_process_data(struct content *c, char *data, unsigned long size); int html_convert(struct content *c, unsigned int width, unsigned int height); |