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.168 by sf-exg, Tue Jun 5 15:12:43 2012 UTC vs.
Revision 1.171 by root, Tue Jun 5 22:23:07 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
2128void 2179void
2129rxvt_img::DESTROY () 2180rxvt_img::DESTROY ()
2130 CODE: 2181 CODE:
2131 delete THIS; 2182 delete THIS;
2132 2183
2133void 2184rxvt_img *
2134rxvt_img::blur (int rh, int rv) 2185rxvt_img::blur (int rh, int rv)
2135 2186
2136void 2187void
2137rxvt_img::brightness (NV r, NV g, NV b, NV a = 1.) 2188rxvt_img::brightness (NV r, NV g, NV b, NV a = 1.)
2138 2189

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines