… | |
… | |
50 | #undef LINENO |
50 | #undef LINENO |
51 | #define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) |
51 | #define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) |
52 | #undef ROW |
52 | #undef ROW |
53 | #define ROW(n) THIS->row_buf [LINENO (n)] |
53 | #define ROW(n) THIS->row_buf [LINENO (n)] |
54 | |
54 | |
55 | #define ENABLE_PERL_FRILLS 1 |
55 | typedef int CHAINED UNUSED; |
56 | |
56 | |
57 | ///////////////////////////////////////////////////////////////////////////// |
57 | ///////////////////////////////////////////////////////////////////////////// |
58 | |
58 | |
59 | static wchar_t * |
59 | static wchar_t * |
60 | sv2wcs (SV *sv) |
60 | sv2wcs (SV *sv) |
… | |
… | |
118 | #define newSVterm(term) SvREFCNT_inc ((SV *)term->perl.self) |
118 | #define newSVterm(term) SvREFCNT_inc ((SV *)term->perl.self) |
119 | #define SvTERM(sv) (rxvt_term *)SvPTR (sv, "urxvt::term") |
119 | #define SvTERM(sv) (rxvt_term *)SvPTR (sv, "urxvt::term") |
120 | |
120 | |
121 | ///////////////////////////////////////////////////////////////////////////// |
121 | ///////////////////////////////////////////////////////////////////////////// |
122 | |
122 | |
|
|
123 | #define SvWATCHER(sv) (perl_watcher *)SvPTR (sv, "urxvt::watcher") |
|
|
124 | |
123 | struct perl_watcher |
125 | struct perl_watcher |
124 | { |
126 | { |
125 | SV *cbsv; |
127 | SV *cbsv; |
126 | HV *self; |
128 | HV *self; |
127 | |
129 | |
128 | perl_watcher () |
130 | perl_watcher () |
129 | : cbsv (newSV (0)) |
131 | : cbsv (0) |
130 | { |
132 | { |
131 | } |
133 | } |
132 | |
134 | |
133 | ~perl_watcher () |
135 | ~perl_watcher () |
134 | { |
136 | { |
135 | SvREFCNT_dec (cbsv); |
137 | SvREFCNT_dec (cbsv); |
136 | } |
138 | } |
137 | |
139 | |
138 | void cb (SV *cb) |
140 | void cb (SV *cb) |
139 | { |
141 | { |
140 | sv_setsv (cbsv, cb); |
142 | SvREFCNT_dec (cbsv); |
|
|
143 | cbsv = newSVsv (cb); |
141 | } |
144 | } |
142 | |
145 | |
143 | void invoke (const char *type, SV *self, int arg = -1); |
146 | void invoke (const char *type, SV *self, int arg = -1); |
144 | }; |
147 | }; |
145 | |
148 | |
… | |
… | |
169 | if (SvTRUE (ERRSV)) |
172 | if (SvTRUE (ERRSV)) |
170 | rxvt_warn ("%s callback evaluation error: %s", type, SvPV_nolen (ERRSV)); |
173 | rxvt_warn ("%s callback evaluation error: %s", type, SvPV_nolen (ERRSV)); |
171 | } |
174 | } |
172 | |
175 | |
173 | #define newSVtimer(timer) new_ref (timer->self, "urxvt::timer") |
176 | #define newSVtimer(timer) new_ref (timer->self, "urxvt::timer") |
174 | #define SvTIMER(sv) (timer *)SvPTR (sv, "urxvt::timer") |
177 | #define SvTIMER(sv) (timer *)(perl_watcher *)SvPTR (sv, "urxvt::timer") |
175 | |
178 | |
176 | struct timer : time_watcher, perl_watcher |
179 | struct timer : perl_watcher, time_watcher |
177 | { |
180 | { |
178 | tstamp interval; |
181 | tstamp interval; |
179 | |
182 | |
180 | timer () |
183 | timer () |
181 | : time_watcher (this, &timer::execute) |
184 | : time_watcher (this, &timer::execute) |
… | |
… | |
190 | invoke ("urxvt::timer", newSVtimer (this)); |
193 | invoke ("urxvt::timer", newSVtimer (this)); |
191 | } |
194 | } |
192 | }; |
195 | }; |
193 | |
196 | |
194 | #define newSViow(iow) new_ref (iow->self, "urxvt::iow") |
197 | #define newSViow(iow) new_ref (iow->self, "urxvt::iow") |
195 | #define SvIOW(sv) (iow *)SvPTR (sv, "urxvt::iow") |
198 | #define SvIOW(sv) (iow *)(perl_watcher *)SvPTR (sv, "urxvt::iow") |
196 | |
199 | |
197 | struct iow : io_watcher, perl_watcher |
200 | struct iow : perl_watcher, io_watcher |
198 | { |
201 | { |
199 | iow () |
202 | iow () |
200 | : io_watcher (this, &iow::execute) |
203 | : io_watcher (this, &iow::execute) |
201 | { |
204 | { |
202 | } |
205 | } |
203 | |
206 | |
204 | void execute (io_watcher &w, short revents) |
207 | void execute (io_watcher &w, short revents) |
205 | { |
208 | { |
206 | invoke ("urxvt::iow", newSViow (this), revents); |
209 | invoke ("urxvt::iow", newSViow (this), revents); |
|
|
210 | } |
|
|
211 | }; |
|
|
212 | |
|
|
213 | #define newSViw(iw) new_ref (iw->self, "urxvt::iw") |
|
|
214 | #define SvIW(sv) (iw *)(perl_watcher *)SvPTR (sv, "urxvt::iw") |
|
|
215 | |
|
|
216 | struct iw : perl_watcher, idle_watcher |
|
|
217 | { |
|
|
218 | iw () |
|
|
219 | : idle_watcher (this, &iw::execute) |
|
|
220 | { |
|
|
221 | } |
|
|
222 | |
|
|
223 | void execute (idle_watcher &w) |
|
|
224 | { |
|
|
225 | invoke ("urxvt::iw", newSViw (this)); |
|
|
226 | } |
|
|
227 | }; |
|
|
228 | |
|
|
229 | #define newSVpw(pw) new_ref (pw->self, "urxvt::pw") |
|
|
230 | #define SvPW(sv) (pw *)(perl_watcher *)SvPTR (sv, "urxvt::pw") |
|
|
231 | |
|
|
232 | struct pw : perl_watcher, child_watcher |
|
|
233 | { |
|
|
234 | pw () |
|
|
235 | : child_watcher (this, &pw::execute) |
|
|
236 | { |
|
|
237 | } |
|
|
238 | |
|
|
239 | void execute (child_watcher &w, int status) |
|
|
240 | { |
|
|
241 | invoke ("urxvt::pw", newSVpw (this), status); |
207 | } |
242 | } |
208 | }; |
243 | }; |
209 | |
244 | |
210 | ///////////////////////////////////////////////////////////////////////////// |
245 | ///////////////////////////////////////////////////////////////////////////// |
211 | |
246 | |
… | |
… | |
913 | RETVAL |
948 | RETVAL |
914 | |
949 | |
915 | void |
950 | void |
916 | rxvt_term::destroy () |
951 | rxvt_term::destroy () |
917 | |
952 | |
918 | #if ENABLE_PERL_FRILLS |
|
|
919 | |
|
|
920 | void |
|
|
921 | rxvt_term::XListProperties (U32 window) |
|
|
922 | PPCODE: |
|
|
923 | { |
|
|
924 | int count; |
|
|
925 | Atom *props = XListProperties (THIS->display->display, (Window)window, &count); |
|
|
926 | |
|
|
927 | EXTEND (SP, count); |
|
|
928 | while (count--) |
|
|
929 | PUSHs (newSVuv ((U32)props [count])); |
|
|
930 | |
|
|
931 | XFree (props); |
|
|
932 | } |
|
|
933 | |
|
|
934 | void |
|
|
935 | rxvt_term::XGetWindowProperty (U32 window, U32 property) |
|
|
936 | PPCODE: |
|
|
937 | { |
|
|
938 | Atom type; |
|
|
939 | int format; |
|
|
940 | unsigned long nitems; |
|
|
941 | unsigned long bytes_after; |
|
|
942 | unsigned char *prop; |
|
|
943 | XGetWindowProperty (THIS->display->display, (Window)window, (Atom)property, |
|
|
944 | 0, 1<<30, 0, AnyPropertyType, |
|
|
945 | &type, &format, &nitems, &bytes_after, &prop); |
|
|
946 | if (type != None) |
|
|
947 | { |
|
|
948 | EXTEND (SP, 3); |
|
|
949 | PUSHs (newSVuv ((U32)type)); |
|
|
950 | PUSHs (newSViv (format)); |
|
|
951 | PUSHs (newSVpvn ((char *)prop, nitems * format / 8)); |
|
|
952 | XFree (prop); |
|
|
953 | } |
|
|
954 | } |
|
|
955 | |
|
|
956 | void |
|
|
957 | rxvt_term::XChangeWindowProperty (U32 window, U32 property, U32 type, int format, SV *data) |
|
|
958 | CODE: |
|
|
959 | { |
|
|
960 | STRLEN len; |
|
|
961 | char *data_ = SvPVbyte (data, len); |
|
|
962 | |
|
|
963 | XChangeProperty (THIS->display->display, (Window)window, (Atom)property, |
|
|
964 | type, format, PropModeReplace, |
|
|
965 | (unsigned char *)data, len * 8 / format); |
|
|
966 | } |
|
|
967 | |
|
|
968 | void |
|
|
969 | rxvt_term::XDeleteProperty (U32 window, U32 property) |
|
|
970 | CODE: |
|
|
971 | XDeleteProperty (THIS->display->display, (Window)window, (Atom)property); |
|
|
972 | |
|
|
973 | U32 |
|
|
974 | rxvt_term::DefaultRootWindow () |
|
|
975 | CODE: |
|
|
976 | RETVAL = (U32)THIS->display->root; |
|
|
977 | OUTPUT: |
|
|
978 | RETVAL |
|
|
979 | |
|
|
980 | U32 |
|
|
981 | rxvt_term::XCreateSimpleWindow (U32 parent, int x, int y, unsigned int width, unsigned int height) |
|
|
982 | CODE: |
|
|
983 | RETVAL = XCreateSimpleWindow (THIS->display->display, (Window)parent, |
|
|
984 | x, y, width, height, 0, |
|
|
985 | THIS->pix_colors_focused[Color_border], |
|
|
986 | THIS->pix_colors_focused[Color_border]); |
|
|
987 | OUTPUT: |
|
|
988 | RETVAL |
|
|
989 | |
|
|
990 | void |
|
|
991 | rxvt_term::XReparentWindow (U32 window, U32 parent, int x = 0, int y = 0) |
|
|
992 | CODE: |
|
|
993 | XReparentWindow (THIS->display->display, (Window)window, (Window)parent, x, y); |
|
|
994 | |
|
|
995 | void |
|
|
996 | rxvt_term::XMapWindow (U32 window) |
|
|
997 | CODE: |
|
|
998 | XMapWindow (THIS->display->display, (Window)window); |
|
|
999 | |
|
|
1000 | void |
|
|
1001 | rxvt_term::XUnmapWindow (U32 window) |
|
|
1002 | CODE: |
|
|
1003 | XUnmapWindow (THIS->display->display, (Window)window); |
|
|
1004 | |
|
|
1005 | #endif |
|
|
1006 | |
|
|
1007 | void |
953 | void |
1008 | rxvt_term::set_should_invoke (int htype, int inc) |
954 | rxvt_term::set_should_invoke (int htype, int inc) |
1009 | CODE: |
955 | CODE: |
1010 | THIS->perl.should_invoke [htype] += inc; |
956 | THIS->perl.should_invoke [htype] += inc; |
1011 | |
957 | |
… | |
… | |
1015 | XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, |
961 | XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, |
1016 | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, |
962 | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, |
1017 | GrabModeSync, GrabModeSync, None, GRAB_CURSOR); |
963 | GrabModeSync, GrabModeSync, None, GRAB_CURSOR); |
1018 | |
964 | |
1019 | bool |
965 | bool |
1020 | rxvt_term::grab (U32 eventtime, int sync = 0) |
966 | rxvt_term::grab (Time eventtime, int sync = 0) |
1021 | CODE: |
967 | CODE: |
1022 | { |
968 | { |
1023 | int mode = sync ? GrabModeSync : GrabModeAsync; |
969 | int mode = sync ? GrabModeSync : GrabModeAsync; |
1024 | |
970 | |
1025 | THIS->perl.grabtime = 0; |
971 | THIS->perl.grabtime = 0; |
… | |
… | |
1200 | if (events != EVENT_UNDEF) |
1146 | if (events != EVENT_UNDEF) |
1201 | THIS->pty_ev.set (events); |
1147 | THIS->pty_ev.set (events); |
1202 | OUTPUT: |
1148 | OUTPUT: |
1203 | RETVAL |
1149 | RETVAL |
1204 | |
1150 | |
1205 | U32 |
1151 | Window |
1206 | rxvt_term::parent () |
1152 | rxvt_term::parent () |
1207 | CODE: |
1153 | CODE: |
1208 | RETVAL = (U32)THIS->parent [0]; |
1154 | RETVAL = THIS->parent [0]; |
1209 | OUTPUT: |
1155 | OUTPUT: |
1210 | RETVAL |
1156 | RETVAL |
1211 | |
1157 | |
1212 | U32 |
1158 | Window |
1213 | rxvt_term::vt () |
1159 | rxvt_term::vt () |
1214 | CODE: |
1160 | CODE: |
1215 | RETVAL = (U32)THIS->vt; |
1161 | RETVAL = THIS->vt; |
1216 | OUTPUT: |
1162 | OUTPUT: |
1217 | RETVAL |
1163 | RETVAL |
1218 | |
1164 | |
1219 | void |
1165 | void |
1220 | rxvt_term::vt_emask_add (U32 emask) |
1166 | rxvt_term::vt_emask_add (U32 emask) |
… | |
… | |
1492 | if (set) |
1438 | if (set) |
1493 | THIS->options |= optval; |
1439 | THIS->options |= optval; |
1494 | else |
1440 | else |
1495 | THIS->options &= ~optval; |
1441 | THIS->options &= ~optval; |
1496 | |
1442 | |
|
|
1443 | if (THIS->check_ev.is_active ()) // avoid doing this before START |
1497 | switch (optval) |
1444 | switch (optval) |
1498 | { |
1445 | { |
1499 | case Opt_skipBuiltinGlyphs: |
1446 | case Opt_skipBuiltinGlyphs: |
1500 | THIS->set_fonts (); |
1447 | THIS->set_fonts (); |
1501 | THIS->scr_remap_chars (); |
1448 | THIS->scr_remap_chars (); |
1502 | THIS->scr_touch (true); |
1449 | THIS->scr_touch (true); |
1503 | THIS->want_refresh = 1; |
1450 | THIS->want_refresh = 1; |
1504 | break; |
1451 | break; |
1505 | |
1452 | |
1506 | case Opt_cursorUnderline: |
1453 | case Opt_cursorUnderline: |
1507 | THIS->want_refresh = 1; |
1454 | THIS->want_refresh = 1; |
1508 | break; |
1455 | break; |
1509 | |
1456 | |
1510 | # case Opt_scrollBar_floating: |
1457 | # case Opt_scrollBar_floating: |
1511 | # case Opt_scrollBar_right: |
1458 | # case Opt_scrollBar_right: |
1512 | # THIS->resize_all_windows (THIS->width, THIS->height, 1); |
1459 | # THIS->resize_all_windows (THIS->width, THIS->height, 1); |
1513 | # break; |
1460 | # break; |
1514 | } |
1461 | } |
1515 | } |
1462 | } |
1516 | } |
1463 | } |
1517 | OUTPUT: |
1464 | OUTPUT: |
1518 | RETVAL |
1465 | RETVAL |
1519 | |
1466 | |
… | |
… | |
1575 | |
1522 | |
1576 | #void |
1523 | #void |
1577 | #rxvt_term::selection_clear () |
1524 | #rxvt_term::selection_clear () |
1578 | |
1525 | |
1579 | void |
1526 | void |
1580 | rxvt_term::selection_make (U32 eventtime, bool rect = false) |
1527 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1581 | CODE: |
1528 | CODE: |
1582 | THIS->selection.op = SELECTION_CONT; |
1529 | THIS->selection.op = SELECTION_CONT; |
1583 | THIS->selection.rect = rect; |
1530 | THIS->selection.rect = rect; |
1584 | THIS->selection_make (eventtime); |
1531 | THIS->selection_make (eventtime); |
1585 | |
1532 | |
1586 | int |
1533 | int |
1587 | rxvt_term::selection_grab (U32 eventtime) |
1534 | rxvt_term::selection_grab (Time eventtime) |
1588 | |
1535 | |
1589 | void |
1536 | void |
1590 | rxvt_term::selection (SV *newtext = 0) |
1537 | rxvt_term::selection (SV *newtext = 0) |
1591 | PPCODE: |
1538 | PPCODE: |
1592 | { |
1539 | { |
… | |
… | |
1660 | o->self = (HV *)SvRV (RETVAL); |
1607 | o->self = (HV *)SvRV (RETVAL); |
1661 | } |
1608 | } |
1662 | OUTPUT: |
1609 | OUTPUT: |
1663 | RETVAL |
1610 | RETVAL |
1664 | |
1611 | |
|
|
1612 | ############################################################################# |
|
|
1613 | # Various X Utility Functions |
|
|
1614 | ############################################################################# |
|
|
1615 | |
|
|
1616 | void |
|
|
1617 | rxvt_term::XListProperties (Window window) |
|
|
1618 | PPCODE: |
|
|
1619 | { |
|
|
1620 | int count; |
|
|
1621 | Atom *props = XListProperties (THIS->display->display, window, &count); |
|
|
1622 | |
|
|
1623 | EXTEND (SP, count); |
|
|
1624 | while (count--) |
|
|
1625 | PUSHs (newSVuv ((U32)props [count])); |
|
|
1626 | |
|
|
1627 | XFree (props); |
|
|
1628 | } |
|
|
1629 | |
|
|
1630 | void |
|
|
1631 | rxvt_term::XGetWindowProperty (Window window, Atom property) |
|
|
1632 | PPCODE: |
|
|
1633 | { |
|
|
1634 | Atom type; |
|
|
1635 | int format; |
|
|
1636 | unsigned long nitems; |
|
|
1637 | unsigned long bytes_after; |
|
|
1638 | unsigned char *prop; |
|
|
1639 | XGetWindowProperty (THIS->display->display, window, property, |
|
|
1640 | 0, 1<<30, 0, AnyPropertyType, |
|
|
1641 | &type, &format, &nitems, &bytes_after, &prop); |
|
|
1642 | if (type != None) |
|
|
1643 | { |
|
|
1644 | EXTEND (SP, 3); |
|
|
1645 | PUSHs (newSVuv ((U32)type)); |
|
|
1646 | PUSHs (newSViv (format)); |
|
|
1647 | PUSHs (newSVpvn ((char *)prop, nitems * format / 8)); |
|
|
1648 | XFree (prop); |
|
|
1649 | } |
|
|
1650 | } |
|
|
1651 | |
|
|
1652 | void |
|
|
1653 | rxvt_term::XChangeWindowProperty (Window window, Atom property, Atom type, int format, SV *data) |
|
|
1654 | CODE: |
|
|
1655 | { |
|
|
1656 | STRLEN len; |
|
|
1657 | char *data_ = SvPVbyte (data, len); |
|
|
1658 | |
|
|
1659 | XChangeProperty (THIS->display->display, window, property, |
|
|
1660 | type, format, PropModeReplace, |
|
|
1661 | (unsigned char *)data, len * 8 / format); |
|
|
1662 | } |
|
|
1663 | |
|
|
1664 | void |
|
|
1665 | XDeleteProperty (rxvt_term *term, Window window, Atom property) |
|
|
1666 | C_ARGS: term->display->display, window, property |
|
|
1667 | |
|
|
1668 | Window |
|
|
1669 | rxvt_term::DefaultRootWindow () |
|
|
1670 | CODE: |
|
|
1671 | RETVAL = THIS->display->root; |
|
|
1672 | OUTPUT: |
|
|
1673 | RETVAL |
|
|
1674 | |
|
|
1675 | Window |
|
|
1676 | XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height) |
|
|
1677 | C_ARGS: term->display->display, (Window)parent, |
|
|
1678 | x, y, width, height, 0, |
|
|
1679 | term->pix_colors_focused[Color_border], |
|
|
1680 | term->pix_colors_focused[Color_border] |
|
|
1681 | |
|
|
1682 | void |
|
|
1683 | XReparentWindow (rxvt_term *term, Window window, Window parent, int x = 0, int y = 0) |
|
|
1684 | C_ARGS: term->display->display, window, parent, x, y |
|
|
1685 | |
|
|
1686 | void |
|
|
1687 | XMapWindow (rxvt_term *term, Window window) |
|
|
1688 | C_ARGS: term->display->display, window |
|
|
1689 | |
|
|
1690 | void |
|
|
1691 | XUnmapWindow (rxvt_term *term, Window window) |
|
|
1692 | C_ARGS: term->display->display, window |
|
|
1693 | |
|
|
1694 | void |
|
|
1695 | XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) |
|
|
1696 | C_ARGS: term->display->display, (Window)window, x, y, width, height |
|
|
1697 | |
|
|
1698 | ############################################################################# |
|
|
1699 | # urxvt::overlay |
|
|
1700 | ############################################################################# |
|
|
1701 | |
1665 | MODULE = urxvt PACKAGE = urxvt::overlay |
1702 | MODULE = urxvt PACKAGE = urxvt::overlay |
1666 | |
1703 | |
1667 | void |
1704 | void |
1668 | overlay::set (int x, int y, SV *text, SV *rend = 0) |
1705 | overlay::set (int x, int y, SV *text, SV *rend = 0) |
1669 | |
1706 | |
… | |
… | |
1673 | void |
1710 | void |
1674 | overlay::hide () |
1711 | overlay::hide () |
1675 | |
1712 | |
1676 | void |
1713 | void |
1677 | overlay::DESTROY () |
1714 | overlay::DESTROY () |
|
|
1715 | |
|
|
1716 | ############################################################################# |
|
|
1717 | # urxvt::watcher |
|
|
1718 | ############################################################################# |
|
|
1719 | |
|
|
1720 | MODULE = urxvt PACKAGE = urxvt::watcher |
|
|
1721 | |
|
|
1722 | CHAINED |
|
|
1723 | perl_watcher::cb (SV *cb) |
|
|
1724 | CODE: |
|
|
1725 | THIS->cb (cb); |
|
|
1726 | OUTPUT: |
|
|
1727 | RETVAL |
|
|
1728 | |
|
|
1729 | ############################################################################# |
|
|
1730 | # urxvt::timer |
|
|
1731 | ############################################################################# |
1678 | |
1732 | |
1679 | MODULE = urxvt PACKAGE = urxvt::timer |
1733 | MODULE = urxvt PACKAGE = urxvt::timer |
1680 | |
1734 | |
1681 | SV * |
1735 | SV * |
1682 | timer::new () |
1736 | timer::new () |
1683 | CODE: |
1737 | CODE: |
1684 | timer *w = new timer; |
1738 | timer *w = new timer; |
1685 | w->start (NOW); |
1739 | w->start (NOW); |
1686 | RETVAL = newSVptr ((void *)w, "urxvt::timer"); |
1740 | RETVAL = newSVptr ((void *)(perl_watcher *)w, "urxvt::timer"); |
1687 | w->self = (HV *)SvRV (RETVAL); |
1741 | w->self = (HV *)SvRV (RETVAL); |
1688 | OUTPUT: |
|
|
1689 | RETVAL |
|
|
1690 | |
|
|
1691 | timer * |
|
|
1692 | timer::cb (SV *cb) |
|
|
1693 | CODE: |
|
|
1694 | THIS->cb (cb); |
|
|
1695 | RETVAL = THIS; |
|
|
1696 | OUTPUT: |
1742 | OUTPUT: |
1697 | RETVAL |
1743 | RETVAL |
1698 | |
1744 | |
1699 | NV |
1745 | NV |
1700 | timer::at () |
1746 | timer::at () |
1701 | CODE: |
1747 | CODE: |
1702 | RETVAL = THIS->at; |
1748 | RETVAL = THIS->at; |
1703 | OUTPUT: |
1749 | OUTPUT: |
1704 | RETVAL |
1750 | RETVAL |
1705 | |
1751 | |
1706 | timer * |
1752 | CHAINED |
1707 | timer::interval (NV interval) |
1753 | timer::interval (NV interval) |
1708 | CODE: |
1754 | CODE: |
1709 | THIS->interval = interval; |
1755 | THIS->interval = interval; |
|
|
1756 | OUTPUT: |
1710 | RETVAL = THIS; |
1757 | RETVAL |
1711 | OUTPUT: |
|
|
1712 | RETVAL |
|
|
1713 | |
1758 | |
1714 | timer * |
1759 | CHAINED |
1715 | timer::set (NV tstamp) |
1760 | timer::set (NV tstamp) |
1716 | CODE: |
1761 | CODE: |
1717 | THIS->set (tstamp); |
1762 | THIS->set (tstamp); |
|
|
1763 | OUTPUT: |
1718 | RETVAL = THIS; |
1764 | RETVAL |
1719 | OUTPUT: |
|
|
1720 | RETVAL |
|
|
1721 | |
1765 | |
1722 | timer * |
1766 | CHAINED |
1723 | timer::start (NV tstamp = THIS->at) |
1767 | timer::start (NV tstamp = THIS->at) |
1724 | CODE: |
1768 | CODE: |
1725 | THIS->start (tstamp); |
1769 | THIS->start (tstamp); |
|
|
1770 | OUTPUT: |
1726 | RETVAL = THIS; |
1771 | RETVAL |
1727 | OUTPUT: |
|
|
1728 | RETVAL |
|
|
1729 | |
1772 | |
1730 | timer * |
1773 | CHAINED |
1731 | timer::after (NV delay) |
1774 | timer::after (NV delay) |
1732 | CODE: |
1775 | CODE: |
1733 | THIS->start (NOW + delay); |
1776 | THIS->start (NOW + delay); |
|
|
1777 | OUTPUT: |
1734 | RETVAL = THIS; |
1778 | RETVAL |
1735 | OUTPUT: |
|
|
1736 | RETVAL |
|
|
1737 | |
1779 | |
1738 | timer * |
1780 | CHAINED |
1739 | timer::stop () |
1781 | timer::stop () |
1740 | CODE: |
1782 | CODE: |
1741 | THIS->stop (); |
1783 | THIS->stop (); |
1742 | RETVAL = THIS; |
|
|
1743 | OUTPUT: |
1784 | OUTPUT: |
1744 | RETVAL |
1785 | RETVAL |
1745 | |
1786 | |
1746 | void |
1787 | void |
1747 | timer::DESTROY () |
1788 | timer::DESTROY () |
|
|
1789 | |
|
|
1790 | ############################################################################# |
|
|
1791 | # urxvt::iow |
|
|
1792 | ############################################################################# |
1748 | |
1793 | |
1749 | MODULE = urxvt PACKAGE = urxvt::iow |
1794 | MODULE = urxvt PACKAGE = urxvt::iow |
1750 | |
1795 | |
1751 | SV * |
1796 | SV * |
1752 | iow::new () |
1797 | iow::new () |
1753 | CODE: |
1798 | CODE: |
1754 | iow *w = new iow; |
1799 | iow *w = new iow; |
1755 | RETVAL = newSVptr ((void *)w, "urxvt::iow"); |
1800 | RETVAL = newSVptr ((void *)(perl_watcher *)w, "urxvt::iow"); |
1756 | w->self = (HV *)SvRV (RETVAL); |
1801 | w->self = (HV *)SvRV (RETVAL); |
1757 | OUTPUT: |
1802 | OUTPUT: |
1758 | RETVAL |
1803 | RETVAL |
1759 | |
1804 | |
1760 | iow * |
1805 | CHAINED |
1761 | iow::cb (SV *cb) |
|
|
1762 | CODE: |
|
|
1763 | THIS->cb (cb); |
|
|
1764 | RETVAL = THIS; |
|
|
1765 | OUTPUT: |
|
|
1766 | RETVAL |
|
|
1767 | |
|
|
1768 | iow * |
|
|
1769 | iow::fd (int fd) |
1806 | iow::fd (int fd) |
1770 | CODE: |
1807 | CODE: |
1771 | THIS->fd = fd; |
1808 | THIS->fd = fd; |
|
|
1809 | OUTPUT: |
1772 | RETVAL = THIS; |
1810 | RETVAL |
1773 | OUTPUT: |
|
|
1774 | RETVAL |
|
|
1775 | |
1811 | |
1776 | iow * |
1812 | CHAINED |
1777 | iow::events (short events) |
1813 | iow::events (short events) |
1778 | CODE: |
1814 | CODE: |
1779 | THIS->events = events; |
1815 | THIS->events = events; |
|
|
1816 | OUTPUT: |
1780 | RETVAL = THIS; |
1817 | RETVAL |
1781 | OUTPUT: |
|
|
1782 | RETVAL |
|
|
1783 | |
1818 | |
1784 | iow * |
1819 | CHAINED |
1785 | iow::start () |
1820 | iow::start () |
1786 | CODE: |
1821 | CODE: |
1787 | THIS->start (); |
1822 | THIS->start (); |
|
|
1823 | OUTPUT: |
1788 | RETVAL = THIS; |
1824 | RETVAL |
1789 | OUTPUT: |
|
|
1790 | RETVAL |
|
|
1791 | |
1825 | |
1792 | iow * |
1826 | CHAINED |
1793 | iow::stop () |
1827 | iow::stop () |
1794 | CODE: |
1828 | CODE: |
1795 | THIS->stop (); |
1829 | THIS->stop (); |
1796 | RETVAL = THIS; |
|
|
1797 | OUTPUT: |
1830 | OUTPUT: |
1798 | RETVAL |
1831 | RETVAL |
1799 | |
1832 | |
1800 | void |
1833 | void |
1801 | iow::DESTROY () |
1834 | iow::DESTROY () |
1802 | |
1835 | |
|
|
1836 | ############################################################################# |
|
|
1837 | # urxvt::iw |
|
|
1838 | ############################################################################# |
1803 | |
1839 | |
|
|
1840 | MODULE = urxvt PACKAGE = urxvt::iw |
|
|
1841 | |
|
|
1842 | SV * |
|
|
1843 | iw::new () |
|
|
1844 | CODE: |
|
|
1845 | iw *w = new iw; |
|
|
1846 | RETVAL = newSVptr ((void *)(perl_watcher *)w, "urxvt::iw"); |
|
|
1847 | w->self = (HV *)SvRV (RETVAL); |
|
|
1848 | OUTPUT: |
|
|
1849 | RETVAL |
|
|
1850 | |
|
|
1851 | CHAINED |
|
|
1852 | iow::start () |
|
|
1853 | CODE: |
|
|
1854 | THIS->start (); |
|
|
1855 | OUTPUT: |
|
|
1856 | RETVAL |
|
|
1857 | |
|
|
1858 | CHAINED |
|
|
1859 | iow::stop () |
|
|
1860 | CODE: |
|
|
1861 | THIS->stop (); |
|
|
1862 | OUTPUT: |
|
|
1863 | RETVAL |
|
|
1864 | |
|
|
1865 | void |
|
|
1866 | iw::DESTROY () |
|
|
1867 | |
|
|
1868 | ############################################################################# |
|
|
1869 | # urxvt::pw |
|
|
1870 | ############################################################################# |
|
|
1871 | |
|
|
1872 | MODULE = urxvt PACKAGE = urxvt::pw |
|
|
1873 | |
|
|
1874 | SV * |
|
|
1875 | pw::new () |
|
|
1876 | CODE: |
|
|
1877 | pw *w = new pw; |
|
|
1878 | RETVAL = newSVptr ((void *)(perl_watcher *)w, "urxvt::pw"); |
|
|
1879 | w->self = (HV *)SvRV (RETVAL); |
|
|
1880 | OUTPUT: |
|
|
1881 | RETVAL |
|
|
1882 | |
|
|
1883 | CHAINED |
|
|
1884 | pw::start (int pid) |
|
|
1885 | CODE: |
|
|
1886 | THIS->start (pid); |
|
|
1887 | OUTPUT: |
|
|
1888 | RETVAL |
|
|
1889 | |
|
|
1890 | CHAINED |
|
|
1891 | iow::stop () |
|
|
1892 | CODE: |
|
|
1893 | THIS->stop (); |
|
|
1894 | OUTPUT: |
|
|
1895 | RETVAL |
|
|
1896 | |
|
|
1897 | void |
|
|
1898 | pw::DESTROY () |
|
|
1899 | |
|
|
1900 | |