summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-12 10:08:35 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-12 10:08:35 +0100
commitdb98327bdc24b3306961cde5036ea73e766008c3 (patch)
tree3980dd4690778151318bc28e7d5ae85aeecda28e /Kernel
parent9c1c8854831005cee601d73bba3a0737f350c236 (diff)
downloadserenity-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.h5
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;
};
};