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.35 by root, Fri Jan 6 01:27:27 2006 UTC vs.
Revision 1.39 by root, Fri Jan 6 05:28:55 2006 UTC

137=over 4 137=over 4
138 138
139=item on_init $term 139=item on_init $term
140 140
141Called after a new terminal object has been initialized, but before 141Called after a new terminal object has been initialized, but before
142windows are created or the command gets run. 142windows are created or the command gets run. Most methods are unsafe to
143call or deliver senseless data, as terminal size and other characteristics
144have not yet been determined. You can safely query and change resources,
145though.
143 146
144=item on_reset $term 147=item on_reset $term
145 148
146Called after the screen is "reset" for any reason, such as resizing or 149Called after the screen is "reset" for any reason, such as resizing or
147control sequences. Here is where you can react on changes to size-related 150control sequences. Here is where you can react on changes to size-related
258 261
259Called whenever the user presses a key combination that has a 262Called whenever the user presses a key combination that has a
260C<perl:string> action bound to it (see description of the B<keysym> 263C<perl:string> action bound to it (see description of the B<keysym>
261resource in the @@RXVT_NAME@@(1) manpage). 264resource in the @@RXVT_NAME@@(1) manpage).
262 265
266=item on_key_press $term, $event, $octets
267
268=item on_key_release $term, $event
269
270=item on_button_press $term, $event
271
272=item on_button_release $term, $event
273
274=item on_motion_notify $term, $event
275
276Called whenever the corresponding X event is received for the terminal If
277the hook returns true, then the even will be ignored by rxvt-unicode.
278
279The event is a hash with most values as named by Xlib (see the XEvent
280manpage), with the additional members C<row> and C<col>, which are the row
281and column under the mouse cursor.
282
283C<on_key_press> additionally receives the string rxvt-unicode would
284output, if any, in locale-specific encoding.
285
286subwindow.
287
263=back 288=back
264 289
265=head2 Variables in the C<urxvt> Package 290=head2 Variables in the C<urxvt> Package
266 291
267=over 4 292=over 4
274=back 299=back
275 300
276=head2 Functions in the C<urxvt> Package 301=head2 Functions in the C<urxvt> Package
277 302
278=over 4 303=over 4
304
305=item $term = new urxvt [arg...]
306
307Creates a new terminal, very similar as if you had started it with
308C<system $binfile, arg...>. Croaks (and probably outputs an error message)
309if the new instance couldn't be created. Returns C<undef> if the new
310instance didn't initialise perl, and the terminal object otherwise. The
311C<init> and C<start> hooks will be called during the call.
279 312
280=item urxvt::fatal $errormessage 313=item urxvt::fatal $errormessage
281 314
282Fatally aborts execution with the given error message. Avoid at all 315Fatally aborts execution with the given error message. Avoid at all
283costs! The only time this is acceptable is when the terminal process 316costs! The only time this is acceptable is when the terminal process
500} 533}
501 534
502=head2 The C<urxvt::term> Class 535=head2 The C<urxvt::term> Class
503 536
504=over 4 537=over 4
538
539=item $term->destroy
540
541Destroy the terminal object (close the window, free resources etc.).
505 542
506=item $value = $term->resource ($name[, $newval]) 543=item $value = $term->resource ($name[, $newval])
507 544
508Returns the current resource value associated with a given name and 545Returns the current resource value associated with a given name and
509optionally sets a new value. Setting values is most useful in the C<init> 546optionally sets a new value. Setting values is most useful in the C<init>
650 687
651Normally its not a good idea to use this function, as programs might be 688Normally its not a good idea to use this function, as programs might be
652confused by changes in cursor position or scrolling. Its useful inside a 689confused by changes in cursor position or scrolling. Its useful inside a
653C<on_add_lines> hook, though. 690C<on_add_lines> hook, though.
654 691
692=item $term->cmd_parse ($octets)
693
694Similar to C<scr_add_lines>, but the argument must be in the
695locale-specific encoding of the terminal and can contain command sequences
696(escape codes) that will be interpreted.
697
655=item $term->tt_write ($octets) 698=item $term->tt_write ($octets)
656 699
657Write the octets given in C<$data> to the tty (i.e. as program input). To 700Write the octets given in C<$data> to the tty (i.e. as program input). To
658pass characters instead of octets, you should convert your strings first 701pass characters instead of octets, you should convert your strings first
659to the locale-specific encoding using C<< $term->locale_encode >>. 702to the locale-specific encoding using C<< $term->locale_encode >>.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines