Ignore:
Timestamp:
Nov 14, 2006, 12:33:49 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Implemented caca_set_display_title() for ncurses and S-Lang.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_slang.c

    r1333 r1391  
    104104 */
    105105static void slang_init_palette(void);
     106static void slang_set_title(char const *);
    106107static void slang_write_utf32(uint32_t);
    107108
     
    124125    signal(SIGWINCH, sigwinch_handler);
    125126#endif
     127
     128    slang_set_title("caca for S-Lang");
    126129
    127130    /* Initialise slang library */
     
    173176static int slang_end_graphics(caca_display_t *dp)
    174177{
     178    slang_set_title("");
    175179    SLtt_set_mouse_mode(0, 0);
    176180    SLtt_set_cursor_visibility(1);
     
    183187static int slang_set_display_title(caca_display_t *dp, char const *title)
    184188{
    185     /* FIXME */
    186     return -1;
     189    slang_set_title(title);
     190
     191    return 0;
    187192}
    188193
     
    443448}
    444449
     450static void slang_set_title(char const *str)
     451{
     452    fprintf(stdout, "\x1b]0;%s\x07\n", str);
     453    fflush(stdout);
     454}
     455
    445456static void slang_write_utf32(uint32_t ch)
    446457{
Note: See TracChangeset for help on using the changeset viewer.