… | |
… | |
479 | ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); |
479 | ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); |
480 | } |
480 | } |
481 | |
481 | |
482 | } |
482 | } |
483 | |
483 | |
484 | if (!should_invoke [htype]) |
484 | if (!term->perl.should_invoke [htype]) |
485 | return false; |
485 | return false; |
486 | } |
486 | } |
487 | |
487 | |
488 | swap (perl_environ, environ); |
488 | swap (perl_environ, environ); |
489 | |
489 | |
… | |
… | |
659 | # include "optinc.h" |
659 | # include "optinc.h" |
660 | # undef nodef |
660 | # undef nodef |
661 | # undef def |
661 | # undef def |
662 | |
662 | |
663 | HV *stash = gv_stashpv ("urxvt", 1); |
663 | HV *stash = gv_stashpv ("urxvt", 1); |
664 | # define export_const_iv(name) newCONSTSUB (stash, # name, newSViv (name)); |
664 | struct { |
|
|
665 | const char *name; |
|
|
666 | IV iv; |
|
|
667 | } *civ, const_iv[] = { |
|
|
668 | # define const_iv(name) { # name, (IV)name } |
665 | export_const_iv (DEFAULT_RSTYLE); |
669 | const_iv (DEFAULT_RSTYLE), |
666 | export_const_iv (OVERLAY_RSTYLE); |
670 | const_iv (OVERLAY_RSTYLE), |
667 | export_const_iv (RS_Bold); |
671 | const_iv (RS_Bold), |
668 | export_const_iv (RS_Italic); |
672 | const_iv (RS_Italic), |
669 | export_const_iv (RS_Blink); |
673 | const_iv (RS_Blink), |
670 | export_const_iv (RS_RVid); |
674 | const_iv (RS_RVid), |
671 | export_const_iv (RS_Uline); |
675 | const_iv (RS_Uline), |
672 | |
676 | |
673 | export_const_iv (CurrentTime); |
677 | const_iv (CurrentTime), |
674 | export_const_iv (ShiftMask); |
678 | const_iv (ShiftMask), |
675 | export_const_iv (LockMask); |
679 | const_iv (LockMask), |
676 | export_const_iv (ControlMask); |
680 | const_iv (ControlMask), |
677 | export_const_iv (Mod1Mask); |
681 | const_iv (Mod1Mask), |
678 | export_const_iv (Mod2Mask); |
682 | const_iv (Mod2Mask), |
679 | export_const_iv (Mod3Mask); |
683 | const_iv (Mod3Mask), |
680 | export_const_iv (Mod4Mask); |
684 | const_iv (Mod4Mask), |
681 | export_const_iv (Mod5Mask); |
685 | const_iv (Mod5Mask), |
682 | export_const_iv (Button1Mask); |
686 | const_iv (Button1Mask), |
683 | export_const_iv (Button2Mask); |
687 | const_iv (Button2Mask), |
684 | export_const_iv (Button3Mask); |
688 | const_iv (Button3Mask), |
685 | export_const_iv (Button4Mask); |
689 | const_iv (Button4Mask), |
686 | export_const_iv (Button5Mask); |
690 | const_iv (Button5Mask), |
687 | export_const_iv (AnyModifier); |
691 | const_iv (AnyModifier), |
688 | |
692 | |
689 | export_const_iv (EVENT_NONE); |
693 | const_iv (EVENT_NONE), |
690 | export_const_iv (EVENT_READ); |
694 | const_iv (EVENT_READ), |
691 | export_const_iv (EVENT_WRITE); |
695 | const_iv (EVENT_WRITE), |
692 | } |
|
|
693 | |
696 | |
694 | void |
697 | const_iv (NoEventMask), |
695 | set_should_invoke (int htype, int value) |
698 | const_iv (KeyPressMask), |
696 | CODE: |
699 | const_iv (KeyReleaseMask), |
697 | rxvt_perl.should_invoke [htype] = value; |
700 | const_iv (ButtonPressMask), |
|
|
701 | const_iv (ButtonReleaseMask), |
|
|
702 | const_iv (EnterWindowMask), |
|
|
703 | const_iv (LeaveWindowMask), |
|
|
704 | const_iv (PointerMotionMask), |
|
|
705 | const_iv (PointerMotionHintMask), |
|
|
706 | const_iv (Button1MotionMask), |
|
|
707 | const_iv (Button2MotionMask), |
|
|
708 | const_iv (Button3MotionMask), |
|
|
709 | const_iv (Button4MotionMask), |
|
|
710 | const_iv (Button5MotionMask), |
|
|
711 | const_iv (ButtonMotionMask), |
|
|
712 | const_iv (KeymapStateMask), |
|
|
713 | const_iv (ExposureMask), |
|
|
714 | const_iv (VisibilityChangeMask), |
|
|
715 | const_iv (StructureNotifyMask), |
|
|
716 | const_iv (ResizeRedirectMask), |
|
|
717 | const_iv (SubstructureNotifyMask), |
|
|
718 | const_iv (SubstructureRedirectMask), |
|
|
719 | const_iv (FocusChangeMask), |
|
|
720 | const_iv (PropertyChangeMask), |
|
|
721 | const_iv (ColormapChangeMask), |
|
|
722 | const_iv (OwnerGrabButtonMask), |
|
|
723 | |
|
|
724 | const_iv (KeyPress), |
|
|
725 | const_iv (KeyRelease), |
|
|
726 | const_iv (ButtonPress), |
|
|
727 | const_iv (ButtonRelease), |
|
|
728 | const_iv (MotionNotify), |
|
|
729 | const_iv (EnterNotify), |
|
|
730 | const_iv (LeaveNotify), |
|
|
731 | const_iv (FocusIn), |
|
|
732 | const_iv (FocusOut), |
|
|
733 | const_iv (KeymapNotify), |
|
|
734 | const_iv (Expose), |
|
|
735 | const_iv (GraphicsExpose), |
|
|
736 | const_iv (NoExpose), |
|
|
737 | const_iv (VisibilityNotify), |
|
|
738 | const_iv (CreateNotify), |
|
|
739 | const_iv (DestroyNotify), |
|
|
740 | const_iv (UnmapNotify), |
|
|
741 | const_iv (MapNotify), |
|
|
742 | const_iv (MapRequest), |
|
|
743 | const_iv (ReparentNotify), |
|
|
744 | const_iv (ConfigureNotify), |
|
|
745 | const_iv (ConfigureRequest), |
|
|
746 | const_iv (GravityNotify), |
|
|
747 | const_iv (ResizeRequest), |
|
|
748 | const_iv (CirculateNotify), |
|
|
749 | const_iv (CirculateRequest), |
|
|
750 | const_iv (PropertyNotify), |
|
|
751 | const_iv (SelectionClear), |
|
|
752 | const_iv (SelectionRequest), |
|
|
753 | const_iv (SelectionNotify), |
|
|
754 | const_iv (ColormapNotify), |
|
|
755 | const_iv (ClientMessage), |
|
|
756 | const_iv (MappingNotify), |
|
|
757 | }; |
|
|
758 | |
|
|
759 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); |
|
|
760 | civ-- > const_iv; ) |
|
|
761 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
|
|
762 | } |
698 | |
763 | |
699 | void |
764 | void |
700 | warn (const char *msg) |
765 | warn (const char *msg) |
701 | CODE: |
766 | CODE: |
702 | rxvt_warn ("%s", msg); |
767 | rxvt_warn ("%s", msg); |
… | |
… | |
825 | OUTPUT: |
890 | OUTPUT: |
826 | RETVAL |
891 | RETVAL |
827 | |
892 | |
828 | void |
893 | void |
829 | rxvt_term::destroy () |
894 | rxvt_term::destroy () |
|
|
895 | |
|
|
896 | void |
|
|
897 | rxvt_term::set_should_invoke (int htype, int inc) |
|
|
898 | CODE: |
|
|
899 | THIS->perl.should_invoke [htype] += inc; |
830 | |
900 | |
831 | void |
901 | void |
832 | rxvt_term::grab_button (int button, U32 modifiers) |
902 | rxvt_term::grab_button (int button, U32 modifiers) |
833 | CODE: |
903 | CODE: |
834 | XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, |
904 | XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, |
… | |
… | |
1033 | CODE: |
1103 | CODE: |
1034 | RETVAL = (U32)THIS->vt; |
1104 | RETVAL = (U32)THIS->vt; |
1035 | OUTPUT: |
1105 | OUTPUT: |
1036 | RETVAL |
1106 | RETVAL |
1037 | |
1107 | |
|
|
1108 | void |
|
|
1109 | rxvt_term::vt_emask_add (U32 emask) |
|
|
1110 | CODE: |
|
|
1111 | THIS->vt_emask_perl |= emask; |
|
|
1112 | THIS->vt_select_input (); |
|
|
1113 | |
1038 | U32 |
1114 | U32 |
1039 | rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) |
1115 | rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) |
1040 | CODE: |
1116 | CODE: |
1041 | { |
|
|
1042 | RETVAL = THIS->rstyle; |
1117 | RETVAL = THIS->rstyle; |
1043 | THIS->rstyle = new_rstyle; |
1118 | THIS->rstyle = new_rstyle; |
1044 | } |
|
|
1045 | OUTPUT: |
1119 | OUTPUT: |
1046 | RETVAL |
1120 | RETVAL |
1047 | |
1121 | |
1048 | int |
1122 | int |
1049 | rxvt_term::view_start (int newval = -1) |
1123 | rxvt_term::view_start (int newval = -1) |
|
|
1124 | PROTOTYPE: $;$ |
1050 | CODE: |
1125 | CODE: |
1051 | { |
1126 | { |
1052 | RETVAL = THIS->view_start; |
1127 | RETVAL = THIS->view_start; |
1053 | |
1128 | |
1054 | if (newval >= 0) |
1129 | if (newval >= 0) |