… | |
… | |
446 | =item $octets |
446 | =item $octets |
447 | |
447 | |
448 | 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 |
449 | locale-specific way. |
449 | locale-specific way. |
450 | |
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>. |
|
|
456 | |
451 | =back |
457 | =back |
452 | |
458 | |
453 | =head2 Extension Objects |
459 | =head2 Extension Objects |
454 | |
460 | |
455 | Every perl extension is a perl class. A separate perl object is created |
461 | Every perl extension is a perl class. A separate perl object is created |
… | |
… | |
665 | 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> |
666 | resource in the @@RXVT_NAME@@(1) manpage). |
672 | resource in the @@RXVT_NAME@@(1) manpage). |
667 | |
673 | |
668 | 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 |
669 | 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>. |
670 | |
683 | |
671 | =item on_resize_all_windows $term, $new_width, $new_height |
684 | =item on_resize_all_windows $term, $new_width, $new_height |
672 | |
685 | |
673 | 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 |
674 | 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 |
… | |
… | |
929 | urxvt::warn ($msg); |
942 | urxvt::warn ($msg); |
930 | }; |
943 | }; |
931 | } |
944 | } |
932 | |
945 | |
933 | no warnings 'utf8'; |
946 | no warnings 'utf8'; |
|
|
947 | |
|
|
948 | sub resource { |
|
|
949 | my ($term, $name, $isarg, $flag, $value) = @_; |
|
|
950 | |
|
|
951 | warn "resourece<@_>\n";#d# |
|
|
952 | |
|
|
953 | 0 |
|
|
954 | } |
934 | |
955 | |
935 | my $verbosity = $ENV{URXVT_PERL_VERBOSITY}; |
956 | my $verbosity = $ENV{URXVT_PERL_VERBOSITY}; |
936 | |
957 | |
937 | sub verbose { |
958 | sub verbose { |
938 | my ($level, $msg) = @_; |
959 | my ($level, $msg) = @_; |
… | |
… | |
1382 | |
1403 | |
1383 | This method should only be called during the C<on_start> hook, as there is |
1404 | This method should only be called during the C<on_start> hook, as there is |
1384 | only one resource database per display, and later invocations might return |
1405 | only one resource database per display, and later invocations might return |
1385 | the wrong resources. |
1406 | the wrong resources. |
1386 | |
1407 | |
1387 | =item $success = $term->parse_keysym ($keysym_spec, $command_string) |
1408 | =item $success = $term->parse_keysym ($key, $octets) |
1388 | |
1409 | |
1389 | Adds a keymap translation exactly as specified via a resource. See the |
1410 | Adds a key binding exactly as specified via a resource. See the |
1390 | C<keysym> resource in the @@RXVT_NAME@@(1) manpage. |
1411 | C<keysym> resource in the @@RXVT_NAME@@(1) manpage. |
|
|
1412 | |
|
|
1413 | =item $term->register_command ($keysym, $modifiermask, $string) |
|
|
1414 | |
|
|
1415 | Adds a key binding. This is a lower level api compared to |
|
|
1416 | C<parse_keysym>, as it expects a parsed key description, and can be |
|
|
1417 | used only inside either the C<on_init> hook, to add a binding, or the |
|
|
1418 | C<on_register_command> hook, to modify a parsed binding. |
1391 | |
1419 | |
1392 | =item $rend = $term->rstyle ([$new_rstyle]) |
1420 | =item $rend = $term->rstyle ([$new_rstyle]) |
1393 | |
1421 | |
1394 | Return and optionally change the current rendition. Text that is output by |
1422 | Return and optionally change the current rendition. Text that is output by |
1395 | the terminal application will use this style. |
1423 | the terminal application will use this style. |
… | |
… | |
1608 | |
1636 | |
1609 | Adds the specified events to the vt event mask. Useful e.g. when you want |
1637 | Adds the specified events to the vt event mask. Useful e.g. when you want |
1610 | to receive pointer events all the times: |
1638 | to receive pointer events all the times: |
1611 | |
1639 | |
1612 | $term->vt_emask_add (urxvt::PointerMotionMask); |
1640 | $term->vt_emask_add (urxvt::PointerMotionMask); |
|
|
1641 | |
|
|
1642 | =item $term->set_urgency ($set) |
|
|
1643 | |
|
|
1644 | Enable/disable the urgency hint on the toplevel window. |
1613 | |
1645 | |
1614 | =item $term->focus_in |
1646 | =item $term->focus_in |
1615 | |
1647 | |
1616 | =item $term->focus_out |
1648 | =item $term->focus_out |
1617 | |
1649 | |
… | |
… | |
1933 | =item $term->XMoveResizeWindow ($window, $x, $y, $width, $height) |
1965 | =item $term->XMoveResizeWindow ($window, $x, $y, $width, $height) |
1934 | |
1966 | |
1935 | =item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y) |
1967 | =item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y) |
1936 | |
1968 | |
1937 | =item $term->XChangeInput ($window, $add_events[, $del_events]) |
1969 | =item $term->XChangeInput ($window, $add_events[, $del_events]) |
|
|
1970 | |
|
|
1971 | =item $keysym = $term->XStringToKeysym ($string) |
|
|
1972 | |
|
|
1973 | =item $string = $term->XKeysymToString ($keysym) |
1938 | |
1974 | |
1939 | Various X or X-related functions. The C<$term> object only serves as |
1975 | Various X or X-related functions. The C<$term> object only serves as |
1940 | the source of the display, otherwise those functions map more-or-less |
1976 | the source of the display, otherwise those functions map more-or-less |
1941 | directly onto the X functions of the same name. |
1977 | directly onto the X functions of the same name. |
1942 | |
1978 | |