Changeset 8d1bcd7 in mainline for uspace/lib/ui/test/menudd.c


Ignore:
Timestamp:
2023-09-26T20:26:55Z (8 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5afc1aa
Parents:
ed1a948
Message:

Handover between system menu and menu bar

We can move between them using Left and Right keys in either closed
or open state. One can now open system menu with F10, Left, Down in
a window with menu bar, or just F10 in a window without menu bar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/menudd.c

    red1a948 r8d1bcd7  
    4848PCUT_TEST(create_destroy)
    4949{
     50        ui_t *ui = NULL;
     51        ui_window_t *window = NULL;
     52        ui_wnd_params_t params;
    5053        ui_menu_bar_t *mbar = NULL;
    5154        ui_menu_dd_t *mdd = NULL;
     
    5356        errno_t rc;
    5457
    55         rc = ui_menu_bar_create(NULL, NULL, &mbar);
     58        rc = ui_create_disp(NULL, &ui);
     59        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     60
     61        ui_wnd_params_init(&params);
     62        params.caption = "Hello";
     63
     64        rc = ui_window_create(ui, &params, &window);
     65        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     66        PCUT_ASSERT_NOT_NULL(window);
     67
     68        rc = ui_menu_bar_create(ui, window, &mbar);
    5669        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    5770
     
    6881        ui_menu_dd_destroy(mdd);
    6982        ui_menu_bar_destroy(mbar);
     83        ui_window_destroy(window);
     84        ui_destroy(ui);
    7085}
    7186
Note: See TracChangeset for help on using the changeset viewer.