summaryrefslogtreecommitdiff
path: root/src/input_handler.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-20 08:50:53 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-20 09:06:53 +0000
commit5e4f5cd2a01605bdbce062011d15318d089da6c9 (patch)
tree8cd504c586bd99d96360cb2119a13fb40c13b54c /src/input_handler.hh
parentc0f1b7b99f6b882e9622f41e1ff05f927210ce90 (diff)
Move enum option handling in enum.hh and refactor enum options
Diffstat (limited to 'src/input_handler.hh')
-rw-r--r--src/input_handler.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh
index 49767eb4..036633dc 100644
--- a/src/input_handler.hh
+++ b/src/input_handler.hh
@@ -103,6 +103,26 @@ private:
int m_handle_key_level = 0;
};
+enum class AutoInfo
+{
+ None = 0,
+ Command = 1 << 0,
+ OnKey = 1 << 1,
+ Normal = 1 << 2
+};
+
+template<>
+struct WithBitOps<AutoInfo> : std::true_type {};
+
+constexpr Array<EnumDesc<AutoInfo>, 3> enum_desc(AutoInfo)
+{
+ return { {
+ { AutoInfo::Command, "command"},
+ { AutoInfo::OnKey, "onkey"},
+ { AutoInfo::Normal, "normal" }
+ } };
+}
+
bool show_auto_info_ifn(StringView title, StringView info, AutoInfo mask, const Context& context);
template<typename Cmd>