Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/include/xshl.h
blob: 05631f8d8c62f90361e5c4813f4eefbfc64bc659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef XSHL_H
#define XSHL_H
#ifdef __cplusplus
extern "C" {
#endif

#define XSHL_BIG 1
#define XSHL_EMPH 2
#define XSHL_WHITE 4
#define XSHL_RED 8
#define XSHL_BLACK 16
#define XSHL_COLORMASK (XSHL_BLACK|XSHL_RED|XSHL_WHITE)
#define XSHL_RIGHTALIGN 32
#define XSHL_CENTERALIGN 64
#define XSHL_MONOSPACE 128
#define XSHL_LINK 256
    struct xshl_context {
	int flags;
	char *linktext;
    };
    struct xshl_item {
	struct xshl_context c;
	char *text;
	int x;
	int width;
	struct xshl_item *next;
    };
    struct xshl_line {
	int y;
	struct xshl_item *first;
    };
    extern char *xshl_error;
    struct xshl_line *xshl_interpret(void *userdata, int (*get) (void *),
				     int width, int getwidth(void *,
							     int flags,
							     CONST char
							     *text),
				     int startflags, int smallheight,
				     int bigheight);
    void xshl_free(struct xshl_line *);
    int xshl_textlen(void *data, int flags, CONST char *text);
    void xshl_print(int startskip, struct xshl_line *lines);
    struct xshl_line *help_make(CONST char *command,
				int getwidth(void *, int flags,
					     CONST char *text), int width,
				int smallheight, int bigheight);
#ifdef __cplusplus
}
#endif
#endif