summaryrefslogtreecommitdiffstats
path: root/quantum/visualizer/visualizer.h
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-05 09:08:25 +0200
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 17:34:59 +0200
commit64d63ab42281318d891434fbc00277043298dd70 (patch)
tree03747a21a2a5a30df3e120e117bdd51ce99346e6 /quantum/visualizer/visualizer.h
parent1e7585e76771e1a2d8ca733fc09c19f9fa0e903c (diff)
downloadqmk_firmware-64d63ab42281318d891434fbc00277043298dd70.tar.gz
qmk_firmware-64d63ab42281318d891434fbc00277043298dd70.tar.xz
Remove the need to manually enable the visualizer
Diffstat (limited to 'quantum/visualizer/visualizer.h')
-rw-r--r--quantum/visualizer/visualizer.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h
index f37ce8416..463934849 100644
--- a/quantum/visualizer/visualizer.h
+++ b/quantum/visualizer/visualizer.h
@@ -130,20 +130,22 @@ void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* stat
// Does nothing, useful for adding delays
bool keyframe_no_operation(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 enable_visualization(keyframe_animation_t* animation, visualizer_state_t* state);
-
// The master can set userdata which will be transferred to the slave
#ifdef VISUALIZER_USER_DATA_SIZE
void visualizer_set_user_data(void* user_data);
#endif
// These functions have to be implemented by the user
-void initialize_user_visualizer(visualizer_state_t* state);
+// Called regularly each time the state has changed (but not every scan loop)
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status);
+// Called when the computer goes to suspend, will also stop calling update_user_visualizer_state
void user_visualizer_suspend(visualizer_state_t* state);
+// You have to start at least one animation as a response to the following two functions
+// When the animation has finished the visualizer will resume normal operation and start calling the
+// update_user_visualizer_state again
+// Called when the keyboard boots up
+void initialize_user_visualizer(visualizer_state_t* state);
+// Called when the computer resumes from a suspend
void user_visualizer_resume(visualizer_state_t* state);
-
#endif /* VISUALIZER_H */