--- rxvt-unicode/src/rxvt.h 2012/06/05 11:00:40 1.499 +++ rxvt-unicode/src/rxvt.h 2012/11/30 07:02:12 1.510 @@ -47,6 +47,7 @@ #if defined (ISO_14755) || defined (ENABLE_PERL) # define ENABLE_OVERLAY 1 +# undef NO_RESOURCES #endif #if ENABLE_PERL @@ -244,7 +245,6 @@ # if BG_IMAGE_FROM_FILE enum { - IM_IS_SET = 1 << 0, IM_IS_SIZE_SENSITIVE = 1 << 1, IM_KEEP_ASPECT = 1 << 2, IM_ROOT_ALIGN = 1 << 3, @@ -275,28 +275,17 @@ || (!(flags & IM_ROOT_ALIGN) && (h_align || v_align))); } -# if HAVE_PIXBUF - GdkPixbuf *pixbuf; + rxvt_img *img; void destroy () { - if (pixbuf) - g_object_unref (pixbuf); + delete img; + img = 0; } - int width () - { - return gdk_pixbuf_get_width (pixbuf); - } - int height () - { - return gdk_pixbuf_get_height (pixbuf); - } -# endif - rxvt_image (); - bool set_file_geometry (const char *file); - bool set_file (const char *file); + void set_file_geometry (rxvt_screen *s, const char *file); + void set_file (rxvt_screen *s, const char *file); bool set_geometry (const char *geom, bool update = false); }; # endif @@ -1194,24 +1183,19 @@ BG_IS_TRANSPARENT = 1 << 1, BG_NEEDS_REFRESH = 1 << 2, + BG_INHIBIT_RENDER = 1 << 3, }; uint8_t bg_flags; # if BG_IMAGE_FROM_FILE - vector image_vec; - rxvt_image *new_image () - { - image_vec.resize (image_vec.size () + 1); - return &image_vec.back (); - } + rxvt_image fimage; void get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y); bool render_image (rxvt_image &image); - void parse_image (int id, const char *type, const char *arg); # endif # if ENABLE_TRANSPARENCY - Pixmap root_pixmap; /* current root pixmap set */ + rxvt_img *root_img; image_effects root_effects; void bg_set_transparent () @@ -1222,32 +1206,21 @@ bool render_root_image (); # endif - bool blur_pixmap (Pixmap pixmap, int width, int height, bool argb, int h_blurRadius, int v_blurRadius); - bool tint_pixmap (Pixmap pixmap, int width, int height, bool argb, rxvt_color &tint, bool tint_set, int shade); - void tint_ximage (XImage *ximage, rxvt_color &tint, bool tint_set, int shade); + void tint_image (rxvt_img *img, rxvt_color &tint, bool tint_set, int shade); ev_tstamp bg_valid_since; - Pixmap bg_pixmap; - unsigned int bg_pmap_width, bg_pmap_height; + rxvt_img *bg_img; - int target_x; - int target_y; - bool bg_set_position (int x, int y); bool bg_window_size_sensitive (); bool bg_window_position_sensitive (); - bool bg_render (); + void bg_render (); void bg_invalidate () { bg_flags &= ~BG_IS_VALID; } #endif -#if HAVE_PIXBUF - bool pixbuf_to_pixmap (GdkPixbuf *pixbuf, Pixmap pixmap, GC gc, - int src_x, int src_y, int dst_x, int dst_y, - unsigned int width, unsigned int height, bool argb); -#endif #if ENABLE_OVERLAY overlay_base ov; @@ -1298,7 +1271,7 @@ unicode_t iso14755buf; void commit_iso14755 (); # if ISO_14755 - void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); + void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1, int y2 = -1); void iso14755_54 (int x, int y); # endif #endif @@ -1472,6 +1445,13 @@ // screen.C + bool option (uint8_t opt) const NOTHROW + { + return options[opt >> 3] & (1 << (opt & 7)); + } + + void set_option (uint8_t opt, bool set = true) NOTHROW; + int fgcolor_of (rend_t r) const NOTHROW { int base = GET_BASEFG (r); @@ -1500,13 +1480,6 @@ return base; } - bool option (uint8_t opt) const NOTHROW - { - return options[opt >> 3] & (1 << (opt & 7)); - } - - void set_option (uint8_t opt, bool set = true) NOTHROW; - // modifies first argument(!) void tt_paste (char *data, unsigned int len) NOTHROW; void paste (char *data, unsigned int len) NOTHROW; @@ -1587,20 +1560,12 @@ void selection_rotate (int x, int y) NOTHROW; // xdefaults.C + void rxvt_usage (int type); const char **get_options (int argc, const char *const *argv); int parse_keysym (const char *str, const char *arg); const char *x_resource (const char *name); void extract_resources (); void extract_keysym_resources (); - void find_resources (const char *n_prefix, const char *c_prefix, int mode, - Bool (*proc)(XrmDatabase *, XrmBindingList, XrmQuarkList, XrmRepresentation *, XrmValue *, XPointer)); - bool parse_bool_resource (const char *str) - { - return (!strcasecmp (str, "TRUE") - || !strcasecmp (str, "YES") - || !strcasecmp (str, "ON") - || !strcasecmp (str, "1")); - } }; #endif /* _RXVT_H_ */