… | |
… | |
400 | =item confirm-paste |
400 | =item confirm-paste |
401 | |
401 | |
402 | Displays a confirmation dialog when a paste containing at least a full |
402 | Displays a confirmation dialog when a paste containing at least a full |
403 | line is detected. |
403 | line is detected. |
404 | |
404 | |
|
|
405 | =item bell-command |
|
|
406 | |
|
|
407 | Runs the command specified by the C<URxvt.bell-command> resource when |
|
|
408 | a bell event occurs. For example, the following pops up a notification |
|
|
409 | bubble 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 | |
440 | Either binary data or - more common - a text string encoded in a |
448 | Either binary data or - more common - a text string encoded in a |
441 | locale-specific way. |
449 | locale-specific way. |
|
|
450 | |
|
|
451 | =item $keysym |
|
|
452 | |
|
|
453 | an integer that is a valid X11 keysym code. You can convert a string |
|
|
454 | into a keysym and viceversa by using C<XStringToKeysym> and |
|
|
455 | C<XKeysymToString>. |
442 | |
456 | |
443 | =back |
457 | =back |
444 | |
458 | |
445 | =head2 Extension Objects |
459 | =head2 Extension Objects |
446 | |
460 | |
… | |
… | |
657 | a C<perl:string> action bound to a key, see description of the B<keysym> |
671 | a C<perl:string> action bound to a key, see description of the B<keysym> |
658 | resource in the @@RXVT_NAME@@(1) manpage). |
672 | resource in the @@RXVT_NAME@@(1) manpage). |
659 | |
673 | |
660 | The event is simply the action string. This interface is assumed to change |
674 | The event is simply the action string. This interface is assumed to change |
661 | slightly in the future. |
675 | slightly in the future. |
|
|
676 | |
|
|
677 | =item on_register_command $term, $keysym, $modifiermask, $string |
|
|
678 | |
|
|
679 | Called after parsing a keysym resource but before registering the |
|
|
680 | associated binding. If this hook returns TRUE the binding is not |
|
|
681 | registered. It can be used to modify a binding by calling |
|
|
682 | C<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 | |
665 | Called just after the new window size has been calculated, but before |
686 | Called just after the new window size has been calculated, but before |
666 | windows are actually being resized or hints are being set. If this hook |
687 | windows are actually being resized or hints are being set. If this hook |
… | |
… | |
967 | sub invoke { |
988 | sub 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 | |
1375 | This method should only be called during the C<on_start> hook, as there is |
1396 | This method should only be called during the C<on_start> hook, as there is |
1376 | only one resource database per display, and later invocations might return |
1397 | only one resource database per display, and later invocations might return |
1377 | the wrong resources. |
1398 | the wrong resources. |
1378 | |
1399 | |
1379 | =item $success = $term->parse_keysym ($keysym_spec, $command_string) |
1400 | =item $success = $term->parse_keysym ($key, $octets) |
1380 | |
1401 | |
1381 | Adds a keymap translation exactly as specified via a resource. See the |
1402 | Adds a key binding exactly as specified via a resource. See the |
1382 | C<keysym> resource in the @@RXVT_NAME@@(1) manpage. |
1403 | C<keysym> resource in the @@RXVT_NAME@@(1) manpage. |
|
|
1404 | |
|
|
1405 | =item $term->register_command ($keysym, $modifiermask, $string) |
|
|
1406 | |
|
|
1407 | Adds a key binding. This is a lower level api compared to |
|
|
1408 | C<parse_keysym>, as it expects a parsed key description, and can be |
|
|
1409 | used only inside either the C<on_init> hook, to add a binding, or the |
|
|
1410 | C<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 | |
1386 | Return and optionally change the current rendition. Text that is output by |
1414 | Return and optionally change the current rendition. Text that is output by |
1387 | the terminal application will use this style. |
1415 | the 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 | |
1931 | Various X or X-related functions. The C<$term> object only serves as |
1963 | Various X or X-related functions. The C<$term> object only serves as |
1932 | the source of the display, otherwise those functions map more-or-less |
1964 | the source of the display, otherwise those functions map more-or-less |
1933 | directly onto the X functions of the same name. |
1965 | directly onto the X functions of the same name. |
1934 | |
1966 | |