… | |
… | |
9 | #ifdef HAVE_XSETLOCALE |
9 | #ifdef HAVE_XSETLOCALE |
10 | # define X_LOCALE |
10 | # define X_LOCALE |
11 | # include <X11/Xlocale.h> |
11 | # include <X11/Xlocale.h> |
12 | #else |
12 | #else |
13 | # ifdef HAVE_SETLOCALE |
13 | # ifdef HAVE_SETLOCALE |
14 | # include <locale.h> |
14 | # include <clocale> |
15 | # endif |
15 | # endif |
16 | #endif /* HAVE_XLOCALE */ |
16 | #endif /* HAVE_XLOCALE */ |
17 | |
17 | |
18 | #ifdef HAVE_NL_LANGINFO |
18 | #ifdef HAVE_NL_LANGINFO |
19 | # include <langinfo.h> |
19 | # include <langinfo.h> |
… | |
… | |
34 | }; |
34 | }; |
35 | |
35 | |
36 | struct rxvt_drawable { |
36 | struct rxvt_drawable { |
37 | rxvt_display *display; |
37 | rxvt_display *display; |
38 | Drawable drawable; |
38 | Drawable drawable; |
39 | # if XFT |
39 | #if XFT |
40 | XftDraw *xftdrawable; |
40 | XftDraw *xftdrawable; |
|
|
41 | operator XftDraw *(); |
41 | #endif |
42 | #endif |
|
|
43 | |
42 | rxvt_drawable (rxvt_display *display, Drawable drawable) |
44 | rxvt_drawable (rxvt_display *display, Drawable drawable) |
43 | : display(display), drawable(drawable), xftdrawable(0) { } |
45 | : display(display), |
|
|
46 | #if XFT |
|
|
47 | xftdrawable(0), |
|
|
48 | #endif |
|
|
49 | drawable(drawable) |
|
|
50 | { } |
|
|
51 | |
|
|
52 | #if XFT |
44 | ~rxvt_drawable (); |
53 | ~rxvt_drawable (); |
|
|
54 | #endif |
45 | |
55 | |
46 | operator Drawable() { return drawable; } |
56 | operator Drawable() { return drawable; } |
47 | operator XftDraw *(); |
|
|
48 | }; |
57 | }; |
49 | |
58 | |
50 | struct rxvt_font { |
59 | struct rxvt_font { |
|
|
60 | struct rxvt_fontset *fs; |
51 | // managed by the fontset |
61 | // managed by the fontset |
52 | rxvt_t r; |
62 | rxvt_t r; |
53 | void set_term (rxvt_t r) { this->r = r; } |
63 | void set_term (rxvt_t r) { this->r = r; } |
54 | |
64 | |
55 | char *name; |
65 | char *name; |
… | |
… | |
88 | #define FONT_UNREF(f) do { (f)->clear (); delete (f); } while (0) |
98 | #define FONT_UNREF(f) do { (f)->clear (); delete (f); } while (0) |
89 | |
99 | |
90 | struct rxvt_fallback_font; |
100 | struct rxvt_fallback_font; |
91 | |
101 | |
92 | struct rxvt_fontset { |
102 | struct rxvt_fontset { |
|
|
103 | char *fontdesc; |
|
|
104 | |
93 | rxvt_fontset (rxvt_t r); |
105 | rxvt_fontset (rxvt_t r); |
94 | ~rxvt_fontset (); |
106 | ~rxvt_fontset (); |
95 | |
107 | |
96 | rxvt_font *new_font (const char *name, codeset cs); |
108 | rxvt_font *new_font (const char *name, codeset cs); |
97 | |
109 | |