Annotation of mandoc/html.h, Revision 1.2
1.2 ! kristaps 1: /* $Id: html.h,v 1.1 2008/12/10 00:52:46 kristaps Exp $ */
1.1 kristaps 2: /*
3: * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
4: *
5: * Permission to use, copy, modify, and distribute this software for any
6: * purpose with or without fee is hereby granted, provided that the
7: * above copyright notice and this permission notice appear in all
8: * copies.
9: *
10: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11: * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12: * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13: * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14: * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15: * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16: * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17: * PERFORMANCE OF THIS SOFTWARE.
18: */
19: #ifndef HTML_H
20: #define HTML_H
21:
22: #include "ml.h"
23:
24: enum html_tag {
25: HTML_TAG_SPAN = 0,
26: HTML_TAG_HTML = 1,
27: HTML_TAG_HEAD = 2,
28: HTML_TAG_META = 3,
29: HTML_TAG_TITLE = 4,
30: HTML_TAG_STYLE = 5,
31: HTML_TAG_LINK = 6,
32: HTML_TAG_BODY = 7,
33: HTML_TAG_DIV = 8,
34: HTML_TAG_TABLE = 9,
35: HTML_TAG_TD = 10,
36: HTML_TAG_TR = 11,
37: HTML_TAG_OL = 12,
38: HTML_TAG_UL = 13,
39: HTML_TAG_LI = 14,
40: HTML_TAG_H1 = 15,
41: HTML_TAG_H2 = 16,
42: HTML_TAG_A = 17,
43: };
44:
45: enum html_attr {
46: HTML_ATTR_CLASS = 0,
47: HTML_ATTR_HTTP_EQUIV = 1,
48: HTML_ATTR_CONTENT = 2,
49: HTML_ATTR_NAME = 3,
50: HTML_ATTR_TYPE = 4,
51: HTML_ATTR_REL = 5,
52: HTML_ATTR_HREF = 6,
53: HTML_ATTR_WIDTH = 7,
1.2 ! kristaps 54: HTML_ATTR_ALIGN = 8,
1.1 kristaps 55: };
56:
57: enum html_type {
58: HTML_TYPE_4_01_STRICT = 0
59: };
60:
61: struct html_pair {
62: enum html_attr attr;
63: char *val;
64: };
65:
66: __BEGIN_DECLS
67:
68: int html_typeput(struct md_mbuf *,
69: enum html_type, size_t *);
70: int html_commentput(struct md_mbuf *,
71: enum ml_scope, size_t *);
72: int html_tput(struct md_mbuf *,
73: enum ml_scope, enum html_tag, size_t *);
74: int html_aput(struct md_mbuf *, enum ml_scope,
75: enum html_tag, size_t *,
76: int, const struct html_pair *);
77: int html_stput(struct md_mbuf *,
78: enum html_tag, size_t *);
79: int html_saput(struct md_mbuf *, enum html_tag,
80: size_t *, int, const struct html_pair *);
81:
82: __END_DECLS
83:
84: #endif /*!HTML_H*/
CVSweb