ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/rxvtperl.3.man.in
(Generate patch)

Comparing rxvt-unicode/doc/rxvtperl.3.man.in (file contents):
Revision 1.8 by root, Tue Jan 3 04:20:37 2006 UTC vs.
Revision 1.9 by root, Tue Jan 3 21:15:22 2006 UTC

172.Vb 1 172.Vb 1
173\& @@RXVT_NAME@@ -pe <extensionname> 173\& @@RXVT_NAME@@ -pe <extensionname>
174.Ve 174.Ve
175.IP "selection" 4 175.IP "selection" 4
176.IX Item "selection" 176.IX Item "selection"
177Miscellaneous selection modifications. 177Intelligent selection. This etxension tries to be more intelligent when the user
178extends selections (double\-click).
179.Sp
180It also offers the following bindable event:
178.RS 4 181.RS 4
179.IP "rot13" 4 182.IP "rot13" 4
180.IX Item "rot13" 183.IX Item "rot13"
181Rot\-13 the selection when activated. Used via keyboard trigger: 184Rot\-13 the selection when activated. Used via keyboard trigger:
182.Sp 185.Sp
197.Sh "General \s-1API\s0 Considerations" 200.Sh "General \s-1API\s0 Considerations"
198.IX Subsection "General API Considerations" 201.IX Subsection "General API Considerations"
199All objects (such as terminals, time watchers etc.) are typical 202All objects (such as terminals, time watchers etc.) are typical
200reference-to-hash objects. The hash can be used to store anything you 203reference-to-hash objects. The hash can be used to store anything you
201like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or 204like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or
202\&\f(CW\*(C`_hook\*(C'\fR) are reserved for internal uses and must not be accessed or 205\&\f(CW\*(C`_hook\*(C'\fR) are reserved for internal uses and \fB\s-1MUST\s0 \s-1NOT\s0\fR be accessed or
203modified). 206modified).
204.PP 207.PP
205When objects are destroyed on the \*(C+ side, the perl object hashes are 208When objects are destroyed on the \*(C+ side, the perl object hashes are
206emptied, so its best to store related objects such as time watchers and 209emptied, so its best to store related objects such as time watchers and
207the like inside the terminal object so they get destroyed as soon as the 210the like inside the terminal object so they get destroyed as soon as the
208terminal is destroyed. 211terminal is destroyed.
209.Sh "Hooks" 212.Sh "Hooks"
210.IX Subsection "Hooks" 213.IX Subsection "Hooks"
211The following subroutines can be declared in loaded scripts, and will be called 214The following subroutines can be declared in loaded scripts, and will be
212whenever the relevant event happens. 215called whenever the relevant event happens.
216.PP
217The first argument passed to them is an object private to each terminal
218and extension package. You can call all \f(CW\*(C`urxvt::term\*(C'\fR methods on it, but
219its not a real \f(CW\*(C`urxvt::term\*(C'\fR object. Instead, the real \f(CW\*(C`urxvt::term\*(C'\fR
220object that is shared between all packages is stored in the \f(CW\*(C`term\*(C'\fR
221member.
213.PP 222.PP
214All of them must return a boolean value. If it is true, then the event 223All of them must return a boolean value. If it is true, then the event
215counts as being \fIconsumed\fR, and the invocation of other hooks is skipped, 224counts as being \fIconsumed\fR, and the invocation of other hooks is skipped,
216and the relevant action might not be carried out by the \*(C+ code. 225and the relevant action might not be carried out by the \*(C+ code.
217.PP 226.PP
247Called whenever a selection has been copied, but before the selection is 256Called whenever a selection has been copied, but before the selection is
248requested from the server. The selection text can be queried and changed 257requested from the server. The selection text can be queried and changed
249by calling \f(CW\*(C`$term\->selection\*(C'\fR. 258by calling \f(CW\*(C`$term\->selection\*(C'\fR.
250.Sp 259.Sp
251Returning a true value aborts selection grabbing. It will still be hilighted. 260Returning a true value aborts selection grabbing. It will still be hilighted.
261.ie n .IP "on_sel_extend $term" 4
262.el .IP "on_sel_extend \f(CW$term\fR" 4
263.IX Item "on_sel_extend $term"
264Called whenever the user tries to extend the selection (e.g. with a double
265click) and is either supposed to return false (normal operation), or
266should extend the selection itelf and return true to suppress the built-in
267processing.
268.Sp
269See the \fIselection\fR example extension.
252.ie n .IP "on_focus_in $term" 4 270.ie n .IP "on_focus_in $term" 4
253.el .IP "on_focus_in \f(CW$term\fR" 4 271.el .IP "on_focus_in \f(CW$term\fR" 4
254.IX Item "on_focus_in $term" 272.IX Item "on_focus_in $term"
255Called whenever the window gets the keyboard focus, before urxvt does 273Called whenever the window gets the keyboard focus, before urxvt does
256focus in processing. 274focus in processing.
294.el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4 312.el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4
295.IX Item "on_keyboard_command $term, $string" 313.IX Item "on_keyboard_command $term, $string"
296Called whenever the user presses a key combination that has a 314Called whenever the user presses a key combination that has a
297\&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR 315\&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR
298resource in the @@RXVT_NAME@@(1) manpage). 316resource in the @@RXVT_NAME@@(1) manpage).
317.ie n .Sh "Variables in the ""urxvt"" Package"
318.el .Sh "Variables in the \f(CWurxvt\fP Package"
319.IX Subsection "Variables in the urxvt Package"
320.IP "$urxvt::TERM" 4
321.IX Item "$urxvt::TERM"
322The current terminal. Whenever a callback/Hook is bein executed, this
323variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR object.
299.ie n .Sh "Functions in the ""urxvt"" Package" 324.ie n .Sh "Functions in the ""urxvt"" Package"
300.el .Sh "Functions in the \f(CWurxvt\fP Package" 325.el .Sh "Functions in the \f(CWurxvt\fP Package"
301.IX Subsection "Functions in the urxvt Package" 326.IX Subsection "Functions in the urxvt Package"
302.ie n .IP "urxvt::fatal $errormessage" 4 327.ie n .IP "urxvt::fatal $errormessage" 4
303.el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 328.el .IP "urxvt::fatal \f(CW$errormessage\fR" 4
468right/bottom side, respectively. 493right/bottom side, respectively.
469.Sp 494.Sp
470This method returns an urxvt::overlay object. The overlay will be visible 495This method returns an urxvt::overlay object. The overlay will be visible
471as long as the perl object is referenced. 496as long as the perl object is referenced.
472.Sp 497.Sp
473Currently, the only method on the \f(CW\*(C`urxvt::overlay\*(C'\fR object is \f(CW\*(C`set\*(C'\fR: 498The methods currently supported on \f(CW\*(C`urxvt::overlay\*(C'\fR objects are:
499.RS 4
474.ie n .IP "$overlay\->set ($x, $y\fR, \f(CW$text\fR, \f(CW$rend)" 4 500.ie n .IP "$overlay\->set ($x, $y\fR, \f(CW$text\fR, \f(CW$rend)" 4
475.el .IP "$overlay\->set ($x, \f(CW$y\fR, \f(CW$text\fR, \f(CW$rend\fR)" 4 501.el .IP "$overlay\->set ($x, \f(CW$y\fR, \f(CW$text\fR, \f(CW$rend\fR)" 4
476.IX Item "$overlay->set ($x, $y, $text, $rend)" 502.IX Item "$overlay->set ($x, $y, $text, $rend)"
477Similar to \f(CW\*(C`$term\->ROW_t\*(C'\fR and \f(CW\*(C`$term\->ROW_r\*(C'\fR in that it puts 503Similar to \f(CW\*(C`$term\->ROW_t\*(C'\fR and \f(CW\*(C`$term\->ROW_r\*(C'\fR in that it puts
478text in rxvt\-unicode's special encoding and an array of rendition values 504text in rxvt\-unicode's special encoding and an array of rendition values
479at a specific position inside the overlay. 505at a specific position inside the overlay.
506.IP "$overlay\->hide" 4
507.IX Item "$overlay->hide"
508If visible, hide the overlay, but do not destroy it.
509.IP "$overlay\->show" 4
510.IX Item "$overlay->show"
511If hidden, display the overlay again.
512.RE
513.RS 4
514.RE
480.ie n .IP "$cellwidth = $term\fR\->strwidth \f(CW$string" 4 515.ie n .IP "$cellwidth = $term\fR\->strwidth \f(CW$string" 4
481.el .IP "$cellwidth = \f(CW$term\fR\->strwidth \f(CW$string\fR" 4 516.el .IP "$cellwidth = \f(CW$term\fR\->strwidth \f(CW$string\fR" 4
482.IX Item "$cellwidth = $term->strwidth $string" 517.IX Item "$cellwidth = $term->strwidth $string"
483Returns the number of screen-cells this string would need. Correctly 518Returns the number of screen-cells this string would need. Correctly
484accounts for wide and combining characters. 519accounts for wide and combining characters.
526.el .IP "$text = \f(CW$term\fR\->ROW_t ($row_number[, \f(CW$new_text\fR[, \f(CW$start_col\fR]])" 4 561.el .IP "$text = \f(CW$term\fR\->ROW_t ($row_number[, \f(CW$new_text\fR[, \f(CW$start_col\fR]])" 4
527.IX Item "$text = $term->ROW_t ($row_number[, $new_text[, $start_col]])" 562.IX Item "$text = $term->ROW_t ($row_number[, $new_text[, $start_col]])"
528Returns the text of the entire row with number \f(CW$row_number\fR. Row \f(CW0\fR 563Returns the text of the entire row with number \f(CW$row_number\fR. Row \f(CW0\fR
529is the topmost terminal line, row \f(CW\*(C`$term\->$ncol\-1\*(C'\fR is the bottommost 564is the topmost terminal line, row \f(CW\*(C`$term\->$ncol\-1\*(C'\fR is the bottommost
530terminal line. The scrollback buffer starts at line \f(CW\*(C`\-1\*(C'\fR and extends to 565terminal line. The scrollback buffer starts at line \f(CW\*(C`\-1\*(C'\fR and extends to
531line \f(CW\*(C`\-$term\->nsaved\*(C'\fR. 566line \f(CW\*(C`\-$term\->nsaved\*(C'\fR. Nothing will be returned if a nonexistent line
567is requested.
532.Sp 568.Sp
533If \f(CW$new_text\fR is specified, it will replace characters in the current 569If \f(CW$new_text\fR is specified, it will replace characters in the current
534line, starting at column \f(CW$start_col\fR (default \f(CW0\fR), which is useful 570line, starting at column \f(CW$start_col\fR (default \f(CW0\fR), which is useful
535to replace only parts of a line. The font index in the rendition will 571to replace only parts of a line. The font index in the rendition will
536automatically be updated. 572automatically be updated.
558.Sp 594.Sp
559See the section on \s-1RENDITION\s0, above. 595See the section on \s-1RENDITION\s0, above.
560.ie n .IP "$length = $term\fR\->ROW_l ($row_number[, \f(CW$new_length])" 4 596.ie n .IP "$length = $term\fR\->ROW_l ($row_number[, \f(CW$new_length])" 4
561.el .IP "$length = \f(CW$term\fR\->ROW_l ($row_number[, \f(CW$new_length\fR])" 4 597.el .IP "$length = \f(CW$term\fR\->ROW_l ($row_number[, \f(CW$new_length\fR])" 4
562.IX Item "$length = $term->ROW_l ($row_number[, $new_length])" 598.IX Item "$length = $term->ROW_l ($row_number[, $new_length])"
563Returns the number of screen cells that are in use (\*(L"the line length\*(R"). If 599Returns the number of screen cells that are in use (\*(L"the line
564it is \f(CW\*(C`\-1\*(C'\fR, then the line is part of a multiple-row logical \*(L"line\*(R", which 600length\*(R"). Unlike the urxvt core, this returns \f(CW\*(C`$term\->ncol\*(C'\fR if the
565means all characters are in use and it is continued on the next row. 601line is joined with the following one.
566.ie n .IP "$text = $term\fR\->special_encode \f(CW$string" 4 602.ie n .IP "$bool = $term\->is_longer ($row_number)" 4
567.el .IP "$text = \f(CW$term\fR\->special_encode \f(CW$string\fR" 4 603.el .IP "$bool = \f(CW$term\fR\->is_longer ($row_number)" 4
568.IX Item "$text = $term->special_encode $string" 604.IX Item "$bool = $term->is_longer ($row_number)"
605Returns true if the row is part of a multiple-row logical \*(L"line\*(R" (i.e.
606joined with the following row), which means all characters are in use
607and it is continued on the next row (and possibly a continuation of the
608previous row(s)).
609.ie n .IP "$line = $term\->line ($row_number)" 4
610.el .IP "$line = \f(CW$term\fR\->line ($row_number)" 4
611.IX Item "$line = $term->line ($row_number)"
612Create and return a new \f(CW\*(C`urxvt::line\*(C'\fR object that stores information
613about the logical line that row \f(CW$row_number\fR is part of. It supports the
614following methods:
615.RS 4
616.ie n .IP "$text = $line\->t" 4
617.el .IP "$text = \f(CW$line\fR\->t" 4
618.IX Item "$text = $line->t"
619Returns the full text of the line, similar to \f(CW\*(C`ROW_t\*(C'\fR
620.ie n .IP "$rend = $line\->r" 4
621.el .IP "$rend = \f(CW$line\fR\->r" 4
622.IX Item "$rend = $line->r"
623Returns the full rendition array of the line, similar to \f(CW\*(C`ROW_r\*(C'\fR
624.ie n .IP "$length = $line\->l" 4
625.el .IP "$length = \f(CW$line\fR\->l" 4
626.IX Item "$length = $line->l"
627Returns the length of the line in cells, similar to \f(CW\*(C`ROW_l\*(C'\fR.
628.ie n .IP "$rownum = $line\->beg" 4
629.el .IP "$rownum = \f(CW$line\fR\->beg" 4
630.IX Item "$rownum = $line->beg"
631.PD 0
632.ie n .IP "$rownum = $line\->end" 4
633.el .IP "$rownum = \f(CW$line\fR\->end" 4
634.IX Item "$rownum = $line->end"
635.PD
636Return the row number of the first/last row of the line, respectively.
637.ie n .IP "$offset = $line\fR\->offset_of ($row, \f(CW$col)" 4
638.el .IP "$offset = \f(CW$line\fR\->offset_of ($row, \f(CW$col\fR)" 4
639.IX Item "$offset = $line->offset_of ($row, $col)"
640Returns the character offset of the given row|col pair within the logical
641line.
642.ie n .IP "($row, $col\fR) = \f(CW$line\->coord_of ($offset)" 4
643.el .IP "($row, \f(CW$col\fR) = \f(CW$line\fR\->coord_of ($offset)" 4
644.IX Item "($row, $col) = $line->coord_of ($offset)"
645Translates a string offset into terminal coordinates again.
646.RE
647.RS 4
648.RE
649.ie n .IP "($row, $col\fR) = \f(CW$line\fR\->coord_of ($offset) =item \f(CW$text\fR = \f(CW$term\fR\->special_encode \f(CW$string" 4
650.el .IP "($row, \f(CW$col\fR) = \f(CW$line\fR\->coord_of ($offset) =item \f(CW$text\fR = \f(CW$term\fR\->special_encode \f(CW$string\fR" 4
651.IX Item "($row, $col) = $line->coord_of ($offset) =item $text = $term->special_encode $string"
569Converts a perl string into the special encoding used by rxvt\-unicode, 652Converts a perl string into the special encoding used by rxvt\-unicode,
570where one character corresponds to one screen cell. See 653where one character corresponds to one screen cell. See
571\&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details. 654\&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details.
572.ie n .IP "$string = $term\fR\->special_decode \f(CW$text" 4 655.ie n .IP "$string = $term\fR\->special_decode \f(CW$text" 4
573.el .IP "$string = \f(CW$term\fR\->special_decode \f(CW$text\fR" 4 656.el .IP "$string = \f(CW$term\fR\->special_decode \f(CW$text\fR" 4

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines