diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-12 10:08:35 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-12 10:08:35 +0100 |
commit | db98327bdc24b3306961cde5036ea73e766008c3 (patch) | |
tree | 3980dd4690778151318bc28e7d5ae85aeecda28e /Kernel | |
parent | 9c1c8854831005cee601d73bba3a0737f350c236 (diff) | |
download | serenity-db98327bdc24b3306961cde5036ea73e766008c3.zip |
Plumb menu item activation events from WindowServer to clients.
GMenu now has an "on_item_activation" callback that fires whenever one
of its items are activated. The menu item identifier is used to distinguish
between items.
Use this to implement font switching in Terminal. :^)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/GUITypes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/GUITypes.h b/Kernel/GUITypes.h index 61aa6587eb..263cca0145 100644 --- a/Kernel/GUITypes.h +++ b/Kernel/GUITypes.h @@ -67,6 +67,7 @@ struct GUI_Event { WindowActivated, WindowDeactivated, WindowCloseRequest, + MenuItemActivated, }; Type type { Invalid }; int window_id { -1 }; @@ -88,6 +89,10 @@ struct GUI_Event { bool alt : 1; bool shift : 1; } key; + struct { + int menu_id; + unsigned identifier; + } menu; }; }; |