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.198 by root, Tue Oct 4 22:25:14 2011 UTC vs.
Revision 1.203 by sf-exg, Fri Dec 2 09:03:43 2011 UTC

400=item confirm-paste 400=item confirm-paste
401 401
402Displays a confirmation dialog when a paste containing at least a full 402Displays a confirmation dialog when a paste containing at least a full
403line is detected. 403line is detected.
404 404
405=item bell-command
406
407Runs the command specified by the C<URxvt.bell-command> resource when
408a bell event occurs. For example, the following pops up a notification
409bubble with the text "Beep, Beep" using notify-send:
410
411 URxvt.bell-command: notify-send "Beep, Beep"
412
405=back 413=back
406 414
407=head1 API DOCUMENTATION 415=head1 API DOCUMENTATION
408 416
409=head2 General API Considerations 417=head2 General API Considerations
437 445
438=item $octets 446=item $octets
439 447
440Either binary data or - more common - a text string encoded in a 448Either binary data or - more common - a text string encoded in a
441locale-specific way. 449locale-specific way.
450
451=item $keysym
452
453an integer that is a valid X11 keysym code. You can convert a string
454into a keysym and viceversa by using C<XStringToKeysym> and
455C<XKeysymToString>.
442 456
443=back 457=back
444 458
445=head2 Extension Objects 459=head2 Extension Objects
446 460
657a C<perl:string> action bound to a key, see description of the B<keysym> 671a C<perl:string> action bound to a key, see description of the B<keysym>
658resource in the @@RXVT_NAME@@(1) manpage). 672resource in the @@RXVT_NAME@@(1) manpage).
659 673
660The event is simply the action string. This interface is assumed to change 674The event is simply the action string. This interface is assumed to change
661slightly in the future. 675slightly in the future.
676
677=item on_register_command $term, $keysym, $modifiermask, $string
678
679Called after parsing a keysym resource but before registering the
680associated binding. If this hook returns TRUE the binding is not
681registered. It can be used to modify a binding by calling
682C<register_command>.
662 683
663=item on_resize_all_windows $term, $new_width, $new_height 684=item on_resize_all_windows $term, $new_width, $new_height
664 685
665Called just after the new window size has been calculated, but before 686Called just after the new window size has been calculated, but before
666windows are actually being resized or hints are being set. If this hook 687windows are actually being resized or hints are being set. If this hook
967sub invoke { 988sub invoke {
968 local $TERM = shift; 989 local $TERM = shift;
969 my $htype = shift; 990 my $htype = shift;
970 991
971 if ($htype == 0) { # INIT 992 if ($htype == 0) { # INIT
972 my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); 993 my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$ENV{HOME}/.urxvt/ext", "$LIBDIR/perl");
973 994
974 my %ext_arg; 995 my %ext_arg;
975 996
976 { 997 {
977 my @init = @TERM_INIT; 998 my @init = @TERM_INIT;
1374 1395
1375This method should only be called during the C<on_start> hook, as there is 1396This method should only be called during the C<on_start> hook, as there is
1376only one resource database per display, and later invocations might return 1397only one resource database per display, and later invocations might return
1377the wrong resources. 1398the wrong resources.
1378 1399
1379=item $success = $term->parse_keysym ($keysym_spec, $command_string) 1400=item $success = $term->parse_keysym ($key, $octets)
1380 1401
1381Adds a keymap translation exactly as specified via a resource. See the 1402Adds a key binding exactly as specified via a resource. See the
1382C<keysym> resource in the @@RXVT_NAME@@(1) manpage. 1403C<keysym> resource in the @@RXVT_NAME@@(1) manpage.
1404
1405=item $term->register_command ($keysym, $modifiermask, $string)
1406
1407Adds a key binding. This is a lower level api compared to
1408C<parse_keysym>, as it expects a parsed key description, and can be
1409used only inside either the C<on_init> hook, to add a binding, or the
1410C<on_register_command> hook, to modify a parsed binding.
1383 1411
1384=item $rend = $term->rstyle ([$new_rstyle]) 1412=item $rend = $term->rstyle ([$new_rstyle])
1385 1413
1386Return and optionally change the current rendition. Text that is output by 1414Return and optionally change the current rendition. Text that is output by
1387the terminal application will use this style. 1415the terminal application will use this style.
1925=item $term->XMoveResizeWindow ($window, $x, $y, $width, $height) 1953=item $term->XMoveResizeWindow ($window, $x, $y, $width, $height)
1926 1954
1927=item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y) 1955=item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y)
1928 1956
1929=item $term->XChangeInput ($window, $add_events[, $del_events]) 1957=item $term->XChangeInput ($window, $add_events[, $del_events])
1958
1959=item $keysym = $term->XStringToKeysym ($string)
1960
1961=item $string = $term->XKeysymToString ($keysym)
1930 1962
1931Various X or X-related functions. The C<$term> object only serves as 1963Various X or X-related functions. The C<$term> object only serves as
1932the source of the display, otherwise those functions map more-or-less 1964the source of the display, otherwise those functions map more-or-less
1933directly onto the X functions of the same name. 1965directly onto the X functions of the same name.
1934 1966

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines