… | |
… | |
1512 | |
1512 | |
1513 | =item $term->scr_add_lines ($string) |
1513 | =item $term->scr_add_lines ($string) |
1514 | |
1514 | |
1515 | Write the given text string to the screen, as if output by the application |
1515 | Write the given text string to the screen, as if output by the application |
1516 | running inside the terminal. It may not contain command sequences (escape |
1516 | running inside the terminal. It may not contain command sequences (escape |
1517 | codes), but is free to use line feeds, carriage returns and tabs. The |
1517 | codes - see C<cmd_parse> for that), but is free to use line feeds, |
1518 | string is a normal text string, not in locale-dependent encoding. |
1518 | carriage returns and tabs. The string is a normal text string, not in |
|
|
1519 | locale-dependent encoding. |
1519 | |
1520 | |
1520 | Normally its not a good idea to use this function, as programs might be |
1521 | Normally its not a good idea to use this function, as programs might be |
1521 | confused by changes in cursor position or scrolling. Its useful inside a |
1522 | confused by changes in cursor position or scrolling. Its useful inside a |
1522 | C<on_add_lines> hook, though. |
1523 | C<on_add_lines> hook, though. |
1523 | |
1524 | |
… | |
… | |
1531 | locale-specific encoding of the terminal and can contain command sequences |
1532 | locale-specific encoding of the terminal and can contain command sequences |
1532 | (escape codes) that will be interpreted. |
1533 | (escape codes) that will be interpreted. |
1533 | |
1534 | |
1534 | =item $term->tt_write ($octets) |
1535 | =item $term->tt_write ($octets) |
1535 | |
1536 | |
1536 | Write the octets given in C<$octets> to the tty (i.e. as program input). To |
1537 | Write the octets given in C<$octets> to the tty (i.e. as user input |
|
|
1538 | to the program, see C<cmd_parse> for the opposite direction). To pass |
1537 | pass characters instead of octets, you should convert your strings first |
1539 | characters instead of octets, you should convert your strings first to the |
1538 | to the locale-specific encoding using C<< $term->locale_encode >>. |
1540 | locale-specific encoding using C<< $term->locale_encode >>. |
1539 | |
1541 | |
1540 | =item $term->tt_write_user_input ($octets) |
1542 | =item $term->tt_write_user_input ($octets) |
1541 | |
1543 | |
1542 | Like C<tt_write>, but should be used when writing strings in response to |
1544 | Like C<tt_write>, but should be used when writing strings in response to |
1543 | the user pressing a key, to invoke the additional actions requested by |
1545 | the user pressing a key, to invoke the additional actions requested by |