ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.490 by sf-exg, Wed May 30 21:20:05 2012 UTC vs.
Revision 1.493 by sf-exg, Thu May 31 20:23:51 2012 UTC

209 environ = orig_env; 209 environ = orig_env;
210 } 210 }
211}; 211};
212 212
213#ifdef HAVE_BG_PIXMAP 213#ifdef HAVE_BG_PIXMAP
214struct image_effects
215{
216 bool tint_set;
217 rxvt_color tint;
218 int shade;
219 int h_blurRadius, v_blurRadius;
220
221 image_effects ()
222 {
223 tint_set =
224 h_blurRadius =
225 v_blurRadius = 0;
226 shade = 100;
227 }
228
229 bool need_tint ()
230 {
231 return shade != 100 || tint_set;
232 }
233
234 bool need_blur ()
235 {
236 return h_blurRadius && v_blurRadius;
237 }
238
239 bool set_tint (const rxvt_color &new_tint);
240 bool set_shade (const char *shade_str);
241 bool set_blur (const char *geom);
242};
243
214# ifdef BG_IMAGE_FROM_FILE 244# ifdef BG_IMAGE_FROM_FILE
215enum { 245enum {
216 IM_IS_SET = 1 << 0, 246 IM_IS_SET = 1 << 0,
217 IM_IS_SIZE_SENSITIVE = 1 << 1, 247 IM_IS_SIZE_SENSITIVE = 1 << 1,
218 IM_KEEP_ASPECT = 1 << 2, 248 IM_KEEP_ASPECT = 1 << 2,
227 defaultScale = windowScale, 257 defaultScale = windowScale,
228 centerAlign = 50, 258 centerAlign = 50,
229 defaultAlign = centerAlign, 259 defaultAlign = centerAlign,
230}; 260};
231 261
232struct rxvt_image 262struct rxvt_image : image_effects
233{ 263{
234 unsigned short alpha; 264 unsigned short alpha;
235 uint8_t flags; 265 uint8_t flags;
236 unsigned int h_scale, v_scale; /* percents of the window size */ 266 unsigned int h_scale, v_scale; /* percents of the window size */
237 int h_align, v_align; /* percents of the window size: 267 int h_align, v_align; /* percents of the window size:
1164 BG_IS_TRANSPARENT = 1 << 1, 1194 BG_IS_TRANSPARENT = 1 << 1,
1165 BG_NEEDS_REFRESH = 1 << 2, 1195 BG_NEEDS_REFRESH = 1 << 2,
1166 1196
1167 BG_HAS_RENDER = 1 << 3, 1197 BG_HAS_RENDER = 1 << 3,
1168 BG_HAS_RENDER_CONV = 1 << 4, 1198 BG_HAS_RENDER_CONV = 1 << 4,
1169 BG_CLIENT_RENDER = 1 << 5,
1170
1171 BG_TINT_SET = 1 << 6,
1172 BG_TINT_BITAND = 1 << 7,
1173 }; 1199 };
1174 1200
1175 uint8_t bg_flags; 1201 uint8_t bg_flags;
1176 1202
1177# ifdef BG_IMAGE_FROM_FILE 1203# ifdef BG_IMAGE_FROM_FILE
1186 void parse_image (int id, const char *type, const char *arg); 1212 void parse_image (int id, const char *type, const char *arg);
1187# endif 1213# endif
1188 1214
1189# ifdef ENABLE_TRANSPARENCY 1215# ifdef ENABLE_TRANSPARENCY
1190 Pixmap root_pixmap; /* current root pixmap set */ 1216 Pixmap root_pixmap; /* current root pixmap set */
1191 rxvt_color tint; 1217 image_effects root_effects;
1192 int shade;
1193 int h_blurRadius, v_blurRadius;
1194 1218
1195 void bg_set_transparent () 1219 void bg_set_transparent ()
1196 { 1220 {
1197 bg_flags |= BG_IS_TRANSPARENT; 1221 bg_flags |= BG_IS_TRANSPARENT;
1198 } 1222 }
1199 void bg_set_root_pixmap (); 1223 void bg_set_root_pixmap ();
1200 bool bg_set_tint (rxvt_color &new_tint); 1224 bool render_root_image ();
1201 bool bg_set_shade (const char *shade_str);
1202 bool bg_set_blur (const char *geom);
1203
1204 bool blur_pixmap (Pixmap pixmap, int width, int height);
1205 bool tint_pixmap (Pixmap pixmap, int width, int height);
1206 void tint_ximage (XImage *ximage);
1207 bool make_transparency_pixmap ();
1208# endif 1225# endif
1226
1227 bool blur_pixmap (Pixmap pixmap, int width, int height, bool argb, int h_blurRadius, int v_blurRadius);
1228 bool tint_pixmap (Pixmap pixmap, int width, int height, bool argb, rxvt_color &tint, bool tint_set, int shade);
1229 void tint_ximage (XImage *ximage, rxvt_color &tint, bool tint_set, int shade);
1209 1230
1210 ev_tstamp bg_valid_since; 1231 ev_tstamp bg_valid_since;
1211 1232
1212 Pixmap bg_pixmap; 1233 Pixmap bg_pixmap;
1213 unsigned int bg_pmap_width, bg_pmap_height; 1234 unsigned int bg_pmap_width, bg_pmap_height;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines