diff options
Diffstat (limited to 'quantum/visualizer/visualizer.h')
-rw-r--r-- | quantum/visualizer/visualizer.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 90ecdcbaea..7ca6837ce6 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -30,13 +30,14 @@ SOFTWARE. #include "config.h" #include "gfx.h" +#include "action_layer.h" #ifdef LCD_BACKLIGHT_ENABLE -#include "lcd_backlight.h" +# include "lcd_backlight.h" #endif #ifdef BACKLIGHT_ENABLE -#include "backlight.h" +# include "backlight.h" #endif // use this function to merge both real_mods and oneshot_mods in a uint16_t @@ -45,7 +46,7 @@ uint8_t visualizer_get_mods(void); // This need to be called once at the start void visualizer_init(void); // This should be called at every matrix scan -void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds); +void visualizer_update(layer_state_t default_state, layer_state_t state, uint8_t mods, uint32_t leds); // This should be called when the keyboard goes to suspend state void visualizer_suspend(void); @@ -68,11 +69,11 @@ void draw_emulator(void); struct keyframe_animation_t; typedef struct { - uint32_t layer; - uint32_t default_layer; - uint32_t leds; // See led.h for available statuses - uint8_t mods; - bool suspended; + layer_state_t layer; + layer_state_t default_layer; + uint32_t leds; // See led.h for available statuses + uint8_t mods; + bool suspended; #ifdef BACKLIGHT_ENABLE uint8_t backlight_level; #endif @@ -86,7 +87,7 @@ typedef struct { // from the user customized code typedef struct visualizer_state_t { // The user code should primarily be modifying these - uint32_t target_lcd_color; + uint32_t target_lcd_color; const char* layer_text; // The user visualizer(and animation functions) can read these @@ -110,15 +111,15 @@ typedef bool (*frame_func)(struct keyframe_animation_t*, visualizer_state_t*); // while others are meant to be initialized by the user code typedef struct keyframe_animation_t { // These should be initialized - int num_frames; - bool loop; - int frame_lengths[MAX_VISUALIZER_KEY_FRAMES]; + int num_frames; + bool loop; + int frame_lengths[MAX_VISUALIZER_KEY_FRAMES]; frame_func frame_functions[MAX_VISUALIZER_KEY_FRAMES]; // Used internally by the system, and can also be read by // keyframe update functions - int current_frame; - int time_left_in_frame; + int current_frame; + int time_left_in_frame; bool first_update_of_frame; bool last_update_of_frame; bool need_update; |