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.1 by root, Sun Aug 15 00:37:04 2004 UTC vs.
Revision 1.10 by root, Fri Jan 13 04:59:04 2006 UTC

16#include "rxvtutil.h" 16#include "rxvtutil.h"
17 17
18#include "callback.h" 18#include "callback.h"
19 19
20struct rxvt_term; 20struct rxvt_term;
21struct rxvt_display;
21 22
22struct im_watcher; 23struct im_watcher;
23struct xevent_watcher; 24struct xevent_watcher;
24 25
25struct refcounted { 26struct refcounted {
26 int referenced; 27 int referenced;
27 char *id; 28 char *id;
28 29
29 refcounted (const char *id); 30 refcounted (const char *id);
30 bool init () { return false; } 31 bool ref_init () { return false; }
32 void ref_next () { }
31 ~refcounted (); 33 ~refcounted ();
32}; 34};
33 35
34template<class T> 36template<class T>
35struct refcache : vector<T *> { 37struct refcache : vector<T *> {
36 T *get (const char *id); 38 T *get (const char *id);
37 void put (T *obj); 39 void put (T *obj);
40 void clear ();
41
38 ~refcache (); 42 ~refcache ()
43 {
44 clear ();
45 }
39}; 46};
40 47
41///////////////////////////////////////////////////////////////////////////// 48/////////////////////////////////////////////////////////////////////////////
42 49
43#ifdef USE_XIM 50#ifdef USE_XIM
47 54
48//public 55//public
49 XIM xim; 56 XIM xim;
50 57
51 rxvt_xim (const char *id) : refcounted (id) { } 58 rxvt_xim (const char *id) : refcounted (id) { }
52 bool init (); 59 bool ref_init ();
53 ~rxvt_xim (); 60 ~rxvt_xim ();
54}; 61};
55#endif 62#endif
56 63
57struct rxvt_display : refcounted { 64struct rxvt_display : refcounted {
64#ifdef USE_XIM 71#ifdef USE_XIM
65 refcache<rxvt_xim> xims; 72 refcache<rxvt_xim> xims;
66 vector<im_watcher *> imw; 73 vector<im_watcher *> imw;
67 74
68 void im_change_cb (); 75 void im_change_cb ();
76 void im_change_check ();
69#endif 77#endif
70 78
71//public 79//public
72 Display *display; 80 Display *display;
73 int depth; 81 int depth;
74 int screen; 82 int screen;
75 Visual *visual; 83 Visual *visual;
76 Colormap cmap; 84 Colormap cmap;
77 Window root; 85 Window root;
78 rxvt_term *selection_owner; 86 rxvt_term *selection_owner;
79#ifndef NO_SLOW_LINK_SUPPORT 87#ifndef NO_SLOW_LINK_SUPPORT
80 bool is_local; 88 bool is_local;
89#endif
90#ifdef POINTER_BLANK
91 Cursor blank_cursor;
81#endif 92#endif
82 93
83 rxvt_display (const char *id); 94 rxvt_display (const char *id);
95 XrmDatabase get_resources ();
84 bool init (); 96 bool ref_init ();
97 void ref_next ();
85 ~rxvt_display (); 98 ~rxvt_display ();
86 99
87 void flush (); 100 void flush ();
88 101 Atom atom (const char *name);
89 void set_selection_owner (rxvt_term *owner); 102 void set_selection_owner (rxvt_term *owner);
90 103
91 void reg (xevent_watcher *w); 104 void reg (xevent_watcher *w);
92 void unreg (xevent_watcher *w); 105 void unreg (xevent_watcher *w);
93 106
96 void unreg (im_watcher *w); 109 void unreg (im_watcher *w);
97 110
98 rxvt_xim *get_xim (const char *locale, const char *modifiers); 111 rxvt_xim *get_xim (const char *locale, const char *modifiers);
99 void put_xim (rxvt_xim *xim); 112 void put_xim (rxvt_xim *xim);
100#endif 113#endif
101
102 Atom atom (const char *name);
103}; 114};
104 115
105#ifdef USE_XIM 116#ifdef USE_XIM
106struct im_watcher : watcher, callback0<void> { 117struct im_watcher : watcher, callback0<void> {
107 template<class O1, class O2> 118 template<class O1, class O2>
161 172
162 bool set (rxvt_display *display, Pixel p); 173 bool set (rxvt_display *display, Pixel p);
163 bool set (rxvt_display *display, const char *name); 174 bool set (rxvt_display *display, const char *name);
164 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);
165 176
166 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);
167 179
168 void free (rxvt_display *display); 180 void free (rxvt_display *display);
169}; 181};
170 182
171#endif 183#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines