Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gnulib-local / lib / html-ostream.oo.h
1 /* Output stream that produces HTML output.
2    Copyright (C) 2006 Free Software Foundation, Inc.
3    Written by Bruno Haible <bruno@clisp.org>, 2006.
4
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #ifndef _HTML_OSTREAM_H
19 #define _HTML_OSTREAM_H
20
21 #include "ostream.h"
22
23
24 struct html_ostream : struct ostream
25 {
26 methods:
27
28   /* Start a <span class="CLASSNAME"> element.  The CLASSNAME is the name
29      of a CSS class.  It can be chosen arbitrarily and customized through
30      an inline or external CSS.  */
31   void begin_span (html_ostream_t stream, const char *classname);
32
33   /* End a <span class="CLASSNAME"> element.
34      The begin_span / end_span calls must match properly.  */
35   void end_span (html_ostream_t stream, const char *classname);
36 };
37
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43
44 /* Create an output stream that takes input in the UTF-8 encoding and
45    writes it in HTML form on DESTINATION.
46    This stream produces a sequence of lines.  The caller is responsible
47    for opening the <body><html> elements before and for closing them after
48    the use of this stream.
49    Note that the resulting stream must be closed before DESTINATION can be
50    closed.  */
51 extern html_ostream_t html_ostream_create (ostream_t destination);
52
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* _HTML_OSTREAM_H */