summaryrefslogtreecommitdiffstats
path: root/visualizer.h
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-03-13 17:54:45 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-03-13 20:13:02 +0200
commitb93d07198a18063594a59dd193d0961622087868 (patch)
tree4978d505018cdd97cb8683511676bba0f097cf56 /visualizer.h
parent315edb48265e6baedd07f34c9e6e323d28814b4e (diff)
Suspend support for the visualizer
Diffstat (limited to 'visualizer.h')
-rw-r--r--visualizer.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/visualizer.h b/visualizer.h
index b7b0a3a7d0..22798cda6b 100644
--- a/visualizer.h
+++ b/visualizer.h
@@ -38,8 +38,12 @@ SOFTWARE.
// This need to be called once at the start
void visualizer_init(void);
-// This should be called before every matrix scan
-void visualizer_set_state(uint32_t default_state, uint32_t state, uint32_t leds);
+// This should be called at every matrix scan
+void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds);
+// This should be called when the keyboard goes to suspend state
+void visualizer_suspend(void);
+// This should be called when the keyboard wakes up from suspend state
+void visualizer_resume(void);
// If you need support for more than 8 keyframes per animation, you can change this
#define MAX_VISUALIZER_KEY_FRAMES 8
@@ -50,6 +54,7 @@ typedef struct {
uint32_t layer;
uint32_t default_layer;
uint32_t leds; // See led.h for available statuses
+ bool suspended;
} visualizer_keyboard_status_t;
// The state struct is used by the various keyframe functions
@@ -108,13 +113,19 @@ bool keyframe_set_backlight_color(keyframe_animation_t* animation, visualizer_st
bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state);
// Displays a bitmap (0/1) of all the currently active layers
bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state);
+
+bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
+bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
+
// Call this once, when the initial animation has finished, alternatively you can call it
// directly from the initalize_user_visualizer function (the animation can be null)
-bool user_visualizer_inited(keyframe_animation_t* animation, visualizer_state_t* state);
+bool enable_visualization(keyframe_animation_t* animation, visualizer_state_t* state);
// These two functions have to be implemented by the user
void initialize_user_visualizer(visualizer_state_t* state);
void update_user_visualizer_state(visualizer_state_t* state);
+void user_visualizer_suspend(visualizer_state_t* state);
+void user_visualizer_resume(visualizer_state_t* state);
#endif /* VISUALIZER_H */