… | |
… | |
1091 | is that you cannot use blocking APIs, but the non-blocking variant should |
1091 | is that you cannot use blocking APIs, but the non-blocking variant should |
1092 | work. |
1092 | work. |
1093 | |
1093 | |
1094 | =cut |
1094 | =cut |
1095 | |
1095 | |
1096 | our $VERSION = 1; |
1096 | our $VERSION = '3.4'; |
1097 | |
1097 | |
1098 | $INC{"urxvt/anyevent.pm"} = 1; # mark us as there |
1098 | $INC{"urxvt/anyevent.pm"} = 1; # mark us as there |
1099 | push @AnyEvent::REGISTRY, [urxvt => urxvt::anyevent::]; |
1099 | push @AnyEvent::REGISTRY, [urxvt => urxvt::anyevent::]; |
1100 | |
1100 | |
1101 | sub timer { |
1101 | sub timer { |
… | |
… | |
1130 | urxvt::anyevent:: |
1130 | urxvt::anyevent:: |
1131 | } |
1131 | } |
1132 | |
1132 | |
1133 | sub DESTROY { |
1133 | sub DESTROY { |
1134 | $_[0][1]->stop; |
1134 | $_[0][1]->stop; |
1135 | } |
|
|
1136 | |
|
|
1137 | sub condvar { |
|
|
1138 | bless \my $flag, urxvt::anyevent:: |
|
|
1139 | } |
|
|
1140 | |
|
|
1141 | sub broadcast { |
|
|
1142 | ${$_[0]}++; |
|
|
1143 | } |
|
|
1144 | |
|
|
1145 | sub wait { |
|
|
1146 | unless (${$_[0]}) { |
|
|
1147 | Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; |
|
|
1148 | } |
|
|
1149 | } |
1135 | } |
1150 | |
1136 | |
1151 | sub one_event { |
1137 | sub one_event { |
1152 | Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API"; |
1138 | Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API"; |
1153 | } |
1139 | } |
… | |
… | |
1611 | |
1597 | |
1612 | Used after changing terminal contents to display them. |
1598 | Used after changing terminal contents to display them. |
1613 | |
1599 | |
1614 | =item $text = $term->ROW_t ($row_number[, $new_text[, $start_col]]) |
1600 | =item $text = $term->ROW_t ($row_number[, $new_text[, $start_col]]) |
1615 | |
1601 | |
1616 | Returns the text of the entire row with number C<$row_number>. Row C<0> |
1602 | Returns the text of the entire row with number C<$row_number>. Row C<< $term->top_row >> |
1617 | is the topmost terminal line, row C<< $term->$ncol-1 >> is the bottommost |
1603 | is the topmost terminal line, row C<< $term->nrow-1 >> is the bottommost |
1618 | terminal line. The scrollback buffer starts at line C<-1> and extends to |
|
|
1619 | line C<< -$term->nsaved >>. Nothing will be returned if a nonexistent line |
1604 | terminal line. Nothing will be returned if a nonexistent line |
1620 | is requested. |
1605 | is requested. |
1621 | |
1606 | |
1622 | If C<$new_text> is specified, it will replace characters in the current |
1607 | If C<$new_text> is specified, it will replace characters in the current |
1623 | line, starting at column C<$start_col> (default C<0>), which is useful |
1608 | line, starting at column C<$start_col> (default C<0>), which is useful |
1624 | to replace only parts of a line. The font index in the rendition will |
1609 | to replace only parts of a line. The font index in the rendition will |