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.173 by root, Wed Jun 6 11:46:11 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);
410
411 FREETMPS;
412 LEAVE;
413}
414
415uint8_t
416rxvt_perl_interp::parse_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::parse_resource", G_SCALAR);
433 SPAGAIN;
434
435 uint8_t ret = POPi;
436
437 FREETMPS;
438 LEAVE;
439
440 return ret;
441}
442
396static void 443static void
397ungrab (rxvt_term *THIS) 444ungrab (rxvt_term *THIS)
398{ 445{
399 if (THIS->perl.grabtime) 446 if (THIS->perl.grabtime)
400 { 447 {
431 } 478 }
432 } 479 }
433 480
434 bool event_consumed; 481 bool event_consumed;
435 482
436 if (htype == HOOK_INIT || htype == HOOK_DESTROY // must be called always
437 || term->perl.should_invoke [htype]) 483 if (term->perl.should_invoke [htype])
438 { 484 {
439 dSP; 485 dSP;
440 va_list ap; 486 va_list ap;
441 487
442 va_start (ap, htype); 488 va_start (ap, htype);
652 ENTER; 698 ENTER;
653 SAVETMPS; 699 SAVETMPS;
654 700
655 dSP; 701 dSP;
656 XPUSHs (sv_2mortal (newSVpvn (data, len))); 702 XPUSHs (sv_2mortal (newSVpvn (data, len)));
703 PUTBACK;
657 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL); 704 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL);
658 705
659 if (SvTRUE (ERRSV)) 706 if (SvTRUE (ERRSV))
660 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV)); 707 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV));
661 708
835 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--) 882 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
836 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 883 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
837} 884}
838 885
839void 886void
887log (const char *msg)
888 CODE:
889 rxvt_log ("%s", msg);
890
891void
840warn (const char *msg) 892warn (const char *msg)
841 CODE: 893 CODE:
842 rxvt_warn ("%s", msg); 894 rxvt_warn ("%s", msg);
843 895
844void 896void
1009 case HOOK_POSITION_CHANGE: 1061 case HOOK_POSITION_CHANGE:
1010 if (count) 1062 if (count)
1011 THIS->get_window_origin (THIS->parent_x, THIS->parent_y); 1063 THIS->get_window_origin (THIS->parent_x, THIS->parent_y);
1012 } 1064 }
1013 } 1065 }
1066
1067void
1068rxvt_term::put_option_db (octet_string specifier, octet_string value)
1069 CODE:
1070 XrmPutStringResource (&THIS->option_db, specifier, value);
1014 1071
1015int 1072int
1016rxvt_term::grab_button (int button, U32 modifiers, Window window = THIS->vt) 1073rxvt_term::grab_button (int button, U32 modifiers, Window window = THIS->vt)
1017 CODE: 1074 CODE:
1018 RETVAL = XGrabButton (THIS->dpy, button, modifiers, window, 1, 1075 RETVAL = XGrabButton (THIS->dpy, button, modifiers, window, 1,
1995 OUTPUT: 2052 OUTPUT:
1996 RETVAL 2053 RETVAL
1997 2054
1998#if ENABLE_TRANSPARENCY 2055#if ENABLE_TRANSPARENCY
1999 2056
2000#if 0
2001
2002rxvt_img * 2057rxvt_img *
2003rxvt_term::new_img_from_root () 2058rxvt_term::new_img_from_root ()
2004 CODE: 2059 CODE:
2005 RETVAL = rxvt_img::new_from_root (THIS); 2060 RETVAL = rxvt_img::new_from_root (THIS);
2006 OUTPUT: 2061 OUTPUT:
2007 RETVAL 2062 RETVAL
2008
2009#endif
2010 2063
2011#endif 2064#endif
2012 2065
2013#if HAVE_PIXBUF 2066#if HAVE_PIXBUF
2014 2067
2038 THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH; 2091 THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH;
2039 2092
2040 if (img) // TODO: cannot be false 2093 if (img) // TODO: cannot be false
2041 { 2094 {
2042 img->unshare (); 2095 img->unshare ();
2096 //TODO: convetr to visual, possibly precompose with colour
2043 THIS->bg_pixmap = img->steal (); 2097 THIS->bg_pixmap = img->steal ();
2044 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH; 2098 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH;
2045 THIS->bg_valid_since = ev::now (); // TODO: extra bloat 2099 THIS->bg_valid_since = ev::now (); // TODO: extra bloat
2046 } 2100 }
2047 2101

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines