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.39 by root, Sat Jan 7 23:18:56 2006 UTC vs.
Revision 1.41 by root, Sun Jan 8 03:07:05 2006 UTC

36#include "rxvtutil.h" 36#include "rxvtutil.h"
37#include "rxvtperl.h" 37#include "rxvtperl.h"
38 38
39#include "perlxsi.c" 39#include "perlxsi.c"
40 40
41#if defined(HAVE_SCROLLBARS) || defined(MENUBAR)
42# define GRAB_CURSOR THIS->leftptr_cursor
43#else
44# define GRAB_CURSOR None
45#endif
46
41#undef LINENO 47#undef LINENO
42#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) 48#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows)
43#undef ROW 49#undef ROW
44#define ROW(n) THIS->row_buf [LINENO (n)] 50#define ROW(n) THIS->row_buf [LINENO (n)]
45 51
735void 741void
736rxvt_term::grab_button (int button, U32 modifiers) 742rxvt_term::grab_button (int button, U32 modifiers)
737 CODE: 743 CODE:
738 XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, 744 XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1,
739 ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, 745 ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask,
740 GrabModeSync, GrabModeSync, None, None); 746 GrabModeSync, GrabModeSync, None, GRAB_CURSOR);
741 747
742bool 748bool
743rxvt_term::grab (U32 eventtime, int sync = 0) 749rxvt_term::grab (U32 eventtime, int sync = 0)
744 CODE: 750 CODE:
745{ 751{
747 753
748 THIS->perl.grabtime = 0; 754 THIS->perl.grabtime = 0;
749 755
750 if (!XGrabPointer (THIS->display->display, THIS->vt, 0, 756 if (!XGrabPointer (THIS->display->display, THIS->vt, 0,
751 ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, 757 ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask,
752 mode, mode, None, None, eventtime)) 758 mode, mode, None, GRAB_CURSOR, eventtime))
753 if (!XGrabKeyboard (THIS->display->display, THIS->vt, 0, mode, mode, eventtime)) 759 if (!XGrabKeyboard (THIS->display->display, THIS->vt, 0, mode, mode, eventtime))
754 THIS->perl.grabtime = eventtime; 760 THIS->perl.grabtime = eventtime;
755 else 761 else
756 XUngrabPointer (THIS->display->display, eventtime); 762 XUngrabPointer (THIS->display->display, eventtime);
757 763
1156 else 1162 else
1157 THIS->rs [index] = 0; 1163 THIS->rs [index] = 0;
1158 } 1164 }
1159} 1165}
1160 1166
1167bool
1168rxvt_term::option (U32 optval, int set = -1)
1169 CODE:
1170{
1171 RETVAL = THIS->options & optval;
1172
1173 if (set >= 0)
1174 {
1175 if (set)
1176 THIS->options |= optval;
1177 else
1178 THIS->options &= ~optval;
1179
1180 switch (optval)
1181 {
1182 case Opt_skipBuiltinGlyphs:
1183 THIS->set_fonts ();
1184 THIS->scr_remap_chars ();
1185 THIS->scr_touch (true);
1186 THIS->want_refresh = 1;
1187 break;
1188
1189 case Opt_cursorUnderline:
1190 THIS->want_refresh = 1;
1191 break;
1192
1193# case Opt_scrollBar_floating:
1194# case Opt_scrollBar_right:
1195# THIS->resize_all_windows (THIS->width, THIS->height, 1);
1196# break;
1197 }
1198 }
1199}
1200 OUTPUT:
1201 RETVAL
1202
1161void 1203void
1162rxvt_term::cur (...) 1204rxvt_term::cur (...)
1163 PROTOTYPE: $;$$ 1205 PROTOTYPE: $;$$
1164 ALIAS: 1206 ALIAS:
1165 screen_cur = 0 1207 screen_cur = 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines