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.81 by root, Fri Jan 20 13:32:29 2006 UTC vs.
Revision 1.94 by root, Thu Jan 26 00:09:47 2006 UTC

244 244
245///////////////////////////////////////////////////////////////////////////// 245/////////////////////////////////////////////////////////////////////////////
246 246
247#define SvOVERLAY(sv) (overlay *)SvPTR (sv, "urxvt::overlay") 247#define SvOVERLAY(sv) (overlay *)SvPTR (sv, "urxvt::overlay")
248 248
249struct overlay { 249class overlay {
250 HV *self;
251 bool visible;
252 rxvt_term *THIS; 250 rxvt_term *THIS;
251 AV *overlay_av;
253 int x, y, w, h; 252 int x, y, w, h;
254 int border; 253 int border;
255 text_t **text; 254 text_t **text;
256 rend_t **rend; 255 rend_t **rend;
257 256
257public:
258 HV *self;
259
258 overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border); 260 overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border);
259 ~overlay (); 261 ~overlay ();
260 262
261 void show (); 263 void show ();
262 void hide (); 264 void hide ();
265 267
266 void set (int x, int y, SV *str, SV *rend); 268 void set (int x, int y, SV *str, SV *rend);
267}; 269};
268 270
269overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border) 271overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border)
270: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), visible(false) 272: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), overlay_av (0)
271{ 273{
272 if (border == 2) 274 if (border == 2)
273 { 275 {
274 w += 2; 276 w += 2;
275 h += 2; 277 h += 2;
314 *rp++ = r; 316 *rp++ = r;
315 } 317 }
316 } 318 }
317 319
318 show (); 320 show ();
319 THIS->want_refresh = 1;
320} 321}
321 322
322overlay::~overlay () 323overlay::~overlay ()
323{ 324{
324 hide (); 325 hide ();
329 delete [] rend[y]; 330 delete [] rend[y];
330 } 331 }
331 332
332 delete [] text; 333 delete [] text;
333 delete [] rend; 334 delete [] rend;
335}
336
337void
338overlay::show ()
339{
340 if (overlay_av)
341 return;
342
343 overlay_av = (AV *)SvREFCNT_inc (SvRV (
344 *hv_fetch ((HV *)SvRV ((SV *)THIS->perl.self), "_overlay", 8, 0)
345 ));
346 av_push (overlay_av, newSViv ((long)this));
334 347
335 THIS->want_refresh = 1; 348 THIS->want_refresh = 1;
336} 349}
337 350
338void 351void
339overlay::show () 352overlay::hide ()
340{ 353{
341 if (visible) 354 if (!overlay_av)
342 return; 355 return;
343 356
344 visible = true;
345
346 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)THIS->perl.self), "_overlay", 8, 0));
347 av_push (av, newSViv ((long)this));
348}
349
350void
351overlay::hide ()
352{
353 if (!visible)
354 return;
355
356 visible = false;
357
358 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)THIS->perl.self), "_overlay", 8, 0));
359
360 int i; 357 int i;
361 358
362 for (i = AvFILL (av); i >= 0; i--) 359 for (i = AvFILL (overlay_av); i >= 0; i--)
363 if (SvIV (*av_fetch (av, i, 1)) == (long)this) 360 if (SvIV (*av_fetch (overlay_av, i, 1)) == (long)this)
364 { 361 {
365 av_delete (av, i, G_DISCARD); 362 av_delete (overlay_av, i, G_DISCARD);
366 break; 363 break;
367 } 364 }
368 365
369 for (; i < AvFILL (av); i++) 366 for (; i < AvFILL (overlay_av); i++)
370 av_store (av, i, SvREFCNT_inc (*av_fetch (av, i + 1, 0))); 367 av_store (overlay_av, i, SvREFCNT_inc (*av_fetch (overlay_av, i + 1, 0)));
371 368
372 av_pop (av); 369 av_pop (overlay_av);
370
371 SvREFCNT_dec (overlay_av);
372 overlay_av = 0;
373
374 THIS->want_refresh = 1;
373} 375}
374 376
375void overlay::swap () 377void overlay::swap ()
376{ 378{
377 int ov_x = max (0, min (MOD (x, THIS->ncol), THIS->ncol - w)); 379 int ov_x = max (0, min (MOD (x, THIS->ncol), THIS->ncol - w));
554 break; 556 break;
555 557
556 case DT_STR_LEN: 558 case DT_STR_LEN:
557 { 559 {
558 char *str = va_arg (ap, char *); 560 char *str = va_arg (ap, char *);
559 int len = va_arg (ap, int); 561 int len = va_arg (ap, int);
560 562
561 XPUSHs (sv_2mortal (newSVpvn (str, len))); 563 XPUSHs (sv_2mortal (newSVpvn (str, len)));
562 } 564 }
563 break; 565 break;
564 566
565 case DT_WCS_LEN: 567 case DT_WCS_LEN:
566 { 568 {
567 wchar_t *wstr = va_arg (ap, wchar_t *); 569 wchar_t *wstr = va_arg (ap, wchar_t *);
568 int wlen = va_arg (ap, int); 570 int wlen = va_arg (ap, int);
569 571
570 XPUSHs (sv_2mortal (wcs2sv (wstr, wlen))); 572 XPUSHs (sv_2mortal (wcs2sv (wstr, wlen)));
573 }
574 break;
575
576 case DT_LCS_LEN:
577 {
578 long *lstr = va_arg (ap, long *);
579 int llen = va_arg (ap, int);
580
581 XPUSHs (sv_2mortal (newSVpvn ((char *)lstr, llen * sizeof (long))));
571 } 582 }
572 break; 583 break;
573 584
574 case DT_XEVENT: 585 case DT_XEVENT:
575 { 586 {
576 XEvent *xe = va_arg (ap, XEvent *); 587 XEvent *xe = va_arg (ap, XEvent *);
577 HV *hv = newHV (); 588 HV *hv = newHV ();
578 589
579# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) 590# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0)
580# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) 591# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0)
581# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0) 592# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0)
582# undef set 593# undef set
583 594
584 setiv (type, xe->type); 595 setiv (type, xe->type);
585 setiv (send_event, xe->xany.send_event); 596 setiv (send_event, xe->xany.send_event);
586 setiv (serial, xe->xany.serial); 597 setiv (serial, xe->xany.serial);
587 598
596 setuv (root, xe->xmotion.root); 607 setuv (root, xe->xmotion.root);
597 setuv (subwindow, xe->xmotion.subwindow); 608 setuv (subwindow, xe->xmotion.subwindow);
598 setuv (time, xe->xmotion.time); 609 setuv (time, xe->xmotion.time);
599 setiv (x, xe->xmotion.x); 610 setiv (x, xe->xmotion.x);
600 setiv (y, xe->xmotion.y); 611 setiv (y, xe->xmotion.y);
601 setiv (row, xe->xmotion.y / term->fheight); 612 setiv (row, xe->xmotion.y / term->fheight + term->view_start);
602 setiv (col, xe->xmotion.x / term->fwidth); 613 setiv (col, xe->xmotion.x / term->fwidth);
603 setiv (x_root, xe->xmotion.x_root); 614 setiv (x_root, xe->xmotion.x_root);
604 setiv (y_root, xe->xmotion.y_root); 615 setiv (y_root, xe->xmotion.y_root);
605 setuv (state, xe->xmotion.state); 616 setuv (state, xe->xmotion.state);
606 617
640 break; 651 break;
641 } 652 }
642 653
643 break; 654 break;
644 655
656 case PropertyNotify:
657 setuv (window, xe->xproperty.window);
658 setuv (atom, xe->xproperty.atom);
659 setuv (time, xe->xproperty.time);
660 setiv (state, xe->xproperty.state);
661 break;
662
645 case ClientMessage: 663 case ClientMessage:
646 setuv (window, xe->xclient.window); 664 setuv (window, xe->xclient.window);
647 setuv (message_type, xe->xclient.message_type); 665 setuv (message_type, xe->xclient.message_type);
648 setuv (format, xe->xclient.format); 666 setuv (format, xe->xclient.format);
649 setuv (l0, xe->xclient.data.l[0]); 667 setuv (l0, xe->xclient.data.l[0]);
650 setuv (l1, xe->xclient.data.l[1]); 668 setuv (l1, xe->xclient.data.l[1]);
651 setuv (l2, xe->xclient.data.l[2]); 669 setuv (l2, xe->xclient.data.l[2]);
652 setuv (l3, xe->xclient.data.l[3]); 670 setuv (l3, xe->xclient.data.l[3]);
653 setuv (l4, xe->xclient.data.l[4]); 671 setuv (l4, xe->xclient.data.l[4]);
672 break;
654 } 673 }
655 674
656 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); 675 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
657 } 676 }
658 break; 677 break;
708 } 727 }
709 else if (htype == HOOK_DESTROY) 728 else if (htype == HOOK_DESTROY)
710 { 729 {
711 clearSVptr ((SV *)term->perl.self); 730 clearSVptr ((SV *)term->perl.self);
712 SvREFCNT_dec ((SV *)term->perl.self); 731 SvREFCNT_dec ((SV *)term->perl.self);
732
733 // don't allow further calls
734 term->perl.self = 0;
713 } 735 }
714 736
715 swap (perl_environ, environ); 737 swap (perl_environ, environ);
716 738
717 return event_consumed; 739 return event_consumed;
834 const_iv (SelectionRequest), 856 const_iv (SelectionRequest),
835 const_iv (SelectionNotify), 857 const_iv (SelectionNotify),
836 const_iv (ColormapNotify), 858 const_iv (ColormapNotify),
837 const_iv (ClientMessage), 859 const_iv (ClientMessage),
838 const_iv (MappingNotify), 860 const_iv (MappingNotify),
861# if ENABLE_XIM_ONTHESPOT
862 const_iv (XIMReverse),
863 const_iv (XIMUnderline),
864 const_iv (XIMHighlight),
865 const_iv (XIMPrimary),
866 const_iv (XIMSecondary),
867 const_iv (XIMTertiary),
868 const_iv (XIMVisibleToForward),
869 const_iv (XIMVisibleToBackword),
870 const_iv (XIMVisibleToCenter),
871# if 0
872 const_iv (XIMForwardChar),
873 const_iv (XIMBackwardChar),
874 const_iv (XIMForwardWord),
875 const_iv (XIMBackwardWord),
876 const_iv (XIMCaretUp),
877 const_iv (XIMCaretDown),
878 const_iv (XIMNextLine),
879 const_iv (XIMPreviousLine),
880 const_iv (XIMLineStart),
881 const_iv (XIMLineEnd),
882 const_iv (XIMAbsolutePosition),
883 const_iv (XIMDontChange),
884# endif
885# endif
839 }; 886 };
840 887
841 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); 888 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]);
842 civ-- > const_iv; ) 889 civ-- > const_iv; )
843 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 890 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
920 if (items < 1 || !SvROK (ST (0)) || SvTYPE (SvRV (ST (0))) != SVt_PVAV) 967 if (items < 1 || !SvROK (ST (0)) || SvTYPE (SvRV (ST (0))) != SVt_PVAV)
921 croak ("first argument to urxvt::term->_new must be arrayref"); 968 croak ("first argument to urxvt::term->_new must be arrayref");
922 969
923 rxvt_term *term = new rxvt_term; 970 rxvt_term *term = new rxvt_term;
924 971
925 term->argv = new stringvec; 972 stringvec *argv = new stringvec;
926 term->envv = new stringvec; 973 stringvec *envv = new stringvec;
927 974
928 for (int i = 1; i < items; i++) 975 for (int i = 1; i < items; i++)
929 term->argv->push_back (strdup (SvPVbyte_nolen (ST (i)))); 976 argv->push_back (strdup (SvPVbyte_nolen (ST (i))));
930 977
931 AV *envv = (AV *)SvRV (ST (0)); 978 AV *env = (AV *)SvRV (ST (0));
932 for (int i = AvFILL (envv) + 1; i--; ) 979 for (int i = AvFILL (env) + 1; i--; )
933 term->envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (envv, i, 1)))); 980 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1))));
934 981
935 term->envv->push_back (0); 982 envv->push_back (0);
936 983
937 bool success; 984 bool success;
938 985
939 try 986 try
940 { 987 {
941 success = term->init (term->argv->size (), term->argv->begin ()); 988 success = term->init (argv, envv);
942 } 989 }
943 catch (const class rxvt_failure_exception &e) 990 catch (const class rxvt_failure_exception &e)
944 { 991 {
945 success = false; 992 success = false;
946 } 993 }
1109rxvt_term::ModLevel3Mask () 1156rxvt_term::ModLevel3Mask ()
1110 ALIAS: 1157 ALIAS:
1111 ModLevel3Mask = 0 1158 ModLevel3Mask = 0
1112 ModMetaMask = 1 1159 ModMetaMask = 1
1113 ModNumLockMask = 2 1160 ModNumLockMask = 2
1161 current_screen = 3
1162 hidden_cursor = 4
1114 CODE: 1163 CODE:
1115 switch (ix) 1164 switch (ix)
1116 { 1165 {
1117 case 0: RETVAL = THIS->ModLevel3Mask; break; 1166 case 0: RETVAL = THIS->ModLevel3Mask; break;
1118 case 1: RETVAL = THIS->ModMetaMask; break; 1167 case 1: RETVAL = THIS->ModMetaMask; break;
1119 case 2: RETVAL = THIS->ModNumLockMask; break; 1168 case 2: RETVAL = THIS->ModNumLockMask; break;
1169 case 3: RETVAL = THIS->current_screen; break;
1170 case 4: RETVAL = THIS->hidden_cursor; break;
1120 } 1171 }
1121 OUTPUT: 1172 OUTPUT:
1122 RETVAL 1173 RETVAL
1123 1174
1124char * 1175char *
1162 if (events != EVENT_UNDEF) 1213 if (events != EVENT_UNDEF)
1163 THIS->pty_ev.set (events); 1214 THIS->pty_ev.set (events);
1164 OUTPUT: 1215 OUTPUT:
1165 RETVAL 1216 RETVAL
1166 1217
1218int
1219rxvt_term::pty_fd ()
1220 CODE:
1221 RETVAL = THIS->pty->pty;
1222 OUTPUT:
1223 RETVAL
1224
1167Window 1225Window
1168rxvt_term::parent () 1226rxvt_term::parent ()
1169 CODE: 1227 CODE:
1170 RETVAL = THIS->parent [0]; 1228 RETVAL = THIS->parent [0];
1171 OUTPUT: 1229 OUTPUT:
1204} 1262}
1205 OUTPUT: 1263 OUTPUT:
1206 RETVAL 1264 RETVAL
1207 1265
1208void 1266void
1267rxvt_term::focus_in ()
1268
1269void
1270rxvt_term::focus_out ()
1271
1272void
1209rxvt_term::want_refresh () 1273rxvt_term::want_refresh ()
1210 CODE: 1274 CODE:
1211 THIS->want_refresh = 1; 1275 THIS->want_refresh = 1;
1212 1276
1213void 1277void
1219 1283
1220 line_t &l = ROW(row_number); 1284 line_t &l = ROW(row_number);
1221 1285
1222 if (GIMME_V != G_VOID) 1286 if (GIMME_V != G_VOID)
1223 { 1287 {
1224 wchar_t *wstr = new wchar_t [THIS->ncol]; 1288 wchar_t *wstr = rxvt_temp_buf<wchar_t> (THIS->ncol);
1225 1289
1226 for (int col = 0; col < THIS->ncol; col++) 1290 for (int col = 0; col < THIS->ncol; col++)
1227 wstr [col] = l.t [col]; 1291 wstr [col] = l.t [col];
1228 1292
1229 XPUSHs (sv_2mortal (wcs2sv (wstr, THIS->ncol))); 1293 XPUSHs (sv_2mortal (wcs2sv (wstr, THIS->ncol)));
1230
1231 delete [] wstr;
1232 } 1294 }
1233 1295
1234 if (new_text) 1296 if (new_text)
1235 { 1297 {
1236 wchar_t *wstr = sv2wcs (new_text); 1298 wchar_t *wstr = sv2wcs (new_text);
1237 1299
1238 int len = min (wcslen (wstr) - start_ofs, max_len); 1300 int len = min (wcslen (wstr) - start_ofs, max_len);
1239 1301
1240 if (!IN_RANGE_INC (start_col, 0, THIS->ncol - len)) 1302 if (start_col < 0 || start_col + len > THIS->ncol)
1241 { 1303 {
1242 free (wstr); 1304 free (wstr);
1243 croak ("new_text extends beyond horizontal margins"); 1305 croak ("new_text extends beyond horizontal margins");
1244 } 1306 }
1245 1307
1279 croak ("new_rend must be arrayref"); 1341 croak ("new_rend must be arrayref");
1280 1342
1281 AV *av = (AV *)SvRV (new_rend); 1343 AV *av = (AV *)SvRV (new_rend);
1282 int len = min (AvFILL (av) + 1 - start_ofs, max_len); 1344 int len = min (AvFILL (av) + 1 - start_ofs, max_len);
1283 1345
1284 if (!IN_RANGE_INC (start_col, 0, THIS->ncol - len)) 1346 if (start_col < 0 || start_col + len > THIS->ncol)
1285 croak ("new_rend array extends beyond horizontal margins"); 1347 croak ("new_rend array extends beyond horizontal margins");
1286 1348
1287 for (int col = start_col; col < start_col + len; col++) 1349 for (int col = start_col; col < start_col + len; col++)
1288 { 1350 {
1289 rend_t r = SvIV (*av_fetch (av, start_ofs + col - start_col, 1)) & ~RS_fontMask; 1351 rend_t r = SvIV (*av_fetch (av, start_ofs + col - start_col, 1)) & ~RS_fontMask;
1329rxvt_term::special_encode (SV *string) 1391rxvt_term::special_encode (SV *string)
1330 CODE: 1392 CODE:
1331{ 1393{
1332 wchar_t *wstr = sv2wcs (string); 1394 wchar_t *wstr = sv2wcs (string);
1333 int wlen = wcslen (wstr); 1395 int wlen = wcslen (wstr);
1334 wchar_t *rstr = new wchar_t [wlen]; // cannot become longer 1396 wchar_t *rstr = rxvt_temp_buf<wchar_t> (wlen * 2); // cannot become longer
1335 1397
1336 rxvt_push_locale (THIS->locale); 1398 rxvt_push_locale (THIS->locale);
1337 1399
1338 wchar_t *r = rstr; 1400 wchar_t *r = rstr;
1339 for (wchar_t *s = wstr; *s; s++) 1401 for (wchar_t *s = wstr; *s; s++)
1402 {
1403 int w = WCWIDTH (*s);
1404
1340 if (wcwidth (*s) == 0) 1405 if (w == 0)
1341 { 1406 {
1342 if (r == rstr) 1407 if (r == rstr)
1343 croak ("leading combining character unencodable"); 1408 croak ("leading combining character unencodable");
1344 1409
1345 unicode_t n = rxvt_compose (r[-1], *s); 1410 unicode_t n = rxvt_compose (r[-1], *s);
1346 if (n == NOCHAR) 1411 if (n == NOCHAR)
1347 n = rxvt_composite.compose (r[-1], *s); 1412 n = rxvt_composite.compose (r[-1], *s);
1348 1413
1349 r[-1] = n; 1414 r[-1] = n;
1350 } 1415 }
1351#if !UNICODE_3 1416#if !UNICODE_3
1352 else if (*s >= 0x10000) 1417 else if (*s >= 0x10000)
1353 *r++ = rxvt_composite.compose (*s); 1418 *r++ = rxvt_composite.compose (*s);
1354#endif 1419#endif
1355 else 1420 else
1356 *r++ = *s; 1421 *r++ = *s;
1422
1423 // the *2 above only allows wcwidth <= 2
1424 if (w > 1)
1425 *r++ = NOCHAR;
1426 }
1357 1427
1358 rxvt_pop_locale (); 1428 rxvt_pop_locale ();
1359 1429
1360 RETVAL = wcs2sv (rstr, r - rstr); 1430 RETVAL = wcs2sv (rstr, r - rstr);
1361
1362 delete [] rstr;
1363} 1431}
1364 OUTPUT: 1432 OUTPUT:
1365 RETVAL 1433 RETVAL
1366 1434
1367SV * 1435SV *
1379 else if (IS_COMPOSE (*s)) 1447 else if (IS_COMPOSE (*s))
1380 dlen += rxvt_composite.expand (*s, 0); 1448 dlen += rxvt_composite.expand (*s, 0);
1381 else 1449 else
1382 dlen++; 1450 dlen++;
1383 1451
1384 wchar_t *rstr = new wchar_t [dlen]; 1452 wchar_t *rstr = rxvt_temp_buf<wchar_t> (dlen);
1385 1453
1386 // decode 1454 // decode
1387 wchar_t *r = rstr; 1455 wchar_t *r = rstr;
1388 for (wchar_t *s = wstr; *s; s++) 1456 for (wchar_t *s = wstr; *s; s++)
1389 if (*s == NOCHAR) 1457 if (*s == NOCHAR)
1392 r += rxvt_composite.expand (*s, r); 1460 r += rxvt_composite.expand (*s, r);
1393 else 1461 else
1394 *r++ = *s; 1462 *r++ = *s;
1395 1463
1396 RETVAL = wcs2sv (rstr, r - rstr); 1464 RETVAL = wcs2sv (rstr, r - rstr);
1397
1398 delete [] rstr;
1399} 1465}
1400 OUTPUT: 1466 OUTPUT:
1401 RETVAL 1467 RETVAL
1402 1468
1403void 1469void
1513 if (items == 3) 1579 if (items == 3)
1514 { 1580 {
1515 rc.row = SvIV (ST (1)); 1581 rc.row = SvIV (ST (1));
1516 rc.col = SvIV (ST (2)); 1582 rc.col = SvIV (ST (2));
1517 1583
1518 if (ix == 2 && rc.col == 0) 1584 if (ix == 2)
1519 { 1585 {
1586 if (rc.col == 0)
1587 {
1588 // col == 0 means end of previous line
1520 rc.row--; 1589 rc.row--;
1521 rc.col = THIS->ncol; 1590 rc.col = THIS->ncol;
1591 }
1592 else if (IN_RANGE_EXC (rc.row, THIS->top_row, THIS->nrow)
1593 && rc.col > ROW(rc.row).l)
1594 {
1595 // col >= length means while line and add newline
1596 rc.col = THIS->ncol;
1597 }
1522 } 1598 }
1523 1599
1524 clamp_it (rc.col, 0, THIS->ncol); 1600 clamp_it (rc.col, 0, THIS->ncol);
1525 clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); 1601 clamp_it (rc.row, THIS->top_row, THIS->nrow - 1);
1526 1602
1534 CODE: 1610 CODE:
1535 RETVAL = THIS->charsets [THIS->screen.charset]; 1611 RETVAL = THIS->charsets [THIS->screen.charset];
1536 OUTPUT: 1612 OUTPUT:
1537 RETVAL 1613 RETVAL
1538 1614
1539#void 1615void
1540#rxvt_term::selection_clear () 1616rxvt_term::selection_clear ()
1541 1617
1542void 1618void
1543rxvt_term::selection_make (Time eventtime, bool rect = false) 1619rxvt_term::selection_make (Time eventtime, bool rect = false)
1544 CODE: 1620 CODE:
1545 THIS->selection.op = SELECTION_CONT; 1621 THIS->selection.op = SELECTION_CONT;
1573void 1649void
1574rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid) 1650rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid)
1575 1651
1576void 1652void
1577rxvt_term::scr_bell () 1653rxvt_term::scr_bell ()
1654
1655void
1656rxvt_term::scr_change_screen (int screen)
1578 1657
1579void 1658void
1580rxvt_term::scr_add_lines (SV *string) 1659rxvt_term::scr_add_lines (SV *string)
1581 CODE: 1660 CODE:
1582{ 1661{
1732XUnmapWindow (rxvt_term *term, Window window) 1811XUnmapWindow (rxvt_term *term, Window window)
1733 C_ARGS: term->display->display, window 1812 C_ARGS: term->display->display, window
1734 1813
1735void 1814void
1736XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) 1815XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height)
1737 C_ARGS: term->display->display, (Window)window, x, y, width, height 1816 C_ARGS: term->display->display, window, x, y, width, height
1817
1818void
1819rxvt_term::XChangeInput (Window window, U32 add_events, U32 del_events = 0)
1820 CODE:
1821{
1822 XWindowAttributes attr;
1823 XGetWindowAttributes (THIS->display->display, window, &attr);
1824 XSelectInput (THIS->display->display, window, attr.your_event_mask | add_events & ~del_events);
1825}
1826
1827void
1828rxvt_term::XTranslateCoordinates (Window src, Window dst, int x, int y)
1829 PPCODE:
1830{
1831 int dx, dy;
1832 Window child;
1833
1834 if (XTranslateCoordinates (THIS->display->display, src, dst, x, y, &dx, &dy, &child))
1835 {
1836 EXTEND (SP, 3);
1837 PUSHs (newSViv (dx));
1838 PUSHs (newSViv (dy));
1839 PUSHs (newSVuv (child));
1840 }
1841}
1738 1842
1739############################################################################# 1843#############################################################################
1740# urxvt::overlay 1844# urxvt::overlay
1741############################################################################# 1845#############################################################################
1742 1846

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines