Changeset 3c54869 in mainline for uspace/srv/hid/display/test/window.c
- Timestamp:
- 2023-01-04T20:24:44Z (16 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d86797
- Parents:
- cdd6fc9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/test/window.c
rcdd6fc9 r3c54869 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 623 623 } 624 624 625 /** Test ds_window_post_focus_event() */ 626 PCUT_TEST(window_post_focus_event) 627 { 628 gfx_context_t *gc; 629 ds_display_t *disp; 630 ds_client_t *client; 631 ds_seat_t *seat; 632 ds_window_t *wnd; 633 display_wnd_params_t params; 634 errno_t rc; 635 636 rc = gfx_context_new(&dummy_ops, NULL, &gc); 637 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 638 639 rc = ds_display_create(gc, df_none, &disp); 640 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 641 642 rc = ds_client_create(disp, NULL, NULL, &client); 643 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 644 645 rc = ds_seat_create(disp, &seat); 646 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 647 648 display_wnd_params_init(¶ms); 649 params.rect.p0.x = params.rect.p0.y = 0; 650 params.rect.p1.x = params.rect.p1.y = 1; 651 652 rc = ds_window_create(client, ¶ms, &wnd); 653 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 654 655 rc = ds_window_post_focus_event(wnd); 656 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 657 658 ds_window_destroy(wnd); 659 ds_seat_destroy(seat); 660 ds_client_destroy(client); 661 ds_display_destroy(disp); 662 } 663 664 /** Test ds_window_post_unfocus_event() */ 665 PCUT_TEST(window_post_unfocus_event) 666 { 667 gfx_context_t *gc; 668 ds_display_t *disp; 669 ds_client_t *client; 670 ds_seat_t *seat; 671 ds_window_t *wnd; 672 display_wnd_params_t params; 673 errno_t rc; 674 675 rc = gfx_context_new(&dummy_ops, NULL, &gc); 676 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 677 678 rc = ds_display_create(gc, df_none, &disp); 679 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 680 681 rc = ds_client_create(disp, NULL, NULL, &client); 682 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 683 684 rc = ds_seat_create(disp, &seat); 685 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 686 687 display_wnd_params_init(¶ms); 688 params.rect.p0.x = params.rect.p0.y = 0; 689 params.rect.p1.x = params.rect.p1.y = 1; 690 691 rc = ds_window_create(client, ¶ms, &wnd); 692 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 693 694 rc = ds_window_post_focus_event(wnd); 695 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 696 697 ds_window_destroy(wnd); 698 ds_seat_destroy(seat); 699 ds_client_destroy(client); 700 ds_display_destroy(disp); 701 } 702 625 703 /** Test ds_window_move_req() */ 626 704 PCUT_TEST(window_move_req)
Note:
See TracChangeset
for help on using the changeset viewer.