ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.188 by sf-exg, Sat Jun 9 17:28:03 2012 UTC vs.
Revision 1.191 by root, Sun Jun 10 15:01:14 2012 UTC

64///////////////////////////////////////////////////////////////////////////// 64/////////////////////////////////////////////////////////////////////////////
65 65
66static void 66static void
67parse_color (rxvt_screen *s, rxvt_color &c, SV *sv) 67parse_color (rxvt_screen *s, rxvt_color &c, SV *sv)
68{ 68{
69 //TODO: support component stuff 69 //TODO: support component stuff, 0..1
70 c.set (s, SvPVbyte_nolen (sv)); 70 c.set (s, SvPVbyte_nolen (sv));
71} 71}
72 72
73///////////////////////////////////////////////////////////////////////////// 73/////////////////////////////////////////////////////////////////////////////
74 74
2032} 2032}
2033 2033
2034############################################################################# 2034#############################################################################
2035# fancy bg bloatstuff (TODO: should be moved up somewhere) 2035# fancy bg bloatstuff (TODO: should be moved up somewhere)
2036 2036
2037bool
2038rxvt_term::has_render ()
2039 CODE:
2040 RETVAL = THIS->display->flags & DISPLAY_HAS_RENDER;
2041 OUTPUT:
2042 RETVAL
2043
2037# TODO: ugly 2044# TODO: ugly
2038void 2045void
2039rxvt_term::background_geometry (bool border = false) 2046rxvt_term::background_geometry (bool border = false)
2040 PPCODE: 2047 PPCODE:
2041 EXTEND (SP, 4); 2048 EXTEND (SP, 4);
2044 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_width : THIS->szHint.width ))); 2051 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_width : THIS->szHint.width )));
2045 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height))); 2052 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height)));
2046 2053
2047#if HAVE_IMG 2054#if HAVE_IMG
2048 2055
2049#if 0
2050
2051rxvt_img * 2056rxvt_img *
2052rxvt_term::new_img (SV *format, int width, int height) 2057rxvt_term::new_img (SV *format, int width = 1, int height = 1)
2053 CODE: 2058 CODE:
2054 XRenderPictFormat *f = SvOK (format) 2059 XRenderPictFormat *f = SvOK (format)
2055 ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) 2060 ? XRenderFindStandardFormat (THIS->dpy, SvIV (format))
2056 : XRenderFindVisualFormat (THIS->dpy, THIS->visual); 2061 : XRenderFindVisualFormat (THIS->dpy, THIS->visual);
2057 RETVAL = new rxvt_img (THIS, f, width, height); 2062 RETVAL = new rxvt_img (THIS, f, 0, 0, width, height);
2063 RETVAL->alloc ();
2058 OUTPUT: 2064 OUTPUT:
2059 RETVAL 2065 RETVAL
2060
2061#endif
2062 2066
2063#if ENABLE_TRANSPARENCY 2067#if ENABLE_TRANSPARENCY
2064 2068
2065rxvt_img * 2069rxvt_img *
2066rxvt_term::new_img_from_root () 2070rxvt_term::new_img_from_root ()
2093 2097
2094void 2098void
2095rxvt_term::set_background (rxvt_img *img, bool border = false) 2099rxvt_term::set_background (rxvt_img *img, bool border = false)
2096 CODE: 2100 CODE:
2097 THIS->bg_destroy (); 2101 THIS->bg_destroy ();
2098 THIS->bg_pixmap = None;
2099 THIS->bg_flags &= ~(rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER | rxvt_term::BG_IS_TRANSPARENT); 2102 THIS->bg_flags &= ~(rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER | rxvt_term::BG_IS_TRANSPARENT);
2100 2103
2101 if (img) // TODO: cannot be false 2104 if (img) // TODO: cannot be false
2102 { 2105 {
2103 img = img->clone (); // own the img 2106 img = img->clone (); // own the img
2113 ->replace (img); 2116 ->replace (img);
2114 2117
2115 img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]) 2118 img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg])
2116 ->replace (img); 2119 ->replace (img);
2117 2120
2118 THIS->bg_pixmap = img->steal (); 2121 THIS->bg_img = img;
2119 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; 2122 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER;
2120 2123
2121 if (!border) 2124 if (!border)
2122 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT; 2125 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT;
2123
2124 delete img;
2125 } 2126 }
2126 2127
2127#endif 2128#endif
2128 2129
2129#endif 2130#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines