1 /* Abstract output stream for CSS styled text.
2 Copyright (C) 2006 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2006.
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.
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.
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/>. */
18 #ifndef _STYLED_OSTREAM_H
19 #define _STYLED_OSTREAM_H
24 /* A styled output stream is an object to which one can feed a sequence of
25 bytes, marking some runs of text as belonging to specific CSS classes,
26 where the rendering of the CSS classes is defined through a CSS (cascading
29 struct styled_ostream : struct ostream
33 /* Start a run of text belonging to CLASSNAME. The CLASSNAME is the name
34 of a CSS class. It can be chosen arbitrarily and customized through
35 an inline or external CSS. */
36 void begin_use_class (styled_ostream_t stream, const char *classname);
38 /* End a run of text belonging to CLASSNAME.
39 The begin_use_class / end_use_class calls must match properly. */
40 void end_use_class (styled_ostream_t stream, const char *classname);
44 #endif /* _STYLED_OSTREAM_H */