… | |
… | |
127 | .\} |
127 | .\} |
128 | .rm #[ #] #H #V #F C |
128 | .rm #[ #] #H #V #F C |
129 | .\" ======================================================================== |
129 | .\" ======================================================================== |
130 | .\" |
130 | .\" |
131 | .IX Title "rxvt 3" |
131 | .IX Title "rxvt 3" |
132 | .TH rxvt 3 "2006-01-04" "6.3" "RXVT-UNICODE" |
132 | .TH rxvt 3 "2006-01-07" "6.3" "RXVT-UNICODE" |
133 | .SH "NAME" |
133 | .SH "NAME" |
134 | @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter |
134 | @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter |
135 | .SH "SYNOPSIS" |
135 | .SH "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
137 | .Vb 1 |
137 | .Vb 1 |
… | |
… | |
192 | .RS 4 |
192 | .RS 4 |
193 | .RE |
193 | .RE |
194 | .IP "digital-clock" 4 |
194 | .IP "digital-clock" 4 |
195 | .IX Item "digital-clock" |
195 | .IX Item "digital-clock" |
196 | Displays a digital clock using the built-in overlay. |
196 | Displays a digital clock using the built-in overlay. |
|
|
197 | .IP "mark-urls" 4 |
|
|
198 | .IX Item "mark-urls" |
|
|
199 | Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls. |
|
|
200 | .IP "block-graphics-to-ascii" 4 |
|
|
201 | .IX Item "block-graphics-to-ascii" |
|
|
202 | A not very useful example of filtering all text output to the terminal, |
|
|
203 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
|
|
204 | similar-looking ascii character. |
197 | .IP "example-refresh-hooks" 4 |
205 | .IP "example-refresh-hooks" 4 |
198 | .IX Item "example-refresh-hooks" |
206 | .IX Item "example-refresh-hooks" |
199 | Displays a very simple digital clock in the upper right corner of the |
207 | Displays a very simple digital clock in the upper right corner of the |
200 | window. Illustrates overwriting the refresh callbacks to create your own |
208 | window. Illustrates overwriting the refresh callbacks to create your own |
201 | overlays or changes. |
209 | overlays or changes. |
… | |
… | |
209 | .PP |
217 | .PP |
210 | When objects are destroyed on the \*(C+ side, the perl object hashes are |
218 | When objects are destroyed on the \*(C+ side, the perl object hashes are |
211 | emptied, so its best to store related objects such as time watchers and |
219 | emptied, so its best to store related objects such as time watchers and |
212 | the like inside the terminal object so they get destroyed as soon as the |
220 | the like inside the terminal object so they get destroyed as soon as the |
213 | terminal is destroyed. |
221 | terminal is destroyed. |
|
|
222 | .PP |
|
|
223 | Argument names also often indicate the type of a parameter. Here are some |
|
|
224 | hints on what they mean: |
|
|
225 | .IP "$text" 4 |
|
|
226 | .IX Item "$text" |
|
|
227 | Rxvt-unicodes special way of encoding text, where one \*(L"unicode\*(R" character |
|
|
228 | always represents one screen cell. See row_t for a discussion of this format. |
|
|
229 | .IP "$string" 4 |
|
|
230 | .IX Item "$string" |
|
|
231 | A perl text string, with an emphasis on \fItext\fR. It can store all unicode |
|
|
232 | characters and is to be distinguished with text encoded in a specific |
|
|
233 | encoding (often locale\-specific) and binary data. |
|
|
234 | .IP "$octets" 4 |
|
|
235 | .IX Item "$octets" |
|
|
236 | Either binary data or \- more common \- a text string encoded in a |
|
|
237 | locale-specific way. |
214 | .Sh "Hooks" |
238 | .Sh "Hooks" |
215 | .IX Subsection "Hooks" |
239 | .IX Subsection "Hooks" |
216 | The following subroutines can be declared in loaded scripts, and will be |
240 | The following subroutines can be declared in extension files, and will be |
217 | called whenever the relevant event happens. |
241 | called whenever the relevant event happens. |
218 | .PP |
242 | .PP |
219 | The first argument passed to them is an object private to each terminal |
243 | The first argument passed to them is an object private to each terminal |
220 | and extension package. You can call all \f(CW\*(C`urxvt::term\*(C'\fR methods on it, but |
244 | and extension package. You can call all \f(CW\*(C`urxvt::term\*(C'\fR methods on it, but |
221 | its not a real \f(CW\*(C`urxvt::term\*(C'\fR object. Instead, the real \f(CW\*(C`urxvt::term\*(C'\fR |
245 | its not a real \f(CW\*(C`urxvt::term\*(C'\fR object. Instead, the real \f(CW\*(C`urxvt::term\*(C'\fR |
… | |
… | |
229 | When in doubt, return a false value (preferably \f(CW\*(C`()\*(C'\fR). |
253 | When in doubt, return a false value (preferably \f(CW\*(C`()\*(C'\fR). |
230 | .ie n .IP "on_init $term" 4 |
254 | .ie n .IP "on_init $term" 4 |
231 | .el .IP "on_init \f(CW$term\fR" 4 |
255 | .el .IP "on_init \f(CW$term\fR" 4 |
232 | .IX Item "on_init $term" |
256 | .IX Item "on_init $term" |
233 | Called after a new terminal object has been initialized, but before |
257 | Called after a new terminal object has been initialized, but before |
234 | windows are created or the command gets run. |
258 | windows are created or the command gets run. Most methods are unsafe to |
|
|
259 | call or deliver senseless data, as terminal size and other characteristics |
|
|
260 | have not yet been determined. You can safely query and change resources, |
|
|
261 | though. |
235 | .ie n .IP "on_reset $term" 4 |
262 | .ie n .IP "on_reset $term" 4 |
236 | .el .IP "on_reset \f(CW$term\fR" 4 |
263 | .el .IP "on_reset \f(CW$term\fR" 4 |
237 | .IX Item "on_reset $term" |
264 | .IX Item "on_reset $term" |
238 | Called after the screen is \*(L"reset\*(R" for any reason, such as resizing or |
265 | Called after the screen is \*(L"reset\*(R" for any reason, such as resizing or |
239 | control sequences. Here is where you can react on changes to size-related |
266 | control sequences. Here is where you can react on changes to size-related |
… | |
… | |
310 | future. |
337 | future. |
311 | .Sp |
338 | .Sp |
312 | Be careful not ever to trust (in a security sense) the data you receive, |
339 | Be careful not ever to trust (in a security sense) the data you receive, |
313 | as its source can not easily be controleld (e\-mail content, messages from |
340 | as its source can not easily be controleld (e\-mail content, messages from |
314 | other users on the same system etc.). |
341 | other users on the same system etc.). |
|
|
342 | .ie n .IP "on_add_lines $term\fR, \f(CW$string" 4 |
|
|
343 | .el .IP "on_add_lines \f(CW$term\fR, \f(CW$string\fR" 4 |
|
|
344 | .IX Item "on_add_lines $term, $string" |
|
|
345 | Called whenever text is about to be output, with the text as argument. You |
|
|
346 | can filter/change and output the text yourself by returning a true value |
|
|
347 | and calling \f(CW\*(C`$term\->scr_add_lines\*(C'\fR yourself. Please note that this |
|
|
348 | might be very slow, however, as your hook is called for \fBall\fR text being |
|
|
349 | output. |
|
|
350 | .ie n .IP "on_line_update $term\fR, \f(CW$row" 4 |
|
|
351 | .el .IP "on_line_update \f(CW$term\fR, \f(CW$row\fR" 4 |
|
|
352 | .IX Item "on_line_update $term, $row" |
|
|
353 | Called whenever a line was updated or changed. Can be used to filter |
|
|
354 | screen output (e.g. underline urls or other useless stuff). Only lines |
|
|
355 | that are being shown will be filtered, and, due to performance reasons, |
|
|
356 | not always immediately. |
|
|
357 | .Sp |
|
|
358 | The row number is always the topmost row of the line if the line spans |
|
|
359 | multiple rows. |
|
|
360 | .Sp |
|
|
361 | Please note that, if you change the line, then the hook might get called |
|
|
362 | later with the already-modified line (e.g. if unrelated parts change), so |
|
|
363 | you cannot just toggle rendition bits, but only set them. |
315 | .ie n .IP "on_refresh_begin $term" 4 |
364 | .ie n .IP "on_refresh_begin $term" 4 |
316 | .el .IP "on_refresh_begin \f(CW$term\fR" 4 |
365 | .el .IP "on_refresh_begin \f(CW$term\fR" 4 |
317 | .IX Item "on_refresh_begin $term" |
366 | .IX Item "on_refresh_begin $term" |
318 | Called just before the screen gets redrawn. Can be used for overlay |
367 | Called just before the screen gets redrawn. Can be used for overlay |
319 | or similar effects by modify terminal contents in refresh_begin, and |
368 | or similar effects by modify terminal contents in refresh_begin, and |
… | |
… | |
327 | .el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4 |
376 | .el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4 |
328 | .IX Item "on_keyboard_command $term, $string" |
377 | .IX Item "on_keyboard_command $term, $string" |
329 | Called whenever the user presses a key combination that has a |
378 | Called whenever the user presses a key combination that has a |
330 | \&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR |
379 | \&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR |
331 | resource in the @@RXVT_NAME@@(1) manpage). |
380 | resource in the @@RXVT_NAME@@(1) manpage). |
|
|
381 | .ie n .IP "on_key_press $term\fR, \f(CW$event\fR, \f(CW$octets" 4 |
|
|
382 | .el .IP "on_key_press \f(CW$term\fR, \f(CW$event\fR, \f(CW$octets\fR" 4 |
|
|
383 | .IX Item "on_key_press $term, $event, $octets" |
|
|
384 | .PD 0 |
|
|
385 | .ie n .IP "on_key_release $term\fR, \f(CW$event" 4 |
|
|
386 | .el .IP "on_key_release \f(CW$term\fR, \f(CW$event\fR" 4 |
|
|
387 | .IX Item "on_key_release $term, $event" |
|
|
388 | .ie n .IP "on_button_press $term\fR, \f(CW$event" 4 |
|
|
389 | .el .IP "on_button_press \f(CW$term\fR, \f(CW$event\fR" 4 |
|
|
390 | .IX Item "on_button_press $term, $event" |
|
|
391 | .ie n .IP "on_button_release $term\fR, \f(CW$event" 4 |
|
|
392 | .el .IP "on_button_release \f(CW$term\fR, \f(CW$event\fR" 4 |
|
|
393 | .IX Item "on_button_release $term, $event" |
|
|
394 | .ie n .IP "on_motion_notify $term\fR, \f(CW$event" 4 |
|
|
395 | .el .IP "on_motion_notify \f(CW$term\fR, \f(CW$event\fR" 4 |
|
|
396 | .IX Item "on_motion_notify $term, $event" |
|
|
397 | .PD |
|
|
398 | Called whenever the corresponding X event is received for the terminal If |
|
|
399 | the hook returns true, then the even will be ignored by rxvt\-unicode. |
|
|
400 | .Sp |
|
|
401 | The event is a hash with most values as named by Xlib (see the XEvent |
|
|
402 | manpage), with the additional members \f(CW\*(C`row\*(C'\fR and \f(CW\*(C`col\*(C'\fR, which are the row |
|
|
403 | and column under the mouse cursor. |
|
|
404 | .Sp |
|
|
405 | \&\f(CW\*(C`on_key_press\*(C'\fR additionally receives the string rxvt-unicode would |
|
|
406 | output, if any, in locale-specific encoding. |
|
|
407 | .Sp |
|
|
408 | subwindow. |
332 | .ie n .Sh "Variables in the ""urxvt"" Package" |
409 | .ie n .Sh "Variables in the ""urxvt"" Package" |
333 | .el .Sh "Variables in the \f(CWurxvt\fP Package" |
410 | .el .Sh "Variables in the \f(CWurxvt\fP Package" |
334 | .IX Subsection "Variables in the urxvt Package" |
411 | .IX Subsection "Variables in the urxvt Package" |
335 | .IP "$urxvt::TERM" 4 |
412 | .IP "$urxvt::TERM" 4 |
336 | .IX Item "$urxvt::TERM" |
413 | .IX Item "$urxvt::TERM" |
337 | The current terminal. Whenever a callback/Hook is bein executed, this |
|
|
338 | variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR object. |
414 | The current terminal. This variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR |
|
|
415 | object, whenever a callback/hook is executing. |
339 | .ie n .Sh "Functions in the ""urxvt"" Package" |
416 | .ie n .Sh "Functions in the ""urxvt"" Package" |
340 | .el .Sh "Functions in the \f(CWurxvt\fP Package" |
417 | .el .Sh "Functions in the \f(CWurxvt\fP Package" |
341 | .IX Subsection "Functions in the urxvt Package" |
418 | .IX Subsection "Functions in the urxvt Package" |
|
|
419 | .IP "$term = new urxvt [arg...]" 4 |
|
|
420 | .IX Item "$term = new urxvt [arg...]" |
|
|
421 | Creates a new terminal, very similar as if you had started it with |
|
|
422 | \&\f(CW\*(C`system $binfile, arg...\*(C'\fR. Croaks (and probably outputs an error message) |
|
|
423 | if the new instance couldn't be created. Returns \f(CW\*(C`undef\*(C'\fR if the new |
|
|
424 | instance didn't initialise perl, and the terminal object otherwise. The |
|
|
425 | \&\f(CW\*(C`init\*(C'\fR and \f(CW\*(C`start\*(C'\fR hooks will be called during the call. |
342 | .ie n .IP "urxvt::fatal $errormessage" 4 |
426 | .ie n .IP "urxvt::fatal $errormessage" 4 |
343 | .el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 |
427 | .el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 |
344 | .IX Item "urxvt::fatal $errormessage" |
428 | .IX Item "urxvt::fatal $errormessage" |
345 | Fatally aborts execution with the given error message. Avoid at all |
429 | Fatally aborts execution with the given error message. Avoid at all |
346 | costs! The only time this is acceptable is when the terminal process |
430 | costs! The only time this is acceptable is when the terminal process |
… | |
… | |
407 | .IX Item "$rend = urxvt::SET_CUSTOM ($rend, $new_value)" |
491 | .IX Item "$rend = urxvt::SET_CUSTOM ($rend, $new_value)" |
408 | Change the custom value. |
492 | Change the custom value. |
409 | .ie n .Sh "The ""urxvt::term"" Class" |
493 | .ie n .Sh "The ""urxvt::term"" Class" |
410 | .el .Sh "The \f(CWurxvt::term\fP Class" |
494 | .el .Sh "The \f(CWurxvt::term\fP Class" |
411 | .IX Subsection "The urxvt::term Class" |
495 | .IX Subsection "The urxvt::term Class" |
|
|
496 | .IP "$term\->destroy" 4 |
|
|
497 | .IX Item "$term->destroy" |
|
|
498 | Destroy the terminal object (close the window, free resources etc.). |
412 | .ie n .IP "$value = $term\fR\->resource ($name[, \f(CW$newval])" 4 |
499 | .ie n .IP "$value = $term\fR\->resource ($name[, \f(CW$newval])" 4 |
413 | .el .IP "$value = \f(CW$term\fR\->resource ($name[, \f(CW$newval\fR])" 4 |
500 | .el .IP "$value = \f(CW$term\fR\->resource ($name[, \f(CW$newval\fR])" 4 |
414 | .IX Item "$value = $term->resource ($name[, $newval])" |
501 | .IX Item "$value = $term->resource ($name[, $newval])" |
415 | Returns the current resource value associated with a given name and |
502 | Returns the current resource value associated with a given name and |
416 | optionally sets a new value. Setting values is most useful in the \f(CW\*(C`init\*(C'\fR |
503 | optionally sets a new value. Setting values is most useful in the \f(CW\*(C`init\*(C'\fR |
… | |
… | |
443 | \& scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput |
530 | \& scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput |
444 | \& scrollWithBuffer scrollstyle secondaryScreen secondaryScroll selectstyle |
531 | \& scrollWithBuffer scrollstyle secondaryScreen secondaryScroll selectstyle |
445 | \& shade term_name title transparent transparent_all tripleclickwords |
532 | \& shade term_name title transparent transparent_all tripleclickwords |
446 | \& utmpInhibit visualBell |
533 | \& utmpInhibit visualBell |
447 | .Ve |
534 | .Ve |
448 | .ie n .IP "$rend = $term\->screen_rstyle ([$new_rstyle])" 4 |
535 | .ie n .IP "$rend = $term\->rstyle ([$new_rstyle])" 4 |
449 | .el .IP "$rend = \f(CW$term\fR\->screen_rstyle ([$new_rstyle])" 4 |
536 | .el .IP "$rend = \f(CW$term\fR\->rstyle ([$new_rstyle])" 4 |
450 | .IX Item "$rend = $term->screen_rstyle ([$new_rstyle])" |
537 | .IX Item "$rend = $term->rstyle ([$new_rstyle])" |
451 | Return and optionally change the current rendition. Text thta is output by |
538 | Return and optionally change the current rendition. Text that is output by |
452 | the temrianl application will use this style. |
539 | the terminal application will use this style. |
453 | .ie n .IP "($row, $col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col])" 4 |
540 | .ie n .IP "($row, $col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col])" 4 |
454 | .el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col\fR])" 4 |
541 | .el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col\fR])" 4 |
455 | .IX Item "($row, $col) = $term->screen_cur ([$row, $col])" |
542 | .IX Item "($row, $col) = $term->screen_cur ([$row, $col])" |
456 | Return the current coordinates of the text cursor position and optionally |
543 | Return the current coordinates of the text cursor position and optionally |
457 | set it (which is usually bad as applications don't expect that). |
544 | set it (which is usually bad as applications don't expect that). |
… | |
… | |
481 | #=item \f(CW$term\fR\->overlay ($x, \f(CW$y\fR, \f(CW$text\fR) |
568 | #=item \f(CW$term\fR\->overlay ($x, \f(CW$y\fR, \f(CW$text\fR) |
482 | # |
569 | # |
483 | #Create a simple multi-line overlay box. See the next method for details. |
570 | #Create a simple multi-line overlay box. See the next method for details. |
484 | # |
571 | # |
485 | #=cut |
572 | #=cut |
486 | .Sp |
573 | # |
487 | sub urxvt::term::scr_overlay { |
574 | #sub urxvt::term::scr_overlay { |
488 | die; |
|
|
489 | my ($self, \f(CW$x\fR, \f(CW$y\fR, \f(CW$text\fR) = \f(CW@_\fR; |
575 | # my ($self, \f(CW$x\fR, \f(CW$y\fR, \f(CW$text\fR) = \f(CW@_\fR; |
490 | .Sp |
576 | # |
491 | .Vb 1 |
|
|
492 | \& my @lines = split /\en/, $text; |
577 | # my \f(CW@lines\fR = split /\en/, \f(CW$text\fR; |
493 | .Ve |
578 | # |
494 | .Sp |
579 | # my \f(CW$w\fR = 0; |
495 | .Vb 4 |
|
|
496 | \& my $w = 0; |
|
|
497 | \& for (map $self->strwidth ($_), @lines) { |
580 | # for (map \f(CW$self\fR\->strwidth ($_), \f(CW@lines\fR) { |
498 | \& $w = $_ if $w < $_; |
581 | # \f(CW$w\fR = \f(CW$_\fR if \f(CW$w\fR < \f(CW$_\fR; |
499 | \& } |
582 | # } |
500 | .Ve |
583 | # |
501 | .Sp |
584 | # \f(CW$self\fR\->scr_overlay_new ($x, \f(CW$y\fR, \f(CW$w\fR, scalar \f(CW@lines\fR); |
502 | .Vb 3 |
|
|
503 | \& $self->scr_overlay_new ($x, $y, $w, scalar @lines); |
|
|
504 | \& $self->scr_overlay_set (0, $_, $lines[$_]) for 0.. $#lines; |
585 | # \f(CW$self\fR\->scr_overlay_set (0, \f(CW$_\fR, \f(CW$lines\fR[$_]) for 0.. $#lines; |
505 | \&} |
586 | #} |
506 | .Ve |
|
|
507 | .ie n .IP "$term\->overlay ($x, $y\fR, \f(CW$width\fR, \f(CW$height\fR[, \f(CW$rstyle\fR[, \f(CW$border]])" 4 |
587 | .ie n .IP "$term\->overlay ($x, $y\fR, \f(CW$width\fR, \f(CW$height\fR[, \f(CW$rstyle\fR[, \f(CW$border]])" 4 |
508 | .el .IP "$term\->overlay ($x, \f(CW$y\fR, \f(CW$width\fR, \f(CW$height\fR[, \f(CW$rstyle\fR[, \f(CW$border\fR]])" 4 |
588 | .el .IP "$term\->overlay ($x, \f(CW$y\fR, \f(CW$width\fR, \f(CW$height\fR[, \f(CW$rstyle\fR[, \f(CW$border\fR]])" 4 |
509 | .IX Item "$term->overlay ($x, $y, $width, $height[, $rstyle[, $border]])" |
589 | .IX Item "$term->overlay ($x, $y, $width, $height[, $rstyle[, $border]])" |
510 | Create a new (empty) overlay at the given position with the given |
590 | Create a new (empty) overlay at the given position with the given |
511 | width/height. \f(CW$rstyle\fR defines the initial rendition style |
591 | width/height. \f(CW$rstyle\fR defines the initial rendition style |
… | |
… | |
535 | .IX Item "$overlay->show" |
615 | .IX Item "$overlay->show" |
536 | If hidden, display the overlay again. |
616 | If hidden, display the overlay again. |
537 | .RE |
617 | .RE |
538 | .RS 4 |
618 | .RS 4 |
539 | .RE |
619 | .RE |
540 | .ie n .IP "$cellwidth = $term\fR\->strwidth \f(CW$string" 4 |
620 | .ie n .IP "$cellwidth = $term\->strwidth ($string)" 4 |
541 | .el .IP "$cellwidth = \f(CW$term\fR\->strwidth \f(CW$string\fR" 4 |
621 | .el .IP "$cellwidth = \f(CW$term\fR\->strwidth ($string)" 4 |
542 | .IX Item "$cellwidth = $term->strwidth $string" |
622 | .IX Item "$cellwidth = $term->strwidth ($string)" |
543 | Returns the number of screen-cells this string would need. Correctly |
623 | Returns the number of screen-cells this string would need. Correctly |
544 | accounts for wide and combining characters. |
624 | accounts for wide and combining characters. |
545 | .ie n .IP "$octets = $term\fR\->locale_encode \f(CW$string" 4 |
625 | .ie n .IP "$octets = $term\->locale_encode ($string)" 4 |
546 | .el .IP "$octets = \f(CW$term\fR\->locale_encode \f(CW$string\fR" 4 |
626 | .el .IP "$octets = \f(CW$term\fR\->locale_encode ($string)" 4 |
547 | .IX Item "$octets = $term->locale_encode $string" |
627 | .IX Item "$octets = $term->locale_encode ($string)" |
548 | Convert the given text string into the corresponding locale encoding. |
628 | Convert the given text string into the corresponding locale encoding. |
549 | .ie n .IP "$string = $term\fR\->locale_decode \f(CW$octets" 4 |
629 | .ie n .IP "$string = $term\->locale_decode ($octets)" 4 |
550 | .el .IP "$string = \f(CW$term\fR\->locale_decode \f(CW$octets\fR" 4 |
630 | .el .IP "$string = \f(CW$term\fR\->locale_decode ($octets)" 4 |
551 | .IX Item "$string = $term->locale_decode $octets" |
631 | .IX Item "$string = $term->locale_decode ($octets)" |
552 | Convert the given locale-encoded octets into a perl string. |
632 | Convert the given locale-encoded octets into a perl string. |
|
|
633 | .IP "$term\->scr_add_lines ($string)" 4 |
|
|
634 | .IX Item "$term->scr_add_lines ($string)" |
|
|
635 | Write the given text string to the screen, as if output by the application |
|
|
636 | running inside the terminal. It may not contain command sequences (escape |
|
|
637 | codes), but is free to use line feeds, carriage returns and tabs. The |
|
|
638 | string is a normal text string, not in locale-dependent encoding. |
|
|
639 | .Sp |
|
|
640 | Normally its not a good idea to use this function, as programs might be |
|
|
641 | confused by changes in cursor position or scrolling. Its useful inside a |
|
|
642 | \&\f(CW\*(C`on_add_lines\*(C'\fR hook, though. |
|
|
643 | .IP "$term\->cmd_parse ($octets)" 4 |
|
|
644 | .IX Item "$term->cmd_parse ($octets)" |
|
|
645 | Similar to \f(CW\*(C`scr_add_lines\*(C'\fR, but the argument must be in the |
|
|
646 | locale-specific encoding of the terminal and can contain command sequences |
|
|
647 | (escape codes) that will be interpreted. |
553 | .IP "$term\->tt_write ($octets)" 4 |
648 | .IP "$term\->tt_write ($octets)" 4 |
554 | .IX Item "$term->tt_write ($octets)" |
649 | .IX Item "$term->tt_write ($octets)" |
555 | Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To |
650 | Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To |
556 | pass characters instead of octets, you should convert your strings first |
651 | pass characters instead of octets, you should convert your strings first |
557 | to the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR. |
652 | to the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR. |
|
|
653 | .ie n .IP "$windowid = $term\->parent" 4 |
|
|
654 | .el .IP "$windowid = \f(CW$term\fR\->parent" 4 |
|
|
655 | .IX Item "$windowid = $term->parent" |
|
|
656 | Return the window id of the toplevel window. |
|
|
657 | .ie n .IP "$windowid = $term\->vt" 4 |
|
|
658 | .el .IP "$windowid = \f(CW$term\fR\->vt" 4 |
|
|
659 | .IX Item "$windowid = $term->vt" |
|
|
660 | Return the window id of the terminal window. |
558 | .ie n .IP "$window_width = $term\->width" 4 |
661 | .ie n .IP "$window_width = $term\->width" 4 |
559 | .el .IP "$window_width = \f(CW$term\fR\->width" 4 |
662 | .el .IP "$window_width = \f(CW$term\fR\->width" 4 |
560 | .IX Item "$window_width = $term->width" |
663 | .IX Item "$window_width = $term->width" |
561 | .PD 0 |
664 | .PD 0 |
562 | .ie n .IP "$window_height = $term\->height" 4 |
665 | .ie n .IP "$window_height = $term\->height" 4 |
… | |
… | |
661 | .IX Item "$line = $term->line ($row_number)" |
764 | .IX Item "$line = $term->line ($row_number)" |
662 | Create and return a new \f(CW\*(C`urxvt::line\*(C'\fR object that stores information |
765 | Create and return a new \f(CW\*(C`urxvt::line\*(C'\fR object that stores information |
663 | about the logical line that row \f(CW$row_number\fR is part of. It supports the |
766 | about the logical line that row \f(CW$row_number\fR is part of. It supports the |
664 | following methods: |
767 | following methods: |
665 | .RS 4 |
768 | .RS 4 |
666 | .ie n .IP "$text = $line\->t" 4 |
769 | .ie n .IP "$text = $line\->t ([$new_text])" 4 |
667 | .el .IP "$text = \f(CW$line\fR\->t" 4 |
770 | .el .IP "$text = \f(CW$line\fR\->t ([$new_text])" 4 |
668 | .IX Item "$text = $line->t" |
771 | .IX Item "$text = $line->t ([$new_text])" |
669 | Returns the full text of the line, similar to \f(CW\*(C`ROW_t\*(C'\fR |
772 | Returns or replaces the full text of the line, similar to \f(CW\*(C`ROW_t\*(C'\fR |
670 | .ie n .IP "$rend = $line\->r" 4 |
773 | .ie n .IP "$rend = $line\->r ([$new_rend])" 4 |
671 | .el .IP "$rend = \f(CW$line\fR\->r" 4 |
774 | .el .IP "$rend = \f(CW$line\fR\->r ([$new_rend])" 4 |
672 | .IX Item "$rend = $line->r" |
775 | .IX Item "$rend = $line->r ([$new_rend])" |
673 | Returns the full rendition array of the line, similar to \f(CW\*(C`ROW_r\*(C'\fR |
776 | Returns or replaces the full rendition array of the line, similar to \f(CW\*(C`ROW_r\*(C'\fR |
674 | .ie n .IP "$length = $line\->l" 4 |
777 | .ie n .IP "$length = $line\->l" 4 |
675 | .el .IP "$length = \f(CW$line\fR\->l" 4 |
778 | .el .IP "$length = \f(CW$line\fR\->l" 4 |
676 | .IX Item "$length = $line->l" |
779 | .IX Item "$length = $line->l" |
677 | Returns the length of the line in cells, similar to \f(CW\*(C`ROW_l\*(C'\fR. |
780 | Returns the length of the line in cells, similar to \f(CW\*(C`ROW_l\*(C'\fR. |
678 | .ie n .IP "$rownum = $line\->beg" 4 |
781 | .ie n .IP "$rownum = $line\->beg" 4 |