… | |
… | |
29 | #include "../config.h" |
29 | #include "../config.h" |
30 | |
30 | |
31 | #include <cstddef> |
31 | #include <cstddef> |
32 | #include <cstdarg> |
32 | #include <cstdarg> |
33 | |
33 | |
|
|
34 | #include "iom.h" |
34 | #include "rxvt.h" |
35 | #include "rxvt.h" |
35 | #include "iom.h" |
36 | #include "keyboard.h" |
36 | #include "rxvtutil.h" |
37 | #include "rxvtutil.h" |
37 | #include "rxvtperl.h" |
38 | #include "rxvtperl.h" |
38 | |
39 | |
39 | #include "perlxsi.c" |
40 | #include "perlxsi.c" |
40 | |
41 | |
… | |
… | |
392 | |
393 | |
393 | struct rxvt_perl_interp rxvt_perl; |
394 | struct rxvt_perl_interp rxvt_perl; |
394 | |
395 | |
395 | static PerlInterpreter *perl; |
396 | static PerlInterpreter *perl; |
396 | |
397 | |
397 | rxvt_perl_interp::rxvt_perl_interp () |
|
|
398 | { |
|
|
399 | } |
|
|
400 | |
|
|
401 | rxvt_perl_interp::~rxvt_perl_interp () |
398 | rxvt_perl_interp::~rxvt_perl_interp () |
402 | { |
399 | { |
403 | if (perl) |
400 | if (perl) |
404 | { |
401 | { |
405 | perl_destruct (perl); |
402 | perl_destruct (perl); |
… | |
… | |
410 | void |
407 | void |
411 | rxvt_perl_interp::init () |
408 | rxvt_perl_interp::init () |
412 | { |
409 | { |
413 | if (!perl) |
410 | if (!perl) |
414 | { |
411 | { |
|
|
412 | perl_environ = rxvt_environ; |
|
|
413 | swap (perl_environ, environ); |
|
|
414 | |
415 | char *argv[] = { |
415 | char *argv[] = { |
416 | "", |
416 | "", |
417 | "-T", |
417 | "-T", |
418 | "-edo '" LIBDIR "/urxvt.pm' or ($@ and die $@) or exit 1", |
418 | "-edo '" LIBDIR "/urxvt.pm' or ($@ and die $@) or exit 1", |
419 | }; |
419 | }; |
… | |
… | |
428 | |
428 | |
429 | perl_destruct (perl); |
429 | perl_destruct (perl); |
430 | perl_free (perl); |
430 | perl_free (perl); |
431 | perl = 0; |
431 | perl = 0; |
432 | } |
432 | } |
|
|
433 | |
|
|
434 | swap (perl_environ, environ); |
433 | } |
435 | } |
434 | } |
436 | } |
435 | |
437 | |
436 | static void |
438 | static void |
437 | ungrab (rxvt_term *THIS) |
439 | ungrab (rxvt_term *THIS) |
… | |
… | |
459 | return false; // perl not initialized for this instance |
461 | return false; // perl not initialized for this instance |
460 | else if (htype == HOOK_DESTROY) |
462 | else if (htype == HOOK_DESTROY) |
461 | { |
463 | { |
462 | // handled later |
464 | // handled later |
463 | } |
465 | } |
464 | else if (htype == HOOK_REFRESH_BEGIN || htype == HOOK_REFRESH_END) |
466 | else |
465 | { |
467 | { |
466 | HV *hv = (HV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); |
468 | if (htype == HOOK_REFRESH_BEGIN || htype == HOOK_REFRESH_END) |
467 | |
|
|
468 | if (HvKEYS (hv)) |
|
|
469 | { |
469 | { |
|
|
470 | HV *hv = (HV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); |
|
|
471 | |
|
|
472 | if (HvKEYS (hv)) |
|
|
473 | { |
470 | hv_iterinit (hv); |
474 | hv_iterinit (hv); |
471 | |
475 | |
472 | while (HE *he = hv_iternext (hv)) |
476 | while (HE *he = hv_iternext (hv)) |
473 | ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); |
477 | ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); |
|
|
478 | } |
|
|
479 | |
474 | } |
480 | } |
|
|
481 | |
|
|
482 | if (!should_invoke [htype]) |
|
|
483 | return false; |
475 | } |
484 | } |
476 | else if (!should_invoke [htype]) |
|
|
477 | return false; |
|
|
478 | |
485 | |
|
|
486 | swap (perl_environ, environ); |
|
|
487 | |
|
|
488 | try |
|
|
489 | { |
479 | dSP; |
490 | dSP; |
480 | va_list ap; |
491 | va_list ap; |
481 | |
492 | |
482 | va_start (ap, htype); |
493 | va_start (ap, htype); |
483 | |
494 | |
484 | ENTER; |
495 | ENTER; |
485 | SAVETMPS; |
496 | SAVETMPS; |
486 | |
497 | |
487 | PUSHMARK (SP); |
498 | PUSHMARK (SP); |
488 | |
499 | |
489 | XPUSHs (sv_2mortal (newSVterm (term))); |
500 | XPUSHs (sv_2mortal (newSVterm (term))); |
490 | XPUSHs (sv_2mortal (newSViv (htype))); |
501 | XPUSHs (sv_2mortal (newSViv (htype))); |
491 | |
502 | |
492 | for (;;) { |
503 | for (;;) { |
493 | data_type dt = (data_type)va_arg (ap, int); |
504 | data_type dt = (data_type)va_arg (ap, int); |
494 | |
505 | |
495 | switch (dt) |
506 | switch (dt) |
496 | { |
507 | { |
497 | case DT_INT: |
508 | case DT_INT: |
498 | XPUSHs (sv_2mortal (newSViv (va_arg (ap, int)))); |
509 | XPUSHs (sv_2mortal (newSViv (va_arg (ap, int)))); |
499 | break; |
510 | break; |
500 | |
511 | |
501 | case DT_LONG: |
512 | case DT_LONG: |
502 | XPUSHs (sv_2mortal (newSViv (va_arg (ap, long)))); |
513 | XPUSHs (sv_2mortal (newSViv (va_arg (ap, long)))); |
503 | break; |
514 | break; |
504 | |
515 | |
505 | case DT_STR: |
516 | case DT_STR: |
506 | XPUSHs (taint (sv_2mortal (newSVpv (va_arg (ap, char *), 0)))); |
517 | XPUSHs (taint (sv_2mortal (newSVpv (va_arg (ap, char *), 0)))); |
507 | break; |
518 | break; |
508 | |
519 | |
509 | case DT_STR_LEN: |
520 | case DT_STR_LEN: |
510 | { |
521 | { |
511 | char *str = va_arg (ap, char *); |
522 | char *str = va_arg (ap, char *); |
512 | int len = va_arg (ap, int); |
523 | int len = va_arg (ap, int); |
513 | |
524 | |
514 | XPUSHs (taint (sv_2mortal (newSVpvn (str, len)))); |
525 | XPUSHs (taint (sv_2mortal (newSVpvn (str, len)))); |
515 | } |
526 | } |
516 | break; |
527 | break; |
517 | |
528 | |
518 | case DT_WCS_LEN: |
529 | case DT_WCS_LEN: |
519 | { |
530 | { |
520 | wchar_t *wstr = va_arg (ap, wchar_t *); |
531 | wchar_t *wstr = va_arg (ap, wchar_t *); |
521 | int wlen = va_arg (ap, int); |
532 | int wlen = va_arg (ap, int); |
522 | |
533 | |
523 | XPUSHs (taint (sv_2mortal (wcs2sv (wstr, wlen)))); |
534 | XPUSHs (taint (sv_2mortal (wcs2sv (wstr, wlen)))); |
524 | } |
535 | } |
525 | break; |
536 | break; |
526 | |
537 | |
527 | case DT_XEVENT: |
538 | case DT_XEVENT: |
528 | { |
539 | { |
529 | XEvent *xe = va_arg (ap, XEvent *); |
540 | XEvent *xe = va_arg (ap, XEvent *); |
530 | HV *hv = newHV (); |
541 | HV *hv = newHV (); |
531 | |
542 | |
532 | # define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) |
543 | # define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) |
533 | # define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) |
544 | # define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) |
534 | # undef set |
545 | # undef set |
535 | |
546 | |
536 | setiv (type, xe->type); |
547 | setiv (type, xe->type); |
537 | setiv (send_event, xe->xany.send_event); |
548 | setiv (send_event, xe->xany.send_event); |
538 | setiv (serial, xe->xany.serial); |
549 | setiv (serial, xe->xany.serial); |
539 | |
550 | |
540 | switch (xe->type) |
551 | switch (xe->type) |
|
|
552 | { |
|
|
553 | case KeyPress: |
|
|
554 | case KeyRelease: |
|
|
555 | case ButtonPress: |
|
|
556 | case ButtonRelease: |
|
|
557 | case MotionNotify: |
|
|
558 | setiv (time, xe->xmotion.time); |
|
|
559 | setiv (x, xe->xmotion.x); |
|
|
560 | setiv (y, xe->xmotion.y); |
|
|
561 | setiv (row, xe->xmotion.y / term->fheight); |
|
|
562 | setiv (col, xe->xmotion.x / term->fwidth); |
|
|
563 | setiv (x_root, xe->xmotion.x_root); |
|
|
564 | setiv (y_root, xe->xmotion.y_root); |
|
|
565 | setiv (state, xe->xmotion.state); |
|
|
566 | break; |
|
|
567 | } |
|
|
568 | |
|
|
569 | switch (xe->type) |
|
|
570 | { |
|
|
571 | case KeyPress: |
|
|
572 | case KeyRelease: |
|
|
573 | setiv (keycode, xe->xkey.keycode); |
|
|
574 | break; |
|
|
575 | |
|
|
576 | case ButtonPress: |
|
|
577 | case ButtonRelease: |
|
|
578 | setiv (button, xe->xbutton.button); |
|
|
579 | break; |
|
|
580 | |
|
|
581 | case MotionNotify: |
|
|
582 | setiv (is_hint, xe->xmotion.is_hint); |
|
|
583 | break; |
|
|
584 | } |
|
|
585 | |
|
|
586 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); |
|
|
587 | } |
|
|
588 | break; |
|
|
589 | |
|
|
590 | case DT_END: |
541 | { |
591 | { |
542 | case KeyPress: |
592 | va_end (ap); |
543 | case KeyRelease: |
593 | |
544 | case ButtonPress: |
594 | PUTBACK; |
545 | case ButtonRelease: |
595 | int count = call_pv ("urxvt::invoke", G_ARRAY | G_EVAL); |
546 | case MotionNotify: |
596 | SPAGAIN; |
547 | setiv (time, xe->xmotion.time); |
597 | |
548 | setiv (x, xe->xmotion.x); |
598 | if (count) |
549 | setiv (y, xe->xmotion.y); |
|
|
550 | setiv (row, xe->xmotion.y / term->fheight); |
|
|
551 | setiv (col, xe->xmotion.x / term->fwidth); |
|
|
552 | setiv (x_root, xe->xmotion.x_root); |
|
|
553 | setiv (y_root, xe->xmotion.y_root); |
|
|
554 | setiv (state, xe->xmotion.state); |
|
|
555 | break; |
599 | { |
|
|
600 | SV *status = POPs; |
|
|
601 | count = SvTRUE (status); |
|
|
602 | } |
|
|
603 | |
|
|
604 | PUTBACK; |
|
|
605 | FREETMPS; |
|
|
606 | LEAVE; |
|
|
607 | |
|
|
608 | if (SvTRUE (ERRSV)) |
|
|
609 | { |
|
|
610 | rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPV_nolen (ERRSV)); |
|
|
611 | ungrab (term); // better lose the grab than the session |
|
|
612 | } |
|
|
613 | |
|
|
614 | if (htype == HOOK_DESTROY) |
|
|
615 | { |
|
|
616 | clearSVptr ((SV *)term->perl.self); |
|
|
617 | SvREFCNT_dec ((SV *)term->perl.self); |
|
|
618 | } |
|
|
619 | |
|
|
620 | swap (perl_environ, environ); |
|
|
621 | return count; |
556 | } |
622 | } |
557 | |
623 | |
558 | switch (xe->type) |
|
|
559 | { |
|
|
560 | case KeyPress: |
|
|
561 | case KeyRelease: |
|
|
562 | setiv (keycode, xe->xkey.keycode); |
|
|
563 | break; |
|
|
564 | |
|
|
565 | case ButtonPress: |
|
|
566 | case ButtonRelease: |
|
|
567 | setiv (button, xe->xbutton.button); |
|
|
568 | break; |
|
|
569 | |
|
|
570 | case MotionNotify: |
|
|
571 | setiv (is_hint, xe->xmotion.is_hint); |
|
|
572 | break; |
|
|
573 | } |
|
|
574 | |
|
|
575 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); |
|
|
576 | } |
|
|
577 | break; |
|
|
578 | |
|
|
579 | case DT_END: |
|
|
580 | { |
|
|
581 | va_end (ap); |
|
|
582 | |
|
|
583 | PUTBACK; |
|
|
584 | int count = call_pv ("urxvt::invoke", G_ARRAY | G_EVAL); |
|
|
585 | SPAGAIN; |
|
|
586 | |
|
|
587 | if (count) |
|
|
588 | { |
|
|
589 | SV *status = POPs; |
|
|
590 | count = SvTRUE (status); |
|
|
591 | } |
|
|
592 | |
|
|
593 | PUTBACK; |
|
|
594 | FREETMPS; |
|
|
595 | LEAVE; |
|
|
596 | |
|
|
597 | if (SvTRUE (ERRSV)) |
|
|
598 | { |
|
|
599 | rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPV_nolen (ERRSV)); |
|
|
600 | ungrab (term); // better lose the grab than the session |
|
|
601 | } |
|
|
602 | |
|
|
603 | if (htype == HOOK_DESTROY) |
|
|
604 | { |
|
|
605 | clearSVptr ((SV *)term->perl.self); |
|
|
606 | SvREFCNT_dec ((SV *)term->perl.self); |
|
|
607 | } |
|
|
608 | |
|
|
609 | return count; |
|
|
610 | } |
|
|
611 | |
|
|
612 | default: |
624 | default: |
613 | rxvt_fatal ("FATAL: unable to pass data type %d\n", dt); |
625 | rxvt_fatal ("FATAL: unable to pass data type %d\n", dt); |
|
|
626 | } |
614 | } |
627 | } |
615 | } |
628 | } |
|
|
629 | catch (...) |
|
|
630 | { |
|
|
631 | swap (perl_environ, environ); |
|
|
632 | throw; |
|
|
633 | } |
616 | } |
634 | } |
617 | |
635 | |
618 | ///////////////////////////////////////////////////////////////////////////// |
636 | ///////////////////////////////////////////////////////////////////////////// |
619 | |
637 | |
620 | MODULE = urxvt PACKAGE = urxvt |
638 | MODULE = urxvt PACKAGE = urxvt |
621 | |
639 | |
622 | PROTOTYPES: ENABLE |
640 | PROTOTYPES: ENABLE |
623 | |
641 | |
624 | BOOT: |
642 | BOOT: |
625 | { |
643 | { |
626 | sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1)); |
644 | sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1)); |
|
|
645 | sv_setsv (get_sv ("urxvt::RESNAME", 1), newSVpvn (RESNAME, sizeof (RESNAME) - 1)); |
|
|
646 | sv_setsv (get_sv ("urxvt::RESCLASS", 1), newSVpvn (RESCLASS, sizeof (RESCLASS) - 1)); |
|
|
647 | sv_setsv (get_sv ("urxvt::RXVTNAME", 1), newSVpvn (RXVTNAME, sizeof (RXVTNAME) - 1)); |
627 | |
648 | |
628 | AV *hookname = get_av ("urxvt::HOOKNAME", 1); |
649 | AV *hookname = get_av ("urxvt::HOOKNAME", 1); |
629 | # define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); |
650 | # define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); |
630 | # include "hookinc.h" |
651 | # include "hookinc.h" |
631 | # undef def |
652 | # undef def |
… | |
… | |
660 | export_const_iv (Button2Mask); |
681 | export_const_iv (Button2Mask); |
661 | export_const_iv (Button3Mask); |
682 | export_const_iv (Button3Mask); |
662 | export_const_iv (Button4Mask); |
683 | export_const_iv (Button4Mask); |
663 | export_const_iv (Button5Mask); |
684 | export_const_iv (Button5Mask); |
664 | export_const_iv (AnyModifier); |
685 | export_const_iv (AnyModifier); |
665 | } |
|
|
666 | |
686 | |
667 | SV * |
687 | export_const_iv (EVENT_NONE); |
668 | new (...) |
688 | export_const_iv (EVENT_READ); |
669 | CODE: |
689 | export_const_iv (EVENT_WRITE); |
670 | { |
|
|
671 | stringvec *argv = new stringvec; |
|
|
672 | bool success; |
|
|
673 | |
|
|
674 | for (int i = 0; i < items ;i++) |
|
|
675 | argv->push_back (strdup (SvPVbyte_nolen (ST (i)))); |
|
|
676 | |
|
|
677 | rxvt_term *term = new rxvt_term; |
|
|
678 | |
|
|
679 | term->argv = argv; |
|
|
680 | |
|
|
681 | try |
|
|
682 | { |
|
|
683 | if (!term->init (argv->size (), argv->begin ())) |
|
|
684 | term = 0; |
|
|
685 | } |
|
|
686 | catch (const class rxvt_failure_exception &e) |
|
|
687 | { |
|
|
688 | term->destroy (); |
|
|
689 | croak ("exception caught while initializing new terminal instance"); |
|
|
690 | } |
|
|
691 | |
|
|
692 | RETVAL = term && term->perl.self ? newSVterm (term) : &PL_sv_undef; |
|
|
693 | } |
690 | } |
694 | OUTPUT: |
|
|
695 | RETVAL |
|
|
696 | |
691 | |
697 | void |
692 | void |
698 | set_should_invoke (int htype, int value) |
693 | set_should_invoke (int htype, int value) |
699 | CODE: |
694 | CODE: |
700 | rxvt_perl.should_invoke [htype] = value; |
695 | rxvt_perl.should_invoke [htype] = value; |
… | |
… | |
778 | } |
773 | } |
779 | OUTPUT: |
774 | OUTPUT: |
780 | RETVAL |
775 | RETVAL |
781 | |
776 | |
782 | MODULE = urxvt PACKAGE = urxvt::term |
777 | MODULE = urxvt PACKAGE = urxvt::term |
|
|
778 | |
|
|
779 | SV * |
|
|
780 | _new (...) |
|
|
781 | CODE: |
|
|
782 | { |
|
|
783 | if (items < 1 || !SvROK (ST (0)) || SvTYPE (SvRV (ST (0))) != SVt_PVAV) |
|
|
784 | croak ("first argument to urxvt::term->_new must be arrayref"); |
|
|
785 | |
|
|
786 | rxvt_term *term = new rxvt_term; |
|
|
787 | |
|
|
788 | term->argv = new stringvec; |
|
|
789 | term->envv = new stringvec; |
|
|
790 | |
|
|
791 | for (int i = 1; i < items; i++) |
|
|
792 | term->argv->push_back (strdup (SvPVbyte_nolen (ST (i)))); |
|
|
793 | |
|
|
794 | AV *envv = (AV *)SvRV (ST (0)); |
|
|
795 | for (int i = av_len (envv) + 1; i--; ) |
|
|
796 | term->envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (envv, i, 1)))); |
|
|
797 | |
|
|
798 | term->envv->push_back (0); |
|
|
799 | |
|
|
800 | bool success; |
|
|
801 | |
|
|
802 | try |
|
|
803 | { |
|
|
804 | success = term->init (term->argv->size (), term->argv->begin ()); |
|
|
805 | } |
|
|
806 | catch (const class rxvt_failure_exception &e) |
|
|
807 | { |
|
|
808 | success = false; |
|
|
809 | } |
|
|
810 | |
|
|
811 | if (!success) |
|
|
812 | { |
|
|
813 | term->destroy (); |
|
|
814 | croak ("error while initializing new terminal instance"); |
|
|
815 | } |
|
|
816 | |
|
|
817 | RETVAL = term && term->perl.self |
|
|
818 | ? newSVterm (term) : &PL_sv_undef; |
|
|
819 | } |
|
|
820 | OUTPUT: |
|
|
821 | RETVAL |
783 | |
822 | |
784 | void |
823 | void |
785 | rxvt_term::destroy () |
824 | rxvt_term::destroy () |
786 | |
825 | |
787 | void |
826 | void |
… | |
… | |
946 | case 1: RETVAL = THIS->locale; break; |
985 | case 1: RETVAL = THIS->locale; break; |
947 | } |
986 | } |
948 | OUTPUT: |
987 | OUTPUT: |
949 | RETVAL |
988 | RETVAL |
950 | |
989 | |
|
|
990 | SV * |
|
|
991 | rxvt_term::_env () |
|
|
992 | CODE: |
|
|
993 | { |
|
|
994 | if (THIS->envv) |
|
|
995 | { |
|
|
996 | AV *av = newAV (); |
|
|
997 | |
|
|
998 | for (char **i = THIS->envv->begin (); i != THIS->envv->end (); ++i) |
|
|
999 | if (*i) |
|
|
1000 | av_push (av, newSVpv (*i, 0)); |
|
|
1001 | |
|
|
1002 | RETVAL = newRV_noinc ((SV *)av); |
|
|
1003 | } |
|
|
1004 | else |
|
|
1005 | RETVAL = &PL_sv_undef; |
|
|
1006 | } |
|
|
1007 | OUTPUT: |
|
|
1008 | RETVAL |
|
|
1009 | |
|
|
1010 | int |
|
|
1011 | rxvt_term::pty_ev_events (int events = EVENT_UNDEF) |
|
|
1012 | CODE: |
|
|
1013 | RETVAL = THIS->pty_ev.events; |
|
|
1014 | if (events != EVENT_UNDEF) |
|
|
1015 | THIS->pty_ev.set (events); |
|
|
1016 | OUTPUT: |
|
|
1017 | RETVAL |
|
|
1018 | |
951 | U32 |
1019 | U32 |
952 | rxvt_term::parent () |
1020 | rxvt_term::parent () |
953 | CODE: |
1021 | CODE: |
954 | RETVAL = (U32)THIS->parent [0]; |
1022 | RETVAL = (U32)THIS->parent [0]; |
955 | OUTPUT: |
1023 | OUTPUT: |
… | |
… | |
1220 | else |
1288 | else |
1221 | THIS->rs [index] = 0; |
1289 | THIS->rs [index] = 0; |
1222 | } |
1290 | } |
1223 | } |
1291 | } |
1224 | |
1292 | |
|
|
1293 | const char * |
|
|
1294 | rxvt_term::x_resource (const char *name) |
|
|
1295 | CLEANUP: |
|
|
1296 | SvTAINTED_on (ST (0)); |
|
|
1297 | |
1225 | bool |
1298 | bool |
1226 | rxvt_term::option (U32 optval, int set = -1) |
1299 | rxvt_term::option (U32 optval, int set = -1) |
1227 | CODE: |
1300 | CODE: |
1228 | { |
1301 | { |
1229 | RETVAL = THIS->options & optval; |
1302 | RETVAL = THIS->options & optval; |
… | |
… | |
1256 | } |
1329 | } |
1257 | } |
1330 | } |
1258 | OUTPUT: |
1331 | OUTPUT: |
1259 | RETVAL |
1332 | RETVAL |
1260 | |
1333 | |
|
|
1334 | bool |
|
|
1335 | rxvt_term::parse_keysym (char *keysym, char *str) |
|
|
1336 | CODE: |
|
|
1337 | RETVAL = 0 < THIS->parse_keysym (keysym, str); |
|
|
1338 | THIS->keyboard->register_done (); |
|
|
1339 | OUTPUT: |
|
|
1340 | RETVAL |
|
|
1341 | |
1261 | void |
1342 | void |
1262 | rxvt_term::screen_cur (...) |
1343 | rxvt_term::screen_cur (...) |
1263 | PROTOTYPE: $;$$ |
1344 | PROTOTYPE: $;$$ |
1264 | ALIAS: |
1345 | ALIAS: |
1265 | screen_cur = 0 |
1346 | screen_cur = 0 |
… | |
… | |
1288 | if (ix) |
1369 | if (ix) |
1289 | THIS->want_refresh = 1; |
1370 | THIS->want_refresh = 1; |
1290 | } |
1371 | } |
1291 | } |
1372 | } |
1292 | |
1373 | |
|
|
1374 | char |
|
|
1375 | rxvt_term::cur_charset () |
|
|
1376 | CODE: |
|
|
1377 | RETVAL = THIS->charsets [THIS->screen.charset]; |
|
|
1378 | OUTPUT: |
|
|
1379 | RETVAL |
|
|
1380 | |
1293 | int |
1381 | int |
1294 | rxvt_term::selection_grab (U32 eventtime) |
1382 | rxvt_term::selection_grab (U32 eventtime) |
1295 | |
1383 | |
1296 | void |
1384 | void |
1297 | rxvt_term::selection (SV *newtext = 0) |
1385 | rxvt_term::selection (SV *newtext = 0) |
… | |
… | |
1308 | |
1396 | |
1309 | THIS->selection.text = sv2wcs (newtext); |
1397 | THIS->selection.text = sv2wcs (newtext); |
1310 | THIS->selection.len = wcslen (THIS->selection.text); |
1398 | THIS->selection.len = wcslen (THIS->selection.text); |
1311 | } |
1399 | } |
1312 | } |
1400 | } |
|
|
1401 | |
|
|
1402 | void |
|
|
1403 | rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle1 = RS_RVid, U32 rstyle2 = RS_RVid | RS_Uline) |
|
|
1404 | |
|
|
1405 | void |
|
|
1406 | rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid) |
|
|
1407 | |
|
|
1408 | void |
|
|
1409 | rxvt_term::scr_bell () |
1313 | |
1410 | |
1314 | void |
1411 | void |
1315 | rxvt_term::scr_add_lines (SV *string) |
1412 | rxvt_term::scr_add_lines (SV *string) |
1316 | CODE: |
1413 | CODE: |
1317 | { |
1414 | { |