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

Comparing rxvt-unicode/src/rxvttoolkit.h (file contents):
Revision 1.4 by root, Sat Dec 11 23:01:36 2004 UTC vs.
Revision 1.10 by root, Fri Jan 13 04:59:04 2006 UTC

26struct refcounted { 26struct 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
35template<class T> 36template<class T>
36struct refcache : vector<T *> { 37struct refcache : vector<T *> {
37 T *get (const char *id); 38 T *get (const char *id);
38 void put (T *obj); 39 void put (T *obj);
40 void clear ();
41
39 ~refcache (); 42 ~refcache ()
43 {
44 clear ();
45 }
40}; 46};
41 47
42///////////////////////////////////////////////////////////////////////////// 48/////////////////////////////////////////////////////////////////////////////
43 49
44#ifdef USE_XIM 50#ifdef USE_XIM
48 54
49//public 55//public
50 XIM xim; 56 XIM xim;
51 57
52 rxvt_xim (const char *id) : refcounted (id) { } 58 rxvt_xim (const char *id) : refcounted (id) { }
53 bool init (); 59 bool ref_init ();
54 ~rxvt_xim (); 60 ~rxvt_xim ();
55}; 61};
56#endif 62#endif
57 63
58struct rxvt_display : refcounted { 64struct rxvt_display : refcounted {
69 void im_change_cb (); 75 void im_change_cb ();
70 void im_change_check (); 76 void im_change_check ();
71#endif 77#endif
72 78
73//public 79//public
74 Display *display; 80 Display *display;
75 int depth; 81 int depth;
76 int screen; 82 int screen;
77 Visual *visual; 83 Visual *visual;
78 Colormap cmap; 84 Colormap cmap;
79 Window root; 85 Window root;
80 rxvt_term *selection_owner; 86 rxvt_term *selection_owner;
81#ifndef NO_SLOW_LINK_SUPPORT 87#ifndef NO_SLOW_LINK_SUPPORT
82 bool is_local; 88 bool is_local;
89#endif
90#ifdef POINTER_BLANK
91 Cursor blank_cursor;
83#endif 92#endif
84 93
85 rxvt_display (const char *id); 94 rxvt_display (const char *id);
95 XrmDatabase get_resources ();
86 bool init (); 96 bool ref_init ();
97 void ref_next ();
87 ~rxvt_display (); 98 ~rxvt_display ();
88 99
89 operator Display *() const { return display; }
90
91 void flush (); 100 void flush ();
92 101 Atom atom (const char *name);
93 void set_selection_owner (rxvt_term *owner); 102 void set_selection_owner (rxvt_term *owner);
94 103
95 void reg (xevent_watcher *w); 104 void reg (xevent_watcher *w);
96 void unreg (xevent_watcher *w); 105 void unreg (xevent_watcher *w);
97 106
100 void unreg (im_watcher *w); 109 void unreg (im_watcher *w);
101 110
102 rxvt_xim *get_xim (const char *locale, const char *modifiers); 111 rxvt_xim *get_xim (const char *locale, const char *modifiers);
103 void put_xim (rxvt_xim *xim); 112 void put_xim (rxvt_xim *xim);
104#endif 113#endif
105
106 Atom atom (const char *name);
107}; 114};
108 115
109#ifdef USE_XIM 116#ifdef USE_XIM
110struct im_watcher : watcher, callback0<void> { 117struct im_watcher : watcher, callback0<void> {
111 template<class O1, class O2> 118 template<class O1, class O2>
165 172
166 bool set (rxvt_display *display, Pixel p); 173 bool set (rxvt_display *display, Pixel p);
167 bool set (rxvt_display *display, const char *name); 174 bool set (rxvt_display *display, const char *name);
168 bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); 175 bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb);
169 176
170 rxvt_color fade (rxvt_display *, int percent); 177 rxvt_color fade (rxvt_display *, int percent); // fades to black
178 rxvt_color fade (rxvt_display *, int percent, rxvt_color &fadeto);
171 179
172 void free (rxvt_display *display); 180 void free (rxvt_display *display);
173}; 181};
174 182
175#endif 183#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines