mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 05:54:58 +00:00
LibGUI: Define bitwise operations for GUI::MouseButton
This type is designed to be use as a flag. Define bitwise operations for convenience. (clang-format-17 caught an east-const conversion here as well).
This commit is contained in:
parent
4b777397b5
commit
f2204e2b3a
1 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/EnumBits.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -263,7 +264,7 @@ public:
|
|||
ByteString const& keymap() const { return m_keymap; }
|
||||
|
||||
private:
|
||||
const ByteString m_keymap;
|
||||
ByteString const m_keymap;
|
||||
};
|
||||
|
||||
class WMAddToQuickLaunchEvent : public WMEvent {
|
||||
|
@ -384,6 +385,8 @@ enum MouseButton : u8 {
|
|||
Forward = 16,
|
||||
};
|
||||
|
||||
AK_ENUM_BITWISE_OPERATORS(MouseButton);
|
||||
|
||||
class KeyEvent final : public Event {
|
||||
public:
|
||||
KeyEvent(Type type, KeyCode key, u8 map_entry_index, u8 modifiers, u32 code_point, u32 scancode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue