Changeset 7481ee19 in mainline for uspace/lib/ui/src/fixed.c
- Timestamp:
- 2021-06-23T08:15:00Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a977e37
- Parents:
- 034ce6bb
- git-author:
- Jiri Svoboda <jiri@…> (2021-06-22 17:14:40)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-06-23 08:15:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/fixed.c
r034ce6bb r7481ee19 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 46 46 static void ui_fixed_ctl_destroy(void *); 47 47 static errno_t ui_fixed_ctl_paint(void *); 48 static ui_evclaim_t ui_fixed_ctl_kbd_event(void *, kbd_event_t *); 48 49 static ui_evclaim_t ui_fixed_ctl_pos_event(void *, pos_event_t *); 49 50 static void ui_fixed_ctl_unfocus(void *); … … 53 54 .destroy = ui_fixed_ctl_destroy, 54 55 .paint = ui_fixed_ctl_paint, 56 .kbd_event = ui_fixed_ctl_kbd_event, 55 57 .pos_event = ui_fixed_ctl_pos_event, 56 58 .unfocus = ui_fixed_ctl_unfocus … … 211 213 } 212 214 215 /** Handle fixed layout keyboard event. 216 * 217 * @param fixed Fixed layout 218 * @param kbd_event Keyboard event 219 * @return @c ui_claimed iff the event is claimed 220 */ 221 ui_evclaim_t ui_fixed_kbd_event(ui_fixed_t *fixed, kbd_event_t *event) 222 { 223 ui_fixed_elem_t *elem; 224 ui_evclaim_t claimed; 225 226 elem = ui_fixed_first(fixed); 227 while (elem != NULL) { 228 claimed = ui_control_kbd_event(elem->control, event); 229 if (claimed == ui_claimed) 230 return ui_claimed; 231 232 elem = ui_fixed_next(elem); 233 } 234 235 return ui_unclaimed; 236 } 237 213 238 /** Handle fixed layout position event. 214 239 * … … 273 298 } 274 299 300 /** Handle fixed layout control keyboard event. 301 * 302 * @param arg Argument (ui_fixed_t *) 303 * @param kbd_event Keyboard event 304 * @return @c ui_claimed iff the event is claimed 305 */ 306 ui_evclaim_t ui_fixed_ctl_kbd_event(void *arg, kbd_event_t *event) 307 { 308 ui_fixed_t *fixed = (ui_fixed_t *) arg; 309 310 return ui_fixed_kbd_event(fixed, event); 311 } 312 275 313 /** Handle fixed layout control position event. 276 314 *
Note:
See TracChangeset
for help on using the changeset viewer.