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.11 by root, Wed Jan 25 02:42:06 2006 UTC vs.
Revision 1.14 by root, Mon Jan 30 02:21:21 2006 UTC

28 XA_VT_SELECTION, 28 XA_VT_SELECTION,
29 XA_INCR, 29 XA_INCR,
30 XA_WM_PROTOCOLS, 30 XA_WM_PROTOCOLS,
31 XA_WM_DELETE_WINDOW, 31 XA_WM_DELETE_WINDOW,
32 XA_CLIPBOARD, 32 XA_CLIPBOARD,
33 XA_AVERAGE_WIDTH,
34 XA_WEIGHT_NAME,
35 XA_SLANT,
36 XA_CHARSET_REGISTRY,
37 XA_CHARSET_ENCODING,
33#if ENABLE_FRILLS 38#if ENABLE_FRILLS
34 XA_MOTIF_WM_HINTS, 39 XA_MOTIF_WM_HINTS,
35#endif 40#endif
36#if ENABLE_EWMH 41#if ENABLE_EWMH
37 XA_NET_WM_PID, 42 XA_NET_WM_PID,
49#endif 54#endif
50#if ENABLE_XEMBED 55#if ENABLE_XEMBED
51 XA_XEMBED, 56 XA_XEMBED,
52 XA_XEMBED_INFO, 57 XA_XEMBED_INFO,
53#endif 58#endif
59#if !ENABLE_MINIMAL
60 // these are usually allocated by other subsystens, but we do it
61 // here to avoid a server roundtrip.
62 XA_SCREEN_RESOURCES,
63 XA_XDCCC_LINEAR_RGB_CORRECTION,
64 XA_XDCCC_LINEAR_RGB_MATRICES,
65 XA_WM_COLORMAP_WINDOWS,
66 XA_WM_STATE,
67#endif
54 NUM_XA 68 NUM_XA
55}; 69};
56 70
57struct rxvt_term; 71struct rxvt_term;
58struct rxvt_display; 72struct rxvt_display;
96 bool ref_init (); 110 bool ref_init ();
97 ~rxvt_xim (); 111 ~rxvt_xim ();
98}; 112};
99#endif 113#endif
100 114
115struct rxvt_screen {
116 rxvt_display *display;
117 Display *xdisp;
118 int depth;
119 Visual *visual;
120 Colormap cmap;
121
122 void set (rxvt_display *disp);
123 void set (rxvt_display *disp, int bitdepth);
124 void clear ();
125};
126
101struct rxvt_display : refcounted { 127struct rxvt_display : refcounted {
102 io_manager_vec<xevent_watcher> xw; 128 io_manager_vec<xevent_watcher> xw;
103 129
104 io_watcher x_ev; void x_cb (io_watcher &w, short revents); 130 io_watcher x_ev; void x_cb (io_watcher &w, short revents);
105 131
111 void im_change_check (); 137 void im_change_check ();
112#endif 138#endif
113 139
114//public 140//public
115 Display *display; 141 Display *display;
116 int depth;
117 int screen; 142 int screen;
118 Visual *visual;
119 Colormap cmap;
120 Window root; 143 Window root;
121 rxvt_term *selection_owner; 144 rxvt_term *selection_owner;
122 Atom xa[NUM_XA]; 145 Atom xa[NUM_XA];
123#ifndef NO_SLOW_LINK_SUPPORT 146#ifndef NO_SLOW_LINK_SUPPORT
124 bool is_local; 147 bool is_local;
189extern refcache<rxvt_display> displays; 212extern refcache<rxvt_display> displays;
190 213
191///////////////////////////////////////////////////////////////////////////// 214/////////////////////////////////////////////////////////////////////////////
192 215
193typedef unsigned long Pixel; 216typedef unsigned long Pixel;
217
218struct rxvt_rgba {
219 unsigned short r, g, b, a;
220
221 enum { MIN_CC = 0x0000, MAX_CC = 0xffff };
222
223 rxvt_rgba ()
224 { }
225
226 rxvt_rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC)
227 : r(r), g(g), b(b), a(a)
228 { }
229};
194 230
195struct rxvt_color { 231struct rxvt_color {
196#if XFT 232#if XFT
197 XftColor c; 233 XftColor c;
198 operator Pixel () const { return c.pixel; } 234 operator Pixel () const { return c.pixel; }
202#endif 238#endif
203 239
204 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } 240 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); }
205 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } 241 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); }
206 242
207 void get (rxvt_display *display, unsigned short &cr, unsigned short &cg, unsigned short &cb); 243 void get (rxvt_screen *screen, rxvt_rgba &rgba);
208 244
209 bool set (rxvt_display *display, Pixel p);
210 bool set (rxvt_display *display, const char *name); 245 bool set (rxvt_screen *screen, const char *name);
211 bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); 246 bool set (rxvt_screen *screen, rxvt_rgba rgba);
212 247
213 rxvt_color fade (rxvt_display *, int percent); // fades to black 248 rxvt_color fade (rxvt_screen *screen, int percent); // fades to black
214 rxvt_color fade (rxvt_display *, int percent, rxvt_color &fadeto); 249 rxvt_color fade (rxvt_screen *screen, int percent, rxvt_color &fadeto);
215 250
216 void free (rxvt_display *display); 251 void free (rxvt_screen *screen);
217}; 252};
218 253
219#endif 254#endif
220 255

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines