--- rxvt-unicode/src/urxvt.pm 2010/02/17 08:27:56 1.182 +++ rxvt-unicode/src/urxvt.pm 2011/01/07 21:17:08 1.190 @@ -372,7 +372,7 @@ I xrdb uses the C preprocessor, which might interpret the double C characters as comment start. Use C<\057\057> instead, -which works regardless of wether xrdb is used to parse the resource file +which works regardless of whether xrdb is used to parse the resource file or not. =item macosx-clipboard and macosx-clipboard-native @@ -395,6 +395,11 @@ window. Illustrates overwriting the refresh callbacks to create your own overlays or changes. +=item confirm-paste + +Displays a confirmation dialog when a paste containing at least a full +line is detected. + =back =head1 API DOCUMENTATION @@ -612,6 +617,13 @@ Called whenever some data is written to the tty/pty and can be used to suppress or filter tty input. +=item on_tt_paste $term, $octets + +Called whenever text is about to be pasted, with the text as argument. You +can filter/change and paste the text yourself by returning a true value +and calling C<< $term->tt_paste >> yourself. C<$octets> is +locale-encoded. + =item on_line_update $term, $row Called whenever a line was updated or changed. Can be used to filter @@ -646,7 +658,7 @@ The event is simply the action string. This interface is assumed to change slightly in the future. -=item on_resize_all_windows $tern, $new_width, $new_height +=item on_resize_all_windows $term, $new_width, $new_height Called just after the new window size has been calculated, but before windows are actually being resized or hints are being set. If this hook @@ -788,13 +800,14 @@ =item urxvt::fatal $errormessage -Fatally aborts execution with the given error message. Avoid at all -costs! The only time this is acceptable is when the terminal process -starts up. +Fatally aborts execution with the given error message (which should +include a trailing newline). Avoid at all costs! The only time this +is acceptable (and useful) is in the init hook, where it prevents the +temrinal from starting up. =item urxvt::warn $string -Calls C with the given string which should not include a +Calls C with the given string which should include a trailing newline. The module also overwrites the C builtin with a function that calls this function. @@ -861,7 +874,8 @@ Return the rendition mask used for overlays by default. -=item $rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline +=item $rendbit = urxvt::RS_Bold, urxvt::RS_Italic, urxvt::RS_Blink, +urxvt::RS_RVid, urxvt::RS_Uline Return the bit that enabled bold, italic, blink, reverse-video and underline, respectively. To enable such a style, just logically OR it into @@ -1392,18 +1406,24 @@ Tries to make a selection as set by C and C. If C<$rectangular> is true (default: false), a -rectangular selection will be made. This is the prefered function to make +rectangular selection will be made. This is the preferred function to make a selection. -=item $success = $term->selection_grab ($eventtime) +=item $success = $term->selection_grab ($eventtime[, $clipboard]) -Try to request the primary selection text from the server (for example, as -set by the next method). No visual feedback will be given. This function +Try to acquire ownership of the primary (clipboard if C<$clipboard> is +true) selection from the server. The corresponding text can be set +with the next method. No visual feedback will be given. This function is mostly useful from within C hooks. -=item $oldtext = $term->selection ([$newtext]) +=item $oldtext = $term->selection ([$newtext, $clipboard]) -Return the current selection text and optionally replace it by C<$newtext>. +Return the current selection (clipboard if C<$clipboard> is true) text +and optionally replace it by C<$newtext>. + +=item $term->selection_clear ([$clipboard]) + +Revoke ownership of the primary (clipboard if C<$clipboard> is true) selection. =item $term->overlay_simple ($x, $y, $text) @@ -1541,10 +1561,16 @@ =item $term->tt_write ($octets) -Write the octets given in C<$data> to the tty (i.e. as program input). To +Write the octets given in C<$octets> to the tty (i.e. as program input). To pass characters instead of octets, you should convert your strings first to the locale-specific encoding using C<< $term->locale_encode >>. +=item $term->tt_paste ($octets) + +Write the octets given in C<$octets> to the tty as a paste, converting NL to +CR and bracketing the data with control sequences if bracketed paste mode +is set. + =item $old_events = $term->pty_ev_events ([$new_events]) Replaces the event mask of the pty watcher by the given event mask. Can