aboutsummaryrefslogtreecommitdiffstats
path: root/src/Kaleidoscope-LayerHighlighter.h
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-06-11 17:37:02 -0400
committerBrian Cully <bjc@kublai.com>2022-06-11 17:37:02 -0400
commit4569692f1eaf3281c3a7274652b4a4b389c329e7 (patch)
tree751e1596bac65912978aa3fb63f2fa5287ead6ec /src/Kaleidoscope-LayerHighlighter.h
parent09f420ea3d4d9de0f058b14f4a79aa6572c30b5a (diff)
downloadKaleidoscope-LayerHighlighter-4569692f1eaf3281c3a7274652b4a4b389c329e7.tar.gz
Kaleidoscope-LayerHighlighter-4569692f1eaf3281c3a7274652b4a4b389c329e7.zip
Update for latest Kaleidoscope.
Diffstat (limited to 'src/Kaleidoscope-LayerHighlighter.h')
-rw-r--r--src/Kaleidoscope-LayerHighlighter.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/Kaleidoscope-LayerHighlighter.h b/src/Kaleidoscope-LayerHighlighter.h
index ba67395..3807cd1 100644
--- a/src/Kaleidoscope-LayerHighlighter.h
+++ b/src/Kaleidoscope-LayerHighlighter.h
@@ -1,20 +1,27 @@
#pragma once
-#include <Kaleidoscope.h>
+#include "kaleidoscope/KeyEvent.h" // for KeyEvent
+#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult
+#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn…
+#include "kaleidoscope/plugin.h" // for Plugin
-class LayerHighlighter : public kaleidoscope::Plugin {
- public:
- LayerHighlighter(uint8_t l): color(CRGB(160, 0, 0)), lockHue(170), layer(l) {}
+namespace kaleidoscope {
+ namespace plugin {
+ class LayerHighlighter : public Plugin {
+ public:
+ LayerHighlighter(uint8_t l): color(CRGB(160, 0, 0)), lockHue(170), layer(l) {}
- cRGB color;
- uint8_t lockHue;
+ cRGB color;
+ uint8_t lockHue;
- kaleidoscope::EventHandlerResult onSetup(void);
- kaleidoscope::EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t key_state);
- kaleidoscope::EventHandlerResult afterEachCycle();
+ EventHandlerResult onSetup(void);
+ EventHandlerResult onKeyEvent(KeyEvent &event);
+ // EventHandlerResult onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state);
+ EventHandlerResult afterEachCycle();
- private:
- const uint8_t layer;
- static byte row, col;
- uint8_t savedLEDMode;
-};
+ private:
+ const uint8_t layer;
+ };
+
+ }
+}