… | |
… | |
26 | struct refcounted { |
26 | struct refcounted { |
27 | int referenced; |
27 | int referenced; |
28 | char *id; |
28 | char *id; |
29 | |
29 | |
30 | refcounted (const char *id); |
30 | refcounted (const char *id); |
31 | bool init () { return false; } |
31 | bool ref_init () { return false; } |
|
|
32 | void ref_next () { } |
32 | ~refcounted (); |
33 | ~refcounted (); |
33 | }; |
34 | }; |
34 | |
35 | |
35 | template<class T> |
36 | template<class T> |
36 | struct refcache : vector<T *> { |
37 | struct refcache : vector<T *> { |
… | |
… | |
53 | |
54 | |
54 | //public |
55 | //public |
55 | XIM xim; |
56 | XIM xim; |
56 | |
57 | |
57 | rxvt_xim (const char *id) : refcounted (id) { } |
58 | rxvt_xim (const char *id) : refcounted (id) { } |
58 | bool init (); |
59 | bool ref_init (); |
59 | ~rxvt_xim (); |
60 | ~rxvt_xim (); |
60 | }; |
61 | }; |
61 | #endif |
62 | #endif |
62 | |
63 | |
63 | struct rxvt_display : refcounted { |
64 | struct rxvt_display : refcounted { |
… | |
… | |
89 | #ifdef POINTER_BLANK |
90 | #ifdef POINTER_BLANK |
90 | Cursor blank_cursor; |
91 | Cursor blank_cursor; |
91 | #endif |
92 | #endif |
92 | |
93 | |
93 | rxvt_display (const char *id); |
94 | rxvt_display (const char *id); |
|
|
95 | XrmDatabase get_resources (); |
94 | bool init (); |
96 | bool ref_init (); |
|
|
97 | void ref_next (); |
95 | ~rxvt_display (); |
98 | ~rxvt_display (); |
96 | |
99 | |
97 | operator Display *() const { return display; } |
100 | operator Display *() const { return display; } |
98 | |
101 | |
99 | void flush (); |
102 | void flush (); |
… | |
… | |
171 | |
174 | |
172 | bool set (rxvt_display *display, Pixel p); |
175 | bool set (rxvt_display *display, Pixel p); |
173 | bool set (rxvt_display *display, const char *name); |
176 | bool set (rxvt_display *display, const char *name); |
174 | bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); |
177 | bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); |
175 | |
178 | |
176 | rxvt_color fade (rxvt_display *, int percent); |
179 | rxvt_color fade (rxvt_display *, int percent); // fades to black |
|
|
180 | rxvt_color fade (rxvt_display *, int percent, rxvt_color &fadeto); |
177 | |
181 | |
178 | void free (rxvt_display *display); |
182 | void free (rxvt_display *display); |
179 | }; |
183 | }; |
180 | |
184 | |
181 | #endif |
185 | #endif |