--- rxvt-unicode/src/urxvt.pm 2014/12/26 21:26:37 1.249 +++ rxvt-unicode/src/urxvt.pm 2015/06/17 11:59:37 1.255 @@ -47,11 +47,10 @@ Extensions may add additional resources and C, i.e., methods which can be bound to a key and invoked by the user. An extension can -define the resources it support and also default bindings for one or -more actions it provides using so called META comments, described -below. Similarly to builtin resources, extension resources can also be -specified on the command line as long options (with C<.> replaced by -C<->), in which case the corresponding extension is loaded +define the resources it support using so called META comments, +described below. Similarly to builtin resources, extension resources +can also be specified on the command line as long options (with C<.> +replaced by C<->), in which case the corresponding extension is loaded automatically. For this to work the extension B define META comments for its resources. @@ -120,7 +119,7 @@ Rxvt-unicode recognizes special meta comments in extensions that define different types of metadata. -Currently, it recxognises only one such comment: +Currently, it recognises only one such comment: =over 4 @@ -1137,7 +1136,7 @@ return if exists $self->{meta}; my @urxvtdirs = perl_libdirs $self; - my @cpandirs = grep -d, map "$_/URxvt/Ext", @INC; +# my @cpandirs = grep -d, map "$_/URxvt/Ext", @INC; $self->{meta} = \my %meta; @@ -1184,13 +1183,16 @@ } }; - $gather->($_, 0) for @cpandirs; +# $gather->($_, 0) for @cpandirs; $gather->($_, 1) for @urxvtdirs; # and now merge resources + + $meta{resource} = \my %resource; + while (my ($k, $v) = each %{ $meta{ext} }) { #TODO: should check for extensions overriding each other - %{ $meta{resource} } = (%{ $meta{resource} }, %{ $v->{resource} }); + %resource = (%resource, %{ $v->{resource} }); } } @@ -1346,14 +1348,19 @@ $res =~ /^\s*(?:true|yes|on|1)\s*$/i ? 1 : defined $res && 0 } +=item $action = $term->lookup_keysym ($keysym, $state) + +Returns the action bound to key combination C<($keysym, $state)>, +if a binding for it exists, and C otherwise. + =item $success = $term->bind_action ($key, $action) Adds a key binding exactly as specified via a C resource. See the C resource in the urxvt(1) manpage. -To add default bindings for an extension, the extension should call C<< -->bind_action >> on it's C hook for every such binding. Doing it -in the C hook allows users the override or remove the the binding +To add default bindings for actions, an extension should call C<< +->bind_action >> in its C hook for every such binding. Doing it +in the C hook allows users to override or remove the binding again. Example: the C by default binds itself @@ -1612,31 +1619,32 @@ Deliver various fake events to to terminal. -=item $window_width = $term->width +=item $window_width = $term->width ([$new_value]) -=item $window_height = $term->height +=item $window_height = $term->height ([$new_value]) -=item $font_width = $term->fwidth +=item $font_width = $term->fwidth ([$new_value]) -=item $font_height = $term->fheight +=item $font_height = $term->fheight ([$new_value]) -=item $font_ascent = $term->fbase +=item $font_ascent = $term->fbase ([$new_value]) -=item $terminal_rows = $term->nrow +=item $terminal_rows = $term->nrow ([$new_value]) -=item $terminal_columns = $term->ncol +=item $terminal_columns = $term->ncol ([$new_value]) -=item $has_focus = $term->focus +=item $has_focus = $term->focus ([$new_value]) -=item $is_mapped = $term->mapped +=item $is_mapped = $term->mapped ([$new_value]) -=item $max_scrollback = $term->saveLines +=item $max_scrollback = $term->saveLines ([$new_value]) -=item $nrow_plus_saveLines = $term->total_rows +=item $nrow_plus_saveLines = $term->total_rows ([$new_value]) -=item $topmost_scrollback_row = $term->top_row +=item $topmost_scrollback_row = $term->top_row ([$new_value]) -Return various integers describing terminal characteristics. +Return various integers describing terminal characteristics. If an +argument is given, changes the value and returns the previous one. =item $x_display = $term->display_id @@ -1697,6 +1705,10 @@ Used after changing terminal contents to display them. +=item $term->refresh_check + +Checks if a refresh has been requested and, if so, schedules one. + =item $text = $term->ROW_t ($row_number[, $new_text[, $start_col]]) Returns the text of the entire row with number C<$row_number>. Row C<< $term->top_row >>