--- rxvt-unicode/src/rxvtperl.xs 2012/06/04 15:15:49 1.159 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/04 18:17:25 1.164 @@ -802,7 +802,7 @@ const_iv (XIMVisibleToForward), const_iv (XIMVisibleToBackword), const_iv (XIMVisibleToCenter), -#if HAVE_XRENDER +#if XRENDER const_iv (PictStandardARGB32), const_iv (PictStandardRGB24), const_iv (PictStandardA8), @@ -1736,6 +1736,9 @@ rxvt_term::scr_bell () void +rxvt_term::scr_recolour (bool refresh = true); + +void rxvt_term::scr_change_screen (int screen) void @@ -1933,7 +1936,19 @@ ############################################################################# # fancy bg bloatstuff (TODO: should be moved up somewhere) -#ifdef ENABLE_TRANSPARENCY +#if HAVE_IMG + +rxvt_img * +rxvt_term::new_img (SV *format, int width, int height) + CODE: + XRenderPictFormat *f = SvOK (format) + ? XRenderFindVisualFormat (THIS->dpy, THIS->visual) + : XRenderFindStandardFormat (THIS->dpy, SvIV (format)); + RETVAL = new rxvt_img (THIS, f, width, height); + OUTPUT: + RETVAL + +#if ENABLE_TRANSPARENCY #if 0 @@ -1966,6 +1981,27 @@ #endif +#if HAVE_BG_PIXMAP + +void +rxvt_term::set_background (rxvt_img *img) + CODE: + THIS->bg_destroy (); + THIS->bg_pixmap = None; + THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH; + + if (img) // TODO: cannot be false + { + img->unshare (); + THIS->bg_pixmap = img->steal (); + THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH; + THIS->bg_valid_since = ev::now (); // TODO: extra bloat + } + +#endif + +#endif + ############################################################################# # urxvt::overlay ############################################################################# @@ -2007,6 +2043,34 @@ # rxvt_img *new (rxvt_screen *screen, XRenderPictFormat *format, int width, int height) # rxvt_img *rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); +int +rxvt_img::w () + CODE: + RETVAL = THIS->w; + OUTPUT: + RETVAL + +int +rxvt_img::h () + CODE: + RETVAL = THIS->h; + OUTPUT: + RETVAL + +bool +rxvt_img::shared () + CODE: + RETVAL = THIS->shared; + OUTPUT: + RETVAL + +Pixmap +rxvt_img::pm () + CODE: + RETVAL = THIS->pm; + OUTPUT: + RETVAL + void rxvt_img::fill (SV *c) INIT: @@ -2035,13 +2099,7 @@ rxvt_img::clone () rxvt_img * -rxvt_img::scale (int new_width, int new_height) - -rxvt_img * -rxvt_img::transform (int new_width, int new_height, int repeat, - NV p11, NV p12, NV p13, - NV p21, NV p22, NV p23, - NV p31, NV p32, NV p23) +rxvt_img::transform (int new_width, int new_height, int repeat, NV p11, NV p12, NV p13, NV p21, NV p22, NV p23, NV p31, NV p32, NV p33) INIT: double matrix[9] = { p11, p12, p13, @@ -2049,7 +2107,12 @@ p31, p32, p33 }; C_ARGS: new_width, new_height, repeat, matrix - + +rxvt_img * +rxvt_img::scale (int new_width, int new_height) + +rxvt_img * +rxvt_img::rotate (int new_width, int new_height, int repeat, int x, int y, NV phi) #endif