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.2 by root, Wed Aug 25 02:33:09 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 {
65#ifdef USE_XIM 71#ifdef USE_XIM
66 refcache<rxvt_xim> xims; 72 refcache<rxvt_xim> xims;
67 vector<im_watcher *> imw; 73 vector<im_watcher *> imw;
68 74
69 void im_change_cb (); 75 void im_change_cb ();
76 void im_change_check ();
70#endif 77#endif
71 78
72//public 79//public
73 Display *display; 80 Display *display;
74 int depth; 81 int depth;
75 int screen; 82 int screen;
76 Visual *visual; 83 Visual *visual;
77 Colormap cmap; 84 Colormap cmap;
78 Window root; 85 Window root;
79 rxvt_term *selection_owner; 86 rxvt_term *selection_owner;
80#ifndef NO_SLOW_LINK_SUPPORT 87#ifndef NO_SLOW_LINK_SUPPORT
81 bool is_local; 88 bool is_local;
89#endif
90#ifdef POINTER_BLANK
91 Cursor blank_cursor;
82#endif 92#endif
83 93
84 rxvt_display (const char *id); 94 rxvt_display (const char *id);
95 XrmDatabase get_resources ();
85 bool init (); 96 bool ref_init ();
97 void ref_next ();
86 ~rxvt_display (); 98 ~rxvt_display ();
87 99
100 operator Display *() const { return display; }
101
88 void flush (); 102 void flush ();
89 103 Atom atom (const char *name);
90 void set_selection_owner (rxvt_term *owner); 104 void set_selection_owner (rxvt_term *owner);
91 105
92 void reg (xevent_watcher *w); 106 void reg (xevent_watcher *w);
93 void unreg (xevent_watcher *w); 107 void unreg (xevent_watcher *w);
94 108
97 void unreg (im_watcher *w); 111 void unreg (im_watcher *w);
98 112
99 rxvt_xim *get_xim (const char *locale, const char *modifiers); 113 rxvt_xim *get_xim (const char *locale, const char *modifiers);
100 void put_xim (rxvt_xim *xim); 114 void put_xim (rxvt_xim *xim);
101#endif 115#endif
102
103 Atom atom (const char *name);
104}; 116};
105 117
106#ifdef USE_XIM 118#ifdef USE_XIM
107struct im_watcher : watcher, callback0<void> { 119struct im_watcher : watcher, callback0<void> {
108 template<class O1, class O2> 120 template<class O1, class O2>
162 174
163 bool set (rxvt_display *display, Pixel p); 175 bool set (rxvt_display *display, Pixel p);
164 bool set (rxvt_display *display, const char *name); 176 bool set (rxvt_display *display, const char *name);
165 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);
166 178
167 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);
168 181
169 void free (rxvt_display *display); 182 void free (rxvt_display *display);
170}; 183};
171 184
172#endif 185#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines