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.147 by root, Tue Oct 3 11:32:20 2006 UTC vs.
Revision 1.152 by tpope, Tue Jan 9 16:18:56 2007 UTC

260 260
261Example configuration: 261Example configuration:
262 262
263 URxvt.perl-ext: default,matcher 263 URxvt.perl-ext: default,matcher
264 URxvt.urlLauncher: sensible-browser 264 URxvt.urlLauncher: sensible-browser
265 URxvt.keysym.C-Delete: perl:matcher
265 URxvt.matcher.button: 1 266 URxvt.matcher.button: 1
266 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-] 267 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-]
267 URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) 268 URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$)
268 URxvt.matcher.launcher.2: gvim +$2 $1 269 URxvt.matcher.launcher.2: gvim +$2 $1
269 270
270=item xim-onthespot 271=item xim-onthespot
271 272
990 991
991sub SET_COLOR($$$) { 992sub SET_COLOR($$$) {
992 SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2]) 993 SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2])
993} 994}
994 995
996sub rend2mask {
997 no strict 'refs';
998 my ($str, $mask) = (@_, 0);
999 my %color = ( fg => undef, bg => undef );
1000 my @failed;
1001 for my $spec ( split /\s+/, $str ) {
1002 if ( $spec =~ /^([fb]g)[_:-]?(\d+)/i ) {
1003 $color{lc($1)} = $2;
1004 } else {
1005 my $neg = $spec =~ s/^[-^]//;
1006 unless ( exists &{"RS_$spec"} ) {
1007 push @failed, $spec;
1008 next;
1009 }
1010 my $cur = &{"RS_$spec"};
1011 if ( $neg ) {
1012 $mask &= ~$cur;
1013 } else {
1014 $mask |= $cur;
1015 }
1016 }
1017 }
1018 ($mask, @color{qw(fg bg)}, \@failed)
1019}
1020
995# urxvt::term::extension 1021# urxvt::term::extension
996 1022
997package urxvt::term::extension; 1023package urxvt::term::extension;
998 1024
999sub enable { 1025sub enable {
1110sub DESTROY { 1136sub DESTROY {
1111 $_[0][1]->stop; 1137 $_[0][1]->stop;
1112} 1138}
1113 1139
1114sub condvar { 1140sub condvar {
1115 bless \my $flag, urxvt::anyevent::condvar:: 1141 bless \my $flag, urxvt::anyevent::
1116} 1142}
1117 1143
1118sub urxvt::anyevent::condvar::broadcast { 1144sub broadcast {
1119 ${$_[0]}++; 1145 ${$_[0]}++;
1120} 1146}
1121 1147
1122sub urxvt::anyevent::condvar::wait { 1148sub wait {
1123 unless (${$_[0]}) { 1149 unless (${$_[0]}) {
1124 Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; 1150 Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API";
1125 } 1151 }
1152}
1153
1154sub one_event {
1155 Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API";
1126} 1156}
1127 1157
1128package urxvt::term; 1158package urxvt::term;
1129 1159
1130=head2 The C<urxvt::term> Class 1160=head2 The C<urxvt::term> Class
1950 1980
1951=cut 1981=cut
1952 1982
1953package urxvt::watcher; 1983package urxvt::watcher;
1954 1984
1955@urxvt::timer::ISA = __PACKAGE__;
1956@urxvt::iow::ISA = __PACKAGE__;
1957@urxvt::pw::ISA = __PACKAGE__;
1958@urxvt::iw::ISA = __PACKAGE__;
1959
1960=head2 The C<urxvt::timer> Class 1985=head2 The C<urxvt::timer> Class
1961 1986
1962This class implements timer watchers/events. Time is represented as a 1987This class implements timer watchers/events. Time is represented as a
1963fractional number of seconds since the epoch. Example: 1988fractional number of seconds since the epoch. Example:
1964 1989
2149 http://software.schmorp.de/pkg/rxvt-unicode 2174 http://software.schmorp.de/pkg/rxvt-unicode
2150 2175
2151=cut 2176=cut
2152 2177
21531 21781
2179
2180# vim: sw=3:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines