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.85 by root, Fri Jan 20 22:05:41 2006 UTC

596 setuv (root, xe->xmotion.root); 596 setuv (root, xe->xmotion.root);
597 setuv (subwindow, xe->xmotion.subwindow); 597 setuv (subwindow, xe->xmotion.subwindow);
598 setuv (time, xe->xmotion.time); 598 setuv (time, xe->xmotion.time);
599 setiv (x, xe->xmotion.x); 599 setiv (x, xe->xmotion.x);
600 setiv (y, xe->xmotion.y); 600 setiv (y, xe->xmotion.y);
601 setiv (row, xe->xmotion.y / term->fheight); 601 setiv (row, xe->xmotion.y / term->fheight + term->view_start);
602 setiv (col, xe->xmotion.x / term->fwidth); 602 setiv (col, xe->xmotion.x / term->fwidth);
603 setiv (x_root, xe->xmotion.x_root); 603 setiv (x_root, xe->xmotion.x_root);
604 setiv (y_root, xe->xmotion.y_root); 604 setiv (y_root, xe->xmotion.y_root);
605 setuv (state, xe->xmotion.state); 605 setuv (state, xe->xmotion.state);
606 606
640 break; 640 break;
641 } 641 }
642 642
643 break; 643 break;
644 644
645 case PropertyNotify:
646 setuv (window, xe->xproperty.window);
647 setuv (atom, xe->xproperty.atom);
648 setuv (time, xe->xproperty.time);
649 setiv (state, xe->xproperty.state);
650 break;
651
645 case ClientMessage: 652 case ClientMessage:
646 setuv (window, xe->xclient.window); 653 setuv (window, xe->xclient.window);
647 setuv (message_type, xe->xclient.message_type); 654 setuv (message_type, xe->xclient.message_type);
648 setuv (format, xe->xclient.format); 655 setuv (format, xe->xclient.format);
649 setuv (l0, xe->xclient.data.l[0]); 656 setuv (l0, xe->xclient.data.l[0]);
650 setuv (l1, xe->xclient.data.l[1]); 657 setuv (l1, xe->xclient.data.l[1]);
651 setuv (l2, xe->xclient.data.l[2]); 658 setuv (l2, xe->xclient.data.l[2]);
652 setuv (l3, xe->xclient.data.l[3]); 659 setuv (l3, xe->xclient.data.l[3]);
653 setuv (l4, xe->xclient.data.l[4]); 660 setuv (l4, xe->xclient.data.l[4]);
661 break;
654 } 662 }
655 663
656 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); 664 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
657 } 665 }
658 break; 666 break;
1204} 1212}
1205 OUTPUT: 1213 OUTPUT:
1206 RETVAL 1214 RETVAL
1207 1215
1208void 1216void
1217rxvt_term::focus_in ()
1218
1219void
1220rxvt_term::focus_out ()
1221
1222void
1209rxvt_term::want_refresh () 1223rxvt_term::want_refresh ()
1210 CODE: 1224 CODE:
1211 THIS->want_refresh = 1; 1225 THIS->want_refresh = 1;
1212 1226
1213void 1227void
1235 { 1249 {
1236 wchar_t *wstr = sv2wcs (new_text); 1250 wchar_t *wstr = sv2wcs (new_text);
1237 1251
1238 int len = min (wcslen (wstr) - start_ofs, max_len); 1252 int len = min (wcslen (wstr) - start_ofs, max_len);
1239 1253
1240 if (!IN_RANGE_INC (start_col, 0, THIS->ncol - len)) 1254 if (start_col < 0 || start_col + len > THIS->ncol)
1241 { 1255 {
1242 free (wstr); 1256 free (wstr);
1243 croak ("new_text extends beyond horizontal margins"); 1257 croak ("new_text extends beyond horizontal margins");
1244 } 1258 }
1245 1259
1279 croak ("new_rend must be arrayref"); 1293 croak ("new_rend must be arrayref");
1280 1294
1281 AV *av = (AV *)SvRV (new_rend); 1295 AV *av = (AV *)SvRV (new_rend);
1282 int len = min (AvFILL (av) + 1 - start_ofs, max_len); 1296 int len = min (AvFILL (av) + 1 - start_ofs, max_len);
1283 1297
1284 if (!IN_RANGE_INC (start_col, 0, THIS->ncol - len)) 1298 if (start_col < 0 || start_col + len > THIS->ncol)
1285 croak ("new_rend array extends beyond horizontal margins"); 1299 croak ("new_rend array extends beyond horizontal margins");
1286 1300
1287 for (int col = start_col; col < start_col + len; col++) 1301 for (int col = start_col; col < start_col + len; col++)
1288 { 1302 {
1289 rend_t r = SvIV (*av_fetch (av, start_ofs + col - start_col, 1)) & ~RS_fontMask; 1303 rend_t r = SvIV (*av_fetch (av, start_ofs + col - start_col, 1)) & ~RS_fontMask;
1732XUnmapWindow (rxvt_term *term, Window window) 1746XUnmapWindow (rxvt_term *term, Window window)
1733 C_ARGS: term->display->display, window 1747 C_ARGS: term->display->display, window
1734 1748
1735void 1749void
1736XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) 1750XMoveResizeWindow (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 1751 C_ARGS: term->display->display, window, x, y, width, height
1752
1753void
1754rxvt_term::XChangeInput (Window window, U32 add_events, U32 del_events = 0)
1755 CODE:
1756{
1757 XWindowAttributes attr;
1758 XGetWindowAttributes (THIS->display->display, window, &attr);
1759 XSelectInput (THIS->display->display, window, attr.your_event_mask | add_events & ~del_events);
1760}
1761
1762void
1763rxvt_term::XTranslateCoordinates (Window src, Window dst, int x, int y)
1764 PPCODE:
1765{
1766 int dx, dy;
1767 Window child;
1768
1769 if (XTranslateCoordinates (THIS->display->display, src, dst, x, y, &dx, &dy, &child))
1770 {
1771 EXTEND (SP, 3);
1772 PUSHs (newSViv (dx));
1773 PUSHs (newSViv (dy));
1774 PUSHs (newSVuv (child));
1775 }
1776}
1738 1777
1739############################################################################# 1778#############################################################################
1740# urxvt::overlay 1779# urxvt::overlay
1741############################################################################# 1780#############################################################################
1742 1781

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines