aboutsummaryrefslogtreecommitdiff
path: root/src/Rotated.hh
blob: c07e1ce0d70b7d95dd9bee0eb61c860f5f5e8cd9 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* ************************************************************************ */


/* Header file for the `xvertext' routines.

   Copyright (c) 1992 Alan Richardson (mppa3@uk.ac.sussex.syma) */


/* ************************************************************************ */


#ifndef _XVERTEXT_INCLUDED_ 
#define _XVERTEXT_INCLUDED_


#define XV_VERSION      2.0
#define XV_COPYRIGHT    "xvertext routines Copyright (c) 1992 Alan Richardson"


/* ---------------------------------------------------------------------- */


/* *** The font structures *** */

struct BitmapStruct {
    int			 bit_w;
    int			 bit_h;

    Pixmap bm;
};

struct XRotCharStruct {
    int			 ascent;
    int			 descent;
    int			 lbearing;
    int			 rbearing;
    int			 width;

    BitmapStruct	 glyph;
};

struct XRotFontStruct {
    int			 dir;
    int			 height;
    int			 max_ascent;
    int			 max_descent;
    int			 max_char;
    int			 min_char;
    char 		*name;

    XFontStruct		*xfontstruct;

    XRotCharStruct	 per_char[95];
};


/* ---------------------------------------------------------------------- */


extern float XRotVersion(char *, int);
extern XRotFontStruct *XRotLoadFont(Display *, char *, float);
extern void XRotUnloadFont(Display *, XRotFontStruct *);
extern unsigned int XRotTextWidth(XRotFontStruct *, char *, int);
extern void XRotDrawString(Display *, XRotFontStruct *, Drawable, GC,
			   int, int, char *, int);

/* ---------------------------------------------------------------------- */

extern int		 xv_errno;

#define XV_NOFONT	 1  /* no such font on X server */
#define XV_NOMEM	 2  /* couldn't do malloc */
#define XV_NOXIMAGE	 3  /* couldn't create an XImage */


/* ---------------------------------------------------------------------- */
 

#else

extern int		 xv_errno;

#endif