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.58 by root, Thu Jan 12 01:38:37 2006 UTC vs.
Revision 1.62 by root, Fri Jan 13 04:59:04 2006 UTC

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 "unistd.h"
35
34#include "iom.h" 36#include "iom.h"
35#include "rxvt.h" 37#include "rxvt.h"
36#include "keyboard.h" 38#include "keyboard.h"
37#include "rxvtutil.h" 39#include "rxvtutil.h"
38#include "rxvtperl.h" 40#include "rxvtperl.h"
477 ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); 479 ((overlay *)SvIV (hv_iterval (hv, he)))->swap ();
478 } 480 }
479 481
480 } 482 }
481 483
482 if (!should_invoke [htype]) 484 if (!term->perl.should_invoke [htype])
483 return false; 485 return false;
484 } 486 }
485 487
486 swap (perl_environ, environ); 488 swap (perl_environ, environ);
487 489
657# include "optinc.h" 659# include "optinc.h"
658# undef nodef 660# undef nodef
659# undef def 661# undef def
660 662
661 HV *stash = gv_stashpv ("urxvt", 1); 663 HV *stash = gv_stashpv ("urxvt", 1);
662# 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 }
663 export_const_iv (DEFAULT_RSTYLE); 669 const_iv (DEFAULT_RSTYLE),
664 export_const_iv (OVERLAY_RSTYLE); 670 const_iv (OVERLAY_RSTYLE),
665 export_const_iv (RS_Bold); 671 const_iv (RS_Bold),
666 export_const_iv (RS_Italic); 672 const_iv (RS_Italic),
667 export_const_iv (RS_Blink); 673 const_iv (RS_Blink),
668 export_const_iv (RS_RVid); 674 const_iv (RS_RVid),
669 export_const_iv (RS_Uline); 675 const_iv (RS_Uline),
670 676
671 export_const_iv (CurrentTime); 677 const_iv (CurrentTime),
672 export_const_iv (ShiftMask); 678 const_iv (ShiftMask),
673 export_const_iv (LockMask); 679 const_iv (LockMask),
674 export_const_iv (ControlMask); 680 const_iv (ControlMask),
675 export_const_iv (Mod1Mask); 681 const_iv (Mod1Mask),
676 export_const_iv (Mod2Mask); 682 const_iv (Mod2Mask),
677 export_const_iv (Mod3Mask); 683 const_iv (Mod3Mask),
678 export_const_iv (Mod4Mask); 684 const_iv (Mod4Mask),
679 export_const_iv (Mod5Mask); 685 const_iv (Mod5Mask),
680 export_const_iv (Button1Mask); 686 const_iv (Button1Mask),
681 export_const_iv (Button2Mask); 687 const_iv (Button2Mask),
682 export_const_iv (Button3Mask); 688 const_iv (Button3Mask),
683 export_const_iv (Button4Mask); 689 const_iv (Button4Mask),
684 export_const_iv (Button5Mask); 690 const_iv (Button5Mask),
685 export_const_iv (AnyModifier); 691 const_iv (AnyModifier),
686 692
687 export_const_iv (EVENT_NONE); 693 const_iv (EVENT_NONE),
688 export_const_iv (EVENT_READ); 694 const_iv (EVENT_READ),
689 export_const_iv (EVENT_WRITE); 695 const_iv (EVENT_WRITE),
690}
691 696
692void 697 const_iv (NoEventMask),
693set_should_invoke (int htype, int value) 698 const_iv (KeyPressMask),
694 CODE: 699 const_iv (KeyReleaseMask),
695 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}
696 763
697void 764void
698warn (const char *msg) 765warn (const char *msg)
699 CODE: 766 CODE:
700 rxvt_warn ("%s", msg); 767 rxvt_warn ("%s", msg);
709 CODE: 776 CODE:
710 RETVAL = newSVsv (sv); 777 RETVAL = newSVsv (sv);
711 SvTAINTED_off (RETVAL); 778 SvTAINTED_off (RETVAL);
712 OUTPUT: 779 OUTPUT:
713 RETVAL 780 RETVAL
781
782void
783_exit (int status)
714 784
715bool 785bool
716safe () 786safe ()
717 CODE: 787 CODE:
718 RETVAL = !rxvt_tainted (); 788 RETVAL = !rxvt_tainted ();
820 OUTPUT: 890 OUTPUT:
821 RETVAL 891 RETVAL
822 892
823void 893void
824rxvt_term::destroy () 894rxvt_term::destroy ()
895
896void
897rxvt_term::set_should_invoke (int htype, int inc)
898 CODE:
899 THIS->perl.should_invoke [htype] += inc;
825 900
826void 901void
827rxvt_term::grab_button (int button, U32 modifiers) 902rxvt_term::grab_button (int button, U32 modifiers)
828 CODE: 903 CODE:
829 XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, 904 XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1,
1028 CODE: 1103 CODE:
1029 RETVAL = (U32)THIS->vt; 1104 RETVAL = (U32)THIS->vt;
1030 OUTPUT: 1105 OUTPUT:
1031 RETVAL 1106 RETVAL
1032 1107
1108void
1109rxvt_term::vt_emask_add (U32 emask)
1110 CODE:
1111 THIS->vt_emask_perl |= emask;
1112 THIS->vt_select_input ();
1113
1033U32 1114U32
1034rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) 1115rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle)
1035 CODE: 1116 CODE:
1036{ 1117{
1037 RETVAL = THIS->rstyle; 1118 RETVAL = THIS->rstyle;
1040 OUTPUT: 1121 OUTPUT:
1041 RETVAL 1122 RETVAL
1042 1123
1043int 1124int
1044rxvt_term::view_start (int newval = -1) 1125rxvt_term::view_start (int newval = -1)
1126 PROTOTYPE: $;$
1045 CODE: 1127 CODE:
1046{ 1128{
1047 RETVAL = THIS->view_start; 1129 RETVAL = THIS->view_start;
1048 1130
1049 if (newval >= 0) 1131 if (newval >= 0)
1376 CODE: 1458 CODE:
1377 RETVAL = THIS->charsets [THIS->screen.charset]; 1459 RETVAL = THIS->charsets [THIS->screen.charset];
1378 OUTPUT: 1460 OUTPUT:
1379 RETVAL 1461 RETVAL
1380 1462
1463#void
1464#rxvt_term::selection_clear ()
1465
1466void
1467rxvt_term::selection_make (U32 eventtime, bool rect = false)
1468 CODE:
1469 THIS->selection.op = SELECTION_CONT;
1470 THIS->selection.rect = rect;
1471 THIS->selection_make (eventtime);
1472
1381int 1473int
1382rxvt_term::selection_grab (U32 eventtime) 1474rxvt_term::selection_grab (U32 eventtime)
1383 1475
1384void 1476void
1385rxvt_term::selection (SV *newtext = 0) 1477rxvt_term::selection (SV *newtext = 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines