ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/defaultfont.h
(Generate patch)

Comparing rxvt-unicode/src/defaultfont.h (file contents):
Revision 1.2 by pcg, Mon Nov 24 17:31:27 2003 UTC vs.
Revision 1.6 by pcg, Thu Dec 4 00:43:26 2003 UTC

1/* 1/*
2 * $Id: defaultfont.h,v 1.2 2003/11/24 17:31:27 pcg Exp $ 2 * $Id: defaultfont.h,v 1.6 2003/12/04 00:43:26 pcg Exp $
3 */ 3 */
4 4
5#ifndef _DEFAULTFONT_H_ 5#ifndef _DEFAULTFONT_H_
6#define _DEFAULTFONT_H_ 6#define _DEFAULTFONT_H_
7 7
21#include "rxvtlib.h" 21#include "rxvtlib.h"
22#include "feature.h" 22#include "feature.h"
23#include "encoding.h" 23#include "encoding.h"
24#include "rxvtvec.h" 24#include "rxvtvec.h"
25 25
26#include "defaultfont.intpro" /* PROTOS for internal routines */
27
28typedef struct rxvt_vars rxvt_t;
29
30struct rxvt_font { 26struct rxvt_font {
31 // managed by the fontset 27 // managed by the fontset
32#if EXPLICIT_CONTEXT 28 rxvt_t r;
33 rxvt_t *rxvt_term; 29 void set_term (rxvt_t r) { this->r = r; }
34 void set_term (pR) { this->rxvt_term = R; } 30
35#else
36 void set_term (pR) { }
37#endif
38 char *name; 31 char *name;
39 codeset cs; 32 codeset cs;
40 bool loaded; 33 bool loaded; // wether we tried loading it before (not wether it's loaded)
41 34
42 // managed by the font object 35 // managed by the font object
43 bool prop; // wether this is a proportional font or has other funny characteristics 36 bool prop; // wether this is a proportional font or has other funny characteristics
44 int ascent, descent, 37 int ascent, descent,
45 width, height; 38 width, height;
70#define FONT_UNREF(f) delete f 63#define FONT_UNREF(f) delete f
71 64
72struct rxvt_fallback_font; 65struct rxvt_fallback_font;
73 66
74struct rxvt_fontset { 67struct rxvt_fontset {
75 rxvt_fontset (pR); 68 rxvt_fontset (rxvt_t r);
76 ~rxvt_fontset (); 69 ~rxvt_fontset ();
77 70
78 rxvt_font *new_font (const char *name, codeset cs); 71 rxvt_font *new_font (const char *name, codeset cs);
79 72
80 void populate (const char *desc); 73 void populate (const char *desc);
89 { 82 {
90 return fonts[base_id]; 83 return fonts[base_id];
91 } 84 }
92 85
93private: 86private:
94#ifdef EXPLICIT_CONTEXT 87 rxvt_t r;
95 rxvt_t *rxvt_term;
96#endif
97 simplevec<rxvt_font *> fonts; 88 simplevec<rxvt_font *> fonts;
98 const rxvt_fallback_font *fallback; 89 const rxvt_fallback_font *fallback;
99 90
100 int height; 91 int height;
101 int base_id; 92 int base_id;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines