--- rxvt-unicode/src/rxvtperl.xs 2012/06/04 15:43:22 1.161 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/04 21:33:47 1.165 @@ -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), @@ -1936,6 +1936,35 @@ ############################################################################# # fancy bg bloatstuff (TODO: should be moved up somewhere) +# TODO: ugly +void +rxvt_term::get_geometry () + PPCODE: + Window wdummy; + int x, y; + XWindowAttributes wattr; + XGetWindowAttributes (THIS->dpy, THIS->parent, &wattr); + XTranslateCoordinates (THIS->dpy, THIS->parent, wattr.root, + -wattr.border_width, -wattr.border_width, + &x, &y, &wdummy); + EXTEND (SP, 4); + PUSHs (sv_2mortal (newSViv (x))); + PUSHs (sv_2mortal (newSViv (y))); + PUSHs (sv_2mortal (newSViv (wattr.width))); + PUSHs (sv_2mortal (newSViv (wattr.height))); + +#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 @@ -1988,6 +2017,8 @@ #endif +#endif + ############################################################################# # urxvt::overlay ############################################################################# @@ -2029,6 +2060,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: @@ -2057,9 +2116,6 @@ 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 p33) INIT: double matrix[9] = { @@ -2069,5 +2125,11 @@ }; 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