Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b48e680f in mainline for uspace/lib/ui/src/window.c


Ignore:
Timestamp:
2021-11-03T10:23:28Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
ec8a1bf
Parents:
ce862ac
git-author:
Jiri Svoboda <jiri@…> (2021-11-02 19:19:50)
git-committer:
Jiri Svoboda <jiri@…> (2021-11-03 10:23:28)
Message:

Allow console application to set the terminal window caption

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/window.c

    rce862ac rb48e680f  
    262262                        gfx_coord2_add(&dparams.rect.p0, &scr_dims,
    263263                            &dparams.rect.p1);
     264                        (void) console_set_caption(ui->console,
     265                            params->caption);
    264266                }
    265267        } else {
     
    355357        window->wdecor = wdecor;
    356358        window->cursor = ui_curs_arrow;
     359        window->placement = params->placement;
    357360        *rwindow = window;
    358361
     
    412415                ui_paint(ui);
    413416        }
     417
     418        if (ui->console != NULL &&
     419            window->placement == ui_wnd_place_full_screen) {
     420                (void) console_set_caption(ui->console, "");
     421        }
    414422}
    415423
     
    599607        window->cb = cb;
    600608        window->arg = arg;
     609}
     610
     611/** Change window caption.
     612 *
     613 * @param window Window
     614 * @param caption New caption
     615 *
     616 * @return EOK on success or an error code
     617 */
     618errno_t ui_window_set_caption(ui_window_t *window, const char *caption)
     619{
     620        return ui_wdecor_set_caption(window->wdecor, caption);
    601621}
    602622
Note: See TracChangeset for help on using the changeset viewer.