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.169 by sf-exg, Tue Jun 5 15:18:24 2012 UTC vs.
Revision 1.172 by root, Tue Jun 5 22:46:50 2012 UTC

391 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0); 391 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0);
392 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, newRV_noinc ((SV *)newAV ()), 0); 392 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, newRV_noinc ((SV *)newAV ()), 0);
393 } 393 }
394} 394}
395 395
396void
397rxvt_perl_interp::usage (rxvt_term *term, int type)
398{
399 localise_env set_environ (perl_environ);
400
401 ENTER;
402 SAVETMPS;
403
404 dSP;
405 EXTEND (SP, 2);
406 PUSHs (sv_2mortal (newSVterm (term)));
407 PUSHs (sv_2mortal (newSViv (type)));
408 PUTBACK;
409 call_pv ("urxvt::usage", G_VOID | G_DISCARD | G_EVAL);
410
411 FREETMPS;
412 LEAVE;
413}
414
415uint8_t
416rxvt_perl_interp::resource (rxvt_term *term, const char *name, bool arg, bool longopt, bool flag, const char *value)
417{
418 localise_env set_environ (perl_environ);
419
420 ENTER;
421 SAVETMPS;
422
423 dSP;
424 EXTEND (SP, 6);
425 PUSHs (sv_2mortal (newSVterm (term)));
426 PUSHs (sv_2mortal (newSVpv (name, 0)));
427 PUSHs (arg ? &PL_sv_yes : &PL_sv_no);
428 PUSHs (longopt ? &PL_sv_yes : &PL_sv_no);
429 PUSHs (flag ? &PL_sv_yes : &PL_sv_no);
430 PUSHs (value ? sv_2mortal (newSVpv (value, 0)) : &PL_sv_undef);
431 PUTBACK;
432 call_pv ("urxvt::resource", G_SCALAR | G_EVAL);
433
434 uint8_t ret = POPi;
435
436 FREETMPS;
437 LEAVE;
438
439 return ret;
440}
441
396static void 442static void
397ungrab (rxvt_term *THIS) 443ungrab (rxvt_term *THIS)
398{ 444{
399 if (THIS->perl.grabtime) 445 if (THIS->perl.grabtime)
400 { 446 {
431 } 477 }
432 } 478 }
433 479
434 bool event_consumed; 480 bool event_consumed;
435 481
436 if (htype == HOOK_INIT || htype == HOOK_DESTROY // must be called always
437 || term->perl.should_invoke [htype]) 482 if (term->perl.should_invoke [htype])
438 { 483 {
439 dSP; 484 dSP;
440 va_list ap; 485 va_list ap;
441 486
442 va_start (ap, htype); 487 va_start (ap, htype);
652 ENTER; 697 ENTER;
653 SAVETMPS; 698 SAVETMPS;
654 699
655 dSP; 700 dSP;
656 XPUSHs (sv_2mortal (newSVpvn (data, len))); 701 XPUSHs (sv_2mortal (newSVpvn (data, len)));
702 PUTBACK;
657 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL); 703 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL);
658 704
659 if (SvTRUE (ERRSV)) 705 if (SvTRUE (ERRSV))
660 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV)); 706 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV));
661 707
835 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--) 881 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
836 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 882 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
837} 883}
838 884
839void 885void
886log (const char *msg)
887 CODE:
888 rxvt_log ("%s", msg);
889
890void
840warn (const char *msg) 891warn (const char *msg)
841 CODE: 892 CODE:
842 rxvt_warn ("%s", msg); 893 rxvt_warn ("%s", msg);
843 894
844void 895void
1995 OUTPUT: 2046 OUTPUT:
1996 RETVAL 2047 RETVAL
1997 2048
1998#if ENABLE_TRANSPARENCY 2049#if ENABLE_TRANSPARENCY
1999 2050
2000#if 0
2001
2002rxvt_img * 2051rxvt_img *
2003rxvt_term::new_img_from_root () 2052rxvt_term::new_img_from_root ()
2004 CODE: 2053 CODE:
2005 RETVAL = rxvt_img::new_from_root (THIS); 2054 RETVAL = rxvt_img::new_from_root (THIS);
2006 OUTPUT: 2055 OUTPUT:
2007 RETVAL 2056 RETVAL
2008
2009#endif
2010 2057
2011#endif 2058#endif
2012 2059
2013#if HAVE_PIXBUF 2060#if HAVE_PIXBUF
2014 2061
2038 THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH; 2085 THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH;
2039 2086
2040 if (img) // TODO: cannot be false 2087 if (img) // TODO: cannot be false
2041 { 2088 {
2042 img->unshare (); 2089 img->unshare ();
2090 //TODO: convetr to visual, possibly precompose with colour
2043 THIS->bg_pixmap = img->steal (); 2091 THIS->bg_pixmap = img->steal ();
2044 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH; 2092 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH;
2045 THIS->bg_valid_since = ev::now (); // TODO: extra bloat 2093 THIS->bg_valid_since = ev::now (); // TODO: extra bloat
2046 } 2094 }
2047 2095

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines