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

Changeset bb14312 in mainline for uspace/lib/ui/test/entry.c


Ignore:
Timestamp:
2021-06-26T16:40:28Z (5 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
1215db9
Parents:
69511176
Message:

Use hardware cursor in text mode

We extend GC with cursor control operations. This will also allow to
control the HW cursor when running display server in text mode in
the future (provided that we implement the missing bits in the rest
of the stack, i.e. in IPC GC and in the display server).

File:
1 edited

Legend:

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

    r69511176 rbb14312  
    270270}
    271271
     272/** ui_entry_activate() / ui_entry_deactivate() */
     273PCUT_TEST(activate_deactivate)
     274{
     275        errno_t rc;
     276        ui_t *ui = NULL;
     277        ui_window_t *window = NULL;
     278        ui_wnd_params_t params;
     279        ui_entry_t *entry;
     280
     281        rc = ui_create_disp(NULL, &ui);
     282        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     283
     284        ui_wnd_params_init(&params);
     285        params.caption = "Hello";
     286
     287        rc = ui_window_create(ui, &params, &window);
     288        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     289        PCUT_ASSERT_NOT_NULL(window);
     290
     291        rc = ui_entry_create(window, "ABC", &entry);
     292        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     293
     294        PCUT_ASSERT_FALSE(entry->active);
     295
     296        ui_entry_activate(entry);
     297        PCUT_ASSERT_TRUE(entry->active);
     298
     299        ui_entry_deactivate(entry);
     300        PCUT_ASSERT_FALSE(entry->active);
     301
     302        ui_entry_destroy(entry);
     303        ui_window_destroy(window);
     304        ui_destroy(ui);
     305}
     306
    272307PCUT_EXPORT(entry);
Note: See TracChangeset for help on using the changeset viewer.