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.2 by root, Mon Jan 2 17:21:59 2006 UTC vs.
Revision 1.3 by root, Mon Jan 2 19:36:07 2006 UTC

134rxvtperl \- rxvt\-unicode's embedded perl interpreter 134rxvtperl \- rxvt\-unicode's embedded perl interpreter
135.SH "SYNOPSIS" 135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS" 136.IX Header "SYNOPSIS"
137* Put your scripts into \fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR, they will be loaded automatically. 137* Put your scripts into \fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR, they will be loaded automatically.
138.PP 138.PP
139* Each script will only be loaded once, even in urxvtd, and will be valid
140globally.
141.PP
142* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and 139* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and
143thus must be encoded as \s-1UTF\-8\s0. 140thus must be encoded as \s-1UTF\-8\s0.
144.PP 141.PP
145.Vb 4 142.Vb 4
146\& sub on_sel_grab { 143\& sub on_sel_grab {
152.Vb 1 149.Vb 1
153\& 1 150\& 1
154.Ve 151.Ve
155.SH "DESCRIPTION" 152.SH "DESCRIPTION"
156.IX Header "DESCRIPTION" 153.IX Header "DESCRIPTION"
154On startup, @@RXVT_NAME@@ will scan \fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR
155for files and will load them. Everytime a terminal object gets created,
156the directory specified by the \f(CW\*(C`perl\-lib\*(C'\fR resource will be additionally
157scanned.
158.PP
159Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where
160scripts will be shared for all terminals.
161.PP
162Hooks in scripts specified by \f(CW\*(C`perl\-lib\*(C'\fR will only be called for the
163terminals created with that specific option value.
164.Sh "General \s-1API\s0 Considerations"
165.IX Subsection "General API Considerations"
166All objects (such as terminals, time watchers etc.) are typical
167reference-to-hash objects. The hash can be used to store anything you
168like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or
169\&\f(CW\*(C`_hook\*(C'\fR) are reserved for internal uses and must not be accessed or
170modified).
171.PP
172When objects are destroyed on the \*(C+ side, the perl object hashes are
173emptied, so its best to store related objects such as time watchers and
174the like inside the terminal object so they get destroyed as soon as the
175terminal is destroyed.
157.Sh "Hooks" 176.Sh "Hooks"
158.IX Subsection "Hooks" 177.IX Subsection "Hooks"
159The following subroutines can be declared in loaded scripts, and will be called 178The following subroutines can be declared in loaded scripts, and will be called
160whenever the relevant event happens. 179whenever the relevant event happens.
161.PP 180.PP
248costs! The only time this is acceptable is when the terminal process 267costs! The only time this is acceptable is when the terminal process
249starts up. 268starts up.
250.ie n .IP "urxvt::warn $string" 4 269.ie n .IP "urxvt::warn $string" 4
251.el .IP "urxvt::warn \f(CW$string\fR" 4 270.el .IP "urxvt::warn \f(CW$string\fR" 4
252.IX Item "urxvt::warn $string" 271.IX Item "urxvt::warn $string"
253Calls \f(CW\*(C`rxvt_warn\*(C'\fR witht eh given string which should not include a 272Calls \f(CW\*(C`rxvt_warn\*(C'\fR with the given string which should not include a
254newline. The module also overwrites the \f(CW\*(C`warn\*(C'\fR builtin with a function 273newline. The module also overwrites the \f(CW\*(C`warn\*(C'\fR builtin with a function
255that calls this function. 274that calls this function.
256.Sp 275.Sp
257Using this function has the advantage that its output ends up in the 276Using this function has the advantage that its output ends up in the
258correct place, e.g. on stderr of the connecting urxvtc client. 277correct place, e.g. on stderr of the connecting urxvtc client.
259.ie n .IP "$cellwidth = urxvt::wcswidth $string" 4
260.el .IP "$cellwidth = urxvt::wcswidth \f(CW$string\fR" 4
261.IX Item "$cellwidth = urxvt::wcswidth $string"
262Returns the number of screen-cells this string would need. Correctly
263accounts for wide and combining characters.
264.IP "$time = urxvt::NOW" 4 278.IP "$time = urxvt::NOW" 4
265.IX Item "$time = urxvt::NOW" 279.IX Item "$time = urxvt::NOW"
266Returns the \*(L"current time\*(R" (as per the event loop). 280Returns the \*(L"current time\*(R" (as per the event loop).
267.ie n .Sh "The ""urxvt::term"" Class" 281.ie n .Sh "The ""urxvt::term"" Class"
268.el .Sh "The \f(CWurxvt::term\fP Class" 282.el .Sh "The \f(CWurxvt::term\fP Class"
293\& answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont 307\& answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont
294\& borderLess color cursorBlink cursorUnderline cutchars delete_key 308\& borderLess color cursorBlink cursorUnderline cutchars delete_key
295\& display_name embed ext_bwidth fade font geometry hold iconName 309\& display_name embed ext_bwidth fade font geometry hold iconName
296\& imFont imLocale inputMethod insecure int_bwidth intensityStyles 310\& imFont imLocale inputMethod insecure int_bwidth intensityStyles
297\& italicFont jumpScroll lineSpace loginShell mapAlert menu meta8 311\& italicFont jumpScroll lineSpace loginShell mapAlert menu meta8
298\& modifier mouseWheelScrollPage name pastableTabs path pointerBlank 312\& modifier mouseWheelScrollPage name pastableTabs path perl perl_eval
299\& pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines 313\& perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd
300\& scrollBar scrollBar_align scrollBar_floating scrollBar_right 314\& reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating
301\& scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer 315\& scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput
302\& scrollstyle secondaryScreen secondaryScroll selectstyle shade term_name 316\& scrollWithBuffer scrollstyle secondaryScreen secondaryScroll selectstyle
303\& title transparent transparent_all tripleclickwords utmpInhibit 317\& shade term_name title transparent transparent_all tripleclickwords
304\& visualBell 318\& utmpInhibit visualBell
305.Ve 319.Ve
306.ie n .IP "($row, $col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col])" 4 320.ie n .IP "($row, $col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col])" 4
307.el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col\fR])" 4 321.el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col\fR])" 4
308.IX Item "($row, $col) = $term->selection_mark ([$row, $col])" 322.IX Item "($row, $col) = $term->selection_mark ([$row, $col])"
309.PD 0 323.PD 0
346position. 360position.
347.ie n .IP "$term\->scr_overlay_set ($x, $y\fR, \f(CW$text)" 4 361.ie n .IP "$term\->scr_overlay_set ($x, $y\fR, \f(CW$text)" 4
348.el .IP "$term\->scr_overlay_set ($x, \f(CW$y\fR, \f(CW$text\fR)" 4 362.el .IP "$term\->scr_overlay_set ($x, \f(CW$y\fR, \f(CW$text\fR)" 4
349.IX Item "$term->scr_overlay_set ($x, $y, $text)" 363.IX Item "$term->scr_overlay_set ($x, $y, $text)"
350Write a string at the given position into the overlay. 364Write a string at the given position into the overlay.
365.ie n .IP "$cellwidth = $term\fR\->strwidth \f(CW$string" 4
366.el .IP "$cellwidth = \f(CW$term\fR\->strwidth \f(CW$string\fR" 4
367.IX Item "$cellwidth = $term->strwidth $string"
368Returns the number of screen-cells this string would need. Correctly
369accounts for wide and combining characters.
370.ie n .IP "$octets = $term\fR\->locale_encode \f(CW$string" 4
371.el .IP "$octets = \f(CW$term\fR\->locale_encode \f(CW$string\fR" 4
372.IX Item "$octets = $term->locale_encode $string"
373Convert the given text string into the corresponding locale encoding.
374.ie n .IP "$string = $term\fR\->locale_decode \f(CW$octets" 4
375.el .IP "$string = \f(CW$term\fR\->locale_decode \f(CW$octets\fR" 4
376.IX Item "$string = $term->locale_decode $octets"
377Convert the given locale-encoded octets into a perl string.
378.IP "$term\->tt_write ($octets)" 4
379.IX Item "$term->tt_write ($octets)"
380Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To
381pass characters instead of octets, you should convetr you strings first to
382the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR.
351.ie n .Sh "The ""urxvt::timer"" Class" 383.ie n .Sh "The ""urxvt::timer"" Class"
352.el .Sh "The \f(CWurxvt::timer\fP Class" 384.el .Sh "The \f(CWurxvt::timer\fP Class"
353.IX Subsection "The urxvt::timer Class" 385.IX Subsection "The urxvt::timer Class"
354This class implements timer watchers/events. Time is represented as a 386This class implements timer watchers/events. Time is represented as a
355fractional number of seconds since the epoch. Example: 387fractional number of seconds since the epoch. Example:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines