2007-08-28 15:05:00 -04:00
|
|
|
#ifndef EL__DOCUMENT_FORMAT_H
|
|
|
|
#define EL__DOCUMENT_FORMAT_H
|
|
|
|
|
|
|
|
#include "util/color.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2007-08-28 15:05:00 -04:00
|
|
|
struct document_options;
|
|
|
|
struct screen_char;
|
|
|
|
|
|
|
|
|
|
|
|
enum text_style_format {
|
|
|
|
AT_BOLD = 1,
|
|
|
|
AT_ITALIC = 2,
|
|
|
|
AT_UNDERLINE = 4,
|
|
|
|
AT_FIXED = 8,
|
|
|
|
AT_GRAPHICS = 16,
|
|
|
|
AT_PREFORMATTED = 32,
|
2011-04-17 16:23:00 -04:00
|
|
|
|
|
|
|
/* AT_NO_ENTITIES means the parser has already expanded
|
|
|
|
* entities and numeric character references, so the put_chars
|
|
|
|
* function of the renderer must not do that again. */
|
|
|
|
AT_NO_ENTITIES = 64,
|
2023-08-25 14:10:54 -04:00
|
|
|
AT_STRIKE = 128
|
2007-08-28 15:05:00 -04:00
|
|
|
};
|
|
|
|
|
2022-01-29 11:03:55 -05:00
|
|
|
typedef signed short text_style_format_T;
|
2022-01-28 09:16:34 -05:00
|
|
|
|
2007-10-12 10:24:41 -04:00
|
|
|
struct text_style_color {
|
2007-10-12 10:41:06 -04:00
|
|
|
color_T foreground;
|
|
|
|
color_T background;
|
2007-10-12 10:24:41 -04:00
|
|
|
};
|
|
|
|
|
2007-08-28 15:05:00 -04:00
|
|
|
struct text_style {
|
2022-01-28 09:16:34 -05:00
|
|
|
text_style_format_T attr;
|
2007-10-12 10:24:41 -04:00
|
|
|
struct text_style_color color;
|
2007-08-28 15:05:00 -04:00
|
|
|
};
|
|
|
|
|
2007-10-10 08:50:56 -04:00
|
|
|
#define INIT_TEXT_STYLE(attr, fg, bg) { attr, {fg, bg}}
|
|
|
|
|
2016-04-20 12:05:00 -04:00
|
|
|
void get_screen_char_template(struct screen_char *template_, struct document_options *options, struct text_style style);
|
2007-08-28 15:05:00 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-08-28 15:05:00 -04:00
|
|
|
#endif
|
|
|
|
|