Changeset 5de852c in mainline for uspace/lib/ui/include


Ignore:
Timestamp:
2022-01-11T13:12:15Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bfc0fc6
Parents:
59768c7
git-author:
Jiri Svoboda <jiri@…> (2022-01-10 20:11:54)
git-committer:
Jiri Svoboda <jiri@…> (2022-01-11 13:12:15)
Message:

Coordinate keyboard event delivery between application and UI framework

If an application sets its own keyboard event handler, it needs to call
ui_window_def_kbd() to deliver events to the window's UI control tree.
Menubar should be able to capture these events so that they are not
accidentally acted upon by the application keyboard handler.

Location:
uspace/lib/ui/include/ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/include/ui/menu.h

    r59768c7 r5de852c  
    3939#include <errno.h>
    4040#include <gfx/coord.h>
     41#include <io/kbd_event.h>
    4142#include <io/pos_event.h>
    4243#include <stdbool.h>
     
    5758extern bool ui_menu_is_open(ui_menu_t *);
    5859extern errno_t ui_menu_paint(ui_menu_t *, gfx_coord2_t *);
     60extern ui_evclaim_t ui_menu_kbd_event(ui_menu_t *, kbd_event_t *);
    5961extern ui_evclaim_t ui_menu_pos_event(ui_menu_t *, gfx_coord2_t *,
    6062    pos_event_t *);
  • uspace/lib/ui/include/ui/window.h

    r59768c7 r5de852c  
    6565extern void ui_window_set_ctl_cursor(ui_window_t *, ui_stock_cursor_t);
    6666extern errno_t ui_window_paint(ui_window_t *);
    67 extern void ui_window_def_kbd(ui_window_t *, kbd_event_t *);
     67extern ui_evclaim_t ui_window_def_kbd(ui_window_t *, kbd_event_t *);
    6868extern errno_t ui_window_def_paint(ui_window_t *);
    6969extern void ui_window_def_pos(ui_window_t *, pos_event_t *);
Note: See TracChangeset for help on using the changeset viewer.