mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibGUI: Move shortcut actions from GEventLoop to GApplications.
I'm gonna want to have nested event loops sooner or later, so let's not pollute GEventLoop with things that are meant to work globally. This patch also changes key events to pass around their modifiers as a bitfield all the way around the system instead of breaking them up.
This commit is contained in:
parent
725b57fe1f
commit
5e40aa4f1a
11 changed files with 63 additions and 55 deletions
|
@ -7,14 +7,14 @@
|
|||
class GShortcut {
|
||||
public:
|
||||
GShortcut() { }
|
||||
GShortcut(unsigned modifiers, KeyCode key)
|
||||
GShortcut(byte modifiers, KeyCode key)
|
||||
: m_modifiers(modifiers)
|
||||
, m_key(key)
|
||||
{
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_key != KeyCode::Key_Invalid; }
|
||||
unsigned modifiers() const { return m_modifiers; }
|
||||
byte modifiers() const { return m_modifiers; }
|
||||
KeyCode key() const { return m_key; }
|
||||
String to_string() const;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
unsigned m_modifiers { 0 };
|
||||
byte m_modifiers { 0 };
|
||||
KeyCode m_key { KeyCode::Key_Invalid };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue