… | |
… | |
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); |
… | |
… | |
660 | export_const_iv (Button2Mask); |
666 | export_const_iv (Button2Mask); |
661 | export_const_iv (Button3Mask); |
667 | export_const_iv (Button3Mask); |
662 | export_const_iv (Button4Mask); |
668 | export_const_iv (Button4Mask); |
663 | export_const_iv (Button5Mask); |
669 | export_const_iv (Button5Mask); |
664 | export_const_iv (AnyModifier); |
670 | export_const_iv (AnyModifier); |
|
|
671 | |
|
|
672 | export_const_iv (EVENT_NONE); |
|
|
673 | export_const_iv (EVENT_READ); |
|
|
674 | export_const_iv (EVENT_WRITE); |
665 | } |
675 | } |
666 | |
676 | |
667 | SV * |
677 | SV * |
668 | new (...) |
678 | new (...) |
669 | CODE: |
679 | CODE: |
… | |
… | |
934 | OUTPUT: |
944 | OUTPUT: |
935 | RETVAL |
945 | RETVAL |
936 | |
946 | |
937 | char * |
947 | char * |
938 | rxvt_term::display_id () |
948 | rxvt_term::display_id () |
|
|
949 | ALIAS: |
|
|
950 | display_id = 0 |
|
|
951 | locale = 1 |
939 | CODE: |
952 | CODE: |
|
|
953 | switch (ix) |
|
|
954 | { |
940 | RETVAL = THIS->display->id; |
955 | case 0: RETVAL = THIS->display->id; break; |
|
|
956 | case 1: RETVAL = THIS->locale; break; |
|
|
957 | } |
941 | OUTPUT: |
958 | OUTPUT: |
|
|
959 | RETVAL |
|
|
960 | |
|
|
961 | int |
|
|
962 | rxvt_term::pty_ev_events (int events = EVENT_UNDEF) |
|
|
963 | CODE: |
|
|
964 | RETVAL = THIS->pty_ev.events; |
|
|
965 | if (events != EVENT_UNDEF) |
|
|
966 | THIS->pty_ev.set (events); |
|
|
967 | OUTPUT: |
942 | RETVAL |
968 | RETVAL |
943 | |
969 | |
944 | U32 |
970 | U32 |
945 | rxvt_term::parent () |
971 | rxvt_term::parent () |
946 | CODE: |
972 | CODE: |
… | |
… | |
1249 | } |
1275 | } |
1250 | } |
1276 | } |
1251 | OUTPUT: |
1277 | OUTPUT: |
1252 | RETVAL |
1278 | RETVAL |
1253 | |
1279 | |
|
|
1280 | bool |
|
|
1281 | rxvt_term::parse_keysym (char *keysym, char *str) |
|
|
1282 | CODE: |
|
|
1283 | RETVAL = 0 < THIS->parse_keysym (keysym, str); |
|
|
1284 | THIS->keyboard->register_done (); |
|
|
1285 | OUTPUT: |
|
|
1286 | RETVAL |
|
|
1287 | |
1254 | void |
1288 | void |
1255 | rxvt_term::screen_cur (...) |
1289 | rxvt_term::screen_cur (...) |
1256 | PROTOTYPE: $;$$ |
1290 | PROTOTYPE: $;$$ |
1257 | ALIAS: |
1291 | ALIAS: |
1258 | screen_cur = 0 |
1292 | screen_cur = 0 |
… | |
… | |
1303 | THIS->selection.len = wcslen (THIS->selection.text); |
1337 | THIS->selection.len = wcslen (THIS->selection.text); |
1304 | } |
1338 | } |
1305 | } |
1339 | } |
1306 | |
1340 | |
1307 | void |
1341 | void |
|
|
1342 | 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) |
|
|
1343 | |
|
|
1344 | void |
|
|
1345 | rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid) |
|
|
1346 | |
|
|
1347 | void |
|
|
1348 | rxvt_term::scr_bell () |
|
|
1349 | |
|
|
1350 | void |
1308 | rxvt_term::scr_add_lines (SV *string) |
1351 | rxvt_term::scr_add_lines (SV *string) |
1309 | CODE: |
1352 | CODE: |
1310 | { |
1353 | { |
1311 | wchar_t *wstr = sv2wcs (string); |
1354 | wchar_t *wstr = sv2wcs (string); |
1312 | THIS->scr_add_lines (wstr, wcslen (wstr)); |
1355 | THIS->scr_add_lines (wstr, wcslen (wstr)); |