Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/fixed.c

    r46a47c0 r62223ec  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4646static void ui_fixed_ctl_destroy(void *);
    4747static errno_t ui_fixed_ctl_paint(void *);
    48 static ui_evclaim_t ui_fixed_ctl_kbd_event(void *, kbd_event_t *);
    4948static ui_evclaim_t ui_fixed_ctl_pos_event(void *, pos_event_t *);
    50 static void ui_fixed_ctl_unfocus(void *, unsigned);
     49static void ui_fixed_ctl_unfocus(void *);
    5150
    5251/** Push button control ops */
     
    5453        .destroy = ui_fixed_ctl_destroy,
    5554        .paint = ui_fixed_ctl_paint,
    56         .kbd_event = ui_fixed_ctl_kbd_event,
    5755        .pos_event = ui_fixed_ctl_pos_event,
    5856        .unfocus = ui_fixed_ctl_unfocus
     
    213211}
    214212
    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 
    238213/** Handle fixed layout position event.
    239214 *
     
    262237 *
    263238 * @param fixed Fixed layout
    264  * @param nfocus Number of remaining foci
    265  */
    266 void ui_fixed_unfocus(ui_fixed_t *fixed, unsigned nfocus)
     239 */
     240void ui_fixed_unfocus(ui_fixed_t *fixed)
    267241{
    268242        ui_fixed_elem_t *elem;
     
    270244        elem = ui_fixed_first(fixed);
    271245        while (elem != NULL) {
    272                 ui_control_unfocus(elem->control, nfocus);
     246                ui_control_unfocus(elem->control);
    273247
    274248                elem = ui_fixed_next(elem);
     
    297271
    298272        return ui_fixed_paint(fixed);
    299 }
    300 
    301 /** Handle fixed layout control keyboard event.
    302  *
    303  * @param arg Argument (ui_fixed_t *)
    304  * @param kbd_event Keyboard event
    305  * @return @c ui_claimed iff the event is claimed
    306  */
    307 ui_evclaim_t ui_fixed_ctl_kbd_event(void *arg, kbd_event_t *event)
    308 {
    309         ui_fixed_t *fixed = (ui_fixed_t *) arg;
    310 
    311         return ui_fixed_kbd_event(fixed, event);
    312273}
    313274
     
    328289 *
    329290 * @param arg Argument (ui_fixed_t *)
    330  * @param nfocus Number of remaining foci
    331  */
    332 void ui_fixed_ctl_unfocus(void *arg, unsigned nfocus)
     291 */
     292void ui_fixed_ctl_unfocus(void *arg)
    333293{
    334294        ui_fixed_t *fixed = (ui_fixed_t *) arg;
    335295
    336         ui_fixed_unfocus(fixed, nfocus);
     296        ui_fixed_unfocus(fixed);
    337297}
    338298
Note: See TracChangeset for help on using the changeset viewer.