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.27 by root, Fri Jan 6 01:16:58 2006 UTC vs.
Revision 1.28 by root, Fri Jan 6 02:58:02 2006 UTC

544 export_const (RS_Uline); 544 export_const (RS_Uline);
545 545
546 sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR); 546 sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR);
547} 547}
548 548
549SV *
550new (...)
551 CODE:
552{
553 stringvec *argv = new stringvec;
554 bool success;
555
556 for (int i = 0; i < items ;i++)
557 argv->push_back (strdup (SvPVbyte_nolen (ST (i))));
558
559 rxvt_term *term = new rxvt_term;
560
561 term->argv = argv;
562
563 try
564 {
565 if (!term->init (argv->size (), argv->begin ()))
566 term = 0;
567 }
568 catch (const class rxvt_failure_exception &e)
569 {
570 term->destroy ();
571 croak ("exception caught while initializing new terminal instance");
572 }
573
574 RETVAL = term && term->self ? newSVterm (term) : &PL_sv_undef;
575}
576 OUTPUT:
577 RETVAL
578
549void 579void
550set_should_invoke (int htype, int value) 580set_should_invoke (int htype, int value)
551 CODE: 581 CODE:
552 rxvt_perl.should_invoke [htype] = value; 582 rxvt_perl.should_invoke [htype] = value;
553 583
615} 645}
616 OUTPUT: 646 OUTPUT:
617 RETVAL 647 RETVAL
618 648
619MODULE = urxvt PACKAGE = urxvt::term 649MODULE = urxvt PACKAGE = urxvt::term
650
651void
652rxvt_term::destroy ()
620 653
621int 654int
622rxvt_term::strwidth (SV *str) 655rxvt_term::strwidth (SV *str)
623 CODE: 656 CODE:
624{ 657{
977 STRLEN len; 1010 STRLEN len;
978 char *str = SvPVbyte (octets, len); 1011 char *str = SvPVbyte (octets, len);
979 C_ARGS: 1012 C_ARGS:
980 str, len 1013 str, len
981 1014
1015void
1016rxvt_term::cmd_parse (SV *octets)
1017 CODE:
1018{
1019 STRLEN len;
1020 char *str = SvPVbyte (octets, len);
1021
1022 char *old_cmdbuf_ptr = THIS->cmdbuf_ptr;
1023 char *old_cmdbuf_endp = THIS->cmdbuf_endp;
1024
1025 THIS->cmdbuf_ptr = str;
1026 THIS->cmdbuf_endp = str + len;
1027
1028 THIS->cmd_parse ();
1029
1030 THIS->cmdbuf_ptr = old_cmdbuf_ptr;
1031 THIS->cmdbuf_endp = old_cmdbuf_endp;
1032}
1033
982SV * 1034SV *
983rxvt_term::overlay (int x, int y, int w, int h, int rstyle = OVERLAY_RSTYLE, int border = 2) 1035rxvt_term::overlay (int x, int y, int w, int h, int rstyle = OVERLAY_RSTYLE, int border = 2)
984 CODE: 1036 CODE:
985{ 1037{
986 overlay *o = new overlay (THIS, x, y, w, h, rstyle, border); 1038 overlay *o = new overlay (THIS, x, y, w, h, rstyle, border);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines