… | |
… | |
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 | |
|
|
549 | SV * |
|
|
550 | new (...) |
|
|
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 | |
549 | void |
579 | void |
550 | set_should_invoke (int htype, int value) |
580 | set_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 | |
619 | MODULE = urxvt PACKAGE = urxvt::term |
649 | MODULE = urxvt PACKAGE = urxvt::term |
|
|
650 | |
|
|
651 | void |
|
|
652 | rxvt_term::destroy () |
620 | |
653 | |
621 | int |
654 | int |
622 | rxvt_term::strwidth (SV *str) |
655 | rxvt_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 | |
|
|
1015 | void |
|
|
1016 | rxvt_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 | |
982 | SV * |
1034 | SV * |
983 | rxvt_term::overlay (int x, int y, int w, int h, int rstyle = OVERLAY_RSTYLE, int border = 2) |
1035 | rxvt_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); |