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.77 by root, Wed Jan 11 00:59:58 2006 UTC vs.
Revision 1.83 by root, Thu Jan 12 01:38:37 2006 UTC

84 84
85Displays a digital clock using the built-in overlay. 85Displays a digital clock using the built-in overlay.
86 86
87=item mark-urls 87=item mark-urls
88 88
89Uses per-line display filtering (C<on_line_update>) to underline urls. 89Uses per-line display filtering (C<on_line_update>) to underline urls and
90make them clickable. When middle-clicked, the program specified in the
91resource C<urlLauncher> (default C<x-www-browser>) will be started.
90 92
91=item block-graphics-to-ascii 93=item block-graphics-to-ascii
92 94
93A not very useful example of filtering all text output to the terminal, 95A not very useful example of filtering all text output to the terminal,
94by replacing all line-drawing characters (U+2500 .. U+259F) by a 96by replacing all line-drawing characters (U+2500 .. U+259F) by a
123=over 4 125=over 4
124 126
125=item $text 127=item $text
126 128
127Rxvt-unicodes special way of encoding text, where one "unicode" character 129Rxvt-unicodes special way of encoding text, where one "unicode" character
128always represents one screen cell. See L<row_t> for a discussion of this format. 130always represents one screen cell. See L<ROW_t> for a discussion of this format.
129 131
130=item $string 132=item $string
131 133
132A perl text string, with an emphasis on I<text>. It can store all unicode 134A perl text string, with an emphasis on I<text>. It can store all unicode
133characters and is to be distinguished with text encoded in a specific 135characters and is to be distinguished with text encoded in a specific
385 387
386=item $urxvt::TERM 388=item $urxvt::TERM
387 389
388The current terminal. This variable stores the current C<urxvt::term> 390The current terminal. This variable stores the current C<urxvt::term>
389object, whenever a callback/hook is executing. 391object, whenever a callback/hook is executing.
390
391=item
392 392
393=back 393=back
394 394
395=head2 Functions in the C<urxvt> Package 395=head2 Functions in the C<urxvt> Package
396 396
496 $msg .= "\n" 496 $msg .= "\n"
497 unless $msg =~ /\n$/; 497 unless $msg =~ /\n$/;
498 urxvt::warn ($msg); 498 urxvt::warn ($msg);
499 }; 499 };
500 500
501 # %ENV is the original startup environment
501 delete $ENV{IFS}; 502 delete $ENV{IFS};
502 delete $ENV{CDPATH}; 503 delete $ENV{CDPATH};
503 delete $ENV{BASH_ENV}; 504 delete $ENV{BASH_ENV};
504 $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin"; 505 $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin";
505} 506}
782} 783}
783 784
784=item $term = new urxvt::term $envhashref, $rxvtname, [arg...] 785=item $term = new urxvt::term $envhashref, $rxvtname, [arg...]
785 786
786Creates a new terminal, very similar as if you had started it with system 787Creates a new terminal, very similar as if you had started it with system
787C<$rxvtname, arg...>. C<$envhashref> must be a reference to a %ENV>-like 788C<$rxvtname, arg...>. C<$envhashref> must be a reference to a C<%ENV>-like
788C<hash which defines the environment of the new terminal. 789hash which defines the environment of the new terminal.
789 790
790Croaks (and probably outputs an error message) if the new instance 791Croaks (and probably outputs an error message) if the new instance
791couldn't be created. Returns C<undef> if the new instance didn't 792couldn't be created. Returns C<undef> if the new instance didn't
792initialise perl, and the terminal object otherwise. The C<init> and 793initialise perl, and the terminal object otherwise. The C<init> and
793C<start> hooks will be called during this call. 794C<start> hooks will be called during this call.
862 my ($self, $name) = (shift, shift); 863 my ($self, $name) = (shift, shift);
863 unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0); 864 unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0);
864 &urxvt::term::_resource 865 &urxvt::term::_resource
865} 866}
866 867
868=item $value = $term->x_resource ($pattern)
869
870Returns the X-Resource for the given pattern, excluding the program or
871class name, i.e. C<< $term->x_resource ("boldFont") >> should return the
872same value as used by this instance of rxvt-unicode. Returns C<undef> if no
873resource with that pattern exists.
874
875This method should only be called during the C<on_start> hook, as there is
876only one resource database per display, and later invocations might return
877the wrong resources.
878
867=item $success = $term->parse_keysym ($keysym_spec, $command_string) 879=item $success = $term->parse_keysym ($keysym_spec, $command_string)
868 880
869Adds a keymap translation exactly as specified via a resource. See the 881Adds a keymap translation exactly as specified via a resource. See the
870C<keysym> resource in the @@RXVT_NAME@@(1) manpage. 882C<keysym> resource in the @@RXVT_NAME@@(1) manpage.
871 883
1441 my ($self) = @_; 1453 my ($self) = @_;
1442 1454
1443 delete $self->{term}{_destroy}{$self}; 1455 delete $self->{term}{_destroy}{$self};
1444 $self->{term}->ungrab; 1456 $self->{term}->ungrab;
1445} 1457}
1458
1459=back
1446 1460
1447=head2 The C<urxvt::timer> Class 1461=head2 The C<urxvt::timer> Class
1448 1462
1449This class implements timer watchers/events. Time is represented as a 1463This class implements timer watchers/events. Time is represented as a
1450fractional number of seconds since the epoch. Example: 1464fractional number of seconds since the epoch. Example:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines