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.14 by root, Mon Jan 30 02:21:21 2006 UTC vs.
Revision 1.23 by root, Thu Feb 2 18:04:46 2006 UTC

62 XA_SCREEN_RESOURCES, 62 XA_SCREEN_RESOURCES,
63 XA_XDCCC_LINEAR_RGB_CORRECTION, 63 XA_XDCCC_LINEAR_RGB_CORRECTION,
64 XA_XDCCC_LINEAR_RGB_MATRICES, 64 XA_XDCCC_LINEAR_RGB_MATRICES,
65 XA_WM_COLORMAP_WINDOWS, 65 XA_WM_COLORMAP_WINDOWS,
66 XA_WM_STATE, 66 XA_WM_STATE,
67 XA_cursor,
68# if USE_XIM
69 // various selection targets used by XIM
70 XA_TRANSPORT,
71 XA_LOCALES,
72 XA__XIM_PROTOCOL,
73 XA__XIM_XCONNECT,
74 XA__XIM_MOREDATA,
75# endif
67#endif 76#endif
68 NUM_XA 77 NUM_XA
69}; 78};
70 79
71struct rxvt_term; 80struct rxvt_term;
112}; 121};
113#endif 122#endif
114 123
115struct rxvt_screen { 124struct rxvt_screen {
116 rxvt_display *display; 125 rxvt_display *display;
117 Display *xdisp; 126 Display *dpy;
118 int depth; 127 int depth;
119 Visual *visual; 128 Visual *visual;
120 Colormap cmap; 129 Colormap cmap;
121 130
122 void set (rxvt_display *disp); 131 void set (rxvt_display *disp);
136 void im_change_cb (); 145 void im_change_cb ();
137 void im_change_check (); 146 void im_change_check ();
138#endif 147#endif
139 148
140//public 149//public
141 Display *display; 150 Display *dpy;
142 int screen; 151 int screen;
143 Window root; 152 Window root;
144 rxvt_term *selection_owner; 153 rxvt_term *selection_owner;
145 Atom xa[NUM_XA]; 154 Atom xa[NUM_XA];
146#ifndef NO_SLOW_LINK_SUPPORT 155#ifndef NO_SLOW_LINK_SUPPORT
149#ifdef POINTER_BLANK 158#ifdef POINTER_BLANK
150 Cursor blank_cursor; 159 Cursor blank_cursor;
151#endif 160#endif
152 161
153 rxvt_display (const char *id); 162 rxvt_display (const char *id);
154 XrmDatabase get_resources (); 163 XrmDatabase get_resources (bool refresh);
155 bool ref_init (); 164 bool ref_init ();
156 void ref_next (); 165 void ref_next ();
157 ~rxvt_display (); 166 ~rxvt_display ();
158 167
159 void flush (); 168 void flush ();
213 222
214///////////////////////////////////////////////////////////////////////////// 223/////////////////////////////////////////////////////////////////////////////
215 224
216typedef unsigned long Pixel; 225typedef unsigned long Pixel;
217 226
218struct rxvt_rgba { 227struct rgba {
219 unsigned short r, g, b, a; 228 unsigned short r, g, b, a;
220 229
221 enum { MIN_CC = 0x0000, MAX_CC = 0xffff }; 230 enum { MIN_CC = 0x0000, MAX_CC = 0xffff };
222 231
223 rxvt_rgba () 232 rgba ()
224 { } 233 { }
225 234
226 rxvt_rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC) 235 rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC)
227 : r(r), g(g), b(b), a(a) 236 : r(r), g(g), b(b), a(a)
228 { } 237 { }
229}; 238};
230 239
231struct rxvt_color { 240struct rxvt_color {
232#if XFT 241#if XFT
233 XftColor c; 242 XftColor c;
243#else
244 XColor c;
245#endif
246
234 operator Pixel () const { return c.pixel; } 247 operator Pixel () const { return c.pixel; }
235#else
236 Pixel p;
237 operator Pixel () const { return p; }
238#endif
239 248
240 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } 249 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); } 250 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); }
242 251
243 void get (rxvt_screen *screen, rxvt_rgba &rgba); 252 bool alloc (rxvt_screen *screen, const rgba &color);
253 void free (rxvt_screen *screen);
254
255 void get (rgba &color);
256 void get (XColor &color);
244 257
245 bool set (rxvt_screen *screen, const char *name); 258 bool set (rxvt_screen *screen, const char *name);
246 bool set (rxvt_screen *screen, rxvt_rgba rgba); 259 bool set (rxvt_screen *screen, const rgba &color);
247 260
248 rxvt_color fade (rxvt_screen *screen, int percent); // fades to black 261 void fade (rxvt_screen *screen, int percent, rxvt_color &result, const rgba &to = rgba (0, 0, 0));
249 rxvt_color fade (rxvt_screen *screen, int percent, rxvt_color &fadeto);
250
251 void free (rxvt_screen *screen);
252}; 262};
253 263
254#endif 264#endif
255 265

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines