ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.113 by root, Fri Jan 20 10:27:08 2006 UTC vs.
Revision 1.119 by root, Fri Jan 20 18:59:31 2006 UTC

91 91
92=item selection-popup (enabled by default) 92=item selection-popup (enabled by default)
93 93
94Binds a popup menu to Ctrl-Button3 that lets you convert the selection 94Binds a popup menu to Ctrl-Button3 that lets you convert the selection
95text into various other formats/action (such as uri unescaping, perl 95text into various other formats/action (such as uri unescaping, perl
96evalution, web-browser starting etc.), depending on content. 96evaluation, web-browser starting etc.), depending on content.
97 97
98Other extensions can extend this popup menu by pushing a code reference 98Other extensions can extend this popup menu by pushing a code reference
99onto C<@{ $term->{selection_popup_hook} }>, that is called whenever the 99onto C<@{ $term->{selection_popup_hook} }>, that is called whenever the
100popup is displayed. 100popup is displayed.
101 101
162 162
163The first line tells the selection code to treat the unchanging part of 163The first line tells the selection code to treat the unchanging part of
164every error message as a selection pattern, and the second line transforms 164every error message as a selection pattern, and the second line transforms
165the message into vi commands to load the file. 165the message into vi commands to load the file.
166 166
167=item tabbed
168
169This transforms the terminal into a tabbar with additional terminals, that
170is, it implements what is commonly refered to as "tabbed terminal". The topmost line
171displays a "[NEW]" button, which, when clicked, will add a new tab, followed by one
172button per tab.
173
174Clicking a button will activate that tab. Pressing B<Shift-Left> and
175B<Shift-Right> will switch to the tab left or right of the current one,
176while B<Shift-Down> creates a new tab.
177
167=item mark-urls 178=item mark-urls
168 179
169Uses per-line display filtering (C<on_line_update>) to underline urls and 180Uses per-line display filtering (C<on_line_update>) to underline urls and
170make them clickable. When middle-clicked, the program specified in the 181make them clickable. When middle-clicked, the program specified in the
171resource C<urlLauncher> (default C<x-www-browser>) will be started with 182resource C<urlLauncher> (default C<x-www-browser>) will be started with
465Called wheneever the window loses keyboard focus, before rxvt-unicode does 476Called wheneever the window loses keyboard focus, before rxvt-unicode does
466focus out processing. 477focus out processing.
467 478
468=item on_configure_notify $term, $event 479=item on_configure_notify $term, $event
469 480
481=item on_property_notify $term, $event
482
470=item on_key_press $term, $event, $keysym, $octets 483=item on_key_press $term, $event, $keysym, $octets
471 484
472=item on_key_release $term, $event, $keysym 485=item on_key_release $term, $event, $keysym
473 486
474=item on_button_press $term, $event 487=item on_button_press $term, $event
490 503
491C<on_key_press> additionally receives the string rxvt-unicode would 504C<on_key_press> additionally receives the string rxvt-unicode would
492output, if any, in locale-specific encoding. 505output, if any, in locale-specific encoding.
493 506
494subwindow. 507subwindow.
508
509=item on_client_message $term, $event
510
511=item on_wm_protocols $term, $event
512
513=item on_wm_delete_window $term, $event
514
515Called when various types of ClientMessage events are received (all with
516format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW).
495 517
496=back 518=back
497 519
498=cut 520=cut
499 521
1546 1568
1547Calls XUngrab for the most recent grab. Is called automatically on 1569Calls XUngrab for the most recent grab. Is called automatically on
1548evaluation errors, as it is better to lose the grab in the error case as 1570evaluation errors, as it is better to lose the grab in the error case as
1549the session. 1571the session.
1550 1572
1573=item $atom = $term->XInternAtom ($atom_name[, $only_if_exists])
1574
1575=item $atom_name = $term->XGetAtomName ($atom)
1576
1577=item @atoms = $term->XListProperties ($window)
1578
1579=item ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property)
1580
1581=item $term->XChangeWindowProperty ($window, $property, $type, $format, $octets)
1582
1583=item $term->XDeleteProperty ($window, $property)
1584
1585=item $window = $term->DefaultRootWindow
1586
1587=item $term->XReparentWindow ($window, $parent, [$x, $y])
1588
1589=item $term->XMapWindow ($window)
1590
1591=item $term->XUnmapWindow ($window)
1592
1593=item $term->XMoveResizeWindow ($window, $x, $y, $width, $height)
1594
1595=item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y)
1596
1597=item $term->XChangeInput ($window, $add_events[, $del_events])
1598
1599Various X or X-related functions. The C<$term> object only serves as
1600the source of the display, otherwise those functions map more-or-less
1601directory onto the X functions of the same name.
1602
1551=back 1603=back
1552 1604
1553=cut 1605=cut
1554 1606
1555package urxvt::popup; 1607package urxvt::popup;
1790 1842
1791Stop watching for events on the given filehandle. 1843Stop watching for events on the given filehandle.
1792 1844
1793=back 1845=back
1794 1846
1847=head2 The C<urxvt::iw> Class
1848
1849This class implements idle watchers, that get called automatically when
1850the process is idle. They should return as fast as possible, after doing
1851some useful work.
1852
1853=over 4
1854
1855=item $iw = new urxvt::iw
1856
1857Create a new idle watcher object in stopped state.
1858
1859=item $iw = $iw->cb (sub { my ($iw) = @_; ... })
1860
1861Set the callback to be called when the watcher triggers.
1862
1863=item $timer = $timer->start
1864
1865Start the watcher.
1866
1867=item $timer = $timer->stop
1868
1869Stop the watcher.
1870
1871=back
1872
1873=head2 The C<urxvt::pw> Class
1874
1875This class implements process watchers. They create an event whenever a
1876process exits, after which they stop automatically.
1877
1878 my $pid = fork;
1879 ...
1880 $term->{pw} = urxvt::pw
1881 ->new
1882 ->start ($pid)
1883 ->cb (sub {
1884 my ($pw, $exit_status) = @_;
1885 ...
1886 });
1887
1888=over 4
1889
1890=item $pw = new urxvt::pw
1891
1892Create a new process watcher in stopped state.
1893
1894=item $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... })
1895
1896Set the callback to be called when the timer triggers.
1897
1898=item $pw = $timer->start ($pid)
1899
1900Tells the wqtcher to start watching for process C<$pid>.
1901
1902=item $pw = $pw->stop
1903
1904Stop the watcher.
1905
1906=back
1907
1795=head1 ENVIRONMENT 1908=head1 ENVIRONMENT
1796 1909
1797=head2 URXVT_PERL_VERBOSITY 1910=head2 URXVT_PERL_VERBOSITY
1798 1911
1799This variable controls the verbosity level of the perl extension. Higher 1912This variable controls the verbosity level of the perl extension. Higher

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines