iconv: Bail out of the loop when an illegal sequence of bytes occurs.
[elinks/elinks-j605.git] / src / document / html / renderer.h
blob82e206071ced0a1f49aa56dafdf984e27886f3b8
2 #ifndef EL__DOCUMENT_HTML_RENDERER_H
3 #define EL__DOCUMENT_HTML_RENDERER_H
5 #include "document/document.h"
7 struct box;
8 struct cache_entry;
9 struct html_context;
10 struct string;
13 void render_html_document(struct cache_entry *cached, struct document *document, struct string *buffer);
16 /* Interface with parser.c */
18 enum html_special_type {
19 SP_TAG,
20 SP_FORM,
21 SP_CONTROL,
22 SP_TABLE,
23 SP_USED,
24 SP_FRAMESET,
25 SP_FRAME,
26 SP_NOWRAP,
27 SP_CACHE_CONTROL,
28 SP_CACHE_EXPIRES,
29 SP_REFRESH,
30 SP_STYLESHEET,
31 SP_COLOR_LINK_LINES,
32 SP_SCRIPT,
36 /* Interface with tables.c */
38 /* This holds some context about what we're currently rendering. We only need
39 * one of these, until we start dealing with tables, at which point the table
40 * code will create short-lived parts to provide context when it calls routines
41 * in the renderer or the parser. */
42 struct part {
43 struct document *document;
45 unsigned char *spaces;
46 int spaces_len;
47 #ifdef CONFIG_UTF8
48 unsigned char *char_width;
49 #endif
52 struct box box;
54 int max_width;
55 int xa;
56 int cx, cy;
57 int link_num;
60 void expand_lines(struct html_context *html_context, struct part *part,
61 int x, int y, int lines, color_T bgcolor);
62 void check_html_form_hierarchy(struct part *part);
64 void draw_frame_hchars(struct part *, int, int, int, unsigned char data, color_T bgcolor, color_T fgcolor, struct html_context *html_context);
65 void draw_frame_vchars(struct part *, int, int, int, unsigned char data, color_T bgcolor, color_T fgcolor, struct html_context *html_context);
67 void free_table_cache(void);
69 struct part *format_html_part(struct html_context *html_context, unsigned char *, unsigned char *, int, int, int, struct document *, int, int, unsigned char *, int);
71 #endif