Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/include/grlib.h
blob: 288b0ddd11c86d6dcc6bc305c61e6ed60bd700c0 (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
#ifndef _TEXT_H
#define _TEXT_H
#ifdef __cplusplus
extern "C" {
#endif
    extern CONST struct xfont {
	CONST unsigned char *data;
	int width, height, realwidth, encoding;
    } xsmallfont, xbigfont, xbigfont2, xaafont, xsmallfontil1, xbigfontil1,
	xmedfontil1, xbigfont3;
    int xiconv(int encoding, char *out, int *outlen, const char *in,
	       int *inlen);
    int xprint(struct image *image, CONST struct xfont *current, int x,
	       int y, CONST char *text, int fgcolor,
	       int bgcolor, int mode);
#define TEXT_PRESSED 1
/*
#define xtextheight(font) ((font)->height+1)
#define xtextcharw(font,c) ((font)->width)
 */
    int xtextwidth(CONST struct xfont *font, CONST char *text);
    int xtextheight(CONST struct xfont *font);
    int xtextcharw(CONST struct xfont *font, CONST char c);
    void xrectangle(struct image *image, int x, int y, int width,
		    int height, int fgcolor);
    void xvline(struct image *image, int x, int y, int height,
		int fgcolor);
    void xhline(struct image *image, int x, int y, int width, int fgcolor);
    char *xsaveline(struct image *img, int x1, int y1, int x2, int y2);
    void xrestoreline(struct image *img, char *data, int x1, int y1,
		      int x2, int y2);
    void xline(struct image *img, int x1, int y1, int x2, int y2,
	       int color);
    void xprepareimage(struct image *img);
    void xdrawcursor(struct image *img, int x, int y, int color,
		     int height);
#ifdef __cplusplus
}
#endif
#endif