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:
Timothy Flynn 2024-03-04 14:13:30 -05:00 committed by Andreas Kling
parent 4b777397b5
commit f2204e2b3a
Notes: sideshowbarker 2024-07-16 19:17:47 +09:00

View File

@ -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)