Changeset 9d5cea6 in mainline for uspace/lib/vt


Ignore:
Timestamp:
2024-10-17T12:35:42Z (9 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
a72f3b8
Parents:
514108e
git-author:
Jiri Svoboda <jiri@…> (2024-10-16 17:35:40)
git-committer:
Jiri Svoboda <jiri@…> (2024-10-17 12:35:42)
Message:

Allow remcons/vt100 to set terminal title

Location:
uspace/lib/vt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/vt/include/vt/vt100.h

    r514108e r9d5cea6  
    184184extern void vt100_cursor_visibility(vt100_t *, bool);
    185185extern void vt100_set_button_reporting(vt100_t *, bool);
     186extern void vt100_set_title(vt100_t *, const char *);
    186187extern void vt100_putuchar(vt100_t *, char32_t);
    187188extern void vt100_flush(vt100_t *);
  • uspace/lib/vt/src/vt100.c

    r514108e r9d5cea6  
    333333}
    334334
     335/** Set terminal title.
     336 *
     337 * @param vt VT instance
     338 * @param title Terminal title
     339 */
     340void vt100_set_title(vt100_t *vt, const char *title)
     341{
     342        vt->cb->control_puts(vt->arg, "\033]0;");
     343        vt->cb->control_puts(vt->arg, title);
     344        vt->cb->control_puts(vt->arg, "\a");
     345}
     346
    335347/** Print Unicode character.
    336348 *
Note: See TracChangeset for help on using the changeset viewer.