… | |
… | |
490 | |
490 | |
491 | C<on_key_press> additionally receives the string rxvt-unicode would |
491 | C<on_key_press> additionally receives the string rxvt-unicode would |
492 | output, if any, in locale-specific encoding. |
492 | output, if any, in locale-specific encoding. |
493 | |
493 | |
494 | subwindow. |
494 | subwindow. |
|
|
495 | |
|
|
496 | =item on_client_message $term, $event |
|
|
497 | |
|
|
498 | =item on_wm_protocols $term, $event |
|
|
499 | |
|
|
500 | =item on_wm_delete_window $term, $event |
|
|
501 | |
|
|
502 | Called when various types of ClientMessage events are received (all with |
|
|
503 | format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW). |
495 | |
504 | |
496 | =back |
505 | =back |
497 | |
506 | |
498 | =cut |
507 | =cut |
499 | |
508 | |
… | |
… | |
1790 | |
1799 | |
1791 | Stop watching for events on the given filehandle. |
1800 | Stop watching for events on the given filehandle. |
1792 | |
1801 | |
1793 | =back |
1802 | =back |
1794 | |
1803 | |
|
|
1804 | =head2 The C<urxvt::iw> Class |
|
|
1805 | |
|
|
1806 | This class implements idle watchers, that get called automatically when |
|
|
1807 | the process is idle. They should return as fast as possible, after doing |
|
|
1808 | some useful work. |
|
|
1809 | |
|
|
1810 | =over 4 |
|
|
1811 | |
|
|
1812 | =item $iw = new urxvt::iw |
|
|
1813 | |
|
|
1814 | Create a new idle watcher object in stopped state. |
|
|
1815 | |
|
|
1816 | =item $iw = $iw->cb (sub { my ($iw) = @_; ... }) |
|
|
1817 | |
|
|
1818 | Set the callback to be called when the watcher triggers. |
|
|
1819 | |
|
|
1820 | =item $timer = $timer->start |
|
|
1821 | |
|
|
1822 | Start the watcher. |
|
|
1823 | |
|
|
1824 | =item $timer = $timer->stop |
|
|
1825 | |
|
|
1826 | Stop the watcher. |
|
|
1827 | |
|
|
1828 | =back |
|
|
1829 | |
|
|
1830 | =head2 The C<urxvt::pw> Class |
|
|
1831 | |
|
|
1832 | This class implements process watchers. They create an event whenever a |
|
|
1833 | process exits, after which they stop automatically. |
|
|
1834 | |
|
|
1835 | my $pid = fork; |
|
|
1836 | ... |
|
|
1837 | $term->{pw} = urxvt::pw |
|
|
1838 | ->new |
|
|
1839 | ->start ($pid) |
|
|
1840 | ->cb (sub { |
|
|
1841 | my ($pw, $exit_status) = @_; |
|
|
1842 | ... |
|
|
1843 | }); |
|
|
1844 | |
|
|
1845 | =over 4 |
|
|
1846 | |
|
|
1847 | =item $pw = new urxvt::pw |
|
|
1848 | |
|
|
1849 | Create a new process watcher in stopped state. |
|
|
1850 | |
|
|
1851 | =item $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... }) |
|
|
1852 | |
|
|
1853 | Set the callback to be called when the timer triggers. |
|
|
1854 | |
|
|
1855 | =item $pw = $timer->start ($pid) |
|
|
1856 | |
|
|
1857 | Tells the wqtcher to start watching for process C<$pid>. |
|
|
1858 | |
|
|
1859 | =item $pw = $pw->stop |
|
|
1860 | |
|
|
1861 | Stop the watcher. |
|
|
1862 | |
|
|
1863 | =back |
|
|
1864 | |
1795 | =head1 ENVIRONMENT |
1865 | =head1 ENVIRONMENT |
1796 | |
1866 | |
1797 | =head2 URXVT_PERL_VERBOSITY |
1867 | =head2 URXVT_PERL_VERBOSITY |
1798 | |
1868 | |
1799 | This variable controls the verbosity level of the perl extension. Higher |
1869 | This variable controls the verbosity level of the perl extension. Higher |