--- rxvt-unicode/src/rxvtperl.xs 2012/06/03 15:54:15 1.157 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/04 15:15:49 1.159 @@ -802,6 +802,17 @@ const_iv (XIMVisibleToForward), const_iv (XIMVisibleToBackword), const_iv (XIMVisibleToCenter), +#if HAVE_XRENDER + const_iv (PictStandardARGB32), + const_iv (PictStandardRGB24), + const_iv (PictStandardA8), + const_iv (PictStandardA4), + const_iv (PictStandardA1), + const_iv (RepeatNone), + const_iv (RepeatNormal), + const_iv (RepeatPad), + const_iv (RepeatReflect), +#endif # if 0 const_iv (XIMForwardChar), const_iv (XIMBackwardChar), @@ -1847,7 +1858,7 @@ } Atom -XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) +XInternAtom (rxvt_term *term, octet_string atom_name, int only_if_exists = FALSE) C_ARGS: term->dpy, atom_name, only_if_exists char * @@ -1858,7 +1869,7 @@ void XDeleteProperty (rxvt_term *term, Window window, Atom property) - C_ARGS: term->dpy, window, property + C_ARGS: term->dpy, window, property Window rxvt_term::DefaultRootWindow () @@ -1920,6 +1931,42 @@ } ############################################################################# +# fancy bg bloatstuff (TODO: should be moved up somewhere) + +#ifdef ENABLE_TRANSPARENCY + +#if 0 + +rxvt_img * +rxvt_term::new_img_from_root () + CODE: + RETVAL = rxvt_img::new_from_root (THIS); + OUTPUT: + RETVAL + +#endif + +#endif + +#if HAVE_PIXBUF + +rxvt_img * +rxvt_term::new_img_from_file (octet_string filename) + CODE: + try + { + RETVAL = rxvt_img::new_from_file (THIS, filename); + } + catch (const class rxvt_failure_exception &e) + { + croak ("new_img_from_file failed"); + } + OUTPUT: + RETVAL + +#endif + +############################################################################# # urxvt::overlay ############################################################################# @@ -1957,40 +2004,52 @@ #if HAVE_IMG -# rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); -# rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); +# 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); -void fill (urxvt::img self, SV *c) - CODE: +void +rxvt_img::fill (SV *c) + INIT: rxvt_color rc; - parse_color (self->s, rc, c); - self->fill (rc); + parse_color (THIS->s, rc, c); + C_ARGS: rc -void blur (urxvt::img self, int rh, int rv) +void +rxvt_img::DESTROY () CODE: - self->blur (rh, rv); + delete THIS; -void brightness (urxvt::img self, double r, double g, double b, double a = 1.) - CODE: - self->brightness (r, g, b, a); +void +rxvt_img::blur (int rh, int rv) -void contrast (urxvt::img self, double r, double g, double b, double a = 1.) - CODE: - self->contrast (r, g, b, a); +void +rxvt_img::brightness (NV r, NV g, NV b, NV a = 1.) -urxvt::img copy (urxvt::img self) - CODE: - RETVAL = self->copy (); - OUTPUT: - RETVAL +void +rxvt_img::contrast (NV r, NV g, NV b, NV a = 1.) -urxvt::img scale (urxvt::img self, int new_width, int new_height) - CODE: - RETVAL = self->scale (new_width, new_height); - OUTPUT: - RETVAL +void +rxvt_img::unshare () + +rxvt_img * +rxvt_img::clone () -# rxvt_img *transform (urxvt::img self, int new_width, int new_height, double matrix[16]); +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) + INIT: + double matrix[9] = { + p11, p12, p13, + p21, p22, p23, + p31, p32, p33 + }; + C_ARGS: new_width, new_height, repeat, matrix + #endif