mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -30,10 +30,12 @@
|
|||
#include <AK/Traits.h>
|
||||
#include <Kernel/KeyCode.h>
|
||||
|
||||
class GShortcut {
|
||||
namespace GUI {
|
||||
|
||||
class Shortcut {
|
||||
public:
|
||||
GShortcut() {}
|
||||
GShortcut(u8 modifiers, KeyCode key)
|
||||
Shortcut() {}
|
||||
Shortcut(u8 modifiers, KeyCode key)
|
||||
: m_modifiers(modifiers)
|
||||
, m_key(key)
|
||||
{
|
||||
|
@ -44,7 +46,7 @@ public:
|
|||
KeyCode key() const { return m_key; }
|
||||
String to_string() const;
|
||||
|
||||
bool operator==(const GShortcut& other) const
|
||||
bool operator==(const Shortcut& other) const
|
||||
{
|
||||
return m_modifiers == other.m_modifiers
|
||||
&& m_key == other.m_key;
|
||||
|
@ -55,11 +57,13 @@ private:
|
|||
KeyCode m_key { KeyCode::Key_Invalid };
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<GShortcut> : public GenericTraits<GShortcut> {
|
||||
static unsigned hash(const GShortcut& shortcut)
|
||||
struct Traits<GUI::Shortcut> : public GenericTraits<GUI::Shortcut> {
|
||||
static unsigned hash(const GUI::Shortcut& shortcut)
|
||||
{
|
||||
return pair_int_hash(shortcut.modifiers(), shortcut.key());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue