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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines