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.190 by sf-exg, Sun Jun 10 13:07:56 2012 UTC vs.
Revision 1.192 by root, Tue Jun 12 10:45:53 2012 UTC

343 PERL_SYS_TERM (); 343 PERL_SYS_TERM ();
344 } 344 }
345} 345}
346 346
347void 347void
348rxvt_perl_interp::init (rxvt_term *term) 348rxvt_perl_interp::init ()
349{ 349{
350 if (!perl) 350 if (!perl)
351 { 351 {
352 rxvt_push_locale (""); // perl init destroys current locale 352 rxvt_push_locale (""); // perl init destroys current locale
353 353
383 } 383 }
384 } 384 }
385 385
386 rxvt_pop_locale (); 386 rxvt_pop_locale ();
387 } 387 }
388}
389
390void
391rxvt_perl_interp::init (rxvt_term *term)
392{
393 init ();
388 394
389 if (perl && !term->perl.self) 395 if (perl && !term->perl.self)
390 { 396 {
391 // runs outside of perls ENV 397 // runs outside of perls ENV
392 term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term"); 398 term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term");
393 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0); 399 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0);
394 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, newRV_noinc ((SV *)newAV ()), 0); 400 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, newRV_noinc ((SV *)newAV ()), 0);
395 } 401 }
402}
403
404void
405rxvt_perl_interp::eval (const char *str)
406{
407 eval_pv (str, 1);
396} 408}
397 409
398void 410void
399rxvt_perl_interp::usage (rxvt_term *term, int type) 411rxvt_perl_interp::usage (rxvt_term *term, int type)
400{ 412{
2032} 2044}
2033 2045
2034############################################################################# 2046#############################################################################
2035# fancy bg bloatstuff (TODO: should be moved up somewhere) 2047# fancy bg bloatstuff (TODO: should be moved up somewhere)
2036 2048
2037# TODO: ugly 2049bool
2050rxvt_term::has_render ()
2051 CODE:
2052 RETVAL = THIS->display->flags & DISPLAY_HAS_RENDER;
2053 OUTPUT:
2054 RETVAL
2055
2038void 2056void
2039rxvt_term::background_geometry (bool border = false) 2057rxvt_term::background_geometry (bool border = false)
2040 PPCODE: 2058 PPCODE:
2041 EXTEND (SP, 4); 2059 EXTEND (SP, 4);
2042 PUSHs (sv_2mortal (newSViv (THIS->parent_x + (border ? THIS->window_vt_x : 0)))); 2060 PUSHs (sv_2mortal (newSViv (THIS->parent_x + (border ? THIS->window_vt_x : 0))));
2090 2108
2091void 2109void
2092rxvt_term::set_background (rxvt_img *img, bool border = false) 2110rxvt_term::set_background (rxvt_img *img, bool border = false)
2093 CODE: 2111 CODE:
2094 THIS->bg_destroy (); 2112 THIS->bg_destroy ();
2095 THIS->bg_img = 0;
2096 THIS->bg_flags &= ~(rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER | rxvt_term::BG_IS_TRANSPARENT); 2113 THIS->bg_flags &= ~(rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER | rxvt_term::BG_IS_TRANSPARENT);
2097 2114
2098 if (img) // TODO: cannot be false 2115 if (img) // TODO: cannot be false
2099 { 2116 {
2100 img = img->clone (); // own the img 2117 img = img->clone (); // own the img
2115 THIS->bg_img = img; 2132 THIS->bg_img = img;
2116 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; 2133 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER;
2117 2134
2118 if (!border) 2135 if (!border)
2119 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT; 2136 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT;
2120
2121 delete img;
2122 } 2137 }
2123 2138
2124#endif 2139#endif
2125 2140
2126#endif 2141#endif
2230 2245
2231rxvt_img * 2246rxvt_img *
2232rxvt_img::blur (int rh, int rv) 2247rxvt_img::blur (int rh, int rv)
2233 2248
2234rxvt_img * 2249rxvt_img *
2235rxvt_img::transform (int new_width, int new_height, NV p11, NV p12, NV p13, NV p21, NV p22, NV p23, NV p31, NV p32, NV p33) 2250rxvt_img::transform (NV p11, NV p12, NV p13, NV p21, NV p22, NV p23, NV p31, NV p32, NV p33, int new_width = 0, int new_height = 0)
2236 INIT: 2251 INIT:
2237 double matrix[9] = { 2252 double matrix[9] = {
2238 p11, p12, p13, 2253 p11, p12, p13,
2239 p21, p22, p23, 2254 p21, p22, p23,
2240 p31, p32, p33 2255 p31, p32, p33
2241 }; 2256 };
2242 C_ARGS: new_width, new_height, matrix 2257 C_ARGS: matrix, new_width, new_height
2243 2258
2244rxvt_img * 2259rxvt_img *
2245rxvt_img::scale (int new_width, int new_height) 2260rxvt_img::scale (int new_width, int new_height)
2246 2261
2247rxvt_img * 2262rxvt_img *
2248rxvt_img::rotate (int new_width, int new_height, int x, int y, NV phi) 2263rxvt_img::rotate (int x, int y, NV phi, int new_width = 0, int new_height = 0)
2249 2264
2250#endif 2265#endif
2251 2266

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines