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.47 by root, Mon Jan 9 02:06:43 2006 UTC vs.
Revision 1.52 by root, Tue Jan 10 04:23:39 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 "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
459 return false; // perl not initialized for this instance 460 return false; // perl not initialized for this instance
460 else if (htype == HOOK_DESTROY) 461 else if (htype == HOOK_DESTROY)
461 { 462 {
462 // handled later 463 // handled later
463 } 464 }
464 else if (htype == HOOK_REFRESH_BEGIN || htype == HOOK_REFRESH_END) 465 else
465 { 466 {
466 HV *hv = (HV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); 467 if (htype == HOOK_REFRESH_BEGIN || htype == HOOK_REFRESH_END)
467
468 if (HvKEYS (hv))
469 { 468 {
469 HV *hv = (HV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0));
470
471 if (HvKEYS (hv))
472 {
470 hv_iterinit (hv); 473 hv_iterinit (hv);
471 474
472 while (HE *he = hv_iternext (hv)) 475 while (HE *he = hv_iternext (hv))
473 ((overlay *)SvIV (hv_iterval (hv, he)))->swap (); 476 ((overlay *)SvIV (hv_iterval (hv, he)))->swap ();
477 }
478
474 } 479 }
480
481 if (!should_invoke [htype])
482 return false;
475 } 483 }
476 else if (!should_invoke [htype])
477 return false;
478 484
479 dSP; 485 dSP;
480 va_list ap; 486 va_list ap;
481 487
482 va_start (ap, htype); 488 va_start (ap, htype);
621 627
622PROTOTYPES: ENABLE 628PROTOTYPES: ENABLE
623 629
624BOOT: 630BOOT:
625{ 631{
626 sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1)); 632 sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1));
633 sv_setsv (get_sv ("urxvt::RESNAME", 1), newSVpvn (RESNAME, sizeof (RESNAME) - 1));
634 sv_setsv (get_sv ("urxvt::RESCLASS", 1), newSVpvn (RESCLASS, sizeof (RESCLASS) - 1));
635 sv_setsv (get_sv ("urxvt::RXVTNAME", 1), newSVpvn (RXVTNAME, sizeof (RXVTNAME) - 1));
627 636
628 AV *hookname = get_av ("urxvt::HOOKNAME", 1); 637 AV *hookname = get_av ("urxvt::HOOKNAME", 1);
629# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); 638# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0));
630# include "hookinc.h" 639# include "hookinc.h"
631# undef def 640# undef def
660 export_const_iv (Button2Mask); 669 export_const_iv (Button2Mask);
661 export_const_iv (Button3Mask); 670 export_const_iv (Button3Mask);
662 export_const_iv (Button4Mask); 671 export_const_iv (Button4Mask);
663 export_const_iv (Button5Mask); 672 export_const_iv (Button5Mask);
664 export_const_iv (AnyModifier); 673 export_const_iv (AnyModifier);
674
675 export_const_iv (EVENT_NONE);
676 export_const_iv (EVENT_READ);
677 export_const_iv (EVENT_WRITE);
665} 678}
666 679
667SV * 680SV *
668new (...) 681new (...)
669 CODE: 682 CODE:
932 case 2: RETVAL = THIS->ModNumLockMask; break; 945 case 2: RETVAL = THIS->ModNumLockMask; break;
933 } 946 }
934 OUTPUT: 947 OUTPUT:
935 RETVAL 948 RETVAL
936 949
950char *
951rxvt_term::display_id ()
952 ALIAS:
953 display_id = 0
954 locale = 1
955 CODE:
956 switch (ix)
957 {
958 case 0: RETVAL = THIS->display->id; break;
959 case 1: RETVAL = THIS->locale; break;
960 }
961 OUTPUT:
962 RETVAL
963
964int
965rxvt_term::pty_ev_events (int events = EVENT_UNDEF)
966 CODE:
967 RETVAL = THIS->pty_ev.events;
968 if (events != EVENT_UNDEF)
969 THIS->pty_ev.set (events);
970 OUTPUT:
971 RETVAL
972
937U32 973U32
938rxvt_term::parent () 974rxvt_term::parent ()
939 CODE: 975 CODE:
940 RETVAL = (U32)THIS->parent [0]; 976 RETVAL = (U32)THIS->parent [0];
941 OUTPUT: 977 OUTPUT:
1242 } 1278 }
1243} 1279}
1244 OUTPUT: 1280 OUTPUT:
1245 RETVAL 1281 RETVAL
1246 1282
1283bool
1284rxvt_term::parse_keysym (char *keysym, char *str)
1285 CODE:
1286 RETVAL = 0 < THIS->parse_keysym (keysym, str);
1287 THIS->keyboard->register_done ();
1288 OUTPUT:
1289 RETVAL
1290
1247void 1291void
1248rxvt_term::screen_cur (...) 1292rxvt_term::screen_cur (...)
1249 PROTOTYPE: $;$$ 1293 PROTOTYPE: $;$$
1250 ALIAS: 1294 ALIAS:
1251 screen_cur = 0 1295 screen_cur = 0
1296 THIS->selection.len = wcslen (THIS->selection.text); 1340 THIS->selection.len = wcslen (THIS->selection.text);
1297 } 1341 }
1298} 1342}
1299 1343
1300void 1344void
1345rxvt_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)
1346
1347void
1348rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid)
1349
1350void
1351rxvt_term::scr_bell ()
1352
1353void
1301rxvt_term::scr_add_lines (SV *string) 1354rxvt_term::scr_add_lines (SV *string)
1302 CODE: 1355 CODE:
1303{ 1356{
1304 wchar_t *wstr = sv2wcs (string); 1357 wchar_t *wstr = sv2wcs (string);
1305 THIS->scr_add_lines (wstr, wcslen (wstr)); 1358 THIS->scr_add_lines (wstr, wcslen (wstr));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines