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.3 by root, Tue Sep 7 12:34:05 2004 UTC vs.
Revision 1.9 by root, Wed Jan 11 00:59:58 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
100 operator Display *() const { return display; }
101
89 void flush (); 102 void flush ();
90 103 Atom atom (const char *name);
91 void set_selection_owner (rxvt_term *owner); 104 void set_selection_owner (rxvt_term *owner);
92 105
93 void reg (xevent_watcher *w); 106 void reg (xevent_watcher *w);
94 void unreg (xevent_watcher *w); 107 void unreg (xevent_watcher *w);
95 108
98 void unreg (im_watcher *w); 111 void unreg (im_watcher *w);
99 112
100 rxvt_xim *get_xim (const char *locale, const char *modifiers); 113 rxvt_xim *get_xim (const char *locale, const char *modifiers);
101 void put_xim (rxvt_xim *xim); 114 void put_xim (rxvt_xim *xim);
102#endif 115#endif
103
104 Atom atom (const char *name);
105}; 116};
106 117
107#ifdef USE_XIM 118#ifdef USE_XIM
108struct im_watcher : watcher, callback0<void> { 119struct im_watcher : watcher, callback0<void> {
109 template<class O1, class O2> 120 template<class O1, class O2>
163 174
164 bool set (rxvt_display *display, Pixel p); 175 bool set (rxvt_display *display, Pixel p);
165 bool set (rxvt_display *display, const char *name); 176 bool set (rxvt_display *display, const char *name);
166 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);
167 178
168 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);
169 181
170 void free (rxvt_display *display); 182 void free (rxvt_display *display);
171}; 183};
172 184
173#endif 185#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines