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.489 by root, Mon May 28 16:40:03 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:
238 0 - left align, 50 - center, 100 - right */ 268 0 - left align, 50 - center, 100 - right */
269
270 bool is_size_sensitive ()
271 {
272 return (!(flags & IM_TILE)
273 || h_scale || v_scale
274 || (!(flags & IM_ROOT_ALIGN) && (h_align || v_align)));
275 }
239 276
240# ifdef HAVE_PIXBUF 277# ifdef HAVE_PIXBUF
241 GdkPixbuf *pixbuf; 278 GdkPixbuf *pixbuf;
242 279
243 void destroy () 280 void destroy ()
1157 BG_IS_TRANSPARENT = 1 << 1, 1194 BG_IS_TRANSPARENT = 1 << 1,
1158 BG_NEEDS_REFRESH = 1 << 2, 1195 BG_NEEDS_REFRESH = 1 << 2,
1159 1196
1160 BG_HAS_RENDER = 1 << 3, 1197 BG_HAS_RENDER = 1 << 3,
1161 BG_HAS_RENDER_CONV = 1 << 4, 1198 BG_HAS_RENDER_CONV = 1 << 4,
1162 BG_CLIENT_RENDER = 1 << 5,
1163
1164 BG_TINT_SET = 1 << 6,
1165 BG_TINT_BITAND = 1 << 7,
1166 }; 1199 };
1167 1200
1168 uint8_t bg_flags; 1201 uint8_t bg_flags;
1169 1202
1170# ifdef BG_IMAGE_FROM_FILE 1203# ifdef BG_IMAGE_FROM_FILE
1179 void parse_image (int id, const char *type, const char *arg); 1212 void parse_image (int id, const char *type, const char *arg);
1180# endif 1213# endif
1181 1214
1182# ifdef ENABLE_TRANSPARENCY 1215# ifdef ENABLE_TRANSPARENCY
1183 Pixmap root_pixmap; /* current root pixmap set */ 1216 Pixmap root_pixmap; /* current root pixmap set */
1184 rxvt_color tint; 1217 image_effects root_effects;
1185 int shade;
1186 int h_blurRadius, v_blurRadius;
1187 1218
1188 void bg_set_transparent () 1219 void bg_set_transparent ()
1189 { 1220 {
1190 bg_flags |= BG_IS_TRANSPARENT; 1221 bg_flags |= BG_IS_TRANSPARENT;
1191 } 1222 }
1192 void bg_set_root_pixmap (); 1223 void bg_set_root_pixmap ();
1193 bool bg_set_tint (rxvt_color &new_tint); 1224 bool render_root_image ();
1194 bool bg_set_shade (const char *shade_str);
1195 bool bg_set_blur (const char *geom);
1196
1197 bool blur_pixmap (Pixmap pixmap, int width, int height);
1198 bool tint_pixmap (Pixmap pixmap, int width, int height);
1199 void tint_ximage (XImage *ximage);
1200 bool make_transparency_pixmap ();
1201# 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);
1202 1230
1203 ev_tstamp bg_valid_since; 1231 ev_tstamp bg_valid_since;
1204 1232
1205 Pixmap bg_pixmap; 1233 Pixmap bg_pixmap;
1206 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