Changeset 46a47c0 in mainline for uspace/lib/display/test/display.c
- Timestamp:
- 2023-01-16T20:34:01Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b0ae23f
- Parents:
- b3eeae5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/test/display.c
rb3eeae5 r46a47c0 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 51 51 52 52 static void test_close_event(void *); 53 static void test_focus_event(void * );53 static void test_focus_event(void *, unsigned); 54 54 static void test_kbd_event(void *, kbd_event_t *); 55 55 static void test_pos_event(void *, pos_event_t *); 56 static void test_unfocus_event(void * );56 static void test_unfocus_event(void *, unsigned); 57 57 58 58 static errno_t test_window_create(void *, display_wnd_params_t *, sysarg_t *); … … 166 166 bool set_color_called; 167 167 bool close_event_called; 168 168 169 bool focus_event_called; 169 170 bool kbd_event_called; … … 1677 1678 resp.event_cnt = 1; 1678 1679 resp.event.etype = wev_focus; 1680 resp.event.ev.focus.nfocus = 42; 1679 1681 resp.wnd_id = wnd->id; 1680 1682 resp.focus_event_called = false; … … 1693 1695 PCUT_ASSERT_INT_EQUALS(resp.event.etype, 1694 1696 resp.revent.etype); 1697 PCUT_ASSERT_INT_EQUALS(resp.event.ev.focus.nfocus, 1698 resp.revent.ev.focus.nfocus); 1695 1699 1696 1700 rc = display_window_destroy(wnd); … … 1896 1900 resp.event_cnt = 1; 1897 1901 resp.event.etype = wev_unfocus; 1902 resp.event.ev.unfocus.nfocus = 42; 1898 1903 resp.wnd_id = wnd->id; 1899 1904 resp.unfocus_event_called = false; … … 1912 1917 PCUT_ASSERT_INT_EQUALS(resp.event.etype, 1913 1918 resp.revent.etype); 1919 PCUT_ASSERT_INT_EQUALS(resp.event.ev.focus.nfocus, 1920 resp.revent.ev.focus.nfocus); 1914 1921 1915 1922 rc = display_window_destroy(wnd); … … 2057 2064 } 2058 2065 2059 static void test_focus_event(void *arg )2066 static void test_focus_event(void *arg, unsigned nfocus) 2060 2067 { 2061 2068 test_response_t *resp = (test_response_t *) arg; 2062 2069 2063 2070 resp->revent.etype = wev_focus; 2071 resp->revent.ev.focus.nfocus = nfocus; 2064 2072 2065 2073 fibril_mutex_lock(&resp->event_lock); … … 2095 2103 } 2096 2104 2097 static void test_unfocus_event(void *arg )2105 static void test_unfocus_event(void *arg, unsigned nfocus) 2098 2106 { 2099 2107 test_response_t *resp = (test_response_t *) arg; 2100 2108 2101 2109 resp->revent.etype = wev_unfocus; 2110 resp->revent.ev.unfocus.nfocus = nfocus; 2102 2111 2103 2112 fibril_mutex_lock(&resp->event_lock);
Note:
See TracChangeset
for help on using the changeset viewer.